Skip to content
Proyectos

Acerca de

Fast local LLM engine for Qwen3.8-27B, Inkling-2 Mini & Gemma 4 31B: 4-bit RotG4 KV, 2-GPU TP=2, browser GUI, OpenAI API, Windows CUDA + Linux/V100/AMD ROCm HIP source builds

IA y aprendizaje automático

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
+5
in 7 days
Recopilando historial
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

YASAKANI

English · 日本語

YASAKANI is a fast local inference engine that runs Qwen3.8-27B (and experimentally Inkling-2 Mini and Gemma 4 31B) on a Windows or Linux PC with a single NVIDIA RTX GPU (tested by the developer on the RTX 5090 only). After a zero-terminal browser setup, you can chat, branch conversations, run diagnostics, attach files, and edit code completely offline in your browser, or connect tools like Cursor, Cline, Roo Code, Claude Code, and Continue through its OpenAI-compatible API (http://127.0.0.1:8765/v1).

  • New in v0.6.1:
    • Full AMD Radeon RDNA 3 / RDNA 4 Engine Build (-DYSKN_HIP=ON): Promotes AMD support from standalone kernels to a complete runnable libyskn.so built directly via ROCm Clang/HIP (no NVIDIA CUDA Toolkit needed), targeting RX 7900 XTX (gfx1100) / RX 9070 XT & Radeon AI PRO R9700 32 GB (gfx1201) with verified Wave32 v_wmma_f32_16x16x16_f16 & v_dot4_i32_iu8, automatic rocm-smi VRAM planning, and automatic build_hip/bin/libyskn.so discovery (ROCm 6.4.1 build & ISA audited; physical Radeon feedback welcome).
    • Physical 2× V100 / 2-GPU TP=2 Fixes & M >= 65 Sync Fix (#41): Merges PR #41 by @kinoyu-ai (physical 2× Tesla V100-SXM2-16GB cross-device CUDA events, Volta RotG4 M=1..64 bit-exact width invariance, 2-GPU visible_only() & VRAM planning, widecheck status fix) and adds the missing __syncthreads() barrier in src/q35_g6_volta.cuh that caused non-determinism at M >= 65 on AMD Wave32 / Volta.
    • TP=2 Non-P2P Host-Fallback Turbo (Zero CPU Add / Zero CPU Sync): Eliminates single-threaded CPU reduction loops and ~390/step CPU stream syncs on heterogeneous/non-P2P 2-GPU rigs in both Qwen3.8-27B and Inkling-2 Mini—using zero-copy mapped host memory for decode/amax and 8-slice full-duplex pipelined DMA + GPU-side FP32 addition for prefill (0-ULP bit-exact; RTX 5090 forced-host A/B: 32K prefill 2,265 → 2,723 tok/s exact FP32, or 3,603 tok/s (+59%) with opt-in YSKN_TP_HOST_BF16=1, selfcheck PASS).
    • Inkling-2 Mini OpenAI tools HTTP 500 Fix & Community Tidy-Up: Fixes ValueError: too many values to unpack in server.py when recording prefix cache metadata on 3-tuple Ink2Runner.prepare() tool requests (both streaming and non-streaming), adds --loop 2|3 VRAM accounting to gpu.py, adds GPU/Bug issue templates, updates CONTRIBUTING.md, and adds GitHub Discussions links.
  • New in v0.6.0:
    • Faster Prompt Reading (Prefill Turbo) across RTX 30 / 40 / 50: Up to 1.43× faster end-to-end prompt reading on Qwen3.8-27B (64K: 18.6 s → 13.0 s, 8K: 5,311 → 6,965 tok/s pure prefill on RTX 5090, 32/32 greedy match, zero decode slowdown) via 16-warp zero-reload GEMM, WY Chunkwise-64 TF32 GDN, and BF16 / ephemeral-FP8 FlashAttention-2 over the 4-bit RotG4 KV cache; 2.0–2.39× faster on Inkling-2 Mini (3,526 tok/s at 2K, up to 4,930 tok/s / 3.32× in 2-plane mode) (details · Prefill table).
    • 2-GPU Tensor Parallelism (TP=2): Run Qwen3.8-27B or Inkling-2 Mini across 2 GPUs (YSKN_DEVICES=0,1), splitting weights and KV cache 50% / 50% across both cards with bit-exact int64 AllReduce on Qwen3.8 (0.00e+00 logit diff for M <= 64, selfcheck PASS) and 100% token-exact execution on Inkling-2 Mini (verified on RTX 5090 via same-GPU, P2P, and Host fallback; physical 2-card hardware feedback welcome).
    • NVIDIA V100 (sm_70, Volta) Native Support & AMD Radeon RDNA 3 / 4 Experimental HIP Kernels: Adds native sm_70 Tensor Core (HMMA.884) + IDP.4A paths for both Qwen3.8-27B and Inkling-2 Mini (source build with CUDA 12.x; real sm_70 SASS verified at 0 B spills, virtual 1×V100 & 2×V100 262K selfcheck PASS on RTX 5090 via YSKN_VOLTA_PATH=1), plus an experimental AMD RDNA 3 (gfx1100, RX 7900 XTX) & RDNA 4 (gfx1201, RX 9070 XT) HIP core kernel library (src/gpu_compat.hpp, src/hip/, ROCm 6.4.1 hipcc verified 40/40 Wave32 kernels at 0 B spills; full host-runtime HIP integration is next).
  • New in v0.5.2:
    • Complete Zero-Terminal Browser GUI & Zero-Telemetry DeepSeek Harness (START.cmd / ./START.sh), constrained structured outputs (response_format: json_object | json_schema, tool_choice: "required"), exact stop pruning, Linux ./START.sh, 16 GB safety margin (#37), and Prometheus /metrics (details).
  • New in v0.5.0: Unifies all three model families (Qwen3.8-27B, Gemma 4 31B, Inkling-2 Mini, including --loop, --parallel N, and Linux -DYSKN_WITH_INK2=ON) onto a zero-calibration 4-bit RotG4 (Rotated Gaussian 4-Bit) KV cache—retiring KV8, KV5, Inkling-2 MXFP8, and Linux global BF16 KV (details).
  • New in v0.4.4: Integrates Looped Qwen3.8-27B (LOOPthinking mode T=2 / T=3) into yskn.dll and the browser UI (details).
  • New in v0.4.0–v0.4.3: Experimental Gemma 4 31B Dense (0.4.3), 16 GB / 24 GB auto-context & browser UI upgrade (0.4.2), 8.42 GB lightweight model for 12 GB cards (0.4.1), and multi-branch look-ahead tree, 2-to-64-row bit-exact width invariance, and pattern edit copy (0.4.0).

Download for Windows (v0.6.1) · Release files & SHA-256 · Discussions (Q&A & GPU chat) · Compare eight engines · Quantization & converters (Apache-2.0) · Watch an uncut code edit

Models and hardware

One RTX 5090, one request at a time, thinking off, --max-ctx 32768, median of 3 runs (v0.4.0–0.4.2 engine, prompt reading excluded). Max-quality (15.72 GB): 399 / 2,036 tok/s. Quality [recommended] (12.37 GB): 432 / 2,074 tok/s. Fastest (10.31 GB): 494 / 2,096 tok/s. Lightweight (8.42 GB): 521 / 2,116 tok/s.

All speed figures above were measured on one RTX 5090, one request at a time, thinking off, --max-ctx 32768, median of 3 runs (generation tok/s, prompt reading excluded). JSONL edit changes one record out of 60 JSONL lines and returns the full file, where wide copy passes verify up to 64 copied tokens in a single model pass. Other GPUs are slower, and their speed or compatibility is not guaranteed.

Six models to choose from

# Model Main file Target VRAM Summary & Hugging Face
1 Quality [Recommended] 12.37 GB 24 GB+ Best everyday balance of accuracy and speed (Hugging Face)
2 Fastest 10.31 GB 16 GB+ Smaller file and higher speed for 16 GB+ RTX cards (Hugging Face)
3 Max-quality 15.72 GB 24 GB+ 1 bit/weight higher than Quality throughout; closest to BF16 (details · Hugging Face)
4 Lightweight 8.42 GB 12 GB+ Mixed 2/3/4-bit quantization built for 12 GB+ RTX cards (details · Hugging Face)
5 Inkling-2 Mini (exp.) 15.05 GB 24 GB+ Thinking Machines Lab MoE model; text + still images, one request at a time (details · Hugging Face)
6 Gemma 4 31B (exp.) 12.64 GB 24 GB+ Google 31B Dense model (3-bit + 1.65 GB draft model, Apache-2.0); text only, one request at a time (details · Hugging Face)

GPU guide

Your GPU Supported models Windows testing
RTX 5090 (32 GB) All 6 models (quality, fastest, max-quality, lightweight, Inkling-2 Mini, Gemma 4 31B) Tested by the developer
RTX 3090, 3090 Ti, or 4090 (24 GB) All 6 models (since 0.5.0 RotG4: full 262K Qwen3.8 quality & full 65K Gemma 4; up to 212K max-quality; user reports in #24, #29) Built for these cards; not tested or tuned by the developer
Listed RTX 40 and 50 series (16 GB) Fastest or lightweight (since 0.5.0 RotG4: auto-context up to 65K with draft head or 98K without) Built for these cards; not tested or tuned by the developer
Listed RTX 30, 40 and 50 series (12 GB) Lightweight (8.42 GB; since 0.5.0 RotG4: up to 49K auto-context on ~11.7 GiB free) Built for these cards; simulated on RTX 5090 only
NVIDIA V100 16 GB / 32 GB (sm_70, Volta; 1× or 2× TP=2) Qwen3.8-27B & Inkling-2 Mini (build from source with CUDA 12.x; YSKN_DEVICES=0,1 splits VRAM 50/50 on 2×16 GB or 2×32 GB) Physical 2× V100-SXM2-16GB verified by contributor (@kinoyu-ai, PR #41); developer verified CUDA 12.8 sm_70 SASS + virtual YSKN_VOLTA_PATH=1 on RTX 5090
AMD Radeon RDNA 3 / 4 (gfx1100 RX 7900 XTX, gfx1201 RX 9070 XT / Radeon AI PRO R9700 32 GB) Full engine runtime libyskn.so (-DYSKN_HIP=ON, Linux ROCm source build + rocm-smi VRAM planning) ROCm 6.4.1 full libyskn.so build, 95 C ABI symbols, v_wmma/v_dot4 ISA & 0 B spills verified; physical Radeon not tested by developer
  • Per-GPU wide copy check (0.1.7+): On RTX 30, 40 and 50 cards, the first start verifies bit-exact agreement with 16-token passes and enables only the widths that speed up your card (user reports: 1.85–1.99× edit speedup on RTX 4090, 1.52–1.61× on RTX 3090 / 3090 Ti, 64-token width enabled on RTX 5060 Ti; #24 · how it works).
  • Fast prompt reading (0.2.0 / 0.3.4 / 0.6.0+): On by default on cards with 30,000 MiB+ VRAM, and also enabled on 22,000–30,000 MiB cards when --max-ctx leaves at least 1,800 MiB free (#24, #34 · smaller cards). 0.6.0 adds faster prefill kernels across RTX 30, 40 and 50 (plus ephemeral FP8 attention scratch on RTX 40/50 and NVFP4 MoE prefill on RTX 50).
  • Multi-GPU (TP=2), V100 & Linux: Select one GPU with --device N (#20), or split Qwen3.8-27B / Inkling-2 Mini across 2 GPUs with YSKN_DEVICES=0,1 (50/50 weight and KV split, P2P with automatic host fallback). Build for Linux or V100 (sm_70, CUDA 12.x) from source; experimental AMD RDNA 3/4 HIP core kernels live in src/hip/; Intel GPUs and macOS are not supported. GPU list & requirements · Build from source (Linux / V100 / HIP)

Quick start

You need 64-bit Windows 11, Python 3.10+, NVIDIA driver 580+, the Visual C++ 2015–2022 x64 runtime, and about 20 GB of free disk space.

  1. Extract yasakani-quickstart-0.6.1.zip to a plain ASCII path such as C:\yasakani (or clone on Linux and run ./START.sh).
  2. Double-click START.cmd (or run ./START.sh on Linux). The browser setup wizard opens immediately—review your GPU card, pick a model visually, and watch live resumable download progress & self-check badges without using terminal menus (START.cmd --menu keeps the classic terminal menu).
  3. From the second run on, double-clicking START.cmd opens the browser workspace directly (127.0.0.1 only).

Inside the browser UI (upgraded in 0.5.2 with Zero-Terminal Setup & DeepSeek Harness)

  • Chat (#chat): Collapsible sidebar (search, pins, rename, folders/tags, JSON/JSONL/Markdown import & export), conversation branching (< 1/2 >), zero-CDN offline syntax highlighting, Dark/Light/High-Contrast themes, structured JSON Schema UI, plus code/text/image attachments. On Qwen3.8 models, switch LOOPthinking mode (T=1 Standard 64L / T=2 80L / T=3 96L) in one click (downloads and verifies the ~251 MB MIT adapter automatically on first use).
  • Diagnostics (#diag): Live VRAM meter & timeline sparkline, speculative acceptance ring, average τ, prompt cache hit ratio, 1-click diagnostics runner, prose & edit-copy speed benchmarks, and live /metrics viewer.
  • Agent & API (#agent): 1-click Zero-Telemetry DeepSeek Harness launcher reusing the running local server (zero extra VRAM, 18 outbound telemetry/feedback/log-upload/account/cloud plugins disabled at boot), interactive Tool-Use Playground, and ready-to-copy snippets for Cursor / Cline / Roo Code, VS Code Continue, Claude Code, Python, and curl.
  • Setup (#setup) & Model drawer: Hardware check cards, switch between installed models, click Download & switch to fetch and verify any compatible model, and check for updates without leaving the browser.

In terminal chat, type /effort medium for shorter thinking or /think off to disable thinking. Manual installation · API guide

Automatic updates (0.1.7+): At startup (at most once an hour), START.cmd checks GitHub for a new release and shows an Update button when one is available—nothing changes until you confirm (Check for updates on the Model tab or START.cmd --action update checks immediately; START.cmd --action rollback restores the previous version; --no-update-check disables automatic checks). Downloaded models are kept as-is. How updates work

Speed and quality

What 0.6.0 changed (Prefill Turbo across RTX 30/40/50, 2-GPU TP=2, NVIDIA V100 sm_70 native support & AMD RDNA 3/4 experimental HIP kernels)

  • Prefill Turbo (faster cold prompt reading, zero decode regression, no model re-download):
    • Qwen3.8-27B (yskn.dll): Adds 16-warp zero-reload GEMM (src/q35_g6_fast.cuh), WY Chunkwise-64 TF32 GDN (src/q35_gdn_chunk.cuh), and tiled FlashAttention-2 over the 4-bit RotG4 KV cache (src/q35_atx_rotg4_fa2.cuh, BF16 on RTX 30+ and ephemeral FP8 scratch on RTX 40/50 while keeping KV stored at 4-bit RotG4). Measured on one RTX 5090 (27B quality model): pure prefill rises from 4,722 → 5,841 tok/s (2K, 1.24×), 5,311 → 6,965 tok/s (8K, 1.31×), 4,531 → 6,153 tok/s (32K, 1.36×), and 3,787 → 5,251 tok/s (64K, 1.39×); end-to-end specx prompt reading reaches 1.31×–1.43× (64K: 18.58 s → 12.99 s, 32/32 greedy match).
    • Inkling-2 Mini (yskn_inkling2.dll): Adds wide auto-batching (max_rows up to 1024), BF16 Tensor Core packed prefill GEMM and FlashAttention (src/inkling2/ink2_packed_prefill.cuh, ink2_flash_tc.cuh, RTX 30/40/50), and RTX 50 NVFP4 MoE prefill (ink2_nvfp4.cu). Measured on one RTX 5090: 2.04×–2.39× faster by default (2K: 1,509 → 3,526 tok/s, 32K: 22.1 s → 10.8 s, 32/32 greedy match at 2K/8K/32K), and up to 3.32× (4,930 tok/s) with YASAKANI_INK2_NVFP4_PLANES=2.
  • 2-GPU Tensor Parallelism (TP=2, YSKN_DEVICES=0,1):
    • Qwen3.8-27B (src/q35_tp.hpp, src/q35_tp.cu, yskn_open_tp): Splits column/row projections and 4-bit RotG4 KV cache 50.0% / 50.0% across two GPUs (LNORD 7.87 GB → 3.93 + 3.93 GB, RotG4 KV 208 → 104 + 104 MiB) using exact-sum int64 AllReduce + tp2_sync_amax (P2P with automatic host fallback). Verified on RTX 5090 (YSKN_DEVICES=0,0, P2P & Host): 0.00e+00 bit-exact logit difference vs TP=1 for M <= 64, spec_generate64 49/49 exact, and full yasakani selfcheck PASS.
    • Inkling-2 Mini (src/inkling2/ink2_engine.cpp, ink2_tp_info): Splits weights and KV cache 50.0% / 50.0% across two GPUs (18.90 GB → 10.36 + 10.36 GB, KV 751.3 → 375.7 MiB per GPU). Verified 100% token-exact across all 5 test modes on RTX 5090 (tp1, volta_tp1, tp2_samegpu, tp2_hostfallback, volta_tp2).
  • NVIDIA V100 (sm_70, Volta) Native Support (Source Build with CUDA 12.x):
    • Adds native sm_70 FP16 WMMA (HMMA.884), IDP.4A DP4A, and volta_compat.cuh kernels for both Qwen3.8-27B (src/lnord_volta.cuh, src/q35_g6_volta.cuh, src/q35_atx_rotg4_volta.cuh) and Inkling-2 Mini (src/inkling2/ink2_volta.cuh), plus YSKN_VOLTA_PATH=1 for virtual testing on newer GPUs. Because CUDA 13 dropped sm_70, prebuilt Windows binaries ship for sm_86 / sm_89 / sm_120, while V100 builds cleanly from source with CUDA 12.x (BUILDING.md).
    • Verified with real CUDA 12.8 sm_70 builds (Qwen3.8: 73/73 Volta & TP=2 kernels at 0 B spills, 15,808 HMMA.884, 5,120 IDP.4A; Inkling-2: 17/17 kernels at 0 B spills, 1,792 HMMA.884) and live virtual 1×V100 & 2×V100 selfcheck PASS at 262,144 ctx on RTX 5090. Not yet tested on physical V100 hardware.
  • AMD Radeon RDNA 3 (gfx1100) & RDNA 4 (gfx1201) Experimental HIP Kernel Foundation (src/gpu_compat.hpp, src/hip/):
    • Publishes the portable GPU abstraction header and core Wave32 HIP kernels (LNORD WMMA/DP4A, G6 fused GEMM, RotG4 decode & FA2, exact int64 TP=2 AllReduce, Inkling-2 DP4A) built via src/hip/build_hip.sh. Verified with real ROCm 6.4.1 hipcc (40/40 Wave32 kernels at 0 B scratch spills, LDS ≤ 53.5 KB on both gfx1100 RX 7900 XTX and gfx1201 RX 9070 XT, emitting v_wmma_f32_16x16x16_f16 & v_dot4_i32_iu8) plus shared-source live math verification on RTX 5090. Full engine35 host-runtime HIP wiring is planned for a follow-up release; physical Radeon hardware has not been tested yet.

What 0.5.2 changed (Zero-Terminal Browser GUI, Zero-Telemetry DeepSeek Harness, structured outputs & Linux launcher)

  • Zero-Terminal Browser GUI & Zero-Telemetry DeepSeek Harness (quickstart/chat.html & quickstart/quickstart.py): Replaces console-only first-run prompting with an interactive browser setup wizard (#setup) showing GPU/driver/disk checks, visual 6-model cards with VRAM fit indicators, live resumable download progress (bytes, MB/s, ETA, cancel/resume), and check badges. Upgrades the workspace with collapsible conversation sidebar (search, pin, rename, folders/tags, JSON/JSONL/Markdown import & export), branching conversation trees (< 1/2 > on edited/regenerated turns), zero-CDN offline syntax highlighting, manual Dark/Light/High-Contrast themes, prompt presets, a Diagnostics & Telemetry (#diag) tab, and an Agent & API (#agent) tab featuring a 1-click Zero-Telemetry DeepSeek Harness launcher (reuses the running server with zero extra VRAM, disables all 18 telemetry / analytics / feedback / session-log-upload / DeepSeek-account / cloud-search plugins plus environment-level telemetry opt-out, and stops automatically on exit). Unifies Qwen3.8 recurrent reasoning under LOOPthinking mode (T=1..3). Backward-compatible START_FILES keeps 1-click browser self-update working from v0.5.0.
  • Constrained Structured Outputs & Tool Enforcement: Implements response_format ({"type": "json_object"} and {"type": "json_schema", ...}) and strict tool_choice: "required" / named-function enforcement for both Qwen3.8-27B and Gemma 4 31B (zero overhead when off), plus exact stop-string early pruning (completion_tokens matches the truncated stop boundary).
  • Linux First-Class Quickstart, 16 GB Safety Margin, Prometheus /metrics & CI: Adds root ./START.sh + Linux support in quickstart.py, adds a POSIX 16 GB VRAM safety margin (LINUX_EXTRA_MARGIN_MIB = 512) for #37, exposes GET /metrics (Prometheus text format) and conversation prefix cache stats, adds GitHub Actions CI (tools/ci/github-actions-ci.yml), and documents honest Prefill / TTFT measurements. Engine binary yskn.dll is unchanged from v0.5.0.

What 0.5.0 changed (unified 4-bit RotG4 KV cache across all 3 model families—no model re-download)

  • One 4-bit KV cache (RotG4) everywhere: Replaces Qwen3.8 KV8 / KV5, Gemma 4 global BF16 KV, Windows Inkling-2 MXFP8 KV, and Linux Inkling-2 global BF16 KV with RotG4 (Rotated Gaussian 4-Bit: orthogonal Walsh-Hadamard rotation + zero-calibration 4-bit Lloyd-Max table + FP16 per-head scales, keeping the first sink tokens and recent local window in full precision). All existing downloaded .yskn model folders work unchanged (kvq_u5.bin is no longer needed and is safely ignored).
  • Major VRAM savings & auto-context expansion across every GPU tier:
    • Qwen3.8-27B (17,408 B/tok engine / 18,000 B/tok auto-budget vs 36,000 B/tok KV8): Full 262,144-token KV cache drops from 8,320 MiB → 4,430 MiB (-46.8%). On 24 GB cards (1 GB desktop), auto-context rises from 180K → full 262,144 (quality) and 98K → 212,992 (max-quality); on 16 GB cards, fastest rises to 65,536 with draft head or 98,304 without; on 12 GB cards, lightweight reaches up to 49,152; on 32 GB cards, --yarn2 fits the full 524,288 tokens for quality & max-quality, and --parallel 4 auto-context reaches 131K–147K (--parallel 2: full 262,144). Verified on one RTX 5090 (Windows 11): quality & light selfcheck PASS (3/3 + 2,206 positions bit-exact 64-vs-16), --parallel 4 selfcheck PASS, --loop 3 7-point parity & SSE streaming PASS (316.0 tok/s), and 16K / 64K / 128K quality VRAM 19,824 / 20,672 / 21,779 MiB (440.1 / 440.9 / 439.7 tok/s long-prompt spec, plain == spec 100%).
    • Gemma 4 31B (22,016 B/tok vs 81,920 B/tok global BF16): Full 65,536-token KV cache drops to 3.20 GB, unlocking full 65,536 auto-context on 24 GB cards as well as 32 GB cards. Verified on one RTX 5090: selfcheck PASS (3/3 + 2,207 positions bit-exact), long >1.4K RotG4 f16 == f64 bit-exact (100.0% Top-1, 0.00085 mean |dNLL| vs BF16), 16K / 64K VRAM 19,642 / 20,666 MiB (+1,024 MiB for +48K ctx; 415.2 / 424.9 tok/s).
    • Inkling-2 Mini (RotG4-128, 9,216 B/pos KV / 19,456 B/pos with draft): Replaces 8-bit MXFP8 on Windows (yskn_inkling2.dll) and global BF16 on Linux (libyskn.so -DYSKN_WITH_INK2=ON). Verified on one RTX 5090: ink2_selftest 0/42 failures, --fast off exact selfcheck 3/3 PASS, 16K / 32K VRAM 20,144 / 20,440 MiB (+296 MiB for +16K ctx; 328.5 / 324.5 tok/s spec, 1,511.9 tok/s prefill), and Vision intact.

What 0.4.4 changed (one-click Looped Qwen3.8-27B reasoning & clearer quantization/converter documentation)

  • Looped Qwen3.8-27B (T=2 / T=3) native in yskn.dll and the browser UI: Integrates recurrent middle-layer passes from jasontitus/loopedqwen (MIT license, ~251 MB adapter) with </think>-gated LoopCD-Hidden (default ω=0.15 at T=3, active inside <think>...</think> only, CUDA-Graph safe) across all four Qwen3.8 models (quality, fastest, max-quality, lightweight). Switch in one click in the browser UI (auto-download + SHA-256 verification + saved setting), or via START.cmd --loop 2|3 and yasakani serve --loop 3 (default T=1 output is bit-for-bit unchanged; --parallel 2+ is incompatible with --loop).
  • Full 30-problem AIME 2025 benchmark (one RTX 5090, temperature=1.0, top_p=0.95, top_k=20, max_new=16384, one matched run per problem, helper draft model on):
    • Quality model (12.37 GB): rose from 20/30 (66.7%, 702.8 s) at T=1 to 21/30 (70.0%, 651.9 s, -19.1% thinking tokens) at T=2 and 23/30 (76.7%, +10.0 pt, 23/23 completed answers correct) at T=3 (ω=0.15), beating the standard T=1 max-quality model (21/30). Across the 19 common solved problems, thinking tokens fell by -33.3%, look-ahead acceptance rose from 4.96 to 6.13 tok/pass, and wall time matched T=1 (1.01×).
    • Max-quality model (15.72 GB): rose from 21/30 (70.0%) at T=1 to 22/30 (73.3%) at both T=2 (-13.1% thinking tokens) and T=3 (-11.6% thinking tokens).
  • Clearer quantization & converter navigation: Updated README.md, README.ja.md, tools/convert/README.md, and docs/FAQ*.md so every Apache-2.0 converter (yskn_convert.py, gemma4_convert.py, inkling2_convert.py) and weight format (2–5 bit trellis quantization for Qwen3.8 & Gemma 4, not FP8) is linked from the top of the repository.

What 0.4.3 changed (Gemma 4 31B Dense experimental support & cleanroom Linux Inkling-2 drafter tree)

  • Gemma 4 31B Dense (3-bit + helper draft model): Integrates google/gemma-4-31B-it (Apache-2.0) in 3-bit format (12.64 GB) paired with a 1.65 GB quantized helper draft model (reusing the target output head directly, saving 1.62 GB download/VRAM) inside yskn.dll. On one RTX 5090 (--max-ctx 32768, greedy), yasakani bench averaged 286.2 tok/s across the 4 built-in tasks (explain 287.5, code 321.8, story 197.0, proof 338.4 tok/s), used ~20.9 GB VRAM, and passed yasakani selfcheck (3 reference cases plus bit-exact 64-vs-16 consistency across 2,207 positions). Available as choice 6 in START.cmd (--model gemma4), via one-click Download & switch in the browser UI, and in yasakani-harness-0.4.3.zip (24 GB+ RTX cards; tested on RTX 5090 only).
  • Qwen3.8-27B compatibility preserved: The rebuilt multi-arch yskn.dll (sm_86 / sm_89 / sm_120) passes Qwen3.8-27B selfcheck (quality & lightweight models, 2,206 positions bit-exact) and matches 0.4.2 greedy token output and throughput.
  • Linux -DYSKN_WITH_INK2=ON cleanroom drafter tree: Replaces the drafter tree of the Linux source-built Inkling-2 engine with a cleanroom implementation, removes the old __half2 expert kernels and screened output head, and removes the obsolete third-party MIT notice from THIRD_PARTY_NOTICES.md (BUILDING.md).

What 0.4.2 changed (16 GB / 24 GB auto-context fix, browser UI upgrade, 5-model browser agent)

  • Auto-context & --parallel N fix (#37): Updates single-stream KV sizing in gpu.py and quickstart.py from 22,400 B/tok (KV5) to 36,000 B/tok to match 0.4.0's default row-scaled 8-bit KV cache (YSKN_TB_CAP=0). On an RTX 5080 (16 GB) with the fastest model, auto-context now picks 65,536 tokens (and omits bdraft2_k8.shead at 49,152–65,536 so it fits within VRAM, while keeping shead loaded at --max-ctx 32768). The 12 GB tight profile and --parallel 2+ keep 22,400 B/tok (KV5), cli.py automatically sets YSKN_TB_CAP=1 when --parallel >= 2, and engine.py fixes an AssertionError introduced in 0.4.0 when a serve --parallel N stream returns to solo execution (frontier=True).
  • Browser UI & launcher upgrade: Adds code/text file attachment and drag-and-drop, local chat auto-save and Markdown export, per-turn regenerate & edit, one-click Download & switch for compatible models, edit-copy speed testing, and Cursor / Cline / Continue snippets.
  • Updated browser agent (yasakani-harness-0.4.2.zip): Removes the obsolete 0.1.0 duplicate Python folder, runs directly on the quickstart venv, and supports all 5 models (yskn.dll and yskn_inkling2.dll are unchanged from 0.4.0 / 0.4.1).

What 0.4.1 changed (new 8.42 GB lightweight model & automatic 12 GB VRAM profile)

Adds the lightweight model (8.42 GB, 2.38 bpw mixed 2/3/4-bit) and an automatic 12 GB VRAM profile that trims scratch memory, skips bdraft2_k8.shead, and packs KV5 (YSKN_TB_CAP=1) on 11,500–14,999 MiB cards (verified on RTX 5090 under a simulated 12 GB budget at 16,384 ctx, peak delta 11.31 GiB; untested on physical 12 GB hardware).

Same-condition RTX 5090 comparison across all four Qwen3.8-27B models and same-size 8.42 GB GGUFs (yskn.dll 0.4.0–0.4.2, --max-ctx 32768, 512 tokens greedy median of 3 runs, 20-window thinking-text KL over 20,460 positions vs BF16):

Model / Engine Weights Target VRAM Thinking KL↓ Top-1↑ PPL↓ Thinking OFF (4 tasks) Thinking ON (4 tasks) Edits (JSONL / Code / Long JSONL)
YASAKANI max-quality 15.72 GB 24GB+ 0.0040 97.31% 2.0663 398.8 tok/s 315.2 tok/s 2,036.1 / 1,899.1 / 1,898.2
YASAKANI quality [rec.] 12.37 GB 24GB+ 0.0125 95.26% 2.0685 431.7 tok/s 353.6 tok/s 2,074.3 / 1,926.2 / 1,928.4
YASAKANI fastest 10.31 GB 16GB+ 0.0307 93.06% 2.0759 494.3 tok/s 426.3 tok/s 2,095.9 / 1,969.8 / 1,943.4
YASAKANI lightweight 8.42 GB 12GB+ 0.0741 (KV5: 0.0739) 89.88% 2.1369 521.4 tok/s 387.9 tok/s 2,115.8 / 1,881.5 / 1,874.7
Unsloth UD-IQ2_S (llama.cpp+DFlash) 8.42 GB — 0.0833 (Q8: 0.0832) 89.12% 2.1862 199.0 tok/s 179.4 tok/s 323.0 / 215.1 / 319.9
GSQ-RCO IQ2_XS (llama.cpp+DFlash) 8.42 GB — 0.1207 (Q8: 0.1206) 87.39% 2.2288 208.6 tok/s 170.5 tok/s 328.7 / 219.5 / 325.2

What 0.4.0 changed (multi-branch look-ahead tree, bit-exact width invariance, pattern edit copy)

  • Multi-branch speculative look-ahead tree (ω mode, on by default): Verifies multi-depth branch candidates in parallel with exact Tensor Core MMA ancestor attention, preserving exact greedy output (yasakani bench --n 256 --runs 3 on RTX 5090 quality model: 355.5 → 382.9 tok/s [+7.7%]; 6-prompt Golden A/B: 299.7 → 310.1 tok/s [+3.5%, 0 mismatches]; YSKN_OMEGA=0 disables it).
  • Bit-exact width invariance & determinism: Row-scaled 8-bit KV (YSKN_TB_CAP=0) matches 16-row reads with 0 argmax diffs and 0 NLL bit diffs across all 13 widths from 2 to 64 rows, and copy-loop width selection is deterministic (det=1).
  • Pattern edit copy (src/edit_copy.hpp): Learns 1- and 2-slot variable captures, field reordering, and affine integer progressions (±4), verified token-for-token by the model.

See 0.2.0 / 0.1.4 highlights and the 7-category comparison against 8 other engines
  • 0.2.0 (faster prompt reading, edit reuse, max-quality model): First-read speed on RTX 5090 (quality model) rose from 4,248 → 5,153 (8K) and 3,774 → 4,647 input tok/s (32K), and mid-prompt edits re-read from the last saved checkpoint 1.51–4.21× faster (docs/MEASUREMENTS.md).
  • 0.1.4 (64-token wide copy passes): Sped up code edit, JSONL edit, and long JSONL edit by 1.67–2.04× over 0.1.2 on RTX 5090 (2,025 / 2,298 / 2,099 tok/s fastest; 2,008 / 2,243 / 2,056 tok/s quality). Run yasakani bench and yasakani bench --edit to measure on your own PC (FAQ).

Seven-category comparison against eight engines (one stock RTX 5090 at 600 W, one request at a time, generation tok/s excluding prompt reading)

The fastest model led all eight engines across all seven categories (three of the 12 public prompts where the fastest model hit a repetition loop or unrequested tool call are excluded under the shared rule).

Thinking off (mean of 2 runs per task; YASAKANI re-measured Nov 15 with v0.1.4):

Engine Code Story Translation Structured Code edit JSONL edit Long JSONL
YASAKANI fastest model 512 195 479 882 2,025 2,298 1,214
YASAKANI quality model 468 172 464 892 2,008 2,243 1,115
MegaCapybara 1.39 Tiny 465 164 268 599 441 658 666
mkyt v0.3.2 395 181 374 555 423 634 639
ignis v0.9.6 330 167 298 439 331 510 514
NInfer (November 2 build) 264 123 257 386 295 443 438
vLLM 0.31.0 290 148 261 354 241 426 431
SGLang 0.5.22 252 129 246 371 430 466 451
llama.cpp b11700 242 133 232 337 244 360 362
TensorFold 0.6.6 181 104 172 405 383 408 261

Thinking on (fastest run per task averaged per category; YASAKANI 5 runs on Nov 8, others 2 runs):

Engine Code Story Translation Structured Code edit JSONL edit Long JSONL
YASAKANI fastest model 337 287 497 536 667 1,108 704
YASAKANI quality model 299 242 428 480 743 1,053 634
MegaCapybara 1.39 Tiny 290 206 308 429 550 663 516
mkyt v0.3.2 244 196 348 384 378 603 454
ignis v0.9.6 211 130 276 277 278 485 327
NInfer (November 2 build) 172 140 258 263 263 404 322
vLLM 0.31.0 131 112 197 195 187 369 253
SGLang 0.5.22 157 124 206 230 257 402 282
llama.cpp b11700 140 122 184 197 206 349 221
TensorFold 0.6.6 134 79 167 183 439 360 268

Measurement conditions & all-run averages · Records & reproduction scripts · Full release history

  • One edit, start to finish: In the uncut November 8 screen recording, the fastest model edited a Python file and returned the entire file 5.56 seconds after the request was sent, matching the original behavior across 17,701 test inputs (recording & verification package).

  • Agreement with BF16 on thinking text (20 windows, 20,460 positions): As shown in the 0.4.1 table above, top-1 next-token agreement and KL divergence against BF16 are 97.31% (KL 0.0040) for max-quality, 95.26% (KL 0.0125) for quality, 93.06% (KL 0.0307) for fastest, and 89.88% (KL 0.0741) for lightweight. This measures closeness to the original model's distribution rather than downstream task accuracy. 13-configuration quality study · Measure it yourself

  • Max-quality model: Uses 5/4-bit body weights, a 5-bit output head, and 4-bit embeddings (15.72 GB), requiring a 24 GB+ card and YASAKANI 0.2.0+ (does not fit on 16 GB cards). It runs at roughly 0.8–0.9× the generation speed of the quality model. User report on RTX 3090 Ti: #24 · Measurements

  • Long contexts & prefix reuse: Contexts scale up to 262,144 tokens (524,288 with --yarn2), and follow-up questions on the same long document reuse the cached prefix (cutting time-to-first-token after a 229,376-token document from 116 s to 0.37 s). Since 0.5.0, all Qwen3.8 runs (single-stream, 12 GB profile, --loop, and --parallel N) use the unified zero-calibration 4-bit RotG4 KV cache (17,408 B/tok engine / 18,000 B/tok auto-budget; 4,430 MiB at full 262,144 tokens). Long-context measurements

Several requests at once (experimental)

yasakani serve --parallel N serves up to N concurrent requests on one GPU (default --parallel 1). Since 0.5.0, --parallel N shares the same unified 4-bit RotG4 KV cache (18,000 B/tok, 336 MiB/slot).

yasakani serve --model-dir D:\models\qwen38-quality --parallel 4
  • Limits: Experimental (tested on RTX 5090 only). Copy-heavy edits run slower under batching (0.42–0.59× single-stream), while the 12 public prompts reached 1.1–6.6× aggregate throughput at 16 concurrent requests (fastest model, thinking off). Prompt reading and image encoding pause other slots, per-slot context shrinks with N, and unseeded requests depend on arrival order. FAQ & measurements

Inkling-2 Mini (experimental, 24 GB+)

YASAKANI runs thinkingmachines/Inkling-2-Mini (26.4B-weight MoE, Apache-2.0 with the Model Acceptable Use Policy) through a second library in the engine archive, yskn_inkling2.dll.

  • Quickest setup: Pick 5 in START.cmd (START.cmd --model inkling2), or click Download & switch on the Model tab of the browser UI. It downloads and verifies our converted folder (Inkling-2-Mini-YASAKANI-quality, ~15.9 GB including inkling_2_mini_vision.yskn).
  • Capabilities & limits: Supports still images since 0.3.5 (PNG, JPEG, WebP, GIF, BMP, TIFF via the browser Image button, chat --image, or OpenAI data: URIs), tool calling in yasakani serve, and lossless speculative drafting (--draft auto). Runs one request at a time on 24 GB+ RTX cards (no --parallel or bench --edit).

  • Fast path (0.3.3 / 0.3.4+, upgraded to 4-bit RotG4-128 in 0.5.0, default --fast auto): Uses a zero-calibration 4-bit RotG4-128 full-attention KV cache (9,216 B/pos, replacing 8-bit MXFP8) and tiled Flash-GQA / Split-K kernels on RTX 30, 40 and 50 cards (plus 4-bit NVFP4 Tensor Core expert prompt passes on RTX 50). On one RTX 5090 (0.5.0 --scheme quality, greedy), 16K / 32K VRAM was 20,144 / 20,440 MiB (+296 MiB delta, 1,511.9 tok/s prefill, 324.5 tok/s spec at 32K); earlier 0.3.3–0.4.4 MXFP8 reference numbers were 1,826 / 1,755 / 1,377 tok/s (4K / 32K / 128K prefill) and 268 / 351 / 183 / 132 tok/s (--fast off still restores bit-identical 0.3.2 execution; --copy auto enables experimental edit copy). User report on RTX 3090 Ti: #29.
Manual download & conversion commands for Inkling-2 Mini

Run yasakani_env.cmd inside a quickstart folder to put hf, python, and yasakani on PATH. To download our converted copy manually:

hf download yasakani-dev/Inkling-2-Mini-YASAKANI-quality --local-dir D:\models\inkling2-mini-quality
yasakani verify --model-dir D:\models\inkling2-mini-quality
START.cmd --model-dir D:\models\inkling2-mini-quality

To convert the upstream weights yourself (--scheme quality builds the 15.05 GB packed weights; --vision writes the vision file):

cd /d C:\yasakani
yasakani_env.cmd
hf download thinkingmachines/Inkling-2-Mini --revision ed40e7da625f594fc9c4990f5f66be24873c22d7 --local-dir D:\models\Inkling-2-Mini-hf
python C:\src\yasakani\tools\convert\inkling2_convert.py --source D:\models\Inkling-2-Mini-hf --out D:\models\inkling2-mini-quality --scheme quality --vision
yasakani verify --model-dir D:\models\inkling2-mini-quality
yasakani selfcheck --model-dir D:\models\inkling2-mini-quality
START.cmd --model-dir D:\models\inkling2-mini-quality

For Linux source builds (both -DYSKN_WITH_INK2=ON in #28, #30, #32 and build_linux.sh in #33), see BUILDING.md. FAQ · CLI & server options

Gemma 4 31B (experimental, 24 GB+)

YASAKANI runs google/gemma-4-31B-it (31B Dense, Apache-2.0) paired with a quantized helper draft model directly inside yskn.dll (and libyskn.so on Linux).

  • Quickest setup: Pick 6 in START.cmd (START.cmd --model gemma4), or click Download & switch on the Model tab of the browser UI. It downloads and verifies our converted folder (Gemma-4-31B-YASAKANI-3bit, ~14.3 GB total).
  • Capabilities & limits: Supports thinking generation (reasoning_content separation), wide copy passes up to 64 rows (widecheck), yasakani selfcheck, and yasakani serve streaming. Text only, one request at a time (no --parallel or --yarn2), targeting 24 GB+ RTX cards (since 0.5.0 RotG4 global KV: 22,016 B/tok, 3.20 GB KV at 65K, auto-context up to full 65,536 on both 24 GB and 32 GB cards; tested on RTX 5090 only).
  • Quantization & self-conversion: The format, CUDA search kernels, and converter are all open source under Apache-2.0 (tools/convert/gemma4_convert.py · Converter guide · File format). The Gemma 4 engine runs YASAKANI's 2–5 bit trellis format (not FP8 weights); besides the released 3-bit (--bits 6), gemma4_convert.py accepts --bits 8 (4-bit) and --bits 10 (5-bit) (4/5-bit conversion and runtime are untested).
Manual download & conversion commands for Gemma 4 31B
hf download yasakani-dev/Gemma-4-31B-YASAKANI-3bit --local-dir D:\models\gemma4-31b-3bit
yasakani verify --model-dir D:\models\gemma4-31b-3bit
yasakani selfcheck --model-dir D:\models\gemma4-31b-3bit
START.cmd --model-dir D:\models\gemma4-31b-3bit

To convert the upstream weights yourself, use tools/convert/gemma4_convert.py (see tools/convert/README.md).

Convert & quantize models yourself (Apache-2.0)

Every quantization method, file specification, CUDA trellis search kernel, and conversion script behind our released packs is published in this repository (Converter guide · Technical notes · File format).

Model family Converter in this repo Weight format supported by engine
Qwen3.8-27B tools/convert/yskn_convert.py + trellis_search.cu 2/3/4/5-bit trellis quantization (K=4/6/8/10; not FP8)
Gemma 4 31B tools/convert/gemma4_convert.py + trellis_search.cu 2/3/4/5-bit trellis quantization (K=4/6/8/10; 3-bit released; not FP8)
Inkling-2 Mini tools/convert/inkling2_convert.py + inkling2_quant.py Upstream published weights or NVFP4 + MXFP8 (--scheme quality)

Community conversions

Third-party conversions built with tools/convert/ (not verified or maintained by this project; maintained by their respective authors):

Repository layout and documentation

YASAKANI co-designs its weight format and CUDA kernels so that, on edits, the main model verifies whole copied spans (up to 64 tokens per pass) instead of decoding unchanged lines one token at a time.

Folder Contents
quickstart/ One-click Windows launcher (START.cmd, quickstart.py) and offline browser UI (chat.html)
python/ CLI (chat, serve, bench, selfcheck, verify, info) and OpenAI-compatible server (python/README.md)
src/, include/ C++ / CUDA inference engines (yskn.dll and src/inkling2/ for yskn_inkling2.dll; BUILDING.md)
harness/ Optional browser coding agent launcher integrating DeepSeek Harness across all 6 models
tools/ Standalone .yskn decoder, converters (convert/), and quality/speed reproduction tools (tools/README.md)
docs/ Technical notes · File format · Measurements · FAQ · Release history
bench/ Raw benchmark logs, verification artifacts, and scripts behind the published tables (bench/README.md)

  • Use it as an agent: Connect Cursor, Cline, Roo Code, or Continue directly using the snippets on the browser UI's API tab, or unpack yasakani-harness-0.4.3.zip from the release page to launch an offline browser coding agent (supports all 6 models including 12 GB+ lightweight, Inkling-2 Mini, and Gemma 4 31B; Agent setup · Contribute).

Support and license

Developed independently in Japan. Backer support funds test hardware (24 GB, 16 GB, and 12 GB RTX cards) and official Linux packaging; backers who opt in are credited in the repository and startup credits. CAMPFIRE (Japan) · GitHub Sponsors

Released under Apache License 2.0. License · Copyright notices · Third-party notices · Release history and contributors

Explorar proyectos relacionados

Cargando…