interplane.Get Omega
Read in your language

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

branch main Branches Tags History

aien-sovereign-core-mv / docs / qwen38 / TRY_IT_ON_YOUR_SPARK.md

412 lines · 22948 bytes Raw Blame History Source

Try it on your DGX Spark: the Qwen3.8-27B model server

This page takes you from a DGX Spark with nothing of AIEN on it to a chat reply from Qwen3.8-27B, served by AIEN's own Omega engine, using only public sources. It also shows how to run the same correctness and speed checks I run, so you get your own receipt to compare with mine.

What you get: an HTTP server on your Spark that speaks the OpenAI chat-completions format, text only, one request at a time. What it is not: a finished product. Read the known limits in section 7 before you depend on it, and ALPHA_STATUS.md for what "alpha" covers and what stays pre-alpha.

This page describes the branch it sits on. If ./install.sh --help in your checkout does not list --with-server, your checkout is older than this page; use the branch or release this page came from.

1. What you need

Hardware and system (the only setup tested):

Programs:

Time: the build and the first run have not been timed on a clean account yet (see ALPHA_STATUS.md). Loading the model into the server took 64 seconds on my Spark (evidence/qwen38-serve-fast-20261019/README.md, "load 64 s").

2. Install

cd ~
git clone https://github.com/aien-dev/aien-sovereign-core-mv
cd aien-sovereign-core-mv
./install.sh --with-server --with-model 2>&1 | tee ~/aien-install.log

--with-model also downloads and checks the model (section 3). Leave it out if you want to fetch the model yourself.

Keep ~/aien-install.log: it is one of the things to paste when you report a problem.

What the installer does with --with-server --with-model, in order:

  1. Checks the machine (the block that starts with [*] Model server: checking this machine): Linux on aarch64, the six programs above, the NVIDIA driver version, the three device files, free memory. Then free disk for the model (the block that starts with [*] Model download: checking). A failed check stops the installer before anything is cloned, built or downloaded and says what is wrong in plain words.
  2. Fetches the pinned Omega, physics and aienos sources from GitHub into target/pins/ (scripts/pins.sh --gpu). The exact commits are in omega.lock and the lock files next to it.
  3. Builds the Omega GPU library from those sources and the server aien-serve-http against it (cargo build --locked --release -p aien-serve-http). This is the long step.
  4. Runs aien-serve-http --version and refuses to install a binary that has only the CPU stub instead of the real engine.
  5. Installs aien-serve-http and the start script aien-serve-27b into ~/.local/bin, along with the repository's other command line tools (those tools are not part of the alpha; you do not need them for the server).
  6. Downloads the model into ~/models/qwen3.8-27b-fp8-017b9c7a and checks every file (section 3).

The installer also appends a line to your ~/.bashrc, ~/.zshrc or ~/.profile so that ~/.local/bin is on your PATH. Open a new shell afterwards, or run export PATH="$HOME/.local/bin:$PATH" in the current one. Set AIEN_INSTALL_NO_PROFILE=1 if you do not want your shell files touched.

Check the result:

aien-serve-http --version

The two lines that matter must say native:

omega gpu engine: native (...)
qwen38 engine: native (...)

If either says STUB, the engine is not linked and the server will not work; the installer should have refused this, so please report it (section 8).

3. Download the model and check it

The weights are the public Hugging Face model Qwen/Qwen3.8-27B-FP8 at revision 017b9c7af6b5689d5dd426a76e0bc077eb5ca20a, Apache 2.0 licence, not gated, no account needed. The server reads that folder directly; no conversion step.

With --with-model (section 2) the installer does all of this section for you:

To fetch or re-check only the model later, run ./install.sh --with-model again from the checkout (it also runs the command line tools build again).

What I ran: on my Spark, install.sh --model-dir=... with real downloads from huggingface.co into a folder missing two small files and holding a third as a partial download fetched 2 files, resumed the third, and sha256sum -c passed for all 81 files; a second run fetched nothing and passed again (evidence/qwen38-install-with-model-20261019/realrun.log). The full 31 GB download from an empty folder has not been timed. scripts/test-install.sh checks resuming, the refusal on a mismatch and the disk check against a small local stand-in folder.

By hand, if you prefer: this loop does the same download, taking the 81 file names from the shipped checksum list, and skips files that are already there:

