---
title: "Speeding up language models for travel applications"
description: "Combining knowledge distillation with Medusa multi-token decoding let Booking.com replace large LLMs with a 1.1B-parameter TinyLlama student that matches a Llama-3.1 70B teacher while running 10 to 20 times as fast."
url: "https://swe.quest/articles/speeding-up-language-models-for-travel-applications-59383cdd398ccff9"
canonical: "https://www.amazon.science/blog/speeding-up-language-models-for-travel-applications"
source: "Amazon Science"
published: "2026-10-29"
difficulty: "medium"
kind: "Case study"
reading_minutes: 4
tags: ["inference","model-training","llms","performance","cost-optimization"]
---

# Speeding up language models for travel applications

A post on [Amazon Science](https://swe.quest/sources/amazon-science.md), published 2026-10-29, 4 min read, Case study. Original: [https://www.amazon.science/blog/speeding-up-language-models-for-travel-applications](https://www.amazon.science/blog/speeding-up-language-models-for-travel-applications)

## Summary

Combining knowledge distillation with Medusa multi-token decoding let Booking.com replace large LLMs with a 1.1B-parameter TinyLlama student that matches a Llama-3.1 70B teacher while running 10 to 20 times as fast. The student is trained on human-labeled data plus teacher-generated labels, with Medusa heads attached and trained in the same stage. Distillation closed over 90% of the quality gap and gave roughly a 6x speedup. Medusa added another 2 to 3.6x, and the single-stage Medusa-2 variant was preferred for its simpler production pipeline. Across trip planning, smart filters and listing description generation, results included 15x faster p99 responses and descriptions at under one-third the cost of GPT-4.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)

## Prerequisites

- LLM token generation ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- model fine-tuning ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))

## Keywords

Medusa, knowledge distillation, TinyLlama, Llama-3.1, Booking.com, ACL

## Related posts

- [Consistency diffusion language models: Up to 14x faster inference without sacrificing quality](https://swe.quest/articles/consistency-diffusion-language-models-up-to-14x-faster-inference-without-729cf6964ed22edf.md): Together AI · 2026-02-19 · Hard · 6 min read · Inference & serving, LLMs, Model training, Performance engineering
  Consistency diffusion language models (CDLM) speed up diffusion LLM inference by post-training a block-wise causal student that can finalize multiple tokens per step and use exact block-wise KV caching.
- [Making Knowledge Distillation Cheap Enough to Run at Scale](https://swe.quest/articles/making-knowledge-distillation-cheap-enough-to-run-at-scale-f55a4297b4be9cef.md): Hugging Face · 2026-08-10 · Hard · 8 min read · Model training, LLMs, Performance engineering, Memory management
  Two systems changes make LLM knowledge distillation far cheaper: caching the teacher's top-100 logits offline so the teacher never shares memory with the student, and a fused chunked KL loss that folds the output projection into the loss and recomputes chunks in the backward pass, so the full vocabulary × sequence logits grid is never materialized.
- [Gisting: Compressing LLM Agent context to ↑ throughput and ↓ cost](https://swe.quest/articles/gisting-compressing-llm-agent-context-to-throughput-and-cost-77b1a192c9e3be28.md): Shopify Engineering · 2026-08-19 · Hard · 5 min read · Inference & serving, LLMs, Model training, Cost optimization, Performance engineering
  Shopify compressed the ~6,000-token system prompt of its Sidekick GraphQL agent into ~1,500 learned gist tokens (4:1) without losing prediction quality.
- [Apriel-H1: The Surprising Key to Distilling Efficient Reasoning Models](https://swe.quest/articles/apriel-h1-the-surprising-key-to-distilling-efficient-reasoning-models-6fe42e5e9de282bc.md): Hugging Face · 2025-11-19 · Hard · 8 min read · Model training, LLMs, Inference & serving, Machine learning
  ServiceNow converted its 15B Apriel reasoning model into a Mamba/attention hybrid via distillation, reaching 2.1x throughput with small benchmark shifts (MATH500 up, GPQA and AIME24 slightly down) using 76.8B tokens.
- [Productizing Large Language Models](https://swe.quest/articles/productizing-large-language-models-5be0923873af50a1.md): Replit · 2022-09-21 · Medium · 6 min read · Inference & serving, LLMs, AI for coding, Evaluation, Kubernetes
  Replit runs transformer models from ~100M parameters (search, spam) through 1-10B (GhostWriter code autocomplete) to 100B+ in production, and shares lessons on making them usable.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
