Video-Text-to-Text
Transformers
Safetensors
English
qwen3_5
text-generation
video
multimodal
video-captioning
temporal-grounding
qwen
VLM
custom_code
Instructions to use NemoStation/Marlin-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NemoStation/Marlin-2B with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("NemoStation/Marlin-2B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("NemoStation/Marlin-2B", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Add multi_find: locate multiple occurrences of an event
#10
by widow-maker - opened
Add multi_find β locate multiple occurrences of an event
find() returns only the earliest occurrence of an event in a clip. This PR adds multi_find(), which walks the timeline to return up to max_events occurrences, left-to-right.
How it works
Repeatedly trims the video to the unsearched tail [cursor, end], runs find on that sub-clip (exact trained prompt, no divergence), remaps the clip-local span back to global time, then advances the cursor past it. Stops on exactly two conditions: max_events reached, or the cursor runs off the end of the video.
API
result = marlin.multi_find("video.mp4", event="a person enters the room", max_events=5)
result["spans"] # [(2.1, 4.8), (12.0, 14.3), ...] global timestamps, earliest-first
result["stopped"] # "max_events" | "end_of_video" | "no_span"
Notes
findalways emits some span, so there is no built-in "event absent" signal βmax_eventsis the caller-supplied upper bound. If the event occurs fewer thanmax_eventstimes, trailing spans may be spurious; setmax_eventsto a tight expected maximum.- Adds two helpers:
_video_duration(torchcodec) and_clip_segment(frame-accurate ffmpeg trim). Adds an ffmpeg runtime dependency. min_gap/min_segmentguards guarantee forward progress and drop degenerate spans.
Verified for syntax/structure (py_compile); not yet run against a real video on GPU.
widow-maker changed pull request status to merged