interplane.Get Omega
Read in your language

MojoLlama

Archived Mojo/MAX quantizer and serving research repository (read-only history)

Brought by drakestapleton

branch main Branches Tags History

MojoLlama / ROADMAP.md

285 lines · 21121 bytes Raw Blame History Rendered
1# MojoLlama Roadmap
2
3> **Vision:** One-stop CPU-first LLM platform β€” quantize, train, evaluate, benchmark, and serve any model on HuggingFace. The Unsloth+LLaMA-Factory alternative built on Modular MAX, with a full Studio experience.
4
5**Current:** v0.5.0 β€” CPU inference engine, 50+ arch detection, 2 custom forward passes, C batched engine, 14-panel Studio dashboard, Docker, 2.26Γ— vs llama.cpp (GPT-OSS).
6
7**Codebase:** ~39K Python, ~12K C, ~5.6K HTML across 60+ Python files, 7 C kernels, 1 comprehensive web UI.
8
9---
10
11## 🎯 Strategic Pillars
12
13```
14β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
15β”‚ MojoLlama Platform β”‚
16β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€
17β”‚ INFERENCE β”‚ STUDIO β”‚ ENGINE β”‚ GPU β”‚ DEPLOY β”‚
18β”‚ Engine β”‚ One-stop β”‚ Full HF β”‚ MAX + β”‚ Docker β”‚
19β”‚ + Serving β”‚ ML App β”‚ Coverage β”‚ Tuning β”‚ + App β”‚
20β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
21β”‚ C engine β”‚ Quantization β”‚ 60+ arch β”‚ CUDA/ROCm β”‚ pip β”‚
22β”‚ Batch inf β”‚ Training β”‚ forward β”‚ Metal backend β”‚ Desktopβ”‚
23β”‚ PagedAttn β”‚ Dataset β”‚ passes β”‚ GPU tuning β”‚ CLI β”‚
24β”‚ Concurrent β”‚ Benchmark β”‚ Auto-tune β”‚ Multi-GPU β”‚ CI/CD β”‚
25β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜
26```
27
28---
29
30## Phase 0: Foundation (current β€” shipped)
31
32| Area | What exists | Lines |
33|------|------------|-------|
34| **C engine** | `cengine_batch_instr.c` β€” AVX2+OMP quant matmul, batch_forward, SSM decode, PagedAttention | ~1000 |
35| **Python engine** | `turbo_engine_v7_moe.py` β€” zero-allocation MoE, C-accelerated quant matmul | 1177 |
36| **Custom forward passes** | `forward/gemma4.py` (445), `forward/zaya.py` (187) | 632 |
37| **Studio web UI** | 14 panels: Chat, Train, Dataset, Export, Benchmark, Auto-Tune, Evaluate, Quantize, Merge, Checkpoints, Templates, HF Hub, Experiments, Model Cards | 4121 |
38| **Studio CLI** | `studio.py` β€” 25+ commands: train, export, merge, dataset, chat, serve, benchmark, evaluate, quantize, imatrix, dynamic_quant, hub, checkpoint | 1929 |
39| **Training** | `trainer.py` β€” 9 methods (LoRA, QLoRA, DoRA, GaLore, DPO, ORPO, KTO, SimPO, GRPO), all subprocess wrappers | 1505 |
40| **Dataset** | `dataset.py` β€” 5 format readers, streaming, auto-labeling, splits, stats | 1221 |
41| **Quantizer** | `quantizer.py` — 35 quant types, HF→GGUF converter, benchmark, validate | 1389 |
42| **Server** | `server.py` β€” OpenAI-compatible, SSE streaming, tool calling, 12 API endpoints | 965 |
43| **Auto-tune** | `autotune.py` β€” 7-phase hardware sweep (threads, batch, flash attn, parallel, mlock, engine, concurrency) | 867 |
44| **Backends** | `backends.py` β€” Auto-backend selector (llama.cpp > MAX(stub) > numpy) | 631 |
45| **Arch detection** | `model/architectures.py` β€” 60+ archs mapped to 9 forward types | 918 |
46| **Docker** | Dockerfile, docker-compose.yml (6 profiles), entrypoint with auto-tune + HF download | β€” |
47| **Web site** | `www/` β€” index.html, studio.html, docs/, studio.html | 5624 |
48
49---
50
51## Phase 1: Engine β€” Full HF Model Coverage (ongoing β€” 4 weeks)
52
53The biggest gap: only 2 of 60+ detected architectures have custom forward passes. Everything else uses generic fallback paths that may produce incorrect output.
54
55| # | Task | Est. | Impact |
56|---|------|------|--------|
57| 1.1 | **Profile generic fallback vs custom** β€” measure correctness (perplexity diff) on 10 archs using generic path | 3d | Foundation |
58| 1.2 | **Falcon forward pass** β€” parallel attention+FFN, fused QKV, inherent norm fusion | 4d | Unlocks Falcon-7B/40B/180B |
59| 1.3 | **Phi-3/4 forward pass** β€” fused QKV, long RoPE (128K), dense MoE variants (Phi-3 MoE) | 4d | Unlocks Phi-3/4 family |
60| 1.4 | **DeepSeek V2/V3 forward pass** β€” Multi-head Latent Attention, DeepSeekMoE, KV compression | 7d | Unlocks DeepSeek family |
61| 1.5 | **Qwen2-VL forward pass** β€” vision encoder + language decoder interop | 5d | Unlocks vision models |
62| 1.6 | **Command-R / Cohere2 forward pass** β€” Tanh-gated RoPE, logit softcapping | 3d | Unlocks Cohere family |
63| 1.7 | **BTLM / GLM forward pass** β€” bidirectional + autoregressive hybrid | 4d | Unlocks GLM family |
64| 1.8 | **StableLM / OLMo forward pass** β€” grouped-query attention variants, ALiBi | 3d | Unlocks OLMo family |
65| 1.9 | **Automated forward pass generator** β€” template-based from GGUF metadata (infer n_head, n_kv_head, n_ff, act_fn, norm_type) | 5d | Rapid-fire remaining 40 archs |
66| 1.10 | **Regression benchmark** β€” compare output tokens vs llama.cpp reference per arch | 3d | Quality gate |
67
68**Success metric:** All 60+ architectures produce correct output (perplexity within 1% of llama.cpp reference).
69
70---
71
72## Phase 2: Studio β€” One-Stop ML App (4-8 weeks)
73
74The Studio has 14 panels but many delegate to external tools. The vision: everything in one app, no external binaries required.
75
76### 2A. Quantization Pipeline (2 weeks)
77
78| # | Task | Est. | Description |
79|---|------|------|-------------|
80| 2A.1 | **Pure-Python quantizer** β€” full Q4_K, Q5_K, Q6_K, Q8_0 in Python (no llama.cpp binary) | 5d | Remove external dependency |
81| 2A.2 | **MXFP4 quantizer** β€” fast C-based conversion from Q8_0 (replace 600s Python timeout) | 3d | Enable MXFP4 without Python loop |
82| 2A.3 | **Imatrix computation in Python** β€” importance matrix from calibration data | 4d | No llama-imatrix binary needed |
83| 2A.4 | **Dynamic 2-bit quantization** — per-tensor quant assignment (Q6_K→Q2_K) guided by imatrix | 5d | Max compression with min quality loss |
84| 2A.5 | **NF4 quantizer** β€” 4-bit NormalFloat for QLoRA training | 3d | In-house NF4, no external tool |
85| 2A.6 | **Studio quant wizard** β€” pick model β†’ pick quants β†’ pick calibration data β†’ preview size/speed β†’ run | 4d | 7.7 from previous roadmap |
86
87### 2B. Training Pipeline (4 weeks)
88
89| # | Task | Est. | Description |
90|---|------|------|-------------|
91| 2B.1 | **LoRA in Python** β€” actual gradient computation in Python using MojoLlama engine (no subprocess) | 7d | First in-house training |
92| 2B.2 | **QLoRA in Python** β€” NF4 base + LoRA adapters, fused forward/backward | 5d | Train 70B on consumer hardware |
93| 2B.3 | **Training loop UI** β€” live loss charts, step counter, ETA, learning rate schedule | 4d | Studio panel enhancement |
94| 2B.4 | **Dataset import from HF** β€” load datasets from HuggingFace Hub directly | 3d | No local file needed |
95| 2B.5 | **DPO/ORPO training** β€” preference optimization with Python gradient | 5d | Alignment training |
96| 2B.6 | **Checkpoint management UI** β€” save/load/resume, compare checkpoints, export LoRA | 3d | Studio panel enhancement |
97| 2B.7 | **Multi-LoRA serving** β€” load multiple adapters, switch at runtime, merge on-the-fly | 4d | Production LoRA |
98
99### 2C. Benchmarking (2 weeks)
100
101| # | Task | Est. | Description |
102|---|------|------|-------------|
103| 2C.1 | **Capability benchmarks** β€” MMLU, GSM8K, HumanEval, HellaSwag, ARC, BBH in-studio (no external server) | 5d | Measure quality, not just speed |
104| 2C.2 | **Benchmark comparison view** β€” side-by-side tok/s + accuracy across engines/quant | 3d | Studio panel enhancement |
105| 2C.3 | **Perplexity evaluation** β€” cross-entropy loss on held-out text, compare to llama.cpp reference | 2d | Regression detection |
106| 2C.4 | **Benchmark history** β€” track changes over time, plot regression charts | 2d | Track progress |
107| 2C.5 | **Auto-generated benchmark report** β€” export as HTML/Markdown for sharing | 2d | Share results |
108
109### 2D. Dataset Management (1 week)
110
111| # | Task | Est. | Description |
112|---|------|------|-------------|
113| 2D.1 | **HF dataset integration** β€” search, browse, download datasets from HuggingFace Hub | 3d | No local files |
114| 2D.2 | **Dataset preview UI** β€” view samples, filter, search within dataset | 3d | Studio panel enhancement |
115| 2D.3 | **Quality filters** β€” perplexity-based filtering, near-dedup, length filters | 3d | Clean training data |
116| 2D.4 | **Preference pair generator** β€” create DPO/RLHF pairs from completions | 3d | Alignment data |
117
118---
119
120## Phase 3: Inference Engine β€” Performance + GPU (4-8 weeks)
121
122### 3A. CPU Engine Maturation (3 weeks)
123
124| # | Task | Est. | Description |
125|---|------|------|-------------|
126| 3A.1 | **Q8_0 input C quant** β€” quantize activations to Q8_0 before matmul in C engine (2-4Γ— improvement) | 3d | Critical bottleneck fix |
127| 3A.2 | **MXFP4 C kernel** β€” native C MXFP4 matmul (replace Python fallback, 10Γ— speedup expected) | 4d | Unlocks Qwen3.6 C engine |
128| 3A.3 | **Fused Q+K projection** β€” single matmul for Q+K instead of 3 calls | 2d | 2-5% end-to-end |
129| 3A.4 | **True continuous batching** β€” merge multiple users' MoE routing into single batched matmuls | 5d | Linear scaling with users |
130| 3A.5 | **PagedAttention production** β€” page table with KV block reclamation, defrag, swap | 4d | Long-context serving |
131| 3A.6 | **Fix Qwen3.6 MXFP4 cleanup crash** β€” heap corruption on exit | 1d | Stability |
132
133### 3B. GPU via MAX β€” Full GPU Pipeline (6 weeks)
134
135The MAX backend is currently a stub. This phase builds end-to-end GPU support: loading models, dispatching layers, tuning performance, and handling multi-GPU.
136
137#### 3B.1 GPU Integration (2 weeks)
138
139| # | Task | Est. | Description |
140|---|------|------|-------------|
141| 3B.1.1 | **MAX GGUF reader** β€” load GGUF tensors into MAX-compatible buffers, map quantized types to MAX types | 5d | Foundation for all GPU work |
142| 3B.1.2 | **MAX CPU inference** β€” run full LLM forward pass via MAX engine on CPU as baseline | 3d | Validate MAX engine works |
143| 3B.1.3 | **MAX GPU pipeline** β€” model load β†’ transfer to GPU β†’ generate tokens β†’ return logits | 5d | First GPU inference |
144| 3B.1.4 | **Layer-by-layer GPU dispatch** — per-layer offloading decision (attn→GPU, FFN→CPU, or all→GPU) | 4d | Hybrid inference control |
145
146#### 3B.2 GPU Acceleration (2 weeks)
147
148| # | Task | Est. | Description |
149|---|------|------|-------------|
150| 3B.2.1 | **GPU attention** β€” offload Q, K, V projections + softmax attention to GPU | 4d | Biggest speedup per layer |
151| 3B.2.2 | **GPU MoE dispatch** β€” expert routing + top-k selection + expert matmuls on GPU | 5d | MoE models on GPU |
152| 3B.2.3 | **GPU KV cache** β€” KV cache blocks on GPU memory, PagedAttention with GPU page table | 4d | Long-context on GPU |
153| 3B.2.4 | **CUDA graphs** β€” capture repeated forward pass structure as CUDA graph for <10ΞΌs kernel launch | 3d | Minimize GPU overhead |
154| 3B.2.5 | **Flash Attention** β€” use MAX's FlashAttention-2 integration for O(1) memory attention | 3d | 32K+ context on GPU |
155
156#### 3B.3 Multi-GPU (2 weeks)
157
158| # | Task | Est. | Description |
159|---|------|------|-------------|
160| 3B.3.1 | **Tensor parallelism** β€” split weight matrices across GPUs, all-reduce during forward | 5d | Model sharding |
161| 3B.3.2 | **Pipeline parallelism** β€” assign layer groups to different GPUs | 4d | Deeper models on multi-GPU |
162| 3B.3.3 | **GPU memory management** β€” dynamic offloading, swap KV cache between GPU↔CPU, memory budget tracking | 4d | Fit larger models |
163| 3B.3.4 | **Multi-GPU benchmark suite** β€” speedup curves (1/2/4/8 GPUs), memory scaling, batch scaling | 2d | Know your hardware |
164
165#### 3B.4 GPU Formats & Quantization (2 weeks)
166
167| # | Task | Est. | Description |
168|---|------|------|-------------|
169| 3B.4.1 | **GPU-native quant types** β€” FP16, FP8 (E4M3/E5M2), INT8, INT4 on GPU natively (no dequant) | 5d | GPU memory efficiency |
170| 3B.4.2 | **On-the-fly quant conversion** β€” convert GGUF Q4_K/Q8_0 to GPU-native FP8/INT8 at load time | 3d | No re-quantizing needed |
171| 3B.4.3 | **GPU imatrix** β€” importance matrix computed via GPU (10Γ— faster than CPU) | 3d | Fast calibration |
172| 3B.4.4 | **Mixed-precision GPU inference** β€” FP16 attn + INT8 FFN + FP32 embeddings automatically | 3d | Max throughput per layer type |
173
174#### 3B.5 GPU Auto-Tune (2 weeks)
175
176| # | Task | Est. | Description |
177|---|------|------|-------------|
178| 3B.5.1 | **GPU layer sweep** β€” sweep n_gpu_layers 0β†’all, measure tok/s, find knee | 3d | Optimal GPU/CPU split |
179| 3B.5.2 | **GPU batch size sweep** β€” test batch sizes 1β†’64 with GPU, find throughput plateau | 2d | Max concurrency |
180| 3B.5.3 | **GPU memory tuning** β€” measure peak memory per model/size/quant, auto-pick batch to fit | 3d | No OOM crashes |
181| 3B.5.4 | **GPU concurrent tuning** β€” sweep concurrent users 1β†’N, find latency knee (p50/p95/p99) | 3d | Production config |
182| 3B.5.5 | **Multi-GPU tuning** β€” sweep GPU count (1/2/4/8), parallelism strategy, interconnect type | 4d | Multi-GPU optimization |
183| 3B.5.6 | **Metal/ROCm tuning** β€” Apple Silicon GPU and AMD GPU specific parameter sweeps | 3d | Cross-platform GPU |
184
185#### 3B.6 GPU Support Matrix
186
187| Backend | Hardware | Status | Target tok/s (7B Q4_K_M) |
188|---------|----------|--------|--------------------------|
189| **MAX CUDA** | NVIDIA Tesla/RTX/A100/H100/B300 | ⬜ Not started | 100+ (A100) |
190| **MAX ROCm** | AMD MI250/MI300X/RX 7000 | ⬜ Not started | 80+ (MI250) |
191| **MAX Metal** | Apple M1/M2/M3/M4 (Pro/Max/Ultra) | ⬜ Not started | 40+ (M2 Ultra) |
192| **MAX CPU** | Any x86_64/ARM with AVX2/SVE | ⬜ Not started | 20+ (Threadripper) |
193| **MojoLlama CPU** | x86_64 AVX2+OMP | βœ… Working | 13-63 (Threadripper) |
194
195#### 3B.7 GPU Production (1 week)
196
197| # | Task | Est. | Description |
198|---|------|------|-------------|
199| 3B.7.1 | **GPU server** β€” serve models from GPU via /v1/chat/completions, SSE streaming | 3d | Production GPU serving |
200| 3B.7.2 | **GPU health monitoring** β€” GPU utilization, memory, temperature, power in Studio metrics | 2d | Ops visibility |
201| 3B.7.3 | **Automatic fallback** β€” GPU OOM β†’ auto-offload to CPU β†’ continue with degraded throughput | 2d | Reliability |
202| 3B.7.4 | **GPU model hot-swap** β€” unload model from GPU, load new model, without restart | 2d | Multi-model serving |
203
204### 3C. Auto-Tune Improvement (2 weeks)
205
206| # | Task | Est. | Description |
207|---|------|------|-------------|
208| 3C.1 | **Self-contained auto-tune** β€” no external llama-bench binary required | 4d | Pure MojoLlama sweeps |
209| 3C.2 | **Per-model auto-tune cache** β€” store per-model-hash configs, share with community | 2d | Instant optimal config |
210| 3C.3 | **GPU auto-tune** β€” sweep GPU layers, batch size, concurrency with MAX backend | 3d | GPU optimization |
211| 3C.4 | **Auto-tune recommendation engine** β€” suggest optimal config from hardware fingerprint | 3d | Zero-click tuning |
212| 3C.5 | **Auto-tune Studio UI** β€” guided wizard with progress, charts, one-click apply | 3d | Studio panel |
213
214---
215
216## Phase 4: Platform β€” Ship It (4-6 weeks)
217
218| # | Task | Est. | Description |
219|---|------|------|-------------|
220| 4.1 | **pip package** β€” `pip install mojollama` with pre-built wheels (manylinux x86_64, aarch64) | 5d | Zero-install |
221| 4.2 | **Desktop app** β€” Tauri/Electron wrapper for Studio, bundled Python runtime + model downloader | 7d | Desktop experience |
222| 4.3 | **CI/CD pipeline** β€” GitHub Actions: test every PR, benchmark regression checks, build wheels | 3d | Quality gates |
223| 4.4 | **Comprehensive test suite** β€” unit tests for each module, integration tests for forward passes | 5d | Regression prevention |
224| 4.5 | **API hardening** β€” API keys, rate limiting, model hot-swap, token usage tracking | 4d | Production-ready server |
225| 4.6 | **Model registry** β€” local + HF Hub model browser, one-click download, version management | 4d | Model management |
226| 4.7 | **Release automation** β€” semantic versioning, changelog, automated release notes | 2d | Clean releases |
227
228---
229
230## Timeline
231
232```
233Month 1 Month 2 Month 3 Month 4 Month 5+
234β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί
235β”‚ Phase 1: HF Coverage β”‚ Phase 2: Studio Pipeline β”‚ Phase 4
236β”‚ 1.1-1.5 Custom forward passes β”‚ 2A. Quant Pipeline β”‚ Ship
237β”‚ 1.6-1.10 Broader arch + auto-gen β”‚ 2B. Training β”‚ pip
238β”‚ β”‚ 2C. Benchmarking β”‚ Desktop
239β”‚ Phase 3A: CPU Engine β”‚ 2D. Dataset β”‚ CI/CD
240β”‚ 3A.1-3.3 C kernel improvements β”‚ β”‚
241β”‚ 3A.4-3.6 Batching + stability β”‚ Phase 3B: GPU via MAX (Full Pipeline) β”‚
242β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
243β”‚ Phase 3C: Auto-Tune (CPU) β”‚ 3B.1 GPU Integration β”‚
244β”‚ 3C.1-3.3 Self-contained β”‚ 3B.2 GPU Acceleration β”‚
245β”‚ 3C.4-3.5 Studio wizard β”‚ 3B.3 Multi-GPU β”‚
246β”‚ β”‚ 3B.4 GPU Formats & Quant β”‚
247β”‚ β”‚ 3B.5 GPU Auto-Tune β”‚
248β”‚ β”‚ 3B.6 Support Matrix β”‚
249β”‚ β”‚ 3B.7 GPU Production β”‚
250└──────────────────────┴──────────────────────┴──────────────────────┴──────────────────────┴──────────────►
251```
252
253## Architecture Coverage Roadmap
254
255```
256Current (2 custom passes): Target (60+ passes):
257β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
258β”‚ βœ… Gemma 4 β”‚ β”‚ βœ… Llama 2/3/4 β”‚
259β”‚ βœ… ZAYA1 β”‚ β”‚ βœ… Mistral β”‚
260β”‚ ⬜ Falcon β”‚ β”‚ βœ… Qwen2/3 β”‚
261β”‚ ⬜ Phi-3/4 β”‚ β”‚ βœ… Gemma 2/3/4 β”‚
262β”‚ ⬜ DeepSeek V2/V3 β”‚ β”‚ βœ… GPT-OSS β”‚
263β”‚ ⬜ 50+ more... β”‚ β”‚ βœ… ZAYA1 β”‚
264β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ βœ… Falcon β”‚
265 β”‚ βœ… Phi-3/4 β”‚
266Auto-generated template β”‚ βœ… DeepSeek V2/V3 β”‚
267for remaining archs: β”‚ βœ… Command-R / Cohere β”‚
268 GGUF metadata β†’ forward β”‚ βœ… DBRX / Mixtral β”‚
269 pass skeleton β†’ manual β”‚ βœ… 50+ more (generated) β”‚
270 tuning β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
271```
272
273## Risk Factors
274
275| Risk | Impact | Mitigation |
276|------|--------|------------|
277| MAX engine GGUF compatibility gaps | Phase 3B.1 blocked | Maintain llama.cpp fallback; upstream patches to MAX |
278| GPU memory insufficient for model size | Phase 3B.4/3B.7 fails | Layer-by-layer CPU offload; quantize to FP8/INT4 for GPU |
279| Custom forward passes diverge from upstream | Perplexity regressions | Automated perplexity CI per arch |
280| Training on CPU is slow | Phase 2B perceived as useless | Focus on QLoRA (small adapters); leverage MAX GPU |
281| Multi-GPU scaling sublinear (<1.5Γ— per GPU) | Phase 3B.3 underwhelming | Optimize all-reduce; use tensor parallelism with async comms |
282| CUDA graphs fragile to model changes | Phase 3B.2.4 breaks | Regenerate graphs on model load; fallback to eager mode |
283| Apple Metal GPU limited memory (unified) | Phase 3B.6 Apple perf low | Optimize for unified memory; use small models (7B max) |
284| Dataset format fragmentation | Phase 2D scope creep | Support top 5 HF formats only |
285| MXFP4 in C engine complex | Phase 3A.2 delayed | Ship Q8_0 input quant first (biggest win) |