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 / controls.om

208 lines · 2764 bytes Raw Blame History
1note SPDX-License-Identifier: AGPL-3.0-only
2note Central differences at strictly positive hidden preactivations; separate kink policy.
3global GB f64 83
4global GV f64 83
5text GT "G,"
6text PASS "CONTROLS PASS\n"
7fn ginit to void
8for i ulong get NSH 2
9v = div f64 add i 1 128.0f64
10put NP i v
11put GB i v
12end
13ninput 5 5
14end
15fn geval to f64
16nsend
17nrecv
18ret nloss
19end
20fn gcheck to int
21ginit
22v = geval
23ngrad
24for i ulong get NSH 2
25put GV i get NG i
26end
27for i ulong get NSH 2
28put NP i add get GB i 0.000001f64
29plus = geval
30put NP i sub get GB i 0.000001f64
31minus = geval
32put NP i get GB i
33diff = div sub plus minus 0.000002f64
34if gt fabs sub diff get GV i 0.00000001f64
35ret 61
36end
37end
38for i ulong get NSH 2
39put NG i get GV i
40end
41rc = nstep 0.1f64
42if ne rc 0
43ret 62
44end
45for i ulong get NSH 2
46wanted = sub get GB i mul 0.1f64 get GV i
47if gt fabs sub get NP i wanted 0.000000000001f64
48ret 63
49end
50z = write 1 GT 0 len GT
51if ne z long len GT
52ret 80
53end
54field get NSH 0
55field i
56field bitcast ulong get GB i
57field bitcast ulong get GV i
58outnum bitcast ulong get NP i
59newline
60end
61ret 0
62end
63fn atomic to int
64ginit
65for i ulong get NSH 2
66put NG i 1.0f64
67end
68put NG sub get NSH 2 1 div 0.0f64 0.0f64
69rc = nstep 0.1f64
70if ne rc 2
71ret 64
72end
73for i ulong get NSH 2
74if ne get NP i get GB i
75ret 65
76end
77end
78rc = nstep -0.1f64
79if ne rc 1
80ret 66
81end
82rc = nstep div 1.0f64 0.0f64
83if ne rc 1
84ret 67
85end
86if ne get NSH 3 0
87ret 68
88end
89ret 0
90end
91fn refuses to int
92for j ulong 4
93put NO j -77.0f64
94put NH j 0.0f64
95end
96npack
97rc = ndecode 0 get NSH 1 wirelen 0
98if ne rc 2
99ret 41
100end
101rc = ndecode 1 add get NSH 1 1 wirelen 0
102if ne rc 2
103ret 42
104end
105rc = ndecode 1 get NSH 1 add wirelen 1 0
106if ne rc 2
107ret 43
108end
109for mode ulong 3
110v = 2.0f64
111if eq mode 0
112v = div 0.0f64 0.0f64
113end
114if eq mode 1
115v = div 1.0f64 0.0f64
116end
117wput sub get NSH 1 1 bitcast ulong v
118rc = ndecode 1 get NSH 1 wirelen 0
119if ne rc 2
120ret 44
121end
122for j ulong 4
123if ne get NO j -77.0f64
124ret 45
125end
126end
127end
128ret 0
129end
130fn kink to int
131ginit
132v = geval
133for k ulong 8
134put NU k 0.0f64
135put NV k 0.0f64
136end
137ngrad
138for i ulong 47
139if ne get NG i 0.0f64
140ret 69
141end
142end
143for k ulong 8
144put NU k -1.0f64
145end
146ngrad
147for i ulong 47
148if ne get NG i 0.0f64
149ret 70
150end
151end
152ret 0
153end
154fn dcontrol to int
155put CFG 3 15
156npack
157rc = ndecode 1 1 1 0
158if ne rc 0
159ret 71
160end
161for j ulong 4
162if ne get NO j 1.0f64
163ret 72
164end
165end
166put WB 0 uchar 0
167rc = ndecode 1 1 1 0
168for j ulong 4
169if ne get NO j 0.0f64
170ret 73
171end
172end
173put WB 0 uchar 16
174rc = ndecode 1 1 1 0
175if ne rc 2
176ret 74
177end
178ret 0
179end
180fn controls to int
181if eq get NSH 0 3
182ret dcontrol
183end
184rc = gcheck
185if ne rc 0
186ret rc
187end
188put NSH 3 0
189rc = atomic
190if ne rc 0
191ret rc
192end
193rc = refuses
194if ne rc 0
195ret rc
196end
197if eq get NSH 0 2
198rc = kink
199if ne rc 0
200ret rc
201end
202end
203z = write 1 PASS 0 len PASS
204if ne z long len PASS
205ret 80
206end
207ret 0
208end