Issues / #1950
#1950 0.1.42: stop match in assistant prefill ends generation with finish=stop
open · @antoniovitale · 0 comentários · No GitHub
Server & APINVIDIA / CUDAModels & quantsWindows
Descrição
Environment: Strata 0.1.42 release binary with `serve/server.py` at the same tag, Windows 11, RTX 5070 12 GB, single GPU. Reproduced with two models and their stock configs (Swift IQ2_XS, IQ3_XXS). Did not occur on 0.1.39 with the same stop list and full prompt shape.
Repro (`<served-model>` = the loaded model name):
```bash
curl -s http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"<served-model>","messages":[{"role":"user","content":"Write the body."},{"role":"assistant","content":"Here:\n```python\nfrom typing import List\n\n\ndef f(x):\n pass\n"}],"max_tokens":2048,"temperature":0,"reasoning_budget_tokens":1024,"stream":true,"stop":["\ndef"]}'
```
Expected: the model continues the body. Actual: `finish_reason: stop` after ~35 served chars (fence and imports echo). The served text contains no newline-`def`.
Notes, each run repeatedly with identical results:
- `"stop": []` or an impossible stop string: full correct body.
- `["\ndef"]`: 35-char stub. Same on the 337-token variant of this prompt.
- `["\nclass"]` on the same prompt: full 550-char body.
- `"\ndef"` in the user message only, or `"\n#"` in a prefill: full answers.
- `stream: false` and omitting the budget key give the same result on the full prompt.
Effect: any client that prefills the assistant turn and passes code stops gets truncated completions with a `stop` finish reason.No site
Links install, modelos, releases.