vela: add the 0.8B native F32 heads, scoring and span decoding #176
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 514 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.374
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #176"
general
weight: 0.35
Levius-Fubuki
Stacked on #151 + #174 + #175 — incremental review. Current head
541de98c, rebased ontomainat285c791; the latest commits are the review fixes listed under Test Result.Required human contributor answers
1. What outcome are you trying to achieve?
Implement the Vela-owned output side of the native path: CandidateHead, both SpanHeadV2 heads, set_bias, and the full calibration/decode chain — checked against recorded reference fixtures without any GPU. (Source: issue #137.)
2. What is the highest-leverage variable?
Head-logit parity — if the F32 math doesn't match the reference to ~1e-5, every downstream answer is wrong.
3. How will this work move that variable?
The recorded head-input fixtures (hidden states, logits, calibrated answers) freeze both the math and the scoring chain; five cases pin the numbers.
4. Who is the customer or user?
Same as #175 — this is the second half of the native output path.
Is a PR needed? Yes — prerequisite for the executor PR.
For a bug fix: N/A.
Purpose
heads.rs(CandidateHead bilinear + scalar-MLP with erf-GELU via libm, both SpanHeadV2 instances, set_bias — plain F32),scoring.rs(temperatures, set thresholds, PII length rule, sparse gate,span_decode_r4, label aliasing, score normalization, f64 window aggregation), head-input fixture exporter, five recorded fixture sets (~15.8 MB safetensors).Test Plan
System1-Omni Version / Commit:
model/vela2-native-heads@541de98c| Check | Command | Result |
|---|---|---|
| CPU tests |
cargo test -p omni-vela-native| 49 passed; 3 ignored || clippy |
cargo clippy -p omni-vela-native --all-targets -- -D warnings| clean || Docs |
mkdocs build --strict| exit 0 || Opt-in head parity |
VELA_NATIVE_BUNDLE=… VELA_NATIVE_MANIFEST_SHA256=… cargo test --test vela_native_heads -- --ignored| 5/5: logit ≤3.8e-5, answer ≤7.3e-7 |Test Result
All passed. Gates default 4e-5/1e-6 (env-overridable, tighten-only); recorded maxima 3.7e-5 / 7.3e-7.
541de98c(rebased ontomainat285c791): every check in the table rerun and green —cargo test -p omni-vela-native --locked(49 passed, 3 opt-in ignored), the opt-in head parity (5/5) and render parity (2/2) against the local 0.8B export with exactly the drifts in the table below,PYTHONPATH=src pytest tests/vela(141 passed),cargo fmt --all --check, crate clippy-D warningsand strictmkdocs build; CI and Docs workflows green.2f50eb85is the heads and scoring slice, with window calls mapped to their recorded rows and the positive long-span regression;085761e3accepts the checkpoint's rank-0set_bias;19c24d23and0810a59dsetVELA_NATIVE_MANIFEST_SHA256in the opt-in commands;d7384085carries the executor slice's bundle-directory walk verbatim with three walk regressions;e546e0c4makes the calibration anchor sort NaN-safe (total_cmp);3b2d8de5indexes the window aggregation by offset, the 0.8B executor slice's version;b9ea8333and541de98cmove the head loader and state unit tests undertests/velawith#[path]wiring, so no test body is left undersrc/.ce8c0ca9: every check in the table plusPYTHONPATH=src pytest tests/vela(139 passed),cargo fmt --all --checkand strict mkdocs rerun and green at that head.Demo / evidence
Author-run, x86 WSL2, CPU FP32, five cases:
| Case | Logit drift | Answer drift |
|---|---|---|
| example-request | 3.719e-5 | 7.252e-7 |
| set-threshold | 6.676e-6 | 1.126e-7 |
| cjk | 3.624e-5 | 4.768e-7 |
| score | 1.669e-6 | 6.077e-7 |
| long-span-windowed | 1.121e-5 | 0.0 (exact) |
Structural assertions: discrete picks, span label/text/start/end, threshold rules — all equal.
Fixture facts: ~15.8 MB total safetensors; regenerable via documented command;
rowsblock in JSON is informational.Not measured: GPU, performance.
Self-review