Skip to content

Repository files navigation


License PyPI

Cortex Training is Snowflake's serverless platform for post-training open-weight LLMs on managed GPU clusters. This repository contains the Python SDK, CLI, and ready-to-run recipes, powered by the open-source Arctic Platform engine. Run reinforcement learning, supervised fine-tuning, and inference serving, no GPU infrastructure to manage.

Getting Started

  1. Clone and install — this gives you the SDK, CLI, and all recipes:
    git clone https://github.com/snowflakedb/cortex-training.git
    cd cortex-training
    uv venv
    source .venv/bin/activate
    uv pip install -e .
    Alternatively, uv pip install cortex-training installs the SDK and CLI without recipes.
  2. Get access — you need a Snowflake account with Cortex Training enabled. See account setup for the full walkthrough and authentication for PAT generation and connection configuration.
  3. Connect — configure a standard Snowflake connection profile, then:
    cortex-training --connection training capacity
    # With a configured default profile: cortex-training capacity

Quick Example

Quick Start Recipe (recommended)

Fine-tune a chat model in one command using our built-in recipes:

python -m recipes.sft.conversational.train \
  config=~/your-config.json \
  max_steps=50

This runs supervised fine-tuning on Qwen3-8B with the default config. See the Conversational SFT recipe for all options.

CLI Mode

Recipes are built from step-level CLI primitives. Use them directly for full control over each training step:

cortex-training submit job.json          # create a job
cortex-training fwd-bwd payload.json     # run a forward-backward pass
cortex-training step --lr 1e-4           # optimizer step
cortex-training generate --prompt "..."  # sample from the model
cortex-training cancel JOB_ID            # release GPUs

See the CLI reference for the full command set. To use an existing RL framework like SkyRL, see integrations.

Recipes

Recipes are end-to-end post-training and inference workflows you can run out of the box or customize. Each includes a Python entry point, configuration files, and a README with expected results. For detailed instructions on running a recipe or building a customized workflow, see the guides below:

  • Conversational SFT: supervised fine-tuning on chat datasets with LoRA or full-parameter training.
  • Math GRPO: reinforcement learning for mathematical reasoning with verifiable rewards.
  • Inference: serve a model or checkpoint, generate responses, and evaluate.

Browse the recipe index for all workflows.

Documentation

Development

  • Contributing to the client or recipes — see the contributing guides for documentation guidelines, recipe templates, and development setup.
  • Building a distributable package — see build instructions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages