Skip to main content

Amber logo

CI PyPI Python 3.11+ MIT License

Amber

On-demand, continuously hardening custom LLM inference engines.

What this project is about

Amber is a framework for agents to build custom inference engines that perfectly fit YOUR hardware and YOUR workload.

When inference was tied to dozens of engineering hours, the most optimal path was for the community to all work on a shared inference engine that would serve everyone. Although this is a heroic effort, it results in an accumulation of edge cases as user environments grow. The idea behind Amber, inspired by Resin and Together Compiler, is that agents can now build AND continuously adapt an inference engine based on your hardware and your workload characteristics, using any agent you wish.

How this project works

Amber contains zero hardcoded model architectures or kernels. Instead, the engine will be built by your agents via two components: the CLI and the Daemon.

The daemon is the custom inference engine that runs on your GPU host, exposes your model via an OpenAI-compatible API, and accepts 'model packages' from your agents, which change the underlying kernels of your engine. It can then hot-reload these packages in less than a second and promote packages that are verified performance wins atomically. It also holds an internal message board for multiple agents to coordinate improvements.

The CLI is what each agent uses client-side to communicate with the daemon. Through the CLI, they can check baseline latency, target weights, committed stack, CUDA kernel profile of active incumbent, evaluate and submit changes, and access the message board to coordinate with other agents.

flowchart LR
    Agents["Coding Agent(s)<br/>Claude Code · Codex · Amp"]
    Clients["Clients<br/>OpenAI SDK · curl"]

    subgraph Control["amberd Control (:8765)"]
        direction LR
        Reload["Two-Tier Reload<br/>fast · structural"] --> Verify["CorpusNLLVerifier<br/>prefill + decode · parity<br/>immutable S0"] --> Board["Agent Board<br/>notes · base_hash"]
    end

    subgraph Serving["amberd Serving (:8000)"]
        direction LR
        API["OpenAI API<br/>/v1/completions<br/>/v1/chat/completions"] --> Tele["Telemetry<br/>traffic drift"]
    end

    Agents -->|"amber CLI"| Reload
    Board -.->|"promote"| API
    Tele -.->|"retarget"| Control
    Clients -->|"HTTP"| API

Quickstart

Install Amber:

# Client CLI only (zero dependencies, no PyTorch required)
pip install amberlib

# GPU / model host running amberd
pip install "amberlib[torch]"

Start the daemon (listens on :8765 control / :8000 serving by default):

amberd

In a second terminal, deploy the included examples/tiny_lm induction-head Transformer, watch CorpusNLLVerifier reject a vocab-tail bug and accept a clean vectorized speedup, then promote and emit:

amber deploy examples/tiny_lm
amber pull /tmp/work_tiny

# Fast-but-buggy candidate (corrupts one tail logit) -> REJECTED_NUMERICS
cp examples/tiny_lm/candidates/buggy_tail/kernels.py /tmp/work_tiny/kernels.py
amber eval --files /tmp/work_tiny/kernels.py --name buggy_tail --summary

# Clean vectorized candidate -> ACCEPTED (~45% faster, 0.0000 delta-NLL)
cp examples/tiny_lm/candidates/fast_fused/kernels.py /tmp/work_tiny/kernels.py
amber eval --files /tmp/work_tiny/kernels.py --name fast_fused --summary

amber board --summary
amber promote
amber emit /tmp/emitted_tiny_lm

# Run the emitted standalone engine with zero Amber dependency
python /tmp/emitted_tiny_lm/run.py --prompt-ids 5,7,9,11,5,7 --max-tokens 6

Agent Skill

Amber ships an open Agent Skill at skills/amber/SKILL.md that teaches Claude Code, Codex, Amp, Cursor, OpenCode, and other coding agents how to deploy, profile, optimize, and collaborate on a live amberd instance.

Install it into your coding agent via npx skills:

npx skills add ajac-zero/amber

Or run it once without installing:

npx skills use ajac-zero/amber@amber --agent claude-code

Once installed, point your agent at AMBER_URL=http://<gpu-host>:8765 and let it iterate through amber profile, amber pull, amber eval, amber board, and amber promote.

