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
34c32d28
Unverified
Commit
34c32d28
authored
Oct 05, 2024
by
Byron Hsu
Committed by
GitHub
Oct 05, 2024
Browse files
Fix styling (#1583)
parent
dde8bb16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
python/sglang/lang/ir.py
python/sglang/lang/ir.py
+2
-2
python/sglang/srt/sampling/sampling_params.py
python/sglang/srt/sampling/sampling_params.py
+2
-2
No files found.
python/sglang/lang/ir.py
View file @
34c32d28
...
@@ -150,7 +150,7 @@ class SglFunction:
...
@@ -150,7 +150,7 @@ class SglFunction:
self
,
self
,
*
args
,
*
args
,
max_new_tokens
:
int
=
128
,
max_new_tokens
:
int
=
128
,
stop
:
Union
[
str
,
List
[
str
]]
=
None
,
stop
:
Optional
[
Union
[
str
,
List
[
str
]]
]
=
None
,
stop_token_ids
:
Optional
[
List
[
int
]]
=
None
,
stop_token_ids
:
Optional
[
List
[
int
]]
=
None
,
temperature
:
float
=
1.0
,
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
@@ -199,7 +199,7 @@ class SglFunction:
...
@@ -199,7 +199,7 @@ class SglFunction:
batch_kwargs
,
batch_kwargs
,
*
,
*
,
max_new_tokens
:
int
=
128
,
max_new_tokens
:
int
=
128
,
stop
:
Union
[
str
,
List
[
str
]]
=
None
,
stop
:
Optional
[
Union
[
str
,
List
[
str
]]
]
=
None
,
stop_token_ids
:
Optional
[
List
[
int
]]
=
None
,
stop_token_ids
:
Optional
[
List
[
int
]]
=
None
,
temperature
:
float
=
1.0
,
temperature
:
float
=
1.0
,
top_p
:
float
=
1.0
,
top_p
:
float
=
1.0
,
...
...
python/sglang/srt/sampling/sampling_params.py
View file @
34c32d28
...
@@ -41,8 +41,6 @@ class SamplingParams:
...
@@ -41,8 +41,6 @@ class SamplingParams:
n
:
int
=
1
,
n
:
int
=
1
,
json_schema
:
Optional
[
str
]
=
None
,
json_schema
:
Optional
[
str
]
=
None
,
)
->
None
:
)
->
None
:
if
stop_token_ids
is
None
:
stop_token_ids
=
[]
self
.
temperature
=
temperature
self
.
temperature
=
temperature
self
.
top_p
=
top_p
self
.
top_p
=
top_p
self
.
top_k
=
top_k
self
.
top_k
=
top_k
...
@@ -51,6 +49,8 @@ class SamplingParams:
...
@@ -51,6 +49,8 @@ class SamplingParams:
self
.
presence_penalty
=
presence_penalty
self
.
presence_penalty
=
presence_penalty
self
.
repetition_penalty
=
repetition_penalty
self
.
repetition_penalty
=
repetition_penalty
self
.
stop_strs
=
stop
self
.
stop_strs
=
stop
if
stop_token_ids
is
None
:
stop_token_ids
=
[]
self
.
stop_token_ids
=
{
*
stop_token_ids
}
self
.
stop_token_ids
=
{
*
stop_token_ids
}
self
.
max_new_tokens
=
max_new_tokens
self
.
max_new_tokens
=
max_new_tokens
self
.
min_new_tokens
=
min_new_tokens
self
.
min_new_tokens
=
min_new_tokens
...
...
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