> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fireworks.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Training Shapes

> Pre-configured GPU and model training profiles that simplify distributed training setup.

# Training Shapes

In practice, a training shape is the user-facing launch input for trainer jobs. Most users only need to choose a training shape ID such as `accounts/fireworks/trainingShapes/qwen3p5-9b-256k` and pass it to the API.

<Warning>
  **A training shape is required to launch a trainer job.** In most cases, you should pass the full shared shape path `accounts/fireworks/trainingShapes/<shape>`, and the API resolves the pinned version for you.
</Warning>

The `fireworks` account is the shared public shape catalog. Shapes published under `accounts/fireworks/trainingShapes/<shape>` can be referenced by all users.

You do not need to know the versioned shape reference, image tag, GPU layout, or linked deployment shape ahead of time. The API resolves those details internally.

## What You Need To Know

For most users, the workflow is:

1. Pick a training shape ID from the available shapes list below. In most cases this should be the full shared path `accounts/fireworks/trainingShapes/<shape>`.
2. Call `resolve_training_profile(shape_id)`.
3. Pass `profile.training_shape_version` into `TrainerJobConfig.training_shape_ref`.

That is the only shape-specific value you choose yourself.

## What A Training Shape Controls

When you specify a training shape, it provides the trainer with:

* GPU and node layout: `acceleratorType`, `acceleratorCount`, `nodeCount`
* Model limits: `maxSupportedContextLength`
* Trainer runtime: `trainerImageTag`
* Linked serving setup: `deploymentShapeVersion`

## What You Can And Can't Change

You can still configure normal training-loop fields such as:

* `base_model`
* `lora_rank`
* `learning_rate`
* `gradient_accumulation_steps`
* `display_name`
* `hot_load_trainer_job` (on `DeploymentConfig`)
* Deployment replica counts (`min_replica_count` / `max_replica_count`)

<Note>
  Shape-owned infra is locked. Do not try to override `accelerator_type`, `accelerator_count`, `node_count`, `custom_image_tag`, or the linked deployment shape.
</Note>

For field-level behavior and dataclass details, see the API reference for [`TrainerJobManager`](/fine-tuning/training-api/reference/trainer-job-manager) and [`DeploymentManager`](/fine-tuning/training-api/reference/deployment-manager).

## Using a Training Shape

The only shape-specific input you provide is the shape ID:

1. **You provide the shape ID** (e.g. `accounts/fireworks/trainingShapes/qwen3p5-9b-256k`) — no version needed.
2. **The API resolves the latest validated version** via `resolve_training_profile()`.
3. **You pass the resolved version** to `TrainerJobConfig`.

You then pass the resolved version to `TrainerJobConfig`:

```python theme={null}
from fireworks.training.sdk import TrainerJobManager, TrainerJobConfig

mgr = TrainerJobManager(api_key=api_key)
shape_id = "accounts/fireworks/trainingShapes/qwen3p5-9b-256k"

# This is the only shape-specific value you choose
profile = mgr.resolve_training_profile(shape_id)
# profile.training_shape_version → "accounts/fireworks/trainingShapes/qwen3p5-9b-256k/versions/s0q58a4p"

# Pass the resolved version to the trainer config
config = TrainerJobConfig(
    base_model="accounts/fireworks/models/qwen3p5-9b",
    training_shape_ref=profile.training_shape_version,
)
endpoint = mgr.create_and_wait(config)
```

<Warning>
  Use the full training shape ID including the account prefix (for example `accounts/fireworks/trainingShapes/qwen3p5-9b-256k`). The `fireworks` account is the shared public account for training shapes, and you do **not** need to hand-write a versioned `training_shape_ref` yourself.
</Warning>

## Available Training Shapes

Below is a list of the current platform training shapes available under the shared public `fireworks` account. During Reinforcement Fine-Tuning (RFT), two types of models are often deployed: a **policy trainer** (which updates its weights) and a **reference model** (which is forward-only).

* **Policy Trainer Shapes:** These shapes are used for standard Supervised Fine-Tuning (SFT) or as the active policy model during Reinforcement Learning (RL).
* **Forward-Only / Reference Shapes:** These shapes are used for reference models in RL pipelines. They do not require optimizer states or backward passes, and thus often require fewer resources.

### Qwen 3.5 (Dense)

#### Qwen 3.5 9B

