Skip to content

Commit 5861da1

Browse files
authored
Fixing Qwen 2.5 VL (32B). (#3157)
Reduce the config constraints, and use common ground between the 8B and 32B.
1 parent 0b28aab commit 5861da1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

router/src/config.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,20 @@ impl Qwen2Vl {
323323
#[derive(Clone, Debug, Serialize, Deserialize)]
324324
#[serde(rename_all = "snake_case")]
325325
pub struct Qwen2_5VlVisionConfig {
326-
pub(crate) depth: usize,
327-
pub(crate) hidden_act: String,
328-
pub(crate) hidden_size: usize,
329-
pub(crate) intermediate_size: usize,
330-
pub(crate) num_heads: usize,
331-
pub(crate) in_chans: usize,
332-
pub(crate) out_hidden_size: usize,
333-
pub(crate) patch_size: usize,
334-
pub(crate) spatial_merge_size: usize,
326+
// pub(crate) depth: usize,
327+
// pub(crate) hidden_act: String,
328+
// pub(crate) hidden_size: usize,
329+
// pub(crate) intermediate_size: usize,
330+
// pub(crate) num_heads: usize,
331+
// pub(crate) in_chans: usize,
332+
// pub(crate) out_hidden_size: usize,
333+
// pub(crate) patch_size: usize,
334+
// pub(crate) spatial_merge_size: usize,
335335
pub(crate) spatial_patch_size: usize,
336-
pub(crate) window_size: usize,
337-
pub(crate) fullatt_block_indexes: Vec<usize>,
338-
pub(crate) tokens_per_second: usize,
339-
pub(crate) temporal_patch_size: usize,
336+
// pub(crate) window_size: usize,
337+
// pub(crate) fullatt_block_indexes: Vec<usize>,
338+
// pub(crate) tokens_per_second: usize,
339+
// pub(crate) temporal_patch_size: usize,
340340
}
341341

342342
#[derive(Clone, Debug, Serialize, Deserialize)]
@@ -348,7 +348,7 @@ pub struct Qwen2_5Vl {
348348
impl Qwen2_5Vl {
349349
pub fn get_number_of_features(&self, height: usize, width: usize) -> usize {
350350
let num_pixels = height * width;
351-
num_pixels / self.vision_config.patch_size.pow(2)
351+
num_pixels / self.vision_config.spatial_patch_size.pow(2)
352352
}
353353
}
354354

0 commit comments

Comments
 (0)