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/aienux/blob/main/scripts/qemu_ck_local_model_test.sh # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. 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 `aienux / scripts / qemu_ck_local_model_test.sh` 37 lines ยท 2156 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # Complete native Omega inference under the actual CPL3 kernel entry path. 3 set -euo pipefail 4 cd "$(dirname "$0")/.." 5 source scripts/lib_gate_hold.sh 6 if ! gh_quiet_check || ! gh_lock_take local_model 15; then 7 echo "LOCAL_MODEL: NOT_RUN ($gh_why)"; exit 3 8 fi 9 trap gh_lock_release EXIT 10 out=${LOCAL_MODEL_OUT:?set LOCAL_MODEL_OUT to an isolated output directory} 11 weights=${LOCAL_MODEL_WEIGHTS:?set LOCAL_MODEL_WEIGHTS to pinned stories15M.bin} 12 tokenizer=${LOCAL_MODEL_TOKENIZER:?set LOCAL_MODEL_TOKENIZER to pinned tokenizer.bin} 13 [[ $(sha256sum "$weights" | cut -d' ' -f1) == `cd590644d963867a2b6e5a1107f51fad663c41d79c149fbecbbb1f95fa81f49a` ]] 14 [[ $(sha256sum "$tokenizer" | cut -d' ' -f1) == `50a52ef822ee9e83de5ce9d0be0a025a773d019437f58b5ff9dcafb063ece361` ]] 15 cross=""; [[ $(uname -m) == x86_64 ]] || cross=x86_64-linux-gnu- 16 make -s -j4 -C native/kernel X86_CROSS="$cross" OUT="$out/build" CK_LOCAL_TEST=1 \ 17 CK_LOCAL_MODEL=1 CK_LOCAL_MODEL_FILE="$weights" CK_LOCAL_TOKENIZER_FILE="$tokenizer" imac-kernel 18 image="$out/model.img" 19 truncate -s 256M "$image" 20 mformat -i "$image" -F :: 21 mmd -i "$image" ::/EFI ::/EFI/BOOT 22 mcopy -i "$image" "$out/build/IMACKERN-LOCAL-TEST-MODEL.EFI" ::/EFI/BOOT/BOOTX64.EFI 23 for cpu in ${LOCAL_MODEL_CPUS:-qemu64 max}; do 24 cp /usr/share/OVMF/OVMF_VARS_4M.fd "$out/$cpu-vars.fd" 25 rc=0 26 timeout -k 3 240 qemu-system-x86_64 -M q35 -accel tcg -cpu "$cpu" -smp 4 -m 1024 \ 27 -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE_4M.fd \ 28 -drive if=pflash,format=raw,file="$out/$cpu-vars.fd" \ 29 -drive if=none,id=esp,format=raw,file="$image" -device ide-hd,drive=esp,bus=ide.0 \ 30 -display none -nic none -serial "file:$out/$cpu.log" -no-reboot >"$out/$cpu-qemu.log" 2>&1 || rc=$? 31 [[ $rc == 0 || $rc == 124 ]] 32 grep -a 'local_model_test: generation PASS tokens=32 .*real_cpl3=yes' "$out/$cpu.log" 33 grep -a 'local_model_test: PASS isolation=1 quotas=1 cancellation=1 cleanup=1' "$out/$cpu.log" 34 grep -a 'local_test: PASS.*repeated=1000 real_cpl3=yes' "$out/$cpu.log" 35 ! grep -a 'panic:' "$out/$cpu.log" 36 echo "LOCAL_MODEL: PASS cpu=$cpu" 37 done