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, andmanifest.jsonto an NFS-mounted output directory. - Posts an artifact-registration callback to Atlas on completion.
- Optionally logs to MLflow if
MLFLOW_TRACKING_URIis 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
Release files for saturn-tokenfactory 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| saturn_tokenfactory-0.0.1.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| saturn_tokenfactory-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / saturn_tokenfactory-0.0.1.tar.gz
| Download URL | saturn_tokenfactory-0.0.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b04a60e83f00d6f33f0bb4dfd0fd3050cc5726fd87cb1bf4a217009fb8f44903
|
|
BLAKE2b-256 checksum How to use checksums |
a4122b7851804cafa906f3bd5676743e1e46b66d048e924efedb8b228e58e342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / saturn_tokenfactory-0.0.1-py3-none-any.whl
| Download URL | saturn_tokenfactory-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b3fbebdd8330aed9c30762daa58319ca25c4c10f13dca3b6cc23ae5b6c55b13
|
|
BLAKE2b-256 checksum How to use checksums |
3fffa6a1df6a01d20d2ba06e40ffb49bf323ac7e79deefdc75854b10b20cca76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|