Instructions to use theblackcat102/Molmo2-4B-Pairwise-Judge-Direct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use theblackcat102/Molmo2-4B-Pairwise-Judge-Direct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="theblackcat102/Molmo2-4B-Pairwise-Judge-Direct", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("theblackcat102/Molmo2-4B-Pairwise-Judge-Direct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use theblackcat102/Molmo2-4B-Pairwise-Judge-Direct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/theblackcat102/Molmo2-4B-Pairwise-Judge-Direct
- SGLang
How to use theblackcat102/Molmo2-4B-Pairwise-Judge-Direct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use theblackcat102/Molmo2-4B-Pairwise-Judge-Direct with Docker Model Runner:
docker model run hf.co/theblackcat102/Molmo2-4B-Pairwise-Judge-Direct
Molmo2-4B Pairwise Judge (Direct, merged)
Standalone BF16 Molmo2-4B for pairwise judging of AI-generated videos.
Given a user's preference questionnaire, a generation prompt, and two
candidate videos, it emits exactly one token: 1, 2, or Tie.
Merged from LoRA vlm_preference_judge/outputs/molmo2_pairwise_judge/checkpoint-3450
(rank 16, alpha 32, dropout 0.05; targets att_proj, attn_out, ff_proj,
ff_out) into the local Molmo2-4B base. Direct-answer format (no rating CoT).
Loading
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "theblackcat102/Molmo2-4B-Pairwise-Judge-Direct"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.bfloat16,
device_map="auto",
)
Use the Molmo2 chat-template with type="video" content. Constrain or
post-process the answer to 1, 2, or Tie.
Prompt format
user: judge instructions + questionnaire + Generation task: t2v/i2v.
Prompt used to generate both videos: "..." + Video 1: + video +
Video 2: + video + Which video would this person prefer: 1, 2, or Tie? Answer with exactly one token.
assistant: 1 | 2 | Tie
- Downloads last month
- 30