A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 08:15 UTC
[Bugfix] Gpt-j-6B patch kv_scale to k_scale path (#10063)
Signed-off-by: Alex Rakowski <alex.rakowski@amd.com> Signed-off-by: Alex Rakowski <182798202+arakowsk-amd@users.noreply.github.com>
arakowsk-amd committed
Nov 5, 2024 at 21:10 UTC
ea928f608c44b825d28609460e0d375a5f877940
1 file changed
+5
-1
vllm/model_executor/models/gpt_j.py
+5
-1
@@ -36,7 +36,8 @@ from vllm.model_executor.layers.rotary_embedding import get_rope
36
from vllm.model_executor.layers.sampler import Sampler, SamplerOutput
37
from vllm.model_executor.layers.vocab_parallel_embedding import (
38
ParallelLMHead, VocabParallelEmbedding)
39
-from vllm.model_executor.model_loader.weight_utils import default_weight_loader
39
+from vllm.model_executor.model_loader.weight_utils import (
40
+ default_weight_loader, maybe_remap_kv_scale_name)
41
from vllm.model_executor.sampling_metadata import SamplingMetadata
42
from vllm.sequence import IntermediateTensors
43
@@ -308,6 +309,9 @@ class GPTJForCausalLM(nn.Module, SupportsPP):
309
weight_loader(param, loaded_weight, shard_id)
310
break
311
else:
312
+ name = maybe_remap_kv_scale_name(name, params_dict)
313
+ if name is None:
314
+ continue
315
# Skip loading extra bias for GPTQ models.
316
if name.endswith(".bias") and name not in params_dict:
317
continue