Instructions to use samuelstevens/LFM2.5-VL-450M-no-tiling with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use samuelstevens/LFM2.5-VL-450M-no-tiling with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="samuelstevens/LFM2.5-VL-450M-no-tiling") 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("samuelstevens/LFM2.5-VL-450M-no-tiling") model = AutoModelForMultimodalLM.from_pretrained("samuelstevens/LFM2.5-VL-450M-no-tiling", 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 samuelstevens/LFM2.5-VL-450M-no-tiling with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "samuelstevens/LFM2.5-VL-450M-no-tiling" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "samuelstevens/LFM2.5-VL-450M-no-tiling", "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/samuelstevens/LFM2.5-VL-450M-no-tiling
- SGLang
How to use samuelstevens/LFM2.5-VL-450M-no-tiling 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 "samuelstevens/LFM2.5-VL-450M-no-tiling" \ --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": "samuelstevens/LFM2.5-VL-450M-no-tiling", "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 "samuelstevens/LFM2.5-VL-450M-no-tiling" \ --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": "samuelstevens/LFM2.5-VL-450M-no-tiling", "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 samuelstevens/LFM2.5-VL-450M-no-tiling with Docker Model Runner:
docker model run hf.co/samuelstevens/LFM2.5-VL-450M-no-tiling
LFM2.5-VL-450M — no tiling
Modification notice: Modified by samuelstevens: image_processor.do_image_splitting changed from true to false, based on LiquidAI/LFM2.5-VL-450M@fc6221ca597f3315e4f82fc2df606783267b34ba. Model weights are unchanged. This is a processor-configuration fork, not a fine-tuned model.
This repository contains the complete original checkpoint from LiquidAI/LFM2.5-VL-450M, with its original weights, tokenizer, chat template, model configuration and license. The only behavioral configuration change is:
{"image_processor": {"do_image_splitting": false}}
A modification notice was also added to processor_config.json as metadata.
The image processor uses a single resized whole-image view instead of tiles.
Other image-processing defaults are unchanged, including max_image_tokens=256.
This trades visual detail for lower image-token usage; no accuracy improvement
or equivalence is claimed. No SFT, model inference, or benchmark was performed
as part of creating this fork. No FishVista images or annotations are included.
Usage
from transformers import AutoProcessor
processor = AutoProcessor.from_pretrained("samuelstevens/LFM2.5-VL-450M-no-tiling")
assert processor.image_processor.do_image_splitting is False
For reproducible runs, pass this repository's commit SHA as revision.
Load model weights from the same repository. Runtimes that override the saved
processor configuration need separate verification.
The name retains LFM and -VL- so LQH's current name-based vision routing can
recognize it. This is not a guarantee of cloud execution or training success.
Attribution and license
Original model by Liquid AI, Inc. The LFM Open License v1.0 is retained unchanged, including its commercial-use conditions. This is a configuration fork published by samuelstevens, not a new official Liquid AI release.
The original model card is preserved verbatim in UPSTREAM_README.md. Its examples and benchmark claims refer to the upstream model with upstream settings, not newly measured results for this no-tiling fork.
fork_manifest.json records the pinned source revision and file SHA-256 hashes.
- Downloads last month
- 34
Model tree for samuelstevens/LFM2.5-VL-450M-no-tiling
Base model
LiquidAI/LFM2.5-350M-Base