sft

Reference

Config Variants

Run experiments and build the docs site

Config variants

config.yaml is the active run profile. For experiments — a different dataset, model, template, learning rate, or epoch count — create a separate variant file next to it instead of editing the active one:

config.qwen3-8b-smoke.yaml
config.<dataset>.<model>.yaml

Only replace config.yaml when you are ready to make a variant active. Each run records its results back into the active config.yamlruntime_info.output, and scripts/archive_run.sh appends a snapshot entry to artifacts/index.yaml, so a run can always be traced to the inputs it ran with.

Tunable parameters

The block declares the parameters safe to auto-tune under evolving.tunable_params in config.yaml:

ParameterMeaning
learning_rateLearning rate (1e-5 to 1e-3)
num_train_epochsNumber of training epochs
per_device_train_batch_sizeBatch size per GPU
gradient_accumulation_stepsGradient accumulation steps
max_instancesMaximum training instances (conversion cap)

See Configuration for the full hyperparameter reference.

Build and deploy the docs site

These docs are a fumadocs (Next.js) site under docs/, statically exported and served from Cloudflare Pages.

Requirements

The site needs Node >= 20. This host's system Node is 18 (apt-pinned), so a newer Node is installed via nvm. Activate it before building:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use 22

Build locally

cd docs
npm install
npm run build     # static export to docs/out/

next.config.mjs sets output: 'export', so the build emits a static out/ directory. The root redirect (//docs) is expressed in public/_redirects rather than Next's redirects(), which static export disables.

Deploy to Cloudflare Pages

docs/deploy_cloudflare_pages.sh builds and deploys to a dedicated Cloudflare Pages project (swe-sft-docs):

bash docs/deploy_cloudflare_pages.sh

It activates Node 22 via nvm, runs the static build, and deploys docs/out/ with wrangler pages deploy. It reuses the same Cloudflare credentials as the trajgen dashboard (CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID from .env.cf or ~/.config/trajgen_progress_cloudflare.env); set PROJECT_NAME=swe-sft-docs to keep the docs project independent.

Docs vs dashboard

This is the static documentation site. The live training-progress webui under dashboard/ is a separate local server, not a Cloudflare Pages project — see Dashboard.

On this page