MCPcopy Create free account
hub / github.com/Avarok-Cybersecurity/atlas

github.com/Avarok-Cybersecurity/atlas @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
7,896 symbols 31,024 edges 1,027 files ⚖ custom 2,841 documented · 36% ● updated 10d agob470 · 2026-09-24★ 737141 open issues

Browse by type

⨍ Functions 7,049◇ Types & classes 847
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Atlas Cybernetics Corp

Pure Rust LLM inference, from the device in your hand to the datacenter rack.

Website · Docs · Blog · Discord · Deployment Guide

NVIDIA supported AMD supported License: AGPL-3.0 Pure Rust runtime Docker Hub: avarok/atlas-gb10 Discord member count

Terminal demo of Atlas serving a model on a DGX Spark — click for the full-quality MP4

Atlas is an open-source LLM inference engine written in pure Rust and CUDA. It serves an OpenAI-compatible server (plus Anthropic and Responses APIs) from a single ~75 MB binary — no Python, no PyTorch, no runtime compilation — with hand-tuned CUDA kernels per (hardware × model × quantization) target, NVFP4 and FP8 quantization, speculative decoding (MTP draft heads and DFlash block diffusion), radix-tree prefix caching, and expert parallelism across nodes. It is verified today on the NVIDIA DGX Spark (GB10, Blackwell SM121), compiles the same CUDA source for AMD Strix Halo (gfx1151) through SCALE, and on the published GB10 concurrency ladder it out-serves vLLM at every rung from C=1 to C=128 — conditions below.

Receipts, not adjectives:


📑 Table of Contents


🚀 Quick Start

One command

curl -fsSL https://atlascybernetics.ai/install.sh | sh
atlasctl run qwen3.6-35b-a3b-fp8-mtp

The script downloads a prebuilt atlasctl, verifies its checksum, and installs it to ~/.local/bin — no Python, no Rust toolchain. Prefer not to pipe curl into a shell? cargo install atlasctl does the same from source. Every runnable model maps to a recipe in atlas-recipes, so the catalogue cannot list a model we do not ship.

Docker

The whole supported model matrix lives in one image. Pull it, mount your HuggingFace cache, and point serve at any model ID from the model table.

[!TIP] The recipes below are tuned for maximum accuracy under agentic-coding workloads — 64K context, BF16 MTP draft head (highest acceptance rate ⇒ highest end-to-end throughput), prefix caching for multi-turn tool loops, and FP8 KV cache with auto-promoted boundary layers. These are the exact configurations we use to drive opencode / Claude Code / Cline through Atlas on a single Spark.

Recipe 0 — no flags, pick a model in the TUI

Omit the model ID and serve boots into the Library — pick a model and recipe interactively (TTY only):

docker run -it --rm --network host --gpus all --ipc=host \
  -v "${HOME}/.cache/huggingface:/root/.cache/huggingface" \
  -v "${HOME}/.avarok:/root/.avarok" \
  avarok/atlas-gb10:latest serve
  • -it — the TUI needs a real terminal to render (and Esc to quit).
  • --rm — throwaway container; nothing to clean up after the session.
  • --network host — the served port is reachable on localhost directly, no -p mapping.
  • --gpus all — hands the GB10 to the container.
  • --ipc=host — host-sized shared memory; the Docker default 64 MB /dev/shm is too small for CUDA.
  • -v ~/.cache/huggingface — reuse the host's model cache instead of re-downloading weights.
  • -v ~/.avarok — persist Atlas state (recipes, benchmark records, artifacts) across runs.

Recipe A — Qwen3.6-35B-A3B (FP8 hybrid MoE, the daily driver)

35 B params, 3 B active, GDN + attention + 256-expert MoE, MRoPE-positioned vision tower (text-only here).

docker pull avarok/atlas-gb10:latest

sudo docker run -d --name atlas \
  --network host --gpus all --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  avarok/atlas-gb10:latest \
  serve Qwen/Qwen3.6-35B-A3B-FP8 \
    --port 8888 \
    --max-seq-len 65536 \
    --kv-cache-dtype fp8 \
    --kv-high-precision-layers auto \
    --gpu-memory-utilization 0.90 \
    --scheduling-policy slai \
    --enable-prefix-caching \
    --speculative \
    --num-drafts 2 \
    --tool-call-parser qwen3_coder

