pub struct VisionConfig {Show 23 fields
pub depth: usize,
pub hidden_size: usize,
pub num_heads: usize,
pub patch_size: usize,
pub temporal_patch_size: usize,
pub spatial_merge_size: usize,
pub intermediate_size: usize,
pub out_hidden_size: usize,
pub deepstack_visual_indexes: Vec<usize>,
pub image_pad_token_id: u32,
pub video_pad_token_id: u32,
pub max_pixels: Option<usize>,
pub hidden_act: String,
pub rms_norm_eps: f32,
pub attention_bias: bool,
pub projection_intermediate_size: usize,
pub swiglu_limit: f32,
pub rope_theta: f32,
pub image_mean: [f32; 3],
pub image_std: [f32; 3],
pub min_image_tokens: usize,
pub max_image_tokens: usize,
pub block_major_patches: bool,
}Expand description
2026-09-26: Vision tower configuration: parse_vision_config for the Qwen family, and the
GLM-5.3 parser, which also fills the fields the Qwen parser leaves at their defaults.
Fields§
§depth: usize§num_heads: usize§patch_size: usize§temporal_patch_size: usize§spatial_merge_size: usize§intermediate_size: usize§deepstack_visual_indexes: Vec<usize>§image_pad_token_id: u322026-09-26: The token that marks where vision embeddings are spliced into the text.
0 means undeclared: the engine then uses vision_encoder::IMAGE_PAD_TOKEN_ID, and the
chat tokenizer the id of <|image_pad|>.
video_pad_token_id: u322026-09-26: The video-frame counterpart of Self::image_pad_token_id, with the same
0 rule (VIDEO_PAD_TOKEN_ID, <|video_pad|>).
max_pixels: Option<usize>2026-09-26: The vision area bound in pixels. The parsers leave it None; serve_load
sets it from resolve_vision_max_pixels before the model is built, and the vision
loaders pass it to the encoder.
rms_norm_eps: f32§attention_bias: bool§projection_intermediate_size: usize§swiglu_limit: f32§rope_theta: f32§image_mean: [f32; 3]§image_std: [f32; 3]§min_image_tokens: usize§max_image_tokens: usize§block_major_patches: bool2026-09-26: Patch tokens in 2x2-block-major order rather than raster; the preprocessor
reads it (vision_preprocess). The GLM-5.3 parser sets it.
Implementations§
Source§impl VisionConfig
impl VisionConfig
pub fn merger_input_size(&self) -> usize
Trait Implementations§
Source§impl Clone for VisionConfig
impl Clone for VisionConfig
Source§fn clone(&self) -> VisionConfig
fn clone(&self) -> VisionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more