Skip to content

[Bug] deepseek r1 671B output content only has </think> tags but no <think> tags #3620

@jt-z

Description

@jt-z

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • 5. Please use English, otherwise it will be closed.

Describe the bug

Input: Hello
Output, such as
Okay, the user wrote \"hello\". That's a friendly greeting. I should respond in a warm and welcoming manner. Let me make sure to keep it open-ended so they feel comfortable to ask anything they need. Maybe something like, \"Hello! How can I assist you today?\" That sounds good. Keep it simple and helpful.\n</think>\n\nHello! How can I assist you today? 😊
There is only '' but not '' in the output content.

The model runs normally and responds normally: [2025-02-17 03:38:39] INFO: 10.198.10.4:55704- "POST /v1/chat/completions HTTP/1.1" 200 OK

Reproduction

Use the dual-node 8xH100 to run the deepseek r1 671B model, send restful api requests normally and get the model's answer.

use this command:

# Launch
# node 1
docker run --gpus all \
    --shm-size 32g \
    --network=host \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    --name sglang_multinode1 \
    -it \
    --rm \
    --env "HF_TOKEN=$HF_TOKEN" \
    --ipc=host \
    lmsysorg/sglang:latest \
    python3 -m sglang.launch_server --model-path deepseek-ai/DeepSeek-R1 --tp 16 --dist-init-addr 192.168.114.10:20000 --nnodes 2 --node-rank 0 --trust-remote-code --host 0.0.0.0 --port 40000

Environment

sglang: 0.4.2.post3
flashinfer: 0.2.0.post2+cu124torch2.5     
fastapi: 0.115.8
hf_transfer: 0.1.9 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions