I’m pretty new to this local LLM business and hoping to have some input from the experts. I have an AMD card with 12GB VRAM and 32GB system RAM, running Linux. Currently I have llama.cpp up and running, and I tried out models Qwen2.5-Coder-14B-Instruct-GGUF and Qwen-3-14B-GGUF. So far so good.
What I’d like help with is maximizing my context window. From what I understand, I probably have to move to MoE models, but I’m not sure about the llama.cpp config, and which model to pick; I plan to use it for coding and some light reverse engineering.
Let me emphasize something: I do not care about speed! I don’t care if I have to wait 2 minutes for a reply. All I care about is the largest context window I can achieve with my hardware.
Thanks in advance!
I’m on AMD, Linux and llama.cpp too, only difference being that I run 16GB VRAM and 16GB system RAM. I have really been enjoying Cyber-Tiel-Coder as It runs at like 120 t/s with a context of <100k when I need quick small stuff but is still super useable at like 300-500k context (Goes down to like 30-40 t/s)
I don’t run any harnesses or extensions, just the barebone llama server with the standard WebUI that comes with it. Here’s my exact start script, it might be useful to you as a starting off point:
llama-server \ --device Vulkan0 \ --model ~/models/Cyber-Tiel-Coder-35B-A3B-MTP-UD-IQ3_S.gguf \ --alias ziti \ --flash-attn on \ --load-mode none \ --n-cpu-moe 0 \ --cache-type-k q8_0 \ --cache-type-v q8_0 \ --ctx-size 364000 \ --context-shift \ --host 0.0.0.0 \ --port 8081 \ --agent--n-cpu-moecould be useful if the model doesnt quite fully fit on your GPU. Adjust it up to offload MOE layers to your CPU. The speed hit from it is quite noticeable but a whole lot better than not being able to run a model at all.--cache-type-k q8_0and--cache-type-v q8_0are your context quantizations, putting them on like q4 makes your context go a looooot further but the quality loss is kinda noticeable.You could also play around with
--no-reasoning-preserve. It does exactly what it says and frees up a whole lof of context inbetween steps. Personally I don’t think that it harms the quality of the output much to enable it, it’s just sometimes annoying then the model chews on the same questions whenever it goes to a new step.Oh, I also just remembered that I had this setup for a “small but fast & stupid” model in my setup scripts. Honestly I don’t remember what some of those parameters do anymore but maybe they’re interesting for you idk.
llama-server \ --device Vulkan0 \ --model ~/models/Tiel-Coder-35B-A3B-MTP-UD-IQ3_S.gguf \ --alias baba \ --flash-attn on \ --load-mode none \ --n-cpu-moe 0 \ --ctx-size 42000 \ --cache-type-k q4_0 \ --cache-type-v q4_0 \ --n-predict 4096 \ --context-shift \ --keep -1 \ --host 0.0.0.0 \ --port 8081 \ --no-reasoning-preserve \ --agentThose are very old models, you probably got those suggestions from an LLM because they love to suggest out of date stuff for AI. You really have to tell them “models released in 2026” or something.
You don’t care about speed yet but when you start getting into multi turn agents that write code and compile and run their tests and fix their own issues, you’ll understand why speed is important.
I’ll give a suggestion for something fast: Tiel Coder 35b-a3b, get the quant they used for the benchmarks, their Q4_K_XL
Use llama.cpp’s new --moe-cache-mib option to make it intelligently use both your VRAM and your RAM https://lemmus.org/post/26756208
Also set
--ubatch-size 2048for faster prefill speedsYeah if you don’t care about speed and you’re ready to wait a few hours tops for a response you can go into swap and then you can use Qwen3.8 flash with their ginormous parameter amounts (I think it’s north of 1t).
Realistically you are looking at very similar specs as mine with 12gb/48gb, and that’s running llama.cpp-kv-adaptive-streaming. the model I use is an abliterated Qwen 3.6 35b a3b Q4_K_M variant. I don’t remember my exact config right now but I think moe layers offloaded is like 32 for me. I do have a gigantic 192k context, but I also use Q8_0 KV cache quant.
I can go into detail if you want. Feel free to dm me, I’m even down to talk on fluxer or discord or whatever.
I do not care about speed! I don’t care if I have to wait 2 minutes for a reply.
Pretty sure you will but… if you really think you don’t, you can try running your models on the CPU only. I’ve run Gemma4 at Q8 on a 10+ year old Xeon with no GPU and 32GB of DDR3 RAM just to prove that I could. It was slow (~5 tok/s or less with just “hello” in context), but it worked…
Prefill will drive you insane working with large contexts and an insufficiently powerful GPU though; this is the hidden killer for high RAM unified memory systems (e.g. Framework Desktop) and why I ended up buying a big honking GPU in the summer after getting into this stuff…
All I care about is the largest context window I can achieve with my hardware.
Try experimenting with the quantization size of the model and the quantization of the K/V cache. I can get ~250K with Qwen3.8-27B at Q4_K_M using cache-type-k=q8_0 and cache-type-v=q8_0 with everything fully restricted to be GPU-only on a 32GB card. (I do not recommend running a dense model that big without sufficient GPU – it will be painfully slow – but you’re welcome to try anyway, of course; it will fit in your system RAM.)
Qwen2.5-Coder-14B-Instruct-GGUF and Qwen-3-14B-GGUF
These models are very old. Maybe consider trying TielCoder instead? (Or, CyberTiel if you get refusals.)
The models you picked are kind of old by llm standards so you could probably find something more performant and smarter. If you had cared about speed, I would have recommended a model derived from Qwen3.5 9b.
I recommend you try qwen 3.8 27b, specifically the Unsloth iq4 version from huggingface. When you run it with llama.cpp, set the parameters to quantize the kv cache (the params are
-ctk q8_0 -ctv q8_0) and the set the context to the model max of 262144 with-c 262144. This model will be orders of magnitude smarter than the ones you listed.If you find that model too slow, try qwen3.5 35b which has fewer active parameters. Again, look for a Unsloth q4_k version and the params I mentioned. This will be pretty good but will be faster on your system.
To get this all running, you can find guides on the Unsloth website and you may find there are ways to make these models run faster better in a mixed ram/vram situation.
Good luck and ask more questions



