How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="NobodyWho/LFM2.5-VL-1.6B-GGUF",
	filename="",
)
llm.create_chat_completion(
	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"
					}
				}
			]
		}
	]
)

LFM2.5-VL-1.6B GGUF — with tool_calls chat-template fix

GGUF builds of LiquidAI/LFM2.5-VL-1.6B prepared for tool calling. Every file is the corresponding upstream quant with bit-identical weight tensors and two metadata changes:

  1. the embedded chat template (tokenizer.chat_template) is extended to render the tool_calls field of assistant messages;
  2. LiquidAI's recommended sampling settings are embedded as general.sampling.* metadata (temp=0.1, min_p=0.15, penalty_repeat=1.05), so runtimes that read sampler defaults from the model file use the vendor-recommended configuration out of the box.

Model Capabilities

  • Text generation — instruction-following chat model
  • Tool calling — native LFM2 function-calling format; multi-turn tool use works thanks to the template fix in this repo
  • Vision — understands and reasons about images (pair with the upstream mmproj file, see Getting Started)
  • Long context — 128k tokens

Getting Started

Install NobodyWho:

pip install nobodywho

Run — the model is downloaded and cached automatically on first use:

from nobodywho import Chat

chat = Chat("huggingface:NobodyWho/LFM2.5-VL-1.6B-GGUF/LFM2.5-VL-1.6B-Q8_0-vendor-sampling.gguf")
response = chat.ask("What is the capital of Denmark?").completed()
print(response) # Copenhagen!

Tool calling

from nobodywho import Chat, tool

@tool(description="Gets the current weather for a city")
def get_weather(city: str) -> str:
    return f"It is sunny and 22°C in {city}."

chat = Chat(
    "huggingface:NobodyWho/LFM2.5-VL-1.6B-GGUF/LFM2.5-VL-1.6B-Q8_0-vendor-sampling.gguf",
    tools=[get_weather],
)
print(chat.ask("What is the weather in Paris?").completed())

Tool calling with LFM models ships in the upcoming nobodywho release (PR #564). These files also work in any other llama.cpp-based runtime; the original unmodified GGUFs live in the upstream LiquidAI/LFM2.5-VL-1.6B-GGUF repo.

Vision

This repo now hosts the language model and the matching projection models (mmproj) — pass one as projection_model_path for image input. Two precisions are available: mmproj-LFM2.5-VL-1.6b-F16.gguf and a smaller mmproj-LFM2.5-VL-1.6b-Q8_0.gguf (either pairs with any model quant):

from nobodywho import Model, Chat, Prompt, Image, Text

model = Model(
    "huggingface:NobodyWho/LFM2.5-VL-1.6B-GGUF/LFM2.5-VL-1.6B-Q8_0-vendor-sampling.gguf",
    projection_model_path="huggingface:NobodyWho/LFM2.5-VL-1.6B-GGUF/mmproj-LFM2.5-VL-1.6b-F16.gguf",
)
chat = Chat(model, system_prompt="You are a helpful assistant.")

prompt = Prompt([
    Text("What do you see in this image?"),
    Image("./photo.png"),
])
response = chat.ask(prompt).completed()
print(response)

Files

File Fix recipe NobodyWho tool-suite score
LFM2.5-VL-1.6B-Q8_0-vendor-sampling.gguf template + vendor sampling 14/14
LFM2.5-VL-1.6B-F16-vendor-sampling.gguf template + vendor sampling 14/14
LFM2.5-VL-1.6B-Q4_0-vendor-sampling.gguf template + vendor sampling 12-13/14 (test_python_tool fails; borderline at this quant)

"vendor sampling" = LiquidAI's recommended generation settings embedded as general.sampling.* metadata (temp 0.1, min_p 0.15, repetition_penalty 1.05); runtimes that read sampler defaults from the file use them automatically.

Why

The upstream template renders only message.content. Runtimes that store tool calls in the structured tool_calls field (the HF "unified tool use" convention, used by NobodyWho and OpenAI-style APIs) re-render assistant tool-call turns as empty turns, so the model never sees its own previous calls — causing re-issued tool calls and degraded multi-turn tool use.

This template renders them in the model's native markup:

<|tool_call_start|>[get_weather(city="Paris")]<|tool_call_end|>

The exact change

One line of the template (the message-content sink) becomes an if/else:

{%- if message["role"] == "assistant" and message.tool_calls is defined and message.tool_calls -%}
{%- set tcns = namespace(calls=[]) -%}
{%- for tc in message.tool_calls -%}
{%- set argns = namespace(parts=[]) -%}
{%- for k, v in tc.function.arguments.items() -%}
{%- set argns.parts = argns.parts + [k + "=" + (v | tojson)] -%}
{%- endfor -%}
{%- set tcns.calls = tcns.calls + [tc.function.name + "(" + (argns.parts | join(", ")) + ")"] -%}
{%- endfor -%}
{{- "<|tool_call_start|>[" + (tcns.calls | join(", ")) + "]<|tool_call_end|>" + content + "<|im_end|>\n" -}}
{%- else -%}
{{- content + "<|im_end|>\n" -}}
{%- endif -%}

Messages without tool_calls render through the else branch — identical to the upstream template.

Use

Primarily used by NobodyWho CI for tool-calling integration tests (see PR #564). Works as a drop-in replacement for the upstream Q8_0 file in any llama.cpp-based runtime.

Model Details

Property Value
Parameters 1.6B (1.17B language model + vision tower in the mmproj)
Context length 128,000 tokens
License LFM Open License v1.0
Base model LiquidAI/LFM2.5-VL-1.6B

License

LFM Open License v1.0, unchanged from upstream — see LICENSE. All credit for the model goes to Liquid AI.

Downloads last month
1,108
GGUF
Model size
1B params
Architecture
lfm2
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for NobodyWho/LFM2.5-VL-1.6B-GGUF

Quantized
(18)
this model

Collection including NobodyWho/LFM2.5-VL-1.6B-GGUF