Episodes from AI Engineer about Fine-Tuning.

Modern Post-Training: A Deep Dive — Will Brown, Prime Intellect
Jul 13, 2026 · 46:52
Will Brown of Prime Intellect details the company's open-source ecosystem of post-training tools, including the verifiers and prime-rl libraries, arguing they enable efficient and affordable training of frontier agentic models for enterprises. Verifiers V1 decomposes environments into tasks, harnesses, and runtimes using a decorator pattern and Pydantic, supporting group rewards like conciseness bonuses. Prime-RL is an asynchronous reinforcement learning framework that allows long-horizon coding rollouts to overlap, achieving a GLM-5 step on 28 nodes in under 5 minutes for 131k context, with a 1,000-step run costing roughly $50k. The framework supports custom algorithms including on-policy distillation, GRPO, and self-distillation via decomposable loss and algorithm classes. Prime Intellect's Lab platform offers hosted multi-tenant LoRA training live now, with full fine-tuning arriving soon, enabling enterprises to develop environments on CPU and push them to the cloud for scalable post-training.

State of the Union: Why Local, Why Now — NVIDIA, Osmantic, Roboflow, EXO Labs, @matthew_berman
Jul 11, 2026 · 44:29
Nader Khalil (NVIDIA), Joseph Nelson (Roboflow), Alex Cheema (Exo Labs), Matthew Berman, and Ahmad Osman (Osmantic, r/LocalLLaMA) argue that local AI is now useful, driven by stronger open models and better hardware. They cite inflection points like Llama 2, DeepSeek v3, and GLM 5.2, which closed the gap with frontier cloud models. Sovereignty and control are key: enterprises need to choose their own model versions and avoid lock-in. Specialized models, such as Roboflow's fine-tuned vision models for deep-sea fish discovery, outperform general ones for specific tasks. Optimization is critical: EXO Labs achieved 10x performance on the DGX Spark by tuning existing NVIDIA kernels. The panel emphasizes that simplicity remains a barrier—most users need point-and-click solutions—and advocates for open-source AI to ensure freedom and innovation.

Stop Making Models Bigger, Make Them Behave — Kobie Crawford, Snorkel
Jun 10, 2026 · 20:56
Kobie Crawford of Snorkel explains how a 4B parameter model fine-tuned via RL for under $500 outperformed Qwen 3 235B on financial analysis tool use. The key was training tool discipline—inspecting schemas and self-correcting errors—not deeper reasoning. Single-table training alone boosted multi-table FinQA benchmark from 13.9% to 26.6%, and breaking evals into rubrics identifies which behaviors to fix.

What Lies Beneath the API — Benjamin Cowen, Modal
Jun 2, 2026 · 12:40
In this episode, Ben Cowen from Modal argues that as AI products mature, fine-tuning becomes essential, citing cases like Intercom beating their frontier API at 1/10th the cost. He identifies three signals it's time to fine-tune: paying more for the API than customers pay you, evaluative plateaus, and latency requirements that shared endpoints can't meet. Cowen explains that supervised fine-tuning now fits in 300 lines of Python and that reinforcement learning rollouts can scale to 50,000 sandboxes using serverless platforms like Modal. He contends that frontier labs aim to win at everything, while businesses need to win at their specific logic, making fine-tuning a natural destination. The episode provides practical guidance on when and how to make the leap, emphasizing that building an agent harness and collecting eval data already sets the stage for training.

How We Built Zeta2: Training an Edit Prediction Model in Production — Ben Kunkle, Zed
May 30, 2026 · 10:50
Ben Kunkle, edit predictions lead at Zed, explains how they built Zeta2, a small specialized model for edit prediction in production. The pipeline pulls opt-in production edit traces, distills them through a frontier teacher, and routes bad predictions through a repair step before formatting for the student. To validate settled data, Zed originally ran 10 frontier model predictions per example and measured Levenshtein distance to the final state, but for 100,000 training examples that is a million frontier model requests — prohibitively expensive. The fix: Zeta2's student model now approaches teacher quality, so they run it 50 times instead at negligible cost. Ideal training examples sit in the middle of the Levenshtein distance distribution: too close to the settled state is obvious, too far is noise. A metric called reversal ratio — how often the model undoes exactly what the user just typed — was the key diagnostic for catching bad model behavior before shipping.

