Download README.md from olnnn/Inkling-2-Mini-EMEANS: direct link, hf CLI and curl.
- Browser
- Download file 15.2 kB
-
https://huggingface.co/olnnn/Inkling-2-Mini-EMEANS/resolve/main/README.md
- Command line
-
hf download hf://olnnn/Inkling-2-Mini-EMEANS/README.md
-
curl -L -o README.md https://huggingface.co/olnnn/Inkling-2-Mini-EMEANS/resolve/main/README.md
base_model: thinkingmachines/Inkling-2-Mini
base_model_relation: quantized
license: apache-2.0
pipeline_tag: image-text-to-text
tags:
- quantized
- moe
- low-bit
- e-means
- grpo
- llama-cpp
- custom-kernel
- 12gb-vram
- 8gb-vram
- rocm
- cuda
Inkling-2-Mini β E-MEANS Quantizations (3.04 bpw & 2.27 bpw)
Experimental mixed-precision e-means quantizations of Inkling-2-Mini (26.2B MoE, 5.4B effective active):
Inkling-2-Mini-3.04bpw.emns(9.20 GiBVRAM /9.87 GBon HF): Fits 100% inside a 12 GB GPU at47 tok/swith52Kβ72Kcontext and0RAM spill.Inkling-2-Mini-2.27bpw.emns(6.88 GiBVRAM /7.39 GBon HF β Experimental): Fits inside an 8 GB GPU (~24Kβ32Kheadless /~8Kβ16Kdesktop withq4_0KV). Structurally verified (EMNS0001,694tensors,120/120GRPO LoRA merged); live token generation smoke test and benchmarks pending.
Requires the
llama.cpp-emeansLoader (Won't Open Directly in LM Studio / Ollama / Stockllama.cpp):.emnsis a custom low-bit quant format, so standard GGUF loaders cannot read it natively.
- Safe & open-source loader: Grab a GitHub-Actions-built zip from
olsn-bit/llama.cpp-emeans(v0.1.1-emeans), or audit and compile it yourself from the full repo or0001-ggml-cuda-add-e-means-.emns-HIP-CUDA-kernels-WMMA-pr.patch(applies cleanly onllama.cppb2236cb39).- Use any UI, harness, or CLI you want: The loader only serves the model β once running on any
--portyou pick, it exposes a standard OpenAI-compatible API (http://127.0.0.1:<PORT>/v1) that plugs into any client (Open WebUI, OpenCode, Cline,pi, SillyTavern, Python, etc.), or run directly in terminal withllama-cli.
Files
| File | Size (VRAM / Windows) | Size (HF / Decimal) | Bit-Width | What it is |
|---|---|---|---|---|
Inkling-2-Mini-3.04bpw.emns |
9.20 GiB |
9.87 GB |
3.04 bpw |
Recommended (12 GB+ VRAM) β mixed-precision 2.5β4b, fits 100% in 12 GB VRAM (52K desktop / 72K headless) |
Inkling-2-Mini-2.27bpw.emns |
6.88 GiB |
7.39 GB |
2.27 bpw |
Experimental (8 GB VRAM) β 2.0-bit 2D codebook MoE + 4.0-bit dense/attn/embed (~24Kβ32K headless / ~8Kβ16K desktop; live smoke test pending) |
Inkling-2-Mini-metadata-stub.gguf |
11.4 MiB |
12.0 MB |
β | Required header + tokenizer stub (zero weight bytes; shared by both .emns models) |
mmproj-Inkling-2-Mini-Q4.emns |
167.7 MiB |
176 MB |
4.0 bpw |
Optional 4-bit vision encoder (0 VRAM on CPU, or 2Γ faster on GPU) |
mmproj-Inkling-2-Mini-metadata-stub.gguf |
23.4 KiB |
24.0 KB |
β | Header stub for vision (only needed if using mmproj) |
Inkling-2-Mini-4.0bpw.emns |
~12.5 GiB |
~13.4 GB |
~4.0 bpw |
Planned β 16 GB+ HQ tier (or 12 GB with offload / multi-GPU) |
Note on file sizes: Windows, Linux ls -lh, and GPU VRAM use binary GiB (1024Β³), while Hugging Face's Files tab displays decimal GB (1000Β³). Both columns are the exact same byte count (9,873,665,184 B for 3.04bpw, 7,387,230,816 B for 2.27bpw).
What's Inside (Layer Precision Breakdown)
Inkling-2-Mini runs its middle 12 layers (L6βL17) 3 times per token. Both builds keep sensitive dense/attention/embedding layers at 4-bit and merge the 120/120 GRPO recovery LoRA before packing:
| Layer Group | 3.04 bpw (9.20 GiB / 9.87 GB) |
2.27 bpw (6.88 GiB / 7.39 GB, Experimental) |
Why |
|---|---|---|---|
Dense, attention, embeddings, lm_head |
4.0-bit (EM1D_Q4_G64) |
4.0-bit (EM1D_Q4_G64) |
Most sensitive weights |
Looped core MoE experts (L6βL17, 3Γ/token) |
3.0-bit (EM1D_Q3_G64) |
2.0-bit (EM2D_K16_G128) |
3.04bpw protects 3Γ error compounding; 2.27bpw trades core precision to fit 8 GB VRAM |
Outer MoE experts (1Γ/token) |
2.5-bit (EM2D_K32_G128) |
2.0-bit (EM2D_K16_G128) |
2D vector codebooks compress MoE experts tightly |
Routers, norms, sconv |
FP32 | FP32 | Tiny footprint, keeps routing stable |
Benchmarks (3.04 bpw)
*(All benchmarks below are measured on Inkling-2-Mini-3.04bpw.emns. Live token tests and benchmarks for experimental Inkling-2-Mini-2.27bpw.emns will be added next.)*
1. Coding Tasks (ab_bench, 13 tasks, 32K context on RX 6700 XT 12 GB, tested Nov 2026)
| Model | Bit-Width | Size | Passed (β) | Hard Tasks (β) | Decode Speed | Total Tokens | Total Time (β) | Stuck / Capped (β) |
|---|---|---|---|---|---|---|---|---|
Unsloth UD-Q2_K_XL (Nov 2026) |
mixed ~2β3b | 9.14 GB |
8 / 13 |
4 / 8 |
51.3 tok/s |
22,202 |
444.9 s |
4 |
This Build (3.04 bpw) |
mixed 2.5β4b | 9.20 GiB (9.87 GB) |
10 / 13 |
6 / 8 |
47.6 tok/s |
12,240 (-45%) |
264.9 s (1.68Γ faster) |
1 |
2. Perplexity & KLD vs Uncompressed Original (Colab L4 Gate, Pre-GRPO)
| Variant | Size | Wiki PPL (β) | Code PPL (β) | KLD vs Original (β) |
|---|---|---|---|---|
Original Checkpoint (NVFP4/MXFP8/BF16) |
~20 GB |
6.609 |
1.573 |
0.000 (ref) |
3.04 bpw (pre-GRPO) |
9.20 GiB (9.87 GB) |
7.023 |
1.595 |
0.083 |
(Local post-GRPO llama-perplexity KLD / Top-1 comparison against UD-Q2_K_XL will be added next.)
3. Thinking Effort (8 coding tasks on RX 6700 XT)
| Thinking Effort | Passed (β) | Avg Time / Task (β) | Total Tokens | Best For |
|---|---|---|---|---|
low (Recommended) |
7 / 8 |
9.5 s |
3,418 |
Daily coding, quick edits |
medium |
7 / 8 |
13.2 s |
4,835 |
Multi-file refactors |
high |
7 / 8 |
16.9 s |
6,242 |
Hard debugging |
Hardware & Context Tested
AMD RX 6700 XT (12 GB, Real 3.04 bpw Weights, 0 RAM Spill)
| Context | Dedicated VRAM | Shared Spill | Prompt Speed (pp) |
Decode Speed (tg) |
Notes |
|---|---|---|---|---|---|
llama-bench (-ub 128) |
~9.6 GiB |
0 |
213.5 tok/s |
48.7 tok/s |
229.5 tok/s pp @ -ub 256 |
32K (llama-server, default) |
10,416 MiB |
0 |
190.4 tok/s |
47.2 tok/s |
Safe with IDE + browser open |
52K (llama-server, clean desktop) |
10,777 MiB |
0 |
190.3 tok/s |
47.2 tok/s |
Recommended on clean 12 GB desktop |
72K (llama-server) |
11,137 MiB |
0 |
190.2 tok/s |
47.0 tok/s |
Max tested on 12 GB (headless / clean desktop) |
Optional 4-Bit Vision (mmproj-Inkling-2-Mini-Q4.emns, 167.7 MiB / 176 MB vs 610 MiB F16)
| Vision Mode | File Size | Image Encode | Extra VRAM | Visual / OCR Quality |
|---|---|---|---|---|
Stock mmproj-F16.gguf (CPU) |
610 MiB |
2.41 s |
0 MiB |
Reference (crisp OCR) |
| Q4 Vision (CPU β Default) | 167.7 MiB (3.64Γ smaller) |
2.45 s |
0 MiB |
Matches F16 (cos = 0.995, keeps full 52K text) |
| Q4 Vision (GPU) | 167.7 MiB |
1.22 s (2Γ faster) |
+368 MiB ded / +613 MiB shr |
Matches F16 (cos = 0.995) |
NVIDIA CUDA Max Context Scaling (Synthetic Exact-Manifest Weights)
Measured using a synthetic
.emnsmatching the exact694-tensor9.20 GiBlayout to verify CUDA kernel speed, WMMA accuracy (0.000000max logprob diff), and max zero-OOM context. Does not measure model quality.
| GPU | VRAM | Backend | -ub |
pp512 (tok/s) |
tg128 (tok/s) |
Max Zero-OOM Context |
|---|---|---|---|---|---|---|
NVIDIA L4 (72 W) |
24 GB |
CUDA 13.0 (Tensor Core WMMA) |
128 / 256 |
582.8 / 748.2 |
51.8 / 51.5 |
640K (21.5 / 23.0 GiB, 47.2 tok/s) |
| NVIDIA Tesla T4 | 16 GB |
CUDA (pre-WMMA baseline) | 128 |
89.3 |
25.3 |
256K (14.4 / 15.4 GiB, 25.4 tok/s) |
Quickstart (3 Steps)
1. Download the Weights
12 GB+ VRAM (3.04 bpw, Recommended):
pip install -U "huggingface_hub[cli]"
hf download olnnn/Inkling-2-Mini-EMEANS --include "Inkling-2-Mini-3.04bpw.emns" "Inkling-2-Mini-metadata-stub.gguf" "SHA256SUMS" --local-dir ./inkling2
8 GB VRAM (2.27 bpw, Experimental):
hf download olnnn/Inkling-2-Mini-EMEANS --include "Inkling-2-Mini-2.27bpw.emns" "Inkling-2-Mini-metadata-stub.gguf" "SHA256SUMS" --local-dir ./inkling2
2. Get Patched llama-server
Download the prebuilt release for your GPU from GitHub Releases (v0.1.1-emeans):
| Platform | GPU Backend | Archive |
|---|---|---|
| Windows (x64) | NVIDIA CUDA 12.4 | llama-emeans-v0.1.1-emeans-win-cuda-12.4-x64.zip |
| Windows (x64) | AMD ROCm / HIP | llama-emeans-v0.1.1-emeans-win-rocm-x64.zip |
| Linux (x64) | NVIDIA CUDA 12.8 | llama-emeans-v0.1.1-emeans-ubuntu-cuda-12.8-x64.tar.gz |
| Linux (x64) | AMD ROCm / HIP | llama-emeans-v0.1.1-emeans-ubuntu-rocm-x64.tar.gz |
Or build from source (NVIDIA CUDA or AMD ROCm/HIP)
git clone -b emeans-hip-cuda-v1 https://github.com/olsn-bit/llama.cpp-emeans.git
cd llama.cpp-emeans
# NVIDIA CUDA (RTX 20/30/40/50, T4, L4, A100, H100)
cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --target llama-server llama-bench -j
# AMD ROCm / HIP (e.g. RX 6700 XT = gfx1031)
# cmake -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=gfx1031 -DCMAKE_BUILD_TYPE=Release
# cmake --build build --target llama-server llama-bench -j
(Alternatively, apply patches/0001-ggml-cuda-add-e-means-.emns-HIP-CUDA-kernels-WMMA-pr.patch directly onto ggml-org/llama.cpp commit b2236cb39.)
3. Load the Model (Server or CLI β Any Port, Any Client)
Option A β Local OpenAI-Compatible Server (connect any UI, coding agent, or CLI):
Change --port 8080 to any free port you prefer, then point your client at http://127.0.0.1:<PORT>/v1 (or open it in a browser):
Windows PowerShell (single-line β paste as-is; use .\bin\llama-server.exe on Windows ROCm):
$env:EMEANS_MODEL = "./inkling2/Inkling-2-Mini-3.04bpw.emns"
.\llama-server.exe -m ./inkling2/Inkling-2-Mini-metadata-stub.gguf -a Inkling-2-Mini-EMEANS -c 32768 -ngl 99 -np 1 -fa on -ctk q4_0 -ctv q4_0 --fit off -b 2048 -ub 128 --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0 --cache-reuse 256 --jinja --host 127.0.0.1 --port 8080
(Start with -c 32768 when browsers/IDEs are open to avoid VRAM spill; raise to -c 53248 on a clean 12 GB desktop.)
Linux / macOS (bash):
export EMEANS_MODEL=./inkling2/Inkling-2-Mini-3.04bpw.emns
./llama-server \
-m ./inkling2/Inkling-2-Mini-metadata-stub.gguf \
-a Inkling-2-Mini-EMEANS \
-c 32768 -ngl 99 -np 1 -fa on \
-ctk q4_0 -ctv q4_0 --fit off \
-b 2048 -ub 128 \
--temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0 \
--cache-reuse 256 --jinja \
--host 127.0.0.1 --port 8080
Option B β Direct Terminal CLI (llama-cli):
export EMEANS_MODEL=./inkling2/Inkling-2-Mini-3.04bpw.emns
./llama-cli -m ./inkling2/Inkling-2-Mini-metadata-stub.gguf -c 32768 -ngl 99 -fa on -ctk q4_0 -ctv q4_0 --fit off
(On Windows PowerShell, replace export EMEANS_MODEL=... with $env:EMEANS_MODEL = "./inkling2/Inkling-2-Mini-3.04bpw.emns" and run .\llama-cli.exe β or .\bin\llama-cli.exe on Windows ROCm.)
(For 8 GB VRAM with experimental Inkling-2-Mini-2.27bpw.emns, point EMEANS_MODEL to ./inkling2/Inkling-2-Mini-2.27bpw.emns and start with -c 16384 on desktop or -c 24576β32768 headless.)
(Optional 4-bit CPU vision = 0 MiB VRAM: set EMEANS_VISION_MODEL β $env:EMEANS_VISION_MODEL = "./inkling2/mmproj-Inkling-2-Mini-Q4.emns" in PowerShell or export EMEANS_VISION_MODEL=./inkling2/mmproj-Inkling-2-Mini-Q4.emns in bash β and add --mmproj ./inkling2/mmproj-Inkling-2-Mini-metadata-stub.gguf --no-mmproj-offload.)
Using with Coding Agents (pi, OpenCode, Cline, OpenAI API)
Set thinking/reasoning effort to low for fast coding (7/8 pass in 9.5 s avg):
pi(~/.pi/agent/settings.json):{ "modelThinkingLevels": { "local/Inkling-2-Mini-EMEANS": "low" } }- OpenAI-compatible API / OpenCode / Cline:
{ "model": "Inkling-2-Mini-EMEANS", "reasoning_effort": "low", "temperature": 1.0, "top_p": 1.0 }
Technical Details: Tensor Precision Map, Checksums & Notes
Inkling-2-Mini-3.04bpw.emns(9.20 GiB/9.87 GB,9,873,665,184bytes,694tensors):- SHA256:
2748aa8d1ebc14658624d1de60b3f108c79b8ef3eff45de1d31cb136857373bc 356FP32: all RMSNorms, MoE router gates, andsconvtensors.290EM1D_Q4_G64(4.0-bit): dense attention projections,token_embd,lm_head(10Γdigit-token Hessian +sFisherlm_head).24EM1D_Q3_G64(3.0-bit): all3Γ-looped core MoE experts (L6βL17).24EM2D_K32_G128(2.5-bit): once-executed outer MoE experts.
- SHA256:
Inkling-2-Mini-2.27bpw.emns(6.88 GiB/7.39 GB,7,387,230,816bytes,694tensors β Experimental):- SHA256:
1bed9a13791fd0060cde1f6da8c9ea3cf27c99b9a7fd1cabadd5605cfed0b574 348FP32,298EM1D_Q4_G64(4.0-bit dense/attn/embed/lm_head),48EM2D_K16_G128(2.0-bit 2D codebook across all MoE experts).- Mean MoE packing
rel_L2 = 0.3379;120/120GRPO LoRA projections merged prior to packing.
- SHA256:
- Vision (
mmproj-Inkling-2-Mini-Q4.emns,167.7 MiB/176 MB,175,809,568bytes):- SHA256:
08838738a76305f42884893b772fe20f5d8358c6fcbf8864d4b1da1607ec7262 140EM1D_Q4_G64linear layers +282FP16/FP32 tensors (cos = 0.9942β0.9955).
- SHA256:
- GRPO Recovery: Merged
120/120GRPO LoRA projections (inkling2_grpo_v1) prior to.emnspacking. - Speculative Decoding (
DSpark) Note: Tested on RX 6700 XT (61.4%acc,36.4 tok/s) and T4 (67.2%acc,23.1 tok/s). Multi-token verification activates~4Γmore unique experts on a 128-expert MoE, so no-draft is faster and lighter.
License & Credits
- Model Weights: Apache 2.0 (inherited from
thinkingmachines/Inkling-2-Mini). - Engine Patch (
.emnsHIP + CUDA kernels): MIT License (matchingggml-org/llama.cpp). - Credits: Thinking Machines Lab (
Inkling-2-Mini),ggml-org/llama.cpp,unslothai/llama.cpp.

