interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / om / ribbon / q38-compare-adaptive-boundaries.py.txt

14 lines · 1517 bytes Raw Blame History
1# External independent score and timing comparison, not production.
2from pathlib import Path
3import sys,json,hashlib,struct,math
4b,c,o=map(Path,sys.argv[1:]);br=json.loads((b/'report.json').read_text());cr=json.loads((c/'report.json').read_text());expected=[3,63,64,65,127,128,129]*2
5assert len(br['rows'])==len(cr['rows'])==len(expected)
6assert br['mismatches']==cr['mismatches']==0
7rows=[]
8for i,n in enumerate(expected):
9 x,y=br['rows'][i],cr['rows'][i];assert x['trial']==y['trial']==i and x['prompt_tokens']==y['prompt_tokens']==n and x['chunk']==y['chunk']==4096;assert x['next']==y['next']
10 name=f'row{i:02}.u32le';raw=(b/name).read_bytes();assert raw==(c/name).read_bytes() and raw and len(raw)%4==0;assert all(math.isfinite(v[0]) for v in struct.iter_unpack('<f',raw))
11 if i>=7:
12 assert raw==(b/f'row{i-7:02}.u32le').read_bytes()==(c/f'row{i-7:02}.u32le').read_bytes(), 'repeated size changed score'
13 rows.append({'trial':i,'prompt_tokens':n,'exact_full_scores_and_next':True,'score_sha256':hashlib.sha256(raw).hexdigest(),'baseline_s':x['wall_ns']/1e9,'candidate_s':y['wall_ns']/1e9,'wall_reduction_percent':100*(x['wall_ns']-y['wall_ns'])/x['wall_ns']})
14j={'status':'PASS_EXACT_BOUNDARY_SCORES','scope':'Two shared-machine observations per size, not quiet qualification or a statistical claim','formula':'seconds=ns/1e9; reduction_percent=100*(baseline_ns-candidate_ns)/baseline_ns','baseline':str(b),'candidate':str(c),'rows':rows};o.write_text(json.dumps(j,indent=2)+'\n');print(json.dumps(j,indent=2))