BaoLocTown commited on
Commit
a7a3ab3
1 Parent(s): 82d69dd

Upload pipeline.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. pipeline.yaml +364 -0
pipeline.yaml ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ distilabel:
2
+ version: 1.4.1
3
+ pipeline:
4
+ name: pipeline-translate-demo
5
+ description: Pipeline translate demo
6
+ steps:
7
+ - step:
8
+ name: load_dataset
9
+ resources:
10
+ replicas: 1
11
+ cpus: null
12
+ gpus: null
13
+ memory: null
14
+ resources: null
15
+ input_mappings: {}
16
+ output_mappings: {}
17
+ use_cache: true
18
+ batch_size: 50
19
+ repo_id: mteb/emotion
20
+ split: train
21
+ config: null
22
+ revision: null
23
+ streaming: false
24
+ num_examples: null
25
+ storage_options: null
26
+ runtime_parameters_info:
27
+ - name: resources
28
+ runtime_parameters_info:
29
+ - name: replicas
30
+ optional: true
31
+ description: The number of replicas for the step.
32
+ - name: cpus
33
+ optional: true
34
+ description: The number of CPUs assigned to each step replica.
35
+ - name: gpus
36
+ optional: true
37
+ description: The number of GPUs assigned to each step replica.
38
+ - name: memory
39
+ optional: true
40
+ description: The memory in bytes required for each step replica.
41
+ - name: resources
42
+ optional: true
43
+ description: A dictionary containing names of custom resources and the number
44
+ of those resources required for each step replica.
45
+ - name: batch_size
46
+ optional: true
47
+ description: The number of rows that will contain the batches generated by
48
+ the step.
49
+ - name: repo_id
50
+ optional: false
51
+ description: The Hugging Face Hub repository ID of the dataset to load.
52
+ - name: split
53
+ optional: true
54
+ description: The split of the dataset to load. Defaults to 'train'.
55
+ - name: config
56
+ optional: true
57
+ description: The configuration of the dataset to load. This is optional and
58
+ only needed if the dataset has multiple configurations.
59
+ - name: revision
60
+ optional: true
61
+ description: The revision of the dataset to load. Defaults to the latest revision.
62
+ - name: streaming
63
+ optional: true
64
+ description: Whether to load the dataset in streaming mode or not. Defaults
65
+ to False.
66
+ - name: num_examples
67
+ optional: true
68
+ description: The number of examples to load from the dataset. By default will
69
+ load all examples.
70
+ type_info:
71
+ module: distilabel.steps.generators.huggingface
72
+ name: LoadDataFromHub
73
+ name: load_dataset
74
+ - step:
75
+ name: translate_en2vi_demo
76
+ resources:
77
+ replicas: 1
78
+ cpus: null
79
+ gpus: 2
80
+ memory: null
81
+ resources: null
82
+ input_mappings: {}
83
+ output_mappings: {}
84
+ use_cache: true
85
+ input_batch_size: 50
86
+ llm:
87
+ cuda_devices: auto
88
+ disable_cuda_device_placement: false
89
+ use_magpie_template: false
90
+ magpie_pre_query_template: null
91
+ generation_kwargs:
92
+ temperature: 0.0
93
+ top_p: 1.0
94
+ max_new_tokens: 4096
95
+ use_offline_batch_generation: false
96
+ offline_batch_generation_block_until_done: null
97
+ jobs_ids: null
98
+ model: CohereForAI/aya-23-35B
99
+ dtype: bfloat16
100
+ trust_remote_code: false
101
+ quantization: null
102
+ revision: null
103
+ tokenizer: CohereForAI/aya-23-35B
104
+ tokenizer_mode: auto
105
+ tokenizer_revision: null
106
+ skip_tokenizer_init: false
107
+ chat_template: null
108
+ seed: 0
109
+ extra_kwargs:
110
+ tensor_parallel_size: 2
111
+ distributed_executor_backend: ray
112
+ gpu_memory_utilization: 0.9
113
+ max_model_len: 4096
114
+ structured_output: null
115
+ type_info:
116
+ module: distilabel.llms.vllm
117
+ name: vLLM
118
+ group_generations: false
119
+ add_raw_output: true
120
+ add_raw_input: true
121
+ num_generations: 1
122
+ use_default_structured_output: false
123
+ system_prompt: You are a professional translator with a deep understanding of
124
+ both the English and Vietnamese languages. You possess a high level of proficiency
125
+ in translating between these languages, ensuring that the translation retains
126
+ both the meaning and cultural nuances of the original text. With a thorough
127
+ knowledge of grammar, syntax, and colloquialisms in both languages, you can
128
+ accurately and naturally translate the following from English to Vietnamese
129
+ while maintaining its intended tone and context. Your work is known for its
130
+ precision and attention to detail, making your translations clear and effective
131
+ for a wide audience.
132
+ use_system_prompt: false
133
+ template: 'Translate the following from English to Vietnamese:
134
+
135
+
136
+ {{text}}
137
+
138
+
139
+ TRANSLATED VERSION IN VIETNAMESE IS:
140
+
141
+ '
142
+ columns:
143
+ - text
144
+ runtime_parameters_info:
145
+ - name: resources
146
+ runtime_parameters_info:
147
+ - name: replicas
148
+ optional: true
149
+ description: The number of replicas for the step.
150
+ - name: cpus
151
+ optional: true
152
+ description: The number of CPUs assigned to each step replica.
153
+ - name: gpus
154
+ optional: true
155
+ description: The number of GPUs assigned to each step replica.
156
+ - name: memory
157
+ optional: true
158
+ description: The memory in bytes required for each step replica.
159
+ - name: resources
160
+ optional: true
161
+ description: A dictionary containing names of custom resources and the number
162
+ of those resources required for each step replica.
163
+ - name: input_batch_size
164
+ optional: true
165
+ description: The number of rows that will contain the batches processed by
166
+ the step.
167
+ - name: llm
168
+ runtime_parameters_info:
169
+ - name: cuda_devices
170
+ optional: true
171
+ description: A list with the ID of the CUDA devices to be used.
172
+ - name: disable_cuda_device_placement
173
+ optional: true
174
+ description: Whether to disable the CUDA device placement logic or not.
175
+ - name: generation_kwargs
176
+ description: The kwargs to be propagated to either `generate` or `agenerate`
177
+ methods within each `LLM`.
178
+ keys:
179
+ - name: max_new_tokens
180
+ optional: true
181
+ description: the maximum number of new tokens that the model will generate. Defaults
182
+ to `128`.
183
+ - name: presence_penalty
184
+ optional: true
185
+ description: the presence penalty to use for the generation. Defaults
186
+ to `0.0`.
187
+ - name: frequency_penalty
188
+ optional: true
189
+ description: the repetition penalty to use for the generation. Defaults to
190
+ `0.0`.
191
+ - name: repetition_penalty
192
+ optional: true
193
+ description: the repetition penalty to use for the generation Defaults
194
+ to `1.0`.
195
+ - name: temperature
196
+ optional: true
197
+ description: the temperature to use for the generation. Defaults to `0.1`.
198
+ - name: top_p
199
+ optional: true
200
+ description: the top-p value to use for the generation. Defaults to `1.0`.
201
+ - name: top_k
202
+ optional: true
203
+ description: the top-k value to use for the generation. Defaults to `0`.
204
+ - name: min_p
205
+ optional: true
206
+ description: the minimum probability to use for the generation. Defaults
207
+ to `0.0`.
208
+ - name: stop
209
+ optional: true
210
+ description: a list of strings that will be used to stop the generation
211
+ when found. Defaults to `None`.
212
+ - name: stop_token_ids
213
+ optional: true
214
+ description: a list of token ids that will be used to stop the generation when
215
+ found. Defaults to `None`.
216
+ - name: include_stop_str_in_output
217
+ optional: true
218
+ description: whether to include the stop string in the output. Defaults
219
+ to `False`.
220
+ - name: logits_processors
221
+ optional: true
222
+ description: a list of functions to process the logits before sampling. Defaults
223
+ to `None`.
224
+ - name: extra_sampling_params
225
+ optional: true
226
+ description: dictionary with additional arguments to be passed to the
227
+ `SamplingParams` class from `vllm`.
228
+ - name: use_offline_batch_generation
229
+ optional: true
230
+ description: Whether to use the `offline_batch_generate` method to generate
231
+ the responses.
232
+ - name: offline_batch_generation_block_until_done
233
+ optional: true
234
+ description: If provided, then polling will be done until the `ofline_batch_generate`
235
+ method is able to retrieve the results. The value indicate the time to
236
+ wait between each polling.
237
+ - name: extra_kwargs
238
+ optional: true
239
+ description: 'Additional dictionary of keyword arguments that will be passed
240
+ to the `vLLM` class of `vllm` library. See all the supported arguments
241
+ at: https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/llm.py'
242
+ - name: structured_output
243
+ optional: true
244
+ description: The structured output format to use across all the generations.
245
+ - name: add_raw_output
246
+ optional: true
247
+ description: Whether to include the raw output of the LLM in the key `raw_output_<TASK_NAME>`
248
+ of the `distilabel_metadata` dictionary output column
249
+ - name: add_raw_input
250
+ optional: true
251
+ description: Whether to include the raw input of the LLM in the key `raw_input_<TASK_NAME>`
252
+ of the `distilabel_metadata` dictionary column
253
+ - name: num_generations
254
+ optional: true
255
+ description: The number of generations to be produced per input.
256
+ type_info:
257
+ module: __main__
258
+ name: TranslateText
259
+ name: translate_en2vi_demo
260
+ - step:
261
+ name: rename_columns
262
+ resources:
263
+ replicas: 1
264
+ cpus: null
265
+ gpus: null
266
+ memory: null
267
+ resources: null
268
+ input_mappings: {}
269
+ output_mappings: {}
270
+ use_cache: true
271
+ input_batch_size: 50
272
+ columns_map:
273
+ text: og_text
274
+ label: label
275
+ label_text: label_text
276
+ vietnamese_version: text
277
+ runtime_parameters_info:
278
+ - name: resources
279
+ runtime_parameters_info:
280
+ - name: replicas
281
+ optional: true
282
+ description: The number of replicas for the step.
283
+ - name: cpus
284
+ optional: true
285
+ description: The number of CPUs assigned to each step replica.
286
+ - name: gpus
287
+ optional: true
288
+ description: The number of GPUs assigned to each step replica.
289
+ - name: memory
290
+ optional: true
291
+ description: The memory in bytes required for each step replica.
292
+ - name: resources
293
+ optional: true
294
+ description: A dictionary containing names of custom resources and the number
295
+ of those resources required for each step replica.
296
+ - name: input_batch_size
297
+ optional: true
298
+ description: The number of rows that will contain the batches processed by
299
+ the step.
300
+ type_info:
301
+ module: __main__
302
+ name: RenameColumns
303
+ name: rename_columns
304
+ - step:
305
+ name: keep_columns
306
+ resources:
307
+ replicas: 1
308
+ cpus: null
309
+ gpus: null
310
+ memory: null
311
+ resources: null
312
+ input_mappings: {}
313
+ output_mappings: {}
314
+ use_cache: true
315
+ input_batch_size: 50
316
+ columns:
317
+ - text
318
+ - label
319
+ - label_text
320
+ - og_text
321
+ runtime_parameters_info:
322
+ - name: resources
323
+ runtime_parameters_info:
324
+ - name: replicas
325
+ optional: true
326
+ description: The number of replicas for the step.
327
+ - name: cpus
328
+ optional: true
329
+ description: The number of CPUs assigned to each step replica.
330
+ - name: gpus
331
+ optional: true
332
+ description: The number of GPUs assigned to each step replica.
333
+ - name: memory
334
+ optional: true
335
+ description: The memory in bytes required for each step replica.
336
+ - name: resources
337
+ optional: true
338
+ description: A dictionary containing names of custom resources and the number
339
+ of those resources required for each step replica.
340
+ - name: input_batch_size
341
+ optional: true
342
+ description: The number of rows that will contain the batches processed by
343
+ the step.
344
+ type_info:
345
+ module: distilabel.steps.columns.keep
346
+ name: KeepColumns
347
+ name: keep_columns
348
+ connections:
349
+ - from: load_dataset
350
+ to:
351
+ - translate_en2vi_demo
352
+ - from: translate_en2vi_demo
353
+ to:
354
+ - rename_columns
355
+ - from: rename_columns
356
+ to:
357
+ - keep_columns
358
+ - from: keep_columns
359
+ to: []
360
+ routing_batch_functions: []
361
+ type_info:
362
+ module: distilabel.pipeline.local
363
+ name: Pipeline
364
+ requirements: []