[BugFix]rm draft code for glm (#6810)

* rm draft code for glm

* fix baseline

* fix baseline 2
This commit is contained in:
fxyfxy777
2026-03-13 14:26:05 +08:00
committed by GitHub
parent 2b8a5b0d81
commit 8eb177147c
3 changed files with 9 additions and 20 deletions
@@ -20,9 +20,9 @@ def calculate_routing_ratio(expected_routing: paddle.Tensor, actual_routing: pad
if not paddle.all(paddle.equal(expected_routing[i], actual_routing[i])).item():
print(f"token index {i}:\n expected_routing:{expected_routing[i]}\n actual_routing: {actual_routing[i]}\n")
# assert (
# expected_routing_length == actual_routing_length
# ), f"Routing real lengths do not match. Expected length {expected_routing_length} actual length {actual_routing_length}."
assert (
expected_routing_length == actual_routing_length
), f"Routing real lengths do not match. Expected length {expected_routing_length} actual length {actual_routing_length}."
total_rows, elements_per_row = expected_routing.shape
mask1 = paddle.any(expected_routing != -1, axis=1)
@@ -157,10 +157,10 @@ def check_routing_replay_chat_completion(openai_client, moe_layer_num: int, mode
model_path = os.getenv("MODEL_PATH")
if model_path:
baseline_path = os.path.join(
model_path, f"R3_BaseLine_dev_uint8_0311/routing_replay_output_baseline_{model_name}"
model_path, f"R3_BaseLine_dev_uint8_0312/routing_replay_output_baseline_{model_name}"
)
else:
baseline_path = f"./R3_BaseLine_dev_uint8_0311/routing_replay_output_baseline_{model_name}"
baseline_path = f"./R3_BaseLine_dev_uint8_0312/routing_replay_output_baseline_{model_name}"
stream_baseline_path = os.path.join(baseline_path, "r3_chat_completion_stream")
nonstream_baseline_path = os.path.join(baseline_path, "r3_chat_completion_nonstream")