halogen-flash-server README

项目的 README,来自 github.com/peonist-ai/halogen-flash-server。合并为一个 markdown 文件:README.md。

halogen-flash

halogen-flash-server

halogen™ is the fastest way to run Qwen3.8-Flash-Next on AMD Strix Halo, and it is built for agents: deep into a long session, each turn starts answering in about 1.2 seconds.

Every kernel is written for this one GPU and this one model family. No general-purpose runtime, no portability layer, no fallback path. That is why it can do things a general engine cannot, and why it runs on exactly one piece of silicon.

0.20.7, the default configuration halogen-flash
decode 100 tok/s writing code · 70 prose
prefill: 8,192 / 32,768 / 131,072-token prompt 1,983 / 1,876 / 1,796 tok/s
an agent turn, 30,000 to 96,000 tokens of context 2.1 s (first token in 1.2 s)
the first turn of a 34,000-token agent prompt, cold 19 s
decode: editing code / an agent's tool call / six other languages 121 / 88 / 67 tok/s

What each row is. The agent turns are three sessions of a coding agent fixing a bug in a Python repository: each turn sends the whole conversation back with the model's last tool call and a tool result of 800 to 3,000 tokens appended, and the time runs from the request to the last byte of the answer, on the client's clock (the median over the three sessions, about 85 tokens of answer each). Decode is measured on the kind of text each row names. Prefill is the image's own sweep, on a synthetic prompt; real text through the chat template runs slower, which is why the cold first turn takes 19 s for 34,000 tokens.

All of it is the published 0.20.7 image at its defaults (the v2 checkpoint, the prompt cache on, greedy, thinking off) on an AMD Ryzen AI Max+ 395 with 128 GB, at about 85 W of sustained package power. Measured has every number for both checkpoints. The prefill rows, and a decode mean over ten prompt shapes, reproduce with one command from the image (how); the agent turns and the decode by kind of text are measured from the client side, over the same OpenAI-compatible API you use. Prefill barely decays with depth: 131,072 tokens run at 96% of the 32,768 rate.

Precision: 4.16 bpw across the trunk, the experts and the draft head of the default checkpoint (v2), or 5.25 bpw across all 179.55B parameters with the FP8 n-gram lookup table counted in. Both are measured from the files rather than quoted from a format name. docs/QUANT.md gives the breakdown by tensor family, so it can be checked with arithmetic rather than taken on trust.

At temperature 0, output is byte-identical to serial greedy decode. Speculation here is a pure speed optimization, verified on every release, not a quality trade. Since 0.6.0 there are two draft sources, the model's own draft head and the request's own text (prompt lookup), and the guarantee covers both.

Qwen3.8-27B runs in the same image: put qwen38-27b-ht4.hgn (12.8 GiB) in your models folder and name it with HALOGEN_CHECKPOINT. Decode 37.9 tok/s on one request with drafting (15.1 without), prefill 578 / 605 / 530 tok/s at 2,048 / 8,192 / 32,768 tokens, measured on the published image at its defaults on three machines, the mean (see Measured). Images and LoRA adapters work on it too; the Qwen3.8-27B page has the files and the setup.

0.21.0: Qwen3.8-27B now runs in the same image as Qwen3.8-Flash-Next, with image input and LoRA adapters; name its checkpoint and the server serves it. Flash-Next is unchanged (CHANGELOG).

Since 0.7.0 the engine also opens a llama.cpp GGUF of this model directly: point it at the file you already have (unsloth's UD-IQ4_XS, say) and it runs on these kernels, with the same speculation and the same identity guarantee, and no conversion step. See Bring your own GGUF for which files, and for the numbers.

There is a Discord for questions, for numbers from your own box, and for comparing setups. Bugs and regressions go to issues, where the changelog can credit them. See Community.


Documentation

The full documentation is the docs/ tree, one page per task. It is also hosted with search at peonist-ai.github.io/halogen-flash-server. For an AI agent: llms.txt maps every page in one fetch, and AGENTS.md is the short playbook for deploying, driving or debugging the server.

Quickstart first run on a Strix Halo box, weights included
Give it a machine of its own what the server holds; recipes if you must share it
API reference every endpoint, conventions, status codes
Clients Codex (Responses API) · Claude Code (Messages API) · agent harnesses · sessions: keep, fork, join
Requests sampling · images · token budgets · as a classifier · agent guard (preview)
Configuration cache modes, the KV pool, disk cache, 1M context, attention budget, API key, request records
Checkpoints precision · bring your own GGUF · measuring a checkpoint · QUANT.md
Numbers measured · quality: what is measured, and what is not
NPU small models on the NPU · host details
Troubleshooting will not start, hangs at pool reservation, crawls on long prompts, Fedora/SELinux, the host settings measured on
Reference every flag · classify endpoint · what this release is not

Quickstart

mkdir -p ~/halogen-models
podman run --rm -p 8731:8731 \
  --device /dev/kfd --device /dev/dri --group-add keep-groups \
  --ipc=host --ulimit memlock=-1:-1 \
  -e HALOGEN_DOWNLOAD=peonist-ai/halogen-qwen3.8-flash-next \
  -v ~/halogen-models:/models \
  ghcr.io/peonist-ai/halogen-flash-server:0.21.0

The weights come from peonist-ai/halogen-qwen3.8-flash-next on Hugging Face; each NPU model's repository is listed on the NPU page.

One condition first: set the BIOS carve-out (UMA frame buffer) to its minimum, not Auto: this engine wants host RAM, not dedicated VRAM. The Quickstart covers that, Docker, the compose file, and upgrading from an older checkpoint.

Flint preview

A separate image serves RecursiveSI's Flint (40B mixture-of-experts, about 2B active, Apache-2.0) as a preview; :latest above is unchanged. On first start it downloads the int4 weights (about 21 GB) into ~/halogen-models and checks them against the tested revision:

podman run --rm -p 8731:8731 \
  --device /dev/kfd --device /dev/dri --group-add keep-groups \
  --ipc=host --ulimit memlock=-1:-1 \
  -e HALOGEN_SERVE_MODEL=flint \
  -v ~/halogen-models:/models \
  ghcr.io/peonist-ai/halogen-flash-server:0.18.14-flint-preview

The preview image is built from 0.18.14 and does not carry later fixes.

It is a preview: prefill slows past roughly 80-90k tokens of context, and speculative decoding is opt-in (HALOGEN_FLINT_SPEC=1) and greedy-only. Speeds, options and limits: Flint preview.

Inkling-2-Mini preview

A separate image tag serves Thinking Machines Lab's Inkling-2-Mini (Apache-2.0, with the model's Acceptable Use Policy) as a preview, with image input and the model's full 1,048,576-token context; :latest above is unchanged. Download the converted weights (about 19 GB), then start it:

