llm-inference-batching-scheduler

Optimize LLM inference batching to minimize compilation overhead and padding waste.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill llm-inference-batching-scheduler-bianhaifeng789-hue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-inference-batching-scheduler
Source: https://github.com/bianhaifeng789-hue/openclaw-config/tree/main/skills/tb2/llm-inference-batching-scheduler
Command: npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill llm-inference-batching-scheduler-bianhaifeng789-hue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams design batching schedulers for LLM inference on compilation-based accelerators by balancing compilation costs, padding overhead, and latency constraints to produce cost-effective, low-latency serving plans.

Core Features & Use Cases

  • Cost-aware shape planning: Quantifies the trade-off between number of compiled shapes and per-token cost to minimize total spend.
  • Padding budget and bucket sizing: Provides methods to compute padding budgets and derive generation-length bucket sizes to reduce wasted tokens.
  • Systematic parameter search and validation: Recommends grid/binary search strategies, invariant checks, and structural/metric verification for plan files.
  • Use Case: Generate a plan file that assigns variable-length requests to a minimal set of shapes and generation buckets while meeting pad_ratio and P95/P99 latency thresholds.

Quick Start

Create a batching plan that minimizes compilation cost and padding while meeting specified pad_ratio and P95 latency targets for the provided request distribution and cost parameters.

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 to reduce padding waste on compilation-based accelerators?

To optimize LLM inference batching on compilation-based accelerators, you must balance compilation costs and padding overhead by computing padding budgets and deriving generation-length bucket sizes to reduce wasted tokens.

What is the best way to minimize compilation overhead for variable-length LLM serving requests?

Minimizing compilation overhead for variable-length LLM serving involves quantifying the trade-off between the number of compiled shapes and per-token cost, searching shape configurations to produce a cost-effective serving plan.

How do I calculate generation-length bucket sizes to meet P95 latency constraints?

Calculating generation-length bucket sizes to meet P95 latency constraints requires applying grid or binary search strategies to assign variable-length requests to a minimal set of shapes while validating structural invariants.

Does this batching scheduler work for TPU and ASIC deployments handling variable-length requests?

Yes, this batching scheduler is designed specifically for compilation-based accelerators like TPUs or ASICs serving variable-length requests, satisfying constraints on total cost, pad_ratio limits, and latency percentiles.

Why does padding waste increase serving costs for LLM inference on compilation-based accelerators?

Padding waste increases serving costs because compiling numerous shapes for variable-length requests incurs overhead, requiring a systematic parameter search to assign requests to minimal shapes and validate metric thresholds.

How to validate a batching plan file against pad_ratio limits and P99 latency thresholds?

Validating a batching plan file against pad_ratio limits and P99 latency thresholds involves running structural and metric verification checks to ensure the assigned request distribution meets specified cost and latency targets.