Repository navigation
Promote first GGUF MoE architecture cohort - #680
Merged
Merged
Conversation
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
Promotes a first cohort of GGUF Mixture-of-Experts architectures (arctic, dbrx, ernie4_5-moe, nomic-bert-moe) from deferred graph routes into float-only, suffix-/closure-validated import paths, with dedicated model graph implementations and CPU execution coverage.
Changes:
- Adds GGUF-specific MoE model/encoder graph implementations (DBRX/Arctic/ERNIE 4.5 MoE decoders; NomicBERT-MoE encoder) and wires them into the registry.
- Extends GGUF config/tensor mapping plus strict tensor-closure validation for the cohort (including expert stack unpacking) while keeping quantized import rejected and runtime deferred.
- Adds/updates tests and documentation to pin route census counts and validate config semantics + tiny CPU execution.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/_test_configs.py | Adds tiny test configs for the four promoted GGUF MoE module types. |
| src/mobius/models/moe.py | Introduces GGUF-specific MoE decoder variants for DBRX/Arctic/ERNIE 4.5 and tightens MoETextModel typing/validation. |
| src/mobius/models/gguf_encoders.py | Adds NomicBERT-MoE encoder implementation and supporting attention/MLP/token-type utilities. |
| src/mobius/models/init.py | Exports the new GGUF cohort model classes. |
| src/mobius/integrations/gguf/_tensor_mapping.py | Adds extra tensor mapping recipes for DBRX/Arctic/ERNIE 4.5 MoE/NomicBERT-MoE. |
| src/mobius/integrations/gguf/_route_census_test.py | Updates pinned route census category counts after promotions. |
| src/mobius/integrations/gguf/_moe_cohort_test.py | New end-to-end cohort tests: closure, mapping, config semantics, expert unpacking, and CPU execution. |
| src/mobius/integrations/gguf/_config_mapping.py | Adds cohort-specific postprocessors (dbrx/arctic/ernie45_moe) and specialized encoder handling for nomic-bert-moe. |
| src/mobius/integrations/gguf/_builder.py | Adds strict cohort tensor-contract validator; updates encoder dispatch lists; improves MoE weight-shape validation routing. |
| src/mobius/integrations/gguf/_builder_test.py | Removes arctic/dbrx from a test list expecting “fails before graph” behavior. |
| src/mobius/integrations/gguf/_arch_registry.py | Promotes the four architectures into importable GGUF specs (runtime deferred, quantized import rejected). |
| src/mobius/integrations/gguf/_arch_registry_test.py | Updates supported counts and adjusts remaining-deferred cohort tests around the promotions. |
| src/mobius/components/_attention.py | Refactors Attention to allow QKV projection customization; adds FusedQKVAttention (optional clamp-before-split). |
| src/mobius/components/_attention_test.py | Adds a focused unit test ensuring fused projection clamp happens before Split. |
| src/mobius/components/init.py | Exposes FusedQKVAttention from the components public API. |
| src/mobius/_registry.py | Registers new GGUF cohort module types and tasks. |
| src/mobius/_configs/_base.py | Adds attention_clamp and moe_layer_frequency fields to ArchitectureConfig. |
| docs/api/build_from_gguf.md | Updates the support matrix / census figures and architecture listings for the promoted routes. |
💡 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-moe-cohort
branch
from
August 27, 2026 18:06
2331f20 to
0780f6d
Compare
Add exact float graph routes for Arctic, DBRX, ERNIE 4.5 MoE, and NomicBERT-MoE with strict tensor/config closure, architecture-specific routing semantics, and deterministic evidence coverage. Keep quantized import rejected and runtime claims deferred until their ABIs are proven. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 72a2c1ea-03e1-42a3-8439-c5a0f2e3fde7 Signed-off-by: Justin Chu <[email protected]>
Reject ERNIE attention-output bias that llama.cpp ignores, unpack Arctic stacked experts into graph-owned parameters, and scope Arctic shape validation so block-sparse MoE routes remain unaffected. Add end-to-end parameter-name and malformed-shape regressions. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 72a2c1ea-03e1-42a3-8439-c5a0f2e3fde7 Signed-off-by: Justin Chu <[email protected]>
Improve expert configuration diagnostics, fail explicitly when NomicBERT-MoE token-type metadata is absent, and regenerate the support census after rebasing onto current main. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 72a2c1ea-03e1-42a3-8439-c5a0f2e3fde7 Signed-off-by: Justin Chu <[email protected]>
justinchuby
force-pushed
the
justinchuby-promote-gguf-moe-cohort
branch
from
August 27, 2026 18:17
0780f6d to
34646fe
Compare
Serialize new graph configuration fields only for their consuming architectures so pinned runtime route identities remain stable. Treat ERNIE shared width and merged tensors as authoritative while validating the optional shared-count multiplier exactly. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 72a2c1ea-03e1-42a3-8439-c5a0f2e3fde7 Signed-off-by: Justin Chu <[email protected]>
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
arctic,dbrx,ernie4_5-moe, andnomic-bert-moeEvidence
dbrx-instruct.i1-IQ1_S.ggufERNIE-4.5-21B-A3B-Thinking.i1-IQ1_S.ggufnomic-embed-text-v2-moe.Q2_K.ggufValidation
8662 passed, 64 skipped, 12 deselectedlintrunner f --output oneline --all-files