Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
LLaMA-Factory
Commits
2778a3d0
Commit
2778a3d0
authored
Jan 16, 2025
by
luopl
Browse files
updata to v0.9.1_stable
parent
e92143e3
Changes
172
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
30 additions
and
24 deletions
+30
-24
data/mllm_demo.json
data/mllm_demo.json
+1
-1
data/mllm_video_demo.json
data/mllm_video_demo.json
+1
-1
data/ultra_chat/ultra_chat.py
data/ultra_chat/ultra_chat.py
+3
-3
data/wiki_demo.txt
data/wiki_demo.txt
+1
-1
docker/docker-cuda/Dockerfile
docker/docker-cuda/Dockerfile
+4
-3
docker/docker-cuda/docker-compose.yml
docker/docker-cuda/docker-compose.yml
+2
-0
docker/docker-npu/docker-compose.yml
docker/docker-npu/docker-compose.yml
+2
-0
docker/docker-rocm/docker-compose.yml
docker/docker-rocm/docker-compose.yml
+2
-0
evaluation/ceval/mapping.json
evaluation/ceval/mapping.json
+1
-1
evaluation/cmmlu/mapping.json
evaluation/cmmlu/mapping.json
+1
-1
evaluation/mmlu/mapping.json
evaluation/mmlu/mapping.json
+1
-1
evaluation/mmlu/mmlu.py
evaluation/mmlu/mmlu.py
+1
-2
examples/README.md
examples/README.md
+2
-2
examples/README_zh.md
examples/README_zh.md
+2
-2
examples/deepspeed/ds_z0_config.json
examples/deepspeed/ds_z0_config.json
+1
-1
examples/deepspeed/ds_z2_config.json
examples/deepspeed/ds_z2_config.json
+1
-1
examples/deepspeed/ds_z2_offload_config.json
examples/deepspeed/ds_z2_offload_config.json
+1
-1
examples/deepspeed/ds_z3_config.json
examples/deepspeed/ds_z3_config.json
+1
-1
examples/deepspeed/ds_z3_offload_config.json
examples/deepspeed/ds_z3_offload_config.json
+1
-1
examples/extras/adam_mini/qwen2_full_sft.yaml
examples/extras/adam_mini/qwen2_full_sft.yaml
+1
-1
No files found.
data/mllm_demo.json
View file @
2778a3d0
...
...
@@ -137,4 +137,4 @@
"mllm_demo_data/3.jpg"
]
}
]
\ No newline at end of file
]
data/mllm_video_demo.json
View file @
2778a3d0
...
...
@@ -44,4 +44,4 @@
"mllm_demo_data/3.mp4"
]
}
]
\ No newline at end of file
]
data/ultra_chat/ultra_chat.py
View file @
2778a3d0
...
...
@@ -20,9 +20,9 @@ _CITATION = """\
}
"""
_HOMEPAGE
=
"{}/datasets/stingning/ultrachat"
.
format
(
_HF_ENDPOINT
)
_HOMEPAGE
=
f
"
{
_HF_ENDPOINT
}
/datasets/stingning/ultrachat"
_LICENSE
=
"cc-by-nc-4.0"
_BASE_DATA_URL
=
"{}/datasets/stingning/ultrachat/resolve/main/train_{{idx}}.jsonl"
.
format
(
_HF_ENDPOINT
)
_BASE_DATA_URL
=
f
"
{
_HF_ENDPOINT
}
/datasets/stingning/ultrachat/resolve/main/train_{{idx}}.jsonl"
class
UltraChat
(
datasets
.
GeneratorBasedBuilder
):
...
...
@@ -42,7 +42,7 @@ class UltraChat(datasets.GeneratorBasedBuilder):
def
_generate_examples
(
self
,
filepaths
:
List
[
str
]):
for
filepath
in
filepaths
:
with
open
(
filepath
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
filepath
,
encoding
=
"utf-8"
)
as
f
:
for
row
in
f
:
try
:
data
=
json
.
loads
(
row
)
...
...
data/wiki_demo.txt
View file @
2778a3d0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
docker/docker-cuda/Dockerfile
View file @
2778a3d0
# Use the NVIDIA official image with PyTorch 2.3.0
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-02.html
FROM
nvcr.io/nvidia/pytorch:24.02-py3
# Default use the NVIDIA official image with PyTorch 2.3.0
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/index.html
ARG
BASE_IMAGE=nvcr.io/nvidia/pytorch:24.02-py3
FROM
${BASE_IMAGE}
# Define environments
ENV
MAX_JOBS=4
...
...
docker/docker-cuda/docker-compose.yml
View file @
2778a3d0
...
...
@@ -16,6 +16,7 @@ services:
volumes
:
-
../../hf_cache:/root/.cache/huggingface
-
../../ms_cache:/root/.cache/modelscope
-
../../om_cache:/root/.cache/openmind
-
../../data:/app/data
-
../../output:/app/output
ports
:
...
...
@@ -23,6 +24,7 @@ services:
-
"
8000:8000"
ipc
:
host
tty
:
true
shm_size
:
'
16gb'
stdin_open
:
true
command
:
bash
deploy
:
...
...
docker/docker-npu/docker-compose.yml
View file @
2778a3d0
...
...
@@ -10,6 +10,7 @@ services:
volumes
:
-
../../hf_cache:/root/.cache/huggingface
-
../../ms_cache:/root/.cache/modelscope
-
../../om_cache:/root/.cache/openmind
-
../../data:/app/data
-
../../output:/app/output
-
/usr/local/dcmi:/usr/local/dcmi
...
...
@@ -21,6 +22,7 @@ services:
-
"
8000:8000"
ipc
:
host
tty
:
true
shm_size
:
'
16gb'
stdin_open
:
true
command
:
bash
devices
:
...
...
docker/docker-rocm/docker-compose.yml
View file @
2778a3d0
...
...
@@ -15,6 +15,7 @@ services:
volumes
:
-
../../hf_cache:/root/.cache/huggingface
-
../../ms_cache:/root/.cache/modelscope
-
../../om_cache:/root/.cache/openmind
-
../../data:/app/data
-
../../output:/app/output
-
../../saves:/app/saves
...
...
@@ -23,6 +24,7 @@ services:
-
"
8000:8000"
ipc
:
host
tty
:
true
shm_size
:
'
16gb'
stdin_open
:
true
command
:
bash
devices
:
...
...
evaluation/ceval/mapping.json
View file @
2778a3d0
...
...
@@ -207,4 +207,4 @@
"name"
:
"兽医学"
,
"category"
:
"STEM"
}
}
\ No newline at end of file
}
evaluation/cmmlu/mapping.json
View file @
2778a3d0
...
...
@@ -267,4 +267,4 @@
"name"
:
"世界宗教"
,
"category"
:
"Humanities"
}
}
\ No newline at end of file
}
evaluation/mmlu/mapping.json
View file @
2778a3d0
...
...
@@ -227,4 +227,4 @@
"name"
:
"world religions"
,
"category"
:
"Humanities"
}
}
\ No newline at end of file
}
evaluation/mmlu/mmlu.py
View file @
2778a3d0
...
...
@@ -158,5 +158,4 @@ class MMLU(datasets.GeneratorBasedBuilder):
df
=
pd
.
read_csv
(
filepath
,
header
=
None
)
df
.
columns
=
[
"question"
,
"A"
,
"B"
,
"C"
,
"D"
,
"answer"
]
for
i
,
instance
in
enumerate
(
df
.
to_dict
(
orient
=
"records"
)):
yield
i
,
instance
yield
from
enumerate
(
df
.
to_dict
(
orient
=
"records"
))
examples/README.md
View file @
2778a3d0
...
...
@@ -89,8 +89,8 @@ llamafactory-cli train examples/train_lora/llama3_lora_predict.yaml
#### Supervised Fine-Tuning on Multiple Nodes
```
bash
FORCE_TORCHRUN
=
1
NNODES
=
2
RANK
=
0
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN
=
1
NNODES
=
2
RANK
=
1
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN
=
1
NNODES
=
2
NODE_
RANK
=
0
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN
=
1
NNODES
=
2
NODE_
RANK
=
1
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
#### Supervised Fine-Tuning with DeepSpeed ZeRO-3 (Weight Sharding)
...
...
examples/README_zh.md
View file @
2778a3d0
...
...
@@ -89,8 +89,8 @@ llamafactory-cli train examples/train_lora/llama3_lora_predict.yaml
#### 多机指令监督微调
```
bash
FORCE_TORCHRUN
=
1
NNODES
=
2
RANK
=
0
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN
=
1
NNODES
=
2
RANK
=
1
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN
=
1
NNODES
=
2
NODE_
RANK
=
0
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
FORCE_TORCHRUN
=
1
NNODES
=
2
NODE_
RANK
=
1
MASTER_ADDR
=
192.168.0.1
MASTER_PORT
=
29500 llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
```
#### 使用 DeepSpeed ZeRO-3 平均分配显存
...
...
examples/deepspeed/ds_z0_config.json
View file @
2778a3d0
...
...
@@ -25,4 +25,4 @@
"contiguous_gradients"
:
true
,
"round_robin_gradients"
:
true
}
}
\ No newline at end of file
}
examples/deepspeed/ds_z2_config.json
View file @
2778a3d0
...
...
@@ -25,4 +25,4 @@
"contiguous_gradients"
:
true
,
"round_robin_gradients"
:
true
}
}
\ No newline at end of file
}
examples/deepspeed/ds_z2_offload_config.json
View file @
2778a3d0
...
...
@@ -29,4 +29,4 @@
"contiguous_gradients"
:
true
,
"round_robin_gradients"
:
true
}
}
\ No newline at end of file
}
examples/deepspeed/ds_z3_config.json
View file @
2778a3d0
...
...
@@ -27,4 +27,4 @@
"stage3_max_reuse_distance"
:
1e9
,
"stage3_gather_16bit_weights_on_model_save"
:
true
}
}
\ No newline at end of file
}
examples/deepspeed/ds_z3_offload_config.json
View file @
2778a3d0
...
...
@@ -35,4 +35,4 @@
"stage3_max_reuse_distance"
:
1e9
,
"stage3_gather_16bit_weights_on_model_save"
:
true
}
}
\ No newline at end of file
}
examples/extras/adam_mini/qwen2_full_sft.yaml
View file @
2778a3d0
...
...
@@ -10,7 +10,7 @@ use_adam_mini: true
### dataset
dataset
:
identity,alpaca_en_demo
template
:
qwen
cutoff_len
:
1024
cutoff_len
:
2048
max_samples
:
1000
overwrite_cache
:
true
preprocessing_num_workers
:
16
...
...
Prev
1
2
3
4
5
6
…
9
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment