From 2d7ab9e5bb74dbeb02a9a047040e945ee24546cf Mon Sep 17 00:00:00 2001 From: Divakar Verma <137818590+divakar-amd@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:42:07 -0500 Subject: [PATCH] fix dbrx weight loader (#212) Co-authored-by: Charlie Fu --- vllm/model_executor/models/dbrx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/model_executor/models/dbrx.py b/vllm/model_executor/models/dbrx.py index 4fbf0c3270fab..a2ce325fd7999 100644 --- a/vllm/model_executor/models/dbrx.py +++ b/vllm/model_executor/models/dbrx.py @@ -392,7 +392,7 @@ def sample( def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]): expert_params_mapping = [( - "w13_weight" if weight_name in ["w1", "v1"] else "w2_weight", + "w13_" if weight_name in ["w1", "v1"] else "w2_", f"mlp.{weight_name}.", ) for weight_name in ["w1", "v1", "w2"]] params_dict = dict(self.named_parameters(remove_duplicate=False))