Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, model):
super().__init__()
self.model = model
self.config = self.model.language_model.config
self.language_model = self.model.language_model

def forward(self, input_ids, vit_embeds, position_ids, past_key_values):
# TODO: Check if Hardcoding this is okay, i.e. check if this value is common for all intern models
Expand Down
2 changes: 2 additions & 0 deletions QEfficient/transformers/models/llava/modeling_llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class QEFFLlavaEncoderWrapper(nn.Module):
def __init__(self, model):
super().__init__()
self.model = model
self.model.vision_model = self.model.vision_tower

def forward(self, pixel_values):
# Image features
Expand All @@ -47,6 +48,7 @@ def __init__(self, model):
super().__init__()
self.model = model
self.config = self.model.config
self.language_model = self.model.language_model

def forward(self, input_ids, image_features, position_ids, past_key_values):
inputs_embeds = self.model.get_input_embeddings()(input_ids)
Expand Down
Loading