independent-frozen-review · 00bd6624fb71
Browse filesFiles changed (5)
241221 unmodified lines241222241223241224241225241226241227241228241221 unmodified lines"file": "Qwen3.8-27B-UD-IQ2_XXS.gguf","reason": "The process has 7034.1 MiB in dedicated GPU memory, below 7139.4 MiB of weights and state"}]},"matched_depth": [{241221 unmodified lines241222241223241224241225241226241227241228241229241221 unmodified lines"file": "Qwen3.8-27B-UD-IQ2_XXS.gguf","reason": "The process has 7034.1 MiB in dedicated GPU memory, below 7139.4 MiB of weights and state"}],"review": {}},"matched_depth": [{
7 unmodified lines89101112137 unmodified linesfrom .storage import rowsdef audit(folder, receipt):"""Audit the scored output boundary without interpreting the server's prefilling as model text."""data = list(rows(folder/"cases.jsonl"))7 unmodified lines8910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364657 unmodified linesfrom .storage import rowsdef confirmation_identities(screen_keys, expected_keys, control, winner):"""Check every input pair, including the literal J1 report and both controlled J2 reviews."""if expected_keys & screen_keys:raise ValueError('Confirmation and screening problem IDs overlap')expected_cases = {f'{kind}/{key}' for key in expected_keys for kind in ('twins','balanced-valid','balanced-invalid')}if control.keys()!=expected_cases or winner.keys()!=expected_cases:raise ValueError('Confirmation cases differ from the preregistered problem IDs or conditions')for key in expected_cases:if any(control[key].get(f)!=winner[key].get(f) for f in ('kind','key','expression','trace','first','reviews')):raise ValueError(f'Candidate and control received different inputs on {key}')return len(expected_keys)def confirmation_review(root, decision):"""Rebuild the inclusion, selection, model identities, paired effects and gate from the release."""from .curriculum import curriculum_problemsfrom .frozen_cases import paired_confirmationfrom .frozen_models import LOCAL_REPLICATES, MODELSfrom .storage import read_jsonfamily = read_json(root.parent/'calibrated/profile.json')['family']stream = curriculum_problems(family,'confirm',320)expected_screen, expected_confirm = ({p.key for p in stream[start:stop]} for start,stop in ((96,128),(256,320)))candidates, all_screen = {}, set()for key in [*(m.key for m in (*LOCAL_REPLICATES,*MODELS)), 'q38-27b-iq1s']:local = list(rows(root/key/'cases.jsonl'))all_screen.update(r['key'] for r in local)receipt = read_json(root/key/'result.json',{})if receipt.get('status')!='Complete':continueif {c['key'] for c in local if c['kind']=='twins'}!=expected_screen:raise ValueError(f'Unexpected arithmetic IDs for the {key} evidence screen')if key in {m.key for m in MODELS[1:]} or key=='q38-27b-iq1s':metrics=receipt['metrics']candidates[key]=(metrics['twins']['visible'], metrics['balanced']['depths'][2]['accuracy'], -receipt['cost']['elapsed_seconds'])chosen = max(candidates,key=candidates.get)if chosen!=decision['selected']:raise ValueError('Raw screen ranking disagrees with the confirmed selection')original = {key:score for key,score in candidates.items() if key!='q38-27b-iq1s'}if 'original_completed_selection' in decision and max(original,key=original.get)!=decision['original_completed_selection']:raise ValueError('Original completed candidate ranking disagrees with its release')def settings(key):return {k:v for k,v in read_json(root/key/'configuration.json').items() if k!='phase'}if settings(chosen)!=settings('confirm-winner') or settings(MODELS[0].key)!=settings('confirm-control'):raise ValueError('Screen and confirmation used different model files or inference settings')control, winner = ({r['id']:r for r in rows(root/key/'cases.jsonl')} for key in ('confirm-control','confirm-winner'))count = confirmation_identities(all_screen,expected_confirm,control,winner)estimates = paired_confirmation(winner,control)if estimates!=decision['estimates'] or all(e['delta']>0 for e in estimates.values())!=decision['online_gate']:raise ValueError('Released intervals or online gate disagree with the paired records')return dict(screen_ids=len(all_screen), fresh_ids=count, matched_cases=len(control), ranked_candidates=len(candidates))def audit(folder, receipt):"""Audit the scored output boundary without interpreting the server's prefilling as model text."""data = list(rows(folder/"cases.jsonl"))
1 unmodified line23456789 unmodified lines18192021222347 unmodified lines7172737475767750 unmodified lines1281291301311321331 unmodified linefrom functools import lru_cachefrom .frozen_audit import auditfrom .frozen_device import measured_engine_timesfrom .frozen_models import LOCAL_REPLICATES, MODELSfrom .storage import atomic, read_json, rows9 unmodified linesreturn audit(folder, read_json(folder/"result.json"))@lru_cache(maxsize=8)def visible_requests(path, modified):"""Index visible J3 twin calls. The timestamp invalidates the dashboard cache on a changed journal."""47 unmodified linesreceipt["gpu"] = dict(peak_dedicated_mib=max(r["dedicated_bytes"] for r in samples)/2**20,engines=measured_engine_times(samples),last_sample=samples[-1]["time"])results.append({**receipt,"key":key})return dict(results=results,decision=read_json(root/"decision.json",{}),conversions=conversion_findings(root,results),fit_failures=failed)def depth_rows(study):50 unmodified linesreturn partsdef plot_scores(study, path):"""Keep distinct denominators visible even when the fraction correct shares a common color scale."""import matplotlib.pyplot as plt1 unmodified line23456789 unmodified lines181920212223242526272847 unmodified lines76777879808182838450 unmodified lines1351361371381391401411421431441451461471481491501511521531541551561571 unmodified linefrom functools import lru_cachefrom .frozen_audit import audit, confirmation_reviewfrom .frozen_device import measured_engine_timesfrom .frozen_models import LOCAL_REPLICATES, MODELSfrom .storage import atomic, read_json, rows9 unmodified linesreturn audit(folder, read_json(folder/"result.json"))@lru_cache(maxsize=4)def released_confirmation_review(root, receipt_time):return confirmation_review(root, read_json(root/'decision.json'))@lru_cache(maxsize=8)def visible_requests(path, modified):"""Index visible J3 twin calls. The timestamp invalidates the dashboard cache on a changed journal."""47 unmodified linesreceipt["gpu"] = dict(peak_dedicated_mib=max(r["dedicated_bytes"] for r in samples)/2**20,engines=measured_engine_times(samples),last_sample=samples[-1]["time"])results.append({**receipt,"key":key})decision = read_json(root/'decision.json',{})review = released_confirmation_review(root,decision['time']) if decision.get('estimates') else {}return dict(results=results,decision=decision,conversions=conversion_findings(root,results),fit_failures=failed,review=review)def depth_rows(study):50 unmodified linesreturn partsdef confirmation_review_text(study):"""Publish the checks and limits alongside links to immutable case-level evidence."""from .design import GITHUBchecks=study['review']source=f'{GITHUB}/tree/main/results/new-judges'winner=study['decision']['selected']amendment = "The sustained-throughput fallback was declared after partial inference at higher precision. " if 'original_completed_selection' in study['decision'] else ""return ("# Review of the independent frozen-judge confirmation\n\n"f"The audit regenerated the {checks['fresh_ids']} assigned confirmation problem IDs. None overlapped the {checks['screen_ids']} distinct development problems observed during screening, including the natural traces. "f"The original judge and selected file received identical inputs on all {checks['matched_cases']} matched cases, including the two versions of Judge 2's evidence. Each problem supplied a valid trace, an invalid trace and one evidence-pair case. "f"[Control records]({source}/confirm-control) · [Selected model records]({source}/confirm-winner).\n\n"f"The release recomputed the rank of {checks['ranked_candidates']} completed candidates, verified that the two confirmation configurations matched their screen files and runtime settings, and regenerated both registered bootstrap intervals and the online eligibility decision. "f"The winning screen record was `{winner}`. [Selection]({source}/decision.json) · [Reconstruction]({GITHUB}/blob/main/src/study/frozen_audit.py).\n\n""The intervals condition on these frozen deployments and the arithmetic generator. Model size, post-training and compression vary together. "+amendment+"A trained solver's response to these rewards remains a separate experiment. "f"[Protocol and amendment]({GITHUB}/blob/main/reports/newer-frozen-judges.md) · [All measured outcomes]({GITHUB}/blob/main/reports/experiments/new-judges/experiment.md).\n")def plot_scores(study, path):"""Keep distinct denominators visible even when the fraction correct shares a common color scale."""import matplotlib.pyplot as plt
14 unmodified lines15161718192021586 unmodified lines60860961061161261314 unmodified linesfrom .learnability_report import collect_learnability, learnability_text, learning_figurefrom .learning_review import check_release, review_textfrom .inventory import GUIDE, HEADERS, grouped, inventory, inventory_markdownfrom .frozen_report import collect_frozen, depth_rows as frozen_rows, experiment_pages, frozen_text, interpretation, plot_scoresfrom .matched_tables import accuracy_grid, grid_markdownfrom .records import named_valuesfrom .storage import ORIGINAL_RESULTS, ROOT, atomic, read_json, rows, write_json586 unmodified linesf" [All four quarters, denominators and original records]({GITHUB}/blob/main/reports/reviews/depth-diagnosis.md).")ledger = inventory_markdown(data["inventory"])frozen_summary = frozen_text(data["newer_judges"])frozen_chart = (f"\n\n"if (DOCS/"assets/frozen-judge-scores.png").is_file() else "")frozen_summary += frozen_chart14 unmodified lines15161718192021586 unmodified lines60860961061161261361461561614 unmodified linesfrom .learnability_report import collect_learnability, learnability_text, learning_figurefrom .learning_review import check_release, review_textfrom .inventory import GUIDE, HEADERS, grouped, inventory, inventory_markdownfrom .frozen_report import collect_frozen, confirmation_review_text, depth_rows as frozen_rows, experiment_pages, frozen_text, interpretation, plot_scoresfrom .matched_tables import accuracy_grid, grid_markdownfrom .records import named_valuesfrom .storage import ORIGINAL_RESULTS, ROOT, atomic, read_json, rows, write_json586 unmodified linesf" [All four quarters, denominators and original records]({GITHUB}/blob/main/reports/reviews/depth-diagnosis.md).")ledger = inventory_markdown(data["inventory"])frozen_summary = frozen_text(data["newer_judges"])if data['newer_judges'].get('review'):atomic(REPORTS/'reviews/frozen-confirmation.md',confirmation_review_text(data['newer_judges']))frozen_summary += f"\n\n[Case identities, selection and interval audit]({GITHUB}/blob/main/reports/reviews/frozen-confirmation.md)."frozen_chart = (f"\n\n"if (DOCS/"assets/frozen-judge-scores.png").is_file() else "")frozen_summary += frozen_chart
186 unmodified lines187188189186 unmodified linesassert decision['original_completed_selection']=='q35-4b' and decision['selected']=='q38-27b-iq1s'assert ('confirm-winner','q38-27b',suite.SMALLER_FILES['q38-27b'][-1][0]) in observedassert not decision['online_gate']186 unmodified lines187188189190191192193194195196197198199200201186 unmodified linesassert decision['original_completed_selection']=='q35-4b' and decision['selected']=='q38-27b-iq1s'assert ('confirm-winner','q38-27b',suite.SMALLER_FILES['q38-27b'][-1][0]) in observedassert not decision['online_gate']def test_confirmation_identity_check_detects_overlap_and_changed_prior_evidence():from study.frozen_audit import confirmation_identitiesprobes={f'{kind}/fresh':dict(kind=kind, key='fresh', expression='2+2', trace='4') for kind in ('twins','balanced-valid','balanced-invalid')}probes['twins/fresh'].update(first='J1',reviews=['good','bad'])assert confirmation_identities(set(),{'fresh'},probes,probes)==1with pytest.raises(ValueError,match='overlap'):confirmation_identities({'fresh'},{'fresh'},probes,probes)altered={**probes,'twins/fresh':{**probes['twins/fresh'],'reviews':['good','changed']}}with pytest.raises(ValueError,match='inputs'):confirmation_identities(set(),{'fresh'},probes,altered)
docs/assets/study.json+2-1
src/study/frozen_audit.py+52
src/study/frozen_report.py+26-2
src/study/report.py+4-1
tests/test_frozen_screen.py+12