Prerequisites
Before you start, make sure you have the following:- A Forge account. If you don’t have one, sign up.
- An API key. In Forge, click your profile icon, select Settings, and click Create new API key. Copy the key when it is displayed, because you can’t view it again. The examples on this page read it from the
WANDB_API_KEYenvironment variable; the ART quickstart shows where ART expects it. - A project in Weights & Biases to record training metrics and store the trained adapter. See Projects.
- A reward function that scores your agent’s outputs. Serverless RL trains toward whatever this function rewards, so it defines the task. The ART quickstart shows how to write one.
- The ART framework, if you use it rather than calling the API directly. Follow the install steps in the ART quickstart.
Train an agent
- ART framework
- Serverless Training API
ART wraps the Serverless Training API and manages rollouts, rewards, and checkpoints for you. It is the recommended way to start. Work through the ART quickstart, or open the example notebook, which trains an agent to play 2048 end to end.
Use your trained models
After you train a model, it is automatically available for inference. This section shows you how to construct the endpoint for a trained model and send requests to it, so you can integrate the model into your application or evaluation workflows. The same steps apply to models trained with Serverless SFT. To send requests to your trained model, you need the following:- Your API key. Create one in Forge under Settings.
- The Serverless Training API base URL,
https://forge.coreweave.com/api/training/v1/. - Your model’s endpoint.
- Your entity, which is the name of your team.
- The name of the project associated with your model.
- The trained model’s name.
- The training step of the model you want to deploy. This is usually the step where the model performed best in your evaluations.
email-specialists, your project is called mail-search, your trained model is named agent-001, and you want to deploy it on step 25, the endpoint looks like this: