open-standards/wai/wai-quantum-writer/Cargo.toml
Transaction Science 205234abc5 wai-quantum-writer: the thinking cap stays within max_new, a verified model is hashed through its mapping, and a transcript's options and maths library can be given again
The second review's findings in the loop and the model wrapper:
- The cap's edges. A close at the cap could take a reply past max_new (201 tokens of
  200), and one with too few tokens left gave a program cut short to check. A close now
  needs room for itself and MIN_ANSWER (64) tokens; otherwise the reply ends with no
  answer. A reply that thinks again after the close is closed again, and answer_of reads
  the text after the last close. An empty answer is no program: the model is asked
  again, the engine not asked to check nothing.
- "checked": "blake3" held only at check time: verify hashed files by name and bind
  mapped them by name again. open_verified now opens each file once, hashes it through
  the mapping the model reads (map_checked) and parses from that mapping; the config and
  tokenizer from the bytes hashed. The docs say what holds after mapping.
- Replay. --check-memory-bytes gives the command line the check's memory a service
  planned in, so every option a transcript records can be given again. The identity
  names the maths library (glibc's version, or macOS's release and build), whose
  exponentials and sines shape the logits. The matmul test now runs the dispatcher the
  projections call (matmul_bf16_auto, one row and three, and the batch).

Tests failing on fbbee6fd9 for the reasons they state:
the_cap_keeps_within_max_new_and_closes_a_reopened_thinking (201 tokens of 200),
every_recorded_option_can_be_given (the flag ignored), an_empty_answer_is_no_program
(an empty program checked). New: a_shard_is_checked_through_the_mapping_the_model_reads,
the_maths_library_is_named.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 08:01:21 -05:00

29 lines
1.7 KiB
TOML

[package]
name = "wai-quantum-writer"
version = "0.1.0"
edition = "2024"
license = "Apache-2.0"
description = "WAI Quantum writes a program for a task: a model on WAI's own pure-Rust inference runtime writes it, the engine checks it against what the task asks exactly as it checks a lesson's answer, and what went wrong goes back for another attempt. Decoding is greedy, so the same model files, task, options and engine give the same programs in the same arithmetic, which the transcript names (architecture, operating system, matmul kernel), and every attempt is in a transcript named by digests."
repository = "https://git.transaction.science/Transaction-Science/open-standards"
publish = false
[dependencies]
# quantum_engine: the course's check of a program against an exercise
# (engine::course::check_exercise, task_of); quantum_receipt: the canonical
# bytes the transcript's digests are taken over.
wai-quantum = { path = "../wai-quantum", default-features = false, features = ["quantum_engine", "quantum_receipt"] }
serde_json = { version = "1", features = ["preserve_order"] }
blake3 = "1"
# The model the loop runs: North Mini Code 1.0 (Apache-2.0) on the pure-Rust
# inference substrate (jouleclaw-loader-gguf), greedy decode from the checkpoint mmap.
jouleclaw-loader-gguf = { path = "../../jouleclaw/jouleclaw-rs/crates/jouleclaw-loader-gguf", features = ["rayon"], optional = true }
# The model's shards mapped from one handle each, so open_verified hashes the bytes it maps.
memmap2 = { version = "0.9", optional = true }
[features]
default = ["coder"]
coder = ["dep:jouleclaw-loader-gguf", "dep:memmap2"]
[[bin]]
name = "wai-quantum-writer"
required-features = ["coder"]