Skip to main content

FastSFT

Teach a small, weak model to answer like a big, smart one.

  • 🧠 Parent — a big, powerful model. The teacher.
  • 🐣 Child — a small, weak model. The student you're upgrading.
Parent  ──ask tough questions──▶  Q&A dataset  ──train──▶  Child
(big,        (judge filters                      (small,
 smart)       out weak answers)                    fast)

Ask the Parent hard questions in the style you want, keep only the good answers, and train the Child on them. Result: a tiny model that mimics the big one's style — for a fraction of the size and cost. This is called distillation.

Why bother, instead of just calling the Parent every time? Cheaper (no per-token API bill), fits on your laptop, and yours to keep — no rate limits, no vendor lock-in.


Run it

Don't wish to install? Try the Colab playground — chat with an already-trained model instantly. With the option of creating your own dataset with a prompt and training your own SFT model.

Willing to try it locally with different combinations?

uv sync --extra local-training
echo "OPENROUTER_API_KEY=sk-or-..." > .env   # free key at openrouter.ai
uv run trial_run.py

That's the whole pipeline — generate data, filter it, and train — running end to end with sensible defaults.

Open trial_run.py locally to play around: change the PROMPT to whatever persona you want, swap the CHILD_MODEL_ID, tweak a config value. Every field is commented with what it does and what else you could try. Edit, save, rerun.


Want more?


Built on distilabel, OpenRouter, Modal, Hugging Face, and PEFT.

Personal project, built for fun to learn about how post-training in LLM models looks like. Have fun with it, hopefully it's accessible to all! (won't be actively maintained)

Metadata

Release files for fastsft 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastsft 0.2.0
File Size Uploaded
fastsft-0.2.0.tar.gz 328.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastsft 0.2.0
File Interpreter ABI Platform
fastsft-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 406.4 kB

Release files / fastsft-0.2.0.tar.gz

Download URL fastsft-0.2.0.tar.gz
Size 328.2 kB
Tags Source
SHA-256 checksum
How to use checksums
55f45d47d68c02e8e23929db035e6dc3dd0a22ba067f0440bb2d1e4420613c4e
BLAKE2b-256 checksum
How to use checksums
52fc5b220fd7d0861602278f8bd0ffcb491da6c401bff943986272ba60e6a92c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / fastsft-0.2.0-py3-none-any.whl

Download URL fastsft-0.2.0-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39e8c34fb9842b6c16a5ed6146fdd027af4f8d2001d782c51ce7617faf274ff6
BLAKE2b-256 checksum
How to use checksums
cfae3b918568cf14ec77eb75b8963eaa28726e13c941e611ba9cf23053d152a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page