WhoBuilt

Customized, production ready inference with open source models

Feb 16, 2025· 19 min· 1.8K views·Watch on YouTube

Speaker

Dmytro (Dima) Dzhulgakov of Fireworks AI discusses productionizing and customizing open source models at an AI Engineer event.

Why specialize open models

Dzhulgakov says general-purpose proprietary models can be slower and more costly than a smaller model tailored to a narrow task. He cites fine-tuned Llama 3 performing similarly on some function-calling tasks at up to 10 times the speed, and estimates that a high-volume GPT-4 or GPT-4o workload could cost around $7 million a year.

Challenges of production inference

Running open models requires teams to find GPUs, choose frameworks, download models, and tune performance, then repeat that work as models change. Dzhulgakov also points to workload-specific tradeoffs such as latency versus throughput, and the operational demands of scaling, telemetry, and observability.

Tune serving to the workload

Fireworks built a serving stack with custom CUDA kernels and deployment orchestration, aiming to optimize cost and latency for each workload. For long, repetitive prompts common in RAG, Dzhulgakov describes using caching and other settings to improve throughput while maintaining latency. He also says LoRA adapters can share a GPU, allowing thousands of variants to be served without fixed costs per model.

Build applications around models

Dzhulgakov describes applications as compound systems that combine models with retrieval, tools, and external actions. Fireworks' FireFunction models handle chat and function calling; in the demo, a model identifies the top cloud providers, retrieves their stock prices, and sends them to a charting tool. The open-source demo also shows how an agent can use conversation context and switch topics.

Scale from prototyping to production

Fireworks offers serverless inference for prototyping, on-demand dedicated hardware for greater control, and enterprise arrangements with hardware personalization and performance tuning. Dzhulgakov says the service supports fine-tunes and LoRA adapters, is OpenAI API-compatible, and was serving more than 150 billion tokens per day when he last checked.

Takeaways

  • Benchmark a smaller, fine-tuned model against a general-purpose model on your actual task, including latency and cost.
  • Tune inference settings to your prompt lengths and latency targets; throughput gains can reduce GPU needs.
  • Plan for deployment, monitoring, and scaling work when estimating the effort to productionize open models.
  • Treat retrieval, function calling, and external tools as parts of the application architecture, not add-ons to a model.
  • Choose an inference setup that matches your current needs, then revisit dedicated hardware as volume and control requirements grow.

Mentioned in this talk

Search inside this talk

What was claimed 8

Related talks