project-llm-trainer 0.7.5__py3-none-any.whl → 0.7.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of project-llm-trainer might be problematic. Click here for more details.
- project_llm_trainer-0.7.7.data/scripts/ddp_train +24 -0
- project_llm_trainer-0.7.7.data/scripts/ds_train +29 -0
- {project_llm_trainer-0.7.5.data → project_llm_trainer-0.7.7.data}/scripts/smart_train +20 -2
- {project_llm_trainer-0.7.5.dist-info → project_llm_trainer-0.7.7.dist-info}/METADATA +1 -1
- {project_llm_trainer-0.7.5.dist-info → project_llm_trainer-0.7.7.dist-info}/RECORD +11 -11
- project_llm_trainer-0.7.5.data/scripts/ddp_train +0 -12
- project_llm_trainer-0.7.5.data/scripts/ds_train +0 -12
- {project_llm_trainer-0.7.5.data → project_llm_trainer-0.7.7.data}/scripts/calc_intermediate_size +0 -0
- {project_llm_trainer-0.7.5.data → project_llm_trainer-0.7.7.data}/scripts/plot_loss +0 -0
- {project_llm_trainer-0.7.5.data → project_llm_trainer-0.7.7.data}/scripts/plot_lr +0 -0
- {project_llm_trainer-0.7.5.data → project_llm_trainer-0.7.7.data}/scripts/py_train +0 -0
- {project_llm_trainer-0.7.5.dist-info → project_llm_trainer-0.7.7.dist-info}/WHEEL +0 -0
- {project_llm_trainer-0.7.5.dist-info → project_llm_trainer-0.7.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!python
|
|
2
|
+
|
|
3
|
+
if __name__ == '__main__':
|
|
4
|
+
import os, sys
|
|
5
|
+
arguments = sys.argv[1:]
|
|
6
|
+
# file_name
|
|
7
|
+
run_file_name = arguments[0]
|
|
8
|
+
|
|
9
|
+
# cuda_visible_devive
|
|
10
|
+
if len(arguments) > 1:
|
|
11
|
+
# 0,1,2,3
|
|
12
|
+
cuda_visible_devive = arguments[1]
|
|
13
|
+
else:
|
|
14
|
+
cuda_visible_devive = None
|
|
15
|
+
|
|
16
|
+
os.environ['PARALLEL_TYPE'] = 'ddp'
|
|
17
|
+
|
|
18
|
+
if cuda_visible_devive:
|
|
19
|
+
os.environ['CUDA_VISIBLE_DEVICES'] = cuda_visible_devive
|
|
20
|
+
|
|
21
|
+
command = f'torchrun --standalone --nproc_per_node=gpu {run_file_name}'
|
|
22
|
+
|
|
23
|
+
print(f'run command {command}')
|
|
24
|
+
os.system(command)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!python
|
|
2
|
+
|
|
3
|
+
if __name__ == '__main__':
|
|
4
|
+
import os, sys
|
|
5
|
+
arguments = sys.argv[1:]
|
|
6
|
+
# file_name
|
|
7
|
+
run_file_name = arguments[0]
|
|
8
|
+
|
|
9
|
+
# cuda_visible_devive
|
|
10
|
+
if len(arguments) > 1:
|
|
11
|
+
# 0,1,2,3
|
|
12
|
+
cuda_visible_devive = arguments[1]
|
|
13
|
+
else:
|
|
14
|
+
cuda_visible_devive = None
|
|
15
|
+
|
|
16
|
+
# cuda location
|
|
17
|
+
if len(arguments) > 2:
|
|
18
|
+
cuda_loc = arguments[2]
|
|
19
|
+
else:
|
|
20
|
+
cuda_loc = 'localhost'
|
|
21
|
+
|
|
22
|
+
os.environ['PARALLEL_TYPE'] = 'ds'
|
|
23
|
+
|
|
24
|
+
cuda_ctrl = f' --include {cuda_loc}:{cuda_visible_devive}' if cuda_visible_devive else ''
|
|
25
|
+
|
|
26
|
+
command = f'deepspeed{cuda_ctrl} {run_file_name}'
|
|
27
|
+
|
|
28
|
+
print(f'run command {command}')
|
|
29
|
+
os.system(command)
|
|
@@ -2,9 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
if __name__ == '__main__':
|
|
4
4
|
import os, sys, torch
|
|
5
|
+
|
|
5
6
|
arguments = sys.argv[1:]
|
|
7
|
+
# file name
|
|
6
8
|
run_file_name = arguments[0]
|
|
7
9
|
|
|
10
|
+
# cuda_visible_devive
|
|
11
|
+
if len(arguments) > 1:
|
|
12
|
+
# 0,1,2,3
|
|
13
|
+
cuda_visible_devive = arguments[1]
|
|
14
|
+
else:
|
|
15
|
+
cuda_visible_devive = None
|
|
16
|
+
|
|
17
|
+
# cuda location
|
|
18
|
+
if len(arguments) > 2:
|
|
19
|
+
cuda_loc = arguments[2]
|
|
20
|
+
else:
|
|
21
|
+
cuda_loc = 'localhost'
|
|
22
|
+
|
|
8
23
|
try:
|
|
9
24
|
import deepspeed
|
|
10
25
|
parallel_type = 'ds'
|
|
@@ -18,11 +33,14 @@ if __name__ == '__main__':
|
|
|
18
33
|
os.environ['PARALLEL_TYPE'] = parallel_type
|
|
19
34
|
|
|
20
35
|
if parallel_type == 'ds':
|
|
21
|
-
|
|
36
|
+
cuda_ctrl = f' --include {cuda_loc}:{cuda_visible_devive}' if cuda_visible_devive else ''
|
|
37
|
+
command = f'deepspeed{cuda_ctrl} {run_file_name}'
|
|
22
38
|
elif parallel_type == 'ddp':
|
|
39
|
+
if cuda_visible_devive:
|
|
40
|
+
os.environ['CUDA_VISIBLE_DEVICES'] = cuda_visible_devive
|
|
23
41
|
command = f'torchrun --standalone --nproc_per_node=gpu {run_file_name}'
|
|
24
42
|
else:
|
|
25
43
|
command = f'python3 {run_file_name}'
|
|
26
44
|
|
|
27
|
-
print(f'
|
|
45
|
+
print(f'run command {command}')
|
|
28
46
|
os.system(command)
|
|
@@ -20,14 +20,14 @@ llm_trainer/tools.py,sha256=5op5qrjjkK-Lr9oes5VxIVnOVYOYGoAdlIJq9mPUf64,2637
|
|
|
20
20
|
llm_trainer/train_configs.py,sha256=N3ykM1uaLHcSNRC8ErYIxp9VYhSP7voJyAP-2D4ZJe0,7574
|
|
21
21
|
llm_trainer/trainer.py,sha256=jS31zEXIIj9BoPTPlmaGYq61x72HGCjKfS2u3_gOkDk,27924
|
|
22
22
|
llm_trainer/utils.py,sha256=xcdzpvPvXRKqsOK2yB7PZ9GmOvZMDFcglDPUZY2hJTY,11484
|
|
23
|
-
project_llm_trainer-0.7.
|
|
24
|
-
project_llm_trainer-0.7.
|
|
25
|
-
project_llm_trainer-0.7.
|
|
26
|
-
project_llm_trainer-0.7.
|
|
27
|
-
project_llm_trainer-0.7.
|
|
28
|
-
project_llm_trainer-0.7.
|
|
29
|
-
project_llm_trainer-0.7.
|
|
30
|
-
project_llm_trainer-0.7.
|
|
31
|
-
project_llm_trainer-0.7.
|
|
32
|
-
project_llm_trainer-0.7.
|
|
33
|
-
project_llm_trainer-0.7.
|
|
23
|
+
project_llm_trainer-0.7.7.data/scripts/calc_intermediate_size,sha256=AggpgNHokJiJMbEtVdOnolqr_4bH3i1UYuZNEAzC2Gc,460
|
|
24
|
+
project_llm_trainer-0.7.7.data/scripts/ddp_train,sha256=Z-309mM56CN0m3bxoeC5us4LUuwuNnoiOm3-fDdLMjQ,566
|
|
25
|
+
project_llm_trainer-0.7.7.data/scripts/ds_train,sha256=3nXNNKmYI7miqyBdf-Ijl_rW1cGIKrAMZ1CSswN_gGo,665
|
|
26
|
+
project_llm_trainer-0.7.7.data/scripts/plot_loss,sha256=MzFcdJESlVr1srj4Td6-AxPGUKkfB_QEcJwm0Bd-5fU,910
|
|
27
|
+
project_llm_trainer-0.7.7.data/scripts/plot_lr,sha256=w_7XR_x3KYYyboeOVAeu_I4fveLFI-C0wBmRrNlmWUI,894
|
|
28
|
+
project_llm_trainer-0.7.7.data/scripts/py_train,sha256=tOp9TquORQeU8XN5H7OVIk5O0Ypwi34p_GENxTwgwdk,265
|
|
29
|
+
project_llm_trainer-0.7.7.data/scripts/smart_train,sha256=3oLIDuuqb4U4TU1lXy9V8lw_0gIf7i8tGsxlQ_s6bro,1220
|
|
30
|
+
project_llm_trainer-0.7.7.dist-info/METADATA,sha256=1O3xW3QM5aJgk1EESixX5DjxQ5ReX_pikUjI5x2qOvk,195
|
|
31
|
+
project_llm_trainer-0.7.7.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
32
|
+
project_llm_trainer-0.7.7.dist-info/top_level.txt,sha256=LtRFg28i0QIG7iBCD2t095oSco99LCtkijibS9cMGik,12
|
|
33
|
+
project_llm_trainer-0.7.7.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!python
|
|
2
|
-
|
|
3
|
-
if __name__ == '__main__':
|
|
4
|
-
import os, sys
|
|
5
|
-
arguments = sys.argv[1:]
|
|
6
|
-
run_file_name = arguments[0]
|
|
7
|
-
|
|
8
|
-
os.environ['PARALLEL_TYPE'] = 'ddp'
|
|
9
|
-
command = f'torchrun --standalone --nproc_per_node=gpu {run_file_name}'
|
|
10
|
-
|
|
11
|
-
print(f'real command is {command}')
|
|
12
|
-
os.system(command)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!python
|
|
2
|
-
|
|
3
|
-
if __name__ == '__main__':
|
|
4
|
-
import os, sys
|
|
5
|
-
arguments = sys.argv[1:]
|
|
6
|
-
run_file_name = arguments[0]
|
|
7
|
-
|
|
8
|
-
os.environ['PARALLEL_TYPE'] = 'ds'
|
|
9
|
-
command = f'deepspeed {run_file_name}'
|
|
10
|
-
|
|
11
|
-
print(f'real command is {command}')
|
|
12
|
-
os.system(command)
|
{project_llm_trainer-0.7.5.data → project_llm_trainer-0.7.7.data}/scripts/calc_intermediate_size
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|