From d81138c2be614e22906bb6cc3b7a14637510e7a8 Mon Sep 17 00:00:00 2001 From: Odin Shen Date: Tue, 3 Nov 2026 20:32:10 +0000 Subject: [PATCH 1/3] LP: Innexis ANA Zena CPU llm build and inference --- .../innexis_zena_llamacpp/1_check_guest.md | 81 +++++++++ .../2_build_llama_cpp.md | 111 ++++++++++++ .../innexis_zena_llamacpp/3_prepare_model.md | 81 +++++++++ .../innexis_zena_llamacpp/4_run_inference.md | 82 +++++++++ .../5_iterate_and_collect.md | 164 ++++++++++++++++++ .../innexis_zena_llamacpp/_index.md | 66 +++++++ .../innexis_zena_llamacpp/_next-steps.md | 8 + 7 files changed, 593 insertions(+) create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/1_check_guest.md create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/2_build_llama_cpp.md create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/3_prepare_model.md create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/4_run_inference.md create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/5_iterate_and_collect.md create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/_index.md create mode 100644 content/learning-paths/automotive/innexis_zena_llamacpp/_next-steps.md diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/1_check_guest.md b/content/learning-paths/automotive/innexis_zena_llamacpp/1_check_guest.md new file mode 100644 index 0000000000..3ff2c1cef2 --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/1_check_guest.md @@ -0,0 +1,81 @@ +--- +title: Check the Zena CSS Linux guest +description: Check the Zena CSS Linux guest's architecture, tools, and storage before building a CPU workload. +weight: 2 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Check the Zena CSS Linux guest + +Start from the Linux console or SSH shell prepared in the Zena CSS onboarding Learning Path. Check this guest before downloading source code or a model. The required tools and free space depend on the actual EWAOL image and chamber configuration. + +## Record the environment + +Run these commands in the **Primary Compute Linux guest**: + +```bash +cat /etc/os-release; uname -m; uname -r; cat /sys/devices/system/cpu/online; grep -E '^(MemTotal|MemAvailable):' /proc/meminfo; df -h / +``` + +The guest reports an Arm64 architecture, commonly `aarch64`, and shows its own CPU, memory, and root-filesystem values. The tested setup used ANA 2026.02 on a g4 chamber without changing the supplied Zena VP's CPU or memory settings. ANA Lab Manager showed **Simulation CPUs: 4**; the Linux output below shows **16 online CPUs** (`0-15`) and the EWAOL image's approximately 8 GB of usable guest memory. Use the Linux output when describing guest-visible CPUs; do not read the ANA simulation setting as a Linux core count. + +``` +ID=ewaol +NAME="Edge Workload Abstraction and Orchestration Layer" +VERSION="v2.1.0 (styhead)" +VERSION_ID=v2.1.0 +VERSION_CODENAME="styhead" +PRETTY_NAME="Edge Workload Abstraction and Orchestration Layer v2.1.0 (styhead)" +CPE_NAME="cpe:/o:openembedded:ewaol:v2.1.0" +aarch64 +6.6.54-yocto-standard +0-15 +MemTotal: 8120232 kB +MemAvailable: 7856280 kB +Filesystem Size Used Avail Use% Mounted on +/dev/root 28G 1.3G 25G 5% / +``` + +## Check build and transfer tools + +See which tools are available in this guest: + +```bash +for tool in git cmake make gcc g++ wget sha256sum tar; do + command -v "$tool" || printf 'Missing: %s\n' "$tool" +done +``` + +The later pages need a C/C++ compiler, Make, CMake, Git, a model transfer method, and a SHA-256 utility. If a tool is missing, record it before proceeding. Do not install a package from an unrelated Linux distribution into the EWAOL image. + +``` +/usr/bin/git +Missing: cmake +/usr/bin/make +/usr/bin/gcc +/usr/bin/g++ +/usr/bin/wget +/usr/bin/sha256sum +/usr/bin/tar +``` + +## Set the work directory + +The Zena guest shown above has 25 GB available on its root filesystem. Use one directory under `/root` for the source, build, model, and results: + +```bash +LP2_WORK_DIR=/root/zena-llamacpp +mkdir -p "$LP2_WORK_DIR" +``` + +The tested run used this directory for the source, build, model, and result archive. The root filesystem had 25 GB available before these files were created. + +If your guest has less available space, choose a directory on a filesystem with enough capacity before running the next page. Keep this shell open so `LP2_WORK_DIR` remains set. + +ANA's **Auto Shutdown** duration is configurable. Check the selected duration in Lab Manager before starting the build, and plan to save your work before the VP stops. + +## What you have learned + +You have identified the Linux guest and set a work directory for the workload. The next page builds llama.cpp using the tools available in this image. diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/2_build_llama_cpp.md b/content/learning-paths/automotive/innexis_zena_llamacpp/2_build_llama_cpp.md new file mode 100644 index 0000000000..1ddedd1ae8 --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/2_build_llama_cpp.md @@ -0,0 +1,111 @@ +--- +title: Build llama.cpp in the Zena CSS guest +description: Build a pinned llama.cpp revision for CPU inference in the Zena CSS Linux guest. +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Build llama.cpp in the Zena CSS guest + +Build the tested llama.cpp revision in the Zena CSS guest. Keep the source and build output in the work directory from the previous page. + +## Make CMake available + +Check whether CMake is already installed. In the tested Zena guest, the command returned: + +```bash +cmake --version +``` + +```output +sh: cmake: command not found +``` + +Use the [Kitware CMake 3.28.6 release](https://github.com/Kitware/CMake/releases/tag/v3.28.6) for Linux AArch64 in the Zena work directory. This does not change the guest's system packages: + +```bash +cd "$LP2_WORK_DIR" && +wget -O cmake-3.28.6-linux-aarch64.tar.gz.part \ + https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-linux-aarch64.tar.gz && + mv cmake-3.28.6-linux-aarch64.tar.gz.part cmake-3.28.6-linux-aarch64.tar.gz && +sha256sum cmake-3.28.6-linux-aarch64.tar.gz && +tar -xzf cmake-3.28.6-linux-aarch64.tar.gz && +export PATH="$LP2_WORK_DIR/cmake-3.28.6-linux-aarch64/bin:$PATH" && +cmake --version +``` + +The Zena download completed with a 53,907,530-byte archive. The hash and version commands returned: + +```output +7909cc2128ce9442c63ce674a0bfb0e4f4ce04cef667d887e15ad5670d594ba7 cmake-3.28.6-linux-aarch64.tar.gz +cmake version 3.28.6 +``` + +The SHA-256 value identifies the downloaded file used in this run; it has not been checked against a publisher-supplied checksum. If the download or extraction fails on your guest, keep the error output and stop before the llama.cpp build. Keep this shell open so the CMake path remains available. + +## Get the source at a fixed revision + +Clone llama.cpp and check out the full commit used in the tested Zena run: + +```bash +LP2_LLAMA_COMMIT=b86d2f07542b29ab099aed34fd6b6d1b2fd4b81c +git clone https://github.com/ggml-org/llama.cpp.git "$LP2_WORK_DIR/llama.cpp" && +cd "$LP2_WORK_DIR/llama.cpp" && +git checkout --detach "$LP2_LLAMA_COMMIT" && +git rev-parse HEAD +``` + +The final command returned the requested full commit: + +```output +b86d2f07542b29ab099aed34fd6b6d1b2fd4b81c +``` + +If your checkout reports another commit, stop before configuring the build. + +## Configure a CPU build + +In the same **Zena guest shell**, configure the pinned source for a CPU build: + +```bash +cd "$LP2_WORK_DIR/llama.cpp" +cmake -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DGGML_NATIVE=ON \ + -DLLAMA_CURL=OFF \ + -DBUILD_SHARED_LIBS=OFF +``` + +This CMake invocation was used in the tested Zena run. Its output reported GNU 14.2.0 for C and C++, included the CPU backend, and ended with: + +```output +-- Configuring done (3.3s) +-- Generating done (0.2s) +-- Build files have been written to: /root/zena-llamacpp/llama.cpp/build +``` + +CMake also reported that OpenMP was not found. That warning did not prevent configuration; it does not establish how many threads a later inference run will use. The supplied excerpt does not include a numeric exit status. Stop if configuration reports an error. + +## Build and identify llama.cpp + +After configuration succeeds, compile the CPU binary: + +```bash +cmake --build build --config Release -j4 +./build/bin/llama-cli --version +``` + +The tested Zena build output reached `Built target llama-cli`, and the binary returned: + +```output +version: 0.6.0-dev (build 11482, commit b86d2f075) +built with GNU 14.2.0 for Linux aarch64 +``` + +The full build also downloaded UI assets from Hugging Face during compilation, so that build required network access. `-j4` limits build jobs; it does not set the virtual platform's CPU count. The supplied excerpts do not include a complete build log or numeric exit status. If the build fails, save its error output and check the work filesystem before retrying. + +## What you have learned + +You have a source revision and a binary identity to associate with the inference result. Keep `LP2_WORK_DIR` available in this shell for the next page. diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/3_prepare_model.md b/content/learning-paths/automotive/innexis_zena_llamacpp/3_prepare_model.md new file mode 100644 index 0000000000..e6993c05f2 --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/3_prepare_model.md @@ -0,0 +1,81 @@ +--- +title: Prepare and verify a text model +description: Download a pinned GGUF text model and verify its size and SHA-256 checksum in the Zena CSS guest. +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Prepare and verify a text model + +Use one small GGUF text model so you can focus on application bring-up. The tested Zena run used the [Qwen2.5 0.5B Instruct Q4_0 GGUF file](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/blob/main/qwen2.5-0.5b-instruct-q4_0.gguf). The publisher lists an Apache-2.0 license and SHA-256 value for this file. The downloaded file matched that hash before inference. + +Use the file's [full upload commit](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/commit/6dd44a1fb35d11b5d1b28902876ce3cc9e882d0e) instead of the moving `main` branch. The file in the tested Zena run was 428,730,208 bytes. Verify its hash in your guest before loading it. + +## Choose the model location + +Use the work filesystem checked on the first page. Make sure it still has room for a temporary download and the complete model: + +```bash +LP2_MODEL_DIR="$LP2_WORK_DIR/models" +mkdir -p "$LP2_MODEL_DIR" +df -h "$LP2_MODEL_DIR" +LP2_MODEL_FILE="$LP2_MODEL_DIR/qwen2.5-0.5b-instruct-q4_0.gguf" +``` + +In the tested Zena guest, the model directory was created and its filesystem reported: + +```output +Filesystem Size Used Avail Use% Mounted on +/dev/root 28G 2.9G 23G 12% / +``` + +These figures describe the guest before the model download. + +## Obtain the fixed model file + +If this guest can reach Hugging Face, download the file from the fixed repository revision: + +```bash +LP2_MODEL_REV=6dd44a1fb35d11b5d1b28902876ce3cc9e882d0e +wget -q -O "$LP2_MODEL_FILE.part" \ + "https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/$LP2_MODEL_REV/qwen2.5-0.5b-instruct-q4_0.gguf?download=true" && + mv "$LP2_MODEL_FILE.part" "$LP2_MODEL_FILE" +printf 'Download exit status: %s\n' "$?" +``` + +The fixed-revision download in the tested Zena guest completed with: + +```output +Download exit status: 0 +``` + +Continue only if the download exit status is `0`. A successful download command does not establish that the file has the expected contents; check it below. + +If the guest cannot download directly, obtain the same approved file through a transfer route configured for this VP. The [Zena CSS onboarding Learning Path](../innexis_ana_zena/) describes ANA Host Access and an authorized SSH tunnel; each new VP needs its own access configuration. Set `LP2_MODEL_FILE` to the transferred file's actual path and verify its hash before continuing. + +## Check the file identity + +Compare the downloaded or transferred file with the SHA-256 published for this Q4_0 file: + +```bash +LP2_MODEL_SHA256=7671c0c304e6ce5a7fc577bcb12aba01e2c155cc2efd29b2213c95b18edaf6ed +test -s "$LP2_MODEL_FILE" && wc -c "$LP2_MODEL_FILE" +printf '%s %s\n' "$LP2_MODEL_SHA256" "$LP2_MODEL_FILE" | sha256sum -c - +printf 'Hash check exit status: %s\n' "$?" +``` + +In the tested Zena guest, the file size and hash check returned: + +```output +428730208 /root/zena-llamacpp/models/qwen2.5-0.5b-instruct-q4_0.gguf +/root/zena-llamacpp/models/qwen2.5-0.5b-instruct-q4_0.gguf: OK +Hash check exit status: 0 +``` + +If your check fails, stop before inference. Investigate the file source, revision, partial download, or expected hash rather than accepting a changed artifact silently. + +## What you have learned + +You have identified a model artifact separately from the runtime binary. Keep `LP2_MODEL_FILE` available in the same guest shell for inference. diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/4_run_inference.md b/content/learning-paths/automotive/innexis_zena_llamacpp/4_run_inference.md new file mode 100644 index 0000000000..cc1210d8cb --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/4_run_inference.md @@ -0,0 +1,82 @@ +--- +title: Run CPU inference and inspect the result +description: Run llama.cpp with a verified model and confirm that the Zena CSS guest generates text on its CPU. +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Run CPU inference and inspect the result + +Run a short text prompt with the binary and model you prepared. Use one fixed command so its output can be traced back to the source revision, model file, and Zena guest. + +## Check the command options + +The tested Zena build exposes `--single-turn` and `--simple-io`. Confirm that your build exposes both options: + +```bash +LP2_LLAMA_CLI="$LP2_WORK_DIR/llama.cpp/build/bin/llama-cli" +test -x "$LP2_LLAMA_CLI" +"$LP2_LLAMA_CLI" --help > "$LP2_WORK_DIR/llama-cli-help.txt" 2>&1 +grep -F -- '--single-turn' "$LP2_WORK_DIR/llama-cli-help.txt" +grep -F -- '--simple-io' "$LP2_WORK_DIR/llama-cli-help.txt" +``` + +In the tested Zena guest, both searches returned matching help text: + +```output +-st, --single-turn run conversation for a single turn only, then exit when done +--simple-io use basic IO for better compatibility in subprocesses and limited +``` + +If either option is missing from your build, revise the command below before running it. + +## Run a text-generation smoke test + +Create a results directory and save the prompt beside the application output: + +```bash +LP2_RESULTS_DIR="$LP2_WORK_DIR/results" +mkdir -p "$LP2_RESULTS_DIR" +printf '%s\n' 'Write one short sentence about a virtual platform.' \ + > "$LP2_RESULTS_DIR/first-prompt.txt" +``` + +Run the following command on the **Zena Linux guest**. It requests zero GPU layers with `-ngl 0` and saves both the log and exit code: + +```bash +if "$LP2_LLAMA_CLI" \ + -m "$LP2_MODEL_FILE" \ + -t 4 -tb 4 -ngl 0 -c 512 -n 128 --temp 0 --seed 42 \ + --single-turn --simple-io \ + -p 'Write one short sentence about a virtual platform.' \ + > "$LP2_RESULTS_DIR/first-run.log" 2>&1; then + printf '0\n' > "$LP2_RESULTS_DIR/first-run.exit" +else + printf '%s\n' "$?" > "$LP2_RESULTS_DIR/first-run.exit" +fi +cat "$LP2_RESULTS_DIR/first-run.exit" +tail -n 60 "$LP2_RESULTS_DIR/first-run.log" +``` + +In the tested Zena guest, the saved exit code was `0`. The log identified build `b11482-b86d2f075`, loaded the verified Q4_0 file, and contained a non-empty generated response: + +```output +build : b11482-b86d2f075 +model : /root/zena-llamacpp/models/qwen2.5-0.5b-instruct-q4_0.gguf +ftype : Q4_0 + +> Write one short sentence about a virtual platform. +A virtual platform is a platform that allows users to create and share digital content, such as images, videos, and documents, in a virtual environment. + +Exiting... +``` + +The CPU-only build also reported that no usable GPU was found. This warning did not prevent inference. This request is a functional smoke test: inspect your own log to confirm that text appears between the prompt and `Exiting...`. The recorded answer used the general meaning of "virtual platform", so it is not a definition of an automotive Virtual SoC or a test of answer quality. + +If model loading fails, check the hash and available memory before changing model or runtime settings. Save the failing log and exit code; a changed model or command is a new test condition. + +## What you have learned + +You have a recorded CPU text-inference result on the selected virtual platform. The next page changes only the prompt and collects the evidence from both runs. diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/5_iterate_and_collect.md b/content/learning-paths/automotive/innexis_zena_llamacpp/5_iterate_and_collect.md new file mode 100644 index 0000000000..0a9a38c2bd --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/5_iterate_and_collect.md @@ -0,0 +1,164 @@ +--- +title: Change the prompt and collect the results +description: Change one inference prompt, record both results, and transfer the result archive from the Zena CSS guest. +weight: 6 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Change the prompt and collect the results + +Keep the same Zena virtual platform, llama.cpp binary, GGUF file, and runtime flags. Change only the prompt, then compare the two recorded requests. This is a controlled input iteration, not a source-code modification or a performance comparison. + +## Run the second request + +Save the changed prompt and run the same CPU command in the **guest shell**: + +```bash +printf '%s\n' 'Write one short sentence about an automotive dashboard.' \ + > "$LP2_RESULTS_DIR/second-prompt.txt" +if "$LP2_LLAMA_CLI" \ + -m "$LP2_MODEL_FILE" \ + -t 4 -tb 4 -ngl 0 -c 512 -n 128 --temp 0 --seed 42 \ + --single-turn --simple-io \ + -p 'Write one short sentence about an automotive dashboard.' \ + > "$LP2_RESULTS_DIR/second-run.log" 2>&1; then + printf '0\n' > "$LP2_RESULTS_DIR/second-run.exit" +else + printf '%s\n' "$?" > "$LP2_RESULTS_DIR/second-run.exit" +fi +cat "$LP2_RESULTS_DIR/second-run.exit" +sed -n '1,100p' "$LP2_RESULTS_DIR/second-run.log" +``` + +The second tested Zena request used the same command options and model path with only the prompt changed. Its saved exit code was `0`, and the log included: + +```output +build : b11482-b86d2f075 +model : /root/zena-llamacpp/models/qwen2.5-0.5b-instruct-q4_0.gguf +ftype : Q4_0 + +> Write one short sentence about an automotive dashboard. +An automotive dashboard is a crucial component of a vehicle's interface, displaying crucial information such as speed, distance, fuel consumption, and other critical data to the driver. + +Exiting... +``` + +The two requests demonstrate that the guest application accepted different prompts and generated text. Their output does not establish answer quality or provide a controlled performance comparison. Your generated wording may differ. + +Both prompt files, both logs, and both exit-code files were present in the tested results directory. The saved prompts contained: + +```output +Write one short sentence about a virtual platform. +Write one short sentence about an automotive dashboard. +``` + +## Record the workload identities + +Save the environment and artifact identities beside the two outputs: + +```bash +cat /etc/os-release > "$LP2_RESULTS_DIR/os-release.txt" +uname -a > "$LP2_RESULTS_DIR/uname.txt" +git -C "$LP2_WORK_DIR/llama.cpp" rev-parse HEAD \ + > "$LP2_RESULTS_DIR/llama-source-commit.txt" +"$LP2_LLAMA_CLI" --version \ + > "$LP2_RESULTS_DIR/llama-version.txt" 2>&1 +sha256sum "$LP2_MODEL_FILE" \ + > "$LP2_RESULTS_DIR/model.sha256" +ls -lh "$LP2_RESULTS_DIR" +``` + +In the tested Zena guest, these files recorded EWAOL v2.1.0 (`styhead`) on Linux 6.6.54 `aarch64`, llama.cpp commit `b86d2f07542b29ab099aed34fd6b6d1b2fd4b81c`, and `llama-cli` 0.6.0-dev build 11482 with GNU 14.2.0. The model hash remained `7671c0c304e6ce5a7fc577bcb12aba01e2c155cc2efd29b2213c95b18edaf6ed`. + +Record the build and run options used for these results: + +```bash +printf '%s\n' \ + 'CMAKE_BUILD_TYPE=Release' \ + 'GGML_NATIVE=ON' \ + 'LLAMA_CURL=OFF' \ + 'BUILD_SHARED_LIBS=OFF' \ + 'Build jobs: 4' \ + 'Inference: -t 4 -tb 4 -ngl 0 -c 512 -n 128 --temp 0 --seed 42 --single-turn --simple-io' \ + > "$LP2_RESULTS_DIR/build-and-run-options.txt" +``` + +The tested Zena guest saved `build-and-run-options.txt` with these values: + +```output +CMAKE_BUILD_TYPE=Release +GGML_NATIVE=ON +LLAMA_CURL=OFF +BUILD_SHARED_LIBS=OFF +Build jobs: 4 +Inference: -t 4 -tb 4 -ngl 0 -c 512 -n 128 --temp 0 --seed 42 --single-turn --simple-io +``` + +Check that each status is `0` and inspect each log for generated text. Compare `first-prompt.txt` with `second-prompt.txt` to confirm the intended single input change. Retain the full raw logs even if the published page shows only short, redacted excerpts. + +## Export and stop + +Check the transfer route on **this virtual platform**. A file or 9p mount created on another VP will not appear automatically here. If Host Access is configured and mounted for this VP, use its current shared folder. Otherwise, use an SSH tunnel authorized for this VP, or configure Host Access while the VP is stopped and restart it. The [Zena CSS onboarding Learning Path](../innexis_ana_zena/) explains both routes. + +In the tested Zena VM, `/mnt/ana-share` was not mounted, the guest shell was an SSH session, and `tar` was available. Package only the small result files before transferring them; the model file is not part of this archive: + +```bash +LP2_ARCHIVE="$LP2_WORK_DIR/lp2-results.tar" +tar -cf "$LP2_ARCHIVE" -C "$LP2_RESULTS_DIR" \ + first-prompt.txt first-run.exit first-run.log \ + second-prompt.txt second-run.exit second-run.log \ + os-release.txt uname.txt llama-source-commit.txt llama-version.txt \ + model.sha256 build-and-run-options.txt && + tar -tf "$LP2_ARCHIVE" && + sha256sum "$LP2_ARCHIVE" && + wc -c "$LP2_ARCHIVE" +``` + +The tested archive contained the 12 named result files and no model binary. The archive check returned: + +```output +19bc18de2f02ec9fb151e7ca32272c234bce21247ac59eb0faf8667594ea0900 /root/zena-llamacpp/lp2-results.tar +20480 /root/zena-llamacpp/lp2-results.tar +Archive step exit status: 0 +``` + +If this VP restarts before you download the archive, check that the file still exists and has the recorded SHA-256. Obtain the current SSH port mapping for this VP and authorize a new tunnel if the previous authorization has expired. + +After the tested VP restarted, checking the archived file against its previously recorded digest returned `OK` with exit status `0`. This confirms that the archive survived this restart; check your own archive if your VP restarts. + +Keep this VP's authorized ANA tunnel open. On your **local macOS terminal**, find the current external port mapped to guest port `22` in ANA Port Mapping. Set the port in the same terminal you will use for the download: + +```bash +printf 'Current ANA external SSH port: ' +read -r ANA_SSH_PORT +test -n "$ANA_SSH_PORT" +``` + +Continue only if the `test` command succeeds. The variable belongs to your local terminal, not the guest shell. Download the archive to a local file, then inspect it: + +```bash +LP2_LOCAL_ARCHIVE="$HOME/lp2-results.tar" +ssh -T -4 -p "$ANA_SSH_PORT" root@127.0.0.1 \ + 'cat /root/zena-llamacpp/lp2-results.tar' > "$LP2_LOCAL_ARCHIVE.part" && + shasum -a 256 "$LP2_LOCAL_ARCHIVE.part" && + wc -c "$LP2_LOCAL_ARCHIVE.part" && + tar -tf "$LP2_LOCAL_ARCHIVE.part" +``` + +Compare the local SHA-256 with the value recorded in the guest. If they match and all 12 files are listed, keep the verified copy: + +```bash +mv "$LP2_LOCAL_ARCHIVE.part" "$LP2_LOCAL_ARCHIVE" +``` + +The downloaded copy in this test matched the guest SHA-256 `19bc18de2f02ec9fb151e7ca32272c234bce21247ac59eb0faf8667594ea0900`, was 20,480 bytes, and contained the same 12 files. Your archive digest may differ because your logs and file metadata differ. On Linux, use `sha256sum` instead of macOS `shasum -a 256`. + +Keep model binaries out of the result bundle unless their terms permit redistribution. Check the raw logs for private endpoints, usernames, or keys before sharing the archive outside your team. + +After confirming the files are saved, return to **Lab Manager** and check the VP state. If the VP is still running and you have finished, choose **Stop**. **Auto Shutdown** is configurable, so check its duration before starting a long task. In the tested run, it was set to 60 minutes and stopped the VP; Lab Manager showed **Status: stopped** and **Health Check: Valid**. Do not delete a shared project or assume that a guest directory on tmpfs will survive a later start. + +## What you have learned + +You built and ran a CPU text workload and preserved evidence for two controlled requests. The result supports functional bring-up on the tested ANA Zena CSS configuration. It does not predict physical-silicon throughput, prove model-answer quality, or show GPU or NPU execution. diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md b/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md new file mode 100644 index 0000000000..78bd672060 --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md @@ -0,0 +1,66 @@ +--- +title: Run Local LLM Inference with llama.cpp on Arm Zena CSS +description: Build llama.cpp in a Zena CSS Linux guest, verify a text model, and run two recorded CPU inference requests. + +minutes_to_complete: 60 + +who_is_this_for: AI and application developers who can access a Zena CSS virtual platform in Siemens Innexis ANA. + +learning_objectives: + - Check that the Zena CSS Linux guest has the tools and storage needed for a CPU AI workload. + - Build and identify a fixed llama.cpp revision in the guest. + - Verify the identity of one GGUF text model before using it. + - Run two controlled inference requests and preserve their results. + +prerequisites: + - Access to a running Arm Zena CSS virtual platform and its EWAOL Linux guest in Siemens Innexis ANA. + - A working guest console or authorized SSH connection, plus a way to transfer files to and from the guest. + - Outbound HTTPS access from the guest to GitHub and Hugging Face for the tested download and build workflow. + - Permission to obtain the selected llama.cpp source and text model. + - Basic Linux command-line knowledge. + +author: Odin Shen + +generate_summary_faq: false +rerun_summary: false +rerun_faqs: false + +### Tags +skilllevels: Introductory +subjects: Containers and Virtualization +armips: + - Cortex-A +tools_software_languages: + - Arm Zena CSS + - Siemens Innexis ANA + - llama.cpp +operatingsystems: + - Linux + +further_reading: + - resource: + title: Arm Zena Compute Subsystem + link: https://www.arm.com/products/autonomous-machines/zena-compute-subsystems + type: documentation + - resource: + title: llama.cpp + link: https://github.com/ggml-org/llama.cpp + type: documentation + +### FIXED, DO NOT MODIFY +weight: 1 +layout: learningpathall +learning_path_main_page: "yes" +--- + +## Run local LLM inference on Zena CSS + +You can use an [Arm Zena CSS virtual platform](https://www.arm.com/products/autonomous-machines/zena-compute-subsystems) to bring up an arm64 AI workload before physical hardware is available. In this Learning Path, you build a CPU-only [llama.cpp](https://github.com/ggml-org/llama.cpp) binary inside the Linux guest, verify one text model, run two prompts, and save the results. + +The tested setup used [Siemens Innexis ANA](https://www.siemens.com/en-gb/products/ic/hav/innexis/architecture-native-acceleration/) 2026.02 on a g4 chamber with the supplied Zena CSS virtual platform and EWAOL v2.1.0 (`styhead`) Linux 6.6.54 image. The CPU and memory settings were unchanged: ANA showed **Simulation CPUs: 4**, while Linux reported **16 online CPUs** (`0-15`) and about 8 GB of guest memory. The ANA simulation setting is separate from the CPU count visible inside Linux. + +The final result is a record of the guest environment, source and model identities, commands, generated text, and exit status. It shows that this workload can run in the selected virtual platform. It does not assess the quality of the answers or predict performance on a physical SoC. + +The [Zena CSS onboarding Learning Path](../innexis_ana_zena/) establishes the virtual platform, Linux access, and file exchange used here. Complete that workflow first, or obtain an equivalent working guest from your chamber administrator. You do not need to deploy ANA or rebuild the Zena firmware for this exercise. + +The commands on the following pages run inside the **Primary Compute Linux guest** unless a step says otherwise. Keep one guest shell open across the pages because it holds the paths you choose for the build, model, and result files. diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/_next-steps.md b/content/learning-paths/automotive/innexis_zena_llamacpp/_next-steps.md new file mode 100644 index 0000000000..727b395ddd --- /dev/null +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # The weight controls the order of the pages. _index.md always has weight 1. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- From 5d6432a307a7fb410679d715e76dfc06fb136dee Mon Sep 17 00:00:00 2001 From: Odin Shen Date: Tue, 3 Nov 2026 22:18:20 +0000 Subject: [PATCH 2/3] LP: Innexis ANA Zena CPU llm build and inference --- .../automotive/innexis_zena_llamacpp/_index.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md b/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md index 78bd672060..655359c4e6 100644 --- a/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md @@ -51,16 +51,4 @@ further_reading: weight: 1 layout: learningpathall learning_path_main_page: "yes" ---- - -## Run local LLM inference on Zena CSS - -You can use an [Arm Zena CSS virtual platform](https://www.arm.com/products/autonomous-machines/zena-compute-subsystems) to bring up an arm64 AI workload before physical hardware is available. In this Learning Path, you build a CPU-only [llama.cpp](https://github.com/ggml-org/llama.cpp) binary inside the Linux guest, verify one text model, run two prompts, and save the results. - -The tested setup used [Siemens Innexis ANA](https://www.siemens.com/en-gb/products/ic/hav/innexis/architecture-native-acceleration/) 2026.02 on a g4 chamber with the supplied Zena CSS virtual platform and EWAOL v2.1.0 (`styhead`) Linux 6.6.54 image. The CPU and memory settings were unchanged: ANA showed **Simulation CPUs: 4**, while Linux reported **16 online CPUs** (`0-15`) and about 8 GB of guest memory. The ANA simulation setting is separate from the CPU count visible inside Linux. - -The final result is a record of the guest environment, source and model identities, commands, generated text, and exit status. It shows that this workload can run in the selected virtual platform. It does not assess the quality of the answers or predict performance on a physical SoC. - -The [Zena CSS onboarding Learning Path](../innexis_ana_zena/) establishes the virtual platform, Linux access, and file exchange used here. Complete that workflow first, or obtain an equivalent working guest from your chamber administrator. You do not need to deploy ANA or rebuild the Zena firmware for this exercise. - -The commands on the following pages run inside the **Primary Compute Linux guest** unless a step says otherwise. Keep one guest shell open across the pages because it holds the paths you choose for the build, model, and result files. +--- \ No newline at end of file From 25d8ff4e9d5f49051f3f67fa0cfd73d130acc531 Mon Sep 17 00:00:00 2001 From: Jason Andrews Date: Fri, 6 Nov 2026 09:53:40 -0600 Subject: [PATCH 3/3] Update _index.md draft --- .../automotive/innexis_zena_llamacpp/_index.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md b/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md index 655359c4e6..f5960fb862 100644 --- a/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md +++ b/content/learning-paths/automotive/innexis_zena_llamacpp/_index.md @@ -1,5 +1,10 @@ --- title: Run Local LLM Inference with llama.cpp on Arm Zena CSS + +draft: true +cascade: + draft: true + description: Build llama.cpp in a Zena CSS Linux guest, verify a text model, and run two recorded CPU inference requests. minutes_to_complete: 60 @@ -51,4 +56,4 @@ further_reading: weight: 1 layout: learningpathall learning_path_main_page: "yes" ---- \ No newline at end of file +---