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
4dce1cc6
Unverified
Commit
4dce1cc6
authored
Apr 21, 2025
by
Trevor Morris
Committed by
GitHub
Apr 22, 2025
Browse files
[PD] Add NIXL transfer backend (#5477)
parent
deded17f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
640 additions
and
0 deletions
+640
-0
python/sglang/srt/disaggregation/nixl/__init__.py
python/sglang/srt/disaggregation/nixl/__init__.py
+1
-0
python/sglang/srt/disaggregation/nixl/conn.py
python/sglang/srt/disaggregation/nixl/conn.py
+622
-0
python/sglang/srt/disaggregation/utils.py
python/sglang/srt/disaggregation/utils.py
+16
-0
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+1
-0
No files found.
python/sglang/srt/disaggregation/nixl/__init__.py
0 → 100644
View file @
4dce1cc6
from
.conn
import
NixlKVBootstrapServer
,
NixlKVManager
,
NixlKVReceiver
,
NixlKVSender
python/sglang/srt/disaggregation/nixl/conn.py
0 → 100644
View file @
4dce1cc6
This diff is collapsed.
Click to expand it.
python/sglang/srt/disaggregation/utils.py
View file @
4dce1cc6
...
...
@@ -47,6 +47,7 @@ class ReqToMetadataIdxAllocator:
class
TransferBackend
(
Enum
):
MOONCAKE
=
"mooncake"
NIXL
=
"nixl"
FAKE
=
"fake"
...
...
@@ -73,6 +74,21 @@ def get_kv_class(transfer_backend: TransferBackend, class_type: KVClassType):
KVClassType
.
BOOTSTRAP_SERVER
:
MooncakeKVBootstrapServer
,
}
return
class_mapping
.
get
(
class_type
)
if
transfer_backend
==
TransferBackend
.
NIXL
:
from
sglang.srt.disaggregation.nixl
import
(
NixlKVBootstrapServer
,
NixlKVManager
,
NixlKVReceiver
,
NixlKVSender
,
)
class_mapping
=
{
KVClassType
.
MANAGER
:
NixlKVManager
,
KVClassType
.
SENDER
:
NixlKVSender
,
KVClassType
.
RECEIVER
:
NixlKVReceiver
,
KVClassType
.
BOOTSTRAP_SERVER
:
NixlKVBootstrapServer
,
}
return
class_mapping
.
get
(
class_type
)
raise
ValueError
(
f
"Unsupported transfer backend:
{
transfer_backend
}
"
)
...
...
python/sglang/srt/server_args.py
View file @
4dce1cc6
...
...
@@ -1211,6 +1211,7 @@ class ServerArgs:
"--disaggregation-transfer-backend"
,
type
=
str
,
default
=
ServerArgs
.
disaggregation_transfer_backend
,
choices
=
[
"mooncake"
,
"nixl"
],
help
=
"The backend for disaggregation transfer. Default is mooncake."
,
)
parser
.
add_argument
(
...
...
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