--- language: - en license: apache-2.0 base_model: thinkingmachines/Inkling-2-Mini base_model_relation: quantized tags: - gguf - quantization - sakura - imatrix - moe - image-text-to-text ---

Sakura

# Sakura · Inkling 2 Mini (GGUF) Independent community quantization of [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini). Not an official release of Thinking Machines. > **Needs llama.cpp b12600 or newer.** That is the release these files were made and tested with; it contains the looped Inkling 2 Mini architecture (pull request #32694). Older builds, and Ollama or LM Studio versions that bundle an older llama.cpp, will not load these files (see "Use it" below). ## What is this Inkling 2 Mini is a multimodal looped mixture-of-experts model: 26.4 B parameters, 3.4 B active per token, 128 experts with 8 active, image input, up to 1 M tokens of context. The files here are smaller versions made for local use. The vision projector (`mmproj`) is included for image input. ## Which file | File | Quant | Size | Mean KLD vs Q8_0 | Same top token | |---|---|---|---|---| | `Sakura-Inkling-2-Mini-Q4_K_M.gguf` | Q4_K_M | 17.48 GB | 0.0228 | 94.49 % | | `Sakura-Inkling-2-Mini-Q5_K_M.gguf` | Q5_K_M | 19.91 GB | 0.0128 | 95.28 % | | `Sakura-Inkling-2-Mini-Q6_K.gguf` | Q6_K | 23.49 GB | 0.0076 | 96.53 % | Rule of thumb: **Q4_K_M** if memory is tight, **Q5_K_M** as the balanced choice, **Q6_K** for the closest result. The KLD values compare each file with ggml-org's `Q8_0` file on a short held-out text (5 chunks of 256 tokens: English, code, German, Chinese). A small sample: it says little about long contexts, other languages or code quality, and the reference is `Q8_0`, not the original model. Image input: use `mmproj-Inkling-2-Mini-BF16.gguf` (or the smaller `Q8_0` one) next to the model file. ## Use it **llama.cpp** (release b12600 or newer): ```bash # download a llama.cpp release b12600 or newer from https://github.com/ggml-org/llama.cpp/releases # (or build it: git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp && cmake -B build && cmake --build build -j) llama-server -hf webmp3/Sakura-Inkling-2-Mini-GGUF:Q4_K_M -c 8192 --port 8080 # or with local files, including image input: llama-server -m Sakura-Inkling-2-Mini-Q4_K_M.gguf --mmproj mmproj-Inkling-2-Mini-BF16.gguf -c 8192 --port 8080 ``` Then open http://127.0.0.1:8080 or use the OpenAI-compatible endpoint `http://127.0.0.1:8080/v1`. **Ollama** (not tested by the author; needs an Ollama version that includes the `inkling2_loop` architecture): ```bash ollama run hf.co/webmp3/Sakura-Inkling-2-Mini-GGUF:Q4_K_M ``` or with a Modelfile next to the downloaded file: ``` FROM ./Sakura-Inkling-2-Mini-Q4_K_M.gguf PARAMETER num_ctx 8192 ``` ```bash ollama create inkling2-mini -f Modelfile && ollama run inkling2-mini ``` **LM Studio** (not tested by the author; needs a LM Studio version whose llama.cpp runtime includes the `inkling2_loop` architecture): open the Discover tab, search for `webmp3/Sakura-Inkling-2-Mini-GGUF`, download the file you want, load it with GPU offload as high as your memory allows and a context length of 8192. For image input, keep the `mmproj` file in the same folder as the model file. Reasoning depth is set by the model's `reasoning_effort` (`none` to `max`), see the [original model card](https://huggingface.co/thinkingmachines/Inkling-2-Mini). ## What was and was not measured - **Measured:** mean KLD and top-token agreement against `Q8_0` (table above), a short greedy generation test for every file. - **Not measured:** benchmarks, long-context behaviour, image input with these files, speed, GPU backends, agreement with the original checkpoint. No quality claim beyond the numbers above. - The 4-bit experts of layers 0 to 19 come from NVFP4 in the original checkpoint, a different 4-bit format than the K-quants here, so the 4-bit files carry a second rounding step. How much that costs was not measured against the original. ## Sources and license - Original model: [thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini), Apache-2.0, with the original's [model acceptable use policy](https://thinkingmachines.ai/model-acceptable-use-policy/). - The files were quantized from ggml-org's BF16 GGUF [ggml-org/Inkling-2-Mini-GGUF](https://huggingface.co/ggml-org/Inkling-2-Mini-GGUF), converted from the original checkpoint by ggml-org (I did not convert from the original weights myself). The importance matrix (`imatrix.gguf`) and the vision projector files are ggml-org's, reused unchanged.
Verification details - Original revision `6e7c8248f75265bdd4fbab5273304243b5d8c2cb`; ggml-org repository revision `db61c5b492a6a034d986328d28274af0a439aa6c`; BF16 file SHA-256 `7074c9762e6769a608c7b23960a7fd2444880b1174a3910149749f6d01389aec`; matrix SHA-256 `553662ef0d5e3d047e5753bf8275c26bbdd4306c60ddf6dc9f46c7f49f19452a`. - Matrix: according to the ggml-org card computed on the BF16 file with [bartowski's v6 calibration data](https://gist.github.com/bartowski1182/e26453c0404e24eb317543ec5360f87a), conversations rendered through the model's chat template. It has entries for 224 of the 226 16-bit weight tensors of the BF16 file; the other 2 (token embedding and output) were quantized without matrix statistics. - Made with `llama-quantize --imatrix imatrix.gguf` from the llama.cpp release b12600 (revision `29b52d398b294509746ec0a3f28948a3107c0213`, CPU build). Every file was checked: its tensor types equal the plan of the same tool's `--dry-run`, it loads and generates text with that build, its KLD against `Q8_0` was measured, and each upload was read back from the Hub by SHA-256. | Projector file (unchanged from ggml-org) | Size | SHA-256 | |---|---|---| | `mmproj-Inkling-2-Mini-BF16.gguf` | 642 MB | `e914997fe07fb2066bfdce855ec7275c15bc2b624e5423149f1027839593d9cb` | | `mmproj-Inkling-2-Mini-Q8_0.gguf` | 346 MB | `233287272ec5ac39b4168677aba54a4c024f202410f5629fac1830e1059f8abb` | - `Sakura-Inkling-2-Mini-Q4_K_M.gguf`: `185a9d92c2d0a76e7e21c69bb43f6bddf3601fc7087f1cbe635ff56d107b6e20` - `Sakura-Inkling-2-Mini-Q5_K_M.gguf`: `72fbfccd9561a5a08c29de03896f0ad1af75fdb8c889b8da967aa8c922dd1361` - `Sakura-Inkling-2-Mini-Q6_K.gguf`: `3955552fb2fb0de471070b83e5f8d82274b25be9ddc977040c9765bf1b4f9d73`
中文说明 · 樱花 Sakura(点击展开) **需要 llama.cpp b12600 或更新版本。** 这是制作并测试这些文件所用的版本,包含循环架构 Inkling 2 Mini(拉取请求 #32694)。更旧的版本,以及内置旧版 llama.cpp 的 Ollama 或 LM Studio,无法加载这些文件。 - 原始模型:[thinkingmachines/Inkling-2-Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini),Apache-2.0。文件由 ggml-org 的 BF16 GGUF([ggml-org/Inkling-2-Mini-GGUF](https://huggingface.co/ggml-org/Inkling-2-Mini-GGUF))量化而来,我没有自己从原始权重转换;重要性矩阵与视觉投影文件 `mmproj` 均为 ggml-org 的,原样复用。 - 文件:Q4_K_M(内存紧张时)、Q5_K_M(均衡)、Q6_K(最接近原模型)。图像输入请把 `mmproj` 文件放在模型文件旁。 - **llama.cpp**(b12600 或更新版本): ```bash # download a llama.cpp release b12600 or newer from https://github.com/ggml-org/llama.cpp/releases # (or build it: git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp && cmake -B build && cmake --build build -j) llama-server -hf webmp3/Sakura-Inkling-2-Mini-GGUF:Q4_K_M -c 8192 --port 8080 # or with local files, including image input: llama-server -m Sakura-Inkling-2-Mini-Q4_K_M.gguf --mmproj mmproj-Inkling-2-Mini-BF16.gguf -c 8192 --port 8080 ``` 然后打开 http://127.0.0.1:8080,或使用兼容 OpenAI 的接口 `http://127.0.0.1:8080/v1`。 - **Ollama**(作者未测试;需要包含 `inkling2_loop` 架构的 Ollama 版本):`ollama run hf.co/webmp3/Sakura-Inkling-2-Mini-GGUF:Q4_K_M`,或在已下载文件旁使用 Modelfile(`FROM ./Sakura-Inkling-2-Mini-Q4_K_M.gguf`,`PARAMETER num_ctx 8192`)。 - **LM Studio**(作者未测试;需要其 llama.cpp 运行时包含 `inkling2_loop` 架构的版本):在 Discover 标签页搜索 `webmp3/Sakura-Inkling-2-Mini-GGUF`,下载文件,GPU 卸载按内存尽量调高,上下文长度 8192;图像输入时把 `mmproj` 文件放在同一文件夹。 - 校验:张量类型与同一工具 `--dry-run` 的计划一致;文件可加载并生成文本;已测量相对 `Q8_0` 的 KLD;每次上传后按 SHA-256 回读。 - 已测量:各文件相对 `Q8_0` 的平均 KLD 与首选词元一致率(一段很短的留出文本,5 个块,每块 256 个词元,见上表)。未测量:基准测试、长上下文、使用这些文件的图像输入、速度、GPU 后端、与原始检查点的一致性。原始检查点第 0 至 19 层的 4 位专家来自 NVFP4,与这里的 K 量化格式不同,因此多了一次舍入,代价未与原始模型比较。