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
aien-sovereign-core-mv / docs / campaigns / open-model-qwen3 / run-qwen3.sh
| 1 | #!/usr/bin/env bash |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | # Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | # OPEN-MODEL-QWEN3 v1 campaign (ACCEPTANCE-v1.md): the three NEXT-PHASE-1 v5 tasks, |
| 18 | # one run-campaign.sh launch each, scored by next-phase-1/make-receipt.sh with its v5 rows. |
| 19 | # Shell + jq only. No task is repeated. Run inside the caller's quietlock hold. |
| 20 | # AIEN_BIN=... AIEN_MODEL_PATH=.../model.safetensors.index.json AIEN_TOKENIZER_PATH=... \ |
| 21 | # AIEN_COMPOSE_MAX_TOKENS=64 AIEN_KV_CONTEXT_TOKENS=4096 AIEN_REQUIRE_BLACKWELL=1 \ |
| 22 | # AIEN_GB10_QWEN3_DECLARED_ATTEMPT=1 \ |
| 23 | # run-qwen3.sh RUN_BASE OUT_DIR SC_COMMIT COMPOSE_LIB_COMMIT GPU_ENGINE_COMMIT |
| 24 | set -u |
| 25 | HERE=$(cd "$(dirname "$0")" && pwd) |
| 26 | NP1=$(cd "$HERE/../next-phase-1" && pwd) |
| 27 | BASE=${1:?RUN_BASE} OUT=${2:?OUT_DIR} SC=${3:?SC_COMMIT} OMC=${4:?COMPOSE_LIB_COMMIT} OMG=${5:?GPU_ENGINE_COMMIT} |
| 28 | : "${AIEN_MODEL_PATH:?}" "${AIEN_TOKENIZER_PATH:?}" |
| 29 | need() { [ "$(printenv "$1")" = "$2" ] || { echo "$1 must be $2 (ACCEPTANCE-v1 Section 3)"; exit 3; }; } |
| 30 | need AIEN_COMPOSE_MAX_TOKENS 64 |
| 31 | need AIEN_KV_CONTEXT_TOKENS 4096 |
| 32 | need AIEN_REQUIRE_BLACKWELL 1 |
| 33 | need AIEN_GB10_QWEN3_DECLARED_ATTEMPT 1 |
| 34 | [ -z "${AIEN_FORCE_CPU_STUB:-}" ] || { echo "AIEN_FORCE_CPU_STUB must be unset"; exit 3; } |
| 35 | d=$(dirname "$AIEN_MODEL_PATH") |
| 36 | chk() { [ "$(sha256sum "$1" | cut -d' ' -f1)" = "$2" ] || { echo "digest mismatch: $1"; exit 3; }; } |
| 37 | chk "$AIEN_MODEL_PATH" d6c42883a895dfef5b0080ed2116a1bcd764f558406b98923d675978a1abf29c |
| 38 | chk "$d/model-00001-of-00003.safetensors" 75311d91bb08cf0b882913da464a1e722a31fb44db35208663487efb7a3d8ed6 |
| 39 | chk "$d/model-00002-of-00003.safetensors" 0b48adbb1f60e901153d91907ba11ce63bd4b8b584482e730f48808d055dfba1 |
| 40 | chk "$d/model-00003-of-00003.safetensors" 7dd39ccca5e4de123c74c14af44c9bf2eb75df33b4614382af0134528e060d5d |
| 41 | chk "$AIEN_TOKENIZER_PATH" aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4 |
| 42 | chk "$d/config.json" 5beea1a4a34c62782bfb2f911c606741a3bab8f92d80a118fa053c28af12e8ba |
| 43 | chk "$d/generation_config.json" 835fffe355c9438e7a25be099b3fccaa98350b83451f9fd2d99512e74f1ade48 |
| 44 | mkdir -p "$BASE" "$OUT" |
| 45 | sha256sum "${AIEN_BIN:?}" > "$BASE/binary.sha256" |
| 46 | verdict=PASS |
| 47 | for id in $(jq -r '.tasks[].id' "$NP1/tasks-v5.json"); do |
| 48 | goal=$(jq -r --arg id "$id" '.tasks[] | select(.id == $id) | .goal' "$NP1/tasks-v5.json") |
| 49 | NP1_GOAL=$goal bash "$NP1/run-campaign.sh" "$BASE/$id" >"$BASE/$id.driver.out" 2>&1 |
| 50 | echo "task $id driver exit $?" |
| 51 | if [ -f "$BASE/$id/run.json" ]; then |
| 52 | TASK_ID=$id SPEC="open-model-qwen3/ACCEPTANCE-v1.md spec_version 1" bash "$NP1/make-receipt.sh" \ |
| 53 | "$BASE/$id" "$OUT" "$SC" "$OMC" "$OMG" 0 "OPEN-MODEL-QWEN3 v1 task $id" >"$BASE/$id.receipt.out" 2>&1 |
| 54 | v=$(head -1 "$BASE/$id.receipt.out" | sed -n 's/.* verdict \([A-Z]*\)$/\1/p') |
| 55 | else |
| 56 | v=FAIL |
| 57 | fi |
| 58 | echo "task $id verdict ${v:-FAIL} ($(head -1 "$BASE/$id.receipt.out" 2>/dev/null))" |
| 59 | [ "${v:-FAIL}" = PASS ] || verdict=FAIL |
| 60 | done |
| 61 | echo "OPEN-MODEL-QWEN3 v1 campaign verdict (rows only; VERDICT-v1.md is written by the reviewer): $verdict" |