OpenCode Edits Fail

#113
by Rieker - opened

First off, I am positively surprised how smart this rather small dense model behaves. I tested it for some weeks on code analysis tasks now, and to me it's currently the best model for this specific task in the <= 128GB (V)RAM domain.

I wonder though, has anybody got this model working somewhat reliably with opencode?

I am using vLLM, and so far I was only able to use this model for read-only tasks with opencode. When it comes to actually edit files though, it basically always ends up in corrupting the sources as soon as it has to edit more than a few lines per diff chunk.

Some of the non-resolved issues I observe:

  • chunk inserts at wrong file locations
  • wrong indents, confusing tabs with spaces
  • wrong quotes on tool calls
  • exact same chunks inserted multiple times
  • tool calls like <|tool_call>call:read{filePath:<|"|>/some/file.c<|"|>,limit:200,offset:4300}<tool_call|> ending up as raw strings in the content blob.
  • tool call loops stop unexpectedly (e.g. it typically says a short sentence like "Next I am going to ... ." and then right at the end of the sentence it stops the tool loop.
  • Unexpected filler tokens in the middle of sentences, especially "la-la-la-" and "S_S_S_S".
  • Repeating exact same logical mistakes and confusing issues that were already fixed during the session (maybe a KV cache precision drift over longer context?)
  • reading entire huge source files instead of just partially reading them, leading to filling up the context in very short time

Issues that I encountered before that are either fixed or mitigated:

  • high rate of hallucinating non-existing variables/arguments (mitigated by reducing temperature to max. 0.6, using 0.2 right now).

Some of the issues get worse with the assistant draft model, so in the last weeks I tested without speculative decoding.

The interesting part for me is that when I ask the model to dump a diff of its suggested changes, that appears to be flawless all the time.

Rieker changed discussion title from opencode edits fail to OpenCode Edits Fail

Sign up or log in to comment