bots-garden/razorbillpublic Fork
⑂ 47383cb
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

ticket #61: spike — Olala-v1.0-mini-7A1B-MLX (olala architecture, OVHai mlx-engine fork)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-27T05:27:21+01:00 Browse files
47383cb parent: f0b00a8
added .tickets/issues/0061-spike-olala-architecture-mlx-engine-fork.yaml +70 -0
new file mode 100644
@@ -0,0 +1,70 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 61
3+title: "Spike: run Olala-v1.0-mini-7A1B-MLX (`olala` architecture, needs OVHai's mlx-engine fork)"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-27T05:00:00.000Z
9+updatedAt: 2026-11-27T05:00:00.000Z
10+labels:
11+ - "spike"
12+ - "area::engine"
13+ - "area::models"
14+ - "mac-only"
15+ - "priority::medium"
16+epic: "Inference engine"
17+related:
18+ - 47
19+ - 25
20+body: |
21+ Asked by the user (2026-11-27): https://huggingface.co/OVHaiLLM/Olala-v1.0-mini-7A1B-MLX "needs a forked mlx-engine — do you think you could make it work?"
22+
23+ ## What the model card and config say (read 2026-11-27)
24+ - `model_type: olala`, `OlalaForCausalLM`. Upstream mlx-lm, mlx-vlm and LM Studio cannot load it; the card points to https://github.com/OVHai-LLM/mlx-engine (a fork of lmstudio-ai/mlx-engine, Python 3.11), whose `mlx_engine.models.olala.register()` adds the architecture to mlx-lm.
25+ - Hybrid: 36 layers, `layers_config` `MMMMVMMMMV…` (Mamba-3 mixers `M` with one attention-type layer `V` every 5th), MoE with 256 routed experts / 6 active + a shared expert, hidden 1536 (~7 B total, ~1 B active). Many exotic flags in the config (DSA/NSA/KDA/GDN, gated attention, cosnet, n-gram embeddings…), most probably off; which ones are active must be read from the fork's code.
26+ - "The Mamba state is kept in float32"; a custom Metal MoE kernel ("MoE v3"), with an `OLALA_MOE_V3=0` fallback on M1 (thread-group limit 384).
27+ - Folders `bf16`, `q8`, `q5e6`, `q4e8`: mixed quantization (e.g. q4e8 = experts 4-bit group 32, the rest 8-bit). "Quantize with our recipe only: generic recipes produce NaN."
28+ - Chat template with channels (`analysis` = reasoning, `final` = answer, `tools`), `reasoning_effort` (disabled / low / medium / high) passed as a chat-template argument (`chat_template_kwargs`). Sampling: temperature 0.8, top_p 0.9, top_k 40.
29+ - The weights are in sub-folders of the repository, not at its root.
30+
31+ ## What "making it work" means for razorbill
32+ razorbill runs models through mlx-swift-lm (Swift), not Python, so the fork cannot be used as is. It would be a port:
33+ 1. the `olala` model in Swift on MLX (Mamba-3 mixer and its float32 state cache, the `V` layers, the MoE routing), registered as a new model type in mlx-swift-lm's factory from razorbill's side;
34+ 2. the custom Metal kernels through `MLXFast.metalKernel`, or plain MLX ops first (slower, correct);
35+ 3. loading a sub-folder of a repository (`org/name/q5e6` or a `subfolder:` key in the config);
36+ 4. the channel format in the reasoning/tool parsing (close to gpt-oss's, which razorbill partly handles) and `reasoning_effort` through `chat_template_kwargs`;
37+ 5. the prompt cache (#47/#48): a hybrid cache cannot be trimmed, so every turn starts fresh unless snapshots are added.
38+
39+ First impression (not verified): feasible, the size depends on the fork's code — the Mamba-3 recurrence and the MoE kernel are the hard parts.
40+
41+ ## Output of the spike
42+ - Read the fork's `olala` implementation: size, active config paths, custom kernels, dependencies on fork-only mlx-lm changes.
43+ - A go / no-go with an estimate, then the implementation tickets.
44+ - Acceptance for the implementation: same greedy tokens / logits (tolerance) as the fork on a few prompts, on the Mac.
45+tasks:
46+ - id: 1
47+ title: "Read the fork's olala model code and kernels; list what a Swift port needs"
48+ state: open
49+ priority: medium
50+ author:
51+ name: k33g
52+ email: ph.charriere@gmail.com
53+ createdAt: 2026-11-27T05:00:00.000Z
54+ - id: 2
55+ title: "Run the fork's reference on the Mac (q5e6), record reference outputs and speed"
56+ state: open
57+ priority: medium
58+ author:
59+ name: k33g
60+ email: ph.charriere@gmail.com
61+ createdAt: 2026-11-27T05:00:00.000Z
62+ - id: 3
63+ title: "Go / no-go and implementation tickets"
64+ state: open
65+ priority: medium
66+ author:
67+ name: k33g
68+ email: ph.charriere@gmail.com
69+ createdAt: 2026-11-27T05:00:00.000Z
70+comments: []
new file mode 100644
@@ -0,0 +1,70 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 61
3+title: "Spike: run Olala-v1.0-mini-7A1B-MLX (`olala` architecture, needs OVHai's mlx-engine fork)"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-27T05:00:00.000Z
9+updatedAt: 2026-11-27T05:00:00.000Z
10+labels:
11+ - "spike"
12+ - "area::engine"
13+ - "area::models"
14+ - "mac-only"
15+ - "priority::medium"
16+epic: "Inference engine"
17+related:
18+ - 47
19+ - 25
20+body: |
21+ Asked by the user (2026-11-27): https://huggingface.co/OVHaiLLM/Olala-v1.0-mini-7A1B-MLX "needs a forked mlx-engine — do you think you could make it work?"
22+
23+ ## What the model card and config say (read 2026-11-27)
24+ - `model_type: olala`, `OlalaForCausalLM`. Upstream mlx-lm, mlx-vlm and LM Studio cannot load it; the card points to https://github.com/OVHai-LLM/mlx-engine (a fork of lmstudio-ai/mlx-engine, Python 3.11), whose `mlx_engine.models.olala.register()` adds the architecture to mlx-lm.
25+ - Hybrid: 36 layers, `layers_config` `MMMMVMMMMV…` (Mamba-3 mixers `M` with one attention-type layer `V` every 5th), MoE with 256 routed experts / 6 active + a shared expert, hidden 1536 (~7 B total, ~1 B active). Many exotic flags in the config (DSA/NSA/KDA/GDN, gated attention, cosnet, n-gram embeddings…), most probably off; which ones are active must be read from the fork's code.
26+ - "The Mamba state is kept in float32"; a custom Metal MoE kernel ("MoE v3"), with an `OLALA_MOE_V3=0` fallback on M1 (thread-group limit 384).
27+ - Folders `bf16`, `q8`, `q5e6`, `q4e8`: mixed quantization (e.g. q4e8 = experts 4-bit group 32, the rest 8-bit). "Quantize with our recipe only: generic recipes produce NaN."
28+ - Chat template with channels (`analysis` = reasoning, `final` = answer, `tools`), `reasoning_effort` (disabled / low / medium / high) passed as a chat-template argument (`chat_template_kwargs`). Sampling: temperature 0.8, top_p 0.9, top_k 40.
29+ - The weights are in sub-folders of the repository, not at its root.
30+
31+ ## What "making it work" means for razorbill
32+ razorbill runs models through mlx-swift-lm (Swift), not Python, so the fork cannot be used as is. It would be a port:
33+ 1. the `olala` model in Swift on MLX (Mamba-3 mixer and its float32 state cache, the `V` layers, the MoE routing), registered as a new model type in mlx-swift-lm's factory from razorbill's side;
34+ 2. the custom Metal kernels through `MLXFast.metalKernel`, or plain MLX ops first (slower, correct);
35+ 3. loading a sub-folder of a repository (`org/name/q5e6` or a `subfolder:` key in the config);
36+ 4. the channel format in the reasoning/tool parsing (close to gpt-oss's, which razorbill partly handles) and `reasoning_effort` through `chat_template_kwargs`;
37+ 5. the prompt cache (#47/#48): a hybrid cache cannot be trimmed, so every turn starts fresh unless snapshots are added.
38+
39+ First impression (not verified): feasible, the size depends on the fork's code — the Mamba-3 recurrence and the MoE kernel are the hard parts.
40+
41+ ## Output of the spike
42+ - Read the fork's `olala` implementation: size, active config paths, custom kernels, dependencies on fork-only mlx-lm changes.
43+ - A go / no-go with an estimate, then the implementation tickets.
44+ - Acceptance for the implementation: same greedy tokens / logits (tolerance) as the fork on a few prompts, on the Mac.
45+tasks:
46+ - id: 1
47+ title: "Read the fork's olala model code and kernels; list what a Swift port needs"
48+ state: open
49+ priority: medium
50+ author:
51+ name: k33g
52+ email: ph.charriere@gmail.com
53+ createdAt: 2026-11-27T05:00:00.000Z
54+ - id: 2
55+ title: "Run the fork's reference on the Mac (q5e6), record reference outputs and speed"
56+ state: open
57+ priority: medium
58+ author:
59+ name: k33g
60+ email: ph.charriere@gmail.com
61+ createdAt: 2026-11-27T05:00:00.000Z
62+ - id: 3
63+ title: "Go / no-go and implementation tickets"
64+ state: open
65+ priority: medium
66+ author:
67+ name: k33g
68+ email: ph.charriere@gmail.com
69+ createdAt: 2026-11-27T05:00:00.000Z
70+comments: []