mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
fix: set sharded true if WORLD_SIZE is set
This commit is contained in:
parent
cdbf802860
commit
9854f20225
@ -44,6 +44,9 @@ def serve(
|
||||
otlp_endpoint: Optional[str] = None,
|
||||
max_input_tokens: Optional[int] = None,
|
||||
):
|
||||
# derive sharded from environment variables if not provided
|
||||
sharded = sharded or os.getenv("WORLD_SIZE", None) is not None
|
||||
|
||||
if sharded:
|
||||
assert (
|
||||
os.getenv("RANK", None) is not None
|
||||
|
Loading…
Reference in New Issue
Block a user