Optimize vision-language model inference by sparsifying the interactions between vision and language tokens instead of compressing images. Uses a dynamic policy to allocate visual computation per sample based on complexity, enabling a universal network across different compute budgets. Maintains high-resolution reasoning when needed. Use when deploying VLMs under varying compute constraints, need per-sample efficiency adaptation, or want to preserve fine visual details while reducing compute.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Optimize vision-language model inference by sparsifying the interactions between vision and language tokens instead of compressing images. Uses a dynamic policy to allocate visual computation per sample based on complexity, enabling a universal network across different compute budgets. Maintains high-resolution reasoning when needed. Use when deploying VLMs under varying compute constraints, need per-sample efficiency adaptation, or want to preserve fine visual details while reducing compute.
category
Scaling & Efficiency
Core Principle
Traditional efficiency approaches for Vision-Language Models (VLMs) compress visual input before it reaches the transformer: resize images, quantize patches, or apply aggressive pooling. This reduces compute uniformly but loses visual information that might be needed for complex reasoning.
VISOR inverts this approach: instead of compressing images uniformly, keep full resolution but sparsify the interactions between image and text tokens. Some visual patches interact intensely with language tokens (needed for reasoning), others interact minimally (background context). By dynamically selecting which visual computations to perform per-sample, VISOR adapts efficiency to actual task complexity.
Key insight: Not all visual information needs expensive attention operations. Local context can propagate through self-attention; global understanding requires cross-attention to language. Dynamically choose which visual patches participate in expensive cross-attention based on per-sample complexity signals.
Efficiency Architecture
Baseline (Dense VLM):
All image patches go through:
Full self-attention within vision patches (compute visual relationships)
Full cross-attention to language tokens (bind vision to language)
Transformer layers process all patches at all layers
Total: O(N_vision × N_language) complexity
Compute cost is fixed regardless of image complexity or task requirements.
VISOR (Sparse Interaction):
Some image patches skip expensive self-attention, rely on cached context
Dynamic policy selects which patches participate in cross-attention with language
General context comes through coarse cross-attention; fine details through selected patches
For each variant, train the model with different numbers of active self-attention layers
During inference, select the variant matching your compute budget
A lightweight policy network learns to map (image, budget) → activation pattern
Training Objective:
Minimize: (accuracy_loss + λ × computational_cost)
where λ varies across budget tiers:
Budget 1x: high λ (aggressive cost penalization)
Budget 8x: low λ (allow higher cost)
Result: One model adapts to any budget by learning to trade off accuracy and compute.
Per-Sample Dynamic Allocation
Instead of fixed allocation (all samples use same compute), VISOR allocates compute based on image complexity.
Complexity Signal: The policy network estimates sample difficulty from visual features:
High-frequency content (detailed, complex): needs more compute
Low-frequency content (simple, textured): needs less compute
Task difficulty: complex VQA requires more visual detail than yes/no questions
Allocation Mechanism:
For each sample:
1. Compute complexity score from image features
2. Policy: allocate_layers = f(complexity_score, budget_constraint)
3. Activate self-attention layers up to allocated_layers
4. Selected visual patches participate in cross-attention
Trade-off Control:
Adjust policy to control accuracy-efficiency frontier:
Conservative: allocate more compute to all samples (higher accuracy, higher cost)
The universal network parameters don't change; the policy layer makes the allocation decision.
Empirical Performance and Budget Trade-offs
Cross-Benchmark Results:
VISOR "drastically reduces computational cost while matching or exceeding state-of-the-art results" across diverse benchmarks.
Typical Performance Curves:
Compute Budget
Speedup
Accuracy vs Baseline
Use Case
1x (aggressive)
8-12x
92-95%
Edge devices, mobile
2x
4-6x
97-99%
Real-time inference
4x
2-3x
99-100%
Balanced (production typical)
8x (generous)
~1x
100%+
Offline, research
Strength on Detail-Heavy Tasks:
Tasks requiring fine visual understanding show VISOR's advantage:
Medical imaging: VISOR selectively allocates high compute to diagnostic regions
Document understanding: Complex documents get more compute, simple tables use minimal
Visual reasoning: Detailed scenes get more patches, sparse scenes get fewer
Limitation with Speed-Critical Tasks:
If average latency must be < 50ms, even sparse interaction may be insufficient. Trade-off becomes accuracy vs latency at that point.
Technical Components
Universal Network Architecture:
Base transformer with two types of attention:
General Cross-Attention Layers (always active):
All visual patches to all language tokens (coarse overview)
Lower cost because patches are pre-aggregated at coarse scale
Batch variance: Batched inference benefits less from per-sample adaptation (all samples must wait for slowest). Best for single-sample or small-batch inference.
Memory access patterns: GPU memory bandwidth may be bottleneck. Sparse computation doesn't always reduce memory I/O proportionally.
Use VISOR when building scalable VLM inference systems, need to adapt to variable compute budgets, or want to preserve visual detail while reducing average-case compute. Particularly valuable for production systems serving diverse workloads or hardware tiers.
When NOT to Use
Skip if your workload requires constant low latency (policy overhead matters), visual tasks don't benefit from fine details, or you need hard performance guarantees that per-sample adaptation complicates.