r/LocalLLM • u/AsepticVoid • 5h ago
Question Uncensored local LLMs losing context in long coding sessions, plus sprite generation? (Ollama, RTX 3060 12 GB, LÖVE2D)
Hi everyone,
I'm just starting out with local LLMs through Ollama, hoping to lay the groundwork for a future game built with LÖVE2D. Since I want full creative freedom over the game's themes, I'm only looking at uncensored (abliterated) models.
My hardware is an Intel i5-10400, 32 GB of DDR4 RAM and an RTX 3060 with 12 GB of VRAM. So far I've been using 14B quantized models, like a Qwen3 14B abliterated at Q4_K_M with an 8k context, to keep everything on the GPU.
The problem is that they lose the thread quickly. After a handful of prompts they forget my initial instructions, the project structure and even code they wrote a few messages earlier, which makes iterating on a game really frustrating.
Can you recommend local uncensored models that hold context better and still handle Lua/LÖVE2D well? Are there settings I'm overlooking, like context size, quantization, KV cache options or system prompt tricks? And if you have a workflow that works for game dev, such as feeding the model a project summary at the start of each session, I'd love to hear it.
I'd also like help with the visual side. I know text-only LLMs can't generate images, so what would you suggest for sprites: a multimodal model, a separate local generator that works well for pixel art on 12 GB of VRAM, or something else?
The only hard requirement is that everything stays uncensored. Any advice or personal experience is hugely appreciated. Thank you!
8
u/yucca_xz 5h ago
get rid of ollama
3
u/sirloindenial 4h ago
I suggest going unsloth studio its much more feature complete but still have similar way of working
2
u/stay_fr0sty 5h ago
Context has to fit in your VRAM. So you need a smaller model to fit in your 12GB if you want a long context.
You’ll just have to download various quants and fine tunes until you find one that works for you.
You will definitely sacrifice “intelligence” for context size. You need to find a happy medium, that likely dies both poorly, but is at least usable.
1
u/RogerAI--fyi 5h ago
what are you working on needing uncensored models for coding?
1
u/locbuilds 4h ago
8k context is the real problem, a few code prompts fill it and the start gets cut off. set OLLAMA_FLASH_ATTENTION=1 and OLLAMA_KV_CACHE_TYPE=q8_0 so the cache takes half the vram, then bump num_ctx to 16k or so and paste a short project summary at the top of each session.
1
u/corkiejp 4h ago
What utility or agent are you using to access ollama with. To keep context of your chat access through opencode/Pi agent and it will remember your chat history.
As other suggested run llama.cpp and server directly instead of ollama?
1
u/LinkiooN 2h ago
i'd say for agentic coding, minimum of 128k context is necessary unfortunately and using llama.cpp or other lighter and newer engines can help a lot
use some free models from opencode or other providers to set it up properly and locally on your system, and try to research models for GPUs with 8GB VRAM, that way you can have better chance at having models that you can use with larger context windows and probably the newer models are better than qwen3 as well.
1
u/rkcth 2h ago edited 2h ago
Use something that supports refusal vectors, and toss the uncensored model. I’ll be putting out a PR at some point for vLLM (and it’s also present in my codeberg fork of radiance called Radiance Omni that I’m adding NVIDIA support to), it only runs the refusal vector when the model is actually about to refuse, this prevents the dumbing down effect that uncensoring causes.
Edit: There are a lot of other really powerful things you can do with this basic idea and that is also in my fork. I’ll be adding a ton of models and adding better NVIDIA support as we go (if anyone wants to help please don’t hesitate).
1
u/OccamsError 16m ago
It's your context window, not the model. A 14B Q4 eats most of your 12GB VRAM, so Ollama falls back to a tiny default window and your earlier instructions drop out. Drop to a 7-8B abliterated so you can fit a 16-32k window on GPU, and re-paste a short project summary at the start of each session.