[Bug]: Support parameters sharding across safetensors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
System Info
NA
Who can help?
No response
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
use HF model that has sharded params. for example nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-NVFP4.
Expected behavior
linear op params should be initialized correctly
actual behavior
linear op params aren't initialized correctly
additional notes
When AD deals with quantized here it expects all parameters to be available in the same state_dict. when a linear op's params are sharded across safetensors, this means the condition isn't triggered, and the params for that linear aren't initialized.
Need to make the load_hook robust to these kind of scenearios
Before submitting a new issue...
- Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the quantization logic in tensorrt_llm/_torch/auto_deploy/transform/library/quantization.py around the linked code, then trace the load_hook handling the state_dict. Reproduce with nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-NVFP4 and verify that linear parameters split across safetensors are initialized correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100