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 / native / neuralese / nl1r-task / controls.om

255 lines · 3490 bytes Raw Blame History
1note SPDX-License-Identifier: AGPL-3.0-only
2note Imports unchanged capacity controls for bounded GB/GV and ginit.
3fn tgcheck to int
4ginit
5v = tloss 5
6ngrad
7for j ulong 4
8if not tactive j
9if ne get NG add 36 j 0.0f64
10ret 60
11end
12end
13end
14for i ulong 40
15put GV i get NG i
16end
17for i ulong 40
18put NP i add get GB i 0.000001f64
19plus = tloss 5
20put NP i sub get GB i 0.000001f64
21minus = tloss 5
22put NP i get GB i
23diff = div sub plus minus 0.000002f64
24if gt fabs sub diff get GV i 0.00000001f64
25ret 61
26end
27end
28for i ulong 40
29put NG i get GV i
30end
31rc = nstep 0.1f64
32if ne rc 0
33ret 62
34end
35for i ulong 40
36wanted = sub get GB i mul 0.1f64 get GV i
37if gt fabs sub get NP i wanted 0.000000000001f64
38ret 63
39end
40z = write 1 GT 0 len GT
41if ne z long len GT
42ret 80
43end
44field get TC 0
45field i
46field bitcast ulong get GB i
47field bitcast ulong get GV i
48outnum bitcast ulong get NP i
49newline
50end
51ret 0
52end
53fn tsentin to void
54for j ulong 4
55put NO j -77.0f64
56put NH j -66.0f64
57end
58end
59fn tstay rc int to void
60if ne rc 2
61exit 41
62end
63for j ulong 4
64if or ne get NO j -77.0f64 ne get NH j -66.0f64
65exit 42
66end
67end
68end
69fn trefuse to void
70put TC 0 0
71tclear
72put TL 0 1
73tsentin
74rc = tdecode 1 0 0 0 1 0
75tstay rc
76rc = tdecode 2 0 0 0 1 1
77tstay rc
78rc = tdecode 2 0 0 0 0 0
79tstay rc
80rc = tdecode 2 0 0 0 2 0
81tstay rc
82rc = tdecode 2 0 2 0 0 0
83tstay rc
84rc = tdecode 2 0 0 1 1 0
85tstay rc
86rc = tdecode 2 5 0 0 1 0
87tstay rc
88put NSH 1 3
89rc = tdecode 2 0 0 0 1 0
90tstay rc
91put NSH 1 4
92put NSH 2 31
93rc = tdecode 2 0 0 0 1 0
94tstay rc
95put NSH 2 40
96put TC 0 2
97rc = tdecode 2 0 0 4 1 0
98tstay rc
99put TC 0 3
100rc = tdecode 2 0 0 0 1 0
101tstay rc
102put TC 0 0
103end
104fn ttarget id ulong context ulong to ulong
105if eq get TC 0 1
106ret tpar id
107end
108if eq get TC 0 2
109ret or and id 12 context
110end
111ret id
112end
113fn texact want ulong to void
114for j ulong 4
115if ne get NO j f64 and shr want j 1
116exit 51
117end
118end
119end
120fn twitness to void
121rc = nconstruct 1
122if ne rc 0
123exit 52
124end
125for task ulong 3
126put TC 0 task
127for id ulong 16
128context = ulong 0
129if eq task 2
130context = and id 3
131end
132for arm ulong 5
133for variant ulong 3
134rc = tencode id arm variant
135if ne rc 0
136exit 53
137end
138note Destroy all sender-private inputs before receiving the actual byte carrier.
139for j ulong 4
140put NX j div 0.0f64 0.0f64
141put NT j div 0.0f64 0.0f64
142end
143rc = tdecode 2 arm variant context get TL 0 0
144if eq variant 2
145if ne rc 2
146exit 54
147end
148else
149if ne rc 0
150exit 55
151end
152src = id
153if eq variant 1
154src = and add id 1 15
155end
156if or eq arm 0 eq arm 4
157texact ttarget src context
158end
159if and eq task 0 or eq arm 1 eq arm 2
160for j ulong 4
161p = ulong 0
162if ge get NO j 0.5f64
163p = 1
164end
165if ne p and shr src j 1
166exit 56
167end
168end
169if ne tabst rc 0
170exit 57
171end
172end
173end
174end
175end
176end
177end
178end
179fn tbytes to void
180for task ulong 3
181put TC 0 task
182limit = ulong 15
183if eq task 1
184limit = 1
185end
186if eq task 2
187limit = 3
188end
189for value ulong 256
190tclear
191put WB 0 uchar value
192tsentin
193rc = tdecode 2 0 0 0 1 0
194if gt value limit
195tstay rc
196else
197if ne rc 0
198exit 58
199end
200end
201tsentin
202rc = tdecode 2 2 0 0 1 0
203if gt value 15
204tstay rc
205else
206if ne rc 0
207exit 59
208end
209end
210rc = tdecode 2 1 0 0 1 0
211if ne rc 0
212exit 64
213end
214end
215for pos ulong 4
216for value ulong 256
217tclear
218for j ulong 4
219put WB j uchar 48
220end
221put WB pos uchar value
222tsentin
223rc = tdecode 2 4 0 0 4 0
224if or eq value 48 eq value 49
225if ne rc 0
226exit 65
227end
228else
229tstay rc
230end
231end
232end
233end
234end
235fn main to int
236rc = nshape 1
237if ne rc 0
238ret rc
239end
240for task ulong 3
241put TC 0 task
242rc = tgcheck
243if ne rc 0
244ret rc
245end
246end
247trefuse
248twitness
249tbytes
250z = write 1 PASS 0 len PASS
251if ne z long len PASS
252ret 80
253end
254ret 0
255end