Suryanand/ Bootcamp
suryanand.com ↗Let's talk
← Fine-tuningAI guideIntermediate#fine-tuning#trl#unsloth#axolotl
Frame · ai-engineering / fine-tuning / 08-hosted-apis-vs-open-source-stacks.mdGuide 079 / 103

Hosted fine-tuning APIs vs open-source stacks

Once you have decided to fine-tune, the next choice is where the training runs. You can upload a JSONL file to a managed service and get back a model endpoint, or you can run an open-source trainer on GPUs you rent or own. Both are legitimate, and the right answer depends on your team's skills, your data constraints and how much control you need over the weights afterwards.

Why it matters

2026 made this choice sharper. In May 2026 OpenAI began winding down its self-serve fine-tuning platform: new organisations can no longer create fine-tuning jobs, and reports of the deprecation notice describe job creation ending for all remaining customers by January 2027, while existing fine-tuned models remain available for inference until their base models are deprecated. If your product depended on a hosted fine-tune of a closed model, you now have a migration on your roadmap.

Meanwhile, other managed options grew. Amazon Bedrock launched reinforcement fine-tuning (December 2025 for Nova models, extended in February 2026 to open-weight models such as gpt-oss-20B and Qwen3 32B, with OpenAI-compatible APIs). Google's Vertex AI offers supervised tuning for Gemini models. Together AI supports LoRA and full fine-tuning plus DPO-based preference tuning, and Fireworks offers reinforcement fine-tuning with evaluator functions. On the open-source side, TRL reached v1.x, and Unsloth and Axolotl matured into the default ways to run single-node and multi-node jobs.

How it works

The decision mostly comes down to who owns the weights and who owns the infrastructure.

Rendering diagram…

Hosted, closed base. You get the provider's best models and zero infra, but the tuned model lives only on their platform, its lifetime is tied to the base model's deprecation schedule, and supported methods and hyperparameters are whatever they expose.

Hosted, open-weight base. Managed services that tune open models often let you download adapters or weights, which gives you an exit path. You still trade some control for convenience.

Self-run open source. Full control over data, method, hyperparameters and weights; your data never leaves your environment. You own the GPU bill, the debugging and the serving stack.

The open-source options in brief:

  • TRL (Hugging Face): the reference implementation for SFT, DPO, GRPO and friends, built on Transformers and Accelerate. Most other tools build on or interoperate with it.
  • Unsloth: optimised kernels and memory tricks for fast single-GPU LoRA and QLoRA, with support for RL methods like GRPO, vision and embedding models, and export to GGUF or vLLM-ready weights.
  • Axolotl: YAML-driven training covering LoRA, QLoRA, full fine-tuning, DPO, KTO, ORPO and GRPO, with FSDP and DeepSpeed configuration for multi-GPU and multi-node runs.

Reference architecture

Whatever you pick, keep the parts that are yours (data, evals, registry) independent of the trainer. That is what makes switching cheap.

Rendering diagram…

Store data in a neutral chat format, keep your eval suite runnable against any endpoint, and record every run's base model, method, hyperparameters and dataset hash. Teams that did this could move off a deprecated platform in days; teams that kept data in a provider-specific shape spent weeks.

Code

The same QLoRA job expressed as an Axolotl config. These keys follow Axolotl's documented YAML schema; run it with axolotl train config.yml.

base_model: Qwen/Qwen3-8B
load_in_4bit: true
adapter: qlora
lora_r: 16
lora_alpha: 32
lora_dropout: 0.0
lora_target_linear: true

datasets:
  - path: data/triage_sft.jsonl
    type: chat_template
    field_messages: messages
val_set_size: 0.05

sequence_len: 4096
sample_packing: true
micro_batch_size: 2
gradient_accumulation_steps: 8
num_epochs: 2
learning_rate: 0.0002
optimizer: adamw_torch_fused
lr_scheduler: cosine
bf16: auto
gradient_checkpointing: true
output_dir: ./outputs/qwen3-8b-triage

For a single GPU, the Unsloth snippet in LoRA and QLoRA does the same job in Python. For a managed run, you would upload the same JSONL and pass equivalent hyperparameters to the provider's job API.

Trade-offs and pitfalls

  • Platform risk is real. A hosted closed-model fine-tune can be deprecated out from under you. Keep the data and evals needed to retrain elsewhere.
  • Hidden hyperparameters. Hosted APIs often hide or fix settings like LoRA rank or loss masking; results can differ from a self-run job on the same data.
  • Data residency and terms. Uploading training data to a provider is a data transfer. Check region, retention and whether data is used for anything else.
  • Self-run costs are lumpy. GPU availability, failed runs and engineer time add up. Budget for experiments, not just the final run.
  • Version churn. TRL, Unsloth and Axolotl move fast and rename options; pin versions in your training image.
  • Serving is a separate decision. A cheap training run is wasted if you cannot serve the result at your latency target.

Checklist

  • Decide whether you need to own and export the weights.
  • Keep datasets in a provider-neutral chat JSONL format.
  • Make your eval suite runnable against any endpoint.
  • Record base model, method, hyperparameters and dataset hash per run.
  • Check data residency and retention terms before uploading to a hosted service.
  • Pin trainer library versions in a container image.
  • Have a written plan for base model deprecation.

Further reading

Why this exists README

I learn best by explaining things, so I record the explanations. Everything here is free, with no sign-up. If a lesson helps you ship something, I'd love to hear about it.