Skip to content
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

#590 Increase default , track changes in examples and documentation #971

Merged
merged 3 commits into from
Aug 8, 2024
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
4 changes: 2 additions & 2 deletions docs/en/sampling_params.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The `sampling_params` follows this format

```python
# The maximum number of output tokens
max_new_tokens: int = 16,
max_new_tokens: int = 128,
# Stop when hitting any of the strings in this list.
stop: Optional[Union[str, List[str]]] = None,
# Sampling temperature
Expand Down Expand Up @@ -90,7 +90,7 @@ response = requests.post(
"text": "The capital of France is",
"sampling_params": {
"temperature": 0,
"max_new_tokens": 256,
"max_new_tokens": 32,
},
"stream": True,
},
Expand Down
4 changes: 2 additions & 2 deletions python/sglang/lang/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def run_internal(
def run(
self,
*,
max_new_tokens: int = 16,
max_new_tokens: int = 128,
stop: Union[str, List[str]] = (),
temperature: float = 1.0,
top_p: float = 1.0,
Expand Down Expand Up @@ -155,7 +155,7 @@ def run_batch(
self,
batch_kwargs,
*,
max_new_tokens: int = 16,
max_new_tokens: int = 128,
stop: Union[str, List[str]] = (),
temperature: float = 1.0,
top_p: float = 1.0,
Expand Down
6 changes: 3 additions & 3 deletions python/sglang/lang/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@dataclasses.dataclass
class SglSamplingParams:
max_new_tokens: int = 16
max_new_tokens: int = 128
stop: Union[str, List[str]] = ()
temperature: float = 1.0
top_p: float = 1.0
Expand Down Expand Up @@ -140,7 +140,7 @@ def bind(self, **kwargs):
def run(
self,
*args,
max_new_tokens: int = 16,
max_new_tokens: int = 128,
stop: Union[str, List[str]] = (),
temperature: float = 1.0,
top_p: float = 1.0,
Expand Down Expand Up @@ -179,7 +179,7 @@ def run_batch(
self,
batch_kwargs,
*,
max_new_tokens: int = 16,
max_new_tokens: int = 128,
stop: Union[str, List[str]] = (),
temperature: float = 1.0,
top_p: float = 1.0,
Expand Down
2 changes: 1 addition & 1 deletion python/sglang/srt/sampling_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class SamplingParams:
def __init__(
self,
max_new_tokens: int = 16,
max_new_tokens: int = 128,
stop: Optional[Union[str, List[str]]] = None,
temperature: float = 1.0,
top_p: float = 1.0,
Expand Down
2 changes: 1 addition & 1 deletion scripts/deprecated/test_curl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ curl http://localhost:30000/generate \
-d '{
"text": "Once upon a time,",
"sampling_params": {
"max_new_tokens": 16,
"max_new_tokens": 64,
"temperature": 0
}
}'
2 changes: 1 addition & 1 deletion scripts/deprecated/test_httpserver_llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def test_concurrent(args):
"image_data": "example_image.png",
"sampling_params": {
"temperature": 0,
"max_new_tokens": 16,
"max_new_tokens": 64,
},
},
)
Expand Down
Loading