File size: 6,251 Bytes
b932257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
---
license: other
license_name: lfm1.0
license_link: LICENSE
base_model: LiquidAI/LFM2.5-2.6B
library_name: gguf
pipeline_tag: text-generation
language:
  - ar
  - zh
  - en
  - fr
  - de
  - hi
  - id
  - it
  - ja
  - ko
  - pl
  - pt
  - ru
  - es
  - th
  - vi
tags:
  - gguf
  - nobodywho
  - liquid
  - lfm2.5
  - reasoning
  - tool-calling
---

# NobodyWho/LFM2.5-2.6B-GGUF

## Overview

GGUF build of LiquidAI's **LFM2.5-2.6B**, prepared for
[NobodyWho](https://github.com/nobodywho-ooo/nobodywho). The upstream GGUF cannot render a
single prompt in any llama.cpp-family runtime because of an invalid chat template; this repo
ships the same file with that template repaired. The **weight tensors are bit-identical** to
upstream β€” only three metadata keys differ.

LFM2.5 is a hybrid architecture built for on-device deployment, extending LFM2 with additional
pre-training and reinforcement learning. This checkpoint is a **reasoning model**: it emits a
`<think>` block before its answer.

## Model Capabilities

- **Text generation** β€” instruction-following chat
- **Reasoning** β€” the template always opens a `<think>` block on the generation prompt
- **Tool calling** β€” native LFM2 function-calling format
- **Long context** β€” 128k tokens
- **Multilingual** β€” 16 languages

## Getting Started

Install [NobodyWho](https://docs.nobodywho.ooo/):

```bash
pip install nobodywho
```

Run β€” the model is downloaded and cached automatically on first use:

```python
from nobodywho import Chat

chat = Chat("huggingface:NobodyWho/LFM2.5-2.6B-GGUF/LFM2.5-2.6B-Q4_K_M.gguf")
print(chat.ask("What is the capital of Denmark?").completed())
```

Because this is a reasoning model, the completion contains the model's `<think>` trace
followed by `</think>` and then the answer.

### Tool calling

```python
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-2.6B-GGUF/LFM2.5-2.6B-Q4_K_M.gguf",
    tools=[get_weather],
)
print(chat.ask("What is the weather in Paris?").completed())
```

The model reliably emits its native tool-call markup β€”
`<|tool_call_start|>[get_weather(city='Paris')]<|tool_call_end|>` β€” for both single and
follow-up turns.

> [!NOTE]
> Parsing that markup into executed tool calls ships in the upcoming `nobodywho` release
> ([PR #564](https://github.com/nobodywho-ooo/nobodywho/pull/564)). On `nobodywho` 1.1.0 the
> markup is returned as text.

## Why

The upstream template wraps the assistant branch of its message loop in
`{% generation %}` … `{% endgeneration %}`. Those tags are a Hugging Face *transformers*
extension used to mark assistant spans for `return_assistant_tokens_mask` during training.
They are not part of Jinja2, and no llama.cpp-family runtime implements them β€” so the template
fails to compile and **every prompt errors out**:

```
Could not render messages Template failed to render:
syntax error: unknown statement generation (in <string>:86)
```

The tags emit no output, so removing them is a no-op for the rendered prompt. The template in
this repo is byte-identical to upstream apart from those two lines.

Two related metadata problems were fixed at the same time:

- `tokenizer.ggml.add_bos_token` was **absent**, so runtimes fell back to their own default
  (NobodyWho logs `defaulting to true`) while the template already emits `{{- bos_token -}}`
  itself β€” putting two leading `<|startoftext|>` tokens on every prompt. Upstream's
  `tokenizer.json` uses a plain `ByteLevel` post-processor that adds no BOS, so `false` is the
  correct value.
- `general.name` held `Ab00687315Bc1298E9D54E9C4B611Dde9867Ccc2`, a build hash that leaked into
  the metadata during the vendor's GGUF conversion.

### Full metadata diff versus upstream

| Key | Upstream | Here |
|---|---|---|
| `tokenizer.chat_template` | `{% generation %}` tags present β€” fails to compile | tags removed, otherwise byte-identical |
| `tokenizer.ggml.add_bos_token` | *absent* | `false` |
| `general.name` | `Ab00687315Bc1298E9D54E9C4B611Dde9867Ccc2` | `LFM2.5 2.6B` |

Nothing else changed: 266 tensors, identical names, shapes and dtypes, and an identical
SHA-256 over the tensor payload (`9230ca69…4b978d6`).

## Files

| File | Fix recipe | Size |
|---|---|---|
| `LFM2.5-2.6B-Q4_K_M.gguf` | chat template + BOS + name | 1.6 GB |

## Verification

The patched template was checked against every branch it can take β€” plain user turn, system
prompt, multi-turn with thinking stripped from pre-last-user turns, `preserve_thinking=true`,
tools in the system prompt, assistant `tool_calls`, multipart (list) content,
`add_generation_prompt=false`, and the `CONTINUE_FINAL_MESSAGE_TAG` path β€” then exercised in
NobodyWho for multi-turn chat with a system prompt and for single and follow-up tool calls.

## Sampling notes

The file carries LiquidAI's recommended `general.sampling.*` metadata as upstream shipped it:
`temperature 0.1`, `top_k 50`. NobodyWho reads these and applies them by default.

The vendor additionally recommends `repetition_penalty 1.1` β€” both the upstream model card and
`leap/Q4_K_M.json` agree on it β€” but it is **not** embedded in the GGUF. Pass it yourself if
you want the vendor's full recipe:

```
llama-cli -m LFM2.5-2.6B-Q4_K_M.gguf --conversation \
    --temp 0.1 --top-k 50 --repeat-penalty 1.1
```

## Model Details

| Property | Value |
|---|---|
| Parameters | 2.6B |
| Quantization | Q4_K_M |
| Context length | 131,072 tokens |
| Architecture | `lfm2` (hybrid) |
| Vocabulary | 128,000 tokens |
| License | [LFM Open License v1.0](LICENSE) |
| Base model | [LiquidAI/LFM2.5-2.6B](https://huggingface.co/LiquidAI/LFM2.5-2.6B) |
| Upstream GGUF | [LiquidAI/LFM2.5-2.6B-GGUF](https://huggingface.co/LiquidAI/LFM2.5-2.6B-GGUF) |

These files also work in any other llama.cpp-based runtime; the original unmodified GGUFs live
in the upstream [LiquidAI/LFM2.5-2.6B-GGUF](https://huggingface.co/LiquidAI/LFM2.5-2.6B-GGUF)
repo.

## License

LFM Open License v1.0, unchanged from upstream β€” see [LICENSE](LICENSE).
All credit for the model goes to [Liquid AI](https://huggingface.co/LiquidAI).