update pre-commit config (#18860)

This commit is contained in:
SoluMilken
2026-02-16 00:18:31 +08:00
committed by GitHub
parent f7603203b0
commit 07a24f1a38
135 changed files with 239 additions and 198 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
"""
"""
""" """
import unittest
from typing import List, Optional
@@ -195,7 +194,7 @@ class TestMiniCPMV2_6Logits(VisionLLMLogitsBase):
"pixel_values": inputs.pixel_values,
"tgt_sizes": inputs.tgt_sizes,
}
(hf_output, _) = self.hf_model.get_vllm_embedding(
hf_output, _ = self.hf_model.get_vllm_embedding(
model_inputs,
)
hf_output = hf_output.squeeze(0)
@@ -43,12 +43,9 @@ class TestSlidingWindowAttentionTriton(CustomTestCase):
cls.short_context_prompt = "The capital of France is"
# Test prompt longer than window size
cls.long_context_prompt = (
"""
cls.long_context_prompt = """
Once upon a time, there was a mountain. In the mountain, there was a temple. In the temple, there was an old monk telling a story. The story was:
"""
* 100
)
""" * 100
cls.long_context_prompt += "\nNow, summarize the story in one sentence:"
def _test_mmlu(self):
@@ -10,7 +10,10 @@ import torch.nn.functional as F
from sglang.srt.layers.attention.fla.layernorm_gated import (
_layer_norm_fwd as layer_norm_fwd,
)
from sglang.srt.layers.attention.fla.layernorm_gated import layernorm_fn, rms_norm_ref
from sglang.srt.layers.attention.fla.layernorm_gated import (
layernorm_fn,
rms_norm_ref,
)
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(
@@ -7,6 +7,7 @@ unittest version of the AWQ Triton kernel tests.
Run with:
python -m unittest test_awq_dequant.py
"""
import unittest
import torch
+1 -1
View File
@@ -222,7 +222,7 @@ class TestLayerNorm(CustomTestCase):
x = x + residual.to(torch.float32)
residual = x.to(orig_dtype)
(variance, mean) = torch.var_mean(x, dim=-1, keepdim=True, correction=0)
variance, mean = torch.var_mean(x, dim=-1, keepdim=True, correction=0)
x = (x - mean) * torch.rsqrt(variance + variance_epsilon)
x = x.to(orig_dtype) * weight
if residual is None:
+2 -2
View File
@@ -39,8 +39,8 @@ def fix_query_key_value_ordering_reshape_cat(
]
# [b, sq, ng, (hn + hn + np/ng * hn + np/ng + np/ng)]
# --> [b, sq, ng, hn], [b, sq, ng, hn], [b, sq, ng, np/ng * hn], [b, sq, ng, np/ng * hn], [b, sq, ng, np/ng], [b, sq, ng, np/ng]
(query, key, value, z) = torch.split(mixed_qkvz, split_arg_list_qkvz, dim=2)
(b, a) = torch.split(mixed_ba, split_arg_list_ba, dim=2)
query, key, value, z = torch.split(mixed_qkvz, split_arg_list_qkvz, dim=2)
b, a = torch.split(mixed_ba, split_arg_list_ba, dim=2)
# [b, sq, ng, np/ng * hn] -> [b, sq, np, hn]
value = value.reshape(value.size(0), -1, head_v_dim)