Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
e450c2c7
Unverified
Commit
e450c2c7
authored
May 28, 2025
by
Alec
Committed by
GitHub
May 28, 2025
Browse files
fix: dynamo-run add warning if block-size different (#1233)
parent
4426e937
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
lib/llm/src/discovery/model_manager.rs
lib/llm/src/discovery/model_manager.rs
+10
-0
lib/llm/src/kv_router.rs
lib/llm/src/kv_router.rs
+5
-0
No files found.
lib/llm/src/discovery/model_manager.rs
View file @
e450c2c7
...
@@ -185,6 +185,16 @@ impl ModelManager {
...
@@ -185,6 +185,16 @@ impl ModelManager {
kv_cache_block_size
:
usize
,
kv_cache_block_size
:
usize
,
)
->
anyhow
::
Result
<
Arc
<
KvRouter
>>
{
)
->
anyhow
::
Result
<
Arc
<
KvRouter
>>
{
if
let
Some
(
kv_chooser
)
=
self
.get_kv_chooser
(
model_name
)
{
if
let
Some
(
kv_chooser
)
=
self
.get_kv_chooser
(
model_name
)
{
// Check if the existing router has a different block size
if
kv_chooser
.block_size
()
!=
kv_cache_block_size
{
tracing
::
warn!
(
model_name
=
%
model_name
,
existing_block_size
=
%
kv_chooser
.block_size
(),
requested_block_size
=
%
kv_cache_block_size
,
"KV Router block size mismatch! Model is requesting a different kv_cache_block_size than the existing router.
\
This will cause routing to fail silently. Consider using the same block size or restarting the router."
);
}
return
Ok
(
kv_chooser
);
return
Ok
(
kv_chooser
);
}
}
self
.create_kv_chooser
(
model_name
,
component
,
kv_cache_block_size
)
self
.create_kv_chooser
(
model_name
,
component
,
kv_cache_block_size
)
...
...
lib/llm/src/kv_router.rs
View file @
e450c2c7
...
@@ -144,6 +144,11 @@ impl KvRouter {
...
@@ -144,6 +144,11 @@ impl KvRouter {
let
worker_id
=
self
.scheduler
.schedule
(
overlap_scores
,
isl_tokens
)
.await
?
;
let
worker_id
=
self
.scheduler
.schedule
(
overlap_scores
,
isl_tokens
)
.await
?
;
Ok
(
worker_id
)
Ok
(
worker_id
)
}
}
/// Get the block size this router was configured with
pub
fn
block_size
(
&
self
)
->
usize
{
self
.block_size
}
}
}
#[async_trait]
#[async_trait]
...
...
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