Deploying LLMs in Production: Fine-Tuning, Retrieval & Open-Source vs API Tradeoffs

Episode 3 61 min

Meryem Arik Co-founder of TitanML

Episode 3 · Deploying LLMs in Production: Fine-Tuning, Retrieval & Open-Source vs API Tradeoffs

61 min

What we talked about

Meryem Arik is the co-founder of TitanML, a platform that helps businesses build and deploy smaller, cheaper language models. She studied theoretical physics and philosophy at Oxford, worked in investment banking, and then moved into tech. TitanML started as a computer vision research project and pivoted to large language models after customers said that language would change their business. Alexey invites her to explain how teams put LLMs into production.

Meryem separates generative models, such as GPT-3.5 and GPT-4, from non-generative models such as BERT, which are better for classification. Classification usually needs fine-tuning on good labeled data, while generative models suit tone changes, summarization and other text tasks. She argues that open source models give businesses control, because the weights do not change behind an API and the models can be versioned, hosted privately and tuned for their own data. Her recommendation is to prototype with an API, then move to an open source model once the business case is proven. Fine-tuning also works for domain vocabulary, such as "bear market" in finance.

For knowledge that changes often, Meryem prefers information retrieval over repeated fine-tuning. Documents are embedded in a vector database and re-embedded when they change, the most relevant sections are placed in the prompt, and the model answers from them, which reduces hallucination. Fine-tuning is better for style than for facts. Gold-standard, hand-labeled examples matter more than volume, and an LLM can expand a small labeled set. For generative tasks, evaluation is still mostly manual, with a person testing sensible outputs and edge cases, although an LLM can help mark results.

On the product side, TitanML offers Titan Train for fine-tuning, Titan Optimized for compressing BERT-style models, and the Titan Takeoff server for fast on-premise inference on CPUs or modest GPUs. Meryem says self-hosted models can match API speed on smaller hardware and cost less. She says serving large models is hard, so easier infrastructure means customers need fewer GPUs.

Meryem also discusses the labor impact of LLMs. She sees productivity gains for engineers, mentions the risk of invented package names being used for attacks, and expects fewer software engineers in the long run. For learning, she recommends following practitioners on LinkedIn, Cohere's LLM University and the Hugging Face course, while noting that the field changes fast.

Chapters

  1. 1:07 Guest Introduction: Meryem Arik and TitanML 1 min
  2. 1:45 Career Journey: Theoretical Physics → Banking → Tech <1 min
  3. 2:13 Founding TitanML: pivot from computer vision to LLM deployability 3 min
  4. 4:49 Startup Realities: co-founder roles, operations, and tradeoffs 2 min
  5. 6:42 Early LLM Interest: customer-driven pivot and GPT-3 experience 3 min
  6. 9:17 ChatGPT Breakthrough: conversational interface and accessibility 1 min
  7. 10:24 LLM Fundamentals: generative vs. non-generative models and transformers 1 min
  8. 11:44 Model Selection: classification tasks vs. generative tasks 2 min
  9. 13:45 Open-source Model Landscape: LLaMA, FLAN-T5, Falcon, MPT 1 min
  10. 14:45 Why LLMs Matter: handling unstructured text at scale 2 min
  11. 16:48 Open-source vs API Models: control, privacy, and fine-tuning benefits 2 min
  12. 18:46 Model Drift & API Risk: hidden model changes and production impact 5 min
  13. 23:37 TitanML Product Suite: Train, Optimized, and Takeoff server 2 min
  14. 25:26 Serving Challenges: model size, compression, and inference optimization 1 min
  15. 26:30 Fine-tuning Purpose: specialization, domain adaptation, and tone 5 min
  16. 31:38 Fine-tuning Generative Models: data formats and end-task considerations 2 min
  17. 33:58 Workforce Impact: productivity gains and job disruption scenarios 7 min
  18. 40:46 Dealing with Changing Knowledge: retrieval over continuous retraining 1 min
  19. 42:02 Grounding Answers: indexing docs and retrieval-augmented responses 5 min
  20. 46:42 Retrieval Patterns: injecting passages, summarizers, and grounding layers 1 min
  21. 48:01 Vector Databases Explained: embeddings, indexing, and semantic search 2 min
  22. 49:44 Prototyping vs Production: when to use GPT-3.5/4 APIs vs open-source LLMs 2 min
  23. 51:35 Latency & Cost Tradeoffs: self-hosting performance and hardware choices 2 min
  24. 53:34 Data Quality Metrics: gold-standard examples and output-driven evaluation 2 min
  25. 55:32 Dataset Expansion: LLM-assisted augmentation for training data 1 min
  26. 56:39 Evaluation & Benchmarking: classification vs generative metrics and human review 2 min
  27. 59:08 Learning Resources: Hugging Face, Cohere LLM University, community content 2 min
  28. 1:00:38 Episode Close and Final Remarks

About Meryem Arik

Meryem Arik Co-founder of TitanML

Meryem Arik is the co-founder of TitanML, an NLP development platform focused on the deployability of large language models, helping businesses build smaller and cheaper LLM deployments with ease. She studied theoretical physics and philosophy at Oxford, describes herself as a recovering physicist, and has become a practical voice on getting LLMs into production, from latency and cost trade-offs to choosing between open source models and API services.

Topics in this episode

The wiki pages this conversation is filed under, the strongest first.

LLMs

Large language models with links to retrieval, agents, evaluation, production, and security pages.

