Instructions to use ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1") model = AutoModelForMultimodalLM.from_pretrained("ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1", "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/ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1
- SGLang
How to use ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1 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 "ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1" \ --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": "ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1", "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 "ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1" \ --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": "ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1", "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 ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1 with Docker Model Runner:
docker model run hf.co/ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1
vlatents-qwen25vl7b-stage3-baseline-v1
One-line identity: Stage 2 reproduction of Monet-style visual-CoT training on Qwen/Qwen2.5-VL-7B-Instruct. Initialised from a Stage 1 SFT base; trained on the ohjoonhee/visual-cot-50k-poc dataset.
Recipe
- Stage: 2 (post-SFT, alignment + emphasized-CE objective)
- Base model:
Qwen/Qwen2.5-VL-7B-Instruct - Init checkpoint:
/data/joonhee/visual-latents/cluster_phase3/stage1_sft/checkpoint - Dataset:
ohjoonhee/visual-cot-50k-poc(Monet-SFT-125K Visual_CoT subset, eval-200 excluded) - Hardware: 4× H100 80GB, DeepSpeed ZeRO-2 + CPU optim offload, bf16
latent_size: 8alignment_weight: 2.0ce_emphasize_factor: 4.0alignment_layer: all_layersuse_attn_mask_4d: Truelr: 1e-05weight_decay: 0.01warmup_steps: 100max_steps: 2000grad_accum_steps: 32max_pixels: 1568000
Fidelity to the Monet paper
- Latent-only backprop — paper-faithful (Job C).
emphasize_latent_weightuses a verbatim port of upstreamcompute_latents_only_loss: the alignment loss is computed in the CE forward (wherece_patch_vecis spliced intoinputs_embeds) and backpropped ONLY through the latent embeddings, i.e.total = emphasize_latent_weight * compute_latents_only_loss(ce_patch_vec, alignment_weight*align) + ce(mirrors upstreamsrc/trainer.py:152-224). The earlier plain-scalar-add approximation (see the*-repro-v1repo) is NOT used here. attention_mask_4dis hand-rolled inmask_utils.build_monet_4d_attnwithlatent_cross_isolate=True. Verified equivalent on tested cases (seephase1_5b_attn/MASK_VALIDATION.md) but not byte-identical to upstream.- Inline teacher forward (not offline-precomputed). Functionally equivalent if teacher checkpoint is the same; saves precompute storage.
This revision (step-1500)
Last logged training row: step=1800, ce_loss=1.0302, align_loss=0.0416, total_loss=1.1133, elapsed=85939s
Notes
Job D Stage 3 BASELINE (lambda_reg=0) step-1500. Walltime-killed at step 1800/2000. ce1.0 align0.04 vicreg=0. Pairwise-cos collapse signature pending internal probe.
Other revisions: see the revisions dropdown on this page.
How to load
from transformers import AutoModelForVision2Seq, AutoProcessor
m = AutoModelForVision2Seq.from_pretrained(
"ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1", revision="step-1500", torch_dtype="bfloat16")
p = AutoProcessor.from_pretrained("ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1", revision="step-1500")
Limitations
Research checkpoint, eval-only. Mid-training step (1500/2000). Not for production.
Card generated 2026-05-29 from training_log.jsonl + the run's training config.
- Downloads last month
- 5
Model tree for ohjoonhee/vlatents-qwen25vl7b-stage3-baseline-v1
Base model
Qwen/Qwen2.5-VL-7B-Instruct