Spaces:
Sleeping
Sleeping
Commit ·
0bc360d
1
Parent(s): 415ae04
update
Browse files
examples/tutorials/by_deepspeed/requirements.txt
CHANGED
|
@@ -2,3 +2,4 @@ datasets
|
|
| 2 |
unsloth
|
| 3 |
modelscope
|
| 4 |
transformers==4.57.1
|
|
|
|
|
|
| 2 |
unsloth
|
| 3 |
modelscope
|
| 4 |
transformers==4.57.1
|
| 5 |
+
deepspeed
|
examples/tutorials/by_deepspeed/step_2_train_model.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
#!/usr/bin/python3
|
| 2 |
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
| 3 |
import argparse
|
| 4 |
import os
|
| 5 |
from pathlib import Path
|
|
@@ -23,6 +26,8 @@ import torch
|
|
| 23 |
|
| 24 |
def get_args():
|
| 25 |
parser = argparse.ArgumentParser()
|
|
|
|
|
|
|
| 26 |
parser.add_argument(
|
| 27 |
"--model_name",
|
| 28 |
default="Qwen/Qwen3-8B",
|
|
|
|
| 1 |
#!/usr/bin/python3
|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
+
"""
|
| 4 |
+
deepspeed --num_gpus=4 step_2_train_model.py
|
| 5 |
+
"""
|
| 6 |
import argparse
|
| 7 |
import os
|
| 8 |
from pathlib import Path
|
|
|
|
| 26 |
|
| 27 |
def get_args():
|
| 28 |
parser = argparse.ArgumentParser()
|
| 29 |
+
parser.add_argument("--local_rank", type=int, default=-1, help="Local rank passed from distributed launcher")
|
| 30 |
+
|
| 31 |
parser.add_argument(
|
| 32 |
"--model_name",
|
| 33 |
default="Qwen/Qwen3-8B",
|