Production

Production for data, ML, and AI systems, covering deployment, monitoring, reliability, ownership, and cost.

MLOps

Reference page for MLOps as the operating discipline for production machine learning systems.

Open Source

Open source as public data and ML software, including stewardship, governance, licensing, contribution surfaces, ecosystems, and company distribution.

AI

AI across machine learning, generative AI, agents, production systems, evaluation, infrastructure, and governance.

AI Engineering Roadmap

A roadmap for learning AI engineering through software foundations, LLM applications, RAG, evaluation, agents, LLMOps, and production ownership.

AI Infrastructure

Inference APIs, retrieval, evaluation, tooling, cost, and runtime operations behind LLM and AI product systems.

AI Tooling

How teams choose and operate AI tooling for model APIs, open-source LLMs, RAG, prompts, agents, evaluation, and deployment.

AI Tools Workflow Guide

How data professionals integrate AI tools into daily work, keep reviews in place, and add evaluation and privacy habits around repeated tasks.

Caching

Caching, prompt caching, context reuse, and model efficiency patterns for production AI systems.

Deep Learning

Deep learning across vision, transformers, labels, evaluation, production constraints, and portfolio proof.

Embeddings

Embeddings as representations for semantic search, RAG, recommendations, multimodal retrieval, and language systems.

Evaluation

How teams judge whether ML, LLM, RAG, product, and production systems are good enough to trust.

Generative AI

Generative AI as applied language, chatbot, agent, coding, and content-generation systems.

Information Retrieval

Information retrieval as the design of retrieval units, indexes, candidate generation, prefilters, and the handoff to ranking or generation.

LLM Cost Optimization

Token optimization, prompt compression, prompt caching, model size tradeoffs, and cost-aware engineering for production LLM systems.

LLM Deployment

Deploying LLMs in production: open-source vs API models, serving challenges, model compression, inference optimization, model drift, and API risk.

LLM Production Patterns

Durable serving, reliability, context, cost, and guardrail patterns for production LLM systems.

LLM System Design Interview

Prepare for LLM system design interviews with production patterns for RAG, agents, evaluation, safety, latency, cost, and operations.

LLM Tools for Real Products

Choose LLM tools for real products across model APIs, open-source models, RAG, evaluation, agents, observability, cost, and review.

LLM and RAG Production Roadmap

A learning and rollout roadmap for teams moving from bounded LLM workflows to RAG, evaluation, agents, and production readiness.

LLMOps

LLMOps covers the lifecycle discipline for LLM applications: traces, evaluation sets, releases, guardrails, cost control, and feedback loops.

Model Optimization

Model optimization for making ML systems smaller, faster, and cheaper with quantization, distillation, compression, and task-specific LLMs.

NLP

Natural language processing across language data, annotation, LLMs, speech, search, and production systems.

Notebook Production Workflow

A workflow for turning AI or ML notebooks into production systems with decisions, reusable code, evaluation, serving, and monitoring.

Privacy Engineering for ML

Privacy engineering for ML across access governance, privacy-enhancing technologies, and production LLM privacy tradeoffs.

Prompt Engineering

Prompt engineering techniques: role prompts, examples, structured output, evaluation, RAG context, and injection risks.

RAG Evaluation Workflow

A practical workflow for RAG eval: user tasks, gold examples, retrieval checks, answer checks, citations, review, traces, and feedback.

RAG vs Fine-Tuning

A decision guide for choosing retrieval, model adaptation, or both in production LLM systems.

Search

Search as the product system that turns retrieval, ranking, answers, recommendations, constraints, and evaluation into a useful surface.

Search/RAG Project Checklist

Review checklist for one chosen search or RAG implementation: corpus, chunking, baselines, citations, evaluation artifacts, traces, and production constraints.

Vector Database vs Search Engine

Vector databases and search engines compared by service ownership, migration paths, filters, ranking handoffs, and operations.

Vector Databases

Vector databases as the storage, indexing, and nearest-neighbor retrieval layer for embeddings.

Related events

Related books

Build a Large Language Model (From Scratch)

58 questions answered

In Build a Large Language Model (From Scratch), you'll learn and understand how large language models (LLMs) work from the inside out by coding them from the ground up, step by step. In this book, I'll guide you through creating your own LLM, explaining each stage with clear text, diagrams, and examples.

Sebastian Raschka

GPT-3

11 questions answered

GPT-3 has made creating AI apps simpler than ever. This book provides a comprehensive guide on how to utilize the OpenAI API with ease. It explores imaginative methods of utilizing this tool for your specific needs and showcases successful businesses that have been established through its use.

Sandra Kublik Shubham Saboo

Production‑Ready Data Science

Are you a data scientist or analyst struggling to take your Jupyter Notebook prototypes to the next level? Have you encountered challenges with code organization, reproducibility, or collaboration as your data science projects grow in complexity? This book is the solution you've been seeking.

Khuyen Tran

Optional analytics

Optional analytics are off unless you allow them. Your choice does not affect access to DataTalks.Club, Slack, events, or courses.

Current choice: not chosen.

Privacy Policy

If you allow analytics, self-hosted Umami counts anonymous public pageviews without analytics cookies. Private account and learning pages are excluded. Read the Privacy Policy for the complete data boundary.

Want to learn more about our community?

How it started, who's here, and everything that goes on here: courses, events, Slack, and more.

About DataTalks.Club