groq-performance-tuning
Installation
SKILL.md
Groq Performance Tuning
Overview
Maximize Groq's LPU inference speed advantage. Groq already delivers extreme throughput (280-560 tok/s) and low latency (<200ms TTFT), but client-side optimization -- model selection, prompt size, streaming, caching, and parallelism -- determines whether your application fully exploits that speed.
This skill walks through six tuning levers at a high level; the complete, copy-pasteable code for each lives in references/implementation.md, and end-to-end worked scenarios live in references/examples.md.
Prerequisites
- Groq API key — set
GROQ_API_KEYin the environment. Thegroq-sdkclient (new Groq()) reads it automatically; never hardcode the key. - Node.js 18+ with the
groq-sdkpackage installed (npm install groq-sdk). - Optional packages for the caching and parallelism steps:
lru-cacheandp-queue(npm install lru-cache p-queue). - A baseline latency measurement of your current integration so you can confirm the tuning actually helps.