Keyan Hu ca17d0f5cd spec: a gated request's lookup policy learns from committed rounds only, DraftPolicy choose() unchanged otherwise (#3416)
Problem (KeyanHu-git): the gated proposal needs the choice between the MTP window and a
lookup window to be fixed by the history, not by the draws of the rounds it will verify.
Freezing the policy for the whole request (the first commit) does that, but also freezes
the cost table, so a repeat-heavy request kept the window sizes it inherited. In the
author's diagnostic workload the frozen policy chose mean lookup windows of 5.87 and 3.38
on two repeat requests; with this change 4.31 and 4.05 (from the PR text; not
reproduced here).

Change: the request's copy of the DraftPolicy (source_policy) gets three calls, used only
when gated_proposal is on:
- observe_committed(): the round's accept and probe counts, applied at once. A lookup
  window counts as a probe of its size (tried_), so a size whose cost is only guessed is
  tried kProbes times, not every round.
- defer_cost(end, t, ms): the round's time is held. A time covers the window and the next
  MTP draft, so it depends on every Philox counter up to
  max(p + T - 1, p + a + 1 + S_mtp).
- apply_costs(committed): applies, in order, the held times whose end is behind the
  committed position, with the same update observe() makes (including the STRATA_SPEC_COST
  clamp), in the context bucket the round ran in; delayed_n_ keeps a held time from
  counting as a second probe.
choose() counts the probes as cost_n_ - delayed_n_ + tried_.

Port note: the DraftPolicy on the current tree keeps its costs per context bucket
(STRATA_SPEC_COST), so tried_, delayed_n_ and the held times carry the bucket. A gated
request does not run with STRATA_SPEC_COST (it falls back to the older rule), so its
copy stays in bucket 0.

Default path: unchanged. choose() reads two new terms; on any path that never calls the new
functions tried_ and delayed_n_ are +0.0 and cost_n_ - 0.0 + 0.0 == cost_n_ exactly.
Checked by driving the old DraftPolicy (namespace-renamed copy of f-027-gh-eng) and the
new one with the same random call sequences (observe, observe_chain, observe_probs,
set_context, seed_costs, set_robust, choose, chain, keep_draft; 400 sequences of 3000
steps): 25,983,538 bitwise comparisons of picks, costs and rates, 0 mismatches; one
observe_committed call makes the same harness report 60,528 mismatches. generate.cpp:
nothing calls the new functions when gated_proposal is false.

