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
5fbafbb8
Unverified
Commit
5fbafbb8
authored
Apr 14, 2025
by
huangtingwei
Committed by
GitHub
Apr 13, 2025
Browse files
fix MLATokenToKVPoolHost get_size_per_token bug (#5161)
Co-authored-by:
AniZpZ
<
zhuangsen.zp@antgroup.com
>
parent
a9499885
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 @
5fbafbb8
...
...
@@ -879,7 +879,12 @@ class MLATokenToKVPoolHost(HostKVCache):
self
.
qk_rope_head_dim
=
self
.
device_pool
.
qk_rope_head_dim
self
.
layer_num
=
self
.
device_pool
.
layer_num
return
(
self
.
kv_lora_rank
+
self
.
qk_rope_head_dim
)
*
1
*
self
.
dtype
.
itemsize
return
(
(
self
.
kv_lora_rank
+
self
.
qk_rope_head_dim
)
*
1
*
self
.
dtype
.
itemsize
*
self
.
layer_num
)
def
init_kv_buffer
(
self
):
return
torch
.
empty
(
...
...
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