Skip to content

Commit 84b62f1

Browse files
committed
Add command line parameters to control HPU specific sampler
Signed-off-by: Sergey Plotnikov <[email protected]>
1 parent 6da4df4 commit 84b62f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/scripts/sft_hpu_example.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ def main():
4646
help='Max tokens per GPU')
4747
parser.add_argument('--nproc-per-node', type=int, default=8,
4848
help='Number of GPUs')
49+
parser.add_argument('--torch-compile', action='store_true', default=False,
50+
help='Enable torch.compile, hpu only')
51+
parser.add_argument('--num-chunks', type=int, default=1,
52+
help='Number of chunks to split dataset into for sequential training')
4953

5054
args = parser.parse_args()
5155

@@ -95,6 +99,8 @@ def main():
9599
# HPU specific arguments
96100
disable_flash_attn = True,
97101
device = 'hpu',
102+
torch_compile = args.torch_compile,
103+
num_chunks = args.num_chunks,
98104
)
99105

100106
end_time = time.time()

0 commit comments

Comments
 (0)