Expand description
2026-09-26: The vision-token counts the geometry leg predicts, from an image’s size, the patch and merge sizes, and the serve’s declared area bound.
Owner: bench, vision. Invariants: none beyond the types.
Constants§
- ABS_
MAX_ DIM - 2026-09-26: The long-side ceiling applied with or without an area bound; a
copy of
ABS_MAX_DIMinmodel-layers/src/vision_preprocess.rs. It binds when an area bound admits a long side over 4096, such as a 64×8192 strip. - FALLBACK_
MAX_ DIM - 2026-09-26: The engine’s long-side clamp when no area bound is given; a copy
of
FALLBACK_MAX_DIMinmodel-layers/src/vision_preprocess.rs.
Functions§
- expected_
vision_ tokens - 2026-09-26: Merged vision tokens for a
w × himage at native size. - expected_
vision_ tokens_ bounded - 2026-09-26: Merged vision tokens for
w × hunder a declared area bound. - served_
size - 2026-09-26: The
(w, h)the server encodes for aw × hsource. - snap
- 2026-09-26: Snap a side to the grid as the engine’s
target_size_fordoes at scale 1:max(round(side / grid), 1) * grid.f32::roundrounds half away from zero, so 336 snaps to 352 at grid 32 (the_rounding_mode_is_pinned).