hf download peonist-ai/halogen-inkling-2-mini --local-dir ~/halogen-models

podman run --rm -p 8731:8731 \
  --device /dev/kfd --device /dev/dri --group-add keep-groups \
  --security-opt seccomp=unconfined --ipc=host --ulimit memlock=-1:-1 \
  -v ~/halogen-models:/models:ro \
  ghcr.io/peonist-ai/halogen-flash-server:0.20.7-inkling-preview

It is a preview: no generative benchmark was run on it, it serves /v1/chat/completions and /v1/models only, and stop strings, logprobs and the penalties are refused for now. Speeds, options and limits: Inkling-2-Mini preview.


Community


License

The engine is distributed under the terms in LICENSE.md. Third-party components and their licenses are listed in THIRD-PARTY-NOTICES.md. Model weights are licensed separately by their original authors.

"halogen" and "Peonist" are trademarks of Peonist, LLC (U.S. application pending). TRADEMARKS.md says how the names may be used; referring to the project, running it, and publishing numbers about it need no permission.

halogen-flash-server (peonist-ai/halogen-flash-server)

正在搜索数据库…

这是什么?halogen-flash-server 是一个专门构建的推理服务器,用于让 Qwen3.8-Flash-Next 模型在 AMD 的 Strix Halo(gfx1151)GPU 上尽可能快地运行,并对外提供兼容 OpenAI 的 API。
这是一个通用 LLM 运行时,还是为某个特定配置打造的?它的构建范围非常窄:每个内核都精确针对这款 GPU 和这个模型系列,没有可移植层,也没有回退到其他硬件的路径。
怎么让它跑起来?通过提供的 docker-compose 配置启动;首次运行时会自动下载 118 GiB 的模型权重,然后在 8731 端口提供兼容 OpenAI 的端点。
我需要用 Docker 还是 Podman?这有影响吗?两者都可以,但组参数不同:Podman 使用 --group-add keep-groups,而 Docker 需要 --group-add video --group-add render,因为 keep-groups 是 Podman 独有的扩展。
它能在任何 AMD GPU 上运行,还是只能在 Strix Halo 芯片上?只能在 Strix Halo(gfx1151)上运行——内核是为这款芯片手工编写的,因此它无法在其他 GPU 或其他模型系列上充当通用引擎。
初次下载之后还需要联网吗?不需要——权重落到磁盘后,容器完全不会发起任何出站连接,除非你显式设置 HALOGENDOWNLOAD 来重新获取更新后的质量 sidecar 文件。
在这类硬件上,halogen-flash 比其他引擎快多少?对一个 32K token 的提示词,它完成预填充和解码总共只需约 29 秒,而已公开的最快替代方案(EngramHalo.cpp、ROCmFP4、CIRU-IU4)大约需要 110-155 秒——端到端约快 4 倍,主要来自更快的预填充。
我可以用自己的 GGUF 文件代替内置权重吗?可以。从 0.7.0 版本起,引擎可以直接打开同一模型的 llama.cpp GGUF 文件(例如 unsloth 的 UD-IQ4XS),并在相同内核上运行,具有相同的推测解码和输出一致性保证。
与普通贪婪解码相比,推测解码会改变输出吗?不会——在 temperature 为 0 时,即使开启推测解码,输出也与串行贪婪解码逐字节一致;这是纯粹的速度优化,每次发布都会验证,不是以质量为代价。
它能读取图像吗?准确度如何?图像输入需要通过 HALOGENVISIONTOWER 设置显式开启。12pt 及以上的文字可以精确读取,即使低于该阈值,大多数误读也只是偏差一到三个字符,而不是整个字段完全读错。
大小
3.5 MB
星标
1.4K
更新
提交Nov 18
时长
3个月
提交 · 90 天