okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-q36-vp (Qwen3.6 parallel requests and pictures)db4dd65e5

main
604 B13 linesraw
1"""q36_cmp_gate.py A.json B.json : per prompt identical or the first differing index."""
2import json, sys
3a, b = json.load(open(sys.argv[1]))["tokens"], json.load(open(sys.argv[2]))["tokens"]
4same = 0
5for i, (x, y) in enumerate(zip(a, b)):
6    n = next((k for k in range(min(len(x), len(y))) if x[k] != y[k]), None)
7    if n is None and len(x) == len(y):
8        same += 1
9        print("p%02d identical (%d tokens)" % (i, len(x)))
10    else:
11        print("p%02d DIFFERENT at %s (len %d vs %d)" % (i, n, len(x), len(y)))
12print("identical: %d of %d" % (same, len(a)))
13sys.exit(0 if same == len(a) else 1)