← CookbookView source on GitHub ↗

Token Factory Workshop

🔗 bit.ly/4cCCNzV


Pointers

Prerequisites

Before starting the workshop, make sure you have:


Workshop Theme

Building Production-Grade AI Applications

Modern AI applications improve continuously through a production feedback loop:

  1. Start with base (stock) models
  2. Collect production logs from real usage
  3. Fine-tune or shape models using real production data
  4. Deploy the improved model

This iterative process enables teams to progressively build robust, production-ready AI systems.

⭐️ Token Factory has the complete workflow built-in ⭐️



0 — Getting Started

Begin by setting up your environment and verifying access.

➡️ Getting Started Guide


1 - Using Models

In this section, we explore how to use models hosted on Token Factory.

➡️ explore Token Factory UI

➡️ structured-output: Produce structured output like JSON from LLMs.

➡️ tool calling: Extend LLMs capability by providing them with functions/tools.

➡️ search agent with Tavily


2 - Collecting Production Logs

Next, we capture real-world usage data to improve model performance.

➡️ Collecting Production Logs


3 - Customizing / Shaping Models

Learn how to adapt models for our specific use cases.

➡️ fine tuning models - improve model performance by training on production data and other optimizations.

➡️ Distilling models - create smaller, efficient models.


4 - Deploy and Monitor

Deploy trained models and monitor their performance in real time.

dedicated end points


5 - Integration with Coding Agents

Integrate models with coding assistants like Cline, Cursor and Claude Code.

coding integrations


6 - Fun and Games

A few experimental and creative examples to explore what else is possible.

🐍 *snake game 🐍 - the classic snake game, but LLMs control the snakes in real time!

🪿 Pelican riding a bicycle - a fun 'vibe benchmark' to gauge model intelligence!


Resources


Dev Notes

Project setup using uv:

uv init --python=3.12

uv add openai python-dotenv pydantic tavily-python
uv add --dev ipykernel

# (optional) generate requirements.txt
uv export \
  --frozen \
  --no-hashes \
  --no-emit-project \
  --no-default-groups \
  --output-file=requirements.txt