my-distiset / pipeline.yaml
JeCabrera's picture
Upload pipeline.yaml with huggingface_hub
c4e741f verified
distilabel:
version: 1.4.0
pipeline:
name: sft
description: null
steps:
- step:
llm:
use_magpie_template: true
magpie_pre_query_template: '<|begin_of_text|><|start_header_id|>user<|end_header_id|>
'
generation_kwargs:
temperature: 0.8
do_sample: true
max_new_tokens: 512
stop_sequences:
- <|eot_id|>
- <|start_header_id|>
- assistant
- " \n\n"
use_offline_batch_generation: false
offline_batch_generation_block_until_done: null
jobs_ids: null
model_id: meta-llama/Meta-Llama-3.1-8B-Instruct
endpoint_name: null
endpoint_namespace: null
base_url: null
tokenizer_id: meta-llama/Meta-Llama-3.1-8B-Instruct
model_display_name: null
structured_output: null
type_info:
module: distilabel.llms.huggingface.inference_endpoints
name: InferenceEndpointsLLM
n_turns: 1
end_with_user: false
include_system_prompt: false
only_instruction: true
system_prompt: You are a customer support agent for a phone company. Your purpose
is to assist customers with their phone-related issues, but you are not very
patient and tend to be a bit rude. User queries will be straightforward and
clear, but you will respond in a somewhat blunt and curt manner. Remember
to keep your responses concise and to the point. User queries are often about
phone plans, billing, and technical issues. Your responses should be direct
and focus on resolving the issue at hand, but with a slightly abrasive tone.
User queries will be concise and to the point, User queries are often about
phone plans, billing, and technical issues.
name: magpie_generator_0
resources:
replicas: 1
cpus: null
gpus: null
memory: null
resources: null
input_mappings: {}
output_mappings:
instruction: prompt
batch_size: 50
group_generations: false
add_raw_output: true
add_raw_input: true
num_generations: 1
use_default_structured_output: false
num_rows: 10
runtime_parameters_info:
- name: llm
runtime_parameters_info:
- 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
- name: frequency_penalty
optional: true
- name: logit_bias
optional: true
- name: presence_penalty
optional: true
- name: seed
optional: true
- name: stop_sequences
optional: true
- name: temperature
optional: true
- name: tool_choice
optional: true
- name: tool_prompt
optional: true
- name: tools
optional: true
- name: top_p
optional: true
- name: do_sample
optional: true
- name: repetition_penalty
optional: true
- name: return_full_text
optional: true
- name: top_k
optional: true
- name: typical_p
optional: true
- name: watermark
optional: true
- 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: endpoint_name
optional: true
description: The name of the Inference Endpoint to use for the LLM.
- name: endpoint_namespace
optional: true
description: The namespace of the Inference Endpoint to use for the LLM.
- name: base_url
optional: true
description: The base URL to use for the Inference Endpoints API requests.
- name: api_key
optional: true
description: The API key to authenticate the requests to the Inference Endpoints
API.
- name: structured_output
optional: true
description: The structured output format to use across all the generations.
- name: n_turns
optional: true
description: The number of turns to generate for the conversation.
- name: end_with_user
optional: true
description: Whether the conversation should end with a user message.
- name: include_system_prompt
optional: true
description: Whether to include the system prompt used in the generated conversation.
- name: only_instruction
optional: true
description: Whether to generate only the instruction. If this argument is
`True`, then `n_turns` will be ignored.
- name: system_prompt
optional: true
description: An optional system prompt or list of system prompts that can
be used to steer the LLM to generate content of certain topic, guide the
style, etc.
- 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: 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.
- name: num_rows
optional: false
description: The number of rows to generate.
type_info:
module: distilabel.steps.tasks.magpie.generator
name: MagpieGenerator
name: magpie_generator_0
- step:
name: text_generation_0
resources:
replicas: 1
cpus: null
gpus: null
memory: null
resources: null
input_mappings:
instruction: prompt
output_mappings:
generation: completion
input_batch_size: 50
llm:
use_magpie_template: false
magpie_pre_query_template: null
generation_kwargs:
temperature: 0.8
max_new_tokens: 1024
use_offline_batch_generation: false
offline_batch_generation_block_until_done: null
jobs_ids: null
model_id: meta-llama/Meta-Llama-3.1-8B-Instruct
endpoint_name: null
endpoint_namespace: null
base_url: null
tokenizer_id: meta-llama/Meta-Llama-3.1-8B-Instruct
model_display_name: null
structured_output: null
type_info:
module: distilabel.llms.huggingface.inference_endpoints
name: InferenceEndpointsLLM
group_generations: false
add_raw_output: true
add_raw_input: true
num_generations: 1
use_default_structured_output: false
system_prompt: You are a customer support agent for a phone company. Your purpose
is to assist customers with their phone-related issues, but you are not very
patient and tend to be a bit rude. User queries will be straightforward and
clear, but you will respond in a somewhat blunt and curt manner. Remember
to keep your responses concise and to the point. User queries are often about
phone plans, billing, and technical issues. Your responses should be direct
and focus on resolving the issue at hand, but with a slightly abrasive tone.
User queries will be concise and to the point, User queries are often about
phone plans, billing, and technical issues.
use_system_prompt: true
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: generation_kwargs
description: The kwargs to be propagated to either `generate` or `agenerate`
methods within each `LLM`.
keys:
- name: max_new_tokens
optional: true
- name: frequency_penalty
optional: true
- name: logit_bias
optional: true
- name: presence_penalty
optional: true
- name: seed
optional: true
- name: stop_sequences
optional: true
- name: temperature
optional: true
- name: tool_choice
optional: true
- name: tool_prompt
optional: true
- name: tools
optional: true
- name: top_p
optional: true
- name: do_sample
optional: true
- name: repetition_penalty
optional: true
- name: return_full_text
optional: true
- name: top_k
optional: true
- name: typical_p
optional: true
- name: watermark
optional: true
- 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: endpoint_name
optional: true
description: The name of the Inference Endpoint to use for the LLM.
- name: endpoint_namespace
optional: true
description: The namespace of the Inference Endpoint to use for the LLM.
- name: base_url
optional: true
description: The base URL to use for the Inference Endpoints API requests.
- name: api_key
optional: true
description: The API key to authenticate the requests to the Inference Endpoints
API.
- 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: distilabel.steps.tasks.text_generation
name: TextGeneration
name: text_generation_0
- step:
name: keep_columns_0
resources:
replicas: 1
cpus: null
gpus: null
memory: null
resources: null
input_mappings: {}
output_mappings: {}
input_batch_size: 50
columns:
- prompt
- completion
- model_name
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_0
connections:
- from: magpie_generator_0
to:
- text_generation_0
- from: text_generation_0
to:
- keep_columns_0
- from: keep_columns_0
to: []
routing_batch_functions: []
type_info:
module: distilabel.pipeline.local
name: Pipeline
requirements: []