emotion-vn / pipeline.yaml
BaoLocTown's picture
Upload pipeline.yaml with huggingface_hub
a7a3ab3 verified
raw
history blame
13.1 kB
distilabel:
version: 1.4.1
pipeline:
name: pipeline-translate-demo
description: Pipeline translate demo
steps:
- step:
name: load_dataset
resources:
replicas: 1
cpus: null
gpus: null
memory: null
resources: null
input_mappings: {}
output_mappings: {}
use_cache: true
batch_size: 50
repo_id: mteb/emotion
split: train
config: null
revision: null
streaming: false
num_examples: null
storage_options: null
runtime_parameters_info:
- name: resources
runtime_parameters_info:
- name: replicas
optional: true
description: The number of replicas for the step.
- name: cpus
optional: true
description: The number of CPUs assigned to each step replica.
- name: gpus
optional: true
description: The number of GPUs assigned to each step replica.
- name: memory
optional: true
description: The memory in bytes required for each step replica.
- name: resources
optional: true
description: A dictionary containing names of custom resources and the number
of those resources required for each step replica.
- name: batch_size
optional: true
description: The number of rows that will contain the batches generated by
the step.
- name: repo_id
optional: false
description: The Hugging Face Hub repository ID of the dataset to load.
- name: split
optional: true
description: The split of the dataset to load. Defaults to 'train'.
- name: config
optional: true
description: The configuration of the dataset to load. This is optional and
only needed if the dataset has multiple configurations.
- name: revision
optional: true
description: The revision of the dataset to load. Defaults to the latest revision.
- name: streaming
optional: true
description: Whether to load the dataset in streaming mode or not. Defaults
to False.
- name: num_examples
optional: true
description: The number of examples to load from the dataset. By default will
load all examples.
type_info:
module: distilabel.steps.generators.huggingface
name: LoadDataFromHub
name: load_dataset
- step:
name: translate_en2vi_demo
resources:
replicas: 1
cpus: null
gpus: 2
memory: null
resources: null
input_mappings: {}
output_mappings: {}
use_cache: true
input_batch_size: 50
llm:
cuda_devices: auto
disable_cuda_device_placement: false
use_magpie_template: false
magpie_pre_query_template: null
generation_kwargs:
temperature: 0.0
top_p: 1.0
max_new_tokens: 4096
use_offline_batch_generation: false
offline_batch_generation_block_until_done: null
jobs_ids: null
model: CohereForAI/aya-23-35B
dtype: bfloat16
trust_remote_code: false
quantization: null
revision: null
tokenizer: CohereForAI/aya-23-35B
tokenizer_mode: auto
tokenizer_revision: null
skip_tokenizer_init: false
chat_template: null
seed: 0
extra_kwargs:
tensor_parallel_size: 2
distributed_executor_backend: ray
gpu_memory_utilization: 0.9
max_model_len: 4096
structured_output: null
type_info:
module: distilabel.llms.vllm
name: vLLM
group_generations: false
add_raw_output: true
add_raw_input: true
num_generations: 1
use_default_structured_output: false
system_prompt: You are a professional translator with a deep understanding of
both the English and Vietnamese languages. You possess a high level of proficiency
in translating between these languages, ensuring that the translation retains
both the meaning and cultural nuances of the original text. With a thorough
knowledge of grammar, syntax, and colloquialisms in both languages, you can
accurately and naturally translate the following from English to Vietnamese
while maintaining its intended tone and context. Your work is known for its
precision and attention to detail, making your translations clear and effective
for a wide audience.
use_system_prompt: false
template: 'Translate the following from English to Vietnamese:
{{text}}
TRANSLATED VERSION IN VIETNAMESE IS:
'
columns:
- text
runtime_parameters_info:
- name: resources
runtime_parameters_info:
- name: replicas
optional: true
description: The number of replicas for the step.
- name: cpus
optional: true
description: The number of CPUs assigned to each step replica.
- name: gpus
optional: true
description: The number of GPUs assigned to each step replica.
- name: memory
optional: true
description: The memory in bytes required for each step replica.
- name: resources
optional: true
description: A dictionary containing names of custom resources and the number
of those resources required for each step replica.
- name: input_batch_size
optional: true
description: The number of rows that will contain the batches processed by
the step.
- name: llm
runtime_parameters_info:
- name: cuda_devices
optional: true
description: A list with the ID of the CUDA devices to be used.
- name: disable_cuda_device_placement
optional: true
description: Whether to disable the CUDA device placement logic or not.
- name: generation_kwargs
description: The kwargs to be propagated to either `generate` or `agenerate`
methods within each `LLM`.
keys:
- name: max_new_tokens
optional: true
description: the maximum number of new tokens that the model will generate. Defaults
to `128`.
- name: presence_penalty
optional: true
description: the presence penalty to use for the generation. Defaults
to `0.0`.
- name: frequency_penalty
optional: true
description: the repetition penalty to use for the generation. Defaults to
`0.0`.
- name: repetition_penalty
optional: true
description: the repetition penalty to use for the generation Defaults
to `1.0`.
- name: temperature
optional: true
description: the temperature to use for the generation. Defaults to `0.1`.
- name: top_p
optional: true
description: the top-p value to use for the generation. Defaults to `1.0`.
- name: top_k
optional: true
description: the top-k value to use for the generation. Defaults to `0`.
- name: min_p
optional: true
description: the minimum probability to use for the generation. Defaults
to `0.0`.
- name: stop
optional: true
description: a list of strings that will be used to stop the generation
when found. Defaults to `None`.
- name: stop_token_ids
optional: true
description: a list of token ids that will be used to stop the generation when
found. Defaults to `None`.
- name: include_stop_str_in_output
optional: true
description: whether to include the stop string in the output. Defaults
to `False`.
- name: logits_processors
optional: true
description: a list of functions to process the logits before sampling. Defaults
to `None`.
- name: extra_sampling_params
optional: true
description: dictionary with additional arguments to be passed to the
`SamplingParams` class from `vllm`.
- name: use_offline_batch_generation
optional: true
description: Whether to use the `offline_batch_generate` method to generate
the responses.
- name: offline_batch_generation_block_until_done
optional: true
description: If provided, then polling will be done until the `ofline_batch_generate`
method is able to retrieve the results. The value indicate the time to
wait between each polling.
- name: extra_kwargs
optional: true
description: 'Additional dictionary of keyword arguments that will be passed
to the `vLLM` class of `vllm` library. See all the supported arguments
at: https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/llm.py'
- name: structured_output
optional: true
description: The structured output format to use across all the generations.
- name: add_raw_output
optional: true
description: Whether to include the raw output of the LLM in the key `raw_output_<TASK_NAME>`
of the `distilabel_metadata` dictionary output column
- name: add_raw_input
optional: true
description: Whether to include the raw input of the LLM in the key `raw_input_<TASK_NAME>`
of the `distilabel_metadata` dictionary column
- name: num_generations
optional: true
description: The number of generations to be produced per input.
type_info:
module: __main__
name: TranslateText
name: translate_en2vi_demo
- step:
name: rename_columns
resources:
replicas: 1
cpus: null
gpus: null
memory: null
resources: null
input_mappings: {}
output_mappings: {}
use_cache: true
input_batch_size: 50
columns_map:
text: og_text
label: label
label_text: label_text
vietnamese_version: text
runtime_parameters_info:
- name: resources
runtime_parameters_info:
- name: replicas
optional: true
description: The number of replicas for the step.
- name: cpus
optional: true
description: The number of CPUs assigned to each step replica.
- name: gpus
optional: true
description: The number of GPUs assigned to each step replica.
- name: memory
optional: true
description: The memory in bytes required for each step replica.
- name: resources
optional: true
description: A dictionary containing names of custom resources and the number
of those resources required for each step replica.
- name: input_batch_size
optional: true
description: The number of rows that will contain the batches processed by
the step.
type_info:
module: __main__
name: RenameColumns
name: rename_columns
- step:
name: keep_columns
resources:
replicas: 1
cpus: null
gpus: null
memory: null
resources: null
input_mappings: {}
output_mappings: {}
use_cache: true
input_batch_size: 50
columns:
- text
- label
- label_text
- og_text
runtime_parameters_info:
- name: resources
runtime_parameters_info:
- name: replicas
optional: true
description: The number of replicas for the step.
- name: cpus
optional: true
description: The number of CPUs assigned to each step replica.
- name: gpus
optional: true
description: The number of GPUs assigned to each step replica.
- name: memory
optional: true
description: The memory in bytes required for each step replica.
- name: resources
optional: true
description: A dictionary containing names of custom resources and the number
of those resources required for each step replica.
- name: input_batch_size
optional: true
description: The number of rows that will contain the batches processed by
the step.
type_info:
module: distilabel.steps.columns.keep
name: KeepColumns
name: keep_columns
connections:
- from: load_dataset
to:
- translate_en2vi_demo
- from: translate_en2vi_demo
to:
- rename_columns
- from: rename_columns
to:
- keep_columns
- from: keep_columns
to: []
routing_batch_functions: []
type_info:
module: distilabel.pipeline.local
name: Pipeline
requirements: []