Tests: draft_policy_test (the PR's added assertions, on the bucketed class) and
spec_admission_test pass on z440 and on the owner PC.
Not covered: the sampling argument for the delay boundary (that a held time cannot steer
a window through a counter that is drawn again) is the author's; a unit test cannot show
it, only the distribution run (gate script 3416-spec-prob-dist.sh, arm NEWLK) can.
2026-10-27 01:45:36 +01:00
2026-10-13 04:36:28 +02:00
2026-10-13 04:36:30 +02:00

Strata

Run powerful AI on your own computer.

Chat, code and work with images, locally.

Models · Install · Hardware · Tools · Help · Support

Download Strata MIT license Support Strata on Buy Me a Coffee

English · 简体中文 · 日本語 · Deutsch · Français · Español · PortuguĂŞs

Free, open source, and yours to run. Use Strata on your desktop or with your favorite coding tools. No account needed.

Models

We recommend ISTA-DASLab first, then Unsloth and other providers, where a compatible model fits.

 Qwen3.8-Flash-Next
Provider Choices
ISTA-DASLab · recommended Q2_0, IQ2_XS, IQ3_XXS, IQ3_S. Coder: IQ1_M for coding.
Unsloth UD-IQ4_XS, UD-Q4_K_XL, UD-Q5_K_XL, UD-Q6_K_XL, Q8_0
Gyro · agentionai Gyro-S, Gyro-M. Lower memory use but slower.
Other options Swift 1.5, NVFP4, OrcaRouter

Compare sizes, memory needs and compatibility.

 Qwen3.6-35B-A3B

Unsloth: UD-Q4_K_XL, UD-Q6_K_XL, Q8_0. These are the currently documented packs for this model.

Model guide and compatibility.

 DeepSeekV4.1-Flash-1017

In the desktop app and the Terminal. What does not fit in memory is read from your SSD, so it needs a lot of free disk space.

Set (IST-DAS) Download Free disk needed
1.75 bpw 239 GB about 245 GB
2.00 bpw 257 GB about 265 GB
2.25 bpw 274 GB about 280 GB

Runs on NVIDIA RTX 30, 40 and 50 series (Windows and Linux), AMD Radeon AI PRO R9700 (Linux), and AMD Ryzen AI Max — Strix Halo (Windows). Setup downloads the files and the DeepSeek engine, then starts the model.

strata launch --family deepseek41 --model ist-das-2.00bpw --plan

Measured with the 2.00 bpw set on Strata 0.2.5 (Strix Halo: 0.2.7). Output is the speed of the answer, prompt is how fast Strata reads your input.

Hardware Output Prompt
RTX 5070 12 GB, 64 GB RAM 4 to 6 tokens/s about 110 tokens/s (4K)
RTX 3060 12 GB, 46 GB RAM 9 to 11 tokens/s about 155 tokens/s (4K)
1x Radeon AI PRO R9700, 251 GB RAM 21 to 25 tokens/s 320 to 360 tokens/s (8K)
4x Radeon AI PRO R9700 74 to 77 tokens/s 400 to 450 tokens/s (8K)
Ryzen AI Max+ 395 (Strix Halo), 128 GB unified 19 to 21 tokens/s (code), 11 (chat) 87 tokens/s (4K), 125 tokens/s (8K)

Memory, disk and details · Release notes

Not sure what fits? Choose a model for your computer.

Install

Desktop app

Download Strata for Windows, Linux or Mac →

Install the app, choose a model, and start chatting. There is one installer for each system. On first start the app downloads the engine for your graphics card. Help with the installer.

Files: Strata-0.2.6-windows-x64-setup.exe · Strata-0.2.6-linux-x86_64.AppImage · Strata-0.2.6-macos-arm64.dmg

Strata desktop app with a chat and live code preview side by side
Chat, files and a live preview in one window.

Terminal app

Prefer the terminal? Install Strata, then run strata launch.

Install commands

Linux / Mac

curl -fsSL https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh

Windows PowerShell

irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex

On Windows, open a new terminal afterwards. Then:

strata launch

Follow the prompts to download and start a model. Terminal guide.

Strata terminal app showing model activity, speed, memory and recent requests
Watch your model and hardware while it runs.

Build from source · Docker · Full install guide

Hardware

Supported hardware Guide
NVIDIA GeForce RTX 20 / 30 / 40 / 50 series NVIDIA setup
AMD Radeon RX 7700 / 7800 / 7900, RX 9060 / 9070, AI PRO R9700 AMD setup
AMD Radeon RX 6800 / 6900 · experimental RX 6000 setup
Intel Arc · Linux Intel setup
Apple Silicon · M1 or newer Mac setup
AMD Ryzen AI Max · Strix Halo Strix Halo setup

Tools

Claude Code · Codex CLI · OpenCode · oh-my-pi · pi.dev · Hermes Agent · OpenClaw, and more through the OpenAI- and Anthropic-compatible APIs.

Run strata connect to see setup instructions for your tool. Connection guide.

Help

All guides · Troubleshooting · Report a bug · Benchmarks · How it works · Contribute

Support Strata

Help keep local AI open to everyone. A coffee helps fund development and testing on more hardware.

Buy Me a Coffee: support Strata

MIT license · Credits and model licenses · Privacy

For AI tools and automated readers: technical reference · setup instructions.

Sponsorships, hardware partnerships or collaborations: niko.veit@outlook.com.

S
Description
AImighty fork of Niko1221/Strata (KVA+batch)
Readme MIT
81 MiB
0 Stars 3 Watchers 0 Forks
Languages
C++ 42.9%
Python 28.9%
Cuda 11.5%
JavaScript 8.3%
TypeScript 3.5%
Other 4.5%