Metadata-Version: 2.5
Name: goaly-looper-cookbook
Version: 0.1.0b1
Summary: Looper's cookbook: training loops, recipes and data helpers written over Looper's SDK.
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: datasets<5,>=4.7.0
Requires-Dist: goaly-looper<1,>=0.1.0b4
Requires-Dist: transformers<6,>=5.19.0
Description-Content-Type: text/markdown

# goaly-looper-cookbook

Training loops, recipes, and tutorials for Looper, Goaly's hosted
post-training service. The cookbook includes supervised fine-tuning (SFT)
and reinforcement learning (RL) loops, message formatters, and dataset
helpers.

## Install

The PyPI package requires Python 3.12 or newer and installs the Looper SDK.

```bash
python -m pip install "goaly-looper-cookbook==0.1.0b1"
```

Import it as `looper_cookbook`.

## Run a recipe

Set `LOOPER_API_KEY` to your [Looper API key](https://looper.goaly.ai/wiki/session.html#authenticate).

```bash
export LOOPER_API_KEY="YOUR_API_KEY"
python -m looper_cookbook.recipes.sft_basic --project my-project
python -m looper_cookbook.recipes.rl_basic --project my-project --steps 20
```

| Recipe | What it does |
|---|---|
| `sft_basic` | Fine-tunes a LoRA on GSM8K or your own conversations |
| `rl_basic` | Trains on GSM8K and measures held-out performance before and after |
| `code_rl.train` | Trains on DeepCoder and runs code checks in Docker |
| `sampling_basic` | Samples a base model or one of your checkpoints |

Use `--help` for each recipe's options. See the [recipe guide](https://looper.goaly.ai/wiki/recipes.html)
and [Jupyter tutorials](https://looper.goaly.ai/wiki/tutorials.html) for examples.

The cookbook is in beta. Loops and recipes may change between releases.

## License

Apache-2.0.
