mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-09 11:24:53 +00:00
update paligemma
This commit is contained in:
parent
534a16d50c
commit
61ccbf6bbd
@ -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(
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user