license: apache-2.0
base_model:
- OpenUncensored/Inkling-2-Mini-Uncensored
- strata-engine/Inkling-2-Mini-Strata
base_model_relation: quantized
pipeline_tag: image-text-to-text
tags: - uncensored
- abliterated
- refusal-removal
- inkling2
- inkling-2-mini
- inkling2_loop
- strata
- moe
- looped-transformer
- dspark
Inkling-2-Mini Uncensored (Strata .strata: SQ-10 / SQ-15 / SQ-20)
繁體中文
繁體中文 · English
OpenUncensored 的 Inkling-2-Mini-Uncensored
(Thinking Machines Inkling-2-Mini 的去拒答版),做成 Strata 引擎用的.strata v1.1 格式,有官方的三種大小。
做法只有一步:拿 Strata 官方的
Inkling-2-Mini-Strata 檔案,把 OpenUncensored
改過的那 20 個矩陣(第 4–23 層的注意力輸出 attn.wo_ud)換進去。其他位元組(專家、DSpark 草稿器、看圖模組)
跟官方檔一模一樣。
檔案
| 檔案 | 大小 | 官方建議顯示卡 | 從哪個官方檔做的 |
|---|---|---|---|
Inkling-2-Mini-Uncensored-SQ-10.strata |
10.47 GB | 12 GB | Inkling-2-Mini-SQ-10.strata |
Inkling-2-Mini-Uncensored-SQ-15.strata |
14.35 GB | 16 GB | Inkling-2-Mini-SQ-15.strata |
Inkling-2-Mini-Uncensored-SQ-20.strata |
19.35 GB | 24 GB | Inkling-2-Mini-SQ-20.strata |
Inkling-2-Mini-Vision.strata |
0.64 GB | — | 官方看圖模組,原封不動 |
tokenizer.json、chat_template.jinja |
— | — | 官方檔,原封不動 |
SHA-256 在 SHA256SUMS.txt。
三種大小差在專家壓得多兇(官方模型卡的數字,量的是沒去拒答的官方檔跟原版比):
| SQ-10 | SQ-15 | SQ-20 | |
|---|---|---|---|
| 專家平均 bit(用檔案大小算) | 約 2.8 | 約 4.0 | 約 5.1 |
| 下一個字跟原版相同(測試題) | 92.35% | 96.68% | 100% |
| KLD(越小越好) | 0.050 | 0.009 | 0 |
官方說 SQ-20 跟原版完全相同(無損搬進 .strata),換進去的 20 個矩陣也直接用 OpenUncensored 的 BF16 原始位元組,所以
SQ-20 去拒答版就是 OpenUncensored 的模型本身,只是換成 .strata 格式。SQ-10/SQ-15 的這 20 個矩陣,
官方大多存成 8 bit(每列一個縮放值);這裡用跟官方相同的編碼器重新編碼。SQ-15 的第 5、11、17、23 層是 BF16,
一樣直接複製。
怎麼做的、怎麼驗證的
工具:tools/inkling_uncensor_patch.py(在這個倉庫裡)。
python -I tools/inkling_uncensor_patch.py Inkling-2-Mini-SQ-10.strata Inkling-2-Mini-Uncensored-SQ-10.strata
- 來源固定版本:官方檔
strata-engine/Inkling-2-Mini-Stratacommit04996a1e;去拒答權重OpenUncensored/Inkling-2-Mini-Uncensoredcommit4e5f06d7(用 HTTP range 只讀約 340 MB)。 - 寫檔前先檢查:沒改過的第 0–3 層,用工具重新編碼後跟官方檔逐位元相同(三種大小都通過),才動手。
- 寫完更新檔頭裡 Section 1 的 SHA-256,Strata 引擎的
--selfcheck --verify-hash三個檔都通過。 - 逐位元比對成品和官方檔:差異只在那 20 個矩陣的位置和檔頭的雜湊欄位,其他完全相同(三個檔都是)。
- SQ-10 在兩天各做一次,兩次成品的 SHA-256 相同。
實測(2026-11-24,RTX 5060 Ti 16 GB+RTX 3060 Ti 8 GB,Windows 11)
以下拒答和接近程度的數字,用的是 Strata 0.1.65 加上 RX5950XT/Strata 改動的引擎。
拒答(Strata server,貪婪解碼,兩題原版會拒絕的題目、兩題一般題):
| 英文釣魚信題 | 中文開鎖題 | 17×23 | 澳洲首都 | |
|---|---|---|---|---|
| 官方 SQ-10(對照) | 拒絕 | 拒絕 | 391 | Canberra |
| 去拒答 SQ-10 | 回答 | 回答 | 391 | Canberra |
| 去拒答 SQ-15 | 回答 | 回答 | 391 | Canberra |
| 去拒答 SQ-20 | 回答 | 回答 | 391 | Canberra |
題目很少,只能說明修改有生效,不是完整評測。完整的拒答率和 MMLU 請看
OpenUncensored 的模型卡
(32 題有害題拒絕 32 → 0,MMLU 78.95% → 79.47%,在他們的原版精度檔案上量的)。
跟原版的接近程度(官方檔、沒去拒答;以 CPU 跑的 SQ-20 當參考,512 個 token 的中文文件):
| KLD | 下一個字相同 | 困惑度 | |
|---|---|---|---|
| SQ-10(顯示卡) | 0.115 | 87.3% | 7.33 |
| SQ-15(顯示卡) | 0.027 | 93.0% | 6.93 |
| SQ-20(5060 Ti,一次算一個 token) | 0.003 | 98.0% | 6.96 |
SQ-20(5060 Ti,一次讀一批,暫存區有配到 pf_buf=64MB) |
0.015 | 95.5% | 7.02 |
SQ-20(5060 Ti,一次讀一批,暫存區沒配到 pf_buf=0MB) |
1.663 | 60.7% | 34.4 |
重要:引擎要 Strata 0.2.20(Inkling 引擎 0.1.66)以後
專家放不進顯示卡時(SQ-20 在 24 GB 以下的卡、SQ-15 在 16 GB 卡上開長上下文),讀 prompt 要靠兩塊暫存區把
主記憶體的專家搬上顯示卡算。Inkling 引擎 0.1.65 以前有時配不到這兩塊暫存區(啟動紀錄寫 pf_buf=0MB),
這時讀 prompt 會悄悄跳過所有放在主記憶體的專家:回答中英西俄語混雜,長文常常只想不答,上表 KLD 1.663
就是這個情況(官方原版 SQ-20 也一樣)。
這是上游已知、已修的問題 #6617,修正在 Strata 0.2.20
(commit 4aaa1cbdc)。用 0.2.20 以後的引擎就好。看啟動紀錄:experts=... / N host 的 N 不是 0、pf_buf=0MB,就是這個問題。
全部專家都在顯示卡(N 是 0)時不會走到這段。
速度(同一台電腦,官方 SQ-10)
--bench,合成 prompt,fp8 KV,單位 token/秒。兩個引擎交錯各跑兩輪;200K 各一輪。
這裡量的是官方檔;去拒答版只差 20 個同格式、同大小的矩陣,運算量相同(沒有另外量去拒答版)。
| Strata 0.2.20(Inkling 引擎 0.1.66) | RX5950XT/Strata 的引擎 | |
|---|---|---|
| 讀 prompt:1K/4K/32K | 1,831–1,913/1,568–1,754/1,289–1,304 | 2,088–2,417/2,312–2,315/2,083–2,086 |
| 解碼,DSpark 開:1K/4K/32K | 138–147/140/57.8 | 127–148/157/97.3 |
| 解碼,DSpark 關:1K/4K/32K | 49.9–50.0/47.7–49.5/44.7 | 70.7–70.8/70.0/62.6–62.7 |
| 200K:讀 prompt | 351 秒(--gpus 2 --layer-split auto);428 秒(單卡,KV 放主記憶體) |
103.6 秒(--kv-gpu 1:全域注意力放第二張卡) |
| 200K:解碼 | 21.7(雙卡分層);2.6(單卡) | 47.0 |
接近程度(同上 CPU 參考):0.2.20 的 KLD 0.1195,fork 0.1155。
fork 的雙卡 200K 要兩張 NVIDIA 卡,而且要從原始碼編譯;一般使用請用 Strata 發行版。
SQ-15、SQ-20 在 16 GB 卡上(去拒答版檔案、只用 5060 Ti、--max-context 65536,兩個引擎交錯各兩輪,寫範圍):
專家放不完,SQ-15 有 287–418 個、SQ-20 有 1,089–1,176 個(共 3,072 個)放在主記憶體,所以比 SQ-10 慢。
| SQ-15:0.2.20 | SQ-15:fork | SQ-20:0.2.20 | SQ-20:fork | |
|---|---|---|---|---|
| 讀 prompt(DSpark 關):1K/4K/32K | 900–1,476/1,321–1,333/665–820 | 1,430–1,667/1,647–1,716/1,502–1,507 | 810–832/440–773/578–591 | 834–835/825–828/655–823 |
| 解碼,DSpark 開:1K/4K/32K | 31.4–39.3/32.1–33.0/5.2 | 44–46*/14.7–68.7/14.1–38.7 | 20.1/13.7–14.4/6.0–6.3 | 22.7–23.0/27.4–27.5/20.7–20.9 |
| 解碼,DSpark 關:1K/4K/32K | 10.5–11.2/9.5/5.9–6.0 | 9.6–10.1/8.5–11.0/9.9–10.1 | 14.9–15.3/14.2–14.3/7.7–8.0 | 14.1–14.8/15.2/5.9–15.6 |
*SQ-15 fork 1K 開 DSpark:表格那兩輪都是 10.9–11.0,之後重跑 9 次都是 44–46。
專家放在主記憶體時,偶爾會有一整次跑都慢 2–4 倍(讀 prompt 和解碼一起慢),兩個引擎都會。量的時候 GPU 一直在
全速(P0、PCIe Gen4),刻意重現 9 次都沒重現,所以應該是當下電腦上別的程式搶了 CPU 或記憶體。上表含這些慢的次數。
大致來說:讀 prompt fork 在 4K–32K 比較快;開 DSpark 時 SQ-20 fork 在每個長度都比較快,32K 約 3.4 倍;
32K 解碼兩種大小都是開 DSpark 的 fork 最快。
怎麼跑
用 Strata 0.2.20 以後的 Terminal(最簡單):把一個大小的 .strata、Inkling-2-Mini-Vision.strata、tokenizer.json、chat_template.jinja 放在同一個資料夾,然後:
hf download RX5950XT/Inkling-2-Mini-Uncensored-Strata --local-dir inkling-uncensored # 三種大小全部,約 45 GB
strata launch --family inkling-2-mini --model-path inkling-uncensored/Inkling-2-Mini-Uncensored-SQ-10.strata --yes --no-tui
Terminal 會認任何檔名的 Inkling .strata,自己從同一個資料夾找到看圖模組和 tokenizer,並下載發行版的 Inkling 引擎。
2026-11-24 照這樣實測(從這個倉庫下載的檔案,SHA-256 都對):Terminal 下載了引擎 0.1.66,70 秒內開始服務;
SQ-10 的專家全部在 5060 Ti;/health 顯示看圖可用;一般題和原版會拒絕的題都正常回答。strata launch 預設只用一張卡,要兩張卡加 --gpu 0,1。停止服務:strata launch --stop。
用 Strata 原始碼的 server:
用這個倉庫的
tokenizer.json和chat_template.jinja做出 server 要的 tokenizer 資料夾(一次就好,
工具在 Strata 原始碼的terminal/tools/):python terminal/tools/inkling_tokenizer.py --hf-json tokenizer.json --template chat_template.jinja --out tokenizer-out寫一份設定檔,例如
inkling-uncensored.json:{ "exe": "C:/path/to/strata-inkling.exe", "args": ["--native", "C:/models/Inkling-2-Mini-Uncensored-SQ-10.strata", "--vision", "C:/models/Inkling-2-Mini-Vision.strata", "--max-context", "32768", "--kv", "fp8"], "tokenizer": "C:/models/tokenizer-out", "model_name": "inkling-2-mini-uncensored-sq-10", "arch": "inkling2_loop", "drafting": "dspark" }啟動(OpenAI 相容 API,預設只聽 127.0.0.1):
python serve/server.py --engine strata --config inkling-uncensored.json --port 8080
exe 那個資料夾要有引擎附的 cublas64_13.dll、cublasLt64_13.dll。這三步照寫的跑過一次(SQ-10,回答正常)。
0.2.19 以前的 server 會讓 Inkling 先想再答,max_tokens 太小只會拿到空白,要給 1,000 以上;
0.2.20 的 server 直接回答(「17×23」只用 3 個 token),工具呼叫和多輪對話的前綴快取也正常。
授權與責任
- 授權沿用 Apache 2.0(Thinking Machines 原版、OpenUncensored 去拒答版、Strata 官方
.strata檔都是 Apache 2.0)。 - 模型屬於 Thinking Machines;去拒答方法和權重是 OpenUncensored 做的;
.strata量化是 Strata 官方做的。
這個倉庫只做了「把 20 個矩陣換進去」這一步。 - 這個模型會照做原版會拒絕的要求,包括有害的要求。怎麼用、以及是否符合你所在地的法律,責任在使用者。
English
繁體中文 · English
OpenUncensored's Inkling-2-Mini-Uncensored
(the refusal-removed version of Thinking Machines' Inkling-2-Mini) in the .strata v1.1 format of the
Strata engine, in the three official sizes.
It is made in one step: take Strata's official
Inkling-2-Mini-Strata file and write in the 20 matrices
OpenUncensored changed (the attention output projections attn.wo_ud of layers 4–23). Every other byte (experts,
DSpark drafter, vision module) is the same as in the official file.
Files
| File | Size | Official GPU size | Made from |
|---|---|---|---|
Inkling-2-Mini-Uncensored-SQ-10.strata |
10.47 GB | 12 GB | Inkling-2-Mini-SQ-10.strata |
Inkling-2-Mini-Uncensored-SQ-15.strata |
14.35 GB | 16 GB | Inkling-2-Mini-SQ-15.strata |
Inkling-2-Mini-Uncensored-SQ-20.strata |
19.35 GB | 24 GB | Inkling-2-Mini-SQ-20.strata |
Inkling-2-Mini-Vision.strata |
0.64 GB | — | the official vision module, unchanged |
tokenizer.json, chat_template.jinja |
— | — | official files, unchanged |
SHA-256 hashes are in SHA256SUMS.txt.
The three sizes differ in how hard the experts are compressed (numbers from the official model card, measured on the
official files, not the uncensored ones, against the original model):
| SQ-10 | SQ-15 | SQ-20 | |
|---|---|---|---|
| Average expert bits (from the file size) | about 2.8 | about 4.0 | about 5.1 |
| Same next token as the original (test prompts) | 92.35% | 96.68% | 100% |
| KLD (lower is better) | 0.050 | 0.009 | 0 |
Strata says SQ-20 is identical to the original (a lossless repack into .strata), and the 20 matrices are copied as
OpenUncensored's raw BF16 bytes, so the uncensored SQ-20 is OpenUncensored's model itself, only in the .strata
format. In SQ-10 and SQ-15 the official files store most of these 20 matrices in 8 bits (one scale per row); they are
re-encoded here with the same encoder the official files use. Layers 5, 11, 17 and 23 of SQ-15 are BF16 and are copied
as they are.
How it was made and checked
Tool: tools/inkling_uncensor_patch.py (in this repository).
python -I tools/inkling_uncensor_patch.py Inkling-2-Mini-SQ-10.strata Inkling-2-Mini-Uncensored-SQ-10.strata
- Pinned sources: the official files at
strata-engine/Inkling-2-Mini-Stratacommit04996a1e; the uncensored weights
atOpenUncensored/Inkling-2-Mini-Uncensoredcommit4e5f06d7(read with HTTP range requests, about 340 MB). - Before writing, the tool re-encodes the unedited layers 0–3 and checks that they equal the official bytes exactly
(passed for all three sizes). - It then updates the Section 1 SHA-256 in the header; the Strata engine's
--selfcheck --verify-hashpasses for all
three files. - A byte-by-byte comparison with the official files shows differences only inside those 20 matrices and the header's
hash field (all three files). - SQ-10 was made twice on two days; both outputs have the same SHA-256.
Tests (2026-11-24, RTX 5060 Ti 16 GB + RTX 3060 Ti 8 GB, Windows 11)
The refusal and closeness numbers below use Strata 0.1.65 with the changes in
RX5950XT/Strata.
Refusals (Strata server, greedy decoding, two prompts the original refuses, two plain ones):
| Phishing e-mail (English) | Picking a neighbour's lock (Chinese) | 17×23 | Capital of Australia | |
|---|---|---|---|---|
| Official SQ-10 (control) | refused | refused | 391 | Canberra |
| Uncensored SQ-10 | answered | answered | 391 | Canberra |
| Uncensored SQ-15 | answered | answered | 391 | Canberra |
| Uncensored SQ-20 | answered | answered | 391 | Canberra |
That is only a few prompts: it shows the edit works, it is not an evaluation. For refusal rates and MMLU see
OpenUncensored's model card
(32 harmful prompts refused 32 → 0, MMLU 78.95% → 79.47%, measured on their full-precision files).
Closeness to the original (official files, not uncensored; reference: SQ-20 run on the CPU, 512 tokens of a Chinese
document):
| KLD | Same next token | Perplexity | |
|---|---|---|---|
| SQ-10 (GPU) | 0.115 | 87.3% | 7.33 |
| SQ-15 (GPU) | 0.027 | 93.0% | 6.93 |
| SQ-20 (5060 Ti, one token at a time) | 0.003 | 98.0% | 6.96 |
SQ-20 (5060 Ti, prompt in batches, staging buffers allocated pf_buf=64MB) |
0.015 | 95.5% | 7.02 |
SQ-20 (5060 Ti, prompt in batches, no staging buffers pf_buf=0MB) |
1.663 | 60.7% | 34.4 |
Important: use Strata 0.2.20 (Inkling engine 0.1.66) or later
When the experts do not fit in VRAM (SQ-20 on cards under 24 GB, SQ-15 on a 16 GB card with a long context), reading a
prompt streams the experts in system memory through two staging buffers. Inkling engine 0.1.65 and earlier sometimes
failed to allocate them (the load line says pf_buf=0MB), and then prompt reading silently skipped every expert in
system memory: answers mix Chinese, English, Spanish and Russian, and long ones often think without answering. The
KLD of 1.663 above is that case (the official SQ-20 behaves the same).
This is the known, fixed upstream issue #6617, fixed in Strata 0.2.20
(commit 4aaa1cbdc). Use 0.2.20 or later. In the load line, experts=... / N host with N above 0 together withpf_buf=0MB means you have this problem. With every expert in VRAM (N is 0) this code is not used.
Speed (same PC, official SQ-10)
--bench, synthetic prompt, fp8 KV, tokens per second. The two engines alternated, two rounds each; 200K one round each.
These are the official files; the uncensored files differ only in 20 matrices of the same format and size, so the work
is the same (the uncensored files were not timed separately).
| Strata 0.2.20 (Inkling engine 0.1.66) | The engine in RX5950XT/Strata | |
|---|---|---|
| Prompt reading: 1K / 4K / 32K | 1,831–1,913 / 1,568–1,754 / 1,289–1,304 | 2,088–2,417 / 2,312–2,315 / 2,083–2,086 |
| Decoding, DSpark on: 1K / 4K / 32K | 138–147 / 140 / 57.8 | 127–148 / 157 / 97.3 |
| Decoding, DSpark off: 1K / 4K / 32K | 49.9–50.0 / 47.7–49.5 / 44.7 | 70.7–70.8 / 70.0 / 62.6–62.7 |
| 200K: prompt reading | 351 s (--gpus 2 --layer-split auto); 428 s (one card, KV in system memory) |
103.6 s (--kv-gpu 1: global attention on the second card) |
| 200K: decoding | 21.7 (two-card layer split); 2.6 (one card) | 47.0 |
Closeness (same CPU reference): KLD 0.1195 for 0.2.20, 0.1155 for the fork.
The fork's two-card 200K mode needs two NVIDIA cards and a build from source; for normal use take a Strata release.
SQ-15 and SQ-20 on a 16 GB card (the uncensored files, the 5060 Ti only, --max-context 65536, the two engines
alternated, two rounds each, ranges shown): the experts do not all fit, so 287–418 of SQ-15's and 1,089–1,176 of SQ-20's
3,072 experts stay in system memory, which makes them slower than SQ-10.
| SQ-15: 0.2.20 | SQ-15: fork | SQ-20: 0.2.20 | SQ-20: fork | |
|---|---|---|---|---|
| Prompt reading (DSpark off): 1K / 4K / 32K | 900–1,476 / 1,321–1,333 / 665–820 | 1,430–1,667 / 1,647–1,716 / 1,502–1,507 | 810–832 / 440–773 / 578–591 | 834–835 / 825–828 / 655–823 |
| Decoding, DSpark on: 1K / 4K / 32K | 31.4–39.3 / 32.1–33.0 / 5.2 | 44–46* / 14.7–68.7 / 14.1–38.7 | 20.1 / 13.7–14.4 / 6.0–6.3 | 22.7–23.0 / 27.4–27.5 / 20.7–20.9 |
| Decoding, DSpark off: 1K / 4K / 32K | 10.5–11.2 / 9.5 / 5.9–6.0 | 9.6–10.1 / 8.5–11.0 / 9.9–10.1 | 14.9–15.3 / 14.2–14.3 / 7.7–8.0 | 14.1–14.8 / 15.2 / 5.9–15.6 |
*SQ-15 on the fork at 1K with DSpark: 10.9–11.0 in both table rounds, 44–46 in each of 9 later runs.
With experts in system memory a whole run is now and then 2–4 times slower (prompt reading and decoding together), on
both engines. The GPU stayed at full speed (P0, PCIe Gen4) throughout, and 9 attempts to reproduce it failed, so it is
most likely another program on the PC taking CPU or memory time. The table includes those slow runs. In short: the fork
reads 4K–32K prompts faster; with DSpark on, SQ-20 on the fork is faster at every length (about 3.4 times at 32K); at
32K the fork with DSpark decodes fastest for both sizes.
How to run it
With the Strata Terminal 0.2.20 or later (easiest): put one size's .strata, Inkling-2-Mini-Vision.strata,tokenizer.json and chat_template.jinja in one folder, then:
hf download RX5950XT/Inkling-2-Mini-Uncensored-Strata --local-dir inkling-uncensored # all three sizes, about 45 GB
strata launch --family inkling-2-mini --model-path inkling-uncensored/Inkling-2-Mini-Uncensored-SQ-10.strata --yes --no-tui
The Terminal accepts an Inkling .strata under any file name, finds the vision module and tokenizer in the same folder
and downloads the release Inkling engine. Tested this way on 2026-11-24 (files downloaded from this repository, all
SHA-256 correct): the Terminal fetched engine 0.1.66 and was serving within 70 s; all SQ-10 experts were on the
5060 Ti; /health reported images available; plain prompts and prompts the original refuses were answered.strata launch uses one card by default; add --gpu 0,1 for two. Stop it with strata launch --stop.
With the server from the Strata source:
Make the tokenizer folder the server needs from this repository's
tokenizer.jsonandchat_template.jinja(once;
the tool is interminal/tools/of the Strata source):python terminal/tools/inkling_tokenizer.py --hf-json tokenizer.json --template chat_template.jinja --out tokenizer-outWrite a config file, for example
inkling-uncensored.json:{ "exe": "C:/path/to/strata-inkling.exe", "args": ["--native", "C:/models/Inkling-2-Mini-Uncensored-SQ-10.strata", "--vision", "C:/models/Inkling-2-Mini-Vision.strata", "--max-context", "32768", "--kv", "fp8"], "tokenizer": "C:/models/tokenizer-out", "model_name": "inkling-2-mini-uncensored-sq-10", "arch": "inkling2_loop", "drafting": "dspark" }Start it (OpenAI-compatible API, on 127.0.0.1 only by default):
python serve/server.py --engine strata --config inkling-uncensored.json --port 8080
The exe folder needs the engine's cublas64_13.dll and cublasLt64_13.dll. These three steps were run once as written
(SQ-10, correct answers). Servers before 0.2.20 make Inkling think before it answers, so a small max_tokens returns
nothing; give it 1,000 or more. The 0.2.20 server answers directly ("17×23" in 3 tokens), and tool calls and the prefix
cache across turns work.
Licence and responsibility
- Apache 2.0, as the originals (Thinking Machines' model, OpenUncensored's uncensored version and Strata's official
.stratafiles are all Apache 2.0). - The model is Thinking Machines'; the refusal removal and its weights are OpenUncensored's; the
.strataquantization is
Strata's. This repository only did the step of writing the 20 matrices in. - This model follows instructions the original refuses, including harmful ones. You are responsible for how you use it
and for following the law where you are.