From 46% to 90%: Fine-Tuning Tiny LLMs for On-Device Agents — Cormac Brick, Google
May 20, 2026 · 21:01
Google's Cormac Brick explains how developers can build on-device AI agents using either system-level Gemini Nano via AI Core or app-level custom models via LiteRT-LM. He demonstrates a skill harness built on Gemma 4 that enables agentic tasks like restaurant roulette, running fully on-device with JavaScript UI. For fine-tuned tiny models, Function Gemma at 270M parameters improved from 46% to over 90% accuracy on eight of ten app-intent functions after synthetic data fine-tuning. The talk also covers the Eloquent transcription app, which chains two Gemma 3-based models (ASR and text polishing) under a few hundred million parameters for offline use. Key trade-offs are latency, privacy, and customization versus system integration effort.

Everything I Learned Training Frontier Small Models — Maxime Labonne, Liquid AI
Apr 29, 2026 · 20:13
Maxime Labonne, head of post-training at Liquid AI, presents the LFM2.5 recipe for training frontier small models, arguing they require specialized approaches distinct from scaled-down big models. He details how Liquid's architecture uses gated short convolutions for latency-sensitive on-device deployment, achieving faster throughput than Gemma 3 or Qwen 3.5. Post-training stages—SFT, on-policy preference alignment, and RL—are tailored for narrow task focus like data extraction and tool use. A key challenge is 'doom loops' (repetition), which reached 15% after mid-training in a 1.2B reasoning model; solutions include preference alignment rejecting looped responses and RL with verifiable rewards and n-gram penalties, nearly eliminating the issue. He advocates combining small models with agentic tools (e.g., web search) to overcome memory limits, as they excel at reasoning and tool use despite lower knowledge capacity. The talk also covers decisions on when to use small vs. large models—latency, privacy, offline use—and notes that distillation alone likely won't fully solve doom loops.

$1 AI Guardrails: The Unreasonable Effectiveness of Finetuned ModernBERTs – Diego Carpentero
Apr 16, 2026 · 43:53
Diego Carpentero argues that LLM-based attacks—Prompt Injection, Indirect Injection, Model Internals (gibberish suffix), RAG Poisoning, MCP Exploits, and Agentic Escalation—are now the baseline, not the exception, and that model alignment and human review alone are insufficient. He identifies the core problem as a Zero Trust Gap: LLMs natively lack separation between system controls and data, allowing adversaries to override decisions via malicious instructions in inputs or external content. To build a protective layer, Carpentero fine-tunes ModernBERT—a state-of-the-art encoder with Alternating Attention, Unpadding & Sequence Packing, RoPE, and FlashAttention—into a safety discriminator that classifies prompts as safe or unsafe in ~35 milliseconds with 85% accuracy, all for under a dollar. He walks through the fine-tuning pipeline using the IngetGuard dataset and demonstrates live detection of real attack examples from each vector.

Let LLMs Wander: Engineering RL Environments — Stefano Fiorucci
Apr 8, 2026 · 40:35
Stefano Fiorucci demonstrates how to build Reinforcement Learning environments for language models using the open-source Verifiers library, arguing that training small models with verifiable rewards can surpass large closed models on specific tasks. He maps classic RL concepts to LLMs, introduces Verifiers components for single-turn, multi-turn, and tool environments, and then walks through an experiment where he takes LiquidAI's LLM 2 — a small open model — and transforms it into a tic-tac-toe master via supervised fine-tuning and GRPO-based reinforcement learning. After training, the model dominates random opponents and draws 85% of games against optimal ones, eventually outperforming GPT-5 Mini against identical optimal opponents. Fiorucci shares practical lessons: large batch sizes (≥256) ensure stable training, hidden biases in opponent algorithms can skew results, and starting from a base model (not a reasoning model) avoids truncated thinking traces. He concludes that if you can define a clear reward signal, you can build an environment and train a small specialized model to beat a large closed model at a fraction of the cost.

Code World Model: Building World Models for Computation – Jacob Kahn, FAIR Meta
Dec 17, 2025 · 16:41
Jacob Kahn, a research scientist at FAIR Meta, presents the Code World Model (CWM), a 32 billion parameter dense transformer that models program execution rather than just syntax. CWM predicts execution traces line by line, enabling neural debugging and approximation of the halting problem. Trained on GitHub data and refined with synchronous RL and long-context mid-training, CWM uses bash-oriented tool use and achieves strong throughput through asynchronous model updates. The model is open-source on Hugging Face, with code and a technical report available, and aims to build foundations for reasoning and planning in AI-driven software systems.

