Skip to content

Commit db9012f

Browse files
authored
Fix doc/config issues about prompt/response/sequence lengths (#370)
1 parent 30ca213 commit db9012f

File tree

21 files changed

+40
-18
lines changed

21 files changed

+40
-18
lines changed

docs/sphinx_doc/source/tutorial/example_async_mode.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ algorithm:
2121
repeat_times: 8
2222
model:
2323
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
24+
max_response_tokens: 1024
25+
max_model_len: 2048
2426
cluster:
2527
node_num: 1
2628
gpu_per_node: 4
@@ -69,6 +71,8 @@ algorithm:
6971
lr: 1e-6
7072
model:
7173
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
74+
max_response_tokens: 1024
75+
max_model_len: 2048
7276
cluster:
7377
node_num: 1
7478
gpu_per_node: 4
@@ -128,6 +132,8 @@ algorithm:
128132
repeat_times: 8
129133
model:
130134
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
135+
max_response_tokens: 1024
136+
max_model_len: 2048
131137
cluster: # important
132138
node_num: 1
133139
gpu_per_node: 8

docs/sphinx_doc/source/tutorial/example_dpo.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ algorithm:
6666
checkpoint_root_dir: ${oc.env:TRINITY_CHECKPOINT_ROOT_DIR,./checkpoints}
6767
model:
6868
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
69+
max_response_tokens: 1024
70+
max_model_len: 1536
6971
cluster:
7072
node_num: 1
7173
gpu_per_node: 8
@@ -114,6 +116,8 @@ algorithm:
114116
checkpoint_root_dir: ${oc.env:TRINITY_CHECKPOINT_ROOT_DIR,./checkpoints}
115117
model:
116118
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
119+
max_response_tokens: 10240
120+
max_model_len: 10752
117121
cluster:
118122
node_num: 1
119123
gpu_per_node: 2

docs/sphinx_doc/source/tutorial/example_reasoning_basic.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ algorithm:
5959
lr: 1e-5
6060
model:
6161
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
62+
max_response_tokens: 1024
63+
max_model_len: 2048
6264
cluster:
6365
node_num: 1
6466
gpu_per_node: 2

docs/sphinx_doc/source_zh/tutorial/example_async_mode.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ algorithm:
2121
repeat_times: 8
2222
model:
2323
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
24+
max_response_tokens: 1024
25+
max_model_len: 2048
2426
cluster:
2527
node_num: 1
2628
gpu_per_node: 4
@@ -69,6 +71,8 @@ algorithm:
6971
lr: 1e-6
7072
model:
7173
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
74+
max_response_tokens: 1024
75+
max_model_len: 2048
7276
cluster:
7377
node_num: 1
7478
gpu_per_node: 4
@@ -128,6 +132,8 @@ algorithm:
128132
repeat_times: 8
129133
model:
130134
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
135+
max_response_tokens: 1024
136+
max_model_len: 2048
131137
cluster: # important
132138
node_num: 1
133139
gpu_per_node: 8

docs/sphinx_doc/source_zh/tutorial/example_dpo.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ algorithm:
6868
checkpoint_root_dir: ${oc.env:TRINITY_CHECKPOINT_ROOT_DIR,./checkpoints}
6969
model:
7070
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
71+
max_response_tokens: 1024
72+
max_model_len: 1536
7173
cluster:
7274
node_num: 1
7375
gpu_per_node: 8
@@ -116,6 +118,8 @@ algorithm:
116118
checkpoint_root_dir: ${oc.env:TRINITY_CHECKPOINT_ROOT_DIR,./checkpoints}
117119
model:
118120
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
121+
max_response_tokens: 10240
122+
max_model_len: 10752
119123
cluster:
120124
node_num: 1
121125
gpu_per_node: 2

docs/sphinx_doc/source_zh/tutorial/example_reasoning_basic.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ algorithm:
5959
lr: 1e-5
6060
model:
6161
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
62+
max_response_tokens: 1024
63+
max_model_len: 2048
6264
cluster:
6365
node_num: 1
6466
gpu_per_node: 2

examples/asymre_gsm8k/gsm8k.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ checkpoint_root_dir: ${oc.env:TRINITY_CHECKPOINT_ROOT_DIR,./checkpoints}
88
model:
99
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
1010
max_response_tokens: 1024
11-
max_model_len: 1280
11+
max_model_len: 2048
1212
algorithm:
1313
algorithm_type: asymre
1414
repeat_times: 8

examples/asymre_math/math.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ name: asymre_math
66
checkpoint_root_dir: ${oc.env:TRINITY_CHECKPOINT_ROOT_DIR,./checkpoints}
77
model:
88
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-3B-Instruct} # the path to your model
9-
max_response_tokens: 1024
10-
max_model_len: 1280
9+
max_prompt_tokens: 1024
10+
max_response_tokens: 2048
1111
algorithm:
1212
algorithm_type: asymre
1313
repeat_times: 8
@@ -62,8 +62,6 @@ explorer:
6262
enable_prefix_caching: false
6363
enforce_eager: true
6464
dtype: bfloat16
65-
max_prompt_tokens: 1024
66-
max_response_tokens: 2048
6765
seed: 42
6866
synchronizer:
6967
sync_method: 'nccl'

examples/async_gsm8k/explorer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ algorithm:
88
model:
99
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
1010
max_response_tokens: 1024
11-
max_model_len: 1280
11+
max_model_len: 2048
1212
cluster:
1313
node_num: 1
1414
gpu_per_node: 4

examples/async_gsm8k/trainer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ algorithm:
1010
model:
1111
model_path: ${oc.env:TRINITY_MODEL_PATH,Qwen/Qwen2.5-1.5B-Instruct}
1212
max_response_tokens: 1024
13-
max_model_len: 1280
13+
max_model_len: 2048
1414
cluster:
1515
node_num: 1
1616
gpu_per_node: 4

0 commit comments

Comments
 (0)