# nodus.recipes

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

Source: https://www.nodus-compute.ai/docs/reference/python/nodus-recipes/
Build revision: 4ebfc6023eeed1bd55d9969af1612182a7b0c7ff

<!-- 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`: import with `from nodus.recipes import Data`
* `LoRA`: import with `from nodus.recipes import LoRA`
* `Plan`: import with `from nodus.recipes import Plan`
* `Run`: import with `from nodus.recipes import Run`
* `TrainingJob`: import with `from nodus.recipes import TrainingJob`
