#!/usr/bin/env python3 """Qwen (or any Ollama API model) on the EXACT released transitive-binding probe (name suites), chat surface, first-choice accuracy by depth 1-5 — directly comparable to ConeML's heldout_transitive_probe numbers.""" import json, re, random, argparse, urllib.request NAMES = ["Isabel", "Jonas", "Keira", "Liam", "Maya", "Noah", "Olivia", "Priya", "Quinn", "Rosa", "Sofia", "Theo"] SUITES = { "sft_template_heldout_names": dict(rel="is taller than", hi="tallest", lo="shortest", hq="{c} Of all of them, the tallest is who? Return only the name.", lq="{c} Of all of them, the shortest is who? Return only the name."), "unseen_query_heldout_names": dict(rel="is taller than", hi="tallest", lo="shortest", hq="Given these facts: {c} Which person is highest in the height order? Answer with only the name.", lq="Given these facts: {c} Which person is lowest in the height order? Answer with only the name."), "older_relation_heldout_names": dict(rel="is older than", hi="oldest", lo="youngest", hq="{c} Which person is oldest? Return only the name.", lq="{c} Which person is youngest? Return only the name."), } def chain(items, rel): return " ".join(f"{items[i]} {rel} {items[i+1]}." for i in range(len(items)-1)) def first_choice(g, pool): t = g.lower(); hits = [] for c in sorted(pool, key=len, reverse=True): m = re.search(rf"(?4}" for d in range(1, 6))) print("->", a.out) if __name__ == "__main__": main()