This guide walks you from a fresh Snowflake account to a completed training job. Follow the steps in order.
If you already have a Snowflake account with Cortex Training enabled, skip to Step 3.
Create a free trial account at signup.snowflake.com. Fill in your details and verify your email. No credit card is required. The cloud provider and region are assigned automatically.
After creating your account, contact the Snowflake team to enable Cortex Training and reserve GPU capacity. You will need to provide:
-
Account locator — find it in Snowsight by running:
SELECT CURRENT_ACCOUNT();Or check the URL in your browser:
https://app.snowflake.com/ORG/ACCOUNT— theACCOUNTpart is your account locator. -
Organization name — find it by running:
SELECT CURRENT_ORGANIZATION_NAME();Or from the Snowsight URL: the
ORGpart. -
Region — confirm which cloud region your account is in:
SELECT CURRENT_REGION();
Share these three values with the Snowflake team. They will:
- Enable the Cortex Training feature on your account
- Reserve GPU capacity for your use
You cannot proceed until this is complete. Once the team confirms enablement, continue to the next step.
Generate a Programmatic Access Token (PAT) and configure your client connection. Follow the authentication guide to complete this step. You verify the connection after installing the client in the next step.
Requires uv (or pip) and Python 3.10 or later
for the client, or 3.11 or later for the examples (tinker-cookbook needs it).
Clone the repository and install:
git clone https://github.com/snowflakedb/cortex-training.git
cd cortex-training
uv venv
source .venv/bin/activate
uv pip install -e .Install the example dependency. The training examples and the inference
generate and evaluate commands need it for tokenization; serve and the
raw API examples do not:
uv pip install 'tinker-cookbook[math-rl] @ git+https://github.com/thinking-machines-lab/tinker-cookbook.git@nightly'Verify your connection and GPU capacity:
cortex-training capacityYou should see your reserved GPU capacity listed. If you see zero capacity or an error, confirm with the Snowflake team that enablement and GPU reservation are complete.
The conversational SFT example fine-tunes Qwen3-8B on a one-example chat dataset ("Who trained you?" → "Snowflake AI Research"). Start with a short run:
python -m recipes.sft_quickstart.conversational.train \
config=/path/to/your-config.json \
max_steps=10The example uses the same connection resolution as the CLI, so a default
connection in connections.toml is picked up automatically. Pass
connection=<name> for a named profile, or config= for a
JSON connection file.
What happens during this run:
- Creates a training job on the platform (allocates 4 GPUs, loads Qwen3-8B)
- Tokenizes the chat dataset
- Runs 10 forward-backward + optimizer steps
- Saves a weights-only checkpoint
- Cancels the job and releases GPUs
Watch for train_nll in the output — it should decrease, indicating the model
is learning.
The example prints a generate command, with the job and checkpoint IDs filled in, after it saves the checkpoint. Run it to confirm the model learned the expected answer:
python -m recipes.inference.generate \
config=/path/to/your-config.json \
source_job_id=TRAINING_JOB_ID \
checkpoint_id=CHECKPOINT_ID \
temperature=0 \
prompt="Who trained you?"The answer should be Snowflake AI Research.
Useful commands while jobs are running or after they complete:
cortex-training list # list all your jobs
cortex-training get JOB_ID --raw # detailed job info
cortex-training get JOB_ID # its config, to submit again
cortex-training cancel JOB_ID # cancel a job and release GPUs
cortex-training tui # terminal UI for browsing jobs and logsYou have a working setup. From here:
- Try different training methods: pass
lora=truefor LoRA,model=for a different model from the model catalog, orlr=,train_batch_size=andmax_seq_len=for different hyperparameters - Try reinforcement learning: run the Math GRPO example
- Explore all examples: browse the example index
- Learn the CLI: see the CLI reference for all available commands