Agent Reinforcement Fine Tuning – Will Hang & Cathy Zhou, OpenAI
Dec 9, 2025 · 16:55
Will Hang and Cathy Zhou of OpenAI's fine-tuning team introduce Agent Reinforcement Fine-Tuning (RFT), a method to improve AI agents by training them end-to-end on tasks involving tool calls and reasoning. They define an agent as a model that interleaves reasoning with external tool interactions, unlike regular models. The hierarchy of optimization moves from prompt engineering to task optimization to RFT, which changes model weights based on a custom reward signal. New features allow models to call tools via public endpoints and use custom rewards hosted externally. Case studies show concrete gains: Cognition improved code edit planning by 10 points with 1,000 examples and reduced tool call steps from 8–10 to 4; Codto's deep research agent boosted recall by 6% while cutting long-tail tool calls (over 15) down to 2–4; Cosine achieved state-of-the-art on enterprise code benchmarks by using strict graders that reward only pass-tested code; and Macco wrote GPU kernels from just 100 PyTorch prompts, beating SOTA by 72% after addressing reward hacking with seven edge-case detectors. Four principles for success: define tasks unambiguously, mirror production traffic in train/eval sets,…

Serving Voice AI at $1/hr: Open-source, LoRAs, Latency, Load Balancing - Neil Dwyer, Gabber
Jul 31, 2025 · 16:09
Neil Dwyer, CTO of Gabber, details how his startup serves real-time voice AI for under $1 per hour using open-source Orpheus TTS, LoRAs for emotive voice cloning, and vLLM with FP8 dynamic quantization to achieve 95-105 tokens per second on L40S GPUs. He explains the critical latency challenge of 'head of line silence' in Orpheus (600ms in default voices) and how fine-tuning LoRAs reduces it to ~100ms, fitting within a 1.5-second budget for real-time conversation. Gabber batches multiple LoRA generations per GPU and uses a consistent hash ring for load balancing across servers, enabling popular clones to be dynamically replicated. The talk argues that with current open-source tools, building affordable consumer voice AI is accessible to small teams.

Latent Space Paper Club: AIEWF Special Edition (Test of Time, DeepSeek R1/V3) — VIbhu Sapra
Jul 25, 2025 · 53:54
VIbhu Sapra presents DeepSeek's latest models and announces a new curriculum-based Test of Time Paper Club. DeepSeek's May 28th R1 update doubles reasoning tokens (12k→25k) and matches O3/Gemini 2.5 Pro, improving AIME 2024 from 70% to 87.5%. A new distillation of R1 traces into Qwen 3 8b achieves performance on par with Qwen's 235b thinking model, proving reasoning models distill efficiently. The Test of Time Paper Club will cover 50–100 foundational papers over six months in San Francisco and remote, targeting core AI engineering topics from attention and scaling laws to inference techniques. Sapra emphasizes that pure RL (GRPO) on verifiable math and code unlocks emergent reflection and aha moments, shifting scaling from pre-training compute to inference-time reasoning.

What We Learned from Using LLMs in Pinterest — Mukuntha Narayanan, Han Wang, Pinterest
Jul 16, 2025 · 18:13
Pinterest search engineers Han Wang and Mukuntha Narayanan present four key learnings from integrating LLMs into the platform's search relevance system. Fine-tuned LLM cross-encoders improve relevance prediction by 12% over multilingual BERT and 20% over SearchSage using an 8B model. VLM-generated image captions and user action features enrich pin text representations and further boost performance. Knowledge distillation into a bi-encoder student model, trained on 100x more data via semi-supervised learning, enables production serving with real-time query embeddings and 85% cache hit rate. Relevance-tuned embeddings serve as general-purpose semantic representations across multiple surfaces, and the system yields relevance gains in multiple languages and countries despite a predominantly US training set.

Text-to-Speech Data Preparation and Fine-tuning Workshop - Ronan McGovern
Jun 3, 2025 · 34:00
Ronan McGovern walks through fine-tuning Sesame's CSM-1B text-to-speech model on a specific voice, using a YouTube video as the data source. He explains token-based TTS models, including how audio is represented via codebooks and how CSM-1B uses a main transformer for zeroth tokens and a secondary transformer for 31 hierarchical tokens. The workshop covers data preparation: downloading audio with yt-dlp, transcribing with Whisper Turbo, manually correcting the transcript, and splitting audio into 30-second chunks (41 clips from a 30-minute video). Fine-tuning uses Unsloth with LoRA adapters (rank 32, alpha 16) on linear layers, training for one epoch with a batch size of 2 and virtual size of 8, reducing loss from ~6.34 to ~3.72. Evaluation compares zero-shot inference (random speaker), voice cloning (closer but imperfect), and fine-tuned plus cloning (best result, producing an Irish-accented voice with natural errors). McGovern recommends 50+ 30-second clips for noticeable effect and notes that combining fine-tuning with voice cloning yields good performance even with limited data.

