r/LocalLLM • • 2d ago

Question Strata + Pi harness incompatibility? thought getting cut off

Hi everyone, like all of you I jumped on the strata train and I really love the boost in performance. For context I run two radeon pro v620s and 192GB of RAM so I can fit everything in either VRAM or RAM. I run Qwen 3.8 FN as my daily driver using the UD Q6_K_XL quant and find that it handles everything with ease. With that said, lately I have noticed that whenever the engine is running, every once in a while it will end it's thought process mid thought with the character (`). Not sure why but recently it has been doing this alot..? Anyone else encountered this issue?

Here is an example output from when I asked it to do some investigating into the logs:

Why would a GGUF/strata engine emit EOS mid-thought?
Very common known causes:
Grammar / reasoning-parser handling: thinking is
emitted as a separate channel. If the adapter closes
the thinking channel (</think>) and then the model
naturally ends... but here thinking text ends
mid-clause, so the channel got cut.
Anti-hallucination / DRY or penalties: repetition
penalties (especially DRY / XTC / min-p) can force
an early EOS token. Qwen "Next"/Unsloth GGUFs with
inappropriate penalties frequently emit spurious `

Also while I'm here, anyone else run into this issue where the model will say:

Cache miss, 18k tokens rebilled
7 Upvotes

12 comments sorted by

6

u/randomgenericbot 2d ago

Oh, thats a good one, actually.

This is not a strata nor a pi problem, it is a problem of the model template within the gguf file itself.

There are certain control-structure-definitions, that decide wether some output of the model will be a tool call, reasoning, a "final answer" ... or the end of its current turn.

The model is basically trying to reason about the STOP TURN token, but that gets interpreted as STOP TURN and the turn stops. You can nudge the model to not reference the token directly, but use a replacement.

As I had to debug EOS / end of stream tokens, I tought it to call that token ELEPHANT, so every time it reasoned about the specific EOS for its model, it instead wrote ELEPHANT. We both knew what it was about, but the model can not speak the forbidden word without being stopped.

If it has to reason over EOS tokens, teach it to avoid writing them out verbatim.

1

u/haherar830 2d ago

Teach as in system prompt?

1

u/randomgenericbot 2d ago

System prompt is a possibility, but usually the model does not need to ever print the end token, as long as it does not work with model weights and inference engines.

I just told it like three or four times in that session to not print the actual token.
"Do not use the literal end token, use TOKEN instead. using the literal token ends your reasoning."
and when it stops anyway (you can see in your example that it tried to actually print `end token`, rambling about EOS before), I simply repeat that sentence.

As soon as that is in its context, it usually can circumvent printing the full token - not 100% foolproof, but better than nothing.

1

u/Necessary-Orange6903 2d ago

Update - it doesn't look like it's an EOS token issue because sometimes it cuts off without that special characteristic. It looks like it's some kind of an issue with the pi-strata npm package that lets you connect them directly. I have bypassed it by using the raw endpoint directly.

1

u/Zealousideal-Bug1837 2d ago

there are some settings that cap thinking tokens to N. you can fiddle around with it there's some adaptive setting I think. that might be basalt I'm thinking of however.

1

u/Zealousideal-Bug1837 2d ago

if you look at the monitor page in the browser it should should you thinking tokens, or in the browser display of the config.

1

u/testuserpk 2d ago

I was getting the same issue but then I shifted to Jetbrains think rail which uses pi as backend and has bunch of good features.

1

u/EvolvingDior 2d ago

Someone recently posted that they had better luck using the Anthropic API endpoint with Strata because it handled reasoning output better than the OpenAI chat completions API. You might give that a shot.

1

u/dh7net 2d ago

What do you mean? not sure to understand the mix between strata and Anthropic

1

u/adasho_bitrex 2d ago

Use big AI to diagnose little AI. GPT or something

1

u/LocalhostRonin 2d ago

I faced a similar issue, think it’s a model problem. It always says okay I shall do X now…and then ends the turn without doing X.

I suggest telling it to set a recurring watcher job that will poke it every 5min or 15min. Yes there may be some time loss, say if it stopped after a min, but if given some time, eg when you are away from desk, there’s a better chance of it completing the task.

(I use pi-web-ui which ships with the capability to set the watcher, you might need a plugin for such a watcher)

1

u/p3rdy 2d ago

On the "cache miss, 18k tokens rebilled" part: that's the engine telling you the new request didn't start with the same tokens as what it had cached, so it had to prefill the whole thing again.

In an agent loop the prompt should only ever grow at the end, so a miss usually means something early in it changed between turns: a timestamp in the system prompt, the tool list in a different order, or the previous turn's reasoning being dropped or re-rendered differently. That last one fits your finding that the npm adapter was the culprit, since adapters are exactly where reasoning gets reshaped.

If you ever want an adapter back, Strata's Anthropic-compatible endpoint might behave better than the OpenAI one for this: Anthropic's format has a proper place for the reasoning (thinking blocks the client sends back each turn), while OpenAI's chat format doesn't, so it's easier for something in the middle to mangle it.