license: apache-2.0
base_model:
- AtomicChat/Inkling-2-Mini-Uncensored-GGUF
- thinkingmachines/Inkling-2-Mini
- unsloth/Inkling-2-Mini-GGUF
tags: - gguf
- llama.cpp
- inkling2
- moe
- vision
- uncensored
Inkling-2-Mini Uncensored fast GGUF (12 GB GPUs, 128k context, vision, 8 requests at once)
A custom quant of AtomicChat/Inkling-2-Mini-Uncensored-GGUF
(an uncensored fine-tune of thinkingmachines/Inkling-2-Mini),
built on unsloth/Inkling-2-Mini-GGUF, plus a llama.cpp engine
tuned for it. The whole model, the vision projector and a 128k KV cache fit on one 12 GB GPU.
| file | size | use |
|---|---|---|
Inkling-2-Mini-Uncensored-fast.gguf |
9.24 GB | 128k context, vision, 8 requests at once |
mmproj-Inkling-2-Mini-Q8_0.gguf |
0.35 GB | vision projector (image input) |
The model needs the inkling-fast engine from
nahcmon/inkling-fast-llama.cpp: the tensors are repacked
("folded") for that engine and do not load in stock llama.cpp.
Uncensored: this model answers many requests the original refuses (profanity, dark fiction, and more). It has no
extra safety layer. You are responsible for how you use it and what you do with its output.
Results (RTX 3080 Ti 12 GB, Windows 11)
realtest.py with the launcher's settings (128k context, 8 slots, q4_0 KV, vision loaded, desktop apps open). Reading
speed includes vision encoding and prompt processing; decode is the first reply and a follow-up at about 9k tokens.
| model | photo / screenshot / paste (tok/s) | decode first / follow-up (tok/s) |
|---|---|---|
| Uncensored fast | 855 / 1001 / 1842 | 82.5 / 73.5 |
| previous release (fast-9.3-tuned, same run) | 843 / 973 / 1805 | 82.1 / 73.4 |
Quality, kld.py (mean KLD vs Q8 reference logits, 80 x 512 tokens of held-out text, f16 KV). The reference for the
uncensored model is Unsloth UD-Q8_K_XL with AtomicChat's edit merged in at full precision:
| model | size | reference | mean KLD | top-1 |
|---|---|---|---|---|
| Uncensored fast | 9.24 GB | uncensored Q8 | 0.0376 | 93.3% |
| previous release (fast-9.3-tuned) | 9.24 GB | uncensored Q8 | 0.0400 | 93.0% |
| previous release (fast-9.3-tuned) | 9.24 GB | original Q8 | 0.0391 | 93.1% |
8 requests at once (end-to-end HTTP benchmark, 256 tokens each, all started together, earlier 128k release):
26.7 tok/s each, 196.5 tok/s total. A follow-up message in a running chat shows its first token after 131 ms
(short history) to 219 ms (42k-token history) (ttft.py, median).
First release (64k context, one chat, fast-folded)
| original (UD-Q4_K_M, stock llama.cpp) | inkling-fast | |
|---|---|---|
| decode, short prompt | 12.2 tok/s (27.4 hand-tuned) | 76.7 tok/s |
| decode after a 48k-token prompt | 12.5 tok/s | 56.0 tok/s |
| prefill of a 48k-token prompt | 199 tok/s | 1632 tok/s |
| VRAM | 10.6 GB (rest in system RAM) | 11.9 GB, all on the GPU |
bench.py; "hand-tuned" = original with -ngl 99 --fit off --n-cpu-moe 9, the fastest setting that fits.
How the speedup was made
The original 15.5 GB file does not fit on a 12 GB card, so part of the experts run on the CPU and every token waits for
system RAM. Most of the gain comes from making it fit; the rest from running fewer GPU kernels per token.
- A quant that fits. Expert gate/up in IQ2_XXS..IQ2_S (importance-matrix weighted), expert down IQ2_XXS..IQ3_XXS
per layer group (padded rows), attention in Q5_K, bits placed by measured per-layer sensitivity. - GPTQ-style error compensation for expert gate/up: each 256-column block's quantization error is cancelled in
the columns not yet quantized, using the layer's input covariance (KLD 0.0491 to 0.0428 at the same size). - Learned block scales: per layer the fp16 block scales of the expert weights get learned multipliers
(codes frozen) so the MoE block output matches the Q8 reference, on top of GPTQ rebuilt with a 3x larger
chat + docs calibration set: KLD 0.0428 to 0.0391, same size and speed. - Uncensored edit merged at full precision: AtomicChat's change is a rank-1 LoRA on the attention output, the
expert down projections and the token embedding. It was merged into the Q8 weights, and only those tensors were
re-quantized with the same types. Expert gate/up are untouched by the edit, so the GPTQ and tuned weights carry
over. (Tuning the scales again on top made KLD worse, 0.0386, so it was not used.) - Folded weights: projections that read the same input are packed into one tensor, so one matmul replaces several.
- Fused depth mix: one kernel per mix (scores, softmax, weighted sum) over a shared normalized bank of block outputs.
- Banded flash attention: the relative-position bias is computed inside the attention kernel, not as a dense
bias tensor; q4_0 KV tiles are dequantized while loading, so there is no f16 copy of the cache. - One shared attention mask per graph instead of one per layer.
- Fused glue kernels: SiTU activation, short convolution with state update and residual, dynamic K/V convolution,
row L2 clip and the MoE router each run as one kernel. Bit-exact, +6.5% decode, +10% prefill. - Faster MoE kernel for several chats: a gate-free variant of the fused expert-scale kernel (it was 50x slower
with more than one token per expert). 8 chats: 98 to 237 tok/s decode. - Parallel requests: one shared KV cache (
-np 8 -kvu), prefill split per sequence, requests admitted by real
free KV cells, and shared prompt prefixes stored once (8 subagents took a 13.1k-token system prompt in 7-42 ms each). - Fast follow-ups: one prompt batch per follow-up, CUDA graphs for prompt batches, and a tokenizer cache.
- Server settings:
-lm none,--cache-ram 0,--ctx-checkpoints 2(RAM stays flat in long chats),-ub 512. - Speculative decoding (DSpark) tested, not used: on this MoE every draft token loads more experts; slower at
temperature 1.0.
Every engine change was checked against reference logits; none changed the output beyond float rounding.
Running it
Build the engine from nahcmon/inkling-fast-llama.cpp (build steps
and the Windows launcher inkling-fast/run-inkling.ps1 are in inkling-fast/), or run it directly:
llama-server -m Inkling-2-Mini-Uncensored-fast.gguf --mmproj mmproj-Inkling-2-Mini-Q8_0.gguf -c 131072 -ub 512 -t 2 ^
-ctk q4_0 -ctv q4_0 -bs --jinja -ngl 99 --fit off -fa on -np 8 -kvu --ctx-checkpoints 2 -lm none --cache-ram 0 ^
--image-max-tokens 1024 --alias inkling-2-mini --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0
The context is one pool shared by all slots: one request can use all of it. A smaller -c (e.g. 65536) leaves VRAM
for other apps. Images work in the web UI and the OpenAI API (image_url, base64 data URLs).
License
Apache-2.0, as the base model. Credit: Thinking Machines (the model), AtomicChat (the uncensored fine-tune),
Unsloth (the source GGUF).