Run this model with HF Jobs
Run webbrain-one/lfm3-vld-2b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/webbrain-one/lfm3-vld-2b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/webbrain-one/lfm3-vld-2b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/webbrain-one/lfm3-vld-2b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/webbrain-one/lfm3-vld-2b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use webbrain-one/lfm3-vld-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webbrain-one/lfm3-vld-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="webbrain-one/lfm3-vld-2b", 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("webbrain-one/lfm3-vld-2b", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("webbrain-one/lfm3-vld-2b", trust_remote_code=True, 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use webbrain-one/lfm3-vld-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webbrain-one/lfm3-vld-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webbrain-one/lfm3-vld-2b", "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/webbrain-one/lfm3-vld-2b
- SGLang
How to use webbrain-one/lfm3-vld-2b 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 "webbrain-one/lfm3-vld-2b" \ --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": "webbrain-one/lfm3-vld-2b", "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 "webbrain-one/lfm3-vld-2b" \ --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": "webbrain-one/lfm3-vld-2b", "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 webbrain-one/lfm3-vld-2b with Docker Model Runner:
docker model run hf.co/webbrain-one/lfm3-vld-2b
LFM3-VLD-2B
LFM3-VLD-2B (Restored Language Head) is a hybrid multimodal browser decision model built using the Pegasus method (inspired by AveLabs/Qwen3.8-27B-Perplexing-Pegasus).
It combines:
- Decision Backbone: The complete 24-layer hybrid architecture (Conv + GQA attention + Feed-Forward), vision tower, multimodal projector, and embeddings from
LiquidAI/d1-2B(trained on browser actions, verification, and decision trajectories). - Restored Language Head: The original uncorrupted generative language head (
lm_head.weight) fromLiquidAI/LFM3-VL-2B, untied from token embeddings (tie_word_embeddings: false).
The Problem Solved
When models like LiquidAI/d1-2B undergo full fine-tuning on decision tasks with tied word embeddings, the language head weights drift away from fluent language generation, causing token repetition and degraded prose in standard causal LM generation. By untying the embeddings and restoring the original LFM3-VL-2B language head onto the decision-trained backbone, LFM3-VL-2B-VLDR achieves:
- Flawless open-ended multimodal chat & text generation (no repetition artifacts).
- Preserved decision separability: Hidden states retain deep decision knowledge, reaching 91.27% accuracy with 0% false completions on the balanced browser decision benchmark.
Benchmark Results (d1 Balanced Decision Benchmark โ final_test, 126 Categorical Decisions)
| Model / Method | Accuracy | Completion Found | False Completions | Unknown Recognized |
|---|---|---|---|---|
| LFM3-VLD-2B (Decision Probe) | 115/126 (91.3%) | 24/24 (100%) | 0/48 (0%) | 24/24 (100%) |
LFM3-VLD-2B (verify Zero-Shot) |
85/126 (67.5%) | 22/24 (91.7%) | 0/48 (0%) | 0/24 (0%) |
| LFM3-VL-2B-VLD (LoRA Distillation) | 126/126 (100.0%) | 24/24 (100%) | 0/48 (0%) | 24/24 (100%) |
Base LiquidAI/LFM3-VL-2B (verify Zero-Shot) |
106/126 (84.1%) | 24/24 (100%) | 0/48 (0%) | 4/24 (16.7%) |
Companion Repositories
webbrain-one/lfm3-vl-2b-vldr-gguf: GGUF quantizations (BF16,Q8_0,Q4_K_M,mmproj-F16) forllama.cpp(/v1/chat/completions+/v1/systemone).webbrain-one/lfm3-vl-2b-vldr-onnx: WebGPU-ready ONNX bundle (decoder_q8f16,decoder_q4f16,vision_encoder_fp16, and decision probe JS runtime).
Quickstart
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "webbrain-one/lfm3-vl-2b-vldr"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
messages = [
{"role": "user", "content": "What is the capital of France?"}
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=text, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=64)
print(processor.decode(out[0], skip_special_tokens=True))
# The capital of France is Paris.
- Downloads last month
- 185