[Minor] Improve code style (#2422)

This commit is contained in:
Lianmin Zheng
2024-12-09 06:30:35 -08:00
committed by GitHub
parent 0ce091a82d
commit 641b7d0ae0
15 changed files with 33 additions and 21 deletions

View File

@@ -48,7 +48,14 @@ class RadixAttention(nn.Module):
self.sliding_window_size = sliding_window_size or -1
self.is_cross_attention = is_cross_attention
def forward(self, q, k, v, forward_batch: ForwardBatch, save_kv_cache=True):
def forward(
self,
q,
k,
v,
forward_batch: ForwardBatch,
save_kv_cache: bool = True,
):
if k is not None:
# For cross-layer sharing, kv can be None
assert v is not None