{
  "@context": "https://schema.org",
  "@id": "https://aggr.aymericbeaumet.com/items/huggingface-co/2025-09-10-fine-tune-any-llm-from-the-hugging-face-hub-with-together-ai/#webpage",
  "@type": [
    "WebPage",
    "ArchiveComponent"
  ],
  "articleBody": "[![image/png](https://cdn-uploads.huggingface.co/production/uploads/672d05dcbde669ec7e36bea9/TmGl980Tiaw5SeFt59krJ.png)](https://cdn-uploads.huggingface.co/production/uploads/672d05dcbde669ec7e36bea9/TmGl980Tiaw5SeFt59krJ.png) The pace of AI development today is breathtaking. Every single day, hundreds of new models appear on the [Hugging Face Hub](https://huggingface.co/models), some are specialized variants of popular base models like Llama or Qwen, others feature novel architectures or have been trained from scratch for specific domains. Whether it's a medical AI trained on clinical data, a coding assistant optimized for a particular programming language, or a multilingual model fine-tuned for specific cultural contexts, the Hugging Face Hub has become the beating heart of open-source AI innovation.\n\nBut here's the challenge: finding an amazing model is just the beginning. What happens when you discover a model that's 90% perfect for your use case, but you need that extra 10% of customization? Traditional fine-tuning infrastructure is complex, expensive, and often requires significant DevOps expertise to set up and maintain.\n\nThis is exactly the gap that Together AI and Hugging Face are bridging today. We're announcing a powerful new capability that makes the entire Hugging Face Hub available for fine-tuning using Together AI's infrastructure. Now, any compatible LLM on the Hub, whether it's from Meta or an individual contributor, can be fine-tuned with the same ease and reliability you expect from Together's platform.🚀\n\n## **Getting Started in 5 Minutes**\n\nHere's all it takes to start fine-tuning a HF model on the Together AI platform:\n\n```python\n#pip install together\n\nfrom together import Together\n\nclient = Together(api_key=\"your-api-key\")\n\nfile_upload = client.files.upload(\"sft_examples.jsonl\", check=True)\n\n# Fine-tune any compatible HF model\njob = client.fine_tuning.create(\n    model=\"togethercomputer/llama-2-7b-chat\",  # Base model for configuration\n    from_hf_model=\"HuggingFaceTB/SmolLM2-1.7B-Instruct\",  # Your chosen HF model\n    training_file=file_upload.id,\n    n_epochs=3,\n    learning_rate=1e-5,\n    hf_api_token=\"hf_***\",  # for private repos\n    hf_output_repo_name=\"my-username-org/SmolLM2-1.7B-FT\"  # to upload model back to hub\n)\n\nprint(f\"Training job started: {job.id}\")\n```\n\nThat's it! Your model will be trained on Together's infrastructure and can be deployed for inference, downloaded or even uploaded back to the Hub! For private repositories, simply add your HF token with `hf_api_token=\"hf_xxxxxxxxxxxx\"`.\n\n## How It Works:\n\nAs seen in the example above, when you fine-tune a Hugging Face model on Together AI, you actually specify two models:\n\n- **Base Model** (`model` parameter): A model from Together's [official catalog](https://docs.together.ai/docs/fine-tuning-models) that provides the infrastructure configuration, training optimizations, and inference setup\n- **Custom Model** (`from_hf_model`parameter): Your actual Hugging Face model that gets fine-tuned\n\nThink of the base model as a \"training template.\" It tells our system how to optimally allocate GPU resources, configure memory usage, set up the training pipeline, and prepare the model for inference. Your custom model should have a similar architecture, approximate size, and sequence length to the base model for optimal results.\n\nAs seen in the example above, if you want to fine-tune `HuggingFaceTB/SmolLM2-1.7B-Instruct` (which uses Llama architecture), you'd use `togethercomputer/llama-2-7b-chat` as your base model template, because they share the same underlying architecture.\n\nThe integration works **bidirectionally**. Together AI can pull any compatible public model from the Hugging Face Hub for training, and with the proper API tokens, it can download models private repositories as well. After training, your fine-tuned model can be automatically pushed back onto the Hub if you've specified `hf_output_repo_name`, making it available for sharing with your team or the broader community.\n\nIn general, all `CausalLM` models under 100B params are intended to work. For a comprehensive walkthrough on how to choose base and custom models and much more, read our full [guide](https://docs.together.ai/docs/fine-tuning-byom)!\n\n## What This Means for Developers\n\nThis integration solves a real problem many of us have faced: finding a great model on Hugging Face but not having the infrastructure to actually fine-tune it for your specific needs. Now you can go from discovering a promising model to having a customized version running in production with just a few API calls.\n\nThe big win here is removing friction. Instead of spending days setting up training infrastructure or being limited to whatever models are officially supported by various platforms, you can now experiment with any compatible model from the Hub. Found a specialized coding model that's close to what you need? Train it on your data!📈\n\nFor teams, this means faster iteration cycles. You can test multiple model approaches quickly, build on community innovations, and even use your own fine-tuned models as starting points for further customization.\n\n## **How Teams Are Using This Feature?**\n\nBeta users and early adopters of this feature are already seeing results across diverse use cases.\n\n[**Slingshot AI**](https://www.together.ai/customers/slingshot-ai) has integrated this capability directly into their model development pipeline. Rather than being limited to Together's model catalog, they can now run parts of the training pipeline on their own infrastructure, upload those models to the Hub, and then perform continued fine-tuning of those models using the Together AI fine-tuning platform. This has dramatically accelerated their development cycles and allowed them to easily experiment with a broad variety of model variants.\n\n[**Parsed**](https://www.together.ai/blog/fine-tune-small-open-source-llms-outperform-closed-models) has demonstrated the power of this approach in their work showing how small, well-tuned open-source models can outperform much larger closed models. By fine-tuning models on carefully curated datasets, they've achieved superior performance while maintaining cost efficiency and full control over their models.\n\n**Common usage we're seeing from other customers include:**\n\n- *Domain Adaptation*: Taking general-purpose models and specializing them for industries like healthcare, finance, or legal work. Teams discover models that already have some domain knowledge and use Together's infrastructure to adapt them to their specific data and requirements.\n- *Iterative Model Improvement*: Starting with a community model, fine-tuning it, then using that result as the starting point for further refinement. This creates a compound improvement effect that would be difficult to achieve starting from scratch.\n- *Community Model Specialization*: Leveraging models that have already been optimized for specific tasks (like coding, reasoning, or multilingual capabilities) and further customizing them for proprietary use cases.\n- *Architecture Exploration*: Quickly testing newer architectures and model variants as they're released, without waiting for them to be added to official platforms.\n\nThe most significant advantage teams report is *speed to value*. Instead of spending weeks setting up training infrastructure or months training models from scratch, they can identify promising starting points from the community and have specialized models running in production within days.\n\nCost efficiency is another major benefit. By starting with models that already have relevant capabilities, teams need fewer training epochs and can use smaller datasets to achieve their target performance, dramatically reducing compute costs.\n\nPerhaps most importantly, this approach gives teams access to the collective intelligence of the open-source community. Every breakthrough, every specialized adaptation, every novel architecture becomes a potential starting point for their own work.\n\n## Show Us What You Build!🔨\n\nAs expected with a large feature of this nature, we're actively improving the experience based on real usage, so your feedback directly shapes the platform!\n\nStart with our [implementation guide](https://docs.together.ai/docs/fine-tuning-byom) for examples and troubleshooting tips. If you run into issues or want to share what you're building, hop into our [Discord](https://discord.gg/9Rk6sSeWEG), our team is on there and the community is pretty active about helping each other out.\n\nIf you have any feedback about fine-tuning at Together AI or want to explore it for your tasks in more depth, feel free to [reach out to us](https://www.together.ai/contact)!\n",
  "authors": [],
  "captured_at": "2026-10-04T12:50:30.804479567+00:00",
  "category": "ai",
  "content_html": "<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://cdn-uploads.huggingface.co/production/uploads/672d05dcbde669ec7e36bea9/TmGl980Tiaw5SeFt59krJ.png\"><picture class=\"article-picture article-picture-fallback\" style=\"--image-ratio:16 / 9\"><img src=\"https://cdn-uploads.huggingface.co/production/uploads/672d05dcbde669ec7e36bea9/TmGl980Tiaw5SeFt59krJ.png\" alt=\"image/png\" loading=\"eager\" decoding=\"async\" fetchpriority=\"high\" referrerpolicy=\"no-referrer\" class=\"progressive-image\"></picture></a> The pace of AI development today is breathtaking. Every single day, hundreds of new models appear on the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://huggingface.co/models\">Hugging Face Hub</a>, some are specialized variants of popular base models like Llama or Qwen, others feature novel architectures or have been trained from scratch for specific domains. Whether it's a medical AI trained on clinical data, a coding assistant optimized for a particular programming language, or a multilingual model fine-tuned for specific cultural contexts, the Hugging Face Hub has become the beating heart of open-source AI innovation.</p>\n<p>But here's the challenge: finding an amazing model is just the beginning. What happens when you discover a model that's 90% perfect for your use case, but you need that extra 10% of customization? Traditional fine-tuning infrastructure is complex, expensive, and often requires significant DevOps expertise to set up and maintain.</p>\n<p>This is exactly the gap that Together AI and Hugging Face are bridging today. We're announcing a powerful new capability that makes the entire Hugging Face Hub available for fine-tuning using Together AI's infrastructure. Now, any compatible LLM on the Hub, whether it's from Meta or an individual contributor, can be fine-tuned with the same ease and reliability you expect from Together's platform.🚀</p>\n<h2><strong>Getting Started in 5 Minutes</strong></h2>\n<p>Here's all it takes to start fine-tuning a HF model on the Together AI platform:</p>\n<pre><code class=\"language-python\"><span class=\"code-snippet\" data-language=\"Python\"><span class=\"syntax-source syntax-python\"><span class=\"syntax-comment syntax-line syntax-number-sign syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-python\">#</span>pip install together\n</span>\n<span class=\"syntax-meta syntax-statement syntax-import syntax-python\"><span class=\"syntax-keyword syntax-control syntax-import syntax-from syntax-python\">from</span></span><span class=\"syntax-meta syntax-statement syntax-import syntax-python\"><span class=\"syntax-meta syntax-import-source syntax-python\"> <span class=\"syntax-meta syntax-import-path syntax-python\"><span class=\"syntax-meta syntax-import-name syntax-python\">together</span></span> <span class=\"syntax-meta syntax-statement syntax-import syntax-python\"><span class=\"syntax-keyword syntax-control syntax-import syntax-python\">import</span></span></span></span><span class=\"syntax-meta syntax-statement syntax-import syntax-python\"></span><span class=\"syntax-meta syntax-statement syntax-import syntax-python\"> <span class=\"syntax-meta syntax-generic-name syntax-python\">Together</span></span>\n\n<span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">client</span></span> <span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span> <span class=\"syntax-meta syntax-function-call syntax-python\"><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-variable syntax-function syntax-python\">Together</span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python\">(</span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-python\"><span class=\"syntax-variable syntax-parameter syntax-python\">api_key</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">your-api-key<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python\">)</span></span>\n\n<span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">file_upload</span></span> <span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span> <span class=\"syntax-meta syntax-function-call syntax-python\"><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">client</span><span class=\"syntax-punctuation syntax-accessor syntax-dot syntax-python\">.</span><span class=\"syntax-meta syntax-generic-name syntax-python\">files</span><span class=\"syntax-punctuation syntax-accessor syntax-dot syntax-python\">.</span></span><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-variable syntax-function syntax-python\">upload</span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python\">(</span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-python\"><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">sft_examples.jsonl<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span> <span class=\"syntax-variable syntax-parameter syntax-python\">check</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-constant syntax-language syntax-python\">True</span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python\">)</span></span>\n\n<span class=\"syntax-comment syntax-line syntax-number-sign syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-python\">#</span> Fine-tune any compatible HF model\n</span><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">job</span></span> <span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span> <span class=\"syntax-meta syntax-function-call syntax-python\"><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">client</span><span class=\"syntax-punctuation syntax-accessor syntax-dot syntax-python\">.</span><span class=\"syntax-meta syntax-generic-name syntax-python\">fine_tuning</span><span class=\"syntax-punctuation syntax-accessor syntax-dot syntax-python\">.</span></span><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-variable syntax-function syntax-python\">create</span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python\">(</span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-python\">\n    <span class=\"syntax-variable syntax-parameter syntax-python\">model</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">togethercomputer/llama-2-7b-chat<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span>  <span class=\"syntax-comment syntax-line syntax-number-sign syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-python\">#</span> Base model for configuration\n</span>    <span class=\"syntax-variable syntax-parameter syntax-python\">from_hf_model</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">HuggingFaceTB/SmolLM2-1.7B-Instruct<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span>  <span class=\"syntax-comment syntax-line syntax-number-sign syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-python\">#</span> Your chosen HF model\n</span>    <span class=\"syntax-variable syntax-parameter syntax-python\">training_file</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">file_upload</span><span class=\"syntax-punctuation syntax-accessor syntax-dot syntax-python\">.</span><span class=\"syntax-meta syntax-generic-name syntax-python\">id</span></span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span>\n    <span class=\"syntax-variable syntax-parameter syntax-python\">n_epochs</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-constant syntax-numeric syntax-integer syntax-decimal syntax-python\">3</span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span>\n    <span class=\"syntax-variable syntax-parameter syntax-python\">learning_rate</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-constant syntax-numeric syntax-float syntax-python\">1e-5</span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span>\n    <span class=\"syntax-variable syntax-parameter syntax-python\">hf_api_token</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">hf_***<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span><span class=\"syntax-punctuation syntax-separator syntax-arguments syntax-python\">,</span>  <span class=\"syntax-comment syntax-line syntax-number-sign syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-python\">#</span> for private repos\n</span>    <span class=\"syntax-variable syntax-parameter syntax-python\">hf_output_repo_name</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-python\">=</span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">my-username-org/SmolLM2-1.7B-FT<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span>  <span class=\"syntax-comment syntax-line syntax-number-sign syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-python\">#</span> to upload model back to hub\n</span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python\">)</span></span>\n\n<span class=\"syntax-meta syntax-function-call syntax-python\"><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-support syntax-function syntax-builtin syntax-python\">print</span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-begin syntax-python\">(</span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-python\"><span class=\"syntax-storage syntax-type syntax-string syntax-python\">f</span><span class=\"syntax-meta syntax-string syntax-interpolated syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-python\">&quot;</span></span></span><span class=\"syntax-meta syntax-string syntax-interpolated syntax-python\"><span class=\"syntax-string syntax-quoted syntax-double syntax-python\">Training job started: </span><span class=\"syntax-meta syntax-interpolation syntax-python\"><span class=\"syntax-punctuation syntax-section syntax-interpolation syntax-begin syntax-python\">{</span><span class=\"syntax-source syntax-python syntax-embedded\"><span class=\"syntax-meta syntax-qualified-name syntax-python\"><span class=\"syntax-meta syntax-generic-name syntax-python\">job</span><span class=\"syntax-punctuation syntax-accessor syntax-dot syntax-python\">.</span><span class=\"syntax-meta syntax-generic-name syntax-python\">id</span></span></span></span><span class=\"syntax-meta syntax-interpolation syntax-python\"><span class=\"syntax-punctuation syntax-section syntax-interpolation syntax-end syntax-python\">}</span></span><span class=\"syntax-string syntax-quoted syntax-double syntax-python\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-python\">&quot;</span></span></span></span><span class=\"syntax-punctuation syntax-section syntax-arguments syntax-end syntax-python\">)</span></span>\n</span></span></code></pre>\n<p>That's it! Your model will be trained on Together's infrastructure and can be deployed for inference, downloaded or even uploaded back to the Hub! For private repositories, simply add your HF token with <code>hf_api_token=&quot;hf_xxxxxxxxxxxx&quot;</code>.</p>\n<h2>How It Works:</h2>\n<p>As seen in the example above, when you fine-tune a Hugging Face model on Together AI, you actually specify two models:</p>\n<ul>\n<li><strong>Base Model</strong> (<code>model</code> parameter): A model from Together's <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://docs.together.ai/docs/fine-tuning-models\">official catalog</a> that provides the infrastructure configuration, training optimizations, and inference setup</li>\n<li><strong>Custom Model</strong> (<code>from_hf_model</code>parameter): Your actual Hugging Face model that gets fine-tuned</li>\n</ul>\n<p>Think of the base model as a &quot;training template.&quot; It tells our system how to optimally allocate GPU resources, configure memory usage, set up the training pipeline, and prepare the model for inference. Your custom model should have a similar architecture, approximate size, and sequence length to the base model for optimal results.</p>\n<p>As seen in the example above, if you want to fine-tune <code>HuggingFaceTB/SmolLM2-1.7B-Instruct</code> (which uses Llama architecture), you'd use <code>togethercomputer/llama-2-7b-chat</code> as your base model template, because they share the same underlying architecture.</p>\n<p>The integration works <strong>bidirectionally</strong>. Together AI can pull any compatible public model from the Hugging Face Hub for training, and with the proper API tokens, it can download models private repositories as well. After training, your fine-tuned model can be automatically pushed back onto the Hub if you've specified <code>hf_output_repo_name</code>, making it available for sharing with your team or the broader community.</p>\n<p>In general, all <code>CausalLM</code> models under 100B params are intended to work. For a comprehensive walkthrough on how to choose base and custom models and much more, read our full <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://docs.together.ai/docs/fine-tuning-byom\">guide</a>!</p>\n<h2>What This Means for Developers</h2>\n<p>This integration solves a real problem many of us have faced: finding a great model on Hugging Face but not having the infrastructure to actually fine-tune it for your specific needs. Now you can go from discovering a promising model to having a customized version running in production with just a few API calls.</p>\n<p>The big win here is removing friction. Instead of spending days setting up training infrastructure or being limited to whatever models are officially supported by various platforms, you can now experiment with any compatible model from the Hub. Found a specialized coding model that's close to what you need? Train it on your data!📈</p>\n<p>For teams, this means faster iteration cycles. You can test multiple model approaches quickly, build on community innovations, and even use your own fine-tuned models as starting points for further customization.</p>\n<h2><strong>How Teams Are Using This Feature?</strong></h2>\n<p>Beta users and early adopters of this feature are already seeing results across diverse use cases.</p>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.together.ai/customers/slingshot-ai\"><strong>Slingshot AI</strong></a> has integrated this capability directly into their model development pipeline. Rather than being limited to Together's model catalog, they can now run parts of the training pipeline on their own infrastructure, upload those models to the Hub, and then perform continued fine-tuning of those models using the Together AI fine-tuning platform. This has dramatically accelerated their development cycles and allowed them to easily experiment with a broad variety of model variants.</p>\n<p><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.together.ai/blog/fine-tune-small-open-source-llms-outperform-closed-models\"><strong>Parsed</strong></a> has demonstrated the power of this approach in their work showing how small, well-tuned open-source models can outperform much larger closed models. By fine-tuning models on carefully curated datasets, they've achieved superior performance while maintaining cost efficiency and full control over their models.</p>\n<p><strong>Common usage we're seeing from other customers include:</strong></p>\n<ul>\n<li><em>Domain Adaptation</em>: Taking general-purpose models and specializing them for industries like healthcare, finance, or legal work. Teams discover models that already have some domain knowledge and use Together's infrastructure to adapt them to their specific data and requirements.</li>\n<li><em>Iterative Model Improvement</em>: Starting with a community model, fine-tuning it, then using that result as the starting point for further refinement. This creates a compound improvement effect that would be difficult to achieve starting from scratch.</li>\n<li><em>Community Model Specialization</em>: Leveraging models that have already been optimized for specific tasks (like coding, reasoning, or multilingual capabilities) and further customizing them for proprietary use cases.</li>\n<li><em>Architecture Exploration</em>: Quickly testing newer architectures and model variants as they're released, without waiting for them to be added to official platforms.</li>\n</ul>\n<p>The most significant advantage teams report is <em>speed to value</em>. Instead of spending weeks setting up training infrastructure or months training models from scratch, they can identify promising starting points from the community and have specialized models running in production within days.</p>\n<p>Cost efficiency is another major benefit. By starting with models that already have relevant capabilities, teams need fewer training epochs and can use smaller datasets to achieve their target performance, dramatically reducing compute costs.</p>\n<p>Perhaps most importantly, this approach gives teams access to the collective intelligence of the open-source community. Every breakthrough, every specialized adaptation, every novel architecture becomes a potential starting point for their own work.</p>\n<h2>Show Us What You Build!🔨</h2>\n<p>As expected with a large feature of this nature, we're actively improving the experience based on real usage, so your feedback directly shapes the platform!</p>\n<p>Start with our <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://docs.together.ai/docs/fine-tuning-byom\">implementation guide</a> for examples and troubleshooting tips. If you run into issues or want to share what you're building, hop into our <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://discord.gg/9Rk6sSeWEG\">Discord</a>, our team is on there and the community is pretty active about helping each other out.</p>\n<p>If you have any feedback about fine-tuning at Together AI or want to explore it for your tasks in more depth, feel free to <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.together.ai/contact\">reach out to us</a>!</p>\n",
  "content_markdown": "[![image/png](https://cdn-uploads.huggingface.co/production/uploads/672d05dcbde669ec7e36bea9/TmGl980Tiaw5SeFt59krJ.png)](https://cdn-uploads.huggingface.co/production/uploads/672d05dcbde669ec7e36bea9/TmGl980Tiaw5SeFt59krJ.png) The pace of AI development today is breathtaking. Every single day, hundreds of new models appear on the [Hugging Face Hub](https://huggingface.co/models), some are specialized variants of popular base models like Llama or Qwen, others feature novel architectures or have been trained from scratch for specific domains. Whether it's a medical AI trained on clinical data, a coding assistant optimized for a particular programming language, or a multilingual model fine-tuned for specific cultural contexts, the Hugging Face Hub has become the beating heart of open-source AI innovation.\n\nBut here's the challenge: finding an amazing model is just the beginning. What happens when you discover a model that's 90% perfect for your use case, but you need that extra 10% of customization? Traditional fine-tuning infrastructure is complex, expensive, and often requires significant DevOps expertise to set up and maintain.\n\nThis is exactly the gap that Together AI and Hugging Face are bridging today. We're announcing a powerful new capability that makes the entire Hugging Face Hub available for fine-tuning using Together AI's infrastructure. Now, any compatible LLM on the Hub, whether it's from Meta or an individual contributor, can be fine-tuned with the same ease and reliability you expect from Together's platform.🚀\n\n## **Getting Started in 5 Minutes**\n\nHere's all it takes to start fine-tuning a HF model on the Together AI platform:\n\n```python\n#pip install together\n\nfrom together import Together\n\nclient = Together(api_key=\"your-api-key\")\n\nfile_upload = client.files.upload(\"sft_examples.jsonl\", check=True)\n\n# Fine-tune any compatible HF model\njob = client.fine_tuning.create(\n    model=\"togethercomputer/llama-2-7b-chat\",  # Base model for configuration\n    from_hf_model=\"HuggingFaceTB/SmolLM2-1.7B-Instruct\",  # Your chosen HF model\n    training_file=file_upload.id,\n    n_epochs=3,\n    learning_rate=1e-5,\n    hf_api_token=\"hf_***\",  # for private repos\n    hf_output_repo_name=\"my-username-org/SmolLM2-1.7B-FT\"  # to upload model back to hub\n)\n\nprint(f\"Training job started: {job.id}\")\n```\n\nThat's it! Your model will be trained on Together's infrastructure and can be deployed for inference, downloaded or even uploaded back to the Hub! For private repositories, simply add your HF token with `hf_api_token=\"hf_xxxxxxxxxxxx\"`.\n\n## How It Works:\n\nAs seen in the example above, when you fine-tune a Hugging Face model on Together AI, you actually specify two models:\n\n- **Base Model** (`model` parameter): A model from Together's [official catalog](https://docs.together.ai/docs/fine-tuning-models) that provides the infrastructure configuration, training optimizations, and inference setup\n- **Custom Model** (`from_hf_model`parameter): Your actual Hugging Face model that gets fine-tuned\n\nThink of the base model as a \"training template.\" It tells our system how to optimally allocate GPU resources, configure memory usage, set up the training pipeline, and prepare the model for inference. Your custom model should have a similar architecture, approximate size, and sequence length to the base model for optimal results.\n\nAs seen in the example above, if you want to fine-tune `HuggingFaceTB/SmolLM2-1.7B-Instruct` (which uses Llama architecture), you'd use `togethercomputer/llama-2-7b-chat` as your base model template, because they share the same underlying architecture.\n\nThe integration works **bidirectionally**. Together AI can pull any compatible public model from the Hugging Face Hub for training, and with the proper API tokens, it can download models private repositories as well. After training, your fine-tuned model can be automatically pushed back onto the Hub if you've specified `hf_output_repo_name`, making it available for sharing with your team or the broader community.\n\nIn general, all `CausalLM` models under 100B params are intended to work. For a comprehensive walkthrough on how to choose base and custom models and much more, read our full [guide](https://docs.together.ai/docs/fine-tuning-byom)!\n\n## What This Means for Developers\n\nThis integration solves a real problem many of us have faced: finding a great model on Hugging Face but not having the infrastructure to actually fine-tune it for your specific needs. Now you can go from discovering a promising model to having a customized version running in production with just a few API calls.\n\nThe big win here is removing friction. Instead of spending days setting up training infrastructure or being limited to whatever models are officially supported by various platforms, you can now experiment with any compatible model from the Hub. Found a specialized coding model that's close to what you need? Train it on your data!📈\n\nFor teams, this means faster iteration cycles. You can test multiple model approaches quickly, build on community innovations, and even use your own fine-tuned models as starting points for further customization.\n\n## **How Teams Are Using This Feature?**\n\nBeta users and early adopters of this feature are already seeing results across diverse use cases.\n\n[**Slingshot AI**](https://www.together.ai/customers/slingshot-ai) has integrated this capability directly into their model development pipeline. Rather than being limited to Together's model catalog, they can now run parts of the training pipeline on their own infrastructure, upload those models to the Hub, and then perform continued fine-tuning of those models using the Together AI fine-tuning platform. This has dramatically accelerated their development cycles and allowed them to easily experiment with a broad variety of model variants.\n\n[**Parsed**](https://www.together.ai/blog/fine-tune-small-open-source-llms-outperform-closed-models) has demonstrated the power of this approach in their work showing how small, well-tuned open-source models can outperform much larger closed models. By fine-tuning models on carefully curated datasets, they've achieved superior performance while maintaining cost efficiency and full control over their models.\n\n**Common usage we're seeing from other customers include:**\n\n- *Domain Adaptation*: Taking general-purpose models and specializing them for industries like healthcare, finance, or legal work. Teams discover models that already have some domain knowledge and use Together's infrastructure to adapt them to their specific data and requirements.\n- *Iterative Model Improvement*: Starting with a community model, fine-tuning it, then using that result as the starting point for further refinement. This creates a compound improvement effect that would be difficult to achieve starting from scratch.\n- *Community Model Specialization*: Leveraging models that have already been optimized for specific tasks (like coding, reasoning, or multilingual capabilities) and further customizing them for proprietary use cases.\n- *Architecture Exploration*: Quickly testing newer architectures and model variants as they're released, without waiting for them to be added to official platforms.\n\nThe most significant advantage teams report is *speed to value*. Instead of spending weeks setting up training infrastructure or months training models from scratch, they can identify promising starting points from the community and have specialized models running in production within days.\n\nCost efficiency is another major benefit. By starting with models that already have relevant capabilities, teams need fewer training epochs and can use smaller datasets to achieve their target performance, dramatically reducing compute costs.\n\nPerhaps most importantly, this approach gives teams access to the collective intelligence of the open-source community. Every breakthrough, every specialized adaptation, every novel architecture becomes a potential starting point for their own work.\n\n## Show Us What You Build!🔨\n\nAs expected with a large feature of this nature, we're actively improving the experience based on real usage, so your feedback directly shapes the platform!\n\nStart with our [implementation guide](https://docs.together.ai/docs/fine-tuning-byom) for examples and troubleshooting tips. If you run into issues or want to share what you're building, hop into our [Discord](https://discord.gg/9Rk6sSeWEG), our team is on there and the community is pretty active about helping each other out.\n\nIf you have any feedback about fine-tuning at Together AI or want to explore it for your tasks in more depth, feel free to [reach out to us](https://www.together.ai/contact)!\n",
  "dateCreated": "2026-10-04T12:50:30.804479567+00:00",
  "date_created": "2025-09-10T17:04:36+00:00",
  "date_modified": "2025-09-10T17:04:36+00:00",
  "date_published": "2025-09-10T17:04:36+00:00",
  "description": "The pace of AI development today is breathtaking. Every single day, hundreds of new models appear on the Hugging Face Hub, some are specialized variants of popular base models like Llama or Qwen, others feature novel architectures or have…",
  "external_url": "https://huggingface.co/blog/togethercomputer/together-ft",
  "git": {
    "commit": "ebb0941c5c06a2ab2377342d607535262a3e969e",
    "path": "items/huggingface-co/2025/09/2025-09-10-fine-tune-any-llm-from-the-hugging-face-hub-with-together-ai.md",
    "permalink": "https://github.com/aymericbeaumet/aggr-instance/blob/ebb0941c5c06a2ab2377342d607535262a3e969e/items/huggingface-co/2025/09/2025-09-10-fine-tune-any-llm-from-the-hugging-face-hub-with-together-ai.md"
  },
  "id": "urn:aggr:item:09734c1657e6aff4ac714aeeac55bf40fb88383a",
  "isBasedOn": {
    "@id": "https://huggingface.co/blog/togethercomputer/together-ft"
  },
  "mainEntity": {
    "@id": "https://huggingface.co/blog/togethercomputer/together-ft",
    "@type": "CreativeWork",
    "archivedAt": {
      "@id": "https://aggr.aymericbeaumet.com/items/huggingface-co/2025-09-10-fine-tune-any-llm-from-the-hugging-face-hub-with-together-ai/#webpage"
    },
    "dateModified": "2025-09-10T17:04:36+00:00",
    "datePublished": "2025-09-10T17:04:36+00:00",
    "headline": "Fine-tune Any LLM from the Hugging Face Hub with Together AI",
    "timeRequired": "PT6M",
    "url": "https://huggingface.co/blog/togethercomputer/together-ft",
    "wordCount": 1214
  },
  "name": "Archived snapshot: Fine-tune Any LLM from the Hugging Face Hub with Together AI",
  "preview": null,
  "reading_minutes": 6,
  "replicated_at": null,
  "source": "huggingface-co",
  "source_name": "Hugging Face - Blog",
  "summary": null,
  "tags": [],
  "temporalCoverage": "2026-10-04T12:50:30.804479567+00:00",
  "title": "Fine-tune Any LLM from the Hugging Face Hub with Together AI",
  "url": "https://aggr.aymericbeaumet.com/items/huggingface-co/2025-09-10-fine-tune-any-llm-from-the-hugging-face-hub-with-together-ai/",
  "word_count": 1214
}