Smoke-GptOssStack.ps1 takes -Worker leleka-igpu-worker -GpuMinTokens N. With every prompt forced through the
GPU (N=1): plain answer, function call, tool-result round trip with prefix reuse (134 of 181 tokens cached)
and streaming all pass through the control plane. dot4_peak measures 4.49 TOPS of dot4I8Packed with no memory
traffic on this iGPU, against 0.67-0.86 TOPS for the GEMM kernels (tile sweep in docs/igpu-prefill.md).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One full layer over a 512-token batch ending at position 4096: 0.52 s -> 0.22 s (8192: 1.07 s -> 0.44 s).
4096-token synthetic prompt, single unpaired run: 91.9 s -> 67.5 s (60.7 tok/s; CPU 247 s earlier). Same
tests against the CPU attention. Teacher-forced vs llama.cpp on the gate text: 95.3% / KL 0.0121 (the
earlier kernel gave 97.1% / 0.0100): the two GPU runs differ from each other by KL 0.0058, as much as GPU vs
CPU (0.0067-0.0080) and the CPU's own scalar vs SIMD (0.0048); a second text shows GPU-vs-CPU noise equal
to CPU-scalar-vs-SIMD noise (docs/igpu-prefill.md). Reported as borderline against the strict KL limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- cpu-worker: GptOssEngine can take a PrefillAccelerator (falls back to the CPU and drops it on failure)
- igpu-worker: separate executable, same protocol, --gpu-min-tokens/--gpu-batch; CPU-only with a message when
no GPU is usable
- real-model worker tests no longer assert llama.cpp's later greedy tokens (near-ties that moved with the
attention/KV/router changes of STRA-214; the first token and the reuse/determinism checks stay); the
teacher-forced gate is the comparison with llama.cpp
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A second thread builds the next layer's GPU weights while the first drives the GPU (rendezvous channel, at
most two layers resident). 1024-token synthetic prompt, single unpaired run: GPU prefill 23.3 s -> 20.9 s
(upload stall 5.3 s -> 0.4 s; the GPU phases slow down a little because the iGPU shares memory with the
repacking cores); CPU prefill of the same prompt 54.0 s.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- gptoss: PrefillAccelerator hook, Model::prefill_reuse_accelerated, layer/weight views, embed,
next_from_hidden (shared with the CPU forward pass), State KV export/import
- igpu: threaded weight repacking (131 s -> 6 s of upload for 24 layers), explicit half rounding of block
scales (the compiler folds the pack/unpack round trip away), matmul_rows, buffer reads/writes at offsets
- teacher-forced gate with GPU prefill: best token 97.1% vs llama.cpp, mean KL 0.0100, NLL +0.0148;
vs the CPU decoder KL 0.0067 (see docs/igpu-prefill.md). Experimental, not wired into the worker.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every piece of a gpt-oss prefill layer now exists as a GPU kernel tested against the CPU decoder: the grouped
products take a tile table (expert, first compact row, row count) built from the router's choices, gather
activation rows, add per-expert bias, and write a compact output that the combine kernel folds into the
residual in slot order.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RoPE uses the decoder's own rotation table; attention folds the softmax online over 32-key blocks for the
8 query heads of a KV head. Tested against the CPU decoder functions on full and sliding layers; one layer
over a 512-token batch ending at position 4096 takes about 0.52 s (0.02 s sliding) on the reference iGPU.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Buf, Recorder: device-resident arrays and batched kernel launches in one submission
- gemm epilogue: optional bias and accumulate into the existing output (residual add)
- rmsnorm_quant kernel: RMSNorm plus Q8_0 quantization per row; matches the CPU decoder's
rms_norm to 1e-5 relative and the CPU quantizer exactly on the tested shapes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New pure-Rust crate on wgpu 26 with generated WGSL kernels: C[m][n] = sum over 32-element blocks of the
exact int8 block sum (packed dot-product built-in) times the activation and weight block scales. Weights
are repacked at upload (ggml's unaligned 34- and 17-byte blocks become int8 or nibble words plus separate
half-float or E8M0 scale words); MXFP4 values are decoded in the shader from a nibble-packed magnitude table.
Every accumulator and operand is a named scalar (dynamically indexed private arrays spill on this GPU).
Checked against the CPU kernels: random Q8_0 and MXFP4 weights on awkward shapes (single block, ragged
tiles, 1 to 130 rows) and, with LELEKA_GPTOSS_GGUF set, real tensors of gpt-oss-20b (blk.3.attn_q Q8_0
4096 x 2880; blk.5 gate expert 11 and blk.23 down expert 31, MXFP4 2880 x 2880): all outputs within the
float32 accumulation bound, worst error 0.01-0.02 of it.
Speed (gemm_bench, reference iGPU, one run each): a 4x4-outputs-per-thread tile is best, about 0.7 TOPS
int8 including the block scales (MXFP4 2880x2880: 0.58 TOPS at 32 tokens, 0.68 at 64, 0.72 at 256;
Q8_0 4096x2880 at 256 tokens: 0.79); 8x8 spills registers (0.45). The CPU decoder's equivalent is about
0.25 TOPS. Small products use only ~45 workgroups; batching experts will fill the chip.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The iGPU streams a 1 GiB buffer at about 40 GB/s (CPU: about 36 GB/s) and accepted 14 GiB of storage
buffers, so the whole model fits in device memory. The README records both results and the decision to build
a phased iGPU prefill backend with the CPU keeping decode.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
experiments/igpu-spike is a standalone program (own workspace, wgpu 26, WGSL generated as text) that
multiplies int8 matrices with the packed dot-product built-in on the reference laptop's Intel iGPU. The
instruction ceiling is 2.74 TOPS; a naive kernel reached 0.2-0.3 TOPS because private arrays were spilled,
and with named scalars the 8x8-per-thread kernel reaches 0.8-1.3 TOPS on prefill-like shapes (0.5-0.64 at
32 tokens), against about 0.25 TOPS for the CPU's decoder. Only the integer product is measured; the README
lists what is not shown (MXFP4 decoding, block scales, attention, weight upload, memory strategy) and the
decision needed from the owner.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The router's 32 single-precision dot products (2,880 elements each) and the expert activation (a scalar exp
per element) were the largest serial pieces left outside the matrix products. cpu-sys gains a vector
swiglu-oai kernel (portable and AVX2 + FMA, using the same vector exp as the softmax, relative error below
3e-6 in the tests, including gates far beyond the clamps), and the router reuses the strided dot kernel.
Measured on gpt-oss-20b, 10 threads, one run each on a noisy machine (not paired): router 3.0 -> 1.3 ms
and activation 3.0 -> 1.3 ms per decoded token; in prefill (chunk 64) router 2.5 -> 0.6 ms and activation
2.5 -> 1.6 ms per token. Decode 86 ms per token (11.6 tokens/s) over 19 tokens. Teacher-forced gate against
llama.cpp: best token 97.4%, mean KL 0.0088 (criterion <= 0.012; the previous build gave 0.0077, the
difference between the two builds is 0.0050, at the noise floor).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keys and values are stored as IEEE half floats (49 KB per token instead of 98 KB, llama.cpp's default
cache type). New cpu-sys kernels read them directly: attention scores and weighted value sums over half
floats (portable and AVX2 + FMA + F16C, blocked over positions like the f32 ones) and a vector
float-to-half conversion that is bit-identical to the portable one. The decoder writes rotated keys and
values through Dispatch::f32_to_f16; the synthetic f64 reference rounds K and V the same way.
Teacher-forced gate against llama.cpp (same 383 tokens): best token 97.4% (unchanged), mean KL 0.0077
(was 0.0082 with f32 cache), next-token NLL 1.2852 vs 1.2798. The conversions cost a little attention time
(2,000-token context, one noisy run: decode attention 9.9 ms against 7.7 ms with f32), which is the price
of halving the cache. The worker's default context rises to 32,768 tokens (1.6 GB).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
benchmarks/tools/Smoke-GptOssStack.ps1 starts strata-next with leleka-cpu-worker for a GGUF and checks a
plain question, a function call, a tool-result round trip that must reuse the cached prefix, and a
streaming request, then stops what it started. Run on the reference laptop with gpt-oss-20b: all pass
(second-turn prefix reuse 134 of 181 prompt tokens; 5.3 s for a short answer, 6-8 s for tool turns).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Setting engine.gptoss_gguf (or STRATA_GPTOSS_GGUF) selects the gpt-oss family and takes the tokenizer from
that GGUF. Prompts: a Responses request (instructions, input items with reasoning, function calls and
outputs, tools, tool_choice, parallel_tool_calls, text.format, reasoning effort) is rendered as the Harmony
conversation by leleka-harmony; the same replay validation as the Qwen path, one call per assistant message
with its output, no custom tools. Output: a stateful HarmonyDecoder turns the generated tokens into the
reasoning / answer / <tool_call> markup that the existing code parses, so tool-name and argument
validation, history and the streaming events are reused; gpt-oss always reasons, the end-of-generation
markers <|return|> and <|call|> are the terminal tokens, and an open tool call is closed when the
generation ends.
Safety: the renderer can write its special markers as private-use sentinel characters (and replaces those
characters in caller text); the codec turns exactly those into special tokens. Marker-looking text from a
client, in messages, tool descriptions or tool output, stays ordinary text.
Side effect, deliberate: serde_json preserve_order is now on workspace-wide (the renderer needs the client's
property order), so tool-call argument objects keep the model's key order instead of alphabetical; one test
expectation changed accordingly. 52 responses tests and the new family tests pass; the 13 other
control-plane test failures on Windows predate this change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Responses code used the Qwen tokenizer directly. A TextCodec trait now carries what differs between
model families: encode, a stateful per-generation TokenDecoder, the terminal token ids and the family.
QwenCodec wraps the existing tokenizer with identical behaviour; the buffered and streaming paths decode
through a decoder created per generation, and reasoning_enabled takes the family so a family that always
reasons can say so. All 46 responses tests pass unchanged apart from the test helper.
Also fixes the Windows (MSVC) link of the control plane's test binary: ggml-quants.c references four
helpers from ggml.c that are not vendored; GNU linkers drop the unused code, MSVC does not. Abort-on-use
stubs are compiled for MSVC targets only. 13 other control-plane unit tests fail on Windows for
Linux-path reasons (absolute paths such as /private/api.key, disk-space and service-unit assumptions) and
are unrelated to this change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Attention was scalar and latency bound. New kernels in cpu-sys (portable and AVX2 + FMA): scores for a
group of query heads against strided keys, weighted value sums for the group, and a vector exp for the
softmax (relative error below 3e-7). The 8 query heads that share a KV head are processed together over
blocks of 16 positions, so each key and value row is read into L1 once per group instead of once per head.
ops::attend_group_with_sink uses them through Dispatch; a group is bit-identical to its heads run one at a
time (test), and the kernels are checked against f64 references for odd widths, strides and block sizes.
Measured on gpt-oss-20b, 10 threads, 2,000 tokens of context (one run each, noisy machine): decode
attention 27.4 -> 14.5 -> 7.7 ms per token (per-head SIMD, then grouped), decode 116 -> 95 ms per token
(10.5 tokens/s, the same as at short context); prefill attention 8.9 -> 2.1 ms per token. Teacher-forced
quality gate against llama.cpp: best token 97.4% (was 97.1%), mean KL 0.0082 (was 0.0080).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dump_logprobs writes the top-20 next-token log-probabilities after every position of a fixed token
sequence; compare_logprobs compares two such dumps (best-token agreement, log-probability differences, KL
on the shared top tokens, next-token NLL, statistics by position). The committed reference holds
llama.cpp's numbers for a 383-token Harmony exchange.
Result: Leleka (AVX-VNNI) vs llama.cpp agrees on the best token at 97.1% of positions, mean KL 0.0080,
next-token NLL 1.2859 vs 1.2798. Leleka's own scalar and SIMD kernel levels, which differ only in float
summation order, differ from each other by mean KL 0.0048 with the same early-position pattern, so the
earlier first-step discrepancy is numerical noise amplified by the 8-bit activation quantization, not a
systematic error. The README records the procedure and the pass criteria for later changes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New crate leleka-cpu-worker (executable leleka-cpu-worker --serve --model <gguf>): loads the GGUF through
the read-only mapping, runs the gpt-oss decoder on the AVX2 / AVX-VNNI kernels, and speaks the stdin/stdout
protocol of Strata's --serve mode (READY, GEN with temperature, top_p and seed, STOP, QUIT, PP, REUSED, T,
DONE, ERR). Prefix reuse across requests, cancellation between prefill chunks and between tokens, a stale
STOP while idle is ignored, the end-of-generation marker is emitted as the last token.
leleka-gptoss gains sampling (greedy, or temperature and top-p over the 1,024 best logits, with a seeded
generator) and prefill_reuse_with (progress and cancellation). A stray NUL byte left in a doc comment by an
earlier shell edit is removed.
Tests: protocol parsing, the request loop against a mock decoder (stop token, length, reuse, STOP, QUIT,
engine failure, broken pipe), and an end-to-end run on the real model (needs LELEKA_GPTOSS_GGUF) that gets
llama.cpp's 16 greedy tokens for "The capital of France is" and reuses the prefix of a longer prompt.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka-tokenizer gains gguf_bpe: a byte-level BPE tokenizer built from the vocabulary in the GGUF file
(gpt2 model, gpt-4o pre-tokenizer), with special-token parsing that is off by default so user text cannot
forge markers, and a UTF-8-safe streaming decoder. Checked against llama.cpp's /tokenize on 67 strings: same
ids except the two documented differences (llama.cpp forges some Harmony markers from text; it splits
words at combining marks, which the o200k expression keeps together).
New leleka-harmony crate: render() reproduces the gpt-oss chat template (including its whitespace) and is
byte-identical to llama.cpp's /apply-template on ten conversations with many tool-schema shapes;
HarmonyParser turns generated tokens into reasoning, answer and tool-call events.
The oracle fixtures are test strings, token ids and rendered prompts only. The tokenizer oracle test needs
LELEKA_GPTOSS_GGUF and reports "skipped" without it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
State now records which tokens its KV cache holds. Model::prefill_reuse keeps the longest common prefix
with a new prompt (always recomputing the last token, whose logits are needed) and prefills only the
rest. A position that would leave a gap after the cached tokens is refused. Tests check that the result
equals a fresh prefill bit for bit for identical, extended, diverging and unrelated prompts.
The experimental AVX-VNNI tile kernels now use unsigned weights (w + 128, no sign instruction), start
each block's accumulation from -128 * sum(x) in lane 0, and read pre-broadcast activation scales
(PreparedAct / ActRef in cpu-sys). Tests bound the difference to the portable reference by
(blocks + 16) * 2^-23 * sum of |terms| computed with absolute weights and activations. In bench_tiles
this is not measurably faster than the sign-based tile (4x4 tile for 8 activations: 1.30x the one-row
kernel at 10 threads, against 1.35x before; run-to-run noise on this laptop is about 10%), so the tiles
stay unused by the decoder.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The decoder now runs decode and prefill through one chunked forward pass. Prefill feeds up to 64 tokens
at once: each weight row is read once per chunk and used against every token, MoE tokens are grouped
by expert, and attention runs as a pool region with one work item per (token, KV head). The result is
bit for bit what feeding the tokens one at a time gives (tests: every chunk size, 1 and 3 threads, and
resuming after an earlier prefix). The KV cache sits behind a read-write lock per layer so pool threads
can read it.
cpu-sys gains experimental tile kernels (1-4 MXFP4 or Q8_0 rows against 1-4 activations in the q8r
layout) at the portable, AVX2 and AVX-VNNI levels, with tests that every tile shape equals the 1x1 tile
bit for bit and stays within the float tolerance of the portable reference. They are not wired into the
decoder: in bench_tiles the 4x4 tile is 1.3-1.5x the one-row kernel for 8 activations, and slower for one
activation, where the one-row kernel already reads 31 of about 36 GB/s.
Measured on gpt-oss-20b, 10 threads, 256 synthetic tokens: prefill 51 ms per token (19.6 tokens/s) at
chunk 64, 13 tokens/s per token at chunk 1; decode unchanged (85-92 ms per token, same tokens and log-probs).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The MXFP4, Q8_0, int8 and int4 kernels, the Q8_0 quantizer and the half conversions are now Rust
(cpu-sys/src/simd.rs), written operation for operation after the C versions. The C code stays only behind
the test-only feature c-reference, and tests/rust_vs_c.rs checks bit-identical results at the portable,
AVX2 and AVX-VNNI levels. A runtime build compiles no C.
Paired decode on gpt-oss-20b (40 tokens, 10 threads, 5 alternating rounds): median 98 ms per token for
both builds, identical tokens and first-step log-probabilities.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The expert products (62 percent of a decoded token) now read the activation as f32
scales plus contiguous int8 quants, summed with four accumulators per iteration.
Adds the portable reference and the AVX-VNNI kernel for that layout; the AVX2 and
AVX-VNNI kernels are tested bit-identical to each other, and every level is within
the stated tolerance of the ggml-derived f64 reference. The decoder keeps both the
Q8_0 blocks (for the Q8_0 attention and output head) and the converted layout.
Measured on the real model with pre-touched pages, 10 threads, 40 tokens, alternating
old and new binaries (5 repeats; indicative, one burst-state outlier excluded): paired
old/new ratios 1.09, 1.14, 1.08, 1.06, i.e. about 8 percent less time per token (118 to
111 ms median), expert gate+up 41.6 to 37.6 ms. Greedy tokens are identical to
llama.cpp for the first 16 and to the previous build for the first 18; they diverge at
position 18 where the top-two logit gap is 0.009 (a numerical tie).
Also adds a per-step top-two logit margin print to the real-model runner.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first decoder spawned OS threads for each of about 385 matrix-vector products
per token, which made it slower with more threads (257 ms per token at 5 threads,
538 ms at 12). It now keeps a pool of parked workers; the products of a layer
are grouped into four regions (QKV, output projection, expert gate+up, expert
down) and participants claim row chunks from a shared counter, which suits the
mixed fast and slow cores. Weights are referenced through shared handles into the
mapped file so jobs are 'static. Adds a per-phase profile, a page pre-touch for the
mapping, and a real-model runner option for it.
Measured on the reference laptop (quiet machine, single runs, short context, NOT
paired; indicative only): 120 to 160 ms per token at 5 to 10 threads cold, 115 ms
(8.7 tokens/s) at 10 threads with pre-touched pages. Same 16 greedy tokens as
llama.cpp. The synthetic end-to-end tests still match the independent f64
reference and give identical logits at every thread count.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka-gptoss reads the model hyper-parameters from the GGUF header and views
the weights in place in the memory-mapped file; only norms, biases, router and
sinks are copied. One-token forward pass: RMSNorm (f64 sum), attention with
grouped KV heads, learned sinks and alternating sliding/full layers, YaRN RoPE
in NeoX pairing, router with softmax over the selected logits, MXFP4 experts with
the clamped gated activation, Q8_0 attention and output head. Row-parallel
matrix-vector products; f32 KV cache. Greedy generation.
Tests: unit tests of each operation against f64 formulas, and an end-to-end test
on a tiny synthetic gpt-oss (ggml-quantized random weights) against an
independent f64 implementation: worst relative logit difference about 1e-7 over
three seeds, identical logits at every instruction-set level and thread count.
Whether the maths equals the real model's is NOT yet tested: that needs the
llama.cpp oracle (STRA-212 acceptance criteria).
leleka-cpu-sys gains a safe read-only file mapping (Windows and Linux). The
benchmark script now reproduces Bionic's server flags, supports concurrent
requests and reports aggregate speed. No speed claim is made.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Prints metadata keys with summarised arrays and the tensor shapes of the
global tensors and block 0. Used to read the architecture and tokenizer facts
of gpt-oss-20b from the header of the file that LM Studio (Bionic) is
downloading.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Limits::check_data_range = false and the example's --partial flag read the header of a file that is still downloading. The report says nothing about the tensor data. Used to read the real tensor inventory of gpt-oss-20b-MXFP4 while it was downloading.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Completes the Q8_0 side of the CPU runtime's kernel set: a float-to-Q8_0
quantizer (scale = amax / 127 as a half, quants rounded to nearest even and
clamped to [-127, 127]) and the Q8_0 x Q8_0 dot, each at scalar, AVX2 and AVX-VNNI
(the quantizer shares the AVX2 code). Tests: the quantizer is bit-identical across
levels and equal to the vendored ggml reference except on exact .5 ties; per-block
integer sums are exact; float results are within the stated tolerance of an f64
reference built from ggml's dequantizer; the portable half conversion equals the
F16C instruction on over a million values. Windows MSVC and Linux GCC, debug and
release. Replaces _cvtss_sh (not available in MSVC) with the packed conversion.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka-gguf reads the header of a GGUF file with bounded allocation (limits plus
the file size), validates tensor shapes against block geometry from the pinned
ggml, offsets against alignment, overlap and the end of the file, and builds an
inventory of which bytes one decoded token reads in a mixture-of-experts model
(experts scaled by used/total, one embedding row, full attention, router, norms
and output head). No dependencies, no unsafe. 13 tests on synthetic files, including
hostile headers and truncation at every length.
benchmarks/tools adds Capture-MachineState.ps1 (drift fields of the reference
laptop record, quiet-machine gate) and Measure-LlamaServer.ps1 (rotating-round
measurement of llama.cpp-style servers with the machine state before and after).
Tested only against a fake local server; no real model has been measured yet.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds two EXPERIMENTAL AVX2 MXFP4 kernels that take the activation as f32
scales plus contiguous int8 quants (q8r, q8r4). q8r is tested bit-identical to
the ggml-layout kernel; q8r4 against the stated tolerance. Adds Windows core
topology and thread pinning (cpu-sys topology module) and three kernel-level
benchmarks that interleave variants and report paired ratios.
Findings, recorded in docs/experiments/2026-10-14-cpu-kernel-layout-and-pinning.md:
the chip has 2 fast cores and 10 slower ones; the new layout was faster for a
single thread (paired median 1.32x, 15 pairs) and inconclusive with many
threads; thread pinning did not beat the OS default. The machine was not in a
controlled state, so these are not accepted performance results.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The gpt-oss-20b experts are MXFP4, so the CPU runtime needs this dot product.
Blocks use ggml's byte layout, so GGUF tensors can be read in place. Per-block
integer sums are exact at every level; the float combination is checked against
an f64 reference built from the vendored ggml dequantizers (test-only
ggml-oracle feature) within a tolerance written before the run. Scale
conversion is compared exactly with ggml for every E8M0 code and every finite
half. AVX2 level now means AVX2 + FMA + F16C. ABI version 2.
Adds a kernel-level throughput example (bench_mxfp4); it is not an inference
benchmark and no end-to-end speed claim is made. Records the ggml upstream use
in docs/upstream-ggml.md.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka-cpu-sys holds the C kernels (one translation unit per ISA level, built
by build.rs with cc) behind a checked FFI; it is the only unsafe code of the CPU
runtime and opts out of the workspace unsafe_code lint with a recorded exception.
leleka-cpu-kernels does safe run-time dispatch with a LELEKA_CPU_ISA override
that fails rather than silently changing level.
Ports the int8xint8 and int4xint8 dot products from Colibri c/idot.h at scalar,
AVX2 and AVX-VNNI. Tests compare every level with the C scalar kernel and an
independent i64 oracle (13 tests; Windows MSVC and Linux GCC 14.2). Activations
must be in [-127, 127]: -128 is outside the contract and a test pins that. No
performance claim: nothing was timed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Colibri (JustVugg/colibri, Apache-2.0) is an upstream source for the CPU
runtime, not a dependency. Record the pinned commit, archive and licence
digests, the porting rules, and a per-file ledger with adopt/adapt/reject
decisions. docs/upstream.md (Strata pin) is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This adds revision 1 of the reference-laptop record for the Windows Core Ultra 7 265U laptop with the Intel AI Boost NPU: identity facts, state at capture, constraints, a drift rule and benchmark pre-conditions, each fact tied to a numbered read-only command run without elevation. Later benchmark and NPU work needs one citable hardware, driver and power identity, so results can be traced to a machine state and flagged stale when that state changes. The page carries one machine-readable block that reuses the vocabulary of the desktop hardware inventory, and the full raw capture stays outside Git and is referenced by its SHA-256 digest only. Power mode, CPU temperature, NPU generation and the NPU memory limit are marked UNVERIFIED rather than inferred, and the page makes no capability or performance claim.
Checks before this commit: no line over 120 characters (longest 118), the JSON block parses and agrees with the tables, 8 relative links and anchors resolve, git diff --check is clean, and the exclusion-list scan against the private capture values found zero matches. Independent reproduction of each documented command is still pending.