跳转至内容
  • 首页
  • 版块
  • 最新
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • 浅色
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • 深色
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
品牌标识

抡锤者

  1. 主页
  2. 版块
  3. LLM讨论区
  4. 7900XTX + llama.cpp Qwen3.6 27B TurboQuant + MTP 测试结果分享

7900XTX + llama.cpp Qwen3.6 27B TurboQuant + MTP 测试结果分享

已定时 已固定 已锁定 已移动 LLM讨论区
7900xtxmtpllama.cpp
60 帖子 24 发布者 5.2k 浏览 10 关注中
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • Chang Ching-ChunC 离线
    Chang Ching-ChunC 离线
    Chang Ching-Chun
    发表于 最后由 编辑
    #51

    感謝大神分享!好人一生平安

    1 条回复 最后回复
    0
    • 张鑫磊张 张鑫磊 于 引用了 此主题
    • Devin HiD Devin Hi

      此配置经测试(Hermes跑大任务),24G的显存 容易爆OOM

      所以改为了
      --ctx-size 65536
      --batch-size 512
      --ubatch-size 128 \

      terryT 在线
      terryT 在线
      terry
      超级版主
      发表于 最后由 编辑
      #52

      @Devin-Hi 改了之后呢?改进如何?我也想抄作业了。

      油管:https://www.youtube.com/@抡锤者

      1 条回复 最后回复
      0
      • 张鑫磊张 离线
        张鑫磊张 离线
        张鑫磊
        发表于 最后由 编辑
        #53

        @david-zhang Qwen3.6-27B-Q4_K_M-mtp.gguf这个是不是只有huggingface上有modelscope上找不到

        1 条回复 最后回复
        0
        • David ZhangD 离线
          David ZhangD 离线
          David Zhang
          技术大牛 劳动模范
          发表于 最后由 编辑
          #54

          5cfbd3e5-4dfc-4456-9395-5faf08254a33-image.jpeg
          有,但是huggingface会更多

          terryT 1 条回复 最后回复
          0
          • 系统 于 取消固定此主题
          • terryT terry 于 将此主题固定
          • terryT terry 于 引用了 此主题
          • Qi KaiserQ Qi Kaiser 于 引用了 此主题
          • 系统 于 取消固定此主题
          • terryT terry 于 将此主题固定
          • David ZhangD David Zhang

            最近刚入手了 7900xtx,本地跑llm, 为opencode, pi.dev 提供本地llm api 解决客户的代码隐私焦虑。

            花了亿点点时间跑了下性能,结果如下,供各位参考。流水账,先不贴llama-bench 结果了,太多。

            先发 老特 这里了,回头有空了再发个reddit
            回头等DFlash + HIP(ROCM) 成熟了再跑下看看。

            1. Rocm + turboquant,

            repo: https://github.com/domvox/llama.cpp-turboquant-hip
            性能: 256k上下文, pp: 970t/s tg: 29t/s
            Comment:目前测试,除了反应没在线api 快,生成代码的质量不比在线api 差。

            ~/llama.cpp-turboquant-hip/rocm/llama-server -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Uncensored-HauhauCS-Aggressive-Q4_K_P.gguf   --mmproj ~/model/llm/qwen3.6-27b/mmproj-Qwen3.6-27B-Uncensored-HauhauCS-Aggressive-f16.gguf   --alias qwen3.6-27b   --host 0.0.0.0   --port 8080   --n-gpu-layers 999   --ctx-size 262144   --batch-size 2048   --ubatch-size 768   --threads 8   --temp 1.0      --top-p 0.95     --top-k 20     --min-p 0.00   --presence_penalty 1.5   --cache-type-k turbo3   --cache-type-v turbo3
            

            2. Vulkan

            repo: https://github.com/ggml-org/llama.cpp
            性能: 256k上下文, kv-cache-type: Q4_0, pp: 730t/s tg: 47t/s, (Q8_0会慢一丢丢)

            ~/Downloads/llama.cpp/vulkan/bin/llama-server -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf   --alias qwen3.6-27b  --cache-type-k q4_0 --cache-type-v q4_0 -np 1 -c 262144 --temp 0.7 --top-k 20 -ngl 99   --port 8080 --host 0.0.0.0   -fa 1 -ub 256
            

            2.1 Vulkan + turboquant,

            repo: https://github.com/TheTom/llama-cpp-turboquant
            性能: 256k上下文, kv-cache-type: Q4_0, tg: 10t/s, decoding 时 GPU 使用率不到 30%,速度拉跨。开MTP 也 差不多。

            ~/llama.cpp/build/bin/llama-server   -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf   --alias qwen3.6-27b   --cache-type-k turbo3 --cache-type-v turbo3   -np 1 -c 262144 --temp 0.7 --top-k 20 -ngl 99   --port 8080 --host 0.0.0.0   -fa 1 -ub 256
            

            3. Vulkan + MTP

            repo/pr:
            https://github.com/ggml-org/llama.cpp/pull/22673
            性能: 256k上下文, kv-cache-type: Q4_0, pp: 730t/s tg: 67t/s, VRAM 占用跟不开MTP 差不多,

            ~/Downloads/llama.cpp/vulkan/bin/llama-server -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf   --alias qwen3.6-27b   --spec-type mtp --spec-draft-n-max 3   --cache-type-k q4_0 --cache-type-v q4_0 -np 1 -c 262144 --temp 0.7 --top-k 20 -ngl 99   --port 8080 --host 0.0.0.0   -fa 1 -ub 256
            

            3. Rocm + MTP

            repo/pr: https://github.com/ggml-org/llama.cpp/pull/22673
            性能: 4k上下文, kv-cache-type: Q4_0, pp: 730t/s tg: 67t/s
            Comment: Rocm的backend + MTP 有问题,VRAM 在开始 对话时 暴增 5G,具体原因不明,所以 最多8k上下文, Rocm目前的好处 是由 turbo quant 集成。

            ~/llama.cpp/build/bin/llama-server   -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf   --alias qwen3.6-27b   --spec-type mtp --spec-draft-n-max 3   --cache-type-k q4_0 --cache-type-v q4_0   -np 1 -c 4096 --temp 0.7 --top-k 20 -ngl 99   --port 8080 --host 0.0.0.0   -fa 1 -ub 256
            

            4.Hipfire (DFlash) v0.1.20

            repo: https://github.com/Kaden-Schutt/hipfire
            性能: 4k上下文, pp: 930t/s tg: 46t/s,
            Comment: 只能chat聊天,速度很快,默认开启 DFlash, 但是 上下文8k 以上就会卡死,或者崩溃, 没法给 opencode 或者pi 使用,等三个月半年再看看。

            5. 老卡 P40 24G,

            repo: https://github.com/TheTom/llama-cpp-turboquant
            pr: https://github.com/ggml-org/llama.cpp/pull/22673

            不开MTP

            性能: 196k 上下文,tg: 10t/s,

            ~/llama.cpp-mtp/build/bin/llama-server -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf   --alias qwen3.6-27b  --cache-type-k turbo3 --cache-type-v turbo3 -c 196608 --temp 0.7 --top-k 20 -ngl 99   --port 8080 --host 0.0.0.0   -fa 1 -ub 256
            
            开MTP

            性能: 196k上下文,tg: 17t/s,

            ~/llama-cpp-turboquant/build/bin/llama-server -m ~/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf   --alias qwen3.6-27b   --spec-type mtp --spec-draft-n-max 3   --cache-type-k turbo3 --cache-type-v turbo3   -np 1 -c 196608 --temp 0.7 --top-k 20 -ngl 99   --port 8080 --host 0.0.0.0   -fa 1 -ub 256
            


            opencode + deepseek v4 帮我跑了一把,结果如下

            • 如果追求性能 Vulkan + MTP 效果最好,
            • MTP的性能不是恒定的,不同的上下文或者任务,可能存在很大的差别,你让他写小说,规划日常,写代码,性能提升可能会不一样,跑分仅供参考。
            • MTP 目前只能单个对话session,没法并行。
            • Vuklan 后端对 Turbo quant的支持还有存在问题, GPU利用率不够,还得优化。
            • Rocm + MTP 存在 VRAM问题,会无端暴涨5G占用,导致跑起来最多8k多一点。

            llama.cpp master branch 测试结果 (2026-6-2)

            由于最近 PR22673 merge到了主分支,今天正好有空重新跑了下,结果差不多。

            系统配置

            • GPU:AMD Radeon RX 7900 XTX(24GB 显存)
            • 构建:llama.cpp 9470(Vulkan + ROCm 后端)

            最佳参数

            参数 最佳值
            后端 Vulkan
            MTP --spec-type draft-mtp --spec-draft-n-max 2
            子批次大小 -ub 512
            批次大小 -b 512
            闪存注意力 -fa auto(默认)
            KV 缓存 -ctk q4_0 -ctv q4_0
            GPU 层数 -ngl 999(全部)
            线程数 默认(自动)
            上下文大小 最高 -c 262144(256K)

            原始 GPU 基准测试(llama-bench,pp512/tg128)

            子批次大小扫描

            ubatch ROCm pp(t/s) ROCm tg(t/s) Vulkan pp(t/s) Vulkan tg(t/s)
            64 614 29 511 40
            128 703 29 768 40
            256 910 29 844 40
            512 975 29 908 40
            1024 977 29 908 40

            KV 缓存类型(性能影响可忽略)

            KV 类型 ROCm pp ROCm tg Vulkan pp Vulkan tg
            f16 975 29 907 40
            q8_0 973 28 904 40
            q4_0 974 28 903 39
            q4_1 - - 905 39
            iq4_nl - - - -

            闪存注意力

            flash-attn ROCm pp ROCm tg Vulkan pp Vulkan tg
            开启 976 29 908 40
            关闭 964 29 902 40
            自动 977 29 908 40

            批次大小扫描

            batch ROCm pp ROCm tg Vulkan pp Vulkan tg
            256 914 29 832 40
            512 976 29 907 40
            1024 976 29 904 40
            2048 976 29 905 40
            4096 977 29 907 40

            服务器基准测试(llama-server,7 token 提示词,100 生成 token)

            Vulkan 后端

            配置 pp(t/s) tg(t/s) 草稿接受数 接受率
            基线(无推测解码) 39.5 39.7 - -
            MTP n=2 29.4 63.6 58/81 72%
            MTP n=4 31.2 62.1 52/75 69%
            MTP n=8 29.4 60.5 45/68 66%
            MTP n=16 28.1 58.0 38/60 63%
            MTP n=32 27.3 53.2 32/55 58%

            ROCm 后端

            配置 pp(t/s) tg(t/s) 草稿接受数 接受率
            基线(无推测解码) 50.8 29.5 - -
            MTP n=2 24.2 46.2 58/81 72%
            MTP n=8 23.1 43.5 36/93 39%
            MTP n=16 22.5 41.0 30/80 38%
            MTP n=32 21.8 38.5 25/70 36%

            长上下文(Vulkan MTP n=2,Q4 KV 缓存)

            配置 pp(t/s) tg(t/s) 草稿接受数 接受率
            128K 上下文 31.5 67.5 30/36 83%
            256K 上下文 31.2 67.4 30/36 83%

            推荐启动命令

            /home/david/Downloads/llama.cpp/vulkan/bin/llama-server \
              -m /home/david/model/llm/qwen3.6-27b/Qwen3.6-27B-Q4_K_M-mtp.gguf \
              -ngl 999 \
              -c 131072 \
              --spec-type draft-mtp --spec-draft-n-max 2 \
              -ctk q4_0 -ctv q4_0
            

            关键结论

            1. Vulkan 优于 ROCm:Vulkan 生成速度快 38%(MTP 下 63.6 vs 46.2 t/s)
            2. MTP n=2 最佳点:72% 草稿接受率,生成速度提升 +60%
            3. KV 缓存 Q4_0:无性能损失,相比 f16 节省 4 倍内存
            4. 长上下文正常工作:完整 256K 上下文运行速度与 4K 相同
            5. ~67 t/s:在 27B 模型上使用 MTP 实现出色的生成吞吐量

            llama-bench 测试结果(2026-5-11)

            环境

            • MTP 模型: Qwen3.6-27B-Q4_K_M-mtp.gguf (15.82 GiB) https://huggingface.co/froggeric/Qwen3.6-27B-MTP-GGUF/
            • 非MTP 模型: Qwen3.6-27B-Uncensored-HauhauCS-Aggressive-Q4_K_P.gguf (17 GiB) https://huggingface.co/HauhauCS/Qwen3.6-27B-Uncensored-HauhauCS-Aggressive
            • GPU: AMD Radeon RX 7900 XTX (24,560 MiB 显存)
            • CPU: Genuine Intel(R) 13900hk ES
            • 线程数: 8
            • n-gpu-layers: 999 (完全卸载到 GPU)
            • 温度: 0.7, top-k: 20

            ROCm (HIP) - KV缓存类型对比 (非MTP)

            二进制: ~/llama.cpp/rocm/bin/llama-bench (build 9046)

            KV缓存类型 pp1024 (token/s) tg128 (token/s)
            f16 (默认) 904.50 28.99
            q4_0 898.01 28.81

            Vulkan - KV缓存类型对比 (非MTP)

            标准构建 (~/Downloads/llama.cpp/build-vulkan/bin/llama-bench)

            KV缓存类型 pp512 (token/s) tg128 (token/s)
            f16 765.94 37.06
            Q4_0 769.82 37.17
            Q8_0 273.25 37.13

            Turboquant 构建 (~/Downloads/llama-cpp-turboquant/build-vulkan/bin/llama-bench)

            KV缓存类型 pp512 (token/s) tg128 (token/s)
            turbo2 193.43 ± 1.49 23.79 ± 0.17
            turbo3 128.44 ± 1.31 21.88 ± 0.14
            turbo4 178.94 ± 2.03 23.00 ± 0.25

            注意:turboquant 测试期间 GPU 使用率仅约 30%,未能充分利用 GPU。瓶颈可能在 CPU 端的量化/反量化操作。

            q4_0/q8_0 在 turboquant 构建的 llama-bench 中仍然失败。


            Vulkan + MTP

            二进制: ~/llama.cpp/vulkan/bin/llama-cli
            命令: --spec-type mtp --spec-draft-n-max 3 --parallel 1 -p "tell me a jok" -n 128 -ngl 999

            注意:MTP 使用 -np 1(单并行序列),因此无法并行处理。草稿模型顺序执行,限制了吞吐量。

            配置 生成速度 (token/s)
            非MTP (f16) 39.5
            MTP (q4_0) 81.2
            MTP (q8_0) 77.5

            ROCm + MTP

            二进制: ~/llama.cpp/rocm/bin/llama-cli 配合 LD_LIBRARY_PATH

            配置 生成速度 (token/s)
            非MTP (f16) 29.4
            MTP (q4_0) 53.6
            MTP (turbo3) 47.4
            MTP (turbo4) 57.2

            总结

            非MTP (llama-bench)

            KV缓存类型 pp (token/s) tg128 (token/s) 后端
            f16 904.50 28.99 ROCm (pp1024)
            q4_0 898.01 28.81 ROCm (pp1024)
            f16 765.94 37.06 Vulkan 标准 (pp512)
            Q4_0 769.82 37.17 Vulkan 标准 (pp512)
            Q8_0 273.25 37.13 Vulkan 标准 (pp512)
            turbo2 193.43 23.79 Vulkan turboquant (pp512)
            turbo4 178.94 23.00 Vulkan turboquant (pp512)
            turbo3 128.44 21.88 Vulkan turboquant (pp512)

            MTP (llama-cli)

            配置 生成速度 (token/s) 后端
            MTP (q4_0) 81.2 Vulkan
            MTP (q8_0) 77.5 Vulkan
            MTP (turbo4) 57.2 ROCm
            MTP (q4_0) 53.6 ROCm
            MTP (turbo3) 47.4 ROCm
            非MTP (f16) 39.5 Vulkan
            非MTP (f16) 29.4 ROCm

            关键观察

            1. ROCm 上的 q4_0 性能与 f16 几乎相同 (898 vs 905 token/s) — 差异可忽略。
            2. Turboquant 类型 仅适用于 turboquant Vulkan 构建。turbo2 的提示处理最快 (193 token/s @ pp512)。各 turbo 变体的生成速度相近 (~22-24 token/s)。
            3. 标准 Vulkan 构建 支持 Q4_0/Q8_0 — Q4_0 与 f16 速度相当 (~770 token/s pp512),Q8_0 提示处理慢约 2.8 倍 (273 token/s) 但生成速度相同 (~37 token/s)。Turbo 类型仅适用于 turboquant 构建。
            4. MTP 显著提升生成速度:Vulkan+q4_0 达到 81.2 token/s(比非MTP 提升 +106%),Vulkan+q8_0 达到 77.5 token/s (+96%),ROCm+turbo4 达到 57.2 token/s (+95%)。

            reddit

            lei ruanL 离线
            lei ruanL 离线
            lei ruan
            发表于 最后由 编辑
            #55
            此主題已被删除!
            1 条回复 最后回复
            0
            • David ZhangD David Zhang

              5cfbd3e5-4dfc-4456-9395-5faf08254a33-image.jpeg
              有,但是huggingface会更多

              terryT 在线
              terryT 在线
              terry
              超级版主
              发表于 最后由 编辑
              #56

              @David-Zhang 有空讲下OpenCode体验如何,编程跑Agent,我最近想要折腾下,要是能抄作业最好。

              油管:https://www.youtube.com/@抡锤者

              1 条回复 最后回复
              0
              • 系统 于 取消固定此主题
              • W wml-ai 于 引用了 此主题
              • 1 12343954 于 引用了 此主题
              • Q mariaQ Q maria 于 引用了 此主题
              • David ZhangD David Zhang

                @Leon-Y ollama是个玩具不是工具,换llama.cpp或者 vllm

                E 离线
                E 离线
                exe127
                编写于 最后由 编辑
                #57

                @David-Zhang 可以請教, 為什麼你和老特都不推薦 ollama , 推llama.cpp呢? 我也是先問了AI, 它說你們應該是覺得 ollama 雖然是容易上手, 但可調教的參數太少. llama.cpp 才是真正的生產工具. 沒說錯嗎?

                5 1 条回复 最后回复
                0
                • E exe127

                  @David-Zhang 可以請教, 為什麼你和老特都不推薦 ollama , 推llama.cpp呢? 我也是先問了AI, 它說你們應該是覺得 ollama 雖然是容易上手, 但可調教的參數太少. llama.cpp 才是真正的生產工具. 沒說錯嗎?

                  5 离线
                  5 离线
                  566656661
                  超凡大师
                  编写于 最后由 编辑
                  #58

                  @exe127

                  Ollama本體就是一個llama.cpp的Fork

                  E 1 条回复 最后回复
                  0
                  • 5 566656661

                    @exe127

                    Ollama本體就是一個llama.cpp的Fork

                    E 离线
                    E 离线
                    exe127
                    编写于 最后由 编辑
                    #59

                    @566656661 對呀. AI也是這樣回覆我. 剛巧看到了一個reddit同樣的疑問:

                    https://www.reddit.com/r/LocalLLaMA/comments/1mdma9a/help_choosing_between_ollama_llamacpp_or/

                    說的很清楚了. 我想我也用 llama.cpp 更好

                    1 条回复 最后回复
                    0
                    • williamlouisW 离线
                      williamlouisW 离线
                      williamlouis
                      超级版主
                      编写于 最后由 编辑
                      #60

                      提示后又从头读了一遍。真是时间是一切的验证。
                      现在我也是小霸王学习机的拥有者。7900XTX 还真就是折腾优选之一。
                      经过10多天的折腾。pro 5000 72G 终于组装上了。被动赚了京东几千块。事实就是吃馅饼都是要买单的。哈哈。

                      个人主页:xlkj.org Telegram https://t.me/xlkjorg

                      1 条回复 最后回复
                      0

                      你好!看起来您对这段对话很感兴趣,但您还没有一个账号。

                      厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。

                      有了你的建议,这篇帖子会更精彩哦 💗

                      注册 登录
                      回复
                      • 在新帖中回复
                      登录后回复
                      • 从旧到新
                      • 从新到旧
                      • 最多赞同


                      • 登录

                      • 没有帐号? 注册

                      • 登录或注册以进行搜索。
                      • 第一个帖子
                        最后一个帖子
                      0
                      • 首页
                      • 版块
                      • 最新
                      • 标签
                      • 热门
                      • 用户
                      • 群组