Inference Compute-Optimal Video Vision Language Models

Peiqi Wang, ShengYun Peng, Xuewen Zhang, Hanchao Yu, Yibo Yang, Lifu Huang, Fujun Liu, Qifan Wang

TL;DR

This paper investigates how to optimally allocate a fixed inference compute budget for Video Vision Language Models (VLMs) across three key factors: language model size, number of frames, and visual tokens per frame. By conducting extensive training sweeps and fitting parametric models, the authors map out a "compute-optimal frontier," revealing that all three factors must be scaled jointly and that having more finetuning data actually shifts the optimal allocation toward smaller language models but richer visual inputs.

What Problem Does This Paper Address?

When deploying Video VLMs in the real world—for instance, processing millions of videos daily on platforms like TikTok—the one-time cost of training or finetuning is negligible compared to the ongoing, massive cost of inference. Therefore, optimizing models for inference compute is critical.

Before finetuning a VLM, researchers must lock in three architectural parameters:

  1. $x_N$: Language Model (LM) size (parameter count).
  2. $x_T$: Number of video frames processed.
  3. $x_V$: Number of visual tokens used to represent each frame.

Prior scaling law studies, such as Chinchilla, focus heavily on training compute. Recent studies on inference scaling often ignore the computational cost of the vision encoder or only look at one variable at a time. This paper asks: Given a fixed inference compute budget (FLOPs) and a specific amount of finetuning data, what is the optimal combination of ($x_N, x_T, x_V$) to maximize downstream task performance?

Methods

To find the optimal allocation, the authors treated this as a constrained discrete optimization problem:

  • Large-Scale Training Sweeps: They ran ~100k A100 hours of finetuning using two strategies. The "Star sweep" varied one factor at a time from a large, compute-intensive center point. The "IsoFLOP sweep" varied all factors while keeping the total inference FLOPs strictly constant (at 2, 5, 15, and 30 TFLOPs budgets).
  • Parametric Modeling: Because training runs are expensive, they fit an add-interact parametric function to the empirical data. This function models task error as an additive power-law with interaction terms between the scaling factors and the finetuning data size.
  • Bootstrap Aggregation (Bagging): To stabilize noisy parameter estimates, they used median bagging over 100 resampled datasets.
  • Optimization: Finally, they used the fitted model to mathematically solve for the compute-optimal frontier—the exact ($x_N, x_T, x_V$) combination that minimizes error for any given FLOP budget.

Datasets

  • Finetuning Data: A massive, custom ~2.2 million example video instruction tuning dataset compiled from 13 sources (including LLaVA-Hound, LLaVA-Video-178K, and VideoInstruct100K).
  • Evaluation: 8 diverse downstream video benchmarks evaluated via the LMMs-Eval framework, including VideoDetailedCaption, ActivityNet-QA, and Video-MME. GPT-4o-mini was used as the LLM judge for open-ended tasks.

Key Insights and Ideas

  • Compound Scaling is Mandatory: You cannot just scale up the LM size or the frame count in isolation. Doing so creates a bottleneck. To get the best performance out of a higher compute budget, $x_N$, $x_T$, and $x_V$ must be scaled jointly.
  • Vision Compute is Not Free: Many concurrent studies calculate VLM inference cost using only the LM's parameters. The authors show this is a mistake. For smaller LMs (e.g., 7B or less) or fewer tokens, the vision encoder can account for up to half of the total inference FLOPs.
  • Frames > Tokens per Frame: When allocating compute to the visual side, increasing the number of frames ($x_T$) generally yields larger performance gains than increasing the spatial resolution/tokens per frame ($x_V$).
  • More Data Shifts the Frontier: Counterintuitively, as the size of your finetuning dataset grows, the optimal compute allocation changes. The math shows you should spend less compute on the LM size and more on processing extra frames and visual tokens.
Contour plots illustrating how the optimal allocation of compute across LM size, frames, and tokens per frame changes as the amount of data ($n$) increases.
  • Task-Specific Frontiers: There is no universal "best" model. Long-video understanding tasks demand compute be spent on more frames, while fine-grained perception tasks demand more tokens per frame.

Key Results

  • The bagged add-interact model proved highly accurate at predicting average task performance, achieving an $R^2$ of 0.99 on training data and 0.92 when extrapolating to unseen IsoFLOP configurations.
  • The generated IsoFLOP curves clearly demonstrate the LM bottleneck: at a 30 TFLOP budget, a 7.5B parameter model vastly outperforms a 1B model. However, at lower compute budgets, a smaller model processing more frames is the winning strategy.
IsoFLOP curves across different LM sizes showing the trade-off between frames and tokens per frame for various compute budgets.
  • By calculating the "elasticity" of the optimal scaling factors relative to data size, the authors quantitatively proved that optimal LM size has a negative elasticity (it shrinks as data grows), while frame and token counts have positive elasticity (they grow).

Limitations and Future Work

  • Theoretical FLOPs vs. Real-World Wall Clock: The study relies on theoretical FLOPs to measure compute. In reality, inference is split into prefilling (compute-bound) and decoding (memory-bandwidth bound). Hardware utilization and techniques like quantization or speculative decoding aren't accounted for here.
  • Fixed Vision Encoder Size: The authors used a fixed SoViT-400m/14 vision model. Future work should explore jointly scaling the size of the vision model alongside the LM.
  • Limited LM Range: Due to compute constraints, the experiments only explored Llama-3.2 models at 1B, 3B, and 8B sizes. It remains to be seen if these exact parametric curves extrapolate perfectly to massive models (e.g., 70B+ parameters).

Summary updated

BibTeX
@inproceedings{wang2025inference,
  author = {Peiqi Wang and ShengYun Peng and Xuewen Zhang and Hanchao Yu and Yibo Yang and Lifu Huang and Fujun Liu and Qifan Wang},
  title = {{Inference Compute-Optimal Video Vision Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure