Image-Text-to-Text
Transformers
Safetensors
lfm3_vl
feature-extraction
liquid
lfm3
edge
decision
classification
extraction
calibration
system-one
multimodal
decision-model
custom_code
conversational
Eval Results
Instructions to use LiquidAI/d1-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/d1-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LiquidAI/d1-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 AutoModel model = AutoModel.from_pretrained("LiquidAI/d1-2B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LiquidAI/d1-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/d1-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": "LiquidAI/d1-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/LiquidAI/d1-2B
- SGLang
How to use LiquidAI/d1-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 "LiquidAI/d1-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": "LiquidAI/d1-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 "LiquidAI/d1-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": "LiquidAI/d1-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 LiquidAI/d1-2B with Docker Model Runner:
docker model run hf.co/LiquidAI/d1-2B
Commit History
Yesterday
-
Add evaluation results
Verified signature# Add evaluation results for LiquidAI/d1-2B ## Summary This PR adds the benchmark results published on the model card for `LiquidAI/d1-2B` to `.eval_results/`, following the [Hugging Face Hub evaluation-results specification](https://huggingface.co/docs/hub/eval-results). ## Benchmarks Added - [Decision Index (public suite)](https://huggingface.co/datasets/multimodalart/decision-index-leaderboard?eval_result=LiquidAI/d1-2B&leaderboard_task_id=public) — 51.1 ## Benchmarks Skipped (Not Registered on Hub) These benchmarks are on the model card but have no registered `eval.yaml` on the Hub: - DecisionBench (Hanno Labs) v1, Decision Bench (decisionbench.ai) v4, Fast Decisions, JevBench, ImajevBench, WorkflowEvals, Liquid's internal board - The image benchmarks (AI2D, BLINK, MMBench, MME, ...) They can be added once their authors register an `eval.yaml` on the Hub. ## Mapping notes - Typed Decisions (61.3): the card's metric and scale are unclear (the Hub task is accuracy on a 0-1 …8c92cf1 -
Declare base_model: LiquidAI/LFM3-VL-2B (#1)
- Declare base_model: LiquidAI/LFM3-VL-2B (6e07c904a6ab0e59c5ef49a7c557f8e4ab113db8) Co-authored-by: Richard Suarez <richie-liquid@users.noreply.huggingface.co>cfe5760
2 days ago
-
d1-2B
Co-authored-by: mlabonne <mlabonne@users.noreply.huggingface.co> Co-authored-by: Aurelien-Lac <Aurelien-Lac@users.noreply.huggingface.co>97c5704