Templates¶
The 9 starting points offered by Pipelines → New pipeline: what each one does, its steps in run order with the settings the template changes, and the API keys it needs.
Note
Generated from the block registry and the templates by documentation/scripts/gen_reference.py — don't edit by hand. To change this page, change tuneline/registry.py or tuneline/templates.py, regenerate web/src/generated/*.json, then run the script again.
A template is only a starting graph: once created, the pipeline is yours to edit. Settings not listed under Key settings keep the block's default (see the Block reference). Values with {app_url} (the app's address) and {pipeline} (your pipeline's slug) are filled in when the run starts. Long values are shortened here; the pipeline's YAML tab shows them in full.
Where you run adds its own keys: Modal needs its token id and secret, RunPod its API key, Hugging Face Jobs your Hugging Face token and Kaggle a Kaggle API token (or the legacy username and key); Notebook and My computer need none (see Hardware and costs).
Overview¶
| Template | Id | Tags | Steps | Required API keys |
|---|---|---|---|---|
| Sanctions alert triage | sanctions-triage |
text, classification, banking | 10 | hf_token, runpod_api_key |
| Chat assistant (SFT → GGUF → Ollama) | chat-sft |
text, chat, local | 9 | hf_token |
| Preference tuning (DPO) | dpo-alignment |
text, alignment | 6 | hf_token |
| Document and image understanding (vision) | vision-documents |
vision, documents | 7 | hf_token |
| Reasoning with rewards (GRPO) | grpo-reasoning |
text, reasoning, rl | 6 | hf_token |
| Compare base models | compare-models |
evaluation | 8 | none |
| CPU smoke test (no GPU needed) | cpu-smoke-test |
test | 6 | none |
| Document vision models (segmenter, text reader, embedder) | document-vision |
vision, onnx, documents | 11 | none |
| Blank canvas | blank |
— | 0 | none |
Sanctions alert triage¶
Id sanctions-triage · tags: text, classification, banking
Fine-tunes a small model to decide ESCALATE or CLOSE on screening alerts, gates it on label accuracy and publishes it. Ships with a synthetic sample of 400 alerts.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = urlurl = {app_url}/samples/sanctions-alerts.jsonl |
— |
| 2 | clean |
Clean and dedupe | pii_redact = true |
data ← load.data |
| 3 | chat |
Format as chat | input_format = columnsprompt_template = Alert: {alert_text}\nCustomer: {customer_name} (born {customer_dob}, {customer_country})…response_template = Decision: {decision}\nRationale: {rationale}system_prompt = You are an L1 sanctions screening analyst. Decide ESCALATE or CLOSE for the alert and giv…keep_columns = decision |
data ← clean.data |
| 4 | base |
Base model | repo_id = Qwen/Qwen3-4B-Instruct-2507 |
— |
| 5 | split |
Train / validation / test split | test_size = 0.15validation_size = 0.05stratify_column = decision |
data ← chat.data |
| 6 | sft |
Fine-tune (SFT) | method = qloraepochs = 2max_seq_length = 1024 |
train ← split.traineval ← split.validationmodel ← base.model |
| 7 | eval |
Evaluate on test set | metrics = ["label_accuracy", "exact_match"]label_regex = (?i)decision:\s*([A-Za-z_\-]+)max_new_tokens = 128 |
test ← split.testmodel ← sft.model |
| 8 | gate |
Quality gate | rules = label_accuracy >= 0.9\nlabel_recall_escalate >= 0.98 |
report ← eval.reportmodel ← sft.model |
| 9 | publish |
Publish and register | hub_repo = {pipeline}register = true |
model ← gate.modelreport ← eval.report |
| 10 | deploy |
Deploy endpoint | provider = runpod_serverlessgpu = 24GB |
model ← publish.model |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | required | sft: Push the adapterpublish: Push to your Hugging Face accountdeploy: Let the server download your model |
runpod_api_key |
RunPod API key | required | deploy: Create the RunPod endpoint |
Chat assistant (SFT → GGUF → Ollama)¶
Id chat-sft · tags: text, chat, local
Fine-tunes a small chat model on conversations from the Hub, compares it with the base model, merges it and exports GGUF files you can run in Ollama.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = hfhf_repo = HuggingFaceTB/smoltalkhf_config = everyday-conversationshf_split = trainmax_rows = 2000 |
— |
| 2 | chat |
Format as chat | input_format = messages |
data ← load.data |
| 3 | base |
Base model | repo_id = Qwen/Qwen3-1.7B |
— |
| 4 | split |
Train / validation / test split | test_size = 0.05validation_size = 0.02 |
data ← chat.data |
| 5 | sft |
Fine-tune (SFT) | method = qloraepochs = 1 |
train ← split.traineval ← split.validationmodel ← base.model |
| 6 | eval |
Evaluate on test set | metrics = ["rouge_l"]max_samples = 100compare_base = true |
test ← split.testmodel ← sft.model |
| 7 | merge |
Merge adapter | defaults | model ← sft.model |
| 8 | gguf |
Export GGUF | quantizations = ["q4_k_m", "q8_0"] |
model ← merge.model |
| 9 | ollama |
Ollama package | quantization = q4_k_m |
gguf ← gguf.gguf |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | required | sft: Push the adaptermerge: Push the merged modelgguf: Push the GGUF files |
Preference tuning (DPO)¶
Id dpo-alignment · tags: text, alignment
Aligns a model on chosen/rejected answer pairs with DPO, then publishes the adapter.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = hfhf_repo = trl-lib/ultrafeedback_binarizedhf_split = trainmax_rows = 3000 |
— |
| 2 | pref |
Format as preference pairs | input_format = paired |
data ← load.data |
| 3 | base |
Base model | repo_id = Qwen/Qwen3-1.7B |
— |
| 4 | split |
Train / validation / test split | test_size = 0.05validation_size = 0.0 |
data ← pref.data |
| 5 | dpo |
Preference tuning (DPO / ORPO / KTO) | algorithm = dpomethod = loralearning_rate = 5e-05 |
train ← split.traineval ← split.testmodel ← base.model |
| 6 | publish |
Publish and register | hub_repo = {pipeline}register = true |
model ← dpo.model |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | required | dpo: Push the adapterpublish: Push to your Hugging Face account |
Document and image understanding (vision)¶
Id vision-documents · tags: vision, documents
Fine-tunes a vision-language model on image + question + answer rows, for example KYC documents, invoices or screenshots. Upload a ZIP with images and a JSONL file, or use a Hub dataset.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = upload |
— |
| 2 | vision |
Format as vision chat | input_format = columnsimage_column = imageprompt_template = {question}response_template = {answer} |
data ← load.data |
| 3 | base |
Base model | repo_id = Qwen/Qwen3-VL-2B-Instructmodality = vision |
— |
| 4 | split |
Train / validation / test split | test_size = 0.1validation_size = 0.0 |
data ← vision.data |
| 5 | sft |
Vision fine-tune (SFT) | method = qlora |
train ← split.trainmodel ← base.model |
| 6 | eval |
Evaluate on test set | metrics = ["exact_match", "contains"]max_samples = 100 |
test ← split.testmodel ← sft.model |
| 7 | publish |
Publish and register | hub_repo = {pipeline}register = true |
model ← sft.modelreport ← eval.report |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | required | sft: Push the adapterpublish: Push to your Hugging Face account |
Reasoning with rewards (GRPO)¶
Id grpo-reasoning · tags: text, reasoning, rl
Trains a small model on GSM8K math problems with rule-based rewards for the right answer and the answer format.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = hfhf_repo = openai/gsm8khf_config = mainhf_split = trainmax_rows = 2000 |
— |
| 2 | chat |
Format as chat | input_format = columnsprompt_template = {question}\n\nThink step by step, then give the final number inside <answer></answer>.response_template = {answer}output_style = prompt_completion |
data ← load.data |
| 3 | base |
Base model | repo_id = Qwen/Qwen3-1.7B |
— |
| 4 | split |
Train / validation / test split | test_size = 0.05validation_size = 0.0 |
data ← chat.data |
| 5 | grpo |
Reinforcement tuning (GRPO) | rewards = ["contains_answer", "format_regex"]max_steps = 300 |
train ← split.trainmodel ← base.model |
| 6 | eval |
Evaluate on test set | metrics = ["contains"]max_samples = 200max_new_tokens = 512 |
test ← split.testmodel ← grpo.model |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | required | grpo: Push the adapter |
Compare base models¶
Id compare-models · tags: evaluation
Scores two open models on your own test set and on standard benchmarks before you pick one to fine-tune.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = urlurl = {app_url}/samples/sanctions-alerts.jsonl |
— |
| 2 | model_a |
Base model | repo_id = Qwen/Qwen3-4B-Instruct-2507 |
— |
| 3 | model_b |
Base model | repo_id = google/gemma-4-E4B-it |
— |
| 4 | chat |
Format as chat | input_format = columnsprompt_template = Alert: {alert_text}\nCustomer: {customer_name} (born {customer_dob}, {customer_country})…response_template = Decision: {decision}\nRationale: {rationale}system_prompt = You are an L1 sanctions screening analyst. Decide ESCALATE or CLOSE for the alert and giv… |
data ← load.data |
| 5 | eval_a |
Evaluate on test set | metrics = ["label_accuracy"]compare_base = false |
test ← chat.datamodel ← model_a.model |
| 6 | eval_b |
Evaluate on test set | metrics = ["label_accuracy"]compare_base = false |
test ← chat.datamodel ← model_b.model |
| 7 | bench_a |
Benchmarks (lm-eval) | tasks = ["ifeval"]limit = 100 |
model ← model_a.model |
| 8 | bench_b |
Benchmarks (lm-eval) | tasks = ["ifeval"]limit = 100 |
model ← model_b.model |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | optional | model_a: Gated models such as Llama and Gemma 2/3model_b: Gated models such as Llama and Gemma 2/3 |
CPU smoke test (no GPU needed)¶
Id cpu-smoke-test · tags: test
Trains a 135M-parameter model for 20 steps on 60 sample chats. Runs on any computer in a few minutes, to check your setup end to end.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | load |
Load dataset | source = urlurl = {app_url}/samples/tiny-chat.jsonl |
— |
| 2 | chat |
Format as chat | input_format = messages |
data ← load.data |
| 3 | base |
Base model | repo_id = HuggingFaceTB/SmolLM2-135M-Instruct |
— |
| 4 | split |
Train / validation / test split | test_size = 0.1validation_size = 0.0 |
data ← chat.data |
| 5 | sft |
Fine-tune (SFT) | method = loralora_r = 8lora_alpha = 16max_steps = 20per_device_train_batch_size = 1gradient_accumulation_steps = 1max_seq_length = 256precision = fp32gradient_checkpointing = falsepush_to_hub = false |
train ← split.trainmodel ← base.model |
| 6 | eval |
Evaluate on test set | metrics = ["rouge_l"]max_samples = 6max_new_tokens = 48 |
test ← split.testmodel ← sft.model |
API keys
| Key | What it is | Need | Used by |
|---|---|---|---|
hf_token |
Hugging Face access token (write) | optional | base: Gated models such as Llama and Gemma 2/3 |
Document vision models (segmenter, text reader, embedder)¶
Id document-vision · tags: vision, onnx, documents
Trains three classic vision models from labelled images on your own GPU: a U-Net that finds fields and marks altered areas, a text reader for handwriting and printed lines, and an embedder that tells whether two images come from the same source. Each is gated on its validation metrics and exported to ONNX for CPU serving. Point the two image-data blocks at your folders first.
Steps
| # | Step | Block | Key settings | Linked from |
|---|---|---|---|---|
| 1 | pages |
Image data (folder) | path = /data/segmentationformat = seg_cacheval_split = test |
— |
| 2 | crops |
Image data (folder) | path = /data/cropsformat = image_shardsval_shards = 2 |
— |
| 3 | segmenter |
Train a segmenter (U-Net) | classes = 8mask_head = true |
train ← pages.data |
| 4 | reader |
Train a text reader (CRNN) | charset = latin_micr |
train ← crops.data |
| 5 | embedder |
Train an image embedder (similarity) | defaults | train ← crops.data |
| 6 | gate_seg |
Quality gate | rules = miou >= 0.6 |
report ← segmenter.reportmodel ← segmenter.model |
| 7 | gate_reader |
Quality gate | rules = cer <= 0.1 |
report ← reader.reportmodel ← reader.model |
| 8 | gate_emb |
Quality gate | rules = auc_random >= 0.9 |
report ← embedder.reportmodel ← embedder.model |
| 9 | onnx_seg |
Export to ONNX | file_name = segmenter |
model ← gate_seg.model |
| 10 | onnx_reader |
Export to ONNX | file_name = text_reader |
model ← gate_reader.model |
| 11 | onnx_emb |
Export to ONNX | file_name = embedder |
model ← gate_emb.model |
API keys
None for the pipeline itself.
Blank canvas¶
Id blank
Start from an empty pipeline.
An empty canvas: add blocks from the palette on the left.