You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aecebbc
Browse filesBrowse the repository at this point in the historyBrowse files
## Summary
- add pinned llama.cpp `dflash` and `eagle3` GGUF import as
target-coupled speculative draft auxiliaries, never standalone CausalLMs
- validate target dimensions, selected hidden-state layers, exact
ordered vocabulary and special IDs, suffix-exact tensor closure, Q/K
conversion, quantization sidecars, and I64 draft-to-target remaps before
graph construction
- emit `draft_manifest.json` with the target config hash, ordered-token
vocabulary hash, draft/target shapes, output ownership, cache ownership,
and compact-logit remap contract
- keep runtime support deferred pending an independently verified real
target+draft parity loop
## Explicit pairing contract
```bash
mobius build-gguf draft.gguf \
--target-config /path/to/exact-target/ \
--output output/draft/
```
`--target-config` accepts the exact target directory or `config.json`;
the adjacent `tokenizer.json` is mandatory. The Python API also accepts
an explicit mapping with `tokenizer_tokens`. File inputs record SHA-256
over the exact config bytes; mapping inputs record SHA-256 over
canonical sorted JSON. The manifest separately records SHA-256 over the
ordered token strings. These hashes identify the validated
config/token-ID contract, not target weights; the caller must attest and
pair the exact target weight revision.
Draft builds reject `task="text-generation"`, static-cache export, and
`write_gguf_runtime_package`. They only save an auxiliary ONNX graph
plus `draft_manifest.json`. Missing target heads/embeddings are exposed
as explicit target-owned graph inputs/outputs rather than duplicated or
synthesized.
## Real-artifact evidence
- DFlash:
`lym00/Qwen3-4B-DFlash-GGUF-Test@9d2ec464a15346d8a7d7a696c06694eb1bf690b5`,
`Qwen3-4B-DFlash-q8_0.gguf`, 577,047,072 bytes, LFS SHA-256
`5ecf02bb269fc42277f43961794387fea11ecc367ea2d99e86b2b71cc249aff6`,
paired target `Qwen/Qwen3-4B@1cfa9a7208912126459214e8b04321603b3df60c`.
Its 58-tensor header uses post-pin `hidden_norm.weight`, so pinned
suffix closure rejects it.
- EAGLE-3:
`williamliao/Qwen3-8B-EAGLE3-Speculator-GGUF@44480ff4ea6330788818f7f5fc9a69b326dc4c06`,
`Qwen3-8B-speculator.eagle3-F16.gguf`, 2,049,930,400 bytes, LFS SHA-256
`d6cf1f3cf29e9cd72c02fb11f989f5192f2b24e142741fdc2de8cd590140f2f2`,
paired target `Qwen/Qwen3-8B@b968826d9c46dd6066d109eabc6255188de91218`.
Its 15-tensor header contains a draft-owned embedding, which the
external-embedding graph rejects rather than dropping.
Neither artifact was executed. No suitably small real pair satisfies
this pinned contract, so runtime remains **DEFERRED** until independent
target/draft full-logit and multi-step proposed-token parity exists.
## Validation
- focused draft/registry/mapping/runtime/model tests: 532 passed
- broad non-integration suite excluding the known unrelated
`glm_moe_dsa` shape-inference regression: 5903 passed, 52 skipped
- unfiltered broad run: 5922 passed, 52 skipped, with only the two
existing `glm_moe_dsa` missing-output-shape/checker failures
- `lintrunner f --output oneline --all-files`
- bug-focused review covered target assumptions, layer indexing,
tokenizer/remap semantics, cache and hidden-state contracts, dropped
tensors, standalone dispatch, Q/K permutation, and quantization misuse
---------
Signed-off-by: Justin Chu <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 332e47ee-0b3a-4f7d-8c81-cb7be2123f98
|`reuse_gguf_weights`|`bool`|`False`| Reuse byte-compatible F32/F16 and native IQ/MXFP4 tensor ranges from the original GGUF instead of copying them into ONNX external data. |
43
+
|`target_config`|`str \| Path \| Mapping[str, object] \| None`|`None`| Exact target directory/config plus `tokenizer.json`, or an explicit config mapping with the complete `tokenizer_json` object. Required only for `dflash` and `eagle3`. |
42
44
43
45
## Returns
44
46
@@ -109,6 +111,11 @@ weight buffer and consume startup or execution time. The package avoids a second
109
111
on-disk copy; peak runtime memory and performance remain transform- and
110
112
execution-provider-dependent.
111
113
114
+
```bash
115
+
# Draft GGUFs require the exact target config and tokenizer directory
0 commit comments