From f01f70696057033659f0cff62e17389cccf49b5f Mon Sep 17 00:00:00 2001 From: Zilin Zhu Date: Thu, 6 Aug 2026 08:22:12 +0700 Subject: [PATCH] [RL] Skip rotary cache tensors in weight checker (#27692) --- 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 8d2c08838..4f828d355 100644 --- a/python/sglang/srt/utils/weight_checker.py +++ b/python/sglang/srt/utils/weight_checker.py @@ -194,6 +194,9 @@ def _check_tensors( actual_should_compare, actual_comparable, ) 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 ( should_compare == actual_should_compare