abalayla commited on
Commit
f3499b4
·
verified ·
1 Parent(s): ba937aa

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +90 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - ar
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - gguf
8
+ - llama-cpp
9
+ - egyptian-arabic
10
+ - conversational
11
+ - cpu
12
+ base_model: Qwen/Qwen2.5-1.5B-Instruct
13
+ ---
14
+
15
+ # Mini-NABD — lightweight Egyptian-Arabic chat model (GGUF)
16
+
17
+ Mini-NABD is a tiny conversational model that speaks Egyptian Arabic (Masri)
18
+ like a friend: casual, funny when natural, short answers. It is an **additional**
19
+ fast/local companion to the main NABD AI, not a replacement.
20
+
21
+ ## Files
22
+
23
+ | file | what | size | RAM |
24
+ |---|---|---|---|
25
+ | `mini-nabd-q4_k_m.gguf` | recommended 4-bit | ~1.0 GB | ~2 GB |
26
+
27
+ Only the smallest practical file is published — no variant zoo.
28
+
29
+ ## Run it (CPU, 4GB RAM, no GPU)
30
+
31
+ ```bash
32
+ # llama.cpp server (OpenAI-compatible)
33
+ ./llama-server -m mini-nabd-q4_k_m.gguf -c 2048 --port 11435
34
+
35
+ curl http://127.0.0.1:11435/v1/chat/completions -H 'Content-Type: application/json' -d '{
36
+ "model": "mini-nabd",
37
+ "messages": [
38
+ {"role": "system", "content": "أنت نبض الصغير — صاحب مصري خفيف الدم، رد بالعامية مختصر."},
39
+ {"role": "user", "content": "عامل ايه؟"}
40
+ ]}'
41
+ ```
42
+
43
+ Or Python: `pip install llama-cpp-python`, then `Llama("mini-nabd-q4_k_m.gguf", n_ctx=2048)`.
44
+
45
+ - Recommended context: **2048** (fits 4GB with room to spare).
46
+ - Startup: seconds. Speed on a normal laptop CPU: roughly 15–40 tok/s
47
+ (measured numbers go in the release notes per build).
48
+ - Temp 0.7, max ~256 tokens — it is tuned for short replies.
49
+
50
+ ## NABD integration + Tavily example
51
+
52
+ ```js
53
+ const { autoProvider, needsSearch } = require('./router'); // providers/router
54
+ const { tavilySearch, formatForMini } = require('./tavily'); // providers/tavily
55
+
56
+ async function answer(userText) {
57
+ let context = '';
58
+ if (needsSearch(userText)) { // router decides, not the tiny model
59
+ const t = await tavilySearch(userText); // TAVILY_API_KEY stays server-side
60
+ context = formatForMini(userText, t) + '\n';
61
+ }
62
+ const sys = 'أنت نبض الصغير — صاحب مصري خفيف الدم، رد بالعامية مختصر.'
63
+ + (context ? '\n' + context : '');
64
+ return miniReply(sys, userText); // POST to 127.0.0.1:11435, fallback main
65
+ }
66
+ ```
67
+
68
+ ## Training (v0 status: base + system prompt)
69
+
70
+ v0 ships `Qwen2.5-1.5B-Instruct` Q4_K_M unchanged — the Egyptian personality
71
+ comes from the system prompt in `SYSTEM.md`, not from weights yet. Measured
72
+ gaps on the raw base (Arabizi loops, MSA-style refusals of light slang) are
73
+ documented and are exactly what v1 fixes.
74
+
75
+ v1 roadmap (ready to run, see `training/`): LoRA r=16 on 60 hand-written
76
+ Egyptian pairs (greetings, slang, Arabizi, humor, live-info refusals) on a
77
+ Colab T4, merge + Q4_K_M export replacing this file. Tool routing stays
78
+ external, so weights will contain zero tool tokens.
79
+
80
+ ## Limitations
81
+
82
+ - Small talk + simple explanations only — hard reasoning, long code, and
83
+ vision go to the main AI.
84
+ - Knowledge cutoff = base model; live facts need Tavily via the router.
85
+ - Egyptian dialect is a style layer over Qwen's Arabic — MSA slips through
86
+ on technical topics.
87
+
88
+ ## License
89
+
90
+ Apache-2.0 (inherits Qwen2.5 + Llama.cpp ecosystem licensing for the base).