Training & QAT Recipe
- Dataset: AkaneTendo25/satsuki-dsl-v3 (18,000 compiler-verified rows across structured creates, terse free-form prompts, ID-free edits, and unsupported/ambiguous refusals; 0% topology overlap with Holdout A).
- Stage 1 (SFT BF16 teacher): 1-epoch full fine-tuning (
lr=2e-5, cosine schedule, bf16) from Qwen/Qwen3-0.6B.
- Stage 2 (KL-distillation STE QAT):
0.75 * KL(student || teacher_bf16) + 0.25 * CE over 12,000 stratified examples with block_size=32 asymmetric uint4 fake quantization on 140 transformer linear layers and INT8 on 56 sensitive mixed_layers + lm_head + embed_tokens.
- WebGPU export:
onnxruntime-genai (-p int4 -e webgpu --extra_options use_webgpu_fp32=false is_symmetric=false matmul_mixed_precision=last_matmul:int8,mixed_layers:int8) with rope_theta=1000000, static kv_cache_dim=128, embedded Qwen3 chat_template, and dual post-export ONNX graph patches (adaptive-slice in model_q4f16.onnx and zero-copy hybrid lm_head in model_hybrid_q4f16.onnx, zero extra weight bytes).
The model translates natural-language UI requests into satsuki-compact-plan/1:
- Initial UI creation across 11 primitives (
heading, text, input, select, toggle, slider, button, card, row, column, grid)
- State-preserving, ID-free incremental edits (
set, unset, add, remove, move, replace)
- Explicit
unsupported / ambiguous refusals for out-of-catalog requests
Evaluation
Table with columns: Suite, Result| Suite | Result |
|---|
| Holdout A (800 cases, 0% topology overlap, BF16) | 96.25% exact match (100% compile valid) |
| Holdout B (22 natural OOD cases, BF16) | 86.36% exact match (10/10 ID-free edits) |
| Holdout C (16 terse free-form prompts, BF16) | 16/16 compile valid |
| Differential QAT INT4 ONNX vs BF16 (128 stress cases) | 127/128 compile valid (0 quantization regressions) |
Hybrid lm_head (model_hybrid_q4f16.onnx) vs full-vocab model_q4f16.onnx (306 cases: 128 stress + Holdout B/C/D + 100 Holdout A) | 0 validCompile / exactPass regressions |
Usage
from_pretrained loads onnx/model_q4f16.onnx by default for full generate() compatibility; showcase/ automatically selects onnx/model_hybrid_q4f16.onnx sharing onnx/model_q4f16.onnx_data and falls back cleanly if unavailable.
import { AutoModelForCausalLM, AutoTokenizer } from '@huggingface/transformers'; const modelId = 'AkaneTendo25/satsuki-qwen3-0.6b';const tokenizer = await AutoTokenizer.from_pretrained(modelId);const model = await AutoModelForCausalLM.from_pretrained(modelId, { dtype: 'q4f16', device: 'webgpu',});
import torchfrom transformers import AutoModelForCausalLM, AutoTokenizer model_id = "AkaneTendo25/satsuki-qwen3-0.6b"tokenizer = AutoTokenizer.from_pretrained(model_id) # Stage 1 SFT BF16 teacher (root)teacher = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16) # Stage 2 KL-QAT BF16 checkpoint (subfolder)qat_bf16 = AutoModelForCausalLM.from_pretrained( model_id, subfolder="qat-bf16", torch_dtype=torch.bfloat16)
License
Derived from Qwen/Qwen3-0.6B (Apache-2.0).
Satsuki will evolve. Stay tuned.