Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-train/blob/main/evidence/DISTRIBUTED7/final/metadata.om # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-train / evidence / DISTRIBUTED7 / final / metadata.om` 108 lines ยท 1788 bytes Raw Blame History 1 note M20 metadata-v1. Integer metadata only; no allocator or numeric execution. 2 note ED: schema,dtype,rank,elements,offset,slot,generation,reserved,shape8,stride8. 3 note ES: live,retired,slot,generation,dtype,elements,reserved,reserved. 4 note ES is the caller-owned allocator snapshot. It is not untrusted wire input. 5 global ED ulong 24 6 global ES ulong 8 7 8 fn emshape to int 9 rank = get ED 2 10 if gt rank 8 11 ret -2 12 end 13 n = ulong 1 14 for d ulong rank 15 size = get ED add 8 d 16 if eq size 0 17 ret -3 18 end 19 if gt size div `1073741824` n 20 ret -8 21 end 22 n = mul n size 23 end 24 if ne get ED 3 n 25 ret -3 26 end 27 ret 0 28 end 29 30 fn emlive slot ulong gen ulong to int 31 if gt slot `4294967295` 32 ret -5 33 end 34 if or ne get ES 0 1 ne get ES 1 0 35 ret -5 36 end 37 if or eq gen 0 ne slot get ES 2 38 ret -5 39 end 40 if ne gen get ES 3 41 ret -5 42 end 43 ret 0 44 end 45 46 fn embounds to int 47 size = get ES 5 48 offset = get ED 4 49 if or eq size 0 gt size `1073741824` 50 ret -8 51 end 52 if ge offset size 53 ret -6 54 end 55 note Compare against remaining extent before multiplication, never overflow. 56 room = sub sub size 1 offset 57 for d ulong get ED 2 58 count = sub get ED add 8 d 1 59 stride = get ED add 16 d 60 if ne stride 0 61 if gt count div room stride 62 ret -6 63 end 64 room = sub room mul count stride 65 end 66 end 67 ret 0 68 end 69 70 fn emcheck to int 71 if or ne get ED 0 1 ne get ED 7 0 72 ret -1 73 end 74 if or ne get ES 6 0 ne get ES 7 0 75 ret -1 76 end 77 dtype = get ED 1 78 if or lt dtype 1 gt dtype 3 79 ret -4 80 end 81 status = emshape 82 if ne status 0 83 ret status 84 end 85 status = emlive get ED 5 get ED 6 86 if ne status 0 87 ret status 88 end 89 if ne dtype get ES 4 90 ret -4 91 end 92 ret embounds 93 end 94 95 fn emrelease slot ulong gen ulong to int 96 status = emlive slot gen 97 if ne status 0 98 ret status 99 end 100 note A maximal generation is retired, never wrapped into a valid old handle. 101 if eq gen `18446744073709551615` 102 put ES 1 1 103 else 104 put ES 3 add gen 1 105 end 106 put ES 0 0 107 ret 0 108 end