From 301b671750ca9b0f84664df5e70c894767089b52 Mon Sep 17 00:00:00 2001 From: Zilin Zhu Date: Tue, 9 Jun 2026 11:17:52 +0000 Subject: [PATCH] Skip rotary cache tensors in weight checker --- python/sglang/srt/utils/weight_checker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sglang/srt/utils/weight_checker.py b/python/sglang/srt/utils/weight_checker.py index 8e6459a37bad..db6088510ba1 100644 --- a/python/sglang/srt/utils/weight_checker.py +++ b/python/sglang/srt/utils/weight_checker.py @@ -176,6 +176,9 @@ def _check_tensors( actual_should_compare, actual, ) in zip(expect_tensors, actual_tensors, strict=True): + if ".cos_sin_cache" in expect_name: + # skip cos/sin cache which is deterministic from shape and dtype and may have different shapes due to different implementations. + continue assert expect_name == actual_name, f"{expect_name=} {actual_name=}" assert ( expect_should_compare == actual_should_compare