Skip to main content

siglip_text_config

Function siglip_text_config 

Source
pub fn siglip_text_config(v: &Value) -> Result<EncoderConfig>
Expand description

Build the SigLIP TEXT-tower config from the joint config.json (HF SiglipConfig defaults apply when the sub-config omits keys — verified against google/siglip2-base-patch16-224). Text tower: learned positions (offset 0, no embedding-stage norm), biased pre-LN layers, final_layer_norm, last-token pooling followed by the head projection. NOTE the canonical SigLIP text tower attends WITHOUT a padding mask — the adapter pads to max_pos and the final (padded) position is the pooled token, exactly as trained.