How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="slow-stack/laya-nli-memory-conflict")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("slow-stack/laya-nli-memory-conflict", device_map="auto")
Quick Links

laya-nli-memory-conflict

Start here → the delivered head is slow-stack/laya-nli-conflict-v12. It is the first head to pass the full preregistered 14-axis protocol (2026-10-07). Load that repo for new work. This repo holds v4, the earlier baseline whose card documents the candidate rounds; it stays published for reference and for the frozen-set history below.

The one question this head family answers

新信息(new)与已有记忆(known)是否冲突?冲突=矛盾需更新旧记忆,兼容=一致或无关

noul question, two custom labels {"false": "兼容", "true": "冲突"} — i.e. "should the stored memory be superseded by what the user just said, or not?". Built for memory plugins that must decide whether to update a user's stored facts, preferences and constraints.

Fine-tuned from convaiinnovations/laya-multilingual with the official public recipe (the Kaggle 2xT4 notebook: RLCD loss + post-hoc per-type temperature fit), by modusensus. Training tooling, the data generators and every evaluation script are in the kaggle_eval/ directory of this fork, which also carries the handoff document for each round.

Which repo to load

repo what it is load it?
laya-nli-conflict-v12 delivered head (r2 weights) — all 14 gate axes PASS yes
laya-nli-conflict-v12-r1 / -r3 the other two runs of the same protocol, archived unmodified for variance inspection no — never served
this repo (laya-nli-memory-conflict) v4, the 4-candidate baseline; kept for reference only to reproduce the v2–v4 table below

Full index: the "Laya NLI memory-conflict heads — v12 & three-run protocol" collection.

Why there are so many versions

Thirteen training rounds produced two delivered heads. The ratio is not a pile of abandoned experiments — it is a protocol that refuses to move its own goalposts, plus one discovery that forced the verdict itself to change.

The gates are written before the run and are not relaxed afterwards. Every round preregisters a 14-axis acceptance protocol — accuracy on the frozen 1000-pair validation set, plus thin-edge batteries (negation, novel cases, bias diagnostics, per-family rates, label-surface swap, training-data hygiene, and a conformal abstention layer). A round ships only if it clears every axis. Rounds 5 through 11 and round 13 did not, so each one was recorded as a negative result and archived rather than published as a deliverable: nine checkpoints live under research-archive / not-delivered, round 11 was never uploaded at all, and round 13 — judged 11 PASS / 3 FAIL — was explicitly closed with "negative result ships, HF untouched". In the meantime the standing head kept serving.

Round 10 showed that one run cannot decide anything. Three runs of the same configuration — byte-identical corpus and settings, differing only in CUDA sampling — read 0.889 / 0.3877 / 0.6951 on a single bias axis. That is a 50.1pp spread, and it crosses the pass line: the same recipe both passes and fails depending on the draw.

So the verdict moved from one run to three. From round 11 onward, every gate is judged over three equal-status runs: the median must clear the threshold, and no acceptance case may be missed in two or more runs (a case that flips twice is a real weakness, not noise). The runs are frozen as r1 / r2 / r3 — no cherry-picking the best one, no substituting one run for another, and no adding a fourth to rescue a failure. The thresholds themselves were never loosened to compensate; only the way three readings are aggregated changed.

That is why the delivered head is three repos. r2 ships as laya-nli-conflict-v12 because it is the only run of the three with all three thin-edge acceptance batteries at full marks; r1 and r3 are archived unmodified so the variance band can be inspected by anyone, not just asserted by us.

Round 13 is the clearest single illustration of the discipline: it changed nothing but the accuracy threshold (an old gate that had stopped filtering anything), failed on three axes anyway, and shipped nothing.

Usage

import laya

agent = laya.load('slow-stack/laya-nli-conflict-v12', device='cpu')

QUESTION = {
    'type': 'noul',
    'instructions': '新信息(new)与已有记忆(known)是否冲突?冲突=矛盾需更新旧记忆,兼容=一致或无关',
    'labels': {'false': '兼容', 'true': '冲突'},
}

state = {'known': '用户对花生过敏', 'new': '用户想试试花生酱饼干'}
p_conflict = float(agent.predict(state, {'conflict': QUESTION})['answers']['conflict']['noul'])
print(p_conflict)   # ~0.92 -> conflict: the intent violates a stored hard constraint

Loading slow-stack/laya-nli-memory-conflict instead runs v4 through the identical API; the question and label contract are the same across the family.

The delivered head (v12) at a glance

Preregistered n=3 equal-status runs, no run selection; r2 ships because it is the only run with all three acceptance batteries at full marks (old-20 20/20, negation-5 5/5, new-10 10/10).

