fix dummy-load deepseekv2 (#4535)

This commit is contained in:
inkcherry
2025-04-05 06:22:37 +08:00
committed by GitHub
parent 4c54f44202
commit 7ed77d6b9e
2 changed files with 87 additions and 73 deletions

View File

@@ -489,6 +489,14 @@ class DummyModelLoader(BaseModelLoader):
# NOTE(woosuk): For accurate performance evaluation, we assign
# random values to the weights.
initialize_dummy_weights(model)
# Model weight loading consists of two stages:
# 1. Initial weight loading.
# 2. Post-processing of weights, including assigning specific member variables.
# For `dummy_init`, only the second stage is required.
if hasattr(model, "post_load_weights"):
model.post_load_weights()
return model.eval()