llamAmpere

JakeATXMIT活跃维护

基于 llama.cpp 的推理分支,针对 Ampere 架构 Nvidia 显卡(尤其 RTX 3090/3090 Ti)深度优化,在长上下文场景下显著提升生成速度,并支持低显存配置跑 200K 以上上下文。

llama.cpp fork for significantly improved performance on Ampere generation Nvidia cards (especially RTX 3090 / 3090 Ti): example: 110+ tok/s over a 100K-token generation at temperature 1 for qwen3.8, supporting full 262K ctx. Supports low memory (12gb) configs for 200k+ ctx. 120+ TPS, 3300+ prefill for QFN 3.8.

v0.6.3.9发布于 2026-11-09 08:56 UTC311star +33 / 7 天38fork同步于 2026-11-11 00:00 UTC

怎么上手

由 README 提炼,执行前请确认
git clone -b v0.6.3.8 https://github.com/JakeATX/llamAmpere.git && cd llamAmpere && cmake -S . -B build-sm86 -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 -DLLAMA_BUILD_BORINGSSL=ON && cmake --build build-sm86 -j8 --target llama-server
硬件要求按 README 说明

需 NVIDIA RTX 30 系 Ampere 显卡(重点适配 3090/3090 Ti),构建需 CUDA 12 或更新工具链;小卡测试用限制到 12 GB 的 3090 配约 90 GiB 系统内存,原生 12/16 GB 卡未实测,64 GB 内存不保证可用。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

针对 RTX 30 系 Ampere 显卡优化的 llama.cpp 分支,主打 Qwen3.8 长上下文高速推理

基于 llama.cpp 的推理分支,针对 Ampere 架构 Nvidia 显卡(尤其 RTX 3090/3090 Ti)深度优化,在长上下文场景下显著提升生成速度,并支持低显存配置跑 200K 以上上下文。

核心能力

  • 针对 Ampere 架构调优的 CUDA 内核,RTX 3090/3090 Ti 上 100K 提示词生成可达 110+ tok/s
  • 内置 MTP 投机解码草稿头,默认开启 mb-MTP 加速生成
  • 支持 Flash-Next 专家分流,用 --kv-gpu-tokens 把部分上下文留在显存
  • 提供 AI+/AI4 自研权重量化格式,比 IQ4_XS-M 更接近全精度
  • 12 GB 小显存配置可跑 200K+ 上下文,采用内存受限的提示词分块

容易踩的坑

