Skip to content

[Docs]fix sampling docs 2.1 #3333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/features/sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ curl -X POST "http://0.0.0.0:9222/v1/chat/completions" \
{"role": "user", "content": "How old are you"}
],
"top_p": 0.8,
"top_k": 50
"top_k": 20
}'
```

Expand All @@ -117,7 +117,7 @@ response = client.chat.completions.create(
],
stream=True,
top_p=0.8,
top_k=50
extra_body={"top_k": 20, "min_p":0.1}
)
for chunk in response:
if chunk.choices[0].delta:
Expand Down Expand Up @@ -159,8 +159,7 @@ response = client.chat.completions.create(
],
stream=True,
top_p=0.8,
top_k=20,
min_p=0.1
extra_body={"top_k": 20, "min_p":0.1}
)
for chunk in response:
if chunk.choices[0].delta:
Expand Down
1 change: 1 addition & 0 deletions docs/offline_inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ For ```LLM``` configuration, refer to [Parameter Documentation](parameters.md).
* min_p(float): Minimum probability relative to the maximum probability for a token to be considered (>0 filters low-probability tokens to improve quality)
* max_tokens(int): Maximum generated tokens (input + output)
* min_tokens(int): Minimum forced generation length
* bad_words(list[str]): Prohibited words

### 2.5 fastdeploy.engine.request.RequestOutput

Expand Down
7 changes: 3 additions & 4 deletions docs/zh/features/sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ curl -X POST "http://0.0.0.0:9222/v1/chat/completions" \
{"role": "user", "content": "How old are you"}
],
"top_p": 0.8,
"top_k": 50
"top_k": 20
}'
```

Expand All @@ -118,7 +118,7 @@ response = client.chat.completions.create(
],
stream=True,
top_p=0.8,
extra_body={"top_k": 50}
extra_body={"top_k": 20}
)
for chunk in response:
if chunk.choices[0].delta:
Expand Down Expand Up @@ -161,8 +161,7 @@ response = client.chat.completions.create(
],
stream=True,
top_p=0.8,
extra_body={"top_k": 20},
min_p=0.1
extra_body={"top_k": 20, "min_p": 0.1}
)
for chunk in response:
if chunk.choices[0].delta:
Expand Down
1 change: 1 addition & 0 deletions docs/zh/offline_inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ for output in outputs:
* min_p(float): token入选的最小概率阈值(相对于最高概率token的比值,设为>0可通过过滤低概率token来提升文本生成质量)
* max_tokens(int): 限制模型生成的最大token数量(包括输入和输出)
* min_tokens(int): 强制模型生成的最少token数量,避免过早结束
* bad_words(list[str]): 禁止生成的词列表, 防止模型生成不希望出现的词

### 2.5 fastdeploy.engine.request.RequestOutput

Expand Down
Loading