you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 6 hours ago (2 children)

I'm always running into context limit problems

Wanted to refactor a too large and hectic hacked together state machine into separate functions and reduce redundancy and increase code readability

Every model I've tried failed.

And that should be an easy task an actual AI should be able to handle. Logic is done, just translate to a different structure.
That should be exactly what they are able to do at least.

None worked, because the project is just to big and interlinked.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 4 hours ago* (last edited 1 hour ago)

    More Ram, and break stuff up into smaller pieces. I Have 12Gb of VRAM and 64 Gig System Ram, which - with CPU offloading - allows pretty large models to be used at acceptable speed (although probably not fast enough for someone who wants to make his living with it. But these also will invest in dedicated hardware). And i let a larger model sit there to coordinate, and let it use subagents for the rest. That keeps the Context for the main model a lot more manageable and keeps it on track for a pretty long time.

    How you structure the Task is more important than what the task is at all. For example, i have a huge list of games to be catalogued, and just telling the model to search the web and fill in the blanks in the database makes it crap out pretty soon. But I tell it to let subagents handle everything regarding web search and data extraction and just let them hand back the resulting data. the main model then calls another subagent to sanity check the data and update the database. Each of these subagents do not run for long, and therefor never run out of context, while the main model can keep context size manageable because it does not have to work with "messy" data at all.

  • source
  • parent
  • [–] 9 points 6 hours ago

    I've got 24GB of VRAM, which helps a lot. I'm using the Q4_K_M version of this model, with the KV cache quantized to Q8, and that's able to get me to 128000 tokens of context. I'm using the Qwen Code harness in VS Code.

    If 128000 tokens still isn't enough, break the task down into smaller chunks and help the harness out with MCP tools - I installed Codebase Memory to help it navigate large codebases more efficiently, for example. Ask the coding agent what's causing problems and it may be able to help identify solutions too, I've had it troubleshoot itself several times now and it's been quite good at inspecting its own settings and finding where the problems are with them. I even installed Firecrawl for it so it can do its own web searches.

  • source
  • parent