interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / evidence / ECOSYSTEM5 / independent-review / independent-unit.om

993 lines · 17667 bytes Raw Blame History
1note LEARN653 v1 consumer checks. No compiler, judge, signer or process supervisor.
2note Task slots are 32 ulongs; see docs/learning/benchmark-v1.md.
3global LT ulong 2048
4global LS ulong 24
5global LSeen ulong 64
6global LWon ulong 64
7global LPin ulong 16
8global LWant uchar 256
9global LGot uchar 256
10
11fn lequal a ulong b ulong n ulong to bool
12for k ulong n
13if ne get LT add a k get LT add b k
14ret false
15end
16end
17ret true
18end
19
20fn lnonzero a ulong to bool
21x = ulong 0
22for k ulong 4
23x = or x get LT add a k
24end
25ret ne x 0
26end
27
28fn lrecord a ulong to ulong
29split = get LT add a 1
30if or eq get LT a 0 or lt split 1 gt split 4
31ret 2
32end
33if or ne get LT add a 5 1 ne get LT add a 4 1
34ret 3
35end
36if eq get LT add a 3 0
37ret 4
38end
39if eq get LT add a 6 0
40ret 4
41end
42if eq get LT add a 7 0
43ret 4
44end
45note Only public train/dev records are admissible to this builder-side API.
46note Adaptive/final custody stays with the existing independent owner.
47if or gt split 2 ne get LT add a 2 1
48ret 5
49end
50for h ulong 5
51if eq lnonzero add a add 8 mul h 4 false
52ret 6
53end
54end
55if or eq get LT add a 28 0 gt get LT add a 28 256
56ret 7
57end
58if or eq get LT add a 29 0 gt get LT add a 29 256
59ret 7
60end
61if or eq get LT add a 30 0 gt get LT add a 30 1000000
62ret 7
63end
64if ne get LT add a 31 0
65ret 7
66end
67ret 0
68end
69
70fn lpair a ulong b ulong to ulong
71if eq get LT a get LT b
72ret 8
73end
74if lequal add a 8 add b 8 4
75ret 9
76end
77if lequal add a 12 add b 12 4
78ret 10
79end
80if ne get LT add a 1 get LT add b 1
81if eq get LT add a 3 get LT add b 3
82ret 15
83end
84if eq get LT add a 7 get LT add b 7
85ret 11
86end
87if lequal add a 16 add b 16 4
88ret 12
89end
90if lequal add a 20 add b 20 4
91ret 13
92end
93if lequal add a 24 add b 24 4
94ret 14
95end
96end
97ret 0
98end
99
100fn lmanifest n ulong to ulong
101if or eq n 0 gt n 64
102ret 1
103end
104for i ulong n
105a = mul i 32
106code = lrecord a
107if ne code 0
108ret code
109end
110for j ulong i
111b = mul j 32
112code = lpair a b
113if ne code 0
114ret code
115end
116end
117end
118ret 0
119end
120
121note Caller supplies independent expected bytes and actual executor observations.
122note Status 0=completed, 1=syntax,2=type,3=unsupported,4=timeout,5=resource,6=operational.
123note Result 0=correct,1..6 as above,7=wrong value,8=trap mismatch,9=empty output,10=malformed.
124fn lobserve status ulong wantcode ulong gotcode ulong wantn ulong gotn ulong to ulong
125if gt status 6
126ret 10
127end
128if ne status 0
129ret status
130end
131if or gt wantn 256 gt gotn 256
132ret 10
133end
134if ne wantcode gotcode
135ret 8
136end
137if ne wantcode 0
138note Only declared runtime traps 101..107; arbitrary exit failures never pass.
139if or lt wantcode 101 or gt wantcode 107 ne wantn 0
140ret 10
141end
142if ne gotn 0
143ret 8
144end
145ret 0
146end
147if eq wantn 0
148ret 10
149end
150if eq gotn 0
151ret 9
152end
153if ne wantn gotn
154ret 7
155end
156for i ulong wantn
157if ne get LWant i get LGot i
158ret 7
159end
160end
161ret 0
162end
163
164note Full 256-bit compiler and executable identities, expected then observed.
165note LPin[0..3] expected compiler, [4..7] observed, [8..11] expected ELF, [12..15] observed.
166fn lpins to bool
167ca = ulong 0
168ba = ulong 0
169for i ulong 4
170ca = or ca get LPin i
171ba = or ba get LPin add i 8
172if ne get LPin i get LPin add i 4
173ret false
174end
175if ne get LPin add i 8 get LPin add i 12
176ret false
177end
178end
179ret and ne ca 0 ne ba 0
180end
181
182note Each begin is one explicit fresh development run; no durable resume API exists.
183note LS: active,tasks,maxattempts,attempts,pass1,passbudget,invalid,closed,
184note generation_us,compile_us,judge_us,other_us,input_tokens,output_tokens,peak_bytes,
185note energy_uj,energy_unknown,budget_us,completed,abstained,reserved...
186fn lbegin n ulong maxtries ulong budget ulong to ulong
187if eq get LS 0 1
188ret 20
189end
190for i ulong 24
191put LS i 0
192end
193for i ulong 64
194put LSeen i 0
195put LWon i 0
196end
197code = lmanifest n
198if ne code 0
199put LS 6 code
200ret code
201end
202if or eq maxtries 0 or gt maxtries 64 or eq budget 0 gt budget 1000000000000
203put LS 6 21
204ret 21
205end
206put LS 0 1
207put LS 1 n
208put LS 2 maxtries
209put LS 17 budget
210ret 0
211end
212
213note Charge before classifying. Costs are exact integer caller measurements, never estimates.
214note Missing cost values use all-ones and invalidate the run, never become free.
215fn lcost slot ulong value ulong to ulong
216if or lt slot 8 gt slot 15
217put LS 6 22
218ret 22
219end
220if gt value 1000000000000
221put LS 6 23
222ret 23
223end
224if eq slot 14
225if gt value get LS slot
226put LS slot value
227end
228else
229if gt get LS slot sub ulong 1000000000000 value
230put LS 6 23
231ret 23
232end
233put LS slot add get LS slot value
234end
235ret 0
236end
237
238note Attempt outcomes come from lobserve or explicit abstention 11, never compiler acceptance.
239note Mandatory cost vector is supplied per attempt in LC; energy unknown is explicit.
240global LC ulong 9
241
242fn lattempt task ulong ordinal ulong outcome ulong to ulong
243if ne get LS 0 1
244ret 24
245end
246for k ulong 8
247r = lcost add k 8 get LC k
248end
249if eq get LC 8 0
250put LS 16 add get LS 16 1
251if ne get LC 7 0
252put LS 6 25
253end
254else
255if ne get LC 8 1
256put LS 6 25
257end
258end
259put LS 3 add get LS 3 1
260note At most 64 attempts across a public development run, including failed attempts.
261if gt get LS 3 64
262put LS 6 31
263ret 31
264end
265if eq lpins false
266put LS 6 26
267end
268note Invalid costs or identities can never add successful tasks.
269if ne get LS 6 0
270ret get LS 6
271end
272if or ge task get LS 1 gt outcome 11
273put LS 6 27
274ret 27
275end
276if or ne ordinal add get LSeen task 1 gt ordinal get LS 2
277put LS 6 28
278ret 28
279end
280put LSeen task ordinal
281if eq outcome 0
282if eq ordinal 1
283put LS 4 add get LS 4 1
284end
285if eq get LWon task 0
286put LWon task 1
287put LS 5 add get LS 5 1
288end
289end
290if eq outcome 11
291put LS 19 add get LS 19 1
292end
293elapsed = add get LS 8 get LS 9
294elapsed = add elapsed get LS 10
295elapsed = add elapsed get LS 11
296if gt elapsed get LS 17
297put LS 6 29
298end
299ret get LS 6
300end
301
302fn lfinish to ulong
303if ne get LS 0 1
304ret 24
305end
306put LS 0 0
307for i ulong get LS 1
308if eq get LSeen i 0
309if eq get LS 6 0
310put LS 6 30
311end
312end
313end
314if ne get LS 6 0
315ret get LS 6
316end
317put LS 18 1
318ret 0
319end
320
321note GEN-1 genjac rule reused: lowercase ASCII word-triple SET Jaccard strictly above 1/2.
322note Input contains two public prompts only; never load final or sealed text here.
323global LText uchar 512
324global LStart ulong 128
325global LLength ulong 128
326global LCount ulong 2
327
328fn llower c uchar to uchar
329if and ge c 65 le c 90
330ret add c 32
331end
332ret c
333end
334
335fn lword c uchar to bool
336d = llower c
337ret or and ge d 97 le d 122 and ge d 48 le d 57
338end
339
340fn ltokens side ulong size ulong to bool
341if or gt side 1 gt size 256
342ret false
343end
344base = mul side 256
345slots = mul side 64
346count = ulong 0
347pos = ulong 0
348while lt pos size
349if gt get LText add base pos 127
350ret false
351end
352if lword get LText add base pos
353start = pos
354scanning = true
355while and lt pos size scanning
356if lword get LText add base pos
357pos = add pos 1
358else
359scanning = false
360end
361end
362if ge count 64
363ret false
364end
365put LStart add slots count add base start
366put LLength add slots count sub pos start
367count = add count 1
368else
369pos = add pos 1
370end
371end
372put LCount side count
373ret true
374end
375
376fn lwordeq a ulong b ulong to bool
377n = get LLength a
378if ne n get LLength b
379ret false
380end
381for k ulong n
382if ne llower get LText add get LStart a k llower get LText add get LStart b k
383ret false
384end
385end
386ret true
387end
388
389fn ltriple a ulong b ulong to bool
390for k ulong 3
391if eq lwordeq add a k add b k false
392ret false
393end
394end
395ret true
396end
397
398fn lunique at ulong base ulong to bool
399j = base
400while lt j at
401if ltriple at j
402ret false
403end
404j = add j 1
405end
406ret true
407end
408
409note 0=no near match,1=above threshold,2=insufficient words,3=unsupported input.
410fn lnear an ulong bn ulong to ulong
411if eq ltokens 0 an false
412ret 3
413end
414if eq ltokens 1 bn false
415ret 3
416end
417a = get LCount 0
418b = get LCount 1
419if or lt a 3 lt b 3
420ret 2
421end
422ua = ulong 0
423ub = ulong 0
424overlap = ulong 0
425for i ulong sub a 2
426if lunique i 0
427ua = add ua 1
428hit = false
429for j ulong sub b 2
430if ltriple i add 64 j
431hit = true
432end
433end
434if hit
435overlap = add overlap 1
436end
437end
438end
439for j ulong sub b 2
440if lunique add 64 j 64
441ub = add ub 1
442end
443end
444if gt mul overlap 3 add ua ub
445ret 1
446end
447ret 0
448end
449note SPDX-License-Identifier: AGPL-3.0-or-later
450note L776 public record-admission preparation, consuming frozen L775 core84d03c55.
451note Caller supplies independently measured metadata and observation bytes.
452note This component does not authenticate receipts, execute candidates or persist state.
453note CMeta schema/profile/license/provenance/oracle/template/evidence/samples then source SHA256 then zero reserved.
454global CMeta ulong 16
455global CSeen ulong 64
456global CDiag ulong 64
457global CGood ulong 64
458global CBad ulong 64
459global CFreeze ulong 2048
460note CState good count,bad count,ready. Consume accepted indices only after cfinish returns zero.
461global CState ulong 3
462
463fn cbegin n ulong budget ulong to ulong
464put CState 2 0
465r = lbegin n 1 budget
466if ne r 0
467ret r
468end
469for i ulong mul n 32
470put CFreeze i get LT i
471end
472for i ulong 64
473put CSeen i 0
474put CDiag i 99
475put CGood i 0
476put CBad i 0
477end
478for i ulong 3
479put CState i 0
480end
481ret 0
482end
483
484fn cmeta task ulong to ulong
485base = mul task 32
486for k ulong 32
487if ne get LT add base k get CFreeze add base k
488ret 47
489end
490end
491if or ne get CMeta 0 1 ne get CMeta 1 get LT add base 4
492ret 40
493end
494note License1 is AGPL-3.0-or-later; provenance1 is disclosed handwritten public fixture.
495if ne get CMeta 2 1
496ret 41
497end
498if ne get CMeta 3 1
499ret 42
500end
501if ne get CMeta 4 get LT add base 6
502ret 43
503end
504if ne get CMeta 5 get LT add base 7
505ret 43
506end
507if eq get CMeta 4 get CMeta 5
508ret 43
509end
510note Only bounded tested evidence1; no formal-proof label admitted here.
511if ne get CMeta 6 1
512ret 44
513end
514note Narrow supported packet: three independent fixed u64 observations,24bytes.
515if or ne get CMeta 7 3 lt get LT add base 29 24
516ret 45
517end
518for k ulong 4
519if ne get CMeta add k 8 get LT add base add k 12
520ret 46
521end
522if ne get CMeta add k 12 0
523ret 40
524end
525end
526ret 0
527end
528
529fn csubmit task ulong status ulong gotcode ulong gotn ulong to ulong
530if ne get LS 0 1
531ret 24
532end
533if ge task get LS 1
534ret lattempt task 1 10
535end
536if ne get CSeen task 0
537note Charge the attempted duplicate; preserve its first stored record.
538ret lattempt task 2 10
539end
540why = cmeta task
541outcome = ulong 10
542if eq why 0
543outcome = lobserve status 0 gotcode 24 gotn
544why = outcome
545end
546code = lattempt task 1 outcome
547put CSeen task 1
548if ne code 0
549why = code
550end
551put CDiag task why
552if eq why 0
553put CGood get CState 0 task
554put CState 0 add get CState 0 1
555else
556put CBad get CState 1 task
557put CState 1 add get CState 1 1
558end
559ret why
560end
561
562fn cfinish to ulong
563code = lfinish
564if ne code 0
565ret code
566end
567put CState 2 1
568ret 0
569end
570note SPDX-License-Identifier: AGPL-3.0-or-later
571note PACK5 v1 consumes L775 core84d03c55 and L776 admitd8d14c47 unchanged.
572note Trusted single-thread caller supplies tokenization; no authentication or tokenizer.
573note DPCfg schema,vocabulary size,split,padding token. DPPin expected+observed tokenizer then template SHA256 words.
574global DPCfg ulong 4
575global DPPin ulong 16
576global DPLen ulong 64
577global DPPrompt ulong 64
578global DPToken ulong 16384
579global DPOut ulong 256
580global DPLabel ulong 256
581global DPMask ulong 256
582global DPTask ulong 256
583global DPPos ulong 256
584note DPState ready,count,records. A failed call invalidates readiness and count; payload stays unchanged.
585global DPState ulong 3
586
587fn dppins to bool
588a = ulong 0
589b = ulong 0
590for i ulong 4
591a = or a get DPPin i
592b = or b get DPPin add i 8
593if ne get DPPin i get DPPin add i 4
594ret false
595end
596if ne get DPPin add i 8 get DPPin add i 12
597ret false
598end
599end
600ret and ne a 0 ne b 0
601end
602
603fn dpinput task ulong to ulong
604if ne get CFreeze add mul task 32 1 get DPCfg 2
605ret 77
606end
607count = get DPLen task
608prompt = get DPPrompt task
609if or eq count 0 gt count 256
610ret 74
611end
612if gt prompt count
613ret 74
614end
615for j ulong count
616if ge get DPToken add mul task 256 j get DPCfg 1
617ret 75
618end
619end
620ret 0
621end
622
623fn dpvalidate to ulong
624if or ne get CState 2 1 ne get LS 18 1
625ret 70
626end
627if or ne get LS 0 0 ne get LS 6 0
628ret 70
629end
630n = get LS 1
631good = get CState 0
632bad = get CState 1
633if or eq n 0 gt n 64
634ret 73
635end
636if or gt good n gt bad n
637ret 73
638end
639if ne add good bad n
640ret 73
641end
642if or ne get DPCfg 0 1 eq get DPCfg 1 0
643ret 71
644end
645if or gt get DPCfg 1 4294967296 ge get DPCfg 3 get DPCfg 1
646ret 71
647end
648if or lt get DPCfg 2 1 gt get DPCfg 2 2
649ret 71
650end
651if eq dppins false
652ret 72
653end
654total = ulong 0
655for i ulong good
656t = get CGood i
657if ge t n
658ret 73
659end
660if or ne get CSeen t 1 ne get CDiag t 0
661ret 73
662end
663for j ulong i
664if eq t get CGood j
665ret 73
666end
667end
668r = dpinput t
669if ne r 0
670ret r
671end
672count = get DPLen t
673if gt count sub 256 total
674ret 76
675end
676total = add total count
677end
678note No tokens or prompt markers may be supplied for quarantined or absent slots.
679for t ulong 64
680found = false
681for i ulong good
682if eq t get CGood i
683found = true
684end
685end
686if eq found false
687if or ne get DPLen t 0 ne get DPPrompt t 0
688ret 73
689end
690end
691end
692ret 0
693end
694
695fn dpcopy t ulong p ulong to ulong
696count = get DPLen t
697for j ulong count
698put DPOut p get DPToken add mul t 256 j
699put DPTask p t
700put DPPos p j
701next = add j 1
702if lt next count
703put DPLabel p get DPToken add mul t 256 next
704if ge next get DPPrompt t
705put DPMask p 1
706end
707end
708p = add p 1
709end
710ret p
711end
712
713fn dppack to ulong
714for i ulong 3
715put DPState i 0
716end
717r = dpvalidate
718if ne r 0
719ret r
720end
721for i ulong 256
722put DPOut i get DPCfg 3
723put DPLabel i get DPCfg 3
724put DPMask i 0
725put DPTask i 18446744073709551615
726put DPPos i 0
727end
728p = ulong 0
729for i ulong get CState 0
730p = dpcopy get CGood i p
731end
732put DPState 1 p
733put DPState 2 get CState 0
734put DPState 0 1
735ret 0
736end
737
738fn dpattend q ulong k ulong to bool
739if ne get DPState 0 1
740ret false
741end
742if or ge q get DPState 1 ge k get DPState 1
743ret false
744end
745if gt k q
746ret false
747end
748ret eq get DPTask q get DPTask k
749end
750note Independent reviewer of PACK5. No author test helpers imported.
751global RC ulong 1
752global Dig uchar 24
753global Snap ulong 1280
754text PASS "INDEPENDENT_PACK5_PASS checks="
755text FAIL "INDEPENDENT_PACK5_FAIL check="
756text NL "\n"
757
758fn number n ulong to void
759p = ulong 24
760if eq n 0
761put Dig 0 48
762w = write 1 Dig 0 1
763ret
764end
765while gt n 0 bound 24
766p = sub p 1
767put Dig p uchar add 48 rem n 10
768n = div n 10
769end
770w = write 1 Dig p sub 24 p
771end
772
773fn check ok bool to void
774put RC 0 add get RC 0 1
775if not ok
776w = write 1 FAIL 0 len FAIL
777number get RC 0
778w = write 1 NL 0 1
779exit 1
780end
781end
782
783fn begin n ulong split ulong to void
784for i ulong 2048
785put LT i 0
786end
787for i ulong 24
788put LS i 0
789end
790for i ulong 9
791put LC i 0
792end
793put LC 0 1
794for t ulong n
795p = mul t 32
796put LT p add t 101
797put LT add p 1 split
798put LT add p 2 1
799put LT add p 3 add t 101
800put LT add p 4 1
801put LT add p 5 1
802put LT add p 6 42
803put LT add p 7 add t 300
804for j ulong 20
805put LT add p add j 8 add 10000 add mul t 100 j
806end
807put LT add p 28 24
808put LT add p 29 24
809put LT add p 30 999
810end
811for i ulong 4
812put LPin i add i 10
813put LPin add i 4 add i 10
814put LPin add i 8 add i 20
815put LPin add i 12 add i 20
816put DPPin i add i 30
817put DPPin add i 4 add i 30
818put DPPin add i 8 add i 40
819put DPPin add i 12 add i 40
820end
821put DPCfg 0 1
822put DPCfg 1 4294967296
823put DPCfg 2 split
824put DPCfg 3 4294967295
825for i ulong 64
826put DPLen i 0
827put DPPrompt i 0
828end
829check eq cbegin n 10000 0
830end
831
832fn observe t ulong to void
833for i ulong 16
834put CMeta i 0
835end
836put CMeta 0 1
837put CMeta 1 1
838put CMeta 2 1
839put CMeta 3 1
840put CMeta 4 42
841put CMeta 5 add t 300
842put CMeta 6 1
843put CMeta 7 3
844for i ulong 4
845put CMeta add i 8 get LT add mul t 32 add i 12
846end
847for i ulong 24
848put LWant i uchar add 100 i
849put LGot i uchar add 100 i
850end
851check eq csubmit t 0 0 24 0
852end
853
854fn save to void
855for i ulong 256
856put Snap i get DPOut i
857put Snap add i 256 get DPLabel i
858put Snap add i 512 get DPMask i
859put Snap add i 768 get DPTask i
860put Snap add i 1024 get DPPos i
861end
862end
863
864fn refuse expected ulong to void
865check eq dppack expected
866check eq get DPState 0 0
867check eq get DPState 1 0
868check eq get DPState 2 0
869check not dpattend 0 0
870for i ulong 256
871check eq get Snap i get DPOut i
872check eq get Snap add i 256 get DPLabel i
873check eq get Snap add i 512 get DPMask i
874check eq get Snap add i 768 get DPTask i
875check eq get Snap add i 1024 get DPPos i
876end
877end
878
879fn full to void
880begin 64 2
881for i ulong 64
882t = sub 63 i
883observe t
884put DPLen t 4
885put DPPrompt t rem t 5
886for j ulong 4
887put DPToken add mul t 256 j add mul t 16 j
888end
889end
890check eq cfinish 0
891check eq dppack 0
892check eq get DPState 1 256
893check eq get DPState 2 64
894for q ulong 256
895t = sub 63 div q 4
896j = rem q 4
897check eq get DPOut q add mul t 16 j
898check eq get DPTask q t
899check eq get DPPos q j
900label = ulong 4294967295
901mask = ulong 0
902if lt j 3
903label = add mul t 16 add j 1
904if ge add j 1 rem t 5
905mask = 1
906end
907end
908check eq get DPLabel q label
909check eq get DPMask q mask
910for k ulong 256
911want = and eq div q 4 div k 4 le k q
912check eq dpattend q k want
913end
914end
915check not dpattend 256 0
916check not dpattend 0 256
917check not dpattend 18446744073709551615 18446744073709551615
918save
919put CFreeze 1 1
920refuse 77
921put CFreeze 1 2
922put LT 1 1
923check eq dppack 0
924save
925for i ulong 4
926put DPPin add i 4 99
927refuse 72
928put DPPin add i 4 add i 30
929put DPPin add i 12 99
930refuse 72
931put DPPin add i 12 add i 40
932end
933check eq dppack 0
934save
935put DPLen 0 5
936refuse 76
937put DPLen 0 4
938put CGood 0 18446744073709551615
939refuse 73
940put CGood 0 63
941put LS 0 1
942refuse 70
943put LS 0 0
944check eq dppack 0
945end
946
947fn limits to void
948begin 1 1
949observe 0
950check eq cfinish 0
951put DPLen 0 1
952put DPToken 0 4294967295
953check eq dppack 0
954check eq get DPOut 0 4294967295
955check eq get DPLabel 0 4294967295
956check eq get DPMask 0 0
957check dpattend 0 0
958check not dpattend 1 0
959save
960put DPToken 0 4294967296
961refuse 75
962put DPToken 0 0
963put DPCfg 1 1
964put DPCfg 3 0
965check eq dppack 0
966check eq get DPOut 0 0
967check eq get DPState 1 1
968put DPLen 0 256
969put DPPrompt 0 256
970for i ulong 256
971put DPToken i 0
972end
973check eq dppack 0
974for i ulong 256
975check eq get DPMask i 0
976check eq get DPOut i 0
977end
978put DPPrompt 0 0
979check eq dppack 0
980for i ulong 255
981check eq get DPMask i 1
982end
983check eq get DPMask 255 0
984end
985
986fn main to int
987full
988limits
989w = write 1 PASS 0 len PASS
990number get RC 0
991w = write 1 NL 0 1
992ret 0
993end