Image-Text-to-Text
Transformers
Safetensors
lfm2_vl
liquid
lfm2.5
edge
decision
classification
calibration
system-one
multimodal
decision-model
conversational
custom_code
Eval Results
Instructions to use LiquidAI/d1-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/d1-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LiquidAI/d1-3B", 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("LiquidAI/d1-3B", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("LiquidAI/d1-3B", 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 LiquidAI/d1-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/d1-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LiquidAI/d1-3B", "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/LiquidAI/d1-3B
- SGLang
How to use LiquidAI/d1-3B 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 "LiquidAI/d1-3B" \ --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": "LiquidAI/d1-3B", "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 "LiquidAI/d1-3B" \ --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": "LiquidAI/d1-3B", "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 LiquidAI/d1-3B with Docker Model Runner:
docker model run hf.co/LiquidAI/d1-3B
Commit ·
1ff39df
1
Parent(s): 60a46c3
Update README.md (#2)
Browse files- Update README.md (d74b5f7ad717c4f78cbdbfdc27c1e79b2afc493e)
Co-authored-by: Leonie Monigatti <iamleonie@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -3,6 +3,23 @@ library_name: transformers
|
|
| 3 |
license: other
|
| 4 |
license_name: lfm1.0
|
| 5 |
license_link: LICENSE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
pipeline_tag: image-text-to-text
|
| 7 |
base_model: LiquidAI/LFM2.5-VL-3B
|
| 8 |
tags:
|
|
@@ -25,14 +42,13 @@ tags:
|
|
| 25 |
<div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;">
|
| 26 |
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> •
|
| 27 |
<a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> •
|
| 28 |
-
<a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> •
|
| 29 |
<a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
|
| 30 |
</div>
|
| 31 |
</div>
|
| 32 |
|
| 33 |
# d1-3B
|
| 34 |
|
| 35 |
-
d1-3B is a 3B **decision model** built on [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B).
|
| 36 |
You give it a state (text, JSON, images, or a mix) and a set of named questions. It returns calibrated,
|
| 37 |
typed answers in **one forward pass with zero output tokens**: every answer is read directly from the
|
| 38 |
model's distribution over the options, with no generation and no parsing.
|
|
@@ -43,10 +59,13 @@ model's distribution over the options, with no generation and no parsing.
|
|
| 43 |
(LFM2.5-VL-3B: 73.9).
|
| 44 |
- **Fast**: 8 ms a decision on an NVIDIA RTX 4090, 9 ms on an AMD MI325X, 30 ms on an Apple M5 Pro.
|
| 45 |
|
| 46 |
-
<video src="https://huggingface.co/LiquidAI/d1-3b-RC/resolve/main/assets/d1-3b-smash.mp4" controls width="100%"></video>
|
| 47 |
-
|
| 48 |

|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
## 🗒️ Model Details
|
| 51 |
|
| 52 |
| Model | Parameters | Description |
|
|
@@ -54,6 +73,8 @@ model's distribution over the options, with no generation and no parsing.
|
|
| 54 |
| [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B) | 3.1B | General-purpose vision-language model (base) |
|
| 55 |
| **[d1-3B](https://huggingface.co/LiquidAI/d1-3b-RC)** | 3.1B | Post-trained for single-pass, calibrated decisions |
|
| 56 |
|
|
|
|
|
|
|
| 57 |
- **Total parameters**: 3.12B
|
| 58 |
- **LM backbone**: LFM2.5-2.6B, 30 layers (22 double-gated short convolution blocks + 8 GQA)
|
| 59 |
- **Vision encoder**: SigLIP2 NaFlex shape-optimized 400M
|
|
|
|
| 3 |
license: other
|
| 4 |
license_name: lfm1.0
|
| 5 |
license_link: LICENSE
|
| 6 |
+
language:
|
| 7 |
+
- ar
|
| 8 |
+
- zh
|
| 9 |
+
- en
|
| 10 |
+
- fr
|
| 11 |
+
- de
|
| 12 |
+
- hi
|
| 13 |
+
- id
|
| 14 |
+
- it
|
| 15 |
+
- ja
|
| 16 |
+
- ko
|
| 17 |
+
- pl
|
| 18 |
+
- pt
|
| 19 |
+
- ru
|
| 20 |
+
- es
|
| 21 |
+
- th
|
| 22 |
+
- vi
|
| 23 |
pipeline_tag: image-text-to-text
|
| 24 |
base_model: LiquidAI/LFM2.5-VL-3B
|
| 25 |
tags:
|
|
|
|
| 42 |
<div style="display: flex; justify-content: center; gap: 0.5em; margin-bottom: 1em;">
|
| 43 |
<a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> •
|
| 44 |
<a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> •
|
|
|
|
| 45 |
<a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a>
|
| 46 |
</div>
|
| 47 |
</div>
|
| 48 |
|
| 49 |
# d1-3B
|
| 50 |
|
| 51 |
+
d1-3B is a 3B parameter **decision model** built on [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B).
|
| 52 |
You give it a state (text, JSON, images, or a mix) and a set of named questions. It returns calibrated,
|
| 53 |
typed answers in **one forward pass with zero output tokens**: every answer is read directly from the
|
| 54 |
model's distribution over the options, with no generation and no parsing.
|
|
|
|
| 59 |
(LFM2.5-VL-3B: 73.9).
|
| 60 |
- **Fast**: 8 ms a decision on an NVIDIA RTX 4090, 9 ms on an AMD MI325X, 30 ms on an Apple M5 Pro.
|
| 61 |
|
|
|
|
|
|
|
| 62 |

|
| 63 |
|
| 64 |
+
> [!NOTE]
|
| 65 |
+
> 💻 **Demos**: Try d1-3B in a Hugging Face space without any setup:
|
| 66 |
+
> **TODO: add demo**
|
| 67 |
+
|
| 68 |
+
|
| 69 |
## 🗒️ Model Details
|
| 70 |
|
| 71 |
| Model | Parameters | Description |
|
|
|
|
| 73 |
| [LFM2.5-VL-3B](https://huggingface.co/LiquidAI/LFM2.5-VL-3B) | 3.1B | General-purpose vision-language model (base) |
|
| 74 |
| **[d1-3B](https://huggingface.co/LiquidAI/d1-3b-RC)** | 3.1B | Post-trained for single-pass, calibrated decisions |
|
| 75 |
|
| 76 |
+
d1-3B is a multimodal decision model with the following features:
|
| 77 |
+
|
| 78 |
- **Total parameters**: 3.12B
|
| 79 |
- **LM backbone**: LFM2.5-2.6B, 30 layers (22 double-gated short convolution blocks + 8 GQA)
|
| 80 |
- **Vision encoder**: SigLIP2 NaFlex shape-optimized 400M
|