Skip to content

fix(ftw): preserve auxiliary expert banks - #317

Open
ErikBPF wants to merge 1 commit into
FlashML-org:mainfrom
ErikBPF:fix/ftw-auxiliary-banks
Open

fix(ftw): preserve auxiliary expert banks#317
ErikBPF wants to merge 1 commit into
FlashML-org:mainfrom
ErikBPF:fix/ftw-auxiliary-banks

Conversation

@ErikBPF

@ErikBPF ErikBPF commented Sep 1, 2026

Copy link
Copy Markdown

Summary

Preserve expert banks that use a different quant format or row geometry from the primary bank set during FTW conversion and load. Without this, converting a heterogeneous expert layout silently writes only the primary banks.

  • add an optional auxiliary-bank contract to ExpertBanks
  • write auxiliary banks as a nested FTW checkpoint using the existing writer
  • record the nested checkpoint and model-layer mapping in parent metadata
  • validate that checkpoint and mapping metadata appear together
  • recursively load the nested banks and restore their quant format, sources, and layer IDs
  • leave existing FTW checkpoints unchanged

Provider-specific Qwen loading is intentionally separate; this PR contains only the generic FTW preservation mechanism.

Validation contract

The PR includes focused writer/loader tests for:

  • per-layer nested entries and metadata
  • restored quant format and layer mapping
  • exact tensor round-trip
  • rejection of incomplete auxiliary metadata
pytest -q tests/test_ftw_auxiliary.py

Python compile, Ruff on the focused test, and git diff --check remain the packaging gates.

Evidence boundary

The public runtime PoC branch does not contain an immutable FTW endpoint report or a validator for a GGUF-versus-FTW throughput comparison. Therefore this PR makes no full-model throughput, latency, memory, or output-hash claim. Its claim is limited to conversion/load preservation exercised by the focused tests in this diff.

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