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