# nodus.recipes

> Training recipes: TrainingJob builders for fine-tuning, pretraining, distillation, preference training and RL.

Source: https://nodus-platform-site.pages.dev/docs/reference/python/nodus-recipes/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

<!-- Generated by scripts/gen-reference.mjs from the SDK docstrings (griffe). Do not edit: run make gen. -->

Training recipes: TrainingJob builders for fine-tuning, pretraining, distillation, preference training and RL.

`finetune` and `rl` build `TrainingJob`s on the catalog runtimes (resources.md §4.8, ADR-103). A builder previews with a server dry-run (`.preview()` returns a `Plan` with the estimate, the compiled Job, blocking reasons and the ETag) and runs bound to that ETag (`.run(gpu=, nodes=, max_cost=, idempotency_key=)` creates with `If-Match`). `nodes > 1` asks for a gang: the TrainingJob compiles to a Job with `spec.distributed` and the runtime launches one worker per GPU on every node with torchrun, Accelerate or DeepSpeed.

```plaintext
from nodus.recipes import TrainingJob, finetune, rl

job = TrainingJob.from_example("nodus/gsm8k:gsm8k-trained")
print(job.preview().estimate)
```

## Exports

* `Data`: defined in `nodus.recipes._job`
* `LoRA`: defined in `nodus.recipes._job`
* `Plan`: defined in `nodus.recipes._job`
* `Run`: defined in `nodus.recipes._job`
* `TrainingJob`: defined in `nodus.recipes._job`