REV=017b9c7af6b5689d5dd426a76e0bc077eb5ca20a
LIST=~/aien-sovereign-core-mv/docs/qwen38/qwen3.8-27b-fp8-017b9c7a.sha256
mkdir -p ~/models/qwen3.8-27b-fp8-017b9c7a && cd ~/models/qwen3.8-27b-fp8-017b9c7a
awk '{print $2}' "$LIST" | while read -r f; do
  [ -s "$f" ] && continue
  curl -fL --retry 5 -o "$f" "https://huggingface.co/Qwen/Qwen3.8-27B-FP8/resolve/$REV/$f" \
    || echo "FAILED $f"
done

If you already use the Hugging Face command line tool, this fetches the same revision into the same folder (I have not run this command myself; the loop above is what I ran):

hf download Qwen/Qwen3.8-27B-FP8 --revision 017b9c7af6b5689d5dd426a76e0bc077eb5ca20a \
  --local-dir ~/models/qwen3.8-27b-fp8-017b9c7a

Then check every file against the list shipped in this repository (the installer's --with-model already did this; it is safe to run again):

cd ~/models/qwen3.8-27b-fp8-017b9c7a
sha256sum -c ~/aien-sovereign-core-mv/docs/qwen38/qwen3.8-27b-fp8-017b9c7a.sha256

Every line must end in OK (81 lines). For the 67 large files the expected values are the ones Hugging Face publishes for this revision; for the 14 small files they are what I downloaded, with sizes matching upstream (details in README.md). If a file fails, delete it and run the download loop again. Do not start the server on a folder that fails this check.

The folder name matters: aien-serve-27b looks for ~/models/qwen3.8-27b-fp8-017b9c7a unless you set MODEL_DIR.

4. Start the server

aien-serve-27b

The script checks that the binary has the real engine, that the model folder exists, that the driver's device files are there, that the port is free and that no earlier copy is running; then it starts the server in the background with the same flags my own live server uses (--engine omega --port 18091 --max-context 131072 --max-tokens-cap 16384 --thinking off), then it waits for the model to load. When the server is serving it prints ready, the log path, the stop command and a first chat command, and exits 0. If the server exits instead (for example the loader refuses because less than 49,497 MiB is free), the script prints the reason from the log and exits 1; no server is running then. If the model is still loading after 40 minutes (READY_TIMEOUT, in seconds) it exits 2 and leaves the server running. The loader first queues for the shared GPU lock, so on a busy Spark the wait can be minutes (6.5 minutes in my test). aien-serve-27b --no-wait returns at once and says nothing about the load. The server listens on 127.0.0.1 only.

You can check by hand that it is ready; this returns the model:

curl -s http://127.0.0.1:18091/v1/models
{"object":"list","data":[{"id":"qwen3.8-27b-fp8","object":"model","created":...,"owned_by":"aien/omega"}]}

The log is ~/.local/state/aien/serve-27b.log; the line `aien-serve-http: qwen38 engine ready in N smarks the moment it is ready.curl -s http://127.0.0.1:18091/health` reports status, model, engine, busy and uptime_s.

Stop it with kill -TERM $(cat ~/.local/state/aien/serve-27b.pid). It finishes the reply in progress first, so stopping can take a few minutes. Nothing restarts the server after a reboot; run aien-serve-27b again. aien-serve-27b --help lists the settings (MODEL_DIR, PORT, BIN, STATE_DIR, LOG) and --foreground for use under your own service manager.

5. First chat request

curl -s http://127.0.0.1:18091/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen3.8-27b-fp8",
    "messages": [{"role": "user", "content": "In two sentences, what is a DGX Spark?"}],
    "max_tokens": 128,
    "temperature": 0
  }'

The reply is standard chat-completions JSON: the text is in choices[0].message.content, finish_reason is stop (the model ended) or length (max_tokens reached), and usage gives prompt and completion token counts. Things to know:

Any OpenAI-compatible chat client pointed at http://127.0.0.1:18091/v1 with model qwen3.8-27b-fp8 and no tool calling should work; I have only exercised curl and the scripts in this repository.

6. Check it yourself

Two scripts in tools/ send fixed requests to a running server and write a receipt.json you can compare with mine and attach to a report. Run them from the repository folder with the server started by aien-serve-27b (they read its log for the per-token timings). They need curl, jq, sha256sum, awk and (speed only) iconv.

Correctness gate:

