fix(download): include json files when fetching weights, so NVFP4's index.json is no longer silently skipped - #129
Conversation
…ing weights model.safetensors.index.json never downloaded because download_hf_weight only allow-listed *.safetensors. NVFP4's bank loader requires that file and fails with FileNotFoundError; other formats happened not to need it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Related to #124 and PR #129 — possible follow-up issue with local .ftw mixed-precision checkpoints. Copy |
|
The .ftw path works from the CLI, its not Desktop only. Loaded the Desktop app's own conversion straight through On the dtype I dont think thats your problem. The OOM reads like plain VRAM sizing to me, 20 GB of weights on a 16 GB card needs the experts pushed off. One other thing, you listed RTX 4090 / 16 GB VRAM. 4090s are 24 GB so might be worth double checking which card its actually picking up, that would change the math a fair bit. |
Fixes #124.
Root cause
download_hf_weight()fetches only*.safetensorsfrom the Hub:model.safetensors.index.jsondoesn't match that glob, so it never downloads.Most weight-loading paths reconstruct the shard map from each shard's own
safetensors header and never miss it.
nvfp4_banks.load_nvfp4_expert_source_banksdoes require the prebuilt index file, so NVFP4 checkpoints fail at load with:
despite the repo (e.g.
nvidia/Qwen3.6-35B-A3B-NVFP4) shipping the file —download_hf_weightsimply never asked for it.Fix
Add
*.jsonto the allow-list. Same call, one extra pattern.Tested
Verified against
huggingface_hub.utils.filter_repo_objects— the actualfunction
snapshot_downloaduses internally to decide what to fetch — not areimplementation of the filtering logic:
Also confirmed operationally: manually placing the missing file from the repo
into an existing snapshot (workaround noted in #124) lets
nvidia/Qwen3.6-35B-A3B-NVFP4load and serve normally — 262,144-token context,42.2 tok/s decode, on an RTX 4090. This PR makes that automatic instead of a
manual step.
The added
*.jsonpattern also brings inconfig.json/tokenizer.json/etc. up front, which are small (tens of KB,
hf_quant_config.json~35 KB) —no meaningful download-size impact, and likely redundant with whatever second
mechanism already fetches those today, but harmless either way.
Per the AI policy in CONTRIBUTING: this change was produced with AI assistance;
the submitter has reviewed and tested everything in it and takes responsibility
for it.