Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ docs_nav:
url: "/docs/models/flash/"
- label: Confucius4-R2T2
url: "/docs/models/r2t2/"
- label: Inkling
url: "/docs/models/inkling/"
- label: Benchmarks
children:
- label: Overview
Expand Down Expand Up @@ -207,3 +209,5 @@ docs_nav:
url: "/docs/benchmarks/whisper_results/"
- label: Confucius4-R2T2
url: "/docs/benchmarks/r2t2_results/"
- label: Inkling
url: "/docs/benchmarks/inkling_results/"
1 change: 1 addition & 0 deletions docs/docs/benchmarks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ Browse detailed NPU benchmark results for each major model family supported by F
- [Flash Models](flash_results/)
- [Whisper](whisper_results/)
- [Confucius4-R2T2](r2t2_results/)
- [Inkling](inkling_results/) (FLM v1.0.14 or later)

Each page includes decoding and prefill speed metrics (tokens per second; real-time factor for Whisper) and notes about the test setup and hardware.
57 changes: 57 additions & 0 deletions docs/docs/benchmarks/inkling_results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
layout: docs
title: Inkling
parent: Benchmarks
nav_order: 24
---

## ⚡ Performance and Efficiency Benchmarks

This section reports the performance on NPU with FastFlowLM (FLM).

> **Note:**
> - Inkling-2-Mini is supported from FastFlowLM v1.0.14, the version these numbers were measured on (`flm bench`, 2 iterations, Q4_K weights); prefill speed is prompt tokens divided by time to first token.
> - Under FLM's default NPU power mode (Performance)
> - Newer versions may deliver improved performance.
> - Inkling-2-Mini is a mixture-of-experts model (26.4B parameters, 3.4B active) whose 12 middle layers run three times per token.

---

### **Test System:**

AMD Ryzen™ AI Max+ PRO 395 (Strix Halo) with 128 GB DRAM, Linux. The model needs about 20 GB of memory, so use a system with 64 GB or more.

---

### 🚀 Decoding Speed (TPS, or Tokens per Second, starting @ different context lengths)

| **Model** | **HW** | **1k** | **2k** | **4k** | **8k** | **16k** | **32k** |
|------------------|--------------------|--------:|--------:|--------:|--------:|---------:|---------:|
| **Inkling-2-Mini** | XDNA2 | 11.6 | 11.5 | 11.3 | 10.8 | 9.7 | 8.3 |

---

### 🚀 Prefill Speed (TPS, or Tokens per Second, with different prompt lengths)

| **Model** | **HW** | **1k** | **2k** | **4k** | **8k** | **16k** | **32k** |
|------------------|--------------------|--------:|--------:|--------:|--------:|---------:|---------:|
| **Inkling-2-Mini** | XDNA2 | 742 | 975 | 955 | 1,080 | 1,029 | 931 |

---

### 🖼️ Image encoding

The vision tower runs its matrix multiplications and attention on the NPU: about 0.3 s for a 640 × 480 image (192 image tokens), 0.6 s at 525 tokens and 7.6 s at the 4,096-token maximum (2560 × 2560 pixels).

---

### 🎯 Accuracy

Mean KL divergence of the next-token distribution against the BF16 model, 32 × 512 tokens (lower is better):

| Text | Q4_K | Q4_K with the unsloth imatrix (shipped) |
| :--- | ---: | ---: |
| wikitext-2 | 0.0184 | 0.0162 |
| code and documentation | 0.0135 | 0.0115 |

Image embeddings: relative L2 error 0.11 to 0.15 against the BF16 reference (48 to 4,096 image tokens); the BF16 reference itself is 0.06 away from FP32.
3 changes: 2 additions & 1 deletion docs/docs/instructions/server/reasoning_and_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ FLM detects the format once, when the model loads, from its chat template and to
| `lfm2_pythonic` | LFM2, LFM2.5 | `<think>…</think>` (thinking variants) | `<|tool_call_start|>[f(a=1, b="x")]<|tool_call_end|>` |
| `gemma4` | Gemma4 | `<|channel>thought … <channel|>` | `<|tool_call>call:f{a:<|"|>x<|"|>}<tool_call|>` |
| `harmony` | gpt-oss | `analysis` channel | `commentary to=functions.f` channel |
| `inkling` | Inkling-2 | `<|content_thinking|>` message | `<|message_model|>f<|content_invoke_tool_json|>{"name":"f","args":{…}}` message |
| `content_only` | everything else | `<think>…</think>` if the model uses it (e.g. DeepSeek-R1) | none: the model has no tool call syntax |

