int8量化感知训练,保存的模型依然是fp32
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 172
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
通过BMCook进行模型压缩,配置了quantization和distillation,训练的loss收敛的很好。但是保存模型的时候,发现保存的checkpoint文件并没有减少,分析发现线性层的参数还是fp32的。
另外bmtrain的优化器AdamOffloadOptimizer和AdamOptimizer也只支持参数保存为fp32和fp16,并没有实现参数保存为int8。
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 by reproducing the reported BMCook quantization and distillation configuration, then inspect how checkpoints serialize linear-layer parameters. Review the bmtrain AdamOffloadOptimizer and AdamOptimizer save paths mentioned in the issue. Done means the saved model and optimizer parameters use the intended int8 representation and the checkpoint size reflects that change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100