Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Slack Engineering 14 min read Case study mediumAdept

Slack AI: The Path to Multi-Cloud

Slack AI's LLM serving evolved over three years through four phases: self-managed AWS SageMaker endpoints in an escrow VPC, Amazon Bedrock Provisioned Throughput, a hybrid of Provisioned Throughput and On-Demand with spillover routing, and finally a multi-cloud setup adding GCP Vertex AI. Each move addressed a concrete pain point: GPU scarcity and scaling latency, model availability lag, idle capacity from workday traffic peaks, multi-month commitment lock-in, and single-provider concentration risk. The Bedrock migration had zero customer-facing incidents, achieved through load tests to size Model Units, shadow requests, A/B quality checks and feature-flag rollouts. Per-feature model fallback hierarchies and telemetry-based cross-provider routing then delivered about 10% quality gains on reasoning tasks and about 67% lower latency on low-token workloads.

Related posts

  • Building an LLM-Powered Slackbot

    Benchling Engineering mediumAdept

    Benchling built an internal Slackbot that answers Terraform Cloud questions using a RAG pipeline on Amazon Bedrock knowledge bases, with OpenSearch Serverless as the vector store, Titan Text Embeddings v2 for embedding and Claude 3.5 Sonnet v2 for generation. A Slack app calls API Gateway, which invokes a stateless Python Lambda. Data sources are a Confluence FAQ exported to PDF, selected HashiCorp docs and hand-copied Slack threads. The key lesson concerned chunking. Bedrock's default 300-token chunks cut multi-step answers in half, and hierarchical chunking with a 1500-token parent size, matched to the longest FAQ answer, worked best. The post includes Terraform for the API Gateway, Lambda and IAM, and lists limitations such as no image support and no Terraform provider support for Bedrock knowledge bases.

  • Autoscaling endpoints for LLM inference

    Together AI mediumAdept

    LLM serving breaks classic autoscaling assumptions. GPU utilization misrepresents load, and multi-minute cold starts mean scaling has to act on leading signals. Together AI's dedicated endpoints scale proportionally (ceil(N × observed/target)) on inference-native metrics such as in-flight requests, TTFT, GPU or token utilization, and throughput, with an eager scale-up window and a patient scale-down window to avoid sawtooth cold starts. In a replayed sine-plus-spike load on Qwen3.5-9B/H100, only inflight_requests (target 8) triggered scaling. TTFT p95 and GPU utilization policies never fired despite 3–5s client p95, because continuous batching hides queue pressure from first-token latency. Measured cold starts of roughly 1.5–2.5 minutes argue for keeping min_replicas headroom on SLO-bound endpoints.

  • How to deploy and fine-tune DeepSeek models on AWS

    Hugging Face mediumAdept

    DeepSeek-R1's distilled Llama and Qwen models can be deployed on AWS through Hugging Face Inference Endpoints, Bedrock Marketplace, SageMaker with Hugging Face LLM DLCs (TGI v3) on GPUs or Neuron, and EC2 Inferentia via the Hugging Face Neuron AMI. The guide includes SageMaker Python SDK code and a recommended instance table (e.g. ml.g6.48xlarge with 8 GPUs for the 70B distill), plus Neuron settings such as 24 cores, bf16, batch size 4 and 4096 total tokens using pre-compiled models. The full R1 runs on Inference Endpoints as an Unsloth GGUF quantization for about $8.3/hour, while full-R1 SageMaker deployment and all fine-tuning paths are still marked as coming soon.

  • Introducing the Hugging Face LLM Inference Container for Amazon SageMaker

    Hugging Face mediumAdept

    Hugging Face's LLM Inference Deep Learning Container for Amazon SageMaker is built on Text Generation Inference (TGI), which provides tensor parallelism, continuous batching, flash-attention, bitsandbytes quantization, safetensors loading and SSE token streaming. The walkthrough deploys the 12B Pythia Open Assistant model on an ml.g5.12xlarge instance (4 A10G GPUs) using the sagemaker Python SDK, with environment variables for GPU count and token limits. It then covers TGI generation parameters such as temperature, top_p, stop sequences and repetition penalty, and builds a Gradio chatbot on top of the endpoint. For a cheaper setup, a g5.2xlarge with int8 quantization is suggested.

  • Llama 2 on Amazon SageMaker a Benchmark

    Hugging Face mediumAdept

    A benchmark of 60 Llama 2 deployment configurations on Amazon SageMaker using the Hugging Face LLM Inference Container (TGI) covers 7B, 13B and 70B models on g5 (A10G) and p4d (A100) instances. Each configuration was measured for per-token latency and throughput at 1–20 concurrent requests, with and without GPTQ 4-bit quantization. GPTQ is the most cost-effective option: 7B on a g5.2xlarge costs about $3.50 per million tokens, and 13B fits on a single GPU. The best throughput came from 13B unquantized on p4d at roughly 668 tokens/sec with 20 concurrent requests, and the lowest latency was 7B on ml.g5.12xlarge at about 16.8 ms/token.

The quest for software engineering knowledge.

Look:
Layout: