Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions python/sglang/srt/models/qwen3_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
is_non_idle_and_non_empty,
is_npu,
)
from sglang.srt.utils.hf_transformers_utils import get_rope_config

_is_cuda = is_cuda()

Expand Down Expand Up @@ -566,7 +567,7 @@ def forward_prepare_native(
def apply_qk_norm_rope(self, qkv, positions, forward_batch):
use_fused = self.use_fused_qk_norm_rope and qkv.dtype == torch.bfloat16
if use_fused:
theta = self.config.rope_parameters["rope_theta"]
theta = self.rope_theta
positions = (
positions.view(-1).to(dtype=torch.int32, device=qkv.device).contiguous()
)
Expand Down Expand Up @@ -691,8 +692,8 @@ def __init__(
super().__init__()
self.config = config
self.hidden_size = config.hidden_size
rope_theta = config.rope_parameters["rope_theta"]
rope_scaling = config.rope_parameters
rope_theta, rope_scaling = get_rope_config(config)
self.rope_theta = rope_theta
max_position_embeddings = getattr(config, "max_position_embeddings", 8192)
head_dim = getattr(
config, "head_dim", config.hidden_size // config.num_attention_heads
Expand Down
Loading