模型和草稿头需另外用 hf 工具从 Hugging Face 下载,Flash-Next 文件约 81.63 GB,要预留构建和提示词缓存空间;构建必须指定 -DCMAKE_CUDA_ARCHITECTURES=86 并装 CUDA 12+ 的 nvcc;服务默认监听 127.0.0.1:8080,旧版 AI+ 权重文件已不再兼容加载。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.6.3.9
  1. v0.6.3.102026-11-09 · 2026-11-09 19:25 UTC
    查看更新说明

    Fix: slow first token on short follow-up messages after a long conversation.

    Source-only release.

  2. v0.6.3.9最新正式版2026-11-09 · 2026-11-09 08:56 UTC

    Flash-Next on native Windows builds (MSVC + CUDA) can now keep its expert tables on the graphics card, as on Linux. Before this, on Windows every expert the card did not hold went through a slow fallback: on the contributor's machine writing ran at 0.26 tokens/s. With this change he measured 60.2 tokens/s on code and 24.4 on Chinese prose (RTX 3090 24 GB, 64 GB RAM, Windows 11).

    Thanks to huhichao (#98), who wrote the Windows port, found the causes and measured it.

    What changed (Windows only):

    • Card-side expert tables are on for Windows builds, with Windows free-RAM checks.
    • Windows refuses one kind of copy to the card that Linux accepts (a memory range that mixes locked and normal pages). Those copies now go through a small staging buffer on the same GPU stream.
    • The CPU expert split pins its threads with the Windows APIs, and Windows MoE runs now see the machine's free RAM (it used to read as 0).
    • MSVC build fixes.
    • New optional settings GGML_MOE_DEVICE_RAM_FLOOR_MIB / GGML_MOE_DEVICE_RAM_MARGIN_MIB (in MiB) replace the 7 GiB / 2 GiB free-RAM headroom. Windows counts less RAM as free than Linux, so 64 GB machines may need them; the contributor set both to 0.

    We have no Windows machine. Built and tested under MinGW/Wine; Windows speed figures are from the contributor. That build is CPU-only, so nobody has yet compiled this exact code with MSVC + CUDA. Please report on #98 if your Windows build fails or the speed differs.

    Linux is unchanged. Dense Swift 1.5 27B greedy output is identical to v0.6.3.8 (5,120 tokens, 4 of 4 runs, 100K prompt). Flash-Next AI3 starts and writes with the shipped launcher. The Linux CPU suites, README-flags check, example builds, MinGW/Wine build and tensor-split check passed.

    Release notes: docs/llamampere-v0.6.3.9/RELEASE_NOTES.md

    Source-only release.

  3. v0.6.3.82026-11-09 · 2026-11-09 02:47 UTC
    查看更新说明

    The DFlash2 drafter on dense Swift 1.5 27B now writes about 3.4 times faster. A drafter is a small helper model that guesses several words ahead; the big model checks every guess, so the text still comes from the big model, only faster.

    What was wrong: one mixing step inside the DFlash2 drafter ran twice in every layer instead of once. That spoiled its guesses, and the big model rejected almost all of them. It now runs once, as in upstream llama.cpp (5 lines removed).

    Measured on an RTX 3090 Ti at 350 W: dense Swift 1.5 27B IQ4_XS-M with a Qwen3.8-27B DFlash2 Q4_K_M drafter, 7 guesses per round, a 100K-token coding prompt, 5,120 tokens written, old and new versions run alternately:

    • temperature 1.0: 27.26 and 27.27 tokens/s before, 92.69 and 93.19 after (guesses accepted: 2.0% -> 42.0%)
    • greedy: 26.84 and 27.03 before, 102.75 and 103.93 after (2.0% -> 48.6%); all 5,120 tokens identical to v0.6.3.7 in 4 of 4 runs
    • card memory peak 20,821 MiB

    Not affected: the built-in MTP drafter, Flash-Next and the model files. Flash-Next with its default drafter was re-checked with the shipped launcher on both versions (loads, writes 5,120 tokens, peak 23,485 MiB).

    Checks passed: Linux CPU suites, README-flags check, example builds, MinGW/Wine build and tensor-split check.

    Release notes: docs/llamampere-v0.6.3.8/RELEASE_NOTES.md

    Source-only release.

  4. v0.6.3.72026-11-09 · 2026-11-09 02:19 UTC
    查看更新说明

    Maintenance release on top of v0.6.3.6. No model, format or default changes; existing files and launch commands work as before.

    Source-only release.

  5. v0.6.3.6llamAmpere v0.6.3.62026-11-08 · 2026-11-08 23:34 UTC
    查看更新说明

    Flash-Next can now run AI4, a four-bit AI+ model file (qwen3.8-flash-next-Swift1.5-ATX-AI4). This release adds native card kernels and expert-cache support for the four-bit row-scale layout (type 124). AI4 is 84.97 GiB, 2.27 GiB smaller than UD-IQ4_XS, and closer to the Swift-Q8 reference (KL divergence 0.068353 vs 0.080886 over 2,286 positions). On one RTX 3090, single-seed screens at a 100K prompt wrote 15-22% faster than Strata v0.2.12 with UD-IQ4_XS, with 5-16% slower prompt reading. On the 89 GiB test machine the server peaked at 58.6-75.3 GiB of RAM. AI4 is not recommended on 64 GB RAM machines unless you pin a large share of experts on the GPU and move backup copies out of VRAM to cut RAM use; otherwise keep using AI3.

    AI4 model file: https://huggingface.co/jakeatx/qwen3.8-flash-next-Swift1.5-ATX-AI4 All Flash-Next files: https://huggingface.co/collections/jakeatx/qwen38-flash-next-6ae148b9e743c8905b00c70d

    AI3 users can update now; AI3 behaves as before.

    Fixes:

    • Linux build failure reported in #98 (moe-iq-rows.h: "the value of 'ksigns_iq2xs' is not usable in a constant expression" with Clang and some other compilers). The sign table is now computed from a formula, checked at compile time and by a new CPU test. Thanks to francoispda for the report and the fix idea.
    • Saved prompt caches are now keyed by expert-routing settings and all GGML_ environment settings, so a cache saved under one setup is not reused under another.
    • The startup probe no longer fails when the batch size is set to 1.

    Validation:

    • Passed: Linux CPU and CUDA suites, the README-flags AVX2 check, MinGW/Wine (including the new sign-table test), and the tensor-split checks.
    • Compilers: g++ 11 and 13 and clang 22 all build this release.
    • Dense 27B: the same greedy tokens and top-10 probabilities as v0.6.3.5.
    • Card smokes on an RTX 3090 at 350 W with the shipped launcher: AI4 and AI3 both load and answer on the full 24 GB card and when limited to 12 GB. Peak card use was 22,691-23,515 MiB, under the 23,552 MiB limit. At 24 GB this included reusing a saved prompt after a fresh restart.
    • Low-memory and fit checks (peak card use, limit 23,552 MiB): AI4 24 GB 23,515 MiB, AI4 12 GB 23,169 MiB, AI3 24 GB 23,508 MiB, AI3 12 GB 22,691 MiB.
    • Speed against v0.6.3.5 (AI3, RTX 3090 at 350 W, 100K prompt, 5,120 tokens written, seeds 449 and 457): at 24 GB, writing was unchanged within noise in three of four paired runs (about 103-105 tok/s on both versions) and prompt reading was unchanged (about 2,600 tok/s). One run on the new build was slower and is being re-run. At 12 GB (one pair): writing 51.7 -> 52.3 tok/s, prompt reading 1,728 -> 1,973 tok/s.

    Source-only release.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    llamAmpere

    llamAmpere is a fast version of llama.cpp (the open-source program that runs AI language models on your own computer), tuned for NVIDIA RTX 30-series "Ampere" graphics cards, especially the RTX 3090 and 3090 Ti. It runs Qwen3.8 models, including Qwen3.8-27B with its built-in MTP draft head (a small helper that guesses several words ahead so the model writes faster) and Qwen3.8 Flash-Next.

    What's new in v0.6.3.8

    • The DFlash2 drafter on dense Swift 1.5 27B writes about 3.4 times faster (27 -> 93 tokens/s at temperature 1.0 on an RTX 3090 Ti, 100K prompt). A mixing step in the drafter ran twice per layer; it now runs once. The big model still checks every guess, so output quality is unchanged. MTP and Flash-Next are not affected. Release notes.

    What's new in v0.6.3.6

    • Flash-Next runs AI4, a four-bit AI+ model file, qwen3.8-flash-next-Swift1.5-ATX-AI4 (84.97 GiB, closer to the Swift-Q8 reference than UD-IQ4_XS). Not recommended on 64 GB RAM machines unless you pin a large share of experts on the GPU and move the backup copies out of VRAM to cut RAM use.
    • Fixes the Linux build failure with Clang and some other compilers (#98). Saved prompt caches are keyed by expert-routing and GGML_ settings. Release notes.

    What's new in v0.6.3.5

    What's new in v0.6.3.3

    • Small cards use memory-bounded prompt passes and shorter prompt-tail chunks by default. Normally free 24 GB cards keep their previous plan.
    • Fixes Windows private model mappings and MSVC atomics (#94, #93, #82). Linux launchers count physical performance cores on hybrid Intel CPUs.
    • Adds CPU expert-split diagnostics and --moe-cpu-share for troubleshooting (#88). Release notes and hardware limits.

    What's new in v0.6.3.2

    • Fixes a Flash-Next crash when a follow-up request reuses a cached prompt with shared experts on a side stream (#88).
    • Fixes Windows model loading, Windows build errors, and reads from large expert overlays (#82). Release notes.

    What's new in v0.6.3.1

    • Flash-Next leaves more temporary card memory on 24 GB cards and handles --parallel startup. Unsupported Flash-Next tensor split now gives a clear error.
    • Small cards keep 32K prompt passes, with a 4096-token microbatch to avoid a measured prompt fallback. Adaptive prompt passes remain opt-in. Release notes.

    What's new in v0.6.3

    • New Flash-Next model file, qwen3.8-flash-next-Swift1.5-ATX-AI3: 80.11 GB (74.61 GiB), compared with 75.97 GB for IQ3_XXS. On an RTX 3090 with ample system RAM, this file wrote 121–125 tokens/s across coding, agentic and RAG tasks. These are observations on the new file, not a same-engine comparison with the standard file. Measured results and limits.
    • The expert kernels our speed tests use are now on by default; whole-file page read-ahead when the model fits in RAM.

    What's new in v0.6.1

    • Faster Flash-Next: about 3% faster writing and prompt reading than v0.6 on an RTX 3090 Ti (113.15 vs 109.65 writing tokens/s, 2,751 vs 2,672 prompt tokens/s, 100K prompt; one-seed observation), and room for more experts on the card. Fixes the 12 GB startup crash. v0.6.1 release notes.

    What's new in v0.6

    • mb-MTP is on by default with the MTP draft head: more guessed words are kept, so writing is faster (--no-spec-mb-mtp gives exact sampling).
    • Faster prompt reading on Swift 1.5 27B (+5.3% at 100K tokens) with the same output.
    • AI+ model file for Swift 1.5 27B, our own weight format for Ampere and newer cards: 14.4 GB, 10.4% lower KL (a measure of drift from the full-precision model) than IQ4_XS-M. Older AI+ files no longer load.
    • Qwen3.8 Flash-Next support: experts split between the card and RAM, with --kv-gpu-tokens N to keep only part of the context memory on the card.

    Details, speed tables and everything older: v0.6 release notes.

    Quick start

    Build and run (v0.6.3.8, Qwen3.8 Flash-Next, Linux). For one RTX 30-series card with enough system RAM for the model and prompt workspace. Small-card tests used a 3090 limited to 12 GB with about 90 GiB of system RAM; native 12/16 GB cards remain unmeasured, and 64 GB of system RAM is not a fit promise. Small cards use memory-bounded prompt passes; see the hardware limits. The launcher keeps the tested --fit off setting; its own card planner still chooses the memory plan and keeps at least 5 GiB of RAM free. Automatic --fit on has not been measured on this file. Needs the CUDA 12 or newer toolkit (nvcc), CMake, git, a C++ compiler, the hf download tool (pip install -U huggingface_hub) and 81.63 GB for the model and drafter, plus space for the build, prompt scratch and saved prompts. The launcher uses a 5 GiB free-RAM floor. This one paste clones or updates llamAmpere at v0.6.3.8, builds llama-server, downloads the model and its drafter and starts the server:

    if [ -d llamAmpere ]; then
      git -C llamAmpere fetch --tags --force && git -C llamAmpere checkout v0.6.3.8
    else
      git clone -b v0.6.3.8 https://github.com/JakeATX/llamAmpere.git
    fi && cd llamAmpere && \
    cmake -S . -B build-sm86 -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 -DLLAMA_BUILD_BORINGSSL=ON && \
    cmake --build build-sm86 -j8 --target llama-server && \
    hf download jakeatx/qwen3.8-flash-next-Swift1.5-ATX-AI3 --include '*.gguf' --local-dir models/flash-next && \
    hf download jakeatx/Swift-1.5-Qwen3.8-Flash-Next-MTP-Drafter-GGUF mtp-Swift-Qwen3.8-Flash-Next-GSQ-RCO-Q2S-B.gguf --local-dir models/flash-next && \
    LLAMA_SERVER_BIN=build-sm86/bin/llama-server \
    FLASH_NEXT_DRAFTER=models/flash-next/mtp-Swift-Qwen3.8-Flash-Next-GSQ-RCO-Q2S-B.gguf \
    scripts/flash-next-server.sh -m models/flash-next/qwen3.8-flash-next-Swift1.5-ATX-AI3-00001-of-00002.gguf
    

    To start it again later, run the last three lines from the llamAmpere folder. The server listens on http://127.0.0.1:8080 (OpenAI-compatible API).

    Build and run (v0.6.3.8, Swift 1.5 27B at 2.3 bpw, 200K context, one 24 GB RTX 30-series card, Linux). Needs the CUDA 12 or newer toolkit (nvcc), CMake, git and a C++ compiler. The model (about 9.1 GB) downloads on first start. This one paste clones or updates llamAmpere at v0.6.3.8, builds llama-server and starts it:

    if [ -d llamAmpere ]; then
      git -C llamAmpere fetch --tags --force && git -C llamAmpere checkout v0.6.3.8
    else
      git clone -b v0.6.3.8 https://github.com/JakeATX/llamAmpere.git
    fi && cd llamAmpere && \
    cmake -S . -B build-sm86 -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 -DLLAMA_BUILD_BORINGSSL=ON && \
    cmake --build build-sm86 -j8 --target llama-server && \
    ./build-sm86/bin/llama-server -hf jakeatx/qwen3.8-27b-Swift1.5-Uncensored-ATX-AI2 \
      -c 204800 -ngl 99 -fa on -b 4096 -ub 1024 --parallel 1 --jinja --no-context-shift \
      -ctk sjkvarn3 -ctv sjkvarn2 --sjkvarn-body-type auto \
      --spec-type draft-mtp-adaptive --spec-draft-n-min-adaptive 3 --spec-draft-n-max 4 \
      --spec-draft-p-min 0 --spec-mb-mtp
    

    Commands for 12 and 10 GB cards (not yet run on this model) are in the v0.6.2 release notes.

    The server listens on http://127.0.0.1:8080 (OpenAI-compatible API). Add --no-spec-mb-mtp for exact drafting. To use the IQ4_XS-M file (15.6 GB, also runs in mainline llama.cpp) instead, use --hf-repo jakeatx/ATX-Swift-1.5-Qwen3.8-27B-Uncensored-IQ4_XS-M-GGUF --hf-file ATX-Swift-1.5-Qwen3.8-27B-Uncensored-IQ4_XS-M.gguf.

    Headline results

    Numbers for this release (Swift 1.5 27B, v0.6 against v0.5) are in the v0.6 release notes.

    Links

    License and credits

    llamAmpere is MIT licensed (see LICENSE). It is a fork of llama.cpp by the ggml authors and includes work from TheTom's TurboQuant fork. It is the successor of llama-cpp-qwen-ampere. Contributing: CONTRIBUTING.md.

    Third-party libraries (from upstream llama.cpp):

    • yhirose/cpp-httplib - Single-header HTTP server, used by llama-server - MIT license
    • nothings/stb - Single-header image format decoder, used by multimodal subsystem - Public domain
    • nlohmann/json - Single-header JSON library, used by various tools/examples - MIT License
    • mackron/miniaudio - Single-header audio format decoder, used by multimodal subsystem - Public domain
    • sheredom/subprocess.h - Single-header process launching solution for C and C++ - Public domain