Instructions to use simaai/LFM2-VL-450M-Autoround-Safetensors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use simaai/LFM2-VL-450M-Autoround-Safetensors with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="simaai/LFM2-VL-450M-Autoround-Safetensors") 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("simaai/LFM2-VL-450M-Autoround-Safetensors") model = AutoModelForMultimodalLM.from_pretrained("simaai/LFM2-VL-450M-Autoround-Safetensors", 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 simaai/LFM2-VL-450M-Autoround-Safetensors with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "simaai/LFM2-VL-450M-Autoround-Safetensors" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "simaai/LFM2-VL-450M-Autoround-Safetensors", "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/simaai/LFM2-VL-450M-Autoround-Safetensors
- SGLang
How to use simaai/LFM2-VL-450M-Autoround-Safetensors 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 "simaai/LFM2-VL-450M-Autoround-Safetensors" \ --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": "simaai/LFM2-VL-450M-Autoround-Safetensors", "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 "simaai/LFM2-VL-450M-Autoround-Safetensors" \ --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": "simaai/LFM2-VL-450M-Autoround-Safetensors", "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 simaai/LFM2-VL-450M-Autoround-Safetensors with Docker Model Runner:
docker model run hf.co/simaai/LFM2-VL-450M-Autoround-Safetensors
LFM2-VL-450M Autoround
This is a post-training quantized version of
LiquidAI/LFM2-VL-450M,
prepared as a Hugging Face checkpoint for LLiMa compilation and Sima.ai
deployment. The source model's license and use restrictions continue to apply.
Source revision: Not captured; pin an immutable upstream revision before release.
Quantization
| Component | Method | Weight format | Details |
|---|---|---|---|
| Decoder Linear layers | AutoRound | symmetric INT4, G256 | 92 targets; 200 iterations; batch size 1 |
lm_head |
GPTQ | symmetric INT4, G256 | 1 target; static act-order; block size 128; dampening 0.01 |
| Vision encoder Linear layers | GPTQ | symmetric INT8, per-channel | 73 targets; static act-order |
| Mixed-precision exceptions | — | BF16 | 2 multimodal-projector Linear layers |
Decoder calibration used NeelNanda/pile-10k (revision not captured), 512
samples of 1,024 tokens, seed 42. Head and vision calibration used
lmms-lab/flickr30k (revision not captured), test[:512], 512 deterministic
image-text samples, sequence length 2,048, and batch size 1. Exact targets are
listed in recipe.yaml.
Evaluation
Full MMStar used all 1,500 examples, VLMEvalKit commit
7055d3010c38ccb5dcae1bc9535ca19c7fe5d79f, deterministic generation, and
local exact matching on 2026-07-17.
| Checkpoint | Overall accuracy | Status |
|---|---|---|
| Source | 40.8667% | Full MMStar |
| This quantized checkpoint | 39.1333% | Full MMStar |
| Absolute change | -1.7333 percentage points | Higher is better |
| Relative change | -4.2414% | Relative to source |
Reproduction
python quantize.py \
--model-path /project/mlasw/share/huggingface/models--LiquidAI--LFM2-VL-450M \
--output-dir /path/to/LFM2-VL-450M-Autoround-Safetensors
The directory includes quantize.py, recipe.yaml, and versions.txt.
Environment
Exact Python, CUDA, Torch, Transformers, llmcompressor, AutoRound, and
compressed-tensors versions are recorded in versions.txt.
Deployment
This is the pre-LLiMa checkpoint. Compile it separately for Sima.ai hardware and keep compiler output separate. No upload is authorized for this VLM batch.
Limitations
Quantization quality varies by language, visual domain, prompt format, context length, and runtime. Validate the intended deployment workload independently.
- Downloads last month
- 25
Model tree for simaai/LFM2-VL-450M-Autoround-Safetensors
Base model
LiquidAI/LFM2-VL-450M