Fully offline Arabic AI assistant with RAG (Retrieval-Augmented Generation) on ZIM archives. Optimized for low-resource devices (2โ8GB RAM, CPU only). Comes with 25+ builtโin skills (PDF, DOCX, XLSX, PPTX, web art, coding, design, etc.).
- llama.cpp engine โ Runs on CPU, no GPU required.
- Arabic RAG system โ Search Wikipedia / dictionaries from ZIM files (e.g.,
wiktionary_ar_mini.zim). - Vector database โ Uses Chroma DB for fast similarity search.
- 25+ skills โ Readyโtoโuse: PDF, DOCX, XLSX, PPTX, canvas design, algorithmic art, web testing, MCP builder, Slack GIF creator, theme factory, and more (see
skills/folder). - Smart memory โ Maintains conversation context.
- Offline-first โ Complete privacy, no internet needed.
- OS: Linux, Windows, macOS
- RAM: 2GB (small models) โ 8GB (larger models)
- CPU: Any modern processor (AVX2 recommended)
- Storage: ~5GB for models + ZIM file size
- Software: Python 3.8+, pip, git
git clone https://github.com/AHX47/llamaZIM.git
cd LlamaZIMpip install -r requirements.txtDownload a GGUF model (e.g., SmolLM2-135M-Q4_K_M.gguf) and put it inside:
models/SmolLM2-135M-Instruct-GGUF/Your current structure already contains that folder โ ensure the .gguf file is directly inside it.
Put your ZIM files (e.g., wiktionary_ar_mini.zim) inside:
zim_archives/python3 main.py --indexThis will create/update the vector database inside vector_db/ (Chroma).
python3 main.pyYou can also test individual components with:
python3 test_system.py| Model | Size | RAM | Use case |
|---|---|---|---|
| SmolLM2-135M | 135M | 2GB | Very weak devices, fast |
| Gemma-3-270M | 270M | 3โ4GB | Balanced |
| DeepSeek-Coder-1.3B | 1.3B | 3โ8GB | Programming & logic |
| DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M | 1.3B | 4โ8GB | Programming & logic & thinking ... |
llamaZIM/
โโโ config/
โ โโโ config.yaml
โโโ models/
โ โโโ SmolLM2-135M-Instruct-GGUF/ # put .gguf here
โโโ zim_archives/
โ โโโ wiktionary_ar_mini.zim
โโโ vector_db/
โ โโโ chroma.sqlite3 # created after --index
โโโ skills/ # 25+ ready-to-use skills
โ โโโ pdf/
โ โโโ docx/
โ โโโ xlsx/
โ โโโ pptx/
โ โโโ canvas-design/
โ โโโ algorithmic-art/
โ โโโ webapp-testing/
โ โโโ mcp-builder/
โ โโโ slack-gif-creator/
โ โโโ theme-factory/
โ โโโ ... (more)
โโโ src/
โ โโโ core/ # model_manager.py, skill_manager.py
โ โโโ rag/ # zim_manager.py (handles ZIM + Chroma)
โ โโโ agents/ # agent_manager.py
โ โโโ cli/ # (future CLI interface)
โโโ main.py
โโโ test_system.py
โโโ requirements.txt
โโโ README.md
- The system reads ZIM files (e.g., Arabic Wiktionary) and indexes them into ChromaDB (
vector_db/). - When you ask a question, it retrieves relevant passages from the ZIM archive and feeds them to the LLM as context.
- This enables offline, private questionโanswering over Arabic Wikipedia / dictionaries.
All skills are located in the skills/ folder. The system automatically discovers them. You can enable/disable skills via config/config.yaml or through the skill manager.
Example config.yaml (partial):
model:
path: "models/SmolLM2-135M-Instruct-GGUF/smollm2-135m-q4_k_m.gguf"
context_size: 2048
skills:
enabled:
- pdf
- docx
- xlsx
- canvas-design
disabled:
- webapp-testing # requires optional dependencies
rag:
# RAG Settings
embedding_model_name: "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2" # A good multilingual model
vector_db_path: "/home/ubuntu/llama_zim_system/vector_db"
chunk_size: 512
chunk_overlap: 50
# Agent Settings
agent_framework: "LangGraph" # Options: CrewAI, LangGraph, Smolagents
# Skills Settings
enabled_skills:
- "pdf-reading"
- "docx"
- "pptx"
- "xlsx"
# Add custom ZIM skills here later
zim_path: "zim_archives/"
vector_db_path: "vector_db/"| Issue | Solution |
|---|---|
ModuleNotFoundError |
Run pip install -r requirements.txt again |
| No results from RAG | Run python3 main.py --index to build vector DB |
| Model not found | Check the path in config.yaml โ point to the actual .gguf file |
| High RAM usage | Use a smaller model or reduce context_size in config |
- To add a new skill: create a folder under
skills/with aSKILL.mddescription and any Python scripts. The skill manager will pick it up. - To modify RAG: edit
src/rag/zim_manager.py.
MIT โ free to use, modify, and distribute.
- llama.cpp
- Chroma DB
- KiwiX ZIM archives
- Anthropicโs skills library (many skills under
skills/are adapted from there)
ู ุณุงุนุฏ ุฐูุงุก ุงุตุทูุงุนู ุนุฑุจู ูุนู ู ุฏูู ุงุชุตุงูุ ู ุน ูุธุงู RAG ุนูู ุฃุฑุดููุงุช ZIM. ูุนู ู ุนูู ุงูู ุนุงูุฌ ููุท (2-8 ุฌูุฌุงุจุงูุช ุฑุงู ). ูุชุถู ู ุฃูุซุฑ ู ู 25 ู ูุงุฑุฉ ู ุฏู ุฌุฉ (PDF, DOCX, XLSX, PPTX, ุชุตู ูู ุ ุจุฑู ุฌุฉุ ูุบูุฑูุง).
- ู ุญุฑู llama.cpp โ ูุนู ู ุนูู ุงูู ุนุงูุฌ ููุท.
- RAG ุนุฑุจู โ ุงุณุชุนูุงู ุฃุฑุดููุงุช ZIM (ู ุซู ููููุจูุฏูุงุ ุงูููุงู ูุณ).
- ูุงุนุฏุฉ ุจูุงูุงุช ู ุชุฌูุงุช Chroma โ ุจุญุซ ุณุฑูุน.
- 25+ ู
ูุงุฑุฉ โ ุฌุงูุฒุฉ ููุงุณุชุฎุฏุงู
(ุงูุธุฑ ู
ุฌูุฏ
skills/). - ุฐุงูุฑุฉ ุงูู ุญุงุฏุซุฉ โ ุณูุงู ุฐูู.
- ุจุฏูู ุฅูุชุฑูุช โ ุฎุตูุตูุฉ ุชุงู ุฉ.
- ูุธุงู ุชุดุบูู: Linux, Windows, macOS
- ุฑุงู : 2-8 ุฌูุฌุงุจุงูุช
- ู ุณุงุญุฉ: 5 ุฌูุฌุงุจุงูุช + ุญุฌู ู ููุงุช ZIM
- Python 3.8+ุ pipุ git
git clone https://github.com/AHX47/llamaZIM.git
cd LlamaZIM
pip install -r requirements.txt
# ุถุน ูู
ูุฐุฌ GGUF ูู ู
ุฌูุฏ models/ ูู
ูู ZIM ูู zim_archives/
python3 main.py --index # ู
ุฑุฉ ูุงุญุฏุฉ ููููุฑุณุฉ
python3 main.pymodels/โ ูู ุงุฐุฌ GGUFzim_archives/โ ู ููุงุช ZIM (ู ุซู wiktionary_ar_mini.zim)vector_db/โ ููุฑุณ Chroma (ููุดุฃ ุชููุงุฆูุงู)skills/โ ุงูู ูุงุฑุงุช (PDFุ DOCXุ ุฅูุฎ)src/โ ุงูููุฏ ุงูู ุตุฏุฑู (core, rag, agents)main.pyโ ููุทุฉ ุงูุฏุฎูู
ุงูู
ูุงุฑุงุช ู
ูุฌูุฏุฉ ูู ู
ุฌูุฏ skills/. ูู
ููู ุชูุนูููุง ุฃู ุชุนุทูููุง ู
ู config/config.yaml.
- RAG ูุง ูุนู
ู โ ุดุบู
python3 main.py --indexู ุฑุฉ ุฃุฎุฑู. - ุงููู
ูุฐุฌ ุบูุฑ ู
ูุฌูุฏ โ ุชุฃูุฏ ู
ู ุงูู
ุณุงุฑ ูู
config.yaml. - ุงุณุชููุงู ุฑุงู ุนุงูู โ ุงุณุชุฎุฏู ูู ูุฐุฌุงู ุฃุตุบุฑ.
MIT โ ุญุฑูุฉ ุงูุงุณุชุฎุฏุงู ูุงูุชุนุฏูู.
โจ ุชู ุชุทููุฑ ูุฐุง ุงููุธุงู ููููู ู ุตูุน ู ุนุฑูุฉ ุดุฎุตู ูุนู ู ุฏูู ุงุชุตุงู ุนูู ุฃู ุฌูุงุฒ. โจ
---