Why these flags:

  • --max-seq-len 65536 — 64K window for long agent traces, file reads, multi-step tool use.
  • --kv-cache-dtype fp8 --kv-high-precision-layers auto — half the memory of BF16, no measurable quality loss; the boundary attention blocks stay BF16, where the routing distribution is most sensitive. auto is not a heuristic — it is a fixed alias for 2 (serve_phases/kv_cache.rs), alongside max/all meaning "every attention layer". Because it is non-zero it also suppresses the per-dtype automatic promotion that 0 would trigger under a turbo* KV dtype.
  • --scheduling-policy slai — SLAi scheduler. Not the default — serve defaults to fifo, so this flag has to be passed to get SLO-aware ordering. It reorders concurrent sequences to keep MTP verify batches dense and prefills shortest-prompt-first.
  • --enable-prefix-caching — radix-tree prefix cache; tool-use sessions reuse the system prompt + tool-defs + earlier turns.
  • --speculative --num-drafts 2 — MTP draft head proposes 2 tokens per step. No --mtp-quantization flag ⇒ defaults to BF16, which gives the highest acceptance rate (lossier MTP projections lower acceptance and usually worsen end-to-end tok/s, despite the faster draft forward).
  • --tool-call-parser qwen3_coder — explicit Qwen XML tool format. Atlas auto-resolves the right parser from tool_defaults.toml per model; pass it anyway in production scripts.

Recipe B — Qwen3.5-35B-A3B (NVFP4, ~131 tok/s with MTP K=2)

The fastest model in the matrix on a single Spark.

sudo docker run -d --name atlas \
  --network host --gpus all --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  avarok/atlas-gb10:latest \
  serve Sehyo/Qwen3.5-35B-A3B-NVFP4 \
    --port 8888 \
    --max-seq-len 65536 \
    --kv-cache-dtype fp8 \
    --kv-high-precision-layers auto \
    --gpu-memory-utilization 0.90 \
    --scheduling-policy slai \
    --enable-prefix-caching \
    --speculative \
    --tool-call-parser qwen3_coder

--num-drafts is omitted so it defaults to 1, i.e. MTP K=2 (the CLI defines --num-drafts 1 as K=2, 2 as K=3). K=2 is the measured-fastest verify width for this model; K=3 is slower.

Recipe C — Qwen3.5-122B-A10B (NVFP4, single Spark)

The 122B NVFP4 weights + Atlas runtime overhead leave only ~2 GB for KV cache on a 119.7 GB GB10, so this recipe sacrifices --speculative (the MTP draft head + draft KV costs ~1.5 GB) to keep a real 16 K context window. Verified end-to-end: model loads, /v1/chat/completions answers correctly, 4-way concurrent serves cleanly.

sudo docker run -d --name atlas \
  --network host --gpus all --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  avarok/atlas-gb10:latest \
  serve Sehyo/Qwen3.5-122B-A10B-NVFP4 \
    --port 8888 \
    --max-seq-len 16384 \
    --kv-cache-dtype fp8 \
    --kv-high-precision-layers auto \
    --gpu-memory-utilization 0.92 \
    --scheduling-policy slai \
    --max-batch-size 1 \
    --max-num-seqs 4 \
    --oom-guard-mb 1024 \
    --ssm-cache-slots 0 \
    --tool-call-parser qwen3_coder

For 122B with both --speculative and a 64 K window, move to EP=2 across two Sparks (QUICKSTART.md §7). For long contexts on a single Spark, add --high-speed-swap --high-speed-swap-dir /path/on/nvme --high-speed-swap-cache-blocks-per-seq 64 — HSS keeps a rolling 1024-token KV window in HBM and streams older blocks to NVMe through an io_uring orchestrator. The container needs --security-opt seccomp=unconfined --ulimit memlock=-1 for io_uring access.

Hitting the endpoint

