This repository was archived by the owner on Oct 11, 2024. It is now read-only.
[3/N] rs/vllm quantization - Adding models to non-uniform refactor#189
Merged
varun-sundar-rabindranath merged 6 commits intovllm-quantizationfrom Apr 22, 2024
Conversation
Base automatically changed from
rs/vllm-quantization-config-refactor
to
rs/vllm-quantization
April 16, 2024 17:32
ab88cd5 to
bed3d83
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Since we changes the
LinearMethodinterface to requirelayer_name, we need to update each model.py to plumb this information through the models. We need to do this, because we need to pass thelayer_nametoLinearMethodBase.create_weights, such that we have have non-uniform quantization / compression (as we need to be able to consult the quantization config to determine what the weights / format should look like and we use the layer name to decide thisSo far, have updated:
llamagemmaphi-2gpt2starcoder2qwen2deepseekanddeepseekMoEbaichuanTo test:
To Update:
layer_nametoQKVParallelLinear,MergedColumnParallelLinear,ColumnParallelLinear,RowParallelLinearby plumbingparent_namethrough fromModel-->DecoderLayer-->MLP/SelfAttention-->Layerweight_loaderwithlinear_method.maybe_update_name