From b9438904842b729f622f286447fc22c94bd2735f Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Tue, 28 Nov 2023 11:22:44 -0800 Subject: [PATCH] Fix OPT param names (#1819) --- vllm/model_executor/models/opt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/model_executor/models/opt.py b/vllm/model_executor/models/opt.py index 8d88ccd7..2bbcd003 100644 --- a/vllm/model_executor/models/opt.py +++ b/vllm/model_executor/models/opt.py @@ -331,6 +331,9 @@ class OPTForCausalLM(nn.Module): model_name_or_path, cache_dir, load_format, revision): if "lm_head.weight" in name: continue + if name.startswith("decoder."): + name = "model." + name + for (param_name, weight_name, shard_id) in stacked_params_mapping: if weight_name not in name: continue