TinkerLab
ARTIFACT // LAUNCH-GRAVITON5-KLEIDIAI-AND-BASINKV-256K.SH (SHELL)

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.

[KEY VERIFIED TAKEAWAY / TL;DR]This reproducible configuration artifact "AWS Graviton5 (192C DDR5-8800 KleidiAI) MoE & Zellige BasinKV 256K Bounded-VRAM Launcher" (launch-graviton5-kleidiai-and-basinkv-256k.sh, SHELL) is paired with Tinker AI Lab's hardware-verified guide "aws-graviton5-r9g-ddr5-8800-cpu-moe-and-basinkv-sparse-kv-offload-vllm-sglang-llamacpp". It exposes 4 customizable browser variables (RUN_MODE=sys_audit, TARGET_MODEL=Qwen/Qwen3.6-35B-A3B-Instruct-AWQ, BASINKV_CODEC=wht_int4, GPU_WINDOW_TOKENS=2048) with loopback-first security defaults.
01 // HOMELABLocal AI / HomeLab· Verified: 2026-12-03
Browse All 82 Artifacts →
launch-graviton5-kleidiai-and-basinkv-256k.sh

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.

View Paired Guide →
Customizable Variables (Saved in Browser)
UTF-8 Encoded · Live Client-Side Compilation
#!/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
PARAMETER SPECIFICATION // 参数化变量规范说明表

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 TokenParameter DescriptionVerified DefaultExample Format
{{RUN_MODE}}Mode (sys_audit | graviton5_kleidiai_moe | basinkv_vllm_256k | basinkv_llamacpp_256k)sys_auditsys_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-AWQQwen/Qwen3.6-35B-A3B-Instruct-AWQ
{{BASINKV_CODEC}}BasinKV Offload Precision (wht_int4 | int8 | bf16)wht_int4wht_int4
{{GPU_WINDOW_TOKENS}}BasinKV Bounded GPU Working Set (Tokens/Head)20482048
PAIRED HARDWARE MANIFEST // 配套实测环境与边界记录

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)"

Tested Hardware & OS

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

Pinned Stack & Model Versions
Zellige BasinKV (zellige-ai/basinkv · Dec 2, 2026 · WHT-INT4 / INT8 / BF16)vLLM V1 / SGLang / llama.cpp b12931 (Arm KleidiAI i8mm + BF16 + RPC control)AWS Graviton5 Armv9 Neoverse-V3 (Linux 6.18+ numactl 4-chiplet interleave + Nitro v7 NIE)
Offline Boundary (100% self-hosted weights & KV cache in private RAM/NVMe (formally verified Nitro Isolation Engine on EC2 or air-gapped local 24GB rig))

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.

Known Operational Limits & Failure Modes
  • Spawning all 192 threads without --interleave=all on 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-INT4 host codec requires ulimit -l unlimited (pinned mlock host RAM) and PCIe Gen4/Gen5 x16 bandwidth; on x4 risers or swappable unpinned RAM, lookahead prefetch stalls decode.
DEPLOYMENT CHECKLIST // 配置落地核验步骤

3-Step Verification Checklist After Deploying launch-graviton5-kleidiai-and-basinkv-256k.sh

  1. Verified sve2, bf16, and i8mm flags plus numactl --interleave=all (144–160 threads) across all 4 Neoverse-V3 chiplets on Graviton5.
  2. Set ulimit -l unlimited for pinned host RAM and confirmed PCIe Gen4/Gen5 x16 link speed before enabling BASINKV_ENABLE=1.
  3. Selected wht_int4 for general 256K coding/agent loops on 32GB–64GB host RAM, or int8 for strict exact-ID financial/legal needle retrieval.