ManniX-ITA commited on
Commit
756ec9e
·
verified ·
1 Parent(s): 24b668f

docs: model families (read first) + artifact variants §1.1

Browse files
Files changed (1) hide show
  1. USAGE.md +88 -3
USAGE.md CHANGED
@@ -14,6 +14,55 @@ inference server. Deep-dive design docs live in
14
 
15
  ---
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ## 1. Relationship to upstream llamafile
18
 
19
  opencoti-llamafile is **upstream llamafile 0.10.3 plus an additive
@@ -31,9 +80,10 @@ patch series** (`patches/` in the HF repo,
31
  decode is verified-lossless (the output *is* the target model's).
32
  3. **Single file, zero dependencies.** The artifact is a Cosmopolitan
33
  APE: one file runs on Linux/macOS/Windows/BSD, x86_64 and aarch64.
34
- The CUDA backend (`ggml-cuda.so`) is embedded and self-extracts to
35
- `~/.llamafile/v/<ver>/` on first GPU run. TCQ codebooks and
36
- quantization tables are compiled in. No installer, no downloads.
 
37
 
38
  What upstream gives you is unchanged: the server API
39
  (`/completion`, `/v1/chat/completions`, `/props`, `/slots`, …), GGUF
@@ -52,6 +102,41 @@ sh ./opencoti-llamafile-0.10.3-c3-x86_64.llamafile --server --port 8080 \
52
  > **Note (Linux):** launch via `sh ./file.llamafile` if your kernel
53
  > lacks binfmt_misc APE registration.
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ---
56
 
57
  ## 2. Feature map — what exists and how it's gated
 
14
 
15
  ---
16
 
17
+ ## Supported / target model families — read this first
18
+
19
+ opencoti-llamafile loads **any GGUF that upstream llama.cpp
20
+ loads** — that part is inherited unchanged. But the opencoti feature
21
+ set (KV tiers, rolling-KV, DCA, MTP, sparse attention, RYS) is
22
+ developed, tuned, and correctness-gated on **two model families**, in
23
+ a deliberate primary/secondary split:
24
+
25
+ ### Gemma-4 — PRIMARY target
26
+
27
+ | Model | Kind | Notes |
28
+ |---|---|---|
29
+ | Gemma-4 26B-A4B-128e ("A4B") | MoE | the flagship serving target; MTP-validated with its native gemma4-assistant drafter |
30
+ | Gemma-4 12B / 31B | dense | full feature validation incl. RYS + DCA |
31
+ | Gemma-4 E2B / E4B | elastic (E-series) | shared-KV elastic layers supported; MTP drafters available |
32
+
33
+ Gemma-4 is what the engine is *for*: its unusual head dims (256 and
34
+ 512), the iSWA sliding/global dual KV cache, and the per-size
35
+ [gemma4-assistant MTP drafters](https://huggingface.co/ManniX-ITA)
36
+ all have dedicated kernels and graph paths here that upstream lacks
37
+ or handles slowly. `--spec-type draft-assistant`, D256/D512 FA-VEC +
38
+ scalar-MMA decode, iSWA-aware rolling-KV/SharedKVPool/DCA wiring are
39
+ all Gemma-4-first features.
40
+
41
+ ### Qwen — SECONDARY target / verification family
42
+
43
+ | Model | Kind | Notes |
44
+ |---|---|---|
45
+ | Qwen3.5 / Qwen3.6 (e.g. 35B-A3B) | dense / MoE / hybrid (gated-delta-net) | NextN self-spec MTP (`--spec-type draft-mtp`, no external drafter needed) |
46
+ | Qwen2.5-14B-1M | dense, native-1M | the long-context/DCA validation vehicle |
47
+
48
+ Qwen is the standard-architecture (head_dim 128) counterweight:
49
+ every feature that ships is verified on it too, and it carries one
50
+ feature Gemma doesn't — **NextN self-speculation** (the model's own
51
+ MTP head drafts; fused multi-step, at/above upstream parity).
52
+
53
+ ### Everything else
54
+
55
+ Other architectures run with upstream behavior and safe fallbacks,
56
+ but opencoti features are **unvalidated** there, and some are
57
+ arch-gated: MTP needs NextN tensors (Qwen-style) or a
58
+ gemma4-assistant drafter; RYS `--repeat-layers` supports the
59
+ qwen2/qwen3(+MoE)/qwen3.5/qwen3next/gemma-4 forward loops; DCA is
60
+ validated on Gemma-4 and Qwen2.5-1M. Quality gates (KLD,
61
+ RULER-niah) were run on the two families above — re-gate before
62
+ trusting aggressive KV tiers on anything else.
63
+
64
+ ---
65
+
66
  ## 1. Relationship to upstream llamafile
67
 
68
  opencoti-llamafile is **upstream llamafile 0.10.3 plus an additive
 
80
  decode is verified-lossless (the output *is* the target model's).
81
  3. **Single file, zero dependencies.** The artifact is a Cosmopolitan
82
  APE: one file runs on Linux/macOS/Windows/BSD, x86_64 and aarch64.
83
+ In the full x86_64 artifact the CUDA backend (`ggml-cuda.so`) is
84
+ embedded and self-extracts to `~/.llamafile/v/<ver>/` on first GPU
85
+ run; the `-win` variant ships without it (see §1.1). TCQ codebooks
86
+ and quantization tables are compiled in. No installer, no downloads.
87
 
88
  What upstream gives you is unchanged: the server API
89
  (`/completion`, `/v1/chat/completions`, `/props`, `/slots`, …), GGUF
 
102
  > **Note (Linux):** launch via `sh ./file.llamafile` if your kernel
103
  > lacks binfmt_misc APE registration.
104
 
105
+ ### 1.1 Artifact variants — which file to download
106
+
107
+ | Artifact | Size | Runs on | GPU story |
108
+ |---|---:|---|---|
109
+ | `…-x86_64.llamafile` | ~4.8 GB | Linux/macOS/BSD, x86_64 + aarch64 | CUDA DSO **embedded** (x86_64-linux, sm_75/80/86/89/90/120f); self-extracts on first `-ngl` run |
110
+ | `…-win-x86_64.llamafile.exe` | ~55 MB | **Windows** + Linux/macOS/BSD, x86_64 + aarch64 | none embedded — CPU works everywhere out of the box; GPU via side-load (below) |
111
+ | `…-aarch64.llamafile` *(planned)* | — | same platforms | CUDA sbsa DSO embedded (sm_110f Jetson Thor, sm_121a DGX Spark GB10) |
112
+
113
+ The host binary inside every variant is byte-for-byte the same APE
114
+ (same patches, same features); they differ only in the embedded GPU
115
+ backend. The `-win` variant exists because **Windows refuses to run
116
+ executables larger than 4 GB**, so the full artifact — 4.8 GB with
117
+ the CUDA DSO inside — cannot ship for Windows; the bare APE renamed
118
+ to `.exe` (Windows needs the extension) can.
119
+
120
+ **GPU with the `-win`/bare variant:**
121
+
122
+ - **Windows:** install the NVIDIA CUDA Toolkit + MSVC and run with
123
+ `-ngl 99`; llamafile compiles a native `ggml-cuda.dll` on the fly
124
+ into `%USERPROFILE%\.llamafile\` on first use (upstream llamafile
125
+ mechanism, unchanged).
126
+ - **Linux x86_64:** download the published standalone DSO
127
+ (`dso/<ver>-<tag>/ggml-cuda-x86_64.so` in the HF repo — same bytes
128
+ as the one embedded in the full artifact, sha in
129
+ `releases/<tag>/SHA256SUMS`) and place it where the engine looks
130
+ before attempting extraction:
131
+
132
+ ```bash
133
+ mkdir -p ~/.llamafile/v/0.10.3/
134
+ cp ggml-cuda-x86_64.so ~/.llamafile/v/0.10.3/ggml-cuda.so
135
+ ```
136
+
137
+ - **No CUDA available:** nothing to do — it falls back to CPU
138
+ inference automatically.
139
+
140
  ---
141
 
142
  ## 2. Feature map — what exists and how it's gated