Repository navigation
Promote first GGUF text architecture cohort - #677
Merged
Merged
Conversation
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR promotes the first cohort of GGUF text(-adjacent) architectures from “immediately implementable” to implemented, by adding architecture-owned config/tensor/graph contracts and wiring them through the GGUF build pipeline and registries (while keeping runtime packaging explicitly deferred pending real-weight parity).
Changes:
- Add exact graph/model implementations and task wiring for PLaMo, Maincoder, and SmallThinker GGUF routes; extend Granite handling and add JinaBERT-v3 GGUF encoder support.
- Enforce fail-closed GGUF metadata/tensor/qtype closure validation for the new routes and add synthetic/contract tests.
- Update GGUF census pins and docs to reflect the promoted routes and their supported/deferred/rejected capability dispositions.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gguf_plamo_parity_test.py | Adds synthetic prefill + cached-decode parity test for the exact PLaMo GGUF graph. |
| tests/_test_configs.py | Extends tiny test config matrix to cover promoted GGUF routes (maincoder/smallthinker/jina-v3/plamo). |
| src/mobius/tasks/_plamo.py | Introduces a dedicated PLaMo causal-LM task selecting dynamic cache behavior. |
| src/mobius/tasks/_causal_lm.py | Adds a dedicated SmallThinker GGUF causal-LM task with dynamic concat-grow KV ABI. |
| src/mobius/tasks/init.py | Exposes new tasks and adds task-name dispatch entries for SmallThinker GGUF and PLaMo. |
| src/mobius/models/smallthinker.py | Implements the exact SmallThinker GGUF decoder (router/experts/schedule) as a CausalLMModel. |
| src/mobius/models/maincoder.py | Implements Maincoder’s post-RoPE Q/K norm attention ordering and tied-head causal LM. |
| src/mobius/models/granite.py | Adjusts Granite text model construction (quantized linear selection; optional RoPE path). |
| src/mobius/models/gguf_plamo.py | Adds exact PLaMo decoder model with cyclic KV expansion, RoPE, and caching behavior. |
| src/mobius/models/gguf_encoders.py | Extends specialized GGUF encoders with JinaBERT-v3 support (post-norm + seq GELU). |
| src/mobius/models/init.py | Exports newly added model classes (PLaMo/Maincoder/SmallThinker/JinaBERT-v3). |
| src/mobius/integrations/gguf/_upstream_data/llamacpp_pin.json | Pins/records exact llama.cpp tensor inventory for JinaBERT-v3. |
| src/mobius/integrations/gguf/_tensor_processors.py | Adds PLaMo-specific inverse shuffles for Q and output projections after conversion. |
| src/mobius/integrations/gguf/_tensor_mapping.py | Adds mapping tables for PLaMo, SmallThinker, and JinaBERT-v3 GGUF tensor→HF names. |
| src/mobius/integrations/gguf/_specialized_encoders_test.py | Adds JinaBERT-v3 contract, closure, and synthetic execution tests. |
| src/mobius/integrations/gguf/_smallthinker_test.py | Adds SmallThinker tensor-contract, config restoration, and module-level functional tests. |
| src/mobius/integrations/gguf/_route_census_test.py | Updates expected route-census category counts after promotions. |
| src/mobius/integrations/gguf/_plamo_test.py | Adds PLaMo contract/config/mapping/value-transform validation tests. |
| src/mobius/integrations/gguf/_maincoder_test.py | Adds Maincoder pinned-profile tests, closure validation, and synthetic ORT execution checks. |
| src/mobius/integrations/gguf/_granite_test.py | Adds Granite exactness tests for dense/MoE unions, scaling, and LongRoPE factor handling. |
| src/mobius/integrations/gguf/_conventional_decoder_test.py | Removes “conventional decoder mismatch” expectations for newly-promoted routes. |
| src/mobius/integrations/gguf/_config_mapping.py | Adds/extends GGUF config postprocessors for SmallThinker, Granite, PLaMo, Maincoder, and JinaBERT-v3. |
| src/mobius/integrations/gguf/_config_mapping_test.py | Adds regression test ensuring non-integer gating metadata fails closed for LFM2MoE. |
| src/mobius/integrations/gguf/_builder.py | Wires new fail-closed tensor-contract validators and task restrictions into GGUF build. |
| src/mobius/integrations/gguf/_builder_test.py | Updates builder test expectations to reflect promotion of SmallThinker route. |
| src/mobius/integrations/gguf/_arch_registry.py | Promotes new GGUF architecture specs (plamo/maincoder/granite/jina-v3/smallthinker) with dispositions. |
| src/mobius/integrations/gguf/_arch_registry_test.py | Updates supported-architecture counts and promoted conventional decoder set. |
| src/mobius/_registry.py | Registers new model_types (maincoder/gguf_plamo/smallthinker_gguf/jina_bert_v3_gguf) for build dispatch. |
| src/mobius/_configs/_base.py | Adds encoder_fused_qkv config field for JinaBERT-v3 fused-vs-split attention selection. |
| docs/api/build_from_gguf.md | Updates published GGUF support census counts and route classifications. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🏗️ Architecture Diff
No architecture changes detected. ✅ Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed) |
justinchuby
force-pushed
the
justinchuby-promote-gguf-text-cohort
branch
from
August 27, 2026 18:23
d6a3380 to
2a081ad
Compare
justinchuby
added a commit
that referenced
this pull request
Aug 27, 2026
Preserve both the sharded-import errno dependency from #675 and the cohort fingerprint dataclass dependency after rebasing PR #677. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
justinchuby
force-pushed
the
justinchuby-promote-gguf-text-cohort
branch
from
August 27, 2026 18:25
2a081ad to
e3ac351
Compare
Implement a dedicated Maincoder decoder that applies adjacent-pair RoPE before learned per-head Q/K RMSNorm and preserves tied-output, sequential SwiGLU, and KV-cache semantics. Promote only explicit float GGUF import with strict metadata, tensor-shape, qtype, and suffix closure validation. Keep packed quantization rejected and runtime support deferred pending independent evidence. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Implement the pinned dense JinaBERT-v3 tensor, config, RoPE attention, post-norm residual, sequential GELU, pooling, and singleton token-type contracts. Fail closed on the unreachable MoE schedule, packed quantization, classifier heads, malformed tensor unions, and runtime packaging claims. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Implement the source-level shared-pre-norm parallel decoder, cyclic expanded-KV cache contract, fixed converter metadata and tensor closure, and inverse Q/output projection shuffles. Reject packed shuffle preservation, static cache, external weight reuse, and unsupported variants before export while keeping runtime support deferred. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Promote the canonical granite architecture with strict dense-or-MoE tensor closure, fused and split QKV processing, Granite scaling, optional biases, shared experts, tied output, and tensor-backed LongRoPE. Reject unsupported deep-stack inputs, single-factor RoPE, malformed layouts, and unsupported scaling variants while leaving real-weight runtime validation explicitly deferred. Add focused graph, config, tensor-value, quantized-path, and negative tests. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Register a representative reduced PLaMo configuration so the promoted GGUF model participates in L1 graph construction and registry completeness checks. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Implement SmallThinker's pre-norm routing, ReGLU experts, metadata-selected gating, and per-layer sliding-attention and RoPE schedules. Add strict tensor and qtype closure, a dedicated dynamic-cache task, and fail-closed quantization/runtime capabilities with focused graph and synthetic execution coverage. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Regenerate the authoritative route census for all five promotions, remove the stale Maincoder blocker, and cover PLaMo in L1 graph construction. Fix Granite no-RoPE graph construction and tighten required RoPE/cache invariants for Maincoder and PLaMo. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Keep architecture-qualified fail-closed errors after sharing the expert-gating validation path with SmallThinker, and cover the non-integer metadata case. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Preserve established runtime-evidence fingerprints while retaining Jina fused-QKV semantics, enforce encoder-only Jina dispatch, and fail closed on unsupported Granite YaRN and SmallThinker routing metadata. Add pinned L2 coverage where the native config route is exact and explicit GGUF-only exemptions otherwise. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Preserve the batch axis in the independent causal-mask oracle and add two-row full-logit ORT parity coverage so the reference cannot pass only by coincidence at batch size one. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Reject Granite LongRoPE until its serialized attention factor can be represented exactly, close unsupported modern and legacy RoPE metadata for the affected cohort routes, and avoid constructing an attention bias from a missing static-cache mask. Add mutation and ORT-load regressions and synchronize generated GGUF support docs. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Close standalone Granite attention-factor metadata, record merged PR #651 in the authoritative route census, and regenerate deterministic GGUF support documentation after rebasing the cohort. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Preserve both the sharded-import errno dependency from #675 and the cohort fingerprint dataclass dependency after rebasing PR #677. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Derive Granite routed expert width from feed_forward_length exactly, reject contradictory serialized expert widths without lossy numeric conversion, and reconcile the authoritative route census with closed #652 plus merged #656 and #675. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Restore strict DBRX tensor closure, isolate architecture-specific graph fingerprint fields, and reconcile post-merge route/model coverage counts. Add explicit GGUF-only coverage dispositions for the merged MoE cohort. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Apply repository lint formatting to the architecture-specific fingerprint map and its regression assertion. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
Reject DBRX head geometries that cannot satisfy grouped-query attention and lock Jina-v3 explicit feature extraction to the pooled GGUF output ABI with builder regressions. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 71862fcb-bc9a-4734-b047-b5376afabc3e Signed-off-by: Justin Chu <[email protected]>
justinchuby
force-pushed
the
justinchuby-promote-gguf-text-cohort
branch
from
August 27, 2026 20:34
e3ac351 to
b592189
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promote five previously
immediately-implementableGGUF architecture routes with architecture-owned metadata, tensor, graph, and fail-closed capability contracts:granite: exact dense/MoE union, Granite scaling, optional biases/shared experts, fused/split QKV transforms, tied output, and validated LongRoPE/no-RoPE paths. Packed import remains supported only where the transforms are proven; unmapped YaRN metadata is rejected.jina-bert-v3: dedicated dense RoPE encoder with fused/split QKV closure, post-norm GELU blocks, pooling, singleton token-type transform, and mandatory encoder-only task/cache guards. Unreachable MoE and packed preservation are rejected.maincoder: dedicated post-RoPE learned Q/K RMSNorm decoder with tied output and exact dynamic/static KV semantics. Packed import is rejected.plamo: shared-pre-norm parallel attention/SwiGLU decoder, cyclic 5-to-40-head KV expansion/cache, and inverse converter Q/output shuffles. Packed preservation, static cache, and external weight reuse are rejected.smallthinker: unnormalized-input routing, ReGLU experts, softmax/sigmoid gating normalization, and exact SWA/NoPE/local-RoPE schedules. Non-integral gating enums and unproven routing scales fail closed; packed import and static cache are rejected.All five routes keep downstream runtime packaging explicitly deferred pending representative real-weight parity. No production routing pins, defaults, or rejects Hugging Face revisions by
model_id;revision=Noneand arbitrary explicit revisions are unchanged. Immutable Maincoder/Jina revisions are test-only. PLaMo/SmallThinker use explicit model-coverage exemptions because their exact semantics are restored only by GGUF metadata postprocessing, not a native HF config alias.The generated GGUF census/docs now remove these routes from
immediately-implementableand record their exact import, quantization, and runtime dispositions.Review corrections
encoder_fused_qkvfrom unrelated route fingerprints while retaining it for Jina-v3; regression coverage proves the llama, qwen2, lfm2, and qwen35moe evidence routes are invariant.attn_factor, has an exact mapping.expert_weights_scaleabsent from the pinned loader contract.Validation
origin/main20a29ed2a935f01ec0cf2fc82939e50bc71dcdea.lintrunnerformatting/lint andgit diff --checkpass.Artifact budget and cleanup
Recorded bounded artifact/source reads total at most 34,042,487 bytes plus small metadata responses, far below the 16 GiB limit. Only two 16 MiB GGUF ranges were read (Maincoder and JinaBERT-v3); Granite, PLaMo, and SmallThinker downloaded no model payloads. The correction pass downloaded config-only L2 metadata, not model weights. Sparse headers, pinned source scratch files, transient outputs, caches, and temporary packages were deleted. No
.gguf,.onnx,.safetensors, or model.binpayload remains in the worktree.Deferred evidence / waivers