Skip to content

nodus.recipes

View Markdown

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

finetune and rl build TrainingJobs 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.

from nodus.recipes import TrainingJob, finetune, rl
job = TrainingJob.from_example("nodus/gsm8k:gsm8k-trained")
print(job.preview().estimate)
  • 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