**Model:** `accounts/fireworks/models/qwen3p5-9b`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-9b-256k">`qwen3p5-9b-256k`</Tooltip> (256k, 2 GPUs)
* **LoRA trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-9b-256k-lora">`qwen3p5-9b-256k-lora`</Tooltip> (256k, 2 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-9b-256k-forward-only">`qwen3p5-9b-256k-forward-only`</Tooltip> (256k, 2 GPUs)

#### Qwen 3.5 27B

**Model:** `accounts/fireworks/models/qwen3p5-27b`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-27b-256k">`qwen3p5-27b-256k`</Tooltip> (256k, 4 GPUs)
* **LoRA trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-27b-256k-lora">`qwen3p5-27b-256k-lora`</Tooltip> (256k, 4 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-27b-256k-forward-only">`qwen3p5-27b-256k-forward-only`</Tooltip> (256k, 2 GPUs)

### Qwen 3.5 (Mixture-of-Experts)

#### Qwen 3.5 35B A3B

**Model:** `accounts/fireworks/models/qwen3p5-35b-a3b`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-35b-a3b-256k">`qwen3p5-35b-a3b-256k`</Tooltip> (256k, 8 GPUs)
* **LoRA trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-35b-a3b-256k-lora">`qwen3p5-35b-a3b-256k-lora`</Tooltip> (256k, 8 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-35b-a3b-256k-forward-only">`qwen3p5-35b-a3b-256k-forward-only`</Tooltip> (256k, 4 GPUs)

#### Qwen 3.5 397B A17B

**Model:** `accounts/fireworks/models/qwen3p5-397b-a17b`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-397b-a17b-256k">`qwen3p5-397b-a17b-256k`</Tooltip> (256k, 4 nodes)
* **LoRA trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-397b-a17b-256k-lora">`qwen3p5-397b-a17b-256k-lora`</Tooltip> (256k, 8 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/qwen3p5-397b-a17b-256k-forward-only">`qwen3p5-397b-a17b-256k-forward-only`</Tooltip> (256k, 8 GPUs)

### Gemma 4 (Dense)

#### Gemma 4 31B

**Model:** `accounts/fireworks/models/gemma-4-31b-it`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/gemma-4-31b-256k-b200">`gemma-4-31b-256k-b200`</Tooltip> (256k, 4 GPUs)
* **LoRA trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/gemma-4-31b-256k-b200-lora">`gemma-4-31b-256k-b200-lora`</Tooltip> (256k, 4 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/gemma-4-31b-256k-b200-forward-only">`gemma-4-31b-256k-b200-forward-only`</Tooltip> (256k, 4 GPUs)

### Gemma 4 (Mixture-of-Experts)

#### Gemma 4 26B A4B

**Model:** `accounts/fireworks/models/gemma-4-26b-a4b-it`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/gemma-4-26b-a4b-256k-b200">`gemma-4-26b-a4b-256k-b200`</Tooltip> (256k, 4 GPUs)
* **LoRA trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/gemma-4-26b-a4b-256k-b200-lora">`gemma-4-26b-a4b-256k-b200-lora`</Tooltip> (256k, 4 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/gemma-4-26b-a4b-256k-b200-forward-only">`gemma-4-26b-a4b-256k-b200-forward-only`</Tooltip> (256k, 4 GPUs)

### Llama 3

#### Llama 70B

**Model:** `accounts/fireworks/models/llama-v3p3-70b-instruct`

* **Policy trainer:** <Tooltip tip="accounts/fireworks/trainingShapes/llama70b-policy">`llama70b-policy`</Tooltip> (128k, 8 GPUs)
* **Forward-only / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/llama70b-forward-only">`llama70b-forward-only`</Tooltip> (128k, 4 GPUs)

### Kimi

#### Kimi 2.5 Text-Only

**Model:** `accounts/fireworks/models/kimi-k2p5`

* **Policy trainer (text only):** <Tooltip tip="accounts/fireworks/trainingShapes/kimi-2p5-text-only-256k">`kimi-2p5-text-only-256k`</Tooltip> (256k, 64 GPUs)
* **Forward-only (text only) / reference:** <Tooltip tip="accounts/fireworks/trainingShapes/kimi-2p5-text-only-256k-forward-only">`kimi-2p5-text-only-256k-forward-only`</Tooltip> (256k, 16 GPUs)
* **LoRA trainer (text only):** <Tooltip tip="accounts/fireworks/trainingShapes/kimi-k2p5-text-only-256k-lora">`kimi-k2p5-text-only-256k-lora`</Tooltip> (256k, 8 GPUs)
