llm-inference-batching-scheduler

Design batching schedulers that optimize LLM inference on compilation-based accelerators.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill llm-inference-batching-scheduler-zurybr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-inference-batching-scheduler
Source: https://github.com/Zurybr/lefarma-skills/tree/main/letta/benchmarks/trajectory-only/llm-inference-batching-scheduler
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill llm-inference-batching-scheduler-zurybr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complex challenge of optimizing batch schedulers for LLM inference on compilation-based accelerators, aiming to minimize costs while adhering to strict latency requirements.

Core Features & Use Cases

  • Cost Optimization: Reduces compilation costs by minimizing unique shapes and padding overhead.
  • Latency Management: Balances batching strategies to meet P95 and P99 latency thresholds.
  • Use Case: When deploying LLMs on TPUs, this skill helps design a scheduler that efficiently groups incoming requests to reduce expensive shape compilations and minimize wasted computation due to padding, ensuring fast response times.

Quick Start

Analyze the request distribution and cost model to derive optimal generation bucket sizes and shape configurations for LLM inference batching.

Frequently Asked Questions about llm-inference-batching-scheduler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize LLM inference batching on compilation-based accelerators?

Optimize LLM inference batching by designing a scheduler that groups incoming requests to minimize unique shapes and padding overhead. This systematic approach balances generation-length bucketing and cost-model-driven optimization to reduce expensive compilations.

What's the best way to reduce padding overhead during TPU inference?

Reduce padding overhead by applying generation-length bucketing and strategic shape selection during batch planning. Grouping similar request lengths minimizes wasted computation and lowers compilation costs for compilation-based accelerators.

How does a cost-model-driven scheduler balance latency and cost for LLM inference?

A cost-model-driven scheduler balances latency and cost by evaluating request distributions against compilation costs. It strategically plans batches to meet strict P95 and P99 latency thresholds while minimizing expensive shape compilations.

When do I need generation-length bucketing for neural network inference?

Generation-length bucketing is needed when deploying LLMs on compilation-based accelerators with strict latency requirements. It minimizes unique shapes and padding overhead, ensuring fast response times by reducing expensive compilations.

Can I use this batching approach to meet P95 and P99 latency thresholds?

Yes, this batching approach meets P95 and P99 latency thresholds by balancing batching strategies against compilation costs. The scheduler efficiently groups requests to ensure fast response times while controlling padding overhead.

Why does shape compilation cost impact batch planning for LLM workloads?

Shape compilation costs impact batch planning because unique shapes trigger expensive compilations on accelerators. Minimizing these unique shapes through cost-model-driven optimization reduces compilation overhead and wasted padding computation.