From b447f7e821ad246fe19a3116d675510e7debcd7d Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 11 Mar 2025 11:00:41 +0100 Subject: [PATCH] Fix qwen vl (#3096) * Fixing qwen2.5 VL. * Fixing the CI. --- Cargo.lock | 2 +- .../models/custom_modeling/qwen2_5_vl.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ca921c8ef..9b036e696 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4754,7 +4754,7 @@ dependencies = [ "async-trait", "bindgen 0.71.1", "clap 4.5.30", - "hf-hub 0.3.2", + "hf-hub 0.4.2", "num_cpus", "pkg-config", "text-generation-router", diff --git a/server/text_generation_server/models/custom_modeling/qwen2_5_vl.py b/server/text_generation_server/models/custom_modeling/qwen2_5_vl.py index 0ee3a8d97..e317c5b56 100644 --- a/server/text_generation_server/models/custom_modeling/qwen2_5_vl.py +++ b/server/text_generation_server/models/custom_modeling/qwen2_5_vl.py @@ -313,7 +313,6 @@ class Qwen2_5_VLVisionConfig(PretrainedConfig): class Qwen2_5_VLConfig(PretrainedConfig): - def __init__( self, vocab_size=152064, @@ -702,7 +701,6 @@ class Qwen2_5VisionModel(nn.Module): pixel_values: torch.Tensor, grid_thw: Optional[torch.LongTensor] = None, ) -> torch.Tensor: - # reshape the input tensor for processing shape = ( -1, @@ -967,6 +965,7 @@ class Qwen2_5VLForConditionalGeneration(nn.Module): max_s=max_s, true_max_s=max_s, prefill_cache_indices=prefill_cache_indices, + adapter_data=adapter_data, ) if lm_head_indices is not None: hidden_states = hidden_states[lm_head_indices]