Your code doesn't depend on any of this. The table explains why a model can or can't call tools, and what its raw output looks like if you ever read the server log.
Expand Down Expand Up @@ -251,7 +252,7 @@ client.chat.completions.create(model="qwen3.5:9b", messages=msgs,

`chat_template_kwargs.enable_thinking` means the same as `think`. Only this one key is read; other keys in `chat_template_kwargs` are ignored. A `null` container or value counts as not sent. A value that is not `true` or `false`, a `chat_template_kwargs` that is not an object, or a request whose `think` or `reasoning_effort` says the opposite is rejected with HTTP 400 before any output. Other models ignore the field.

> ℹ️ **The setting applies to its own request.** A request that doesn't mention `think` or `reasoning_effort` gets the model's default, not what an earlier request set. This holds for the `reasoning_effort` levels of GPT-OSS and Hy-Memory too.
> ℹ️ **The setting applies to its own request.** A request that doesn't mention `think` or `reasoning_effort` gets the model's default, not what an earlier request set. This holds for the `reasoning_effort` levels of GPT-OSS, Hy-Memory and Inkling-2 too.

What changes when thinking is off:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/instructions/server/request_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ response = client.chat.completions.create(
print(response.choices[0].message.content)
```

> ℹ️ **Every request starts from the model's defaults.** A sampling field applies only to the request that sends it. A request that leaves a field out gets the model's default, not what an earlier request set. `think`, `reasoning_effort` (GPT-OSS's and Hy-Memory's levels too), `conversational_mode` and `image-max-tokens` [work the same way](https://fastflowlm.com/docs/instructions/server/reasoning_and_tools/#-turning-thinking-on-and-off).
> ℹ️ **Every request starts from the model's defaults.** A sampling field applies only to the request that sends it. A request that leaves a field out gets the model's default, not what an earlier request set. `think`, `reasoning_effort` (GPT-OSS's, Hy-Memory's and Inkling-2's levels too), `conversational_mode` and `image-max-tokens` [work the same way](https://fastflowlm.com/docs/instructions/server/reasoning_and_tools/#-turning-thinking-on-and-off).

> ⚠️ **Out-of-range values are ignored, not rejected.** A negative `temperature` or `presence_penalty`, or a `top_p` above 1, gets HTTP 200: the server logs a warning and keeps the value it had. OpenAI accepts penalties from −2 to 2, but FLM ignores negative ones, so a penalty can't be used to *encourage* repetition. `repeat_last_n` and `seed` are stricter: a value that isn't an integer, or a `repeat_last_n` below −1, is rejected with HTTP 400.

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/models/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ has_children: true
- [Nemotron Bolt](nemotron3.5-bolt/)
- [Nemotron Bolt DFlash](nemotron3.5-bolt-dflash/)
- [Flash Models](flash/)
- [Confucius4-R2T2](r2t2/)
- [Confucius4-R2T2](r2t2/)
- [Inkling](inkling/) (FLM v1.0.14 or later)
62 changes: 62 additions & 0 deletions docs/docs/models/inkling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
layout: docs
title: Inkling
nav_order: 21
parent: Models
---

## 🧩 Model Card: [Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini)

- **Type:** Image-Text-to-Text (Vision, MoE: 26.4B parameters, 3.4B active; 12 middle layers run three times, about 5.4B of compute per token)
- **Minimum FLM version:** v1.0.14 (first release that supports this model)
- **Think:** Always (the model reasons before every answer; `reasoning_effort` sets how much, see below)
- **Tool Calling Support:** Yes
- **Base Model:** [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini)
- **FLM package:** [FastFlowLM/Inkling-2-Mini-NPU2](https://huggingface.co/FastFlowLM/Inkling-2-Mini-NPU2) ([ModelScope](https://modelscope.cn/models/amd/Inkling-2-Mini-NPU2))
- **Quantization:** Q4_K (importance matrix from [unsloth](https://huggingface.co/unsloth/Inkling-2-Mini-GGUF)), Q8_0 output head, BF16 vision tower
- **Max Context Length:** 1M tokens (tested up to 64k)
- **Default Context Length:** 64k tokens ([change default](https://fastflowlm.com/docs/instructions/cli/#-change-default-context-length-max))
- **[Set Context Length at Launch](https://fastflowlm.com/docs/instructions/cli/#-set-context-length-at-launch)**

▶️ Run with FastFlowLM in PowerShell:

```shell
flm run inkling-2:mini
```

> 📝 NOTE
>
> - **Memory:** the package is 17.3 GB and the model needs about 20 GB of memory in FLM (more at long context). Use a system with **64 GB of RAM or more**: the NPU can only use about half of the system memory, so 32 GB machines cannot load it.
> - **Requires FastFlowLM v1.0.14 or later.**
> - Audio input of the base model is not supported; text and images are.

### 🧠 Thinking

Inkling-2 always thinks first: the reasoning goes to `reasoning_content` in server mode, the answer to `content`. Leave room for both in `max_tokens`.

In server mode, `reasoning_effort` sets how long it thinks: `none`, `minimal`, `low`, `medium`, `high` (default), `xhigh`, `max`, or a number from 0 to 0.99. Turning thinking off (`think: false`, `reasoning_effort: "none"`, or `/think` in the CLI) selects effort `none`, which still thinks, briefly.

```json
{"model": "inkling-2:mini", "reasoning_effort": "low", "messages": [{"role": "user", "content": "Hi"}]}
```

### 🖼️ Images

Images are not resized: every 40 × 40 pixel cell is one image token, up to 4,096 tokens (2560 × 2560 pixels) per image; larger images are scaled down to fit. A 640 × 480 photo is 192 tokens and is encoded in about 0.3 s.

Server mode, OpenAI-compatible:

```python
import base64
from openai import OpenAI

client = OpenAI(base_url="http://localhost:52625/v1", api_key="flm")
img = base64.b64encode(open("photo.jpg", "rb").read()).decode()
r = client.chat.completions.create(
model="inkling-2:mini",
messages=[{"role": "user", "content": [
{"type": "text", "text": "Describe this image in one sentence."},
{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64," + img}}]}],
max_tokens=512)
print(r.choices[0].message.content)
```
3 changes: 2 additions & 1 deletion docs/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sections:
FastFlowLM curates the most requested families and publishes tuned manifests under `flm pull <model>`.
We validate every build on Ryzen™ AI laptops and provide matching cards—see them [here](/docs/models/).
The catalog already covers models spanning Qwen3.8 (27B, MTP and DFlash 2 speculative decoding), Qwen3.6 (MoE), Qwen3.5 (Vision), Gemma4 (omni), Nemotron Bolt (DFlash speculative decoding), Qwen3, GPT-OSS-20B (MoE), DeepSeek-R1, Whisper
(Audio), Hy-MT2, Hy-MT3 (Translation), MiniCPM-V 4.7 (Vision, 1B and 35B-A3B MoE), MedGemma (Medical), Decision 3.0 (d3-edge, d3-lite, d3-nano, d3-mini, d3-flash, d3-turbo, d3-ultra, the System One
(Audio), Hy-MT2, Hy-MT3 (Translation), MiniCPM-V 4.7 (Vision, 1B and 35B-A3B MoE), MedGemma (Medical), Inkling-2 (Vision, 26B-A3B MoE), Decision 3.0 (d3-edge, d3-lite, d3-nano, d3-mini, d3-flash, d3-turbo, d3-ultra, the System One
decision model of vLLM Semantic Router), and other leading open families.
ctas:
- label: "View model docs"
Expand All @@ -30,6 +30,7 @@ sections:
- "Qwen3.5 (Vision)"
- "Qwen 3 (Vision)"
- "MiniCPM-V 4.7 (Vision, incl. 35B-A3B MoE)"
- "Inkling-2 (Vision, MoE, tool use)"
- "GPT-OSS (MoE)"
- "LFM2 / LFM3 (Liquid AI)"
- "EmbeddingGemma (RAG)"
Expand Down
Loading