# Repository Briefing: yasakani-dev/yasakani
> Source: https://repoforai.com/repo/yasakani-dev/yasakani (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/yasakani-dev/yasakani
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.6.0 (2026-12-03) — https://github.com/yasakani-dev/yasakani/releases
- **Review Snapshot**: 2026-12-03 (Note: v0.6.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Self-Hosted, Local AI, GPU, API
- **Momentum**: 161 ★ total (+1 24h / +24 7d) · 31 forks
- **When to Use**: Best for: Developers with an RTX workstation who want local Qwen chat, repeated code or JSONL edits, or an OpenAI-compatible endpoint for editor integrations. Skip if: You need managed scaling, broad model or GPU support, full OpenAI API parity, or dependable multi-user throughput without validating the workload yourself.

## Overview
```text
### Architecture & Core Mechanics
YASAKANI separates local setup and serving from GPU execution. `quickstart/quickstart.py` and `quickstart/chat.html` provide the browser setup and chat workspace; the local server exposes an OpenAI-compatible API at `http://127.0.0.1:8765/v1`. Inference runs in native libraries: `yskn.dll` on Windows and `libyskn.so` on Linux cover Qwen3.8 and Gemma 4, while Windows packages Inkling separately as `yskn_inkling2.dll`. `CMakeLists.txt` is present, and Linux exposes `-DYSKN_WITH_INK2=ON` for an Inkling build.

The v0.5.0 runtime unifies KV caching across all three families under 4-bit RotG4, reducing the cost of retaining context separately from weight quantization. On the edit path, wide copy passes verify up to 64 copied tokens in one model pass; startup checks bit-exact agreement against 16-token passes and enables only widths that improve speed on the card. The optional DeepSeek Harness is a client of the running local server, not a second model runtime.

### Key Capabilities & Differentiators
Qwen3.8-27B comes in four converted variants: Lightweight targets 12 GB RTX cards, Fastest targets 16 GB, and Quality and Max-quality target 24 GB or more. The experimental 24 GB options have distinct roles: Inkling-2 Mini accepts text and still images, while Gemma 4 31B is text-only and pairs a quantized main model with a helper draft model. Qwen's browser controls switch between standard T=1 and recurrent T=2 or T=3, with a verified adapter download on first use.

For integrations, v0.5.2 adds constrained `json_object` and `json_schema` decoding and required or named tool selection for Qwen3.8 and Gemma 4. Exact stop-string pruning aligns `completion_tokens` with the truncation boundary. The browser supports conversation branching and offline syntax highlighting, while the diagnostics view and Prometheus `/metrics` expose runtime signals such as VRAM usage, speculative acceptance, and prefix-cache behavior.

### Trade-offs & Limitations
Compared with the hosted OpenAI API, YASAKANI keeps inference on the workstation and offers a familiar integration surface, but the operator owns model storage, RTX drivers, VRAM sizing, and client compatibility testing. That trade makes sense for local file editing and data that should stay on the machine; it is less attractive when managed capacity or broader API coverage matters. The developer tested only on the RTX 5090. Other RTX recommendations are not equivalent to first-party validation.

The headline 2,298 tok/s result is from a v0.1.4 JSONL task that changed one record in 60 and returned the whole file, on one RTX 5090 with thinking off and prompt reading excluded. It is not a general generation or time-to-first-token figure. Experimental `--parallel N` defaults to one: at 16 concurrent requests, 12 public prompts achieved 1.1–6.6× aggregate throughput, while copy-heavy edits ran at 0.42–0.59× single-stream speed under batching. More slots reduce per-request context, and prompt reading can pause other slots. Validate with your own traffic before relying on it for shared serving.

### Hardware & Deployment Guide
On Windows, the quickstart calls for 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. Extract the v0.5.2 quickstart archive to a plain ASCII path and launch `START.cmd`. On Linux, clone the project and use `./START.sh`. The browser wizard checks the GPU, driver, and disk, shows model choices by VRAM tier, and supports resumable downloads. After setup, the workspace is served on loopback only by default.

v0.4.4 added native recurrent Qwen reasoning with browser switching and SHA-256 verification of the adapter. v0.5.0 consolidated the KV cache; v0.5.2 builds on that engine with the browser-first setup, Linux launcher, an extra 512 MiB Linux safety margin for 16 GB cards, metrics, and CI. Model and adapter downloads are separate from offline inference. For an isolated installation, stage the required artifacts in advance and disable automatic update checks with `--no-update-check`.
```

## Key Capabilities
```text
- Runtime: Python quickstart and localhost API front native GPU libraries; the core is `yskn.dll` on Windows and `libyskn.so` on Linux.
- Memory: v0.5.0 introduced 4-bit RotG4 KV caching across the three model families, distinct from weight quantization.
- Editing: Wide copy passes verify up to 64 copied tokens per model pass; startup enables only widths that pass correctness and speed checks on that GPU.
- API: Qwen3.8 and Gemma 4 support constrained JSON object and JSON Schema output, required or named tools, and exact stop-string pruning.
- Reasoning and vision: Qwen3.8 offers T=1–3 reasoning modes; experimental Inkling supports still images, while experimental Gemma is text-only.
- Observability: Prometheus `/metrics` and browser diagnostics expose prefix-cache behavior, VRAM use, and speculative acceptance.
```

## Quick Start / Clone
```bash
yasakani serve --model-dir D:\models\qwen38-quality --parallel 4
```
