<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Fine-Tuning on David Lang</title>
    <link>https://www.davidlang.tech/tags/fine-tuning/</link>
    <description>Recent content in Fine-Tuning on David Lang</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 15 May 2024 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.davidlang.tech/tags/fine-tuning/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Fine-Tuning LLMs: When and How to Customize AI Models</title>
      <link>https://www.davidlang.tech/posts/fine-tuning-llms-when-and-how-to-customize-ai-models/</link>
      <pubDate>Wed, 15 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/fine-tuning-llms-when-and-how-to-customize-ai-models/</guid>
      <description>&lt;p&gt;Fine-tuning adapts a base model to your domain with labeled examples. Use it when prompting and RAG cannot achieve consistent style, format, or task-specific behavior.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-fine-tune&#34;&gt;When to Fine-Tune&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fixed output schema (legal clauses, medical codes)&lt;/li&gt;&#xA;&lt;li&gt;Brand voice across thousands of responses&lt;/li&gt;&#xA;&lt;li&gt;Specialized terminology poorly covered by general models&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;when-not-to-fine-tune&#34;&gt;When Not to Fine-Tune&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Facts that change frequently (use RAG)&lt;/li&gt;&#xA;&lt;li&gt;One-off tasks (use prompting)&lt;/li&gt;&#xA;&lt;li&gt;Small datasets without validation (risk overfitting)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;openai-fine-tuning-flow&#34;&gt;OpenAI Fine-Tuning Flow&lt;/h2&gt;&#xA;&lt;p&gt;Prepare JSONL with &lt;code&gt;messages&lt;/code&gt; arrays. Upload, create job, evaluate on a holdout set. Monitor loss and human ratings before promoting to production.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
