Cleanup debug log for Ring model (#18793)

This commit is contained in:
Ke Bao
2026-02-13 18:36:20 +08:00
committed by GitHub
parent a9d59776cc
commit a0ebaa6498
2 changed files with 9 additions and 11 deletions

View File

@@ -102,7 +102,7 @@ def mamba2_state_dtype(config=None) -> Mamba2StateDType:
else:
ssm_dtype = dtype_map[env_ssm_dtype]
logger.info(f"Mamba2 state dtype: conv_dtype={conv_dtype}, ssm_dtype={ssm_dtype}")
logger.debug(f"Mamba2 state dtype: conv_dtype={conv_dtype}, ssm_dtype={ssm_dtype}")
return Mamba2StateDType(conv=conv_dtype, temporal=ssm_dtype)

View File

@@ -77,6 +77,7 @@ from sglang.srt.utils import (
is_sm100_supported,
make_layers,
)
from sglang.srt.utils.common import rank0_log
_is_hip = is_hip()
_is_cuda = is_cuda()
@@ -423,7 +424,7 @@ class BailingMoELinearAttention(nn.Module):
# minimax / seg_la / fla
# TODO support fla
self.linear_backend = getattr(config, "linear_backend", "seg_la")
logger.info(f"linear_backend in bailing_moe_linear: {self.linear_backend}")
logger.debug(f"linear_backend in bailing_moe_linear: {self.linear_backend}")
self.linear_scale = True if self.linear_backend == "minimax" else False
self.linear_rope = getattr(config, "linear_rope", True)
if hasattr(config, "use_linear_silu"):
@@ -740,7 +741,7 @@ class BailingMoELinearDecoderLayer(nn.Module):
alt_stream=alt_stream,
)
else:
logger.info(f"==={layer_id=} use gqa")
logger.debug(f"layer {layer_id} use gqa")
self.attention = BailingMoEAttention(
config,
quant_config=quant_config,
@@ -895,8 +896,10 @@ class BailingMoELinearModel(nn.Module):
0 if is_linear_layer(i, self.layer_group_size) else 1
for i in range(self.num_layers)
]
logger.info(
f"attention type of layers:{self.decoder_attention_types}, 0 is linear layer and 1 is softmax layer!"
num_linear = sum(1 for t in self.decoder_attention_types if t == 0)
num_full = sum(1 for t in self.decoder_attention_types if t == 1)
rank0_log(
f"Layer config: {num_linear} linear attention layers, {num_full} full attention layers"
)
assert (
@@ -931,11 +934,6 @@ class BailingMoELinearModel(nn.Module):
prefix=f"{prefix}.layers",
)
linear_layer_nums = sum(
1 for i in range(self.num_layers) if self.decoder_attention_types[i] == 0
)
logger.info(f"linear_layer_nums={linear_layer_nums}")
norm_kwargs = {}
if hasattr(config, "rms_norm_eps"):
norm_kwargs["eps"] = config.rms_norm_eps
@@ -1082,7 +1080,7 @@ class BailingMoELinearForCausalLM(nn.Module):
and layer_id >= self.model.start_layer
):
layer_ids.add(layer_id)
logger.info(f"=====layer_ids {layer_ids}")
logger.debug(f"weight loading layer_ids: {layer_ids}")
for layer_id in layer_ids:
self_attn = (