Skip to content

Document video frame rate and frame limit for LFM3-VL-2B and LFM3-Omni-2B - #161

Merged
iamleonie merged 3 commits into
mainfrom
lfm3-video-frame-settings
Nov 11, 2026
Merged

iamleonie merged 3 commits into
mainfrom
lfm3-video-frame-settings

Conversation

@iamleonie

Copy link
Copy Markdown
Contributor

Summary

  • Documents that video frame rate (fps) and frame limit are configurable for LFM3-VL-2B and LFM3-Omni-2B, and that users should set them according to their latency and quality requirements.
  • lfm/models/lfm3-vl-2b.mdx: adds a "Frame Rate and Frame Limit" subsection under "Video Input" with defaults (2 fps, 4–768 frames) and settings for Transformers, vLLM, SGLang, and llama.cpp.
  • lfm/models/lfm3-omni-2b.mdx: adds a "Video Frame Rate and Frame Limit" section at the end with defaults (2 fps, 4–384 frames) and settings for Transformers, SGLang, and llama.cpp. Notes that these settings don't affect the soundtrack.
  • Defaults and per-engine settings match the "Video frame rate and frame limit" sections of the LFM3-VL-2B and LFM3-Omni-2B model cards.
  • No changes for d1-2B / d1-Omni-2B: their model cards don't document frame settings yet.
 lfm/models/lfm3-vl-2b.mdx
   ## Video Input
+    ### Frame Rate and Frame Limit
 lfm/models/lfm3-omni-2b.mdx
+  ## Video Frame Rate and Frame Limit

🤖 Generated with Claude Code

@iamleonie
iamleonie requested a review from mlabonne as a code owner November 2, 2026 10:10
@mintlify

mintlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
liquid-docs 🟢 Ready View Preview Nov 10, 2026, 8:43 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

mlabonne
mlabonne previously approved these changes Nov 2, 2026
## Video Frame Rate and Frame Limit

By default, LFM3-Omni-2B samples video at 2 fps, with at least 4 and at most 384 frames per video. Both are configurable: each frame adds vision tokens, so a lower frame rate or frame limit uses less context and memory and lowers latency, while a higher one preserves more detail. Set them according to your latency and quality requirements. These settings do not change the soundtrack: the model always hears all of it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"soundtrack" -> "audio track"
Soundtrack brings movie music to mind.

Comment thread lfm/models/lfm3-vl-2b.mdx Outdated
- **Transformers:** set the frame rate per call with `processor.apply_chat_template(..., processor_kwargs={"fps": 1})`. Set the frame limit when you load the processor: `AutoProcessor.from_pretrained(model_id, trust_remote_code=True, max_frames=128)`.
- **vLLM:** set a server default in `--media-io-kwargs`, for example `'{"video": {"video_backend": "qwen3_vl", "fps": 1, "max_frames": 128}}'`. Override it per request with `extra_body={"media_io_kwargs": {"video": {"fps": 1, "max_frames": 128}}}`.
- **SGLang:** change `fps`, `min_frames`, and `max_frames` under `video_processor` in `processor_config.json` in a local copy of the checkpoint.
- **llama.cpp:** always uses 2 fps and 4 to 768 frames for this model. `--video-fps` has no effect.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would editing the model config file make this possible for llama.cpp?

@iamleonie
iamleonie merged commit 2b89e6e into main Nov 11, 2026
5 checks passed
@iamleonie
iamleonie deleted the lfm3-video-frame-settings branch November 11, 2026 08:20

This branch was successfully deployed

1 active deployment
staging — 41ebeb50 Deployed Nov 10, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants