Repository navigation
crit 0.2.0
Overview
crit 0.2.0 adds the Models module for recorded weight transforms, a recon step that freezes
each model's sampling, chat template and stop tokens into its candidates, measured run
benchmarks, and Core engine libraries that need no adapter code. Eval checks exactness on
the loaded engine, replays pinned text at long context and stops disturbed rounds. The
Python distribution crit (now including crit_models) and the native Core SDK
(critCore) share version 0.2.0. Runs recorded with 0.1.0 still verify.
Added
- Models (guide):
crit modelsproduces transformed weights and
records how they were made. The first workflow is post-training quantization:
planresolves a recipe against checkpoint headers,ptqquantizes projections to
FP8 per-channel or NVFP4 by round-to-nearest or GPTQ (layer-streamed calibration
through the officialtransformerscode) and exports a compressed-tensors checkpoint,
evalruns the output in an engine through Eval against the source model's data and
reference, andverifyre-hashes it. Themodels_transformrecord keeps the
resolved recipe, calibration data and token-window hashes, seed, source and output
file hashes, error measures and transform cost;models_evaluationbinds an Eval
result to it. crit run --id RUN recongathers the model's sampling defaults, stop tokens, chat
templates and keyconfig.jsonfields with file hashes intowork/recon.jsonand
scaffoldswork/recon.md; later candidates freeze itsfrozenblock as
configuration.recon. A run whose model is a folder needs recon before its first
candidate; single-file models are unchanged.crit serve --load-timeout. The default bound on loading the starting candidate is now
600 s plus the model's size at 50 MB/s, instead of a fixed 600 s.- Run records explain ineligibility.
crit run benchmarkandsealwarn when a benchmark
or candidate cannot qualify, andselectnames every blocker. The reasons are derived
when asked; telemetry keeps the 0.1.0 projection, so earlier runs still verify. crit run measurebenchmarks a candidate's resident cases itself, through the package's
Eval adapter in a reserved child process. The first measurement of a case pins its greedy
text, when two runs repeat it, and every later candidate replays it, so decode speeds compare across candidates;
load time and host and device memory are sampled during the run.- Core engine libraries:
crit/native_engine.hexports a Core engine from a shared
library with a C ABI (CRIT_EXPORT_ENGINE(factory)), andcrit_core.nativeloads it
and supplies the stock eval-v1 and chat-resident-v1 adapters, so an engine needs no
adapter code of its own.ReplayContinuationcarries Eval's replay text to the session. - Eval checks exactness on the loaded engine when the adapter declares
plainand offers
generate_plain(), instead of opening a second engine withspeculativefalse. For an
engine that streams 64 GB of experts from host memory, that removes one of three loads per
round (about 3 minutes of 19).PlainDecoding("plain": truein the generate options)
carries the request to native engines, and the stock adapter offers it when the engine
declaresplain. - Eval stops a round when a speed case's decode speeds spread by more than
disturbed_spread(25%) between repetitions: the device was disturbed. The partial result is
markedaborted,runexits with code 3, and--keep-disturbedfinishes the round anyway.
A disturbed Flash-Next round previously ran its full 25 minutes, failed the lower-context gate
on noise and had to be repeated. fp8-kv-attentionaddsprefill_fp8: prompt attention with Q·Kᵀ and P·V on E4M3 tensor
cores for head dimensions 64, 128 and 256, about twiceprefill's throughput at long
contexts with E4M3 rounding of queries and probabilities. Opt-in;prefillis unchanged.
Changed
- A benchmark record that cites no checks binds the case's latest check per gate for the
same package, instead of staying exploratory. - Safetensors indexes may list shards in subfolders (
tensors/model-00001-of-00004.safetensors)
as portable relative paths, in Core's C++ and Python readers and in the import audit;
Eval's model identity counts them. - Core's static libraries build position-independent, so engines can link them into a
shared library without rebuilding Core. - Under WSL,
--write-launcherswrites aserve.cmdthat startsserve.shin the same
distribution. - A killed process tree has 60 s instead of 5 s to exit before cleanup counts as failed.
Engines that pin tens of GB of host memory take longer than 5 s. - Eval's long-context points replay the longest speed case's pinned continuation when the
data has one and the adapter replays, socontext_decodeno longer moves with each
engine's own text; it compares only between results decoded on the same text. - Eval's prefill and TTFT floors count attention at the faster of the BF16 and FP8 rates.
An engine with FP8 attention beat the BF16 floor. crit eval kernelscharges each kernel only the time after every earlier kernel ended,
so a kernel launched early under programmatic dependent launch is not charged its wait;
span_mskeeps raw durations.
Documentation
- Eval adapter: an adapter may keep host-side weights in the process across the engines one
crit eval runopens one after another; device state is built fresh for each engine. - RUN_RECORDS and AGENTS: publish a case's checks before the benchmark that cites them.
- BUILDING_ENGINES: the example request no longer overrides
settings.tomlheadroom. - CUDA backend: free memory under WDDM. device-expert-cache: measured next-layer
prefetch results. - README: case studies for the Qwen3.8-27B NVFP4 and Qwen3.8-Flash-Next FP4-Local engines
on one RTX 5090.