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-sovereign-core-mv/blob/main/om/qwen-native/build.sh # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. 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-sovereign-core-mv / om / qwen-native / build.sh` 42 lines ยท 1875 bytes Raw Blame History 1 #!/bin/sh 2 # Usage: build.sh OUTPUT_DIRECTORY PINNED_27B_DIRECTORY PINNED_35B_DIRECTORY. 3 # Build inputs are fetched from the locally provisioned Interplane Git store, never from a model service. 4 set -eu 5 [ "$#" = 3 ] || { echo "usage: build.sh OUTPUT_DIRECTORY MODEL27 MODEL35" >&2; exit 2; } 6 mkdir -p "$1" 7 out=$(cd "$1" && pwd) 8 m27=$(cd "$2" && pwd) 9 m35=$(cd "$3" && pwd) 10 src=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) 11 work=$(mktemp -d "$out/build.XXXXXXXX") 12 trap 'rm -rf "$work"' EXIT 13 cd "$src" 14 OUT="$work/gpu" sh linear/build.sh 15 cc=$work/gpu/omc 16 cat tokenizer/tokio.om > "$work/io.om" 17 { 18 echo om2 19 cat "$work/io.om" ../vendor/sha256.om model/checkpoint-pins.om model/attest.om 20 } > "$work/attest.om" 21 "$cc" < "$work/attest.om" > "$work/attest" 22 chmod 755 "$work/attest" 23 "$work/attest" "$m27" "$m35" > "$work/install.om" 24 cat "$work/gpu/library.om" "$work/io.om" ../vendor/json.om ../vendor/sha256.om \ 25 tokenizer/model.om tokenizer/unicode.om tokenizer/unicode-data.om tokenizer/tokenizer.om \ 26 blocks/math.om blocks/gdn.om blocks/attention.om "$work/install.om" model/weights.om model/profile.om \ 27 model/diskcheck.om model/project.om model/graph.om model/session.om model/generate.om > "$work/engine.om" 28 "$cc" < "$work/engine.om" > "$work/qwen-engine" 29 chmod 755 "$work/qwen-engine" 30 readelf -lWd "$work/qwen-engine" > "$work/runtime-elf.txt" 31 if grep -Eq 'INTERP|DYNAMIC|NEEDED' "$work/runtime-elf.txt"; then echo "foreign runtime dependency" >&2; exit 3; fi 32 (cd "$work" && sha256sum attest.om attest install.om engine.om qwen-engine runtime-elf.txt > SHA256SUMS) 33 id=$(sha256sum "$work/qwen-engine" | cut -c1-64) 34 if [ -d "$out/$id" ]; then 35 (cd "$out/$id" && sha256sum --quiet -c SHA256SUMS) 36 cmp "$work/SHA256SUMS" "$out/$id/SHA256SUMS" 37 else 38 rm -r "$work/gpu" 39 rm "$work/io.om" 40 mv -T "$work" "$out/$id" 41 fi 42 printf '%s\n' "$out/$id/qwen-engine"