Skip to content

Commit 50531a3

Browse files
committed
reasoner_process
1 parent 686dfaf commit 50531a3

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

configs/process/text_process_reasoner_ansfilter.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
model_cache_path: '../ckpt' # Path to cache models
22
dependencies: [text]
3-
save_path: "./processed.jsonl"
3+
save_path: "../dataflow-develop/processed.jsonl"
44

55
data:
66
text:
@@ -9,21 +9,20 @@ data:
99
dataset_split: 'train'
1010
name: 'default'
1111
revision: null
12-
data_path: 'demos/text_process/reasoners/math_5_samples.json' # Local data path, supports json, jsonl, parquet formats
12+
data_path: './demos/text_process/reasoners/math_5_samples.json' # Local data path, supports json, jsonl, parquet formats
1313
formatter: "TextFormatter" # Data loader type
1414
keys: 'answer' # Key name to be processed, for sft data, it can be specified as ['instruction','input','output']
1515

1616
processors:
17-
AnswerFormatterFilter:
18-
type: "default"
17+
AnswerFormatterFilter: {}
1918
AnswerNgramFilter:
20-
min_score: 0.5
19+
min_score: 0.1
2120
max_score: 1.0
2221
ngrams: 5
2322
AnswerGroundTruthFilter:
24-
compare_method: exact # exact/math_verify/xverify
23+
compare_method: math_verify # exact or math_verify
2524
AnswerTokenLengthFilter:
26-
max_answer_token_length: 1024
25+
max_answer_token_length: 512
2726
tokenizer_dir: '../Qwen2.5-0.5B-Instruct'
2827

2928

demos/text_process/reasoners/math_5_samples.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
},
88
{
99
"answer":
10-
"1. Find critical points:\n → f'(x) = 3x² - 6x\n → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2\n \n 2. Evaluate function at critical points and endpoints:\n → f(-1) = (-1)^3 - 3(-1)^2 + 4 = -1 -3 +4 = 0.0000\n → f(0) = 0³ - 3(0)² +4 = 4.0000\n → f(2) = 8 - 12 +4 = 0.0000\n → f(3) = 27 - 27 +4 = 4.0000\n \n 3. Compare values:\n → Minimum occurs at x=-1 and x=2\n \n Verification:\n → Second derivative test: f''(x) = 6x-6\n → f''(-1) = -12 < 0 (local max)\n → f''(2) = 6 > 0 (local min)\n \n \\boxed{0}"
10+
"Solution:\n 1. Find critical points:\n → f'(x) = 3x² - 6x\n → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2\n \n 2. Evaluate function at critical points and endpoints:\n → f(-1) = (-1)^3 - 3(-1)^2 + 4 = -1 -3 +4 = 0.0000\n → f(0) = 0³ - 3(0)² +4 = 4.0000\n → f(2) = 8 - 12 +4 = 0.0000\n → f(3) = 27 - 27 +4 = 4.0000\n \n 3. Compare values:\n → Minimum occurs at x=-1 and x=2\n \n Verification:\n → Second derivative test: f''(x) = 6x-6\n → f''(-1) = -12 < 0 (local max)\n → f''(2) = 6 > 0 (local min)\n \n \\boxed{0.5}"
1111
,
12-
"ground_truth_answer": "0"
12+
"ground_truth_answer": "1/2"
1313
},
1414
{
1515
"answer":
@@ -30,7 +30,7 @@
3030
},
3131
{
3232
"answer":
33-
"Solution:\n 1. Find critical points:\n → f'(x) = 3x² - 6x\n 1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2\n \n 2. Evaluate function at critical points and endpoints:\n → f(-1) = (-1)^3 - 3(-1)^2 + 4 = -1 -3 +4 = 0.0000\n → f(0) = 0³ - 3(0)² +4 = 4.0000\n → f(2) = 8 - 12 +4 = 0.0000\n → f(3) = 27 - 27 +4 = 4.0000\n \n 3. Compare values:\n → Minimum occurs at x=-1 and x=2\n \n Verification:\n → Second derivative test: f''(x) = 6x-6\n → f''(-1) = -12 < 0 (local max)\n → f''(2) = 6 > 0 (local min)\n \n \\boxed{0}"
33+
"Solution:\n 1. Find critical points:\n → f'(x) = 3x² - 6x\n 1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n1. Find critical points:\n → f'(x) = 3x² - 6x\n → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2 → Set derivative to zero: 3x(x-2) = 0 ⇒ x=0, x=2\n \n 2. Evaluate function at critical points and endpoints:\n → f(-1) = (-1)^3 - 3(-1)^2 + 4 = -1 -3 +4 = 0.0000\n → f(0) = 0³ - 3(0)² +4 = 4.0000\n → f(2) = 8 - 12 +4 = 0.0000\n → f(3) = 27 - 27 +4 = 4.0000\n \n 3. Compare values:\n → Minimum occurs at x=-1 and x=2\n \n Verification:\n → Second derivative test: f''(x) = 6x-6\n → f''(-1) = -12 < 0 (local max)\n → f''(2) = 6 > 0 (local min)\n \n \\boxed{0}"
3434
,
3535
"ground_truth_answer": "0"
3636
}

0 commit comments

Comments
 (0)