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
e444c13f
Unverified
Commit
e444c13f
authored
May 07, 2025
by
ishandhanani
Committed by
GitHub
May 07, 2025
Browse files
feat(engine): add bootstrap parameters to generate methods (dynamo) (#6075)
parent
fee37d9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
python/sglang/srt/entrypoints/engine.py
python/sglang/srt/entrypoints/engine.py
+12
-0
No files found.
python/sglang/srt/entrypoints/engine.py
View file @
e444c13f
...
...
@@ -163,6 +163,9 @@ class Engine(EngineBase):
custom_logit_processor
:
Optional
[
Union
[
List
[
str
],
str
]]
=
None
,
return_hidden_states
:
bool
=
False
,
stream
:
bool
=
False
,
bootstrap_host
:
Optional
[
Union
[
List
[
str
],
str
]]
=
None
,
bootstrap_port
:
Optional
[
Union
[
List
[
int
],
int
]]
=
None
,
bootstrap_room
:
Optional
[
Union
[
List
[
int
],
int
]]
=
None
,
)
->
Union
[
Dict
,
Iterator
[
Dict
]]:
"""
The arguments of this function is the same as `sglang/srt/managers/io_struct.py::GenerateReqInput`.
...
...
@@ -181,6 +184,9 @@ class Engine(EngineBase):
custom_logit_processor
=
custom_logit_processor
,
return_hidden_states
=
return_hidden_states
,
stream
=
stream
,
bootstrap_host
=
bootstrap_host
,
bootstrap_port
=
bootstrap_port
,
bootstrap_room
=
bootstrap_room
,
)
loop
=
asyncio
.
get_event_loop
()
generator
=
self
.
tokenizer_manager
.
generate_request
(
obj
,
None
)
...
...
@@ -227,6 +233,9 @@ class Engine(EngineBase):
lora_path
:
Optional
[
List
[
Optional
[
str
]]]
=
None
,
custom_logit_processor
:
Optional
[
Union
[
List
[
str
],
str
]]
=
None
,
stream
:
bool
=
False
,
bootstrap_host
:
Optional
[
Union
[
List
[
str
],
str
]]
=
None
,
bootstrap_port
:
Optional
[
Union
[
List
[
int
],
int
]]
=
None
,
bootstrap_room
:
Optional
[
Union
[
List
[
int
],
int
]]
=
None
,
)
->
Union
[
Dict
,
AsyncIterator
[
Dict
]]:
"""
The arguments of this function is the same as `sglang/srt/managers/io_struct.py::GenerateReqInput`.
...
...
@@ -244,6 +253,9 @@ class Engine(EngineBase):
lora_path
=
lora_path
,
stream
=
stream
,
custom_logit_processor
=
custom_logit_processor
,
bootstrap_host
=
bootstrap_host
,
bootstrap_port
=
bootstrap_port
,
bootstrap_room
=
bootstrap_room
,
)
generator
=
self
.
tokenizer_manager
.
generate_request
(
obj
,
None
)
...
...
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