Skip to content

Qwen3.5 waiting 3 seconds after generating. #77

Description

@Moon-404
stream = self.llm.create_chat_completion(messages=messages, stream=True, max_tokens=32768, temperature=temperature, top_k=20, top_p=top_p, min_p=0, present_penalty=1.5, repeat_penalty=1.0)
res = ""
for chunk in stream:
    if "choices" in chunk and len(chunk["choices"]) > 0:
        delta = chunk["choices"][0]["delta"]
        if "content" in delta:
            text = delta["content"]
            print(text, end="", flush=True)
            res += text
print("finish")

When stream stop generating more text, it seems need 3 seconds to finish loop and print "finish". However in Qwen3 and older llama-cpp-python version, this problem does not exist. Is this a bug or an intended feature?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions