Automatic dcft datacuration framework upload for oh-dcft-v1.3_no-curation_gpt-4o-mini_scale_8x
Browse files
config/Alpaca/scale_experiments/alpaca_scale_x8.yaml
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
operators:
|
2 |
+
- id: load_seed_instructions
|
3 |
+
config:
|
4 |
+
type: function
|
5 |
+
function: data_strategies.Alpaca.utils.load_seed_instructions
|
6 |
+
function_config:
|
7 |
+
seed_tasks_path: dcft/data_strategies/Alpaca/resources/seed_tasks.jsonl
|
8 |
+
- id: load_scale_prompt
|
9 |
+
config:
|
10 |
+
type: function
|
11 |
+
function: data_strategies.Alpaca.scale_experiments.scale.generate_icl_example
|
12 |
+
input_ids:
|
13 |
+
- load_seed_instructions
|
14 |
+
- id: generate_tasks
|
15 |
+
config:
|
16 |
+
type: completions
|
17 |
+
map: alpaca_seed
|
18 |
+
map_config:
|
19 |
+
user_message: |
|
20 |
+
{{seed_task_prompt}}
|
21 |
+
model: gpt-4o-mini
|
22 |
+
n_repeat: 8
|
23 |
+
batch: False
|
24 |
+
input_ids:
|
25 |
+
- load_scale_prompt
|
26 |
+
- id: create_alpaca_prompts
|
27 |
+
config:
|
28 |
+
type: function
|
29 |
+
function: data_strategies.Alpaca.utils.create_alpaca_prompts
|
30 |
+
function_config:
|
31 |
+
num_instructions_to_generate: 8_000_000
|
32 |
+
num_prompt_instructions: 3
|
33 |
+
output_column: alpaca_prompt
|
34 |
+
input_ids:
|
35 |
+
- generate_tasks
|
36 |
+
|
37 |
+
- id: generate_instruction_input_output_tuples
|
38 |
+
config:
|
39 |
+
type: completions
|
40 |
+
map: alpaca
|
41 |
+
map_config:
|
42 |
+
alpaca_prompt_column: alpaca_prompt
|
43 |
+
num_seed_instructions: 3 # NOTE(Ryan) used for Alpaca's parsing code, needs to match the number in the previous step
|
44 |
+
output_instruction_column: instruction
|
45 |
+
output_input_column: input
|
46 |
+
output_output_column: output
|
47 |
+
model: gpt-4o-mini
|
48 |
+
batch: False
|
49 |
+
input_ids:
|
50 |
+
- create_alpaca_prompts
|
51 |
+
|
52 |
+
- id: filter_instructions_by_heuristics
|
53 |
+
config:
|
54 |
+
type: function
|
55 |
+
function: data_strategies.Alpaca.utils.instructions_heuristics
|
56 |
+
function_config:
|
57 |
+
input_instruction_column: instruction
|
58 |
+
output_filtered_reason_column: filtered_reason
|
59 |
+
output_filtered_decision_column: filtered_decision
|
60 |
+
input_ids:
|
61 |
+
- generate_instruction_input_output_tuples
|
62 |
+
|
63 |
+
- id: remove_filtered_instructions
|
64 |
+
config:
|
65 |
+
type: function
|
66 |
+
function: data_strategies.commons.filter_out_truey_values
|
67 |
+
function_config:
|
68 |
+
filter_column: filtered_decision
|
69 |
+
input_ids:
|
70 |
+
- filter_instructions_by_heuristics
|
71 |
+
|
72 |
+
- id: add_constant_columns
|
73 |
+
config:
|
74 |
+
type: function
|
75 |
+
function: data_strategies.commons.add_constant_columns
|
76 |
+
function_config:
|
77 |
+
max_similarity_score: 0.9
|
78 |
+
input_ids:
|
79 |
+
- remove_filtered_instructions
|
80 |
+
|
81 |
+
- id: shard_dataset
|
82 |
+
config:
|
83 |
+
type: shard
|
84 |
+
num_shards: 180
|
85 |
+
input_ids:
|
86 |
+
- add_constant_columns
|
87 |
+
|
88 |
+
- id: embed_instructions
|
89 |
+
config:
|
90 |
+
type: embedding
|
91 |
+
model: sentence-transformers/all-MiniLM-L6-v2
|
92 |
+
input_text_column: instruction
|
93 |
+
output_embedding_column: embedding
|
94 |
+
num_workers_per_shard: 1
|
95 |
+
input_ids:
|
96 |
+
- shard_dataset
|
97 |
+
|
98 |
+
- id: filter_similar_instructions
|
99 |
+
config:
|
100 |
+
type: index_flat_ip_similarity_filtering
|
101 |
+
input_embedding_column: embedding
|
102 |
+
input_max_similarity_column: max_similarity_score
|
103 |
+
input_text_column: instruction
|
104 |
+
output_similar_text_column: similar_instruction
|
105 |
+
output_filter_decision_column: too_similar
|
106 |
+
should_filter: false
|
107 |
+
input_ids:
|
108 |
+
- embed_instructions
|
109 |
+
|
110 |
+
- id: remove_similar_instructions
|
111 |
+
config:
|
112 |
+
type: function
|
113 |
+
function: data_strategies.commons.filter_out_truey_values
|
114 |
+
function_config:
|
115 |
+
filter_column: too_similar
|
116 |
+
input_ids:
|
117 |
+
- filter_similar_instructions
|
118 |
+
|
119 |
+
- id: convert_alpaca_to_sharegpt
|
120 |
+
config:
|
121 |
+
type: function
|
122 |
+
function: data_strategies.commons.convert_alpaca_to_sharegpt
|
123 |
+
function_config:
|
124 |
+
input_instruction_column: instruction
|
125 |
+
input_input_column: input
|
126 |
+
input_output_column: output
|
127 |
+
output_sharegpt_column: conversations
|
128 |
+
input_ids:
|
129 |
+
- remove_similar_instructions
|