Skip to main content

Token Factory fine-tuning utilities — platform-owned LoRA SFT training scripts for Saturn Cloud's no-code fine-tuning product.

Project description

Token Factory training utilities

Platform-owned training utilities for Saturn Cloud's Token Factory product — a no-code LoRA fine-tuning service.

This package runs inside a Token Factory fine-tuning job pod. It is not intended as a general-purpose fine-tuning library; the runtime contract (env vars, NFS layout, Atlas callback) is specific to the Token Factory platform. See DESIGN.md for the full specification.

Status: early development. The API and CLI surface are not yet stable.

What it does

A single Python entrypoint (saturn-tokenfactory-train, or python -m saturn_tokenfactory) that:

  • Reads hyperparameters from environment variables set by Atlas.
  • Loads a base model (Llama 3 / Mistral / Qwen) with family-aware defaults.
  • Applies LoRA adapters via PEFT.
  • Loads a dataset from an NFS-mounted directory (.jsonl, conversational / instruction / text formats).
  • Runs SFT with trl.SFTTrainer.
  • Writes config.json, LoRA checkpoints, and manifest.json to an NFS-mounted output directory.
  • Posts an artifact-registration callback to Atlas on completion.
  • Optionally logs to MLflow if MLFLOW_TRACKING_URI is set.

Out of scope

LoRA SFT only. No full fine-tunes, no DPO/RLHF, no multi-GPU, no serving. See DESIGN.md §14 for the explicit out-of-scope list.

Development

make conda-update      # create/update the conda env
make check-format      # black + isort (read-only check)
make format-backend    # black + isort (apply)
make flake8 mypy       # lint + type-check
make test-backend      # unit tests
make lint-backend      # full lint chain

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saturn_tokenfactory-0.0.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saturn_tokenfactory-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file saturn_tokenfactory-0.0.1.tar.gz.

File metadata

  • Download URL: saturn_tokenfactory-0.0.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for saturn_tokenfactory-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b04a60e83f00d6f33f0bb4dfd0fd3050cc5726fd87cb1bf4a217009fb8f44903
MD5 04c49a581e2f3b4b61b3a8d9b6cf2553
BLAKE2b-256 a4122b7851804cafa906f3bd5676743e1e46b66d048e924efedb8b228e58e342

See more details on using hashes here.

File details

Details for the file saturn_tokenfactory-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for saturn_tokenfactory-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b3fbebdd8330aed9c30762daa58319ca25c4c10f13dca3b6cc23ae5b6c55b13
MD5 f57b1e5037e8e79f4cdae5b3e5083444
BLAKE2b-256 3fffa6a1df6a01d20d2ba06e40ffb49bf323ac7e79deefdc75854b10b20cca76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page