Image-Text-to-Text
Transformers
Safetensors
lfm3_vl
webbrain
liquid
lfm3
lfm3-vl
browser-agent
decision-model
webbrain-vld
vldr
pegasus-method
custom_code
conversational
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 AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("webbrain-one/lfm3-vld-2b", trust_remote_code=True, device_map="auto") - 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
|
Download README.md from webbrain-one/lfm3-vld-2b: direct link, hf CLI and curl.
- Browser
- Download file 3.51 kB
-
https://huggingface.co/webbrain-one/lfm3-vld-2b/resolve/main/README.md
- Command line
-
hf download hf://webbrain-one/lfm3-vld-2b/README.md
-
curl -L -o README.md https://huggingface.co/webbrain-one/lfm3-vld-2b/resolve/main/README.md
3.51 kB
| license: other | |
| license_name: lfm1.0 | |
| base_model: LiquidAI/d1-2B | |
| pipeline_tag: image-text-to-text | |
| library_name: transformers | |
| tags: | |
| - webbrain | |
| - liquid | |
| - lfm3 | |
| - lfm3-vl | |
| - browser-agent | |
| - decision-model | |
| - webbrain-vld | |
| - vldr | |
| - pegasus-method | |
| - custom_code | |
| # 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: | |
| 1. **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). | |
| 2. **Restored Language Head**: The original uncorrupted generative language head (`lm_head.weight`) from `LiquidAI/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`](https://huggingface.co/webbrain-one/lfm3-vl-2b-vldr-gguf): GGUF quantizations (`BF16`, `Q8_0`, `Q4_K_M`, `mmproj-F16`) for `llama.cpp` (`/v1/chat/completions` + `/v1/systemone`). | |
| - [`webbrain-one/lfm3-vl-2b-vldr-onnx`](https://huggingface.co/webbrain-one/lfm3-vl-2b-vldr-onnx): WebGPU-ready ONNX bundle (`decoder_q8f16`, `decoder_q4f16`, `vision_encoder_fp16`, and decision probe JS runtime). | |
| ## Quickstart | |
| ```python | |
| 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. | |
| ``` | |