axis (gate) r1 r2 (ships) r3 verdict
main val acc (median ≥ 0.896) 0.904 0.903 0.907 PASS
main val ECE (report) 0.0207 0.0209 0.0190 —
old-20 real cases 19 20 20 PASS
negation-5 5 5 4 PASS
new-10 10 10 10 PASS
soft-conflict val_soft errors (≤3) 2 1 1 PASS
label-surface swap / polarity ×2 / band PASS PASS PASS PASS
conformal adopted rule (≥50% @ ≤35%) 36/50 @ 34.2% 34/50 @ 33.4% 33/47 @ 34.0% PASS
bias diagnostic (≥13/14) 13/14 13/14 13/14 PASS
compat family mean-p (median <0.5) 0.0806 0.0919 0.0814 PASS
negation family mean-p (median ≥0.5) 0.7872 0.8022 0.7930 PASS
τ(noul) / automation@5% (report, non-gating) 1.0887 / 0.814 1.0914 / 0.781 1.1080 / 0.781 —

All 14 axes are listed, with the per-axis acceptance wording, in the delivered head's own card and in HANDOFF_NLI_V12.md. Weights: r1 4269ec6b… / r2 6648d892… / r3 b2bf87be… (SHA256, full manifest in kaggle_eval/archive_sha256_manifest.txt).

Where the data lives

Results — the v2–v4 baseline in this repo

v4 is the model in this repo (model.safetensors, SHA256 e9e1c4a5…d4b13758).

metric v2 v3 v4 (this repo) gate
main val (frozen 1000, MultiNLI-derived) 0.902 0.902 0.901 ≥0.90
main val ECE 0.021 0.0146 0.0192 ≤0.02
bias diagnostic (14 control + input-swap pairs) 12/14 13/14 13/14 PASS PASS, no pinned output
real case, frozen 20 hand-written pairs 16/20 19/20 20/20 ≥19/20
real case, 10 template-free new pairs — — 10/10 ≥8/10
soft-conflict set (300 pairs, 4 never-trained classes) 206/300 295/300 297/300 ≥295/300
├ held-out classes 62/100 95/100 97/100 ≥95/100
label-surface swap (labels exchanged at inference) — — 0 cases flipped ≤1
negation side-set 2/5 4/5 4/5 report only

Evaluation protocol (why these numbers are comparable)

  • Frozen sets, append-only. The 1000-pair val split, the 20 hand-written Chinese real cases and the 300-pair soft-conflict set were never edited between versions; new cases are added in separate sets (the 10 template-free pairs in v4, the negation-8 family instrument in v12).
  • Bias diagnostic before any accuracy claim. 7 positive/negative control pairs × 2 input directions. A pinned output distribution invalidates every accuracy number measured after it (the v1 head answered "conflict" on everything at conf 0.91 — upstream #156).
  • Label-surface rotation + label-swap gate. Training rows rotate 4 label/instruction phrasings (and the boolean key names), and acceptance re-runs the eval with the two label strings exchanged: 0 of 20 real cases and 0 of 14 diagnostic probes flipped (v4), and all three v12 runs PASS the same gate, so the head reads the semantics rather than the label surface.
  • Conformal abstention, optional and additive. A 90%-nominal split-conformal rule fitted on the soft-conflict set and transferred to main val captures 58 of 99 errors at a 29.4% abstention rate (write-error rate 6.66% → 5.81%) on the v4 baseline. The plugin auto-write threshold stays ≤ 0.92 and the layer is additive: write = at red line AND not abstained. These are transfer numbers across a distribution shift (synthetic fit → MNLI-style eval), not finite-sample guarantees. Reproduce: kaggle_eval/conformal_abstain.py, precomputed gates in kaggle_eval/HANDOFF_NLI_V4.1.md.
  • No external same-benchmark comparison exists for this task — the frozen memory-conflict sets are ours alone. The same-ruler comparison discipline is applied on the sibling typed-decisions card, where a shared public benchmark does exist.

License

Apache-2.0, following upstream. Base model © Convai Innovations.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
0.3B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for slow-stack/laya-nli-memory-conflict

Finetuned
(83)
this model

Dataset used to train slow-stack/laya-nli-memory-conflict

Collection including slow-stack/laya-nli-memory-conflict

Evaluation results

  • accuracy on MultiNLI-derived memory pairs (frozen 1000-pair val)
    self-reported
    0.901
  • ece on MultiNLI-derived memory pairs (frozen 1000-pair val)
    self-reported
    0.019