# This 100% private AI model is insane… let's fine-tune it
<!--
ref: @content/youtube/david-ondrej/2026-05-28-this-100-private-ai-model-is-insane-let-s-fine-tun
tags: [fine-tuning, local-llms, open-source-tools, synthetic-datasets, distillation, apple-silicon, model-selection]
version: 2
updated_at: 2026-11-21T20:57:28.688Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=BFH9D05UFvM)**


*Synthesized from David Ondrej, 2026-05-28.*

David Ondrej presents this solo tutorial on fine-tuning a small open-source model on his own machine, and on building a training dataset from a single PDF.

## Core Thesis
David Ondrej argues that fine-tuning now lets a small local model outperform much larger models on a narrow task, and that the two old obstacles, building a dataset and running training locally, have been largely removed. He demonstrates this with Unsloth Studio, a free open-source tool he says runs fully offline on a personal computer.

## Key Insights
- **Tool setup:** Unsloth Studio is installed with a one-line installer from the project docs, then opened at localhost port 8888. The first launch asks for a local password, because other devices on the same Wi-Fi could reach the server.
- **Model choice:** he recommends the safetensors version of Qwen 3.6 27B as the strongest small model between 4B and 40B parameters on the Artificial Analysis open-source leaderboard. He says it needs roughly 24 to 32 GB of RAM or VRAM. He also suggests a 9B model for smaller machines, and notes that GGUF files are for inference and cannot be used for training.
- **Model size and disk:** the 27B model is about 51 GB, so he suggests the 9B model if disk space or hardware is limited.
- **Dataset choice:** he trains on a public Hugging Face finance dataset, Finance Alpaca, with about 69,000 instruction and output rows. He says at least 1,000 examples is a sensible minimum, and a few hundred is the bare minimum.
- **Training run:** his demo uses context length 1,024, batch size 1 and 20 steps, which he says is only a demonstration. He watches training loss fall as the evidence that the model is learning.
- **Apple hardware caveat:** some models fail on Apple silicon because of an MLX bug, even with enough memory. His fallback is the 9B model or a rented cloud GPU.
- **Synthetic dataset from a PDF:** the Recipes tab includes a PDF document QA preset. A stronger hosted model generates question and answer pairs from chunks of the document. He tested it with OpenRouter, first on Claude Sonnet 4.6, which returned elevated errors, then on Gemini 3.5 Flash, and recommends DeepSeek V4 Pro for cost.
- **Distillation framing:** he calls training a small model on a larger model's outputs "the unspoken secret of the AI industry", and says he is not advising anyone to break a provider's terms.

## Actionable Takeaways
1. Install Unsloth Studio from its docs quick start, then open the local server on port 8888 and set a password.
2. Pick the safetensors version of a model that fits your memory: Qwen 3.6 27B if you have 24 to 32 GB, or a 9B model otherwise. Do not use GGUF for training.
3. Start with a public dataset such as Finance Alpaca to learn the workflow, and aim for at least 1,000 examples for a real run.
4. Set context length to 1,024 and batch size to 1 for a small first run, then increase steps, context and epochs for a serious fine-tune.
5. Watch the training loss. If it does not fall, the model is not learning from the data.
6. Generate a custom dataset from one PDF in the Recipes tab, using an OpenRouter endpoint with the /v1 path and a credit limit on the API key. Test with five rows before a full run of about 1,000 to 10,000 rows.

## Notable Quotes
> "Fine-tuning is insane. It allows you to have a small LLM, outperform models 100 times bigger." — David Ondrej

---

*Related: `@content/youtube/david-ondrej/fable-5-is-never-coming-back-heres-why` · `@content/youtube/david-ondrej/fine-tune-the-biggest-open-source-models-even-with-a-bad-pc` · `@content/youtube/latent-space/googles-open-ai-strategy-omar-sanseviero-google-deepmind` · `@content/youtube/aie/your-fine-tuned-model-is-tech-debt-a-50x-roi-house-of-cards-dan-bjornn-lease-end` · `@content/youtube/a16z/can-open-models-keep-up-with-openai-and-anthropic-nathan-lambert`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*