Repository navigation
Commit cc40cd7
Allow GGUF export with deferred tokenizers (#693)
## Summary
- Preserve proven GGUF model and runtime/config components when an
authoritative tokenizer route is deferred or blocked.
- Emit exactly one structured tokenizer warning with route, blocker
category, evidence ID, exact recorded reason, impact, and remediation;
never publish unverified tokenizer assets.
- Persist generic component `support_status`, `export_status`, and
`runtime_validation_status` in `export_report.json`.
- Keep architecture, config, tensor closure, graph, qtype, source
identity, I/O, malformed known metadata, and unexpected failures
fail-closed.
## Final blocker evidence
- **Tokenizer field closure:** Complete and incomplete paths accept only
exact consumed/extension allowlists plus `tokenizer.chat_template.*`.
Unknown/near-miss fields defer as
`unsupported-tokenizer-metadata-fields`; malformed known fields remain
fatal even when unknown fields coexist.
- **Incomplete tokenizer safety:** Present model/`pre`, embedded JSON,
RWKV, token list, types/scores/merges, special IDs, booleans,
suppress/charsmap, and chat templates validate before downgrade.
Tokenless special IDs fail; only `mask_token_id` on recognized
masked-diffusion architectures is left to the graph contract.
- **MTP tokenizer safety:** Deferred/blocked MTP routes never copy or
pass through unevidenced tokenizer repositories. Only runtime evidence
or validated embedded materialization writes tokenizer assets; faithful
runtime config remains exported.
- **Reuse metadata lifecycle:** The rollback journal always
manages/removes stale draft, export, and quantization reports across
sidecar variants. Failed reruns restore the complete prior graph/report
set.
- **Final-byte runtime identity:** Evidence matching occurs after final
export/compatibility/MTP status bytes. Pre-report evidence is explicitly
legacy/non-validating until regenerated final-package hashes exist.
- **Atomic publication:** Report-bearing normal saves use sibling
staging and atomic no-replace publication;
graph/report/draft/permission/concurrent-destination failures leave no
stale output. MTP status and reuse remain non-duplicated transactional
surfaces.
## Validation
- Final MTP/tokenizer regressions: **116 passed, 15 deselected**.
- #696 audio-projector affected gate: **428 passed, 453 deselected**.
- Final broad serial suite on exact base: **9,471 passed, 64 skipped, 12
deselected, 1 subtest passed**.
- Generated GGUF docs, full initialized `lintrunner`, and diff check:
clean.
- New disposition/runtime modules: targeted mypy clean.
- Broad mypy exact-base comparison: branch **3,768** vs base **3,804**
existing diagnostics; **0 normalized new errors**.
- Multiple independent medium-effort reviews completed; final MTP/mask
review reported no findings.
- GitHub review threads: **1 total, 0 unresolved**.
## Publication preflight
- Clean worktree and matching remote head.
- Session artifacts: **0 bytes retained**. Completed exact-base mypy
worktrees/logs were deleted; no downloaded GGUF/ONNX/package payloads or
scratch caches remain.
- Lease push completed after conflict-free semantic rebase onto #696.
- All commits contain `Signed-off-by` and required Copilot
`Co-authored-by` trailers. GPG signing was unavailable because `gpg` is
not installed.
- CI is intentionally not monitored and this PR is not being merged by
this session.
## Exact revisions
- Base: `82e31222c9dbc08d2ea825fd6265498f0f594019`
- Head: `960beeddec616d10d83f5bebe0ecd157a64ff199`
---------
Signed-off-by: Justin Chu <[email protected]>
Co-authored-by: Copilot App <[email protected]>1 parent 82e3122 commit cc40cd7
22 files changed
Lines changed: 3056 additions & 278 deletions
File tree
- docs/api
- src/mobius
- integrations/gguf
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | 666 | | |
673 | 667 | | |
674 | 668 | | |
| |||
713 | 707 | | |
714 | 708 | | |
715 | 709 | | |
| 710 | + | |
| 711 | + | |
716 | 712 | | |
717 | 713 | | |
718 | 714 | | |
| |||
749 | 745 | | |
750 | 746 | | |
751 | 747 | | |
752 | | - | |
| 748 | + | |
| 749 | + | |
753 | 750 | | |
754 | 751 | | |
755 | 752 | | |
| |||
759 | 756 | | |
760 | 757 | | |
761 | 758 | | |
| 759 | + | |
762 | 760 | | |
763 | 761 | | |
764 | 762 | | |
| |||
772 | 770 | | |
773 | 771 | | |
774 | 772 | | |
775 | | - | |
| 773 | + | |
| 774 | + | |
776 | 775 | | |
777 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
| |||
795 | 796 | | |
796 | 797 | | |
797 | 798 | | |
798 | | - | |
799 | | - | |
| 799 | + | |
| 800 | + | |
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
803 | 813 | | |
804 | 814 | | |
805 | 815 | | |
| |||
814 | 824 | | |
815 | 825 | | |
816 | 826 | | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
817 | 880 | | |
818 | 881 | | |
819 | 882 | | |
| |||
1353 | 1416 | | |
1354 | 1417 | | |
1355 | 1418 | | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
1359 | 1423 | | |
1360 | 1424 | | |
1361 | 1425 | | |
| |||
1364 | 1428 | | |
1365 | 1429 | | |
1366 | 1430 | | |
1367 | | - | |
1368 | | - | |
| 1431 | + | |
| 1432 | + | |
1369 | 1433 | | |
1370 | 1434 | | |
1371 | 1435 | | |
| |||
1374 | 1438 | | |
1375 | 1439 | | |
1376 | 1440 | | |
1377 | | - | |
| 1441 | + | |
| 1442 | + | |
1378 | 1443 | | |
1379 | 1444 | | |
1380 | 1445 | | |
| |||
0 commit comments