[Online Quantization] Support memory-efficient online quantization via layerwise loading#34184
Closed
kylesayrs wants to merge 2 commits intovllm-project:mainfrom
Closed
Conversation
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a memory-efficient online quantization method by implementing layerwise loading. This is a significant improvement that refactors specialized loading logic from Fp8OnlineLinearMethod into a more generic and reusable layerwise loading mechanism. The changes are well-structured and adapt the existing reloading infrastructure for initial model loading.
However, I've identified a critical issue where the new generic loading mechanism is enabled for all online FP8 quantization paths, but the necessary refactoring was not applied to Fp8OnlineMoEMethod. This will likely cause issues for MoE models. My detailed comment addresses this with a recommendation for a fix.
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
vkuzo
pushed a commit
to vkuzo/vllm
that referenced
this pull request
Feb 11, 2026
Summary: Copy of vllm-project#34184 Test Plan: TODO Signed-off-by: Vasiliy Kuznetsov <vasiliy@meta.com>
5 tasks
vkuzo
pushed a commit
to vkuzo/vllm
that referenced
this pull request
Feb 11, 2026
Summary: Copy of vllm-project#34184 Test Plan: TODO Signed-off-by: Vasiliy Kuznetsov <vasiliy@meta.com>
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.
Purpose
Changes
Weights with initialized values
Handling weights which require values placed at init time is a little tricky. One example are rotary embeddings, whose values are created at init time, and are not loaded from disk. In order to avoid overwriting these values with materialized empty tensors, we explicitly exclude these modules from our restore/materialize process. However, handling a weight which initializes some values and loads values would be more complex, although not at all impossible to handle. One way of doing this would be to load values directly into weights, and count those, rather than using
get_numel_loaded.TODO
Testing
test_reload.py)