NVIDIA-NeMo / NVIDIA-NeMo/Automodel

Auto dequantization for HF models

Open
#514 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
963
Forks
318
Avg merge
3d 20h
Merged PRs (30d)
143

Description

Is your feature request related to a problem? Please describe.
Automodel currently does not support automatically dequantizing weights to BF16.

Describe the solution you'd like
We need to be able to dequantize at load time. The Torch DCP team has this implementation here: https://github.com/pytorch/pytorch/blob/main/torch/distributed/checkpoint/quantized_hf_storage.py but it isn't very general. It'd work for DSv3 but not for models like Llama Nemotron because of different FQNs of the quantization scales. It also wouldn't be possible to work for GPT-OSS.

Describe alternatives you've considered
We currently have dequantization available through the state dict adapters of custom models, but this is not general and forces the user into using custom models to perform BF16 training.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the referenced PyTorch torch/distributed/checkpoint/quantized_hf_storage.py implementation and compare it with Automodel's existing custom-model state dict adapters. Define how load-time BF16 dequantization should resolve differing quantization-scale FQNs, including DSv3, Llama Nemotron, and GPT-OSS; done means it works without requiring custom models.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.