Skip to content

Commit

Permalink
fix sliding window
Browse files Browse the repository at this point in the history
  • Loading branch information
CXIAAAAA committed Dec 20, 2024
1 parent e2fa044 commit a0cf8b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 435 deletions.
3 changes: 2 additions & 1 deletion vllm/model_executor/models/commandr.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,15 @@ def __init__(

self.sliding_window = (sliding_window
if layer_has_sliding_window else None)
cache_config = copy.deepcopy(cache_config)

Check failure on line 186 in vllm/model_executor/models/commandr.py

View workflow job for this annotation

GitHub Actions / ruff (3.12)

Ruff (F821)

vllm/model_executor/models/commandr.py:186:24: F821 Undefined name `copy`
cache_config.sliding_window = self.sliding_window

self.attn = Attention(self.num_heads,
self.head_dim,
self.scaling,
num_kv_heads=self.num_kv_heads,
cache_config=cache_config,
quant_config=quant_config,
per_layer_sliding_window=self.sliding_window,
prefix=f"{prefix}.attn")
if self.use_qk_norm:
self.q_norm = LayerNorm(param_shape=(self.num_heads,
Expand Down
Loading

0 comments on commit a0cf8b5

Please sign in to comment.