News for hackers. Stuff that matters.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by anotherpaulg on Sunday January 26, 2025 @04:51PM (#42834527)
In my experience with AI coding, very large context windows aren't useful in practice. Every model seems to get confused when you feed them more than ~25-30k tokens. The models stop obeying their system prompts, can't correctly find/transcribe pieces of code in the context, etc.

Developing aider, I've seen this problem with gpt-4o, Sonnet, DeepSeek, etc. Many aider users report this too. It's perhaps the #1 problem users have, so I created a dedicated help page [0].

Very large context may be useful for certain tasks with lots of "low value" context. But for coding, it seems to lure users into a problematic regime.

[0] https://aider.chat/docs/troubleshooting/edit-errors.html#don...

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by adamgordonbell on Sunday January 26, 2025 @05:44PM (#42834996)
Aider is great, but you need specific formats from the llm. That might be where the challenge is.

I've used the giant context in Gemini to dump a code base and say: describe the major data structures and data flows.

Things like that, overview documents, work great. It's amazing for orienting in an unfamiliar codebase.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by anotherpaulg on Sunday January 26, 2025 @06:22PM (#42835368)
Yes, that is true. Aider expects to work with the LLM to automatically apply edits to the source files. This requires precision from the LLM, which is what breaks down when you overload them with context.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by noname120 on Monday January 27, 2025 @11:25AM (#42842763)
Not true. In Aider the patch produced by the LLM is sent to a second model that is just tasked with fixing the patch — it works wonders.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by anotherpaulg on Monday January 27, 2025 @12:18PM (#42843365)
Yes, aider can also work in architect/editor mode [0] which tends to produce the best results [1]. An architect model solves the coding problem and describes the needed changes however comes naturally to it. The editor model then takes that solution and turns it into correctly formatted instructions to edit the files.

Too much context can still confuse the LLMs in this situation, but they may be somewhat more resilient.

[0] https://aider.chat/2024/09/26/architect.html

[1] https://aider.chat/2025/01/24/r1-sonnet.html

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by trentnelson on Monday January 27, 2025 @12:00PM (#42843159)
Based on an earlier comment, I think the person you're replying to is the author of aider.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by lifty on Sunday January 26, 2025 @05:09PM (#42834709)
Thanks for aider! It has become an integral part of my workflow. Looking forward to try DeepSeek in architect mode with Sonnet as the driver. Curious if it will be a noticeable improvement as compared to using Sonnet by itself.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by anotherpaulg on Sunday January 26, 2025 @06:23PM (#42835388)
I'm guessing you're interesting in R1+Sonnet because of the recent SOTA benchmark result? It does seem to be a powerful architect/editor combo.

https://aider.chat/2025/01/24/r1-sonnet.html

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by seunosewa on Sunday January 26, 2025 @05:41PM (#42834969)
The behaviour you described is what happens when you have small context windows. Perhaps you're feeding the models with more tokens than you think you are. I have enjoyed loading large codebases into AI Studio and getting very satisfying and accurate answers because the models have 1M to 2M token context windows.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by dr_kiszonka on Sunday January 26, 2025 @07:42PM (#42835998)
How do you get those large codebases into AI Studio? Concat everything into one big file?
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by adamgordonbell on Sunday January 26, 2025 @08:35PM (#42836387)
Basically yes, I have a helper program, but that's mainly what it does.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by social_quotient on Sunday January 26, 2025 @09:23PM (#42836706)
Concat to a file but it helps to make an ascii tree at the top and then for each merged file out its path and orientation details. I’ve also started playing with adding line ranges to the ascii tree hoping that the LLMs (more specifically the agentic ones) start getting smart enough to jump to the relevant section.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by msoad on Sunday January 26, 2025 @09:25PM (#42836720)
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by cma on Sunday January 26, 2025 @05:18PM (#42834786)
Claude works incredibly well for me with asking for code changes to projects filling up 80% of context (160K tokens). It's way expensive with the API though but reasonable through the web interface with pro.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by Yusefmosiah on Monday January 27, 2025 @01:07AM (#42837931)
It’s not just the quantity of tokens in context that matters, but the coherence of the concepts in the context.

Many conflicting ideas are harder for models to follow than one large unified idea.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by torginus on Monday January 27, 2025 @02:34AM (#42838365)
Yeah, and thanks to the features of the programming language, it's very easy to automatically assemble a highly relevant but short context, just by following symbol references recursively.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by arkh on Monday January 27, 2025 @02:44AM (#42838433)
My hypothesis is code completion is not a text completion problem. More of a graph completion one.

So we may have got to a local maximum regarding code helpers with LLMs and we'll have to wait for some breakthrough in the AI field before we get something better.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by raincole on Monday January 27, 2025 @03:05AM (#42838590)
But these models don't work that well even for text when you gave them a huge context. They're reasonably good at summarization, but if you ask them to "continue the story" they will write very inconsistent things (eerily similar to what a sloppy human writer does, though.)
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by meiraleal on Monday January 27, 2025 @07:55AM (#42840633)
We should be able to provide 2 fields, context and prompt so the prompt gets higher priority and don't get mixed with the whole context.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by meiraleal on Monday January 27, 2025 @07:53AM (#42840622)
For this breakthrough to happen, big tech will need to hire software engineers again :)

But the good thing is that DeepSeek proved those breakthroughs are going to happen one way or another, fast.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by orbital-decay on Monday January 27, 2025 @08:04AM (#42840709)
Overall accuracy degradation on longer contexts is just one major issue. Another is that lost-in-the-middle problem starts being much worse on longer contexts, so when it significantly exceeds the length of model's training examples, the tokens in the middle might as well not exist.
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by NiloCK on Monday January 27, 2025 @09:46AM (#42841639)
I learned this very explicitly recently. I've had some success with project and branch prompts - feeding a bunch of context into the beginning of each dialog.

In one dialog, some 30k tokens later, Claude requested the contents of package.json... which was in the context window already - the whole file!

The strange thing was that after I said so, without re-inserting, Claude successfully read it from context to fill the gap in what it was trying to do.

It's as if a synopsis of what exists in-context delivered with each message would help. But that feels weird!

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by cyanydeez on Monday January 27, 2025 @04:37PM (#42845930)
That's what these char models are already doing.

Most chat is just a long running prompt. LLMs have zero actual memory. You just keep feeding it history.

Maybe I misunderstood what you're saying but what you're describing is some kind of 2nd model that condenses that history and that gets fed; this has been done.

Really, what you probably need is another model managing the heap and the stack of the history and brining forward the current context.

But that's easy to say because we are humans.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by NiloCK on Tuesday January 28, 2025 @07:49AM (#42851711)
To clarify:

I didn't 'fix' the problem by re-inserting the package.json. I just gave a reminder that it that it was already in context.

"I could confirm this root cause if I could see the contents of package.json".

"You can see it."

"Whoops, yes. Package x needs to bump from n to n+1."

The point being, even info inside the current context can actively be overlooked unless it is specifically referenced.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by DiogenesKynikos on Monday January 27, 2025 @09:51AM (#42841689)
Maybe the problem is that the "UI" we're providing to the LLMs is not very useful.

Imagine dumping the entire text of a large code repository in front of a human programmer, and asking them to fix a bug. Human programmers use IDEs, search through the code, flip back and forth between different functions, etc. Maybe with a better interface that the LLM could interact with, it would perform better.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by cyanydeez on Monday January 27, 2025 @04:42PM (#42845973)
I wonder if you could figure out a pseudo code like python. I'd think yaml might work also

Something: Filename: index.js Content: | Class Example...

Another item would be some kind of hyperlinking. Maybe you could load in a hrefs but there might be a more semantically popular way, but the data feeding these AIs just aren't constructed like that.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by badlogic on Monday January 27, 2025 @09:53AM (#42841713)
I concur. In my work (analysing news show transcripts and descriptions), I work with about 250k input tokens max. Tasks include:

- Summarize topics (with references to shows) - Find quotes specific to a topic (again with references)

Anything above 32k tokens fails to have acceptable recall, across GPT-4o, Sonnet, and Google's Gemini Flash 1.5 and 2.0.

I suppose it kind of makes sense, given how large context windows are implemented via things like sparse attention etc.

Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by kgeist on Monday January 27, 2025 @02:36PM (#42844773)
What could be the reason? Do they selectively skip tokens to make it appear they support the full context?
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by ksynwa on Monday January 27, 2025 @11:13AM (#42842635)
Any idea why this happens?
Re:Qwen2.5-1M: Deploy your own Qwen with context length up t... by jingyibo123 on Monday February 03, 2025 @02:26AM (#42915815)
In my own experience with openAI's gpt-4o, when feeding with long input, the model simply 'strips' the starting content and answers, while it should output error for more 'accurate' feedback. I switched to my own deployed model for that purpose.

That's a product choice from openAI, not a problem with LLM's long context window input capability.