Agentic Coding using OpenCode facing the issue
I am using llama.cpp . here is the log "6.29.133.813 I slot print_timing: id 2 | task 541 | n_gen = 1743, tg = 27.13 t/s, tg_3s = 27.96 t/s
6.32.173.928 I slot print_timing: id 2 | task 541 | n_gen = 1823, tg = 27.09 t/s, tg_3s = 26.31 t/s
6.35.365.904 I slot print_timing: id 2 | task 541 | n_gen = 1899, tg = 26.94 t/s, tg_3s = 23.81 t/s
6.38.426.740 I slot print_timing: id 2 | task 541 | n_gen = 1981, tg = 26.94 t/s, tg_3s = 26.79 t/s
6.39.934.000 I slot print_timing: id 2 | task 541 | prompt eval time = 9294.97 ms / 5284 tokens ( 1.76 ms per token, 568.48 tokens per second)
6.39.934.004 I slot print_timing: id 2 | task 541 | eval time = 75009.30 ms / 2018 tokens ( 37.19 ms per token, 26.89 tokens per second)
6.39.934.005 I slot print_timing: id 2 | task 541 | total time = 84304.26 ms / 7302 tokens
6.39.934.007 I slot print_timing: id 2 | task 541 | graphs reused = 1222
6.39.934.011 I slot print_timing: id 2 | task 541 | draft acceptance = 0.80764 ( 1247 accepted / 1544 generated), mean len = 2.62
6.39.934.311 I slot release: id 2 | task 541 | stop processing: n_tokens = 7303, truncated = 0
6.40.187.398 I slot get_availabl: id 1 | task -1 | selected slot by LRU, t_last = -1
6.40.189.744 E state_read_meta: failed to find 63196 available cells in kv cache
6.40.215.093 E state_seq_set_data: error loading state: failed to restore kv cache
6.40.215.102 E srv load: failed to restore state with size 431137564
6.40.215.104 W slot prompt_load: id 1 | task -1 | failed to load prompt from cache
6.40.220.854 I slot launch_slot_: id 1 | task 1319 | processing task, is_child = 0
6.44.065.830 I slot print_timing: id 1 | task 1319 | prompt processing, n_tokens = 2048, progress = 0.05, t = 3.55 s / 576.84 tokens per second
6.47.802.007 I slot print_timing: id 1 | task 1319 | prompt processing, n_tokens = 4096, progress = 0.10, t = 7.28 s / 563.01 tokens per second" it will help you. you can see three errors of kv cache. why is this happening.
here is the command ".\llama-server.exe -m F:\models\Tiel-Coder-35B-A3B-MTP-UD-Q4_K_XL.gguf -c 65536 -ngl 99 -ctk q4_0 -ctv q4_0 --n-cpu-moe 28 --flash-attn on --load-mode none -b 2048 -ub 1536 --temp 0.6 --top-p 0.95 --top-k 20 -t 8 --port 8080 --webui-mcp-proxy --no-mmproj --spec-type draft-mtp --spec-draft-n-max 2
" i have 12gb vram. getting average 28 tps. Waiting for your kind response. thanks
Sorry, what are you asking here? Those logs are basically showing that things have changed in the cache and it needs to reprocess. this is normal.
I would also recommend not to go full q4_0/q4_0 on kv, as it can and will cause problems.
if you can compile your own binaries and are running cuda, you can split k/v to q8_0/q4_0, which in my testing, will still work really well. (this is the -DGGML_CUDA_FA_ALL_QUANTS=ON env)
You may also want to try some of these other options that i use (i'm on a 5090 so i get that you can't do everything, but pay attention to the cram/cache related stuff.
D:\ai\loaders\llamacpp\llama-server.exe ^
--model .\Tiel-Coder-35B-A3B-MTP-UD-Q4_K_XL.gguf ^
--alias "200k" ^
--mmproj Tiel-Coder-35B-A3B-mmproj-BF16.gguf ^
--no-mmproj-offload ^
--load-mode none ^
--n-cpu-moe 0 -ngl all ^
--temp 1.0 ^
--top-p 0.95 ^
--top-k 20 ^
--min-p 0.01 ^
--repeat-penalty 1.0 ^
--repeat-last-n 64 ^
--port 8001 ^
--ctx-size 200000 ^
--flash-attn on ^
--cache-type-k q8_0 ^
--cache-type-v q4_0 ^
--spec-draft-ngl all ^
--fit off ^
-ctkd q4_0 ^
-ctvd q4_0 ^
--no-kv-unified ^
-b 2048 ^
-ub 256 ^
--image-min-tokens 1024 ^
--image-max-tokens 4096 ^
--host 0.0.0.0 ^
--jinja ^
--no-context-shift --threads -1 ^
--chat-template-kwargs "{\"preserve_thinking\":true}" ^
--reasoning on ^
--reasoning-preserve ^
--reasoning-budget 8192 ^
--reasoning-budget-message "\nFinal Answer:" ^
--reasoning-format deepseek ^
--metrics -lv 4 ^
--prio 2 ^
--ctx-checkpoints 32 ^
-cram 8192 ^
--cache-idle-slots ^
--checkpoint-min-step 8192 ^
--cache-reuse 256 ^
--spec-type draft-mtp,ngram-mod,ngram-map-k4v ^
--spec-draft-n-max 3 --spec-draft-p-min 0.2 ^
--keep -1 ^
--no-warmup ^
--chat-template-file .\froggeric_qwen-chat_template-v22.4.jinja
Hi! :) SolutionsDealer, can you describe what happens in your experience? Does the model just crash? Does it get slow and take a long time to re-load the KV? I can see the log you posted, but it would help me understand the problem if you describe your experience and what happens to the model and the server, not just the log.
Veldierin, thank you so much for you input! :) I see two big issues in your config that will hurt your performance significantly:
- First of all, you use "--chat-template-file .\froggeric_qwen-chat_template-v22.4.jinja". which is the wrong template for TielCoder! Run the TielCoder directly without adding a chat template, and you get the baked in https://huggingface.co/peculiar-ragdoll/Qwen-Sharp-Chat-Templates which is the modified version of froggeric. The modifications I've made is a massive part of why my benchmarks are that much better. I do not recommend anyone overwriting it with stock froggeric, unless they are willing to take a performance hit.
- You use temperature 1.0, which is not recommended for agentic coding, which is TielCoder's stated use case. Temperature 0.6 is the recommended setting
@peculiar-ragdoll - ah you got me on the template, sorry. you're right, i just cookie-cutter working templates into batch files and didnt adjust it to take into account your own proper template. I'll fix that 😃
but i generally run my qwens at temp 1.0 for my coding work as per Unsloth's and Qwen's recommendations when using thinking, and dont have problems. i've considered 0.6 but havent really A/B'd outputs either way.
There is a nuance to that recommendation: for qwen 3.6, the temp 1.0 recommended is for thinking general, and 0.6 is for agentic coding even with thinking afaik. For qwen 3.8-27b, the recommendation is 1.0 across the board. So for qwen3.6 agentic coding with thinking, you might be leaving some gains on the table! Temp 0.7-0.8 is also a nice balance for agentic coding, if you don’t want to be as aggressive, and want to leave some space for divergent thinking on harder problems.
i dont know much about how to use this area. Thanks to veldierin for such a nice command i applied all and its working fine with me. I actually know how to play with MOE little bit so used all those args and peculiar-ragdoll also guided well. I wanna tell you that model start wrong tool calling while attaching your chat template without it model works fine. I have one question as i dont have much knowledge of Ai model development but i can see Tiel is finetuned version of ornith and ornith is Text generation model then so i think Tiel is Text Gen model not the Image to text so why we need to add mmproj file. though i added but default webui of llama.cpp doesn't reflect if the model is capable of reading images. can you elaborate. Thanks
I am using llama.cpp 10549 default. Activated MCP that its webui offers. Its not just wrong tool calling but it started hellucinating and stuck in loop of calling hugging face mcp severs tool which was un related to my query. in loop until it reached tool calling limit. i again told the mold about its behaiour but it couldn't get escape then i detached the template and its working fine now.
As i wanted to learn more about llama.cpp args please share some more knowledge to play with it. thanks
You don't need to add the mmproj if you don't want image to text, that's just for the people that want that functionality :) Without the mmproj tielcoder is a simple blind text-to-text coder model, which is good enough when you're not doing frontend work where the model needs to look at screen shots and art references etc.
When you say "I am using llama.cpp 10549 default", what does this number 10549 mean? Context? That's not enough for this model. I recommend using 131k or 262k context for agentic coding, which in terms of KV takes about 2.5 and 5 GB RAM at full precission KV, or around 1.5-2.5 GB RAM at q8_0 KV.
You don't need to add the mmproj if you don't want image to text, that's just for the people that want that functionality :) Without the mmproj tielcoder is a simple blind text-to-text coder model, which is good enough when you're not doing frontend work where the model needs to look at screen shots and art references etc.
When you say "I am using llama.cpp 10549 default", what does this number 10549 mean? Context? That's not enough for this model. I recommend using 131k or 262k context for agentic coding, which in terms of KV takes about 2.5 and 5 GB RAM at full precission KV, or around 1.5-2.5 GB RAM at q8_0 KV.
Thanks for your patience. i got fixed the mmproj issue . thanks.