update paligemma

This commit is contained in:
Mohit Sharma 2025-04-28 13:02:40 +00:00
parent 534a16d50c
commit 61ccbf6bbd
2 changed files with 1 additions and 5 deletions

View File

@ -77,9 +77,7 @@ class PaliGemmaForConditionalGeneration(nn.Module):
image_outputs.last_hidden_state image_outputs.last_hidden_state
) )
image_features = self.multi_modal_projector(last_hidden_state) image_features = self.multi_modal_projector(last_hidden_state)
image_features = image_features.view( image_features = image_features.view(-1, image_features.shape[-1])
image_features.shape[0], image_features.shape[1], -1
)
return image_features return image_features
def get_inputs_embeds( def get_inputs_embeds(

View File

@ -1064,8 +1064,6 @@ class VlmCausalLM(FlashCausalLM):
) )
if batch.prefill_cache_indices is not None: if batch.prefill_cache_indices is not None:
batch.prefill_cache_indices = None batch.prefill_cache_indices = None
if batch.pixel_values is not None:
batch.pixel_values = None
batch.free_encoder_cache() batch.free_encoder_cache()
return logits, speculative_logits return logits, speculative_logits