Repository navigation
model: Inkling-2-Mini - looped arch - #32695
danielhanchen wants to merge 2 commits into
Conversation
A looped model runs the layers [loop.core_start, loop.core_end) num_loops times. The GGUF has one block per layer visit, so every visit keeps its own KV cache and recurrent state, while the weights stay per physical layer. The loader validates the layout, the generic scale pass runs over the physical layers, every visit then shares its layer's weights, and the graph node budget scales with the pass count. Inkling 2 uses it for its looped variant (Inkling2LoopForConditionalGeneration): later passes restart from the prelude state and mix in the previous pass through low-rank message controllers.
Register Inkling2LoopForConditionalGeneration with its own calls instead of editing the shared register lines, so the change stays additive next to other edits around the Inkling 2 converters.
|
Same failure on Inkling-2-Mini-UD-Q8_K_XL.gguf (sha256 dfb04bf3…527e9a41, 22,867,451,616 bytes), verified against the HF ETag. |
|
Mainline has merged Inkling-2-mini, but using our quants will get 130 perplexity (7.6 is the correct one) - folks will need #32704 if using https://huggingface.co/unsloth/Inkling-2-Mini-GGUF/tree/main/Mainline_Support |
|
Will you add the vulkan support? it improves a lot the performance danielhanchen#10 |
|
Built this for SYCL and ran into this: |
…architecture (ggml-org PR ggml-org#32695)
|
@danielhanchen you have conflicts, looks like with this implementation: 29b52d3 |
|
No idea if this is useful to anyone, but I took the NVFP4 conversion code from this PR and broke it out into its own PR: #32786 |
Brings in the merged Inkling 2 implementation: PR ggml-org#32217 (text + vision, mmproj converter), PR ggml-org#32694 (inkling2_loop arch), PR ggml-org#32704 (loop scale fix). The draft PR ggml-org#32695 code merged in 862fdcb is superseded by upstream's merged implementation on every Inkling file. Mark's patches preserved: imagine-v9 tokenizer fix (conversion/base.py, content-merged with upstream), Muse Glimmer chat template (common/chat.cpp, common/parsers/muse-glimmer.cpp).
…s in files, for comparing with llama.cpp --dump-layers prints a checksum of every stage. --dump-tensors DIR does the same and also writes the values: DIR/p<position>_<name>-<visit>.bin for each stage of each token (<name> as llama.cpp's graph names it: Qcur, Kcur, Vcur, Rcur, kqv_out, ffn_inp, l_out, result_norm without a visit, plus our own l_in, ffn_in and ffn_moe_out) and DIR/p<position>_logits.bin for the logits of the last token of a call. The format is the one llama.cpp's cb_eval dumper writes: int64 ne[4], then float32 values. Dump mode runs one token at a time with the card path off, so it does not cover the card-routed prefill. Tested on the Arc Pro B70 against a CPU llama.cpp (PR ggml-org/llama.cpp#32695 plus a local patch for the per-expert gate_up scales) on a real 19-token prompt and 4 decode steps, one run: the same greedy tokens at all 5 steps, logit KL 0.00004 to 0.0004, mean cosine 0.9986 to 0.9996 per tensor over the 48 visits, final norm cosine at least 0.9985. The comparison script and the reference harness are not in this repository. llama.cpp counts the visits in execution order, this dump by cache slot (slot_of()); the comparison script maps one to the other. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FA86cq7ktJuaewMKKonxr7
Overview
Adds support for https://huggingface.co/thinkingmachines/Inkling-2-Mini - uses a looped architecture and this PR adds looped support
Requirements