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
cee9f329
"vscode:/vscode.git/clone" did not exist on "371e3f397a45914afc83b79403cabe1d9a41b931"
Unverified
Commit
cee9f329
authored
Jul 11, 2025
by
Ying Sheng
Committed by
GitHub
Jul 11, 2025
Browse files
[minor fix] llama4 hybrid memory (#7950)
parent
eb118d88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
python/sglang/srt/mem_cache/memory_pool.py
python/sglang/srt/mem_cache/memory_pool.py
+6
-1
No files found.
python/sglang/srt/mem_cache/memory_pool.py
View file @
cee9f329
...
@@ -520,8 +520,13 @@ class SWAKVPool(KVCache):
...
@@ -520,8 +520,13 @@ class SWAKVPool(KVCache):
self
.
layers_mapping
[
global_layer_id
]
=
(
swa_layer_id
,
True
)
self
.
layers_mapping
[
global_layer_id
]
=
(
swa_layer_id
,
True
)
self
.
full_to_swa_index_mapping
:
Optional
[
torch
.
Tensor
]
=
None
self
.
full_to_swa_index_mapping
:
Optional
[
torch
.
Tensor
]
=
None
k_size
,
v_size
=
self
.
get_kv_size_bytes
()
self
.
mem_usage
=
(
k_size
+
v_size
)
/
GB
def
get_kv_size_bytes
(
self
):
def
get_kv_size_bytes
(
self
):
raise
NotImplementedError
k_size
,
v_size
=
self
.
full_kv_pool
.
get_kv_size_bytes
()
k_size_swa
,
v_size_swa
=
self
.
swa_kv_pool
.
get_kv_size_bytes
()
return
k_size
+
k_size_swa
,
v_size
+
v_size_swa
def
get_contiguous_buf_infos
(
self
):
def
get_contiguous_buf_infos
(
self
):
full_kv_data_ptrs
,
full_kv_data_lens
,
full_kv_item_lens
=
(
full_kv_data_ptrs
,
full_kv_data_lens
,
full_kv_item_lens
=
(
...
...
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