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/native/ecosystem5/pack.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 / native / ecosystem5 / pack.om` 180 lines ยท 3105 bytes Raw Blame History 1 note SPDX-License-Identifier: AGPL-3.0-or-later 2 note PACK5 v1 consumes L775 core84d03c55 and L776 admitd8d14c47 unchanged. 3 note Trusted single-thread caller supplies tokenization; no authentication or tokenizer. 4 note DPCfg schema,vocabulary size,split,padding token. DPPin expected+observed tokenizer then template SHA256 words. 5 global DPCfg ulong 4 6 global DPPin ulong 16 7 global DPLen ulong 64 8 global DPPrompt ulong 64 9 global DPToken ulong 16384 10 global DPOut ulong 256 11 global DPLabel ulong 256 12 global DPMask ulong 256 13 global DPTask ulong 256 14 global DPPos ulong 256 15 note DPState ready,count,records. A failed call invalidates readiness and count; payload stays unchanged. 16 global DPState ulong 3 17 18 fn dppins to bool 19 a = ulong 0 20 b = ulong 0 21 for i ulong 4 22 a = or a get DPPin i 23 b = or b get DPPin add i 8 24 if ne get DPPin i get DPPin add i 4 25 ret false 26 end 27 if ne get DPPin add i 8 get DPPin add i 12 28 ret false 29 end 30 end 31 ret and ne a 0 ne b 0 32 end 33 34 fn dpinput task ulong to ulong 35 if ne get CFreeze add mul task 32 1 get DPCfg 2 36 ret 77 37 end 38 count = get DPLen task 39 prompt = get DPPrompt task 40 if or eq count 0 gt count 256 41 ret 74 42 end 43 if gt prompt count 44 ret 74 45 end 46 for j ulong count 47 if ge get DPToken add mul task 256 j get DPCfg 1 48 ret 75 49 end 50 end 51 ret 0 52 end 53 54 fn dpvalidate to ulong 55 if or ne get CState 2 1 ne get LS 18 1 56 ret 70 57 end 58 if or ne get LS 0 0 ne get LS 6 0 59 ret 70 60 end 61 n = get LS 1 62 good = get CState 0 63 bad = get CState 1 64 if or eq n 0 gt n 64 65 ret 73 66 end 67 if or gt good n gt bad n 68 ret 73 69 end 70 if ne add good bad n 71 ret 73 72 end 73 if or ne get DPCfg 0 1 eq get DPCfg 1 0 74 ret 71 75 end 76 if or gt get DPCfg 1 `4294967296` ge get DPCfg 3 get DPCfg 1 77 ret 71 78 end 79 if or lt get DPCfg 2 1 gt get DPCfg 2 2 80 ret 71 81 end 82 if eq dppins false 83 ret 72 84 end 85 total = ulong 0 86 for i ulong good 87 t = get CGood i 88 if ge t n 89 ret 73 90 end 91 if or ne get CSeen t 1 ne get CDiag t 0 92 ret 73 93 end 94 for j ulong i 95 if eq t get CGood j 96 ret 73 97 end 98 end 99 r = dpinput t 100 if ne r 0 101 ret r 102 end 103 count = get DPLen t 104 if gt count sub 256 total 105 ret 76 106 end 107 total = add total count 108 end 109 note No tokens or prompt markers may be supplied for quarantined or absent slots. 110 for t ulong 64 111 found = false 112 for i ulong good 113 if eq t get CGood i 114 found = true 115 end 116 end 117 if eq found false 118 if or ne get DPLen t 0 ne get DPPrompt t 0 119 ret 73 120 end 121 end 122 end 123 ret 0 124 end 125 126 fn dpcopy t ulong p ulong to ulong 127 count = get DPLen t 128 for j ulong count 129 put DPOut p get DPToken add mul t 256 j 130 put DPTask p t 131 put DPPos p j 132 next = add j 1 133 if lt next count 134 put DPLabel p get DPToken add mul t 256 next 135 if ge next get DPPrompt t 136 put DPMask p 1 137 end 138 end 139 p = add p 1 140 end 141 ret p 142 end 143 144 fn dppack to ulong 145 for i ulong 3 146 put DPState i 0 147 end 148 r = dpvalidate 149 if ne r 0 150 ret r 151 end 152 for i ulong 256 153 put DPOut i get DPCfg 3 154 put DPLabel i get DPCfg 3 155 put DPMask i 0 156 put DPTask i `18446744073709551615` 157 put DPPos i 0 158 end 159 p = ulong 0 160 for i ulong get CState 0 161 p = dpcopy get CGood i p 162 end 163 put DPState 1 p 164 put DPState 2 get CState 0 165 put DPState 0 1 166 ret 0 167 end 168 169 fn dpattend q ulong k ulong to bool 170 if ne get DPState 0 1 171 ret false 172 end 173 if or ge q get DPState 1 ge k get DPState 1 174 ret false 175 end 176 if gt k q 177 ret false 178 end 179 ret eq get DPTask q get DPTask k 180 end