Skip to content

Commit

Permalink
support bitsandbytes quantization with qwen model (#10549)
Browse files Browse the repository at this point in the history
Signed-off-by: Ubuntu <[email protected]>
  • Loading branch information
zixuanzhang226 authored Nov 23, 2024
1 parent 97814fb commit 948c859
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vllm/model_executor/models/qwen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,18 @@ class QWenLLM(QWenBaseModel):
embedding_modules = {}
embedding_padding_modules = []

default_bitsandbytes_target_modules = [
".c_attn.",
".c_proj.",
".w1.",
".w2.",
]
bitsandbytes_stacked_params_mapping = {
# shard_name, weight_name, index
"w2": ("gate_up_proj", 0),
"w1": ("gate_up_proj", 1),
}


class QWenVL(QWenBaseModel, SupportsMultiModal):
packed_modules_mapping = {
Expand Down

0 comments on commit 948c859

Please sign in to comment.