You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 88407d1
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cuda): stop strings on every CUDA engine; ignore_eos and stop checked before a stream opens
- The CUDA server reads `stop` (a string or a list) and cuts the reply token by token: at the first token whose
text completes a stop string, the reply's tokens end there, on_tokens returns True, and the match and everything
after it are left out. Drafted rounds of many tokens and "draft": false rounds of one therefore give the same
content, usage and token_sha. With return_token_ids, the ids listed end at the same token.
- The 27B (one GPU and two ranks), and Flash Next and Nemotron on one GPU, stop in the round that holds the match;
concurrent streams stop after a later round. GLM, and Flash Next and Nemotron on two ranks, decode on to an
end token or the reply limit, and the server returns the reply only up to the match.
- Streamed deltas hold back an end that may begin a stop string, as on the Mac (StopPolicy.visible); stop strings
match the generated text, reasoning included, before it is split; tool calls are parsed from the cut text.
- A non-boolean ignore_eos or a malformed stop is refused with HTTP 400 before any stream bytes (stop_options, as
on the Mac).
- Where the engine reads ignore_eos (GLM), end tokens inside the reply are text, as on the Mac, and finish_reason is
"length" unless a stop string or a tool call ended the reply.
- docs/api.md: stop on both backends.
(cherry picked from commit 66339f9)
0 commit comments