[Doc]: NVFP4 minimal example code
Open
@nv-guomingz is already working on this.
Since Aug 12, 2025.
Doc
Investigating
triaged
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
📚 The doc issue
Hi, NVFP4 seems like a really good format, and may well be used for training as well as quantization in the future. However I couldn't find any documentation how this actually works, and also not in the code. There's only this blog post.
Is there a simple pytorch function that demonstrates how to fake quantize a tensor from FP32 to NVFP4?
A small example to show how it works, without requiring the full TensorRT-LLM or TransformerEngine dependency, would be very helpful.
Suggest a potential alternative/fix
No response
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.
Assessment
This issue has not been assessed yet.