Skip to content

Add dense GGUF architecture cohort - #572

Open
justinchuby wants to merge 1 commit into
justinchuby-gguf-registry-foundationfrom
justinchuby-gguf-dense-transformer-cohort
Open

Add dense GGUF architecture cohort#572
justinchuby wants to merge 1 commit into
justinchuby-gguf-registry-foundationfrom
justinchuby-gguf-dense-transformer-cohort

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

Adds the first reviewable C01 dense-transformer GGUF cohort on top of #571, using llama.cpp commit 8d9af256337d1a501250f9bbf4c0859a654bddd6 as the tensor-family source of truth.

GGUF architecture mobius graph Config/tensor/graph Runtime
olmo OLMoCausalLMModel supported supported with pinned real GGUF evidence
olmo2 OLMo2CausalLMModel supported supported with pinned real GGUF evidence
cohere2 CohereCausalLMModel supported deferred pending real parity/generation evidence
arcee ArceeCausalLMModel supported deferred pending real parity/generation evidence
smollm3 SmolLM3CausalLMModel supported supported with pinned real GGUF evidence
exaone CausalLMModel supported deferred pending real parity/generation evidence

Architecture correctness

  • Adds exact pinned upstream tensor-family closure and a falsification test that removes a required mapping.
  • Rejects missing required metadata rather than synthesizing success-shaped configs.
  • Preserves OLMo weight-free LayerNorm, OLMo2 post-norm/full-width QK norms, Cohere2 parallel pre-norm/interleaved RoPE/3-sliding-1-full NoPE schedule, Arcee ReLU² non-gated MLP, and SmolLM3 every-fourth-layer NoPE behavior.
  • Explicitly rejects olmo2 files carrying OLMo3 sliding-window patterns until the graph supports per-layer sliding attention.
  • Fixes the existing InternLM2 Q/K reverse permutation with a direct value regression against pinned converter behavior.
  • Centralizes quantization-aware linear/embedding construction so specialized graph classes do not silently replace packed modules with float modules.
  • Rebinds tied quantized LM heads when specialized models replace their text backbones.

Real GGUF evidence

Pinned revisions, exact filenames, sizes, SHA-256 values, and per-tensor qtype tables are encoded in tests/gguf_dense_cohort_integration_test.py for:

  • QuantFactory/AMD-OLMo-1B-GGUF@5f34243a42dbae2141b8f5286320bf63d51eeefb
  • allenai/OLMo-2-0425-1B-Instruct-GGUF@62f8c199538474c3e33ed5d7e0580abd66686a27
  • ggml-org/SmolLM3-3B-GGUF@4965cb60b150737b68a0408c36aeefb65078f894

All three packages build, save, open in ORT CPU, and produce deterministic finite logits and pinned greedy outputs.

The mixed Q4_K_M files do not use native preservation. Q4_K and Q6_K projections are dequantized and affine-requantized to explicit-zero-point 4-bit/block-32 MatMulNBits; compatible embeddings use GatherBlockQuantized; float norm tensors remain float.

Explicit exclusions

The PR does not infer compatibility from common names. Deferred candidates include GPT-NeoX and Phi-2 (fused/interleaved or dual-form QKV), Baichuan and MPT (ALiBi), StarCoder (learned positions), and unproven Qwen/Command-R aliases. Large Command-R/Seed artifacts were not downloaded.

Validation

  • 1,112 GGUF unit tests
  • 52 affected model graph tests
  • 3 pinned real-GGUF integration tests
  • 5,511 broader non-integration tests
  • Changed-file lintrunner clean

The existing glm_moe_dsa symbolic shape-inference/checker failures reproduce independently and are excluded from the final broad run.

Add exact config and tensor mappings for OLMo, OLMo2, Cohere2, Arcee, SmolLM3, and Exaone against the pinned llama.cpp architecture census. Preserve architecture-specific normalization, RoPE, attention schedules, quantized module wiring, and InternLM2 Q/K permutation semantics.

Validate strict tensor closure, synthetic float and quantized graph execution, and pinned real OLMo-family GGUF artifacts while deferring runtime claims that lack real-weight evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 184176ffbdc807

Model Sub-model Changes Status

No architecture changes detected.


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

@github-actions

Copy link
Copy Markdown

Performance Comparison

Comparing 184176ffbdc807

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0%
bert (feature-extraction) num_nodes 68 68 +0.0%
falcon model_size_bytes 364 KB 364 KB +0.0%
falcon num_nodes 66 66 +0.0%
gemma2 model_size_bytes 428 KB 428 KB +0.0%
gemma2 num_nodes 105 105 +0.0%
gpt2 model_size_bytes 388 KB 388 KB +0.0%
gpt2 num_nodes 54 54 +0.0%
llama model_size_bytes 425 KB 425 KB +0.0%
llama num_nodes 60 60 +0.0%
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0%
llama (static-cache) num_nodes 56 56 +0.0%
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0%
mamba (ssm-text-generation) num_nodes 94 94 +0.0%
phi3 model_size_bytes 421 KB 421 KB +0.0%
phi3 num_nodes 58 58 +0.0%
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0%
phi3 (static-cache) num_nodes 54 54 +0.0%
qwen2 model_size_bytes 425 KB 425 KB +0.0%
qwen2 num_nodes 60 60 +0.0%
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0%
qwen2 (static-cache) num_nodes 56 56 +0.0%
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0%
qwen3_5_moe (hybrid-text-generation) num_nodes 264 264 +0.0%
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0%
qwen3_5_text (hybrid-text-generation) num_nodes 126 126 +0.0%
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0%
qwen3_5_vl (hybrid-qwen-vl) num_nodes 428 428 +0.0%
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0%
t5 (seq2seq) num_nodes 176 176 +0.0%
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0%
whisper (speech-to-text) num_nodes 128 128 +0.0%

No performance regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant