Skip to content

Promote first low-cost GGUF runtime evidence batch - #681

Merged
justinchuby merged 4 commits into
mainfrom
justinchuby-promote-low-cost-gguf-runtime
Aug 28, 2026
Merged

Promote first low-cost GGUF runtime evidence batch#681
justinchuby merged 4 commits into
mainfrom
justinchuby-promote-low-cost-gguf-runtime

Conversation

@justinchuby

Copy link
Copy Markdown
Member

Summary

  • promote exact-artifact ORT GenAI runtime support for six graph-supported GGUF architectures: GPT-2, GPT-NeoX/Pythia, MPT, OLMo, StarCoder, and StarCoder2
  • bind every route to immutable source/config/tokenizer revisions, exact artifact identity, tensor/value closure, full logits, dynamic-cache replay/rollback/reorder, deterministic 20-token generation, tokenizer identity, and graph/package/report roundtrips
  • keep all six routes explicitly dequantized to float storage and float operators; this PR makes no native or source-faithful quantized-runtime claim
  • add network-free case fixtures and a machine-readable batch manifest, then regenerate the capability matrix and GGUF documentation
  • route GPT-2 through the generic decoder ABI, permit exact-evidenced portable/default graphs for CPU packages, and close dense Qwen3 Q/K norm tensor mapping
  • preserve the global revision policy: revision=None remains unpinned and arbitrary explicit revisions continue to forward unchanged; immutable revisions appear only in tests/evidence

Selected artifacts

Architecture Artifact bytes SHA-256
GPT-2 81,196,544 4234545f917ec1df10dab4d926796a83422b68e9010d85a4c111b8b541f32892
GPT-NeoX/Pythia 38,508,192 8e331c8c8016bed8ff1863b78fafe51e86b2364f32c2d7f3e201687e081cf7f7
MPT 8,734,304 5627dcb0ff18f6f7200f83c0aed2056a6a7c86b5f2d865833e1b5f00b00e4daa
OLMo 33,860,576 be1c5a22ac0e75cd5874467ffd80bcd2c8500609d3bf7ccdb5b269373e4d6da4
StarCoder 103,899,456 aa8c2170bb9172447baba14309916cfc0d901dbffaf10f1448f4f631e10c1f41
StarCoder2 68,039,904 ab0a4b4e79c906520808db065a00a317c8b097e2176638b34088975eada6e0ed

Artifact payload is 334,238,976 bytes; tokenizer assets add 12,586,075 bytes, for 346,825,051 downloaded bytes total, below the 16 GiB policy ceiling.

Fail-closed outcomes

Runtime evidence

  • ONNX Runtime 1.29.0 / ORT GenAI 0.15.2 / CPU
  • exact tensor census and value closure
  • independent full-logit parity with per-route bounded tolerances
  • prefill, cached decode, full replay, rollback, reorder, and deterministic generation
  • tokenizer vocabulary/special-token identity
  • graph package and quantization_report.json roundtrip identity
  • all downloaded payloads and temporary ONNX packages removed after collection

Validation

  • promoted real-artifact runtime cases: 6 passed
  • focused GGUF unit suite: 1,441 passed, 1 skipped
  • schema/dashboard/docs coverage: 1,135 passed, 255 skipped
  • broad serial non-integration suite: 8,626 passed, 64 skipped, 12 deselected
  • post-rebase focused suite: 413 passed
  • Ruff check/format and generated-doc check: passed
  • changed source type check: clean except six pre-existing auto_export.py errors outside changed lines; repository-wide mypy remains a known non-clean baseline
  • independent high-confidence review: no findings

@justinchuby
justinchuby requested review from a team and a lite review from Copilot August 27, 2026 16:39
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 2605d6da4a2f71

Model Sub-model Changes Status

No architecture changes detected.


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

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Performance Comparison

Comparing 2605d6da4a2f71

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 324 KB 324 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 265 265 +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 127 127 +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 450 450 +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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Promotes the first “low-cost” GGUF runtime-evidence batch by wiring six GGUF architectures into the ORT GenAI evidence pipeline (explicit-float only), and updating the runtime/type plumbing and documentation so the new evidence is treated as runtime-supported in the GGUF registry/capability surfaces.

Changes:

  • Add six promoted real-artifact ORT GenAI runtime-evidence cases (GPT-2, GPT-NeoX/Pythia, MPT, OLMo, StarCoder, StarCoder2) with explicit cache-vs-full-sequence parity checks and tokenizer identity assertions.
  • Register/bind the new evidence across GGUF runtime-evidence records, batch manifest + capability JSON, architecture registry runtime support flags, and route census counts.
  • Normalize GPT-2 ORT GenAI packaging to the generic decoder model type (since the exported cache ABI is the generic separate K/V form), and document the new batch in generated GGUF docs.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/gguf_small_model_runtime_integration_test.py Adds six promoted runtime-evidence cases, reference loading for low-cost artifacts, cache parity tolerances, and stricter tokenizer identity checks.