CLI Overview

amber info                                          # GPU, runtime versions, active deployment, drift
amber status                                        # baseline/incumbent latency, target weights, committed stack
amber telemetry                                     # live serving CTXxBATCH histogram + L1/TV drift score
amber target --from-telemetry                       # lock target weights to live serving traffic
amber target --shapes 4096x16:0.8,512x16:0.2        # or lock target to an explicit batch workload
amber profile --key 1024x4 --top 15                 # CUDA kernel profile of active incumbent
amber pull ./work                                   # download winning files + .amber_base (source_hash)
amber eval --files ./work/kernels.py --name my_opt  # evaluate (JSON on stdout, compact summary on stderr)
amber eval --files ./work/kernels.py --name x --summary  # compact verdict summary only
amber board --summary                               # compact history with timings, NLL, parity, failure reasons
amber notes / amber post --kind claim "..."         # multi-agent coordination board
amber promote / amber rollback / amber restart      # live serving lifecycle
amber verify-bench --cmd "python bench.py"          # outer benchmark against AMBER_SERVE_URL
amber emit ./dist/my_engine                         # export standalone runnable package (includes run.py)

Scope & Current Limitations

Amber is intentionally narrow and honest about what it does and does not do today:

  • Single-GPU focus: No multi-GPU tensor/pipeline parallelism orchestration yet.
  • Serving concurrency: :8000 serves requests through the deployed package's generate() (single-request unless your package wraps a continuous-batching engine).
  • Single-step timing: Timing measures ms/step per (ctx, batch) shape, not effective ms/committed_token for speculative decoding (MTP/EAGLE).
  • Python package slots: Editable tracked files are loader.py, model.py, kernels.py (agents can still compile inline CUDA via torch.utils.cpp_extension.load_inline, but standalone .cu files are not tracked as separate slots yet).

Development

Amber uses uv, ruff, ty, and pytest.

# Editable install with PyTorch + dev tools
uv venv && uv pip install -e ".[torch]" pytest ruff ty

# Lint & format check
uvx ruff check src tests examples
uvx ruff format --check src tests examples

# Static type check
uvx ty check --python .venv/bin/python src tests examples

# Zero-dependency stdlib tests (verifies amber CLI/daemon without torch)
python3 -m unittest tests/test_amber_v2.py -v

# Full test suite (CorpusNLLVerifier + daemon + examples/tiny_lm)
pytest tests/ -v

# Build sdist and wheel
uv build

All four checks run automatically in GitHub Actions CI and are required on pull requests.

Credits

  • Resin — open-source LLM inference runtime that inspired Amber's printed-engine architecture.
  • Together Compiler (TKCC) — Abhyankar et al. (2026), Together Compiler: Continual Compilation for AI Inference, which inspired the tiered persistent engine and continual agent-compilation loop.

License

MIT — see LICENSE.

Metadata

Release files for amberlib 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amberlib 0.1.0
File Size Uploaded Provenance Actions
amberlib-0.1.0.tar.gz 78.5 kB With provenance Details for amberlib-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amberlib 0.1.0
File Interpreter ABI Platform Actions
amberlib-0.1.0-py3-none-any.whl Python 3 none any Details for amberlib-0.1.0-py3-none-any.whl

Total release size: 145.8 kB

Release files / amberlib-0.1.0.tar.gz

Download URL amberlib-0.1.0.tar.gz
Size 78.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ea94f3c2a553792634b0baccb4a44bb63c28fb1cf7bc331e6c7f1a15208cc868
BLAKE2b-256 checksum
How to use checksums
ea50bb219ce4287c6927941df9f2fd3aebd6c58b6d37bc675cf81725b6eb1648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / amberlib-0.1.0-py3-none-any.whl

Download URL amberlib-0.1.0-py3-none-any.whl
Size 67.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcc09120278c06d88239125f03ed1407b20ff04744802c3f3da76672f31840b3
BLAKE2b-256 checksum
How to use checksums
a85278c78698969e86a7302bec0173fc3a31617da084b821404abb1e68565922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for amberlib 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for amberlib-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page