Instructions to use LiquidAI/LFM2-VL-1.6B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LiquidAI/LFM2-VL-1.6B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16 # Run inference directly in the terminal: llama cli -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16 # Run inference directly in the terminal: llama cli -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf LiquidAI/LFM2-VL-1.6B-GGUF:F16
Use Docker
docker model run hf.co/LiquidAI/LFM2-VL-1.6B-GGUF:F16
- LM Studio
- Jan
- vLLM
How to use LiquidAI/LFM2-VL-1.6B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LiquidAI/LFM2-VL-1.6B-GGUF" # 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/LFM2-VL-1.6B-GGUF", "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/LFM2-VL-1.6B-GGUF:F16
- Ollama
How to use LiquidAI/LFM2-VL-1.6B-GGUF with Ollama:
ollama run hf.co/LiquidAI/LFM2-VL-1.6B-GGUF:F16
- Unsloth Studio
How to use LiquidAI/LFM2-VL-1.6B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LiquidAI/LFM2-VL-1.6B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LiquidAI/LFM2-VL-1.6B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LiquidAI/LFM2-VL-1.6B-GGUF to start chatting
- Docker Model Runner
How to use LiquidAI/LFM2-VL-1.6B-GGUF with Docker Model Runner:
docker model run hf.co/LiquidAI/LFM2-VL-1.6B-GGUF:F16
- Lemonade
How to use LiquidAI/LFM2-VL-1.6B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LiquidAI/LFM2-VL-1.6B-GGUF:F16
Run and chat with the model
lemonade run user.LFM2-VL-1.6B-GGUF-F16
List all available models
lemonade list
- Atomic Chat
Proposed colab doesn't give reliable results.
Hello! I encounter the same issue. To elaborate more, it concerns all LFM2-VL models (450M, 1.6B, 3B) executed as GGUF (Q4_0, Q8_0, F16) via llama-cpp-python.
Example Colab notebooks provided by LiquidAI generate poor results.
As a reference to reproduce, please directly start the notebook on LFM2-VL-1.6B-GGUF F16:
https://colab.research.google.com/#fileId=https://huggingface.co/LiquidAI/LFM2-VL-1.6B-GGUF.ipynb
This calls inference on the image with a liberty island in New York:
https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg
Output produced by the model seems random:
{'id': 'chatcmpl-2f80c740-fa34-44a7-8824-e9239e23a76d',
'object': 'chat.completion',
'created': 1765829307,
'model': '/root/.cache/huggingface/hub/models--LiquidAI--LFM2-VL-1.6B-GGUF/snapshots/9b0f98f2dfbb18e850e45cee5d1a022a1896476d/./LFM2-VL-1.6B-F16.gguf',
'choices': [{'index': 0,
'message': {'role': 'assistant',
'content': 'The image depicts a serene landscape with a winding river flowing through a lush green valley, surrounded by tall trees and a clear blue sky.'},
'logprobs': None,
'finish_reason': 'stop'}],
'usage': {'prompt_tokens': 17, 'completion_tokens': 29, 'total_tokens': 46}}
@tarek-liquid, any assistance on this would be greatly appreciated! Thanks a lot in advance.
The problem is most likely that llama-cpp-python wrapper does not load the mmproj (the vision projector):
https://llama-cpp-python.readthedocs.io/en/latest/api-reference/#llama_cpp.Llama.__init__
Here are the only supported multi-modal models in the llama-cpp-python:
https://llama-cpp-python.readthedocs.io/en/latest/#multi-modal-models
They require a custom ChatHandler to load the mmproj file and the LFM-2 models are unfortunately not supported.
I created a ticket in github of llama-cpp-python for this:
https://github.com/abetlen/llama-cpp-python/issues/2105
It would be good to fix or remove the example LiquidAI notebooks for VL models because they are misleading:
https://colab.research.google.com/#fileId=https://huggingface.co/LiquidAI/LFM2-VL-1.6B-GGUF.ipynb


