Skip to content

Commit

Permalink
Fix incorrect model initialization
Browse files Browse the repository at this point in the history
Signed-off-by: DarkLight1337 <[email protected]>
  • Loading branch information
DarkLight1337 committed Nov 14, 2024
1 parent e0853b6 commit 874ce62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 5 additions & 2 deletions vllm/model_executor/models/fuyu.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
from vllm.utils import is_list_of

from .interfaces import SupportsMultiModal, SupportsPP
from .utils import AutoWeightsLoader, flatten_bn, merge_multimodal_embeddings
from .utils import (AutoWeightsLoader, flatten_bn, maybe_prefix,
merge_multimodal_embeddings)

# Cannot find the following 2 numbers from hf config.
_IMAGE_TOKEN_ID = 71011
Expand Down Expand Up @@ -245,7 +246,9 @@ def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
gather_output=True,
)
self.language_model = PersimmonForCausalLM(
vllm_config.with_hf_config(config.text_config))
vllm_config=vllm_config.with_hf_config(config.text_config),
prefix=maybe_prefix(prefix, "language_model"),
)
self.make_empty_intermediate_tensors = (
self.language_model.make_empty_intermediate_tensors)

Expand Down
8 changes: 1 addition & 7 deletions vllm/model_executor/models/internlm2_ve.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,5 @@ class InternLM2VEForCausalLM(InternLM2ForCausalLM):
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__(vllm_config=vllm_config, prefix=prefix)

config = vllm_config.model_config.hf_config
cache_config = vllm_config.cache_config
quant_config = vllm_config.quant_config

self.model = InternLM2VEModel(config,
cache_config,
quant_config,
self.model = InternLM2VEModel(vllm_config=vllm_config,
prefix=maybe_prefix(prefix, "model"))

0 comments on commit 874ce62

Please sign in to comment.