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.
- Clone and install — this gives you the SDK, CLI, and all recipes:
Alternatively,
git clone https://github.com/snowflakedb/cortex-training.git cd cortex-training uv venv source .venv/bin/activate uv pip install -e .
uv pip install cortex-traininginstalls the SDK and CLI without recipes. - 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.
- Connect — configure a standard
Snowflake connection profile, then:
cortex-training --connection training capacity # With a configured default profile: cortex-training capacity
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=50This runs supervised fine-tuning on Qwen3-8B with the default config. See the Conversational SFT recipe for all options.
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 GPUsSee the CLI reference for the full command set. To use an existing RL framework like SkyRL, see integrations.
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.
- Getting started: set up your environment, configure credentials, and run your first job
- Key concepts and glossary: Cortex Training-specific terms and how they relate
- CLI reference: all commands, flags, and usage examples
- Python SDK reference: CortexTrainingClient API for programmatic workflows
- REST API reference: HTTP endpoints and wire format
- Model compatibility: supported models, methods, and hardware configurations
- RL framework integrations: run SkyRL, VERL, TRL, and other RL frameworks on Cortex infrastructure
- 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.