Ai llm inference

From diegosouzapw/awesome-omni-skill · View interactive version

Ai llm inference is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skill. Operational patterns for LLM inference: latency budgeting, tail-latency control, caching, batching/scheduling, quantization/compression, parallelism, and reliable serving at scale. Emphasizes production-grade performance, cost control, and observability.

How to use this skill

Skill file

LLMOps - Inference & Optimization - Production Skill Hub

Modern Best Practices (January 2026):

This skill provides production-ready operational patterns for optimizing LLM inference performance, cost, and reliability. It centralizes decision rules, optimization strategies, configuration templates, and operational checklists for inference workloads.

No theory. No narrative. Only what Codex can execute.


When to Use This Skill

Codex should activate this skill whenever the user asks for:

Scope Boundaries (Use These Skills for Depth)


Quick Reference

| Task | Tool/Framework | Command/Pattern | When to Use |

|------|----------------|-----------------|-------------|

| Latency budget | SLO + load model | TTFT/ITL + P95/P99 under load | Any production endpoint |

| Tail-latency control | Scheduling + timeouts | Admission control + queue caps + backpressure | Prevent p99 explosions |

| Throughput | Batching + KV-cache aware serving | Continuous batching + KV paging | High concurrency serving |

| Cost control | Model tiering + caching | Cache (prefix/response) + quotas | Reduce spend and overload risk |

| Long context | Prefill optimization | Chunked prefill + prompt compression | Long inputs and RAG-heavy apps |

| Parallelism | TP/PP/DP | Choose by model size and interconnect | Models that do not fit one device |

| Reliability | Resilience patterns | Timeouts + circuit breakers + idempotency | Avoid cascading failures |


Decision Tree: Inference Optimization Strategy

Need to optimize LLM inference: [Optimization Path]
    │
    ├─ High throughput (>10k tok/s) OR P99 variance > 3x P50?
    │   └─ YES -> Disaggregated inference (prefill/decode separation)
    │            See references/disaggregated-inference.md
    │
    ├─ Primary constraint: Throughput?
    │   ├─ Many concurrent users? -> batching + KV-cache aware serving + admission control
    │   ├─ Chat/agents with KV reuse? -> SGLang (RadixAttention)
    │   └─ Mostly batch/offline? -> batch inference jobs + large batches + spot capacity
    │
    ├─ Primary constraint: Cost?
    │   ├─ Can accept lower quality tier? -> model tiering (small/medium/large router)
    │   └─ Must keep quality? -> caching + prompt/context reduction before quantization
    │
    ├─ Primary constraint: Latency?
    │   ├─ Draft model acceptable? -> speculative decoding
    │   └─ Long context? -> prefill optimizations + FlashAttention-3 + context budgets
    │
    ├─ Large model (>70B)?
    │   ├─ Multiple GPUs? -> Tensor parallelism (NVLink required)
    │   └─ Deep model? -> Pipeline parallelism (minimize bubbles)
    │
    ├─ Hardware selection?
    │   ├─ Memory-bound? -> more HBM, higher bandwidth
    │   ├─ Latency-bound? -> faster clocks + kernel support
    │   └─ Multi-node? -> prioritize interconnect (NVLink/RDMA) and topology
    │
    │   Notes: treat GPU/SKU advice as time-sensitive; verify with vendor docs and your own benchmarks.
    │   See references/gpu-optimization-checklists.md and references/infrastructure-tuning.md
    │
    └─ Edge deployment?
        └─ CPU + quantization -> llama.cpp/GGUF for constrained resources

Intake Checklist (REQUIRED)

Before recommending changes, collect (or infer) these inputs:

Core Concepts & Practices

Core Concepts (Vendor-Agnostic)

Implementation Practices (Tooling Examples)

Do / Avoid

Do

Avoid


Accuracy Protocol (REQUIRED)


Resources (Detailed Operational Guides)

For comprehensive guides on specific topics, see:

Infrastructure & Serving

Performance Optimization

Deployment & Operations


Templates

Inference Configs

Production-ready configuration templates for leading inference engines:

Quantization & Compression

Model compression templates for reducing memory and cost:

Serving Pipelines

High-throughput serving architectures:

Caching & Batching

Performance optimization templates:

Benchmarking

Performance measurement and validation:

Checklists

Navigation

Resources

Templates

Data


Trend Awareness Protocol

IMPORTANT: When users ask recommendation questions about LLM inference, you MUST use WebSearch to check current trends before answering.

Trigger Conditions

Required Searches

  1. Search: "LLM inference optimization best practices 2026"
  2. Search: "[vLLM/TensorRT-LLM/SGLang] comparison 2026"
  3. Search: "LLM quantization trends January 2026"
  4. Search: "LLM serving new releases 2026"

What to Report

After searching, provide:

Example Topics (verify with fresh search)


Related Skills

This skill focuses on inference-time performance. For related workflows:


External Resources

See data/sources.json for:


Use this skill whenever the user needs LLM inference performance, cost reduction, or serving architecture guidance.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.