Skip to content

Commit 1bf2dd9

Browse files
authored
[Gemma2] add bitsandbytes support for Gemma2 (vllm-project#8338)
1 parent 5a60699 commit 1bf2dd9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vllm/model_executor/models/gemma2.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,14 @@ class Gemma2ForCausalLM(nn.Module, SupportsLoRA):
312312
# Gemma does not apply LoRA to the embedding layer.
313313
embedding_modules = {}
314314
embedding_padding_modules = []
315+
bitsandbytes_stacked_params_mapping = {
316+
# shard_name, weight_name, index
317+
"q_proj": ("qkv_proj", 0),
318+
"k_proj": ("qkv_proj", 1),
319+
"v_proj": ("qkv_proj", 2),
320+
"gate_proj": ("gate_up_proj", 0),
321+
"up_proj": ("gate_up_proj", 1),
322+
}
315323

316324
def __init__(
317325
self,

0 commit comments

Comments
 (0)