Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
c62d560c
Unverified
Commit
c62d560c
authored
Aug 08, 2024
by
foszto
Committed by
GitHub
Aug 08, 2024
Browse files
#590 Increase default , track changes in examples and documentation (#971)
Co-authored-by:
Ying Sheng
<
sqy1415@gmail.com
>
parent
2b8257f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
docs/en/sampling_params.md
docs/en/sampling_params.md
+2
-2
python/sglang/lang/compiler.py
python/sglang/lang/compiler.py
+2
-2
python/sglang/lang/ir.py
python/sglang/lang/ir.py
+3
-3
python/sglang/srt/sampling_params.py
python/sglang/srt/sampling_params.py
+1
-1
scripts/deprecated/test_curl.sh
scripts/deprecated/test_curl.sh
+1
-1
scripts/deprecated/test_httpserver_llava.py
scripts/deprecated/test_httpserver_llava.py
+1
-1
No files found.
docs/en/sampling_params.md
View file @
c62d560c
...
...
@@ -33,7 +33,7 @@ The `sampling_params` follows this format
```
python
# The maximum number of output tokens
max_new_tokens
:
int
=
1
6
,
max_new_tokens
:
int
=
1
28
,
# Stop when hitting any of the strings in this list.
stop
:
Optional
[
Union
[
str
,
List
[
str
]]]
=
None
,
# Sampling temperature
...
...
@@ -90,7 +90,7 @@ response = requests.post(
"text"
:
"The capital of France is"
,
"sampling_params"
:
{
"temperature"
:
0
,
"max_new_tokens"
:
2
56
,
"max_new_tokens"
:
3
2
,
},
"stream"
:
True
,
},
...
...
python/sglang/lang/compiler.py
View file @
c62d560c
...
...
@@ -125,7 +125,7 @@ class CompiledFunction:
def
run
(
self
,
*
,
max_new_tokens
:
int
=
1
6
,
max_new_tokens
:
int
=
1
28
,
stop
:
Union
[
str
,
List
[
str
]]
=
(),
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
...
@@ -155,7 +155,7 @@ class CompiledFunction:
self
,
batch_kwargs
,
*
,
max_new_tokens
:
int
=
1
6
,
max_new_tokens
:
int
=
1
28
,
stop
:
Union
[
str
,
List
[
str
]]
=
(),
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
...
python/sglang/lang/ir.py
View file @
c62d560c
...
...
@@ -16,7 +16,7 @@ REGEX_STRING = r"\"[\w\d\s]*\"" # bugs with regex r"\".*\"" in interegular pkg
@
dataclasses
.
dataclass
class
SglSamplingParams
:
max_new_tokens
:
int
=
1
6
max_new_tokens
:
int
=
1
28
stop
:
Union
[
str
,
List
[
str
]]
=
()
temperature
:
float
=
1.0
top_p
:
float
=
1.0
...
...
@@ -140,7 +140,7 @@ class SglFunction:
def
run
(
self
,
*
args
,
max_new_tokens
:
int
=
1
6
,
max_new_tokens
:
int
=
1
28
,
stop
:
Union
[
str
,
List
[
str
]]
=
(),
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
...
@@ -179,7 +179,7 @@ class SglFunction:
self
,
batch_kwargs
,
*
,
max_new_tokens
:
int
=
1
6
,
max_new_tokens
:
int
=
1
28
,
stop
:
Union
[
str
,
List
[
str
]]
=
(),
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
...
python/sglang/srt/sampling_params.py
View file @
c62d560c
...
...
@@ -23,7 +23,7 @@ _SAMPLING_EPS = 1e-6
class
SamplingParams
:
def
__init__
(
self
,
max_new_tokens
:
int
=
1
6
,
max_new_tokens
:
int
=
1
28
,
stop
:
Optional
[
Union
[
str
,
List
[
str
]]]
=
None
,
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
...
scripts/deprecated/test_curl.sh
View file @
c62d560c
...
...
@@ -3,7 +3,7 @@ curl http://localhost:30000/generate \
-d
'{
"text": "Once upon a time,",
"sampling_params": {
"max_new_tokens":
1
6,
"max_new_tokens": 6
4
,
"temperature": 0
}
}'
scripts/deprecated/test_httpserver_llava.py
View file @
c62d560c
...
...
@@ -36,7 +36,7 @@ async def test_concurrent(args):
"image_data"
:
"example_image.png"
,
"sampling_params"
:
{
"temperature"
:
0
,
"max_new_tokens"
:
1
6
,
"max_new_tokens"
:
6
4
,
},
},
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment