Views
No views yet
| File | What it is |
|---|---|
direction_model.json | The fitted DirectionModel: weights over stemma.types.DIRECTION_FEATURES, bias, feature_names, scaler_mean, scaler_scale. A regularised logistic combiner — a few dozen floats. |
sketch_config.json | The frozen sketch coordinate system: version (SKETCH_VERSION), ROLES, DEPTH_BUCKETS, FEATURES_PER_SLOT, SKETCH_DIM. A sketch computed under a different config is not comparable. |
sketch_index.npz + sketch_index.json | A prebuilt stemma.phylogeny.SketchIndex over the benchmark universe: L2-normalisable float32 sketch vectors, presence masks, model ids and per-model metadata. |
fit_report.json | Train/test sizes, held-out accuracy, per-relation accuracy and abstention rate from the fit that produced direction_model.json. |
python scripts/push_model.py --repo-id <org>/<name> --bench-dir bench_models --fit.1from stemma.direction import DirectionModel, estimate_direction
2from stemma.phylogeny import SketchIndex
3
4model = DirectionModel.load("direction_model.json")
5index = SketchIndex.load("sketch_index")
6verdict = estimate_direction("org/a", "org/b", model=model)scripts/build_bench.py builds real safetensors checkpoints with
known lineages — fine-tunes, quantisations, prunings, vocabulary extensions, linear/TIES/DARE
merges with known mixing ratios, plus unrelated negatives — and writes ground_truth.json with
models, edges and labelled ordered pairs.(a, b),
direction.collect_pair_evidence Range-reads a handful of shared tensors and
direction.direction_features reduces them to the antisymmetric feature vector named by
stemma.types.DIRECTION_FEATURES. The features are antisymmetric by construction:
f(b, a) == -f(a, b) to within 1e-6, so the fitted combiner cannot learn a positional bias.DirectionModel.fit(X, y, l2=...) on a seeded, deterministic train/test split
(default seed 0, 25% held out). y = +1 when a is the parent. Because the features are
antisymmetric, each pair is also usable in its mirrored form; the split is done over pairs,
not over rows, so a pair and its mirror never straddle the split.sketch.sketch_model) and the resulting vectors are stored in a SketchIndex.scripts/push_model.py writes the four files above plus this card and uploads
with HfApi.create_repo(exist_ok=True) + upload_folder. The script is dry-run by default:
without --push it prints exactly what would be uploaded and uploads nothing.seed (default 0).fit_report.json at
fit time and mirrored into the repo's README frontmatter-free body by scripts/push_model.py. The
full benchmark — relatedness AUC and FPR@95TPR, direction accuracy against the symmetric
baselines, merge parent-set F1 and mixing MAE, bytes- and seconds-per-decision — is produced by
python benchmarks/run.py and lives in benchmarks/results.json.fit_report.json
and benchmarks/results.json, so that nothing here can drift away from what was actually measured.docs/FINDINGS.md): accuracy is reported per relation
type, abstention is reported alongside accuracy-on-non-abstained, cross-architecture distillation
is scored rather than excluded, and the symmetric baselines' 50% direction score is labelled a
structural ceiling rather than a tuning failure.docs/FINDINGS.md.log‖B‖_F − log‖A‖_F = −0.0171 (0/8 tensors positive) for Qwen2.5-0.5B → -Instruct, and
+0.0113 (8/8 positive) for SmolLM2-135M → -Instruct, though both pairs are unambiguously
base → instruct-tuned. norm_growth_asym is therefore a fitted feature with a small weight and
never a hand-set sign.build_bench.py produced. Expect degradation on architectures, quantisation formats or
merge recipes outside that distribution, and refit rather than assuming transfer.direction_model.json is only valid against the DIRECTION_FEATURES order
it was fitted with, and a SketchIndex only against its SKETCH_VERSION. Both are recorded in
the artifacts and checked on load.direction="unknown") is a correct
and expected outcome; a confident wrong answer is worse than no answer here.NagaYu/stemma-direction2026-08-08T13:24:27Zstemma-sketch-v1 (dim 1456)DirectionModel.default()), not fitted,
and that is a deliberate, measured choice rather than a missing step.lattice_asym a
negative weight — asserting that the quantised model is the parent. That is
physically impossible: dequantisation cannot restore what rounding destroyed, so the
scar can only ever appear downstream. It also put its largest weight on the statistic
already measured as the weakest. A prior encoding a physical impossibility beats a
coefficient fitted on 21 examples.--fit remains available for anyone with a substantially larger labelled corpus:
python scripts/push_model.py --repo-id <id> --bench-dir bench_models --fitfaiss, 0 model(s) unreadable)fit_report.json in this repository. The wider benchmark (relatedness AUC / FPR@95TPR, merge F1 and mixing MAE, bytes per decision) is regenerated with python benchmarks/run.py.0.6*sft + 0.4*cpt partly cancels two perturbations and lands closer to the root
than either parent (root→sft 0.000820, root→cpt 0.001610, root→merge 0.000678).
Every correctly chosen sibling outgroup then pushes the answer the wrong way.
Direction for a merged model must come from the decomposition, not from distance
geometry — merge precision 1.000, DARE mixing MAE 0.0004.docs/FINDINGS.md.