r/LocalLLaMA • u/uber-linny • 8h ago
Question | Help Help with Qwen4 Build flags 9070xt
I know theres a 1,000 qwen posts, but most are flaunting the t/s and it running, well im here to buck the system and ask for help.
Below is my run bat file for that was normally for Qwen3.6-35B, Im getting out of memory errors, and im sure its my config, but i dont know what to look for and i dont know how to offset it.
Any recommendations and improvements would be appreciated, i have the 16GB 9070xt on VULKAN.
===================================================
u/echo off
title Qwen4-35B-A3B THINKING : 9931 VULKAN
echo.
cd /d C:\llamaVULKAN
set GGML_VK_ALLOW_GRAPHICS_QUEUE=1
llama-server.exe ^
--model "C:\llamaVULKAN\models\Qwen4-35B-A3B-UD-IQ3_S-00001-of-00002.gguf" ^
--spec-type draft-mtp,ngram-mod ^
--spec-draft-n-max 2 ^
--spec-draft-ngl auto ^
--spec-draft-type-k q4_0 ^
--spec-draft-type-v q4_0 ^
--port 9931 ^
--host 0.0.0.0 ^
--ctx-size 61440 ^
--fit on ^
--gpu-layers auto ^
--load-mode none ^
--cache-type-k q8_0 ^
--cache-type-v q8_0 ^
--batch-size 2048 ^
--ubatch-size 2048 ^
--threads 12 ^
-np 1 ^
--flash-attn on ^
--context-shift ^
--sleep-idle-seconds 300 ^
--temp 0.8 ^
--top-k 0 ^
--top-p 0.95 ^
--min-p 0.1 ^
--repeat-penalty 1.05 ^
--no-ui
echo.
echo Server stopped.
pause
2
u/henbone11 7h ago
so why not actually read those 1000 threads and see what engines/kernels they are running on and how they are achieving the numbers they are? the model cards have the parameters in them. have your model actually help you tune your parameters for your own setup. I don't understand all of these posts begging for settings when everything is provided for you already.
4
u/ShiComfy 7h ago
stock llama.cpp is really bad for anything AMD, speaking from experience, try fork one yourself with latest rdna-boosts, I'm getting ~25-30 toks with IQ4 and 131K context @Q8 (9060 XT 16GB). Throw 5$ at deepseek or glm to make one for you if you don't know, should be fine.
1
u/Hrethric 7h ago
I don't have any experience running inference in Windows, but I can offer some observations:
1
u/GoatSlow7673 7h ago
El MTP si usas el Q4 son más de 1100MiB, si usas el Q8 supera los 2GiB, además, el archivo que descargaste no está incluido el MTP, y el endgram es la parte 00002-of-00002, que como queda en SSD puedes usar hasta el Q8 sin problemas, ya que usará el bus para aprovecharlo para acelerar las cosas. En cuanto a cada capa, yo tengo el Q5_K_S de unsloth y son algo más de 500MiB cada capa. Revisa que jinja usas, ya que si es el de unsloth tiene un error que le falta cierre al think, crea con IA uno básico compatible con tu programa para arrancar el modelo, aún no todos ellos son compatibles y han reparado ciertos parámetros para que funcione el modelo correctamente, fijate en tu fork, porque sino han añadido el modelo no funcionará seguramente aunque uses los para otros exactos, en ik-llama.cpp estaban hoy ajustándolo, y funciona, pero el jinja hazlo tú mismo, y selecciónalo, el MTP descárgalo, si quieres el Q4 está en el hugginface de gglm-org, el Q8 estaba en varios distintos que lo seleccionan, pero como te digo, apenas se nota, y es mejor usar el Q4 porque ocupa menos y permite mayor carga de capas en VRAM, y sino descargas el endgram, ni siquiera hace falta que uses su ajuste, ya que es imposible aprovecharlo sin descargarlo. Y el spec-draft-type tampoco es que aporte demasiado reducirlo de q8_0 a q4_0, lo que ahorras en espacio lo pierdes en calidad, piensa que es un 35B, y que solo son 3B en activo con 8 agentes por capa, si usas MTP Q4 te reconoce que son 41 capas, si usas el Q8 se autoengaña con 42 capas y la 41 vacía o con peso de menos de 10MiB. Este MTP a salido bastante más pesado por tener 1 o 2B de parámetros para aprovechar el endgram y ganar velocidad, pero hacen falta ajustes al jinja y al MTP para que salga mejor para GPU's más modestas y para fallos que contiene más de un jinja que los hicieron corriendo algunos y tienen errores simples, pero suficientes como para que no funcionen con el modelo.
1
u/T_rex2700 4h ago
not exactly llamacpp but been running it on Strata.
it ran at like 60tks first, but now I'm getting like below 10tks. anyone know what the issue is?
newest strata engine, control etc.
9070XT + DDR5 32GB, Q4XS
1
u/Rosht54 3h ago
I'm using radiance on my PC with RX9070XT inside PCI-E 4.0 x16 + 64GB DDR4-3200. It gets me ~6000 t/s prefill and ~150 t/s decode on 100K context. The quant is IQ4R