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 / omegese45 / translate / goal2en.om

60 lines · 1326 bytes Raw Blame History
1note SPDX-License-Identifier: AGPL-3.0-only
2note goal2en: R45 goal line G -> one fixed-template English review sentence
3note that states every operand. G is validated by the contract lane's
4note ocsetgl (msg.om); an invalid G prints `G2E_INVALID goal <reason>` and
5note returns 31. Needs otio.om, vocab.om, msg.om, otmsg.om before it and
6note otfrag.om after it. Templates are documented in TRANSLATOR.md.
7text otfr "Goal for review: one matmul_u32 job multiplying a | by | matrix by a | matrix with seed |.\n|Goal for review: two matmul_u32 jobs, each multiplying a | matrix, with seeds | and | in that order.\n|G2E_INVALID goal |usage: goal2en < goal\n"
8
9note "a {m} by {k} matrix by a {k} by {n}" after fragment 0 or 5.
10fn otgdims m ulong k ulong n ulong to void
11otpdec m
12otpfr 1
13otpdec k
14otpfr 2
15otpdec k
16otpfr 1
17otpdec n
18end
19
20note goal2en on otin[0..n): fills otob, returns 0 or 31.
21fn otgoalen n ulong to int
22if gt n 0
23if eq get otin sub n 1 10
24n = sub n 1
25end
26end
27ok = otcopy 0 n
28if not ok
29otpfr 9
30otprs neg long 10
31otpb 10
32ret 31
33end
34v = ocsetgl n
35if lt v 0
36otpfr 9
37otprs v
38otpb 10
39ret 31
40end
41m = get ocgv 1
42k = get ocgv 2
43nn = get ocgv 3
44if eq get ocgv 0 7
45otpfr 5
46otgdims m k nn
47otpfr 6
48otpdec get ocgv 4
49otpfr 7
50otpdec get ocgv 5
51otpfr 8
52ret 0
53end
54otpfr 0
55otgdims m k nn
56otpfr 3
57otpdec get ocgv 4
58otpfr 4
59ret 0
60end