Skip to main content
Together’s bring-your-own-model (BYOM) flow lets you fine-tune a model from a Hugging Face repository that isn’t in the official catalog, by pairing a base model from Together (the training template) with your custom checkpoint from Hugging Face (the actual weights to tune).

When to BYOM

Use the BYOM flow when:
  • You want to start from a community variant. A specialized model on Hugging Face (medical, legal, code) sometimes makes a better starting point than a generic base.
  • You’re continuing your own previous work. Upload your last checkpoint to Hugging Face and resume training on Together.
  • A new model isn’t in the catalog yet. As long as it has a supported architecture under 100B parameters, you can fine-tune it.

Requirements

Your model must meet these constraints:
  • Architecture: CausalLM only (text generation).
  • Size: Under 100 billion parameters.
  • Weights: .safetensors format.
  • No custom code: trust_remote_code=True is not allowed.
  • Access: The Hugging Face repo is public, or you have an API token with read access.
  • Framework compatibility: Transformers v5.10 or earlier.
You’ll also need a Together base model whose architecture matches your custom checkpoint (Llama, Qwen, Mistral, Gemma, etc.) and whose max_seq_length is no larger than your checkpoint supports.

Launch the job

Launch the job by pairing the base model (template) with from_hf_model (your checkpoint):

Pick the base template

Match these three variables to pick the base template:
  • Architecture: Must match (treat Code Llama as Llama, etc.).
  • Size: As close to your custom checkpoint as the catalog allows. If every option is larger, pick the smallest.
  • Max sequence length: The base’s max must be at least as large as your checkpoint’s; ideally not much larger.
For example: Qwen/Qwen3.5-9B-Base has Qwen3.5 architecture and 9B parameters. The catalog has a direct match, Qwen/Qwen3.5-9B: the same architecture and size, with a max sequence length that covers the checkpoint’s.

Watch and deploy

BYOM jobs use the same lifecycle as catalog jobs: The base model dictates whether the result can be hosted. If the base model isn’t in the supported models list for dedicated model inference, the fine-tune can’t be deployed as a dedicated endpoint. Pick a supported base before training.

Troubleshooting

  • Training fails with a CUDA out-of-memory error: Reduce batch_size or use a smaller base template.
  • Training fails with a checkpoint validation error: The architecture doesn’t match the base template, or a parameter is out of range. Confirm that the checkpoint is a CausalLM model, and compare its config.json with the base template’s.
  • Training fails with a runtime error: The checkpoint is likely corrupted or incomplete. Re-upload it to Hugging Face.
  • Model uses trust_remote_code: BYOM doesn’t support models that need custom code. Use a similar model that doesn’t, or contact support to ask Together to add the model to the catalog.
  • Training fails with an internal error: The platform notifies the Together team automatically. If the error persists, contact support with the job ID.

FAQ

Can I fine-tune a low-rank adapter (LoRA)? Yes. Pass the adapter repo as from_hf_model in a LoRA job whose LoRA settings (lora_r, lora_alpha, lora_dropout, and lora_trainable_modules) exactly match the adapter’s configuration. Training continues from the adapter’s weights on top of the base model, without merging the adapter first. The job outputs a trained adapter plus merged weights, like any other LoRA job. Can I train a model I uploaded for dedicated model inference? No. Models you upload for dedicated model inference aren’t visible to the fine-tuning API. Upload the model to Hugging Face instead, and pass the repo as from_hf_model. Will my fine-tuned model work for inference? Yes, if the base model you specified is supported, the architecture matches, and training completes successfully. Models built on unsupported architectures may not run reliably. If you need to run one, contact support.