✨ Features
- 🗣️ Oran Darija: Communicates naturally in the Algerian Oran dialect.
- 💬 Question Answering: Answers questions and provides useful information.
- 🧠 AI Agent: Understands instructions and determines the appropriate response or action.
- 🌤️ Weather: Can retrieve weather information using external tools.
- 👁️ Screen Understanding: Can analyze screenshots when connected to compatible vision capabilities.
- 🏠 Smart Home Control: Can control smart devices through external integrations.
- 🍲 Local Knowledge: Understands Algerian culture, expressions, recipes, and everyday conversations.
- ⚙️ Task Execution: Can interact with external tools and integrations.
💬 Example Conversations
1. General Conversation
User:
Zaki:
أنا زاكي، مساعد ذكي بالدارجة الوهرانية،مهمتي نجاوب على أسئلتك ونعاونك في المهام تاعك.
2. Smart Home Control
User:
Zaki:
صافي، الضو راه شاعل ف الكوزينة خويا.
3. Local Knowledge and Cooking
User:
كيفاش نطيب الحريرة وهراني؟
Zaki:
الحريرة الوهرانية يخصها اللحم ولا الدجاج والماكلة،البصل، الطوماطيش، الزرودية، القزبر، الكروية والزعفران.كي يطيبو ترحيهم وتزيدلهم التشيشة (المرمز)ولا الفرينة المخمرة مع الكروية والقارص في اللخرباش تجي بنينة وعالقة.
4. Weather Assistant
User:
واش راه الجو اليوم في وهران؟
Zaki:
واخا خويا، راني شفتلك أحوال الطقس فـ وهران اليوم،الحالة راهي باينة مسقمة.
5. Screen Understanding
User:
واش كاين في هاد الإيكران؟
Zaki:
راني نشوف فالشاشة خويا، واش راك تحوس تعرف منها؟
🚀 Installation
Install the required dependencies:
pip install transformers torch accelerate
📦 Load Zaki Brain V2
Load the tokenizer and model using Hugging Face Transformers.
import torchfrom transformers import AutoTokenizer, AutoModelForCausalLM model_id = "harirhm/zaki-brain-v2" # Load tokenizertokenizer = AutoTokenizer.from_pretrained(model_id) # Load modelmodel = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", torch_dtype="auto") model.eval() print("Zaki Brain V2 loaded successfully!")
💬 Run Zaki
Use a system prompt to define Zaki's personality and communication style.
import torch messages = [ { "role": "system", "content": ( "نتا زاكي، مساعد ذكي يهدر بالدارجة تاع وهران. " "جاوب باختصار وبطريقة طبيعية." ) }, { "role": "user", "content": "شكون نتا؟" }] # Prepare inputinputs = tokenizer.apply_chat_template( messages, tokenize=True, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device) # Generate responsewith torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=256, temperature=0.3, do_sample=True, pad_token_id=tokenizer.eos_token_id ) # Decode generated responseresponse = tokenizer.decode( outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True) print("Zaki:", response)
🧪 Interactive Chat
Run Zaki in an interactive terminal session.
import torch system_prompt = ( "نتا زاكي، مساعد ذكي يهدر بالدارجة تاع وهران. " "جاوب ديما باختصار وبلا هدرة زايدة.") while True: user_input = input("You: ") if user_input.lower() in ["exit", "quit"]: print("Zaki: صحا خويا!") break messages = [ { "role": "system", "content": system_prompt }, { "role": "user", "content": user_input } ] inputs = tokenizer.apply_chat_template( messages, tokenize=True, add_generation_prompt=True, return_tensors="pt", return_dict=True ).to(model.device) with torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=256, temperature=0.3, do_sample=True, pad_token_id=tokenizer.eos_token_id ) response = tokenizer.decode( outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True ) print("Zaki:", response)
Note: These examples assume the tokenizer has a compatible chat template.
🧩 Agent Architecture
Zaki is designed to work as part of an AI agent system.
The agent workflow consists of five main stages:
- Understand: Understands the user's request in Algerian Darija.
- Reason: Determines whether the user needs information or an action.
- Select a Tool: Identifies the appropriate external tool.
- Execute: Performs the requested action through available integrations.
- Respond: Communicates the result naturally in Oran Darija.
Zaki can be integrated with external tools for:
- Weather information and forecasts.
- Smart home automation.
- Screenshot and screen analysis.
- Device control.
- Other external services and APIs.
Important: The language model provides the intelligence and response generation. External capabilities require a separate agent application, compatible tools, and integrations. Loading the model alone does not automatically activate these features.
🎯 Intended Use
- Algerian Darija conversational assistants.
- Voice-controlled personal assistants.
- Smart home automation systems.
- Weather assistants.
- Multimodal AI applications.
- Agent-based AI experiments.
- Arabic dialect understanding and generation.
⚠️ Limitations
- Responses may occasionally contain inaccurate information.
- Dialect understanding can vary depending on context.
- External actions require connected tools and integrations.
- Visual understanding requires compatible vision capabilities.
- Hardware requirements depend on the model size and configuration.
👨💻 Author
Created by harirhm.
Model: harirhm/zaki-brain-v2
⭐ If you find Zaki Brain V2 useful, consider giving the repository a star!