testdata/evidence/gguf_quantization_capabilities.json Updates selected-artifact totals and appends new runtime-evidenced artifacts/records.
testdata/evidence/gguf_low_cost_runtime_batch.json New machine-readable manifest describing the selected low-cost batch, budget totals, exclusions, and fail-closed reasons.
testdata/cases/causal-lm/gpt2-q2-k.yaml New network-free case fixture for the GPT-2 low-cost runtime-evidence route.
testdata/cases/causal-lm/pythia-70m-q2-k.yaml New network-free case fixture for GPT-NeoX/Pythia low-cost runtime-evidence route.
testdata/cases/causal-lm/tiny-mpt-q2-k.yaml New network-free case fixture for MPT portable/default-graph runtime-evidence route.
testdata/cases/causal-lm/tiny-olmo-q2-k.yaml New network-free case fixture for OLMo low-cost runtime-evidence route.
testdata/cases/causal-lm/tiny-starcoder-q2-k.yaml New network-free case fixture for StarCoder low-cost runtime-evidence route.
testdata/cases/causal-lm/tiny-starcoder2-q2-k.yaml New network-free case fixture for StarCoder2 low-cost runtime-evidence route.
src/mobius/integrations/ort_genai/auto_export.py Removes GPT-2 from architecture-specific ORT GenAI types and documents why GPT-2 normalizes to generic decoder.
src/mobius/integrations/ort_genai/auto_export_test.py Updates expectations so GPT-2 emits generic decoder type instead of specialized GPT-2 type.
src/mobius/integrations/gguf/_tensor_mapping.py Updates comments to reflect Q/K norm mapping applicability to dense Qwen3 as well as MoE variants.
src/mobius/integrations/gguf/_tensor_mapping_test.py Adds a focused unit test proving Qwen3 attention Q/K norm tensor name mapping.
src/mobius/integrations/gguf/_runtime_package.py Allows “default” as an evidenced execution provider and maps it to CPU for ORT GenAI session options.
src/mobius/integrations/gguf/_runtime_package_test.py Adds a unit test ensuring portable/default graphs still target ORT GenAI CPU session construction.
src/mobius/integrations/gguf/_runtime_evidence.py Adds six new GGUFRuntimeEvidence records and includes them in the evidence registry.
src/mobius/integrations/gguf/_runtime_evidence_test.py Adds a closure/budget test for the new low-cost batch manifest and evidence binding.
src/mobius/integrations/gguf/_route_census.py Records PR dependency dispositions for #672 and #674 to keep evidence batching explicit.
src/mobius/integrations/gguf/_route_census_test.py Updates census totals and reconciled PR dependency expectations.
src/mobius/integrations/gguf/_quant_capabilities_test.py Updates artifact-count and byte-total assertions to match the expanded capabilities set.
src/mobius/integrations/gguf/_exact_legacy_decoder_test.py Updates expected runtime support for exact-legacy decoder architectures now evidenced (gptneox/mpt).
src/mobius/integrations/gguf/_conventional_decoder_test.py Updates expected runtime support for StarCoder now evidenced.
src/mobius/integrations/gguf/_docs.py Documents the new low-cost batch in the generated GGUF documentation output.
src/mobius/integrations/gguf/_docs_test.py Relaxes the doc line-count ceiling and asserts new runtime-evidence IDs are present.
src/mobius/integrations/gguf/_arch_registry.py Marks the six architectures as runtime-supported with tight runtime_evidence_ids scoping; adds Qwen3 tensor recipe for Q/K norms.
docs/api/build_from_gguf.md Regenerates the rendered GGUF docs: updated runtime counts, evidence table, and recent PR dependency line.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@justinchuby
justinchuby force-pushed the justinchuby-promote-low-cost-gguf-runtime branch 2 times, most recently from 7fa755d to bc00350 Compare August 27, 2026 18:21
Promote exact-artifact explicit-float ORT GenAI routes for GPT-2, GPT-NeoX, MPT, OLMo, StarCoder, and StarCoder2. Bind each route to immutable artifact, tokenizer, graph, package, full-logit, state, and deterministic-generation evidence while preserving fail-closed routing for all unmatched sources.

Add portable CPU package support for evidenced default graphs, use the generic decoder ABI for GPT-2, close dense Qwen3 Q/K norm mapping, and update the network-free batch manifest, capability matrix, docs, and regression coverage. Production revision routing remains unchanged and revision-neutral.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e2a8f3cf-109b-47c5-bc61-0a91ffd27ebf
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Map GPT-2 and StarCoder2 to their tanh-GELU defaults, tighten parity with activation-drift mutations, and replace circular reference loading with independent upstream-GGUF oracles. Reconcile route census and runtime documentation with current repository state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f5f288c7-b4e5-4371-ad46-9d163511ade9
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Regenerate evidence fingerprints against the fully landed architecture registry, preserve truthful explicit-float runtime claims, and reconcile the route census. Enable dense Qwen3 Q/K norm consumers so its deferred tensor-closure record remains accurate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f5f288c7-b4e5-4371-ad46-9d163511ade9
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby force-pushed the justinchuby-promote-low-cost-gguf-runtime branch from bc00350 to 951517b Compare August 28, 2026 03:25
Apply StarCoder2's architecture-owned 4096-token sliding window when GGUF metadata omits it. Add exact-artifact cached-position parity that rejects full causal attention, and refresh the config, graph, and runtime-package fingerprints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f5f288c7-b4e5-4371-ad46-9d163511ade9
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
justinchuby merged commit 4543476 into main Aug 28, 2026
23 of 25 checks passed
@justinchuby
justinchuby deleted the justinchuby-promote-low-cost-gguf-runtime branch August 28, 2026 04:15
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.

2 participants