跳转至内容
  • 1 赞同
    7 帖子
    210 浏览
    胜威马
    @asd2667 试了一下,现在是不能开mtp的……速度太慢了……Found it. The truth: Warm TTFT is actually fine: your unique 37-token prompt just processed at 29.6 tok/s (1.25s). The 2.5 tok/s you hit was the first request after the restart — one-time CUDA-graph + MTP draft compilation. That's a cold-start cost, not steady-state. But I also found MTP is hurting, not helping on this 16GB setup: Decode: 12.8 tok/s with MTP vs 18.9 tok/s without it earlier (the draft compute overhead exceeds the speculative gain at these speeds; draft acceptance mean was only ~2.3). MTP adds the cold-start compile overhead you felt. So per the official page, MTP was meant for the bigger M-model on larger VRAM. On your XS-Pro/16GB it's net-negative. I'll disable MTP, keep the rest of the recommended config (q8/q4 KV, flash-attn, 64k, checkpoints, sampling), and pre-warm so you never hit the cold start:
  • 我要新装一个7900XTX到我现在的4060TI电脑上的疑问?

    AI硬件 7900xtx rtx4060
    31
    0 赞同
    31 帖子
    557 浏览
    yi songY
    如果没有发现其他问题,这个是最后一个经验贴,我已经能感受到现在的速度是我这张卡我用起来的最佳速度和能耗。经验trae总结,放在这里,如果有需要丢给AI可以让他参考。 好的,以下是整理好的论坛帖子内容: 【7900 XTX + llama.cpp】稳定输出 + 不引入历史记录的完整配置方案 硬件 AMD RX 7900 XTX 24GB(专职跑模型) NVIDIA RTX 4060 Ti(主显卡跑桌面,不参与推理) 模型:Qwen3.8-27B-Q4_K_M / Qwen3.8-27B-UD-Q4_K_XL 一、稳定输出(速度恒定,不越来越慢) 问题 批量总结文档时,第一个 ~1 分钟出结果,第二个要几分钟,第三个 10 分钟还没完。 根因 KV cache 量化过高:q8_0 的 KV cache 撑爆 24GB 显存(模型 15GB + KV 8.6GB = 23.6GB),GPU 和 CPU 之间疯狂换页 Copilot 累积历史:opencode 后端会带上之前所有对话的上下文 全库 RAG 搜索:enableLexicalBoosts 每次都在全文检索整个 vault Agent 自主决策:enableAutonomousAgent 每次迭代多轮 修复 1. llama-server 启动参数(start.bat): "%SERVER_EXE%" -m "%selected%" -c %ctx% -ngl 99 -fa on --no-mmap ^ --cache-type-k q4_0 --cache-type-v q4_0 ^ --parallel 1 -b 512 -ub 256 ^ --verbose ^ --host 0.0.0.0 --port 8080 参数 值 作用 -ngl 99 所有层卸载到 7900 XTX -fa on — Flash Attention,降低显存带宽压力 --no-mmap — 模型权重加载到 RAM,避免页面错误 --cache-type-k q4_0 — KV cache 4bit 量化(8.6GB→4.3GB,省一半显存) --cache-type-v q4_0 — 同上 --parallel 1 1 单槽位,全算力给一个请求 -b 512 -ub 256 — 批处理大小优化 --verbose — 终端打印每个请求的耗时和速度 2. 显存对比: 配置 模型 KV cache 合计 剩余 q8_0 KV 15GB 8.6GB 23.6GB 0.4GB(贴满,换页卡死) q4_0 KV 15GB 4.3GB 19.3GB 4.7GB(充足) 3. 速度对比: 场景 q8_0 KV q4_0 KV 第1个文档 ~1 分钟 ~1 分钟 第2个文档 几分钟 ~1 分钟 第3个文档 10+ 分钟 ~1 分钟 生成速度 越来越慢 恒定 32 tok/s 二、不引入历史记录(每次对话干净独立) Obsidian Copilot data.json 配置 找到文件:E:\你的Vault\.obsidian\plugins\copilot\data.json 改这 7 个字段: 字段 之前 改成 作用 contextTurns 15 0 每次对话不带之前的对话轮次 agentMode.activeBackend "opencode" "chat" 从 Agent 模式切到简单聊天 enableSavedMemory true false 不保存对话记忆 enableRecentConversations true false 不保留最近对话 enableLexicalBoosts true false 关闭全库 RAG 搜索 enableAutonomousAgent true false 关闭 Agent 自主决策 docProcessorBackend "plus" "" 不走云端,纯本地 保留这个不变: "autoAddActiveContentToContext": true 这个是把你当前打开的笔记内容加进 prompt,不是历史记录。做文档总结必须有它。 三、验证方法 看速度和时间 llama-server 终端窗口会打印每个请求的日志: prompt eval time = 4823 ms / 1200 tokens ( 248.65 tokens per second) gen time = 14200 ms / 500 tokens ( 35.21 tokens per second) total time = 19023 ms / 1700 tokens 字段 含义 prompt eval time 处理输入(文档+指令)的时间 gen time 生成回复的时间,tokens per second 就是速度 total time 从收到请求到完成的总耗时 验证无历史累积 连续总结 3 个文档,看 llama-server 日志里每个请求的 prompt_tokens 数量: 如果三次都差不多(比如都是 ~2000)→ 没有累积历史 如果越来越大(2000 → 4000 → 6000)→ 还在带历史 四、批量自动化(可选) 如果需要自动处理整个文件夹的文档,用 Python 脚本调用 llama-server API: # 核心调用逻辑 payload = { "model": "qwen3.8-27b-ud", "messages": [ {"role": "system", "content": "你的整理要求..."}, {"role": "user", "content": "原文内容..."} ], "max_tokens": 16384, "temperature": 0.2, # 低温度,输出稳定 "top_p": 0.85, "stream": False } resp = requests.post( "http://127.0.0.1:8080/v1/chat/completions", json=payload, timeout=7200 ) 关键参数: temperature: 0.2 — 低温度,每次输出结构稳定 stream: False — 非流式,等完整结果再返回 timeout: 7200 — 2 小时超时,大文档慢慢跑 每个文档处理完,KV cache 自动释放,下一个文档拿到干净的 GPU 给 AI 的一键配置 Prompt 我有 AMD RX 7900 XTX 24GB 显卡,用 llama.cpp HIP 版跑 Qwen3.8-27B 本地模型。请帮我配置: start.bat 参数:-ngl 99 -fa on --no-mmap --cache-type-k q4_0 --cache-type-v q4_0 --parallel 1 -b 512 -ub 256 --verbose --host 0.0.0.0 --port 8080 Obsidian Copilot data.json:contextTurns=0, activeBackend=chat, enableSavedMemory=false, enableRecentConversations=false, enableLexicalBoosts=false, enableAutonomousAgent=false, docProcessorBackend="" 解释每个参数的作用 验证方法:看 llama-server 终端日志的 total time 和 prompt_tokens 是否恒定 这样别人把上面这段发给 AI,就能自动完成整个配置流程。
  • 4 赞同
    32 帖子
    4k 浏览
    P
    @R-simi-Kangtao 你的5090显卡肯定要跑NVFP4模型,性能接近Q8比你的Q3强多了。 你的参数-ngl 99太小了,建议新手改成-ngl auto,修改以后肯定超过100t/s
  • 4060Ti 8G显存还能部署本地大模型吗?玩玩Hermes

    AI硬件 rtx4060 hermes
    27
    0 赞同
    27 帖子
    876 浏览
    E
    @Tiger moe模型,肯定不如稠密27b,但是你可以看看我新发的帖子,试一下看看
  • 0 赞同
    16 帖子
    661 浏览
    t pppT
    @stakira 谢谢大哥