Skip to content

Commit

Permalink
add prefix for vison_model
Browse files Browse the repository at this point in the history
Signed-off-by: B-201 <[email protected]>
  • Loading branch information
B-201 committed Nov 14, 2024
1 parent d08b5b3 commit 5be8afb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vllm/model_executor/models/idefics3.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def __init__(
output_size,
bias=False,
quant_config=quant_config,
prefix=f"{prefix}.proj",
prefix=maybe_prefix(prefix, "proj"),
)

def forward(self, x: torch.Tensor) -> torch.Tensor:
Expand All @@ -412,7 +412,7 @@ def __init__(
self.modality_projection = Idefics3SimpleMLP(
config,
quant_config,
prefix=f"{prefix}.modality_projection",
prefix=maybe_prefix(prefix, "modality_projection"),
)

def pixel_shuffle(self,
Expand Down Expand Up @@ -453,8 +453,10 @@ def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
self.config = config
self.padding_idx = self.config.text_config.pad_token_id
self.vocab_size = self.config.text_config.vocab_size
self.vision_model = Idefics3VisionTransformer(config.vision_config,
quant_config)
self.vision_model = Idefics3VisionTransformer(
config.vision_config,
quant_config=quant_config,
prefix=maybe_prefix(prefix, "vision_model"))
self.connector = Idefics3Connector(
config,
quant_config,
Expand Down

0 comments on commit 5be8afb

Please sign in to comment.