Loading…
Fine-tune Any LLM from the Hugging Face Hub with Together AI
Hugging FaceZain Hasan, Artem Chumachenko, Egor Timofeev, Max Ryabinin
Summary
Together AI and Hugging Face have introduced an integration enabling developers to fine-tune compatible Hugging Face Hub models directly on Together AI's managed infrastructure. To launch a fine-tuning job via the Python SDK, users provide a base model from Together's catalog as a configuration template alongside the target Hugging Face repository identifier. This base model template dictates GPU allocation, memory configuration, training pipelines, and inference setup for custom models with matching architectures and sizes. The workflow operates bidirectionally, pulling from public or token-authenticated private repositories and optionally pushing completed checkpoints back to the Hub upon completion. Geared toward CausalLM models under 100 billion parameters, the capability enables faster iteration cycles and domain adaptation without custom DevOps infrastructure.
Context
Traditional fine-tuning infrastructure for open-source AI models is complex, expensive, and often requires significant DevOps expertise to set up and maintain.
Approach / What changed
Together AI enabled fine-tuning of compatible Hugging Face Hub models through its API. The workflow pairs a base template model from Together's catalog for resource and training configuration with a target Hugging Face model, supporting both public and token-authenticated private repositories as well as automatic uploads back to the Hub.
Takeaways
- Fine-tuning requires specifying both a base model template from Together AI for GPU configuration and a custom Hugging Face model sharing a similar architecture.
- The integration supports bidirectional Hub access, enabling downloads from private repositories using tokens and automatic output uploads to Hugging Face.
- The fine-tuning infrastructure is designed to support all CausalLM model architectures under 100 billion parameters.
Related reading
Introducing AnyLanguageModel: One API for Local and Remote LLMs on Apple Platforms
Apple developers frequently face integration friction when trying to support a mix of local and cloud language models across disparate APIs. To resolve this fragmentation, AnyLanguageModel introduces a unified Swift package that acts as a drop-in replacement for Apple's Foundation Models framework. The package standardizes interactions across local backends such as Core ML, MLX, and llama.cpp alongside cloud providers like Anthropic and OpenAI. To avoid dependency bloat from multi-backend support, the library employs Swift 6.1 package traits so projects only import the specific runtime engines they require. Furthermore, the library extends beyond current Foundation Models limitations by adding prompt image support for vision-language models.
MatttWe Got Claude to Fine-Tune an Open Source LLM