Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhaoyu6
sglang
Commits
e47800e1
"vscode:/vscode.git/clone" did not exist on "61034d534c1dff58a66bf7e2a9be8c173648a483"
Unverified
Commit
e47800e1
authored
Aug 16, 2025
by
Stefan He
Committed by
GitHub
Aug 16, 2025
Browse files
Quick Fix GLM (#9264)
parent
bb10e3a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
python/sglang/srt/models/glm4_moe.py
python/sglang/srt/models/glm4_moe.py
+5
-0
test/srt/test_nightly_gsm8k_eval.py
test/srt/test_nightly_gsm8k_eval.py
+1
-1
No files found.
python/sglang/srt/models/glm4_moe.py
View file @
e47800e1
...
...
@@ -24,6 +24,7 @@ from transformers import PretrainedConfig
from
sglang.srt.distributed
import
(
get_moe_expert_parallel_world_size
,
get_pp_group
,
get_tensor_model_parallel_rank
,
get_tensor_model_parallel_world_size
,
parallel_state
,
...
...
@@ -719,6 +720,9 @@ class Glm4MoeModel(DeepseekV2Model):
for
layer_id
in
range
(
config
.
num_hidden_layers
)
]
)
self
.
pp_group
=
get_pp_group
()
self
.
start_layer
=
0
self
.
end_layer
=
config
.
num_hidden_layers
self
.
norm
=
RMSNorm
(
config
.
hidden_size
,
eps
=
config
.
rms_norm_eps
)
...
...
@@ -735,6 +739,7 @@ class Glm4MoeForCausalLM(DeepseekV2ForCausalLM):
self
.
config
=
config
self
.
tp_size
=
get_tensor_model_parallel_world_size
()
self
.
quant_config
=
quant_config
self
.
pp_group
=
get_pp_group
()
self
.
determine_num_fused_shared_experts
(
"Glm4MoeForCausalLM"
)
self
.
model
=
Glm4MoeModel
(
config
,
quant_config
,
prefix
=
add_prefix
(
"model"
,
prefix
)
...
...
test/srt/test_nightly_gsm8k_eval.py
View file @
e47800e1
...
...
@@ -30,7 +30,7 @@ MODEL_SCORE_THRESHOLDS = {
"neuralmagic/Meta-Llama-3.1-8B-Instruct-FP8"
:
0.83
,
"neuralmagic/Mistral-7B-Instruct-v0.3-FP8"
:
0.54
,
"neuralmagic/DeepSeek-Coder-V2-Lite-Instruct-FP8"
:
0.84
,
"zai-org/GLM-4.5-Air-FP8"
:
0.
94
,
"zai-org/GLM-4.5-Air-FP8"
:
0.
78
,
# The threshold of neuralmagic/gemma-2-2b-it-FP8 should be 0.6, but this model has some accuracy regression.
# The fix is tracked at https://github.com/sgl-project/sglang/issues/4324, we set it to 0.50, for now, to make CI green.
"neuralmagic/gemma-2-2b-it-FP8"
:
0.50
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment