Skip to content

Commit 2f1787c

Browse files
committed
add tp_dim
1 parent 481e00b commit 2f1787c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

torchchat/cli/builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class BuilderArgs:
5959
num_gpus: int = 1
6060
num_nodes: int = 1
6161
pp_dim: int = 1
62+
tp_dim: int = 1
6263
is_chat_model: bool = False
6364
prefill_possible: bool = False
6465
dynamic_shapes: bool = False
@@ -164,6 +165,7 @@ def from_args(cls, args: argparse.Namespace) -> "BuilderArgs":
164165
num_gpus = getattr(args, "num_gpus", 1)
165166
num_nodes = getattr(args, "num_nodes", 1)
166167
pp_dim = getattr(args, "pp_dim", 1)
168+
tp_dim = getattr(args, "tp_dim", 1)
167169
return cls(
168170
checkpoint_dir=checkpoint_dir,
169171
checkpoint_path=checkpoint_path,
@@ -181,6 +183,7 @@ def from_args(cls, args: argparse.Namespace) -> "BuilderArgs":
181183
num_gpus=num_gpus,
182184
num_nodes=num_nodes,
183185
pp_dim=pp_dim,
186+
tp_dim=tp_dim,
184187
is_chat_model=is_chat_model,
185188
dynamic_shapes=getattr(args, "dynamic_shapes", False),
186189
max_seq_length=getattr(args, "max_seq_length", None),

0 commit comments

Comments
 (0)