interplane.Get Omega
Read in your language

omega-tool-model

First-party Omega tool-use model source, serving harnesses, and verification records

Brought by drakestapleton

branch main Branches Tags History

omega-tool-model / pilot / sample.om

72 lines · 990 bytes Raw Blame History
1note Experimental greedy GPU sampler; existing f32 forward kernels, one sequence.
2note Args CK N PROMPT MERGES. No checkpoint writes and no tool execution.
3fn gsforward to void
4d = get og 2
5x = ggl 0 0
6ggu 0 d
7ggpt 1 x
8x = ggw 0
9ggpt 2 x
10x = ggw get og 30
11ggpt 3 x
12x = gga1 2
13ggpt 4 x
14ggrun 9 10 ggcd d 64 get og 1 get og 6
15for l ulong get og 5
16ggfl l
17end
18x = gga1 8
19w = ggw get og 33
20z = gga1 10
21s = gga1 9
22ggrmsf x w z s
23x = gga1 11
24w = ggw 0
25ggxwt z w x get og 0 d false
26end
27fn gsnext to ulong
28ggupb
29gsforward
30o = add get gga 11 mul mul sub get og 9 1 get og 0 4
31best = ulong 0
32bv = ggf o
33for c ulong get og 0
34v = ggf add o mul c 4
35if gt v bv
36bv = v
37best = c
38end
39end
40ret best
41end
42fn main to int
43if ne oargc 5
44ret 2
45end
46nn = oargu 2
47if or eq nn 0 gt nn 256
48ret 2
49end
50ockload 1
51put og 6 1
52put og 9 0
53ocpush 0
54obload 4 get og 0
55np = obprompt 3
56for i ulong np
57ocpush get obtk i
58end
59ggopen
60ggupw
61for i ulong nn
62c = gsnext
63if eq c 0
64break
65end
66obtput c
67ocpush c
68end
69oflush
70r = nvstop
71ret 0
72end