Atlas speaks the OpenAI, Anthropic, and Responses APIs on the same port. curl, the OpenAI SDK, Open WebUI, opencode, Cline, Claude Code — point them at port 8888:

curl http://localhost:8888/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model":"atlas",
    "messages":[{"role":"user","content":"Hello!"}],
    "max_tokens":256
  }'

Per-model recipes (vision input, video input, multi-node EP=2, single-GPU 122B with the tighter budget) live in QUICKSTART.md, and the long-form manual is at docs.atlascybernetics.ai.

[!NOTE] Video input requires ffmpeg on the host. Images need nothing extra, and animated GIF decodes in-process — but MP4/MOV, WebM and AVI (H.264, H.265, VP9, AV1) are decoded by running ffmpeg, which must be installed and enabled with --video-allow-ffmpeg. Atlas deliberately does not link a video decoder; see QUICKSTART.md for the recipe and the reasoning. Build-from-source instructions are in CONTRIBUTING.md, and the kernel build pipeline is documented in docs/ARCHITECTURE.md.

🖥️ Supported Hardware

One engine, one kernel tree per target, no generic fallbacks. Each directory under kernels/ is a hardware target with its own HARDWARE.toml:

Target Silicon Status
NVIDIA DGX Spark (kernels/gb10) GB10 Grace-Blackwell, SM121, ~120 GB unified LPDDR5X Verified. The reference platform — every release passes the serve gate here
AMD Strix Halo (kernels/strix, kernels/strix-hip) Ryzen AI Max+ 395, RDNA 3.5 iGPU, gfx1151 The same unmodified CUDA sources, recompiled for AMD via SCALE — no hand-ported kernels (strix-hip is the HIP-toolchain build variant of the same sources). AMD provided the Strix Halo desktop we brought Atlas up on and included in our MLPerf Inference v6.1 submission
Apple Silicon (kernels/metal) Metal 3.1, M2+ Early bring-up — small-model targets only
Multi-node 2× GB10 over RoCEv2 EP=2 expert parallelism shipped as recipes; a 4-node EP=4 topology exists for the 397B target

Porting to new silicon is a scoped piece of work, not an architectural change — see Adding a New Hardware Target.

📦 Supported Models

Every supported model runs off one multi-model binary; the right kernel set is selected at startup from the model's config.json. No swapping images, no rebuilding, no per-model magic — just point Atlas at a HuggingFace ID.

Family Model HuggingFace ID Params / active Architecture
Qwen3.5 Qwen3.5-27B Kbenkhaled/Qwen3.5-27B-NVFP4 27B dense Hybrid SSM + attention, dense FFN, MRoPE
Qwen3.5 Qwen3.5-35B-A3B Sehyo/Qwen3.5-35B-A3B-NVFP4 35B / 3B GDN + attention + MoE, MTP
Qwen3.5 Qwen3.5-122B-A10B Sehyo/Qwen3.5-122B-A10B-NVFP4 122B / 10B GDN + attention +

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 4,405
Method 2,644
Class 673
Enum 142
Interface 32

Languages

Rust87%
Python10%
C++2%
TypeScript1%
C1%

Modules by API surface

crates/spark-model/src/model/trait_impl/mod.rs70 symbols
crates/atlas-kernels/hip/libcuda_hip_shim.cpp55 symbols
kernels/gb10/qwen3.6-27b/nvfp4/q4k_vendor/ggml-impl.h52 symbols
crates/xgrammar/src/schema/tests_objects.rs46 symbols
crates/spark-model/src/traits/model.rs43 symbols
crates/xgrammar/src/schema/tests.rs42 symbols
crates/spark-runtime/src/buffers.rs41 symbols
crates/spark-runtime/src/kv_cache/paged_impl.rs39 symbols
crates/spark-model/src/engine/tests.rs39 symbols
crates/xgrammar/src/structural_tag/tests.rs38 symbols
bench/fp8_dgx2_drift/vllm_src/fp8.py38 symbols
bench/fp8_dgx2_drift/vllm_src/qwen3_5.py37 symbols

For agents

$ claude mcp add atlas \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page