mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-23 09:24:28 +08:00
[CI Failure] Fix Gemma3 RoPE configuration for sliding attention layers (#29111)
Signed-off-by: Huamin Li <3ericli@gmail.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
parent
7d6da483b0
commit
8ac3a41487
@ -166,10 +166,12 @@ class Gemma3Attention(nn.Module):
|
||||
else:
|
||||
# Transformers v4 rope config.
|
||||
# Global attention. Use the values in config.json.
|
||||
rope_parameters = config.rope_parameters.copy()
|
||||
rope_parameters = config.rope_parameters
|
||||
# Local attention. Override the values in config.json.
|
||||
if self.is_sliding:
|
||||
rope_parameters["rope_theta"] = config.rope_local_base_freq
|
||||
rope_parameters = dict(
|
||||
rope_type="default", rope_theta=config.rope_local_base_freq
|
||||
)
|
||||
|
||||
self.rotary_emb = get_rope(
|
||||
self.head_dim,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user