Instructions to use Lucasgitguy-co/lfm3-vl-2b-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lucasgitguy-co/lfm3-vl-2b-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Lucasgitguy-co/lfm3-vl-2b-heretic", 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("Lucasgitguy-co/lfm3-vl-2b-heretic", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Lucasgitguy-co/lfm3-vl-2b-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lucasgitguy-co/lfm3-vl-2b-heretic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lucasgitguy-co/lfm3-vl-2b-heretic", "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/Lucasgitguy-co/lfm3-vl-2b-heretic
- SGLang
How to use Lucasgitguy-co/lfm3-vl-2b-heretic 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 "Lucasgitguy-co/lfm3-vl-2b-heretic" \ --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": "Lucasgitguy-co/lfm3-vl-2b-heretic", "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 "Lucasgitguy-co/lfm3-vl-2b-heretic" \ --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": "Lucasgitguy-co/lfm3-vl-2b-heretic", "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 Lucasgitguy-co/lfm3-vl-2b-heretic with Docker Model Runner:
docker model run hf.co/Lucasgitguy-co/lfm3-vl-2b-heretic
LFM3-VL 2B Heretic โ BF16
LFM3-VL-2B Heretic checkpoint in Hugging Face Safetensors format, with a language model, vision encoder, projector, tokenizer, processor configuration, and custom model code.
| File | Size (decimal GB) |
|---|---|
model.safetensors |
3.836 |
Format and compatibility
The configuration declares Lfm3VlForConditionalGeneration, BF16 weights, and Transformers 5.21.0. Use a compatible Transformers release and the modelโs image processor and chat template.
Load
from transformers import AutoModelForImageTextToText, AutoProcessor
repo = "Lucasgitguy-co/lfm3-vl-2b-heretic"
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
repo, torch_dtype="auto", trust_remote_code=True
)
The custom-code loading option executes repository Python code. The example initializes the model; image preprocessing and generation should follow the upstream LFM3-VL guide.
Related formats
For upstream model information and license terms, see LiquidAI/LFM3-VL-2B.
Evaluation and provenance
This card describes the repository files and configuration. Detailed training data, training procedure, and benchmark results are not documented in the inspected artifacts. Loading examples are guidance, not a claim of measured model quality.
License and attribution
The model weights, derived quantizations, and upstream model implementation remain subject to the LFM Open License v1.0 in LICENSE. Its commercial-use limitation applies to derivatives; this release is not an Apache-2.0 model. The publisherโs original documentation additions are available under Apache 2.0, without changing the terms of upstream material.
Repository guide
- Downloads last month
- 38