AWS Graviton5 (192C DDR5-8800 KleidiAI) MoE & Zellige BasinKV 256K Bounded-VRAM Launcher (launch-graviton5-kleidiai-and-basinkv-256k.sh)
Audits Armv9 Neoverse-V3 SVE2/BF16/i8mm + 4-chiplet NUMA topology on AWS Graviton5 (r9g/m9g/c9gn) for pure-CPU KleidiAI MoE serving, or enables Zellige BasinKV (2,048-token GPU working set + WHT-INT4/INT8 pinned RAM prefetch) across vLLM V1, SGLang, and llama.cpp b12931.
AWS Graviton5 (192C DDR5-8800 KleidiAI) MoE & Zellige BasinKV 256K Bounded-VRAM Launcher
Audits Armv9 Neoverse-V3 SVE2/BF16/i8mm + 4-chiplet NUMA topology on AWS Graviton5 (r9g/m9g/c9gn) for pure-CPU KleidiAI MoE serving, or enables Zellige BasinKV (2,048-token GPU working set + WHT-INT4/INT8 pinned RAM prefetch) across vLLM V1, SGLang, and llama.cpp b12931.
#!/usr/bin/env bash
# Tinker AI — AWS Graviton5 (DDR5-8800 KleidiAI) + Zellige BasinKV Bounded Sparse KV Offload (Guide #78)
set -euo pipefail
MODE="sys_audit"
MODEL="Qwen/Qwen3.6-35B-A3B-Instruct-AWQ"
CODEC="wht_int4"
GPU_WIN="2048"
if [ "$MODE" = "sys_audit" ]; then
echo "=== [1/3] Armv9 Neoverse-V3 (SVE2 / BF16 / i8mm) & 4-Chiplet NUMA Topology Check ==="
uname -m && (lscpu 2>/dev/null | grep -E "Model name|CPU\(s\)|NUMA|Flags" | head -n 10 || true)
numactl --hardware 2>/dev/null || echo "Info: Install numactl to verify 4-chiplet memory interleaving on Graviton5."
echo "=== [2/3] Pinned Host Memory Limit (ulimit -l) for BasinKV Zero-Copy Prefetch ==="
echo "Locked memory limit (KB): $(ulimit -l)"
echo "=== [3/3] PCIe Link Width/Speed Check for Host-to-GPU KV Lookahead Prefetch ==="
nvidia-smi --query-gpu=name,pcie.link.gen.current,pcie.link.width.current,memory.total --format=csv 2>/dev/null || true
exit 0
elif [ "$MODE" = "graviton5_kleidiai_moe" ]; then
echo "=== [AWS Graviton5 192-Core DDR5-8800 (>800 GB/s) KleidiAI Sparse MoE Server] ==="
# Interleave across all 4 Neoverse-V3 chiplets (12 DDR5-8800 channels) & cap threads to avoid barrier contention
THREADS="${OMP_NUM_THREADS:-160}"
exec numactl --interleave=all llama-server \
-m "$MODEL" \
-t "$THREADS" \
-c 65536 -fa on -ctk q8_0 -ctv q8_0 \
--mlock --host 127.0.0.1 --port 8080
elif [ "$MODE" = "basinkv_vllm_256k" ]; then
echo "=== [Zellige BasinKV + vLLM V1 · Bounded $GPU_WIN-Token GPU Set + $CODEC Host RAM Offload @ 256K] ==="
export BASINKV_ENABLE=1
export BASINKV_GPU_BUDGET_TOKENS="$GPU_WIN"
export BASINKV_HOST_CODEC="$CODEC"
export BASINKV_PREFETCH_STREAM=1
exec vllm serve "$MODEL" \
--max-model-len 262144 \
--gpu-memory-utilization 0.90 \
--host 127.0.0.1 --port 8000
elif [ "$MODE" = "basinkv_llamacpp_256k" ]; then
echo "=== [Zellige BasinKV + llama.cpp b12931 · Bounded Sparse KV Offload @ 256K] ==="
export BASINKV_ENABLE=1
export BASINKV_GPU_BUDGET_TOKENS="$GPU_WIN"
export BASINKV_HOST_CODEC="$CODEC"
exec llama-server \
-m "$MODEL" \
-ngl 99 -c 262144 -fa on \
--host 127.0.0.1 --port 8080
else
echo "Unknown RUN_MODE=$MODE" >&2
exit 1
fi
Customizable Parameter Reference for launch-graviton5-kleidiai-and-basinkv-256k.sh
This SHELL artifact exposes 4 template variables compiled client-side in your browser.
| Template Token | Parameter Description | Verified Default | Example Format |
|---|---|---|---|
{{RUN_MODE}} | Mode (sys_audit | graviton5_kleidiai_moe | basinkv_vllm_256k | basinkv_llamacpp_256k) | sys_audit | sys_audit |
{{TARGET_MODEL}} | Model Path or HF Repo (e.g. Qwen/Qwen3.6-35B-A3B-Instruct or GGUF path) | Qwen/Qwen3.6-35B-A3B-Instruct-AWQ | Qwen/Qwen3.6-35B-A3B-Instruct-AWQ |
{{BASINKV_CODEC}} | BasinKV Offload Precision (wht_int4 | int8 | bf16) | wht_int4 | wht_int4 |
{{GPU_WINDOW_TOKENS}} | BasinKV Bounded GPU Working Set (Tokens/Head) | 2048 | 2048 |
Verified Environment for "Dec 2026 >800 GB/s Arm CPU MoE & Cross-Engine Bounded-VRAM KV Offload: AWS Graviton5 (R9g 1.5TB / M9g / C9gn · 192 Neoverse-V3 Cores · 12-Ch DDR5-8800) vs Zellige BasinKV (2,048-Token GPU Set + WHT-INT4 Prefetch on vLLM, SGLang & llama.cpp b12931)"
AWS EC2 Graviton5 r9g.48xlarge (192 Neoverse-V3 vCPUs · 1,536 GiB DDR5-8800 · >800 GB/s) / m9g.48xlarge (768 GiB) / c9gn (600 Gbps Nitro v7), Single 24GB NVIDIA GPU (L4 / RTX 4090 / PRO 4000 SFF) + 64GB Host DDR5
BasinKV operates purely as a local GPU-to-Host-RAM/NVMe memory manager with zero external network calls; on AWS Graviton5, Nitro v7’s formally verified Nitro Isolation Engine mathematically isolates guest memory and CPU register state.
- Spawning all 192 threads without
--interleave=allon Graviton5’s 4-chiplet Neoverse-V3 topology hits cross-chiplet barrier overhead; 144–160 threads interleaved across all 4 NUMA nodes yields peak decode. - BasinKV’s
WHT-INT4host codec requiresulimit -l unlimited(pinnedmlockhost RAM) and PCIe Gen4/Gen5 x16 bandwidth; on x4 risers or swappable unpinned RAM, lookahead prefetch stalls decode.
3-Step Verification Checklist After Deploying launch-graviton5-kleidiai-and-basinkv-256k.sh
- Verified
sve2,bf16, andi8mmflags plusnumactl --interleave=all(144–160 threads) across all 4 Neoverse-V3 chiplets on Graviton5. - Set
ulimit -l unlimitedfor pinned host RAM and confirmed PCIe Gen4/Gen5 x16 link speed before enablingBASINKV_ENABLE=1. - Selected
wht_int4for general 256K coding/agent loops on 32GB–64GB host RAM, orint8for strict exact-ID financial/legal needle retrieval.