Finetuning: 500m AI agents in production with 2 engineers — Mustafa Ali & Kyle Corbitt
Apr 12, 2025 · 18:44
Method Financial and OpenPipe detail how Method scaled AI financial agents to 500 million daily interactions using fine-tuned open-source models instead of expensive GPT-4. After racking up $70,000 in monthly GPT-4 costs and facing latency and error issues, they fine-tuned an 8B parameter LLaMA 3.1 model to achieve under 200ms latency and 9% error rate (beating GPT-4o's 11% at lower cost). Mustafa Ali explains that the key was using production data from GPT as training data and choosing the cheapest model that met performance goals. Kyle Corbitt emphasizes that fine-tuning is a power tool for bending the price-performance curve when prompt engineering falls short. The episode argues that productionizing AI agents requires patience and openness from engineering teams, and concludes with a call for software engineers to pivot to AI engineering.

Customized, production ready inference with open source models: Dmytro (Dima) Dzhulgakov
Feb 16, 2025 · 18:55
Dmytro (Dima) Dzhulgakov, co-founder and CTO of Fireworks AI, argues that open source models are the future for production Gen AI applications, and Fireworks provides a platform to make them customized and production-ready. He explains that while proprietary models like GPT-4 are powerful, they are too large, expensive, and slow for many use cases, whereas open models like Llama or Gemma can be fine-tuned for specific domains to achieve better quality at up to 10x speed and lower cost. The main challenges of using open models—complex setup, performance tuning, and production scaling—are addressed by Fireworks' custom serving stack, which achieves the fastest long-prompt inference and serves SDXL fastest among providers, handling over 150 billion tokens per day. The platform supports fine-tuning and serving thousands of LoRA adapters on the same GPU with serverless pay-per-token pricing. Dzhulgakov also highlights the emerging architecture of compound AI systems, where function calling—exemplified by the open-source Fire Function model—connects LLMs to external tools and knowledge sources, enabling agentic applications like stock querying and chart generation. The episode…

Training Albatross An Expert Finance LLM: Leo Pekelis
Feb 13, 2025 · 16:20
Leo Pekelis, chief scientist at Gradient, explains how they transformed an open-source model into Albatross, a finance LLM that tops leaderboards on both general and domain-specific tasks. The key was an automated data pipeline using membership inference to curate finance data from a massive corpus, followed by continual pre-training and alignment via supervised fine-tuning and preference optimization. He also details a one-million-token context extension on a Llama 3-based model that achieves 100% needle-in-the-haystack scores, enabling in-context learning with thousands of examples to reduce hallucinations. The models, v-alpha-tross and the extended-context Llama 3, are open-sourced on Hugging Face.

Accelerating Mixture of Experts Training With Rail Optimized InfiniBand Networking in Crusoe Cloud
Feb 12, 2025 · 17:45
Ievgen Bakulenko, product manager at Crusoe Cloud, explains how their rail-optimized InfiniBand networking accelerates training for sparse mixture of experts models. By leveraging NVIDIA's PXN feature, which allows GPUs to communicate across different rails using the internal NVSwitch in a single hop, Crusoe achieves a 50% improvement in synthetic benchmark latency and bandwidth for both small and large messages. In a real-world test fine-tuning the Mixtral model (8 feed-forward blocks, 7 billion parameters) on 240 H100 GPUs, this topology reduced training time by 14%, directly lowering cost and time-to-train. Bakulenko also outlines Crusoe's AI cloud platform, its climate-aligned mission using stranded energy, and its focus on easy-to-use infrastructure for AI engineers.

Fine tune 20 Llama Models in 5 Minutes: Santosh Radha
Feb 9, 2025 · 6:26
Santosh Radha, Head of Product/Research at Agnostiq, demonstrates Covalent, an open-source platform that lets users fine-tune and deploy hundreds of Llama models directly from Python without Kubernetes or Docker. By adding a single decorator to Python functions, users specify GPU requirements (e.g., H100 with 48 GB, 18-hour limit) and run them on remote compute, paying only for actual usage (e.g., 87 cents for 6 minutes on an L14, 11 cents on a V100). Covalent supports job submission, inference endpoints with custom autoscaling (e.g., scale to 10 GPUs at 9 AM daily), and automated workflows for training, evaluation, and deployment. Radha shows a workflow that iterates over 20 models, fine-tunes each, evaluates accuracy, sorts, and deploys the best—all from a Jupyter notebook with a single dispatch call. The talk, recorded at the AI Engineer World's Fair, emphasizes eliminating infrastructure overhead for accelerated compute.

The GenAI Maturity Curve or You Probably Don't Need Fine Tuning: Kyle Corbitt
Feb 9, 2025 · 18:03
Kyle Corbitt, CEO of OpenPipe, argues that most teams don't yet need fine-tuning and should start with prompted models like GPT-4. He presents a GenAI maturity curve where the trigger to fine-tune is when you hit constraints on cost, latency, or quality consistency—for example, if GPT-4 is 80-90% correct but inconsistent on the last 10-20%. Fine-tuning shifts the paradigm frontier outward, enabling models like fine-tuned LLaMA 38B to outperform GPT-4 at 1/25th the cost. The process has four steps: capture production logs to know your input distribution, prepare high-quality data (using GPT-4 outputs or iterative labeling), train with one-click tools, and evaluate with inner-loop (LLM-as-judge) and outer-loop (business metrics) evals. OpenPipe and other providers make deployment trivial via OpenAI-compatible APIs. The talk delivers a concrete decision framework and a walkthrough so any engineer can fine-tune in under an hour.

LLM Quality Optimization Bootcamp: Thierry Moreau and Pedro Torruella
Feb 8, 2025 · 53:05
Thierry Moreau of OctoAI demonstrates how to fine-tune Llama 3 8B on a PII redaction task using OpenPipe and OctoAI, achieving 47% better accuracy and a 200x cost reduction (from $30 to $0.15 per million tokens) compared to GPT-4 Turbo. He explains that fine-tuning should follow prompt engineering and RAG, and works best for specialized tasks like function calling. The talk walks through building a fine-tuning dataset from the PI Masking 200k dataset, using OpenPipe to train a LoRA for $40, deploying it on OctoAI, and evaluating it to show the fine-tuned model scores 0.97 accuracy versus GPT-4’s 0.68. Moreau emphasizes that this continuous deployment cycle requires monitoring data drift and retraining, but tools like OpenPipe and OctoAI make it accessible even for teams without deep ML expertise.

Insights from Snorkel AI running Azure AI Infrastructure: Humza Iqbal and Lachlan Ainley
Feb 8, 2025 · 20:46
Humza Iqbal of Snorkel AI explains how the company uses Azure AI infrastructure powered by NVIDIA GPUs to fine-tune foundation models for enterprise customers, achieving better performance per dollar by switching from A100s to H100s. He details their distributed training stack (PyTorch, Horovod, NFS) and lessons learned such as balancing node count for batch size and monitoring GPU utilization to avoid networking or data-loading bottlenecks. A cost comparison found two H100s outperformed four A100s on both training and inference, enabling faster iteration through more synthetic data. Azure's dedicated VMs, reliable NFS throughput, and flexible capacity allowed Snorkel to scale experiments from single-node to dozens of GPUs. Future work includes programmatic preference signals and multimodal retrieval algorithms, all planned on Azure.

No-code fine-tuning: Mark Hennings
Feb 5, 2025 · 9:27
Mark Hennings, creator of Entrypoint, argues that fine-tuning large language models is now accessible without code, offering faster and cheaper alternatives to prompt engineering: GPT-3.5 fine-tuned runs at 73ms per token vs GPT-4's 196ms, saving 88.6% in cost and cutting prompts by 90%. He explains that fine-tuning reduces prompt injection risks, enables team collaboration via training data, and only requires 20 examples to start. Hennings demonstrates Entrypoint's no-code UI that lets users import CSV data, structure fields with templating, and fine-tune GPT-3.5 Turbo, then iteratively improve models by feeding production feedback back into the dataset. He proposes a dev lifecycle: prototype with prompt engineering, use it to build a dataset, fine-tune, evaluate, deploy, and continuously refine.

AI Frontiers in Trust and Safety Combatting Multifaceted Harm on Tinder at Scale: Vibhor Kumar
Dec 2, 2024 · 14:36
Vibhor Kumar, senior AI engineer at Tinder, explains how the company uses open-source LLMs and LoRAX to detect a long tail of trust and safety violations at global scale. Facing challenges like content pollution and automated fraud from generative AI, Tinder leverages pre-trained models such as LLaMA and Mistral, fine-tuning them with LoRA and QLoRA on hybrid datasets generated by GPT-4 and manually verified. They serve dozens of fine-tuned adapters on a single GPU using LoRAX, achieving real-time inference (tens of QPS, ~100ms latency) for categories including hate speech, pig butchering scams, and underage users. The approach yields near 100% recall on simpler tasks and significant improvements over baselines, with better generalization that resists adversarial evasion. Future directions include visual language models for explicit image detection and automating retraining pipelines.

Decoding Mistral AI's Large Language Models: Devendra Chaplot
Nov 21, 2024 · 18:16
Devendra Singh Chaplot of Mistral AI details the company's open-source large language models, including Mistral 7B, Mixtral 8x7B, Mixtral 8x22B, and CodeStral 22B, arguing that open models complement rather than compete with profit by serving as branding tools and driving customer acquisition for proprietary upgrades. He explains the three-stage LLM training process—pre-training on trillions of tokens, instruction tuning with prompt-response pairs, and learning from human feedback via preference optimization—emphasizing that more data does not guarantee better performance due to noise. The episode highlights Mistral's focus on optimizing the performance-to-cost ratio, with CodeStral 22B outperforming larger models like Code LLaMA 70B while being smaller and multilingual across 80+ programming languages. Practical guidance is given: prototype with high-end commercial models, then fine-tune open models for specific tasks to balance performance and cost.

What It Actually Takes to Deploy GenAI Applications to Enterprises: Arjun Bansal and Trey Doig
Nov 4, 2024 · 21:30
Trey Doig of Echo AI and Arjun Bansal of Log10 recount Echo AI's journey deploying a GenAI-native conversational intelligence platform for billion-dollar retail brands, focusing on the centrality of accuracy. Echo AI ingests all customer conversations, uses LLMs to surface insights at 100% coverage, but must overcome enterprise trust issues by achieving 95% accuracy within seven days. The platform relies on Log10's auto feedback system, which uses AI-based review to match human accuracy with model speed, yielding a 20 F1 point improvement in one use case. The episode details how Echo AI's solution engineers use Log10 to grade summarizations, catch hallucinations, and track model drift, turning human feedback into curated datasets for fine-tuning. Ultimately, the partnership demonstrates a path to self-improving LLM applications through iterative accuracy measurement and improvement.

Productionizing GenAI Models – Lessons from the world's best AI teams: Lukas Biewald
Oct 23, 2024 · 22:36
Lukas Biewald, founder of Weights and Biases, shares lessons from productionizing GenAI models, emphasizing that while AI is easy to demo, it is hard to productionize. He illustrates this with a personal project building a custom Alexa-like device using LLaMA and Whisper, where accuracy improved from 0% to 98% through prompt engineering, switching to Mistral, and fine-tuning with QLoRA. Biewald argues that tracking experiments (including failures) is critical for reproducibility and collaboration, and that a robust evaluation framework—beyond 'testing by vibes'—is essential for iterating and shipping v2. He notes that 70% of the audience had LLM apps in production, yet many lack solid evaluations, and recommends starting with lightweight prototypes and incorporating end-user feedback.

Making Open Models 10x faster and better for Modern Application Innovation: Dmytro (Dima) Dzhulgakov
Oct 9, 2024 · 18:55
Dmytro Dzhulgakov, CTO of Fireworks AI, argues that open-source models are the future for GenAI applications because they offer lower latency, lower cost, and domain adaptability compared to proprietary models. He explains that open models can be up to 10x faster for narrow domains and cut costs significantly, using examples like fine-tuned Llama 3 for function calling. Fireworks addresses the challenges of setup, optimization, and production readiness with a custom serving stack that delivers the fastest inference for long prompts and image generation (e.g., SDXL). He highlights FireFunction V2, an open-source model for function calling that combines chat and tool use, and notes that Fireworks serves over 150 billion tokens per day for companies like Quora and Cursor. The talk emphasizes that platforms like Fireworks enable developers to start with serverless inference, fine-tune models, and scale to enterprise-grade deployment with dedicated hardware.

Everything you need to know about Fine-tuning and Merging LLMs: Maxime Labonne
Sep 25, 2024 · 17:52
Maxime Labonne from Liquid AI explains the LLM training lifecycle—pre-training, supervised fine-tuning (SFT), and preference alignment—and when to use fine-tuning over prompt engineering. He details SFT dataset creation (accuracy, diversity, complexity) and techniques like full fine-tuning, LoRA, and QLoRA, with key hyperparameters. The core of the talk is model merging: combining weights of fine-tuned models without GPU, using methods like SLERP (spherical linear interpolation for two models), TIES (pruning redundant parameters to merge many models), pass-through (concatenating layers, e.g., Meta LLaMA 3 120B Instruct by repeating layers gives strong creative writing), and Franken-MoE (extracting FFN layers from domain-specific models with a router). Labonne demonstrates these with his NeuralBeagle and Beyonder models, noting merged models dominate the OpenLLM leaderboard and that TIES merging often outperforms more experimental Mixture of Experts approaches.

Low Level Technicals of LLMs: Daniel Han
Jul 31, 2024 · 2:52:26
Daniel Han of Unsloth explains how to find and fix bugs in open-source LLMs like Gemma, Phi-3, and Llama, covering tokenizer issues, architecture pitfalls, and finetuning optimizations. He details the eight Gemma bugs Unsloth fixed, including a critical RoPE downcasting error that broke positional encoding, and a 2048 sliding window bug in Phi-3. Han walks through transformer internals: attention masking, layer norms, RoPE embeddings, and SwiGLU activation, showing how to derive gradients for custom kernels. He demonstrates Unsloth's 2x faster finetuning with 70% less memory via Triton kernels, and introduces new features: automatic Ollama model file creation, CSV fine-tuning with merged columns, and chunked cross-entropy for large vocabularies. The session includes live Q&A on learning rate schedules, precision trade-offs, and mechanistic interpretability.

Fixing bugs in Gemma, Llama, & Phi 3: Daniel Han
Jul 31, 2024 · 17:42
Daniel Han of Unsloth details eight bugs found in Llama 3, including double BOS tokens, untrained tokens in the base model, and pad tokens equaling EOS tokens, which cause infinite generations. He explains how Unsloth automatically fixes these issues and offers a free Colab notebook for fine-tuning with Ollama. Han also covers tokenization fixes for Gemma and a sliding window bug in Phi-3, emphasizing the importance of correct chat templates and avoiding double BOS tokens. The episode provides concrete code examples and best practices for fine-tuning open-source LLMs to avoid common pitfalls.

Harnessing the Power of LLMs Locally: Mithun Hunsur
Nov 22, 2023 · 17:09
Mithun Hunsur presents llm.rs, a Rust library for running large language models locally, arguing it gives developers ownership, lower latency, and privacy compared to cloud APIs. He explains how quantization makes inference viable on consumer hardware, and shows that llm.rs supports architectures like LLaMA and Falcon through a unified interface. Practical code examples demonstrate customization, and community projects like LocalAI and LLMchain illustrate real-world use. Hunsur shares his own date-extraction pipeline, fine-tuning a small model with GPT-3 data to replace expensive cloud calls. He also cautions about hardware requirements, trade-offs between speed and quality, and ecosystem churn from rapid innovation.

Domain adaptation and fine-tuning for domain-specific LLMs: Abi Aryan
Nov 14, 2023 · 25:09
Abi Aryan's talk covers domain adaptation and fine-tuning for large language models, contrasting prompting, RAGs, and three fine-tuning methods: adaptive, behavioral, and parameter-efficient. Adaptive fine-tuning adds small adapter modules (0.15% of parameters) for new domains like biochemical engineering; behavioral fine-tuning optimizes label space for a single task; and parameter-efficient methods like LoRA and QLoRA reduce model size via low-rank adaptation and four-bit precision, ideal for low-resource devices. Aryan emphasizes data quality—deduplication reduces memorization—and practical tips: batch size of 32 or 64, starting with 100 epochs, using Adam optimizer, gradient checkpointing for memory savings, and in-context learning with dynamic examples to handle drift. Evaluation should combine metric-based (Bleu, Rouge), tool-based (Weights & Biases), model-based, and human-in-the-loop approaches, though full pipeline considerations (data collection, base model choice, storage) are critical for robust applications.
Powered by PodHood