cd ~/aien-sovereign-core-mv
tools/qwen38_serve_gate.sh http://127.0.0.1:18091 "" ~/aien-check/gate

It sends ten short requests (24 tokens at most each) and checks that the greedy answer to the reference prompt is the same 24 token ids my host reference produced (crates/aien-inference-abi/fixtures/qwen38/gen-chat-max-24.json, provenance in PROVENANCE.md next to it), that a different question gives different ids (the negative control), and that a follow-up turn gives the same ids whether the server reuses its state or starts cold. The last lines must read GATE PASS and golden ids against the shipped reference: MATCH. Mine: GATE PASS, 24 of 24 (evidence/qwen38-serve-fast-20261019/gate-live/summary.txt).

Speed:

tools/qwen38_serve_speed.sh http://127.0.0.1:18091 "" ~/aien-check/speed

It sends three times the same 30-token prompt and reads 256 greedy tokens back, then a prompt of about 1,700 tokens, one of about 30,000 tokens and a follow-up to that one. The 30,000-token request takes much longer than the others; let it finish. The two lines to look at:

decode ids against the shipped reference: MATCH
median chip ms per token (3 decodes): <your number>

MATCH means your server wrote exactly the 256 tokens mine did (crates/aien-inference-abi/fixtures/qwen38/decode-lighthouses-256.json). The per-token time is the chip time from the server's own log line, not the wall time at the client, so other programs waiting for the chip do not distort it.

What receipt.json contains (schema aien-qwen38-serve-receipt/1, written by tools/qwen38_receipt.sh):

The receipt contains your user name in file paths and your machine's load and memory figures, nothing else about you.

How to compare with mine. My numbers, each with the file it comes from:

MineValueWhere
Decode speed7.63 tokens per second: 1000 / 131.05 ms, the median of four runs at 129.9, 129.0, 134.9 and 132.2 chip ms per token, 256 greedy tokens eachevidence/qwen38-serve-fast-20261019/after/runs.tsv; arithmetic in calc-receipts/64f74f90...json
Share of the memory ceiling0.752 of 10.15 tokens per secondCEILING.md, calc-receipts/64f74f90...json and 9822c2ba...json
Token ids of the 256-token answerhash ceb68306ae2d, identical in all four runsevidence/qwen38-serve-fast-20261019/after/runs.tsv (ids_sha) and the fixture above
Correctness gateGATE PASS, 24 of 24 greedy ids equal the host referenceevidence/qwen38-serve-fast-20261019/gate-live/summary.txt
Server that produced thembinary sha256 df936011..., sovereign-core 46134247, omega 0010f7d3evidence/qwen38-serve-fast-20261019/README.md

Print the same figures from your receipts:

jq '{verdict, golden_ids, binary: .server.binary_sha256, build: .server.build}' ~/aien-check/gate/receipt.json
jq '{decode_ids, decode_median_chip_ms_per_token, decode_tokens_per_s, share_of_ceiling,
     driver: .machine.start.nvidia_driver, load: .machine.start.loadavg_1_5_15}' ~/aien-check/speed/receipt.json
jq -r '.runs[] | "\(.name)\t\(.ids_sha256_12)\t\(.chip_ms_per_token) ms/token"' ~/aien-check/speed/receipt.json

What to expect: the token ids should match exactly (MATCH, and ceb68306ae2d for the three decode runs) because greedy decoding is deterministic; a mismatch is a bug and I want to hear about it. The chip ms per token should be close to mine on an idle Spark; my four runs were taken while other jobs were using the machine (the lock wait figures in runs.tsv show requests waiting up to 186 seconds for the chip), so a somewhat faster number on a quiet machine would not surprise me. The ceiling arithmetic is written out in CEILING.md, and calc-receipts/ stores each expression and its exact result, so you can redo it by hand.

My evidence folders were produced by an earlier version of these scripts, before they wrote receipt.json, so there is no receipt.json of mine to diff against yet; the files in the table are the raw outputs.

7. Known limits

Stated here so nobody is surprised; they are the same limits that sit next to the numbers above.

8. How to report problems

Open an issue with the alpha tester template: github.com/aien-dev/aien-sovereign-core-mv/issues/new?template=alpha-tester-report.md. Reports that say "it worked" are as useful as failures: your receipts are what turn this page from "it works on my Spark" into "it works on a Spark".

What to paste (the template has a slot for each):

Please do not paste the model files, your whole install log, or anything from outside your AIEN folders.