Skip to content

Commit

Permalink
validate num_shards in engine creation
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Feb 20, 2024
1 parent aa4d477 commit 8bb96ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions serve/mlc_serve/engine/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def get_engine_config(dict_config):
assert (engine_config.min_decode_steps > 0) and (engine_config.max_decode_steps > 0)
assert engine_config.max_decode_steps > engine_config.min_decode_steps

if engine_config.model_type == "torch":
assert (
engine_config.num_shards is not None
), "num_shards in MLCServeEngineConfig needs to be provided for PT models."

return engine_config


Expand Down

0 comments on commit 8bb96ed

Please sign in to comment.