Repository navigation
Add remaining dense GGUF architectures - #595
Merged
Merged
Conversation
Performance Comparison
|
justinchuby
force-pushed
the
justinchuby-add-remaining-hybrid-gguf
branch
from
August 25, 2026 16:03
e8d65f2 to
693ad71
Compare
Support exact pinned GGUF import contracts for Baichuan 7B, ChatGLM, Phi-2, and Seed-OSS, including strict tensor closure, architecture-specific transforms, bias families, tie ownership, and quantization safeguards. Defer Apertus, MiniCPM3, OpenELM, and MPT before config extraction where Mobius cannot represent pinned semantics exactly. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Preserve the current quantization verdict registry while replaying the dense C01 cohort. Accept the pinned fused or split QKV alternatives for ChatGLM and Phi-2 float imports, reject their unsupported packed paths explicitly, and regenerate the support matrix in the current format. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
justinchuby
force-pushed
the
justinchuby-add-remaining-dense-gguf
branch
from
August 25, 2026 16:19
f308da1 to
cffdb2b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands Mobius GGUF import coverage for additional dense C01 architectures (Baichuan 7B 32-layer, modern ChatGLM, Phi-2, Seed-OSS 64-layer) by adding pinned tensor-family/mapping/config support and enforcing stricter pre-graph validation contracts. It also updates the GGUF support matrix/docs and adds targeted tests to ensure the pinned llama.cpp semantics are validated before graph construction.
Changes:
- Add dense C01 preflight validation to enforce pinned geometry + tensor-closure (including fused-vs-split QKV layout rules, bias-family closure, and Seed-OSS-specific constraints) before config extraction / graph build.
- Extend GGUF tensor mapping + config postprocessing for
baichuan,chatglm,phi2, andseed_oss(+ Seed-OSS extras), and update Phi weight preprocessing to split fused QKV for Phi-2. - Add a comprehensive dense C01 test suite and update pinned upstream census + docs support matrix accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/mobius/models/phi.py | Split fused qkv_proj weights/biases into q/k/v_proj during preprocessing for Phi-2-style inputs. |
| src/mobius/integrations/gguf/_upstream_data/llamacpp_pin.json | Extend pinned llama.cpp architecture census entries with tensor-family info for newly covered/explicitly-deferred dense architectures. |
| src/mobius/integrations/gguf/_tensor_processors.py | Minor formatting tweak in llama tensor processing block. |
| src/mobius/integrations/gguf/_tensor_mapping.py | Add GGUF→HF mapping tables for ChatGLM + Phi-2 and a Seed-OSS extras overlay; wire them into the mapping recipe registry. |
| src/mobius/integrations/gguf/_dense_c01_test.py | New focused test suite for dense C01 pinned-contract validation, mapping correctness, and Phi-2/ChatGLM splitting behavior. |
| src/mobius/integrations/gguf/_config_mapping.py | Add architecture-specific config postprocessors for baichuan, chatglm, phi2, and seed_oss. |
| src/mobius/integrations/gguf/_builder.py | Enforce dense C01 tensor-contract validation pre-config; broaden quantization-preservation rejection helper to cover additional architectures. |
| src/mobius/integrations/gguf/_builder_test.py | Update synthetic GGUF writer to include Seed-OSS post-attention norm tensors. |
| src/mobius/integrations/gguf/_arch_registry.py | Register new dense C01 architectures as importable (runtime deferred) and add explicit pre-config deferrals for apertus, minicpm3, openelm, mpt. |
| src/mobius/integrations/gguf/_arch_registry_test.py | Update pinned supported/quantized verdict sets and closure test coverage to include the new architectures. |
| docs/api/build_from_gguf.md | Update the generated GGUF support matrix and add narrative documentation for the dense C01 cohort + explicit deferrals. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+683
to
+687
| items = list(gguf_model.tensor_items_raw()) | ||
| actual = { | ||
| name: tuple(int(dimension) for dimension in shape) | ||
| for name, _raw, _qtype, shape in items | ||
| } |
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
Pinned llama.cpp SHA:
8d9af256337d1a501250f9bbf4c0859a654bddd6Validation
620 passed3998 passed, 268 skipped, 7 deselected6298 passed, 52 skipped, 1 subtest passed2025 passed, 44 skipped, 4 deselectedThe excluded
glm_moe_dsagraph/checker failures reproduce on the stacked base and are unrelated to this change.Deferrals / waivers
rope_freqstensor is consumed as per-dimension RoPE factors by the pinned loader, while the current Mobius graph derives RoPE only from scalar config