Conversation
Stream Hugging Face BnB quantization state with both legacy and Transformers 5 quantizer APIs. Add CPU-safe prefetch behavior, regression coverage, and a reproducible resident-versus-streamed benchmark.
DevElCuy
force-pushed
the
feat/prequantized-bnb-streaming
branch
from
August 24, 2026 22:47
8f57090 to
a3a242f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for streaming Hugging Face checkpoints that are already quantized with BitsAndBytes, including compatibility with the Transformers 5
quantizer API.
It also adds an opt-in text-only mode for multimodal models, allowing checkpoints such as Qwen3.8-27B NF4 to run below 3 GB VRAM by leaving the unused
vision tower on the
metadevice.What changed
create_quantized_param.get_weight_conversions.load_resident_modules=Falsefor low-VRAM text-only inference.Motivation
AirLLM previously interpreted BnB tensors such as
weight.absmax,weight.quant_map, andweight.quant_state.bitsandbytes__nf4as independentmodel parameters. This caused streamed prequantized checkpoints to fail during
module resolution.
Transformers 5 also removed the older direct quantized-parameter creation API,
requiring AirLLM to invoke the newer weight-conversion operations.
For multimodal checkpoints, keeping an unused BF16 vision tower resident can
consume enough VRAM to prevent the streamed output head from loading. The new
text-only mode makes that memory optional while preserving the existing default
behavior.
Validation
unsloth/Qwen3-8B-unsloth-bnb-4biton CPU and ROCm.Blue.Notes
--text-onlydisables image and video inputs for that model instance.ROCM_RX6400.md.