mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-21 23:12:07 +00:00
Fixing Qwen 2.5 VL (32B).
Reduce the config constraints, and use common ground between the 8B and 32B.
This commit is contained in:
parent
0b28aabb94
commit
33af4dcd6c
@ -323,20 +323,20 @@ impl Qwen2Vl {
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct Qwen2_5VlVisionConfig {
|
||||
pub(crate) depth: usize,
|
||||
pub(crate) hidden_act: String,
|
||||
pub(crate) hidden_size: usize,
|
||||
pub(crate) intermediate_size: usize,
|
||||
pub(crate) num_heads: usize,
|
||||
pub(crate) in_chans: usize,
|
||||
pub(crate) out_hidden_size: usize,
|
||||
pub(crate) patch_size: usize,
|
||||
pub(crate) spatial_merge_size: usize,
|
||||
// pub(crate) depth: usize,
|
||||
// pub(crate) hidden_act: String,
|
||||
// pub(crate) hidden_size: usize,
|
||||
// pub(crate) intermediate_size: usize,
|
||||
// pub(crate) num_heads: usize,
|
||||
// pub(crate) in_chans: usize,
|
||||
// pub(crate) out_hidden_size: usize,
|
||||
// pub(crate) patch_size: usize,
|
||||
// pub(crate) spatial_merge_size: usize,
|
||||
pub(crate) spatial_patch_size: usize,
|
||||
pub(crate) window_size: usize,
|
||||
pub(crate) fullatt_block_indexes: Vec<usize>,
|
||||
pub(crate) tokens_per_second: usize,
|
||||
pub(crate) temporal_patch_size: usize,
|
||||
// pub(crate) window_size: usize,
|
||||
// pub(crate) fullatt_block_indexes: Vec<usize>,
|
||||
// pub(crate) tokens_per_second: usize,
|
||||
// pub(crate) temporal_patch_size: usize,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
@ -348,7 +348,7 @@ pub struct Qwen2_5Vl {
|
||||
impl Qwen2_5Vl {
|
||||
pub fn get_number_of_features(&self, height: usize, width: usize) -> usize {
|
||||
let num_pixels = height * width;
|
||||
num_pixels / self.vision_config.patch_size.pow(2)
|
||||
num_pixels / self.vision_config.spatial_patch_size.pow(2)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user