InternVL3 1B

Click a block to read its description, or select it with Tab and Enter.

InternVL3 1BDetect. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.LibreYOLOInternVL3 1BDetect. P = image patches; L = combined tokens (runtime axes). Model widths below are resolved.Image encoderImage processorNominal runner size 448; native tiling/resizeConv2d patch embeddingpatch=14; output P × 1024Learned absolute positions + CLSP × 1024; CLS adds one tokenVision transformer blocksn=24; width 1024; heads=16Drop CLS; restore spatial grid1024 patch positions per 448-square tileVV carries final visual features to the projector.Patch counts vary with processor output, not model size.Projection and multimodal sequenceVVisual projector1024 channels become 896 channelsVisual token sequencePatch grouping factor 2 per axisPrompt and image placeholdersVocabulary and detection requestTokenizerRuntime text lengthToken embeddingVocabulary 151674; width 896Replace image-token placeholdersL × 896; image and text in one sequenceSVisual features replace placeholders before language layers.Text and image masks preserve their positions.S denotes the multimodal token sequence.Language model and generated outputSText decoder layersn=24; width 896Final RMSNorm896 channelsLanguage head Linear896 to 151674Greedy token generationmax_new_tokens=1024; do_sample=FalseOO is the generated reply; prompt tokens are removed.The adapter decodes O into task geometry below.Vision transformer layerInputS × 1024LayerNorm1024 channelsVision attentionLayerScaleLearned per-channel multiplier+LayerNorm1024 channelsVision MLPLayerScale+OutputS × 1024S is the token count of this sublayer.Text decoder layerInputS × 896RMSNorm896 channelsCausal attention+RMSNorm896 channelsGated MLP+OutputS × 896S is the token count of this sublayer.Vision attentionInput width 1024; Q heads 16; K/V heads 16.Q Linear1024 to 1024Split heads64 per headK Linear1024 to 1024Split heads64 per headV Linear1024 to 1024Split heads64 per headQ × transpose(K)Scale by 1/sqrt(64)Softmax over keysWithin the image; padding maskAttention weights × V16 query heads, weighted valuesConcat headsOutput Linear1024 to 1024Position information enters through embeddings.Distinct projections share the same normalized input.Text attentionInput width 896; Q heads 14; K/V heads 2.Q Linear896 to 896Split heads64 per headK Linear896 to 128Split heads64 per headV Linear896 to 128Split heads64 per headRotary positioncos/sin half rotationRotary positioncos/sin half rotationAlign K heads2 to 14Align V heads2 to 14Q × transpose(K)Scale by 1/sqrt(64)Softmax over keysCausal mask; cached K/V optionalAttention weights × V14 query heads, weighted valuesConcat headsOutput Linear896 to 896RoPE: x*cos + rotate_half(x)*sin.Cached decode appends past K/V before head alignment.Vision MLPInputS × 1024Linear1024 to 4096geluDown Linear4096 to 1024OutputS × 1024Residual addition is in the enclosing layer diagram.S is the token count of this sublayer.Text MLPInputS × 896Gate Linear896 to 4864Up Linear896 to 4864SiLUElementwise multiplyS × 4864Down Linear4864 to 896OutputS × 896Residual addition is in the enclosing layer diagram.S is the token count of this sublayer.Visual projectorPixel shuffle / spatial grouping2 × 2; width 4096LayerNorm4096 channelsLinear4096 to 896GELULinear896 to 896Output width equals the language-model embedding.LibreYOLO output adapterODecode generated tokensRetain reply textParse JSON boxesFlatten nested boxesNormalize coordinatesDivide by 1000; xyxy cornersValidate / class / confidenceSynthetic per-box score1; clamp valid boxesSame-class deduplicationRounded boxes and IoU filter before max_detResults.boxesScale xyxy to original W,H; cap max_detScores are adapter placeholders, not calibrated confidence.Scope: native backend architecture from pinned config metadata; no pretrained execution. The image path is shown.Source: libreyolo/models/vlm/internvl3.py; Transformers 5.16.1. Revision a4d0ecc9e17f.libreyolo.com