Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Groq Performance Tuning

skill · jeremylongshore/claude-code-plugins-plus-skillsMIT licenceAudited 8 Oct 2026 · source 4f83675ca38a

★ 2,823pushed todayversion 1.11.0
✓SAFEGrade B · 89/100 · 8 Oct 2026 · 4f83675
2,823repo stars · whole jeremylongshore/claude-code-plugins-plus-skills

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 4f83675ca38a and found no filesystem, network or shell access and no hard-coded secrets. What it does: Optimize Groq API performance with model selection, caching, streaming,

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Groq Performance Tuning (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/groq-performance-tuning

Trust audit

Audit 0.4.1 · source read 8 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codePASS0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 4f83675ca38a · 8 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: Optimize Groq API performance with model selection, caching, streaming,

---
name: groq-performance-tuning
description: 'Optimize Groq API performance with model selection, caching, streaming,
  and parallel requests.

  Use when experiencing slow responses, implementing caching strategies,

  or optimizing request throughput for Groq integrations.

  Trigger with phrases like "groq performance", "optimize groq",

  "groq latency", "groq caching", "groq slow", "groq speed".

  '
allowed-tools: Read, Write, Edit
version: 1.11.0
license: MIT
author: Jeremy Longshore <[email protected]>
tags:
- saas
- groq
- api
- performance
compatibility: Designed for Claude Code
---
# 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](references/implementation.md), and end-to-end worked scenarios live in [references/examples.md](references/examples.md).

## Prerequisites

- **Groq API key** — set `GROQ_API_KEY` in the environment. The `groq-sdk` client (`new Groq()`) reads it automatically; never hardcode the key.
- **Node.js 18+** with the `groq-sdk` package installed (`npm install groq-sdk`).
- Optional packages for the caching and parallelism steps: `lru-cache` and `p-queue` (`npm install lru-cache p-queue`).
- A baseline latency measurement of your current integration so you can confirm the tuning actually helps.

## Groq Speed Benchmarks

| Model | TTFT | Throughput | Context |
|-------|------|-----------|---------|
| `llama-3.1-8b-instant` | ~50ms | ~560 tok/s | 128K |
| `llama-3.3-70b-versatile` | ~150ms | ~280 tok/s | 128K |
| `llama-3.3-70b-specdec` | ~100ms | ~400 tok/s | 128K |
| `meta-llama/llama-4-scout-17b-16e-instruct` | ~80ms | ~460 tok/s | 128K |

TTFT = Time to First Token. Actual values depend on prompt size and server load.

## Instructions

Apply these six levers in order. Each is a small, independent change — start with the ones that match your bottleneck (model choice and caching give the biggest wins on most workloads). The full code for every step is in [references/implementation.md](references/implementation.md).

1. **Choose the right model for speed.** Map each call site to a speed tier: `llama-3.1-8b-instant` for latency-critical paths, `llama-3.3-70b-versatile` for quality-sensitive paths, `llama-3.3-70b-specdec` for 70b quality at higher throughput. Set `temperature: 0` so responses are deterministic (and cacheable).
2. **Minimize token count.** Trim verbose system prompts to their essence and set `max_tokens` to the expected output size, not a safe-looking ceiling. Fewer tokens means faster responses and less TPM-quota pressure.
3. **Stream for perceived performance.** For any output the user watches arrive, stream chunks and surface live TTFT / tokens-per-second metrics. Streaming hides TTFT even when total wall-clock is unchanged.
4. **Cache deterministic responses.** Hash `{messages, model}` and serve repeat `temperature: 0` requests from an LRU cache with a short TTL — turning a repeated call into a ~0ms hit.
5. **Parallelize under a rate-limit-aware queue.** Fan out bulk work with `p-queue`, capping concurrency and per-minute volume so you saturate throughput without tripping 429s.
6. **Benchmark before you commit.** Measure the candidate models against your real prompt shape and pick the fastest that clears your quality bar.

The essential skeleton — a tiered client every other step builds on:

```typescript
import Groq from "groq-sdk";

const groq = new Groq();  // reads GROQ_API_KEY from the environment

const SPEED_MAP = {
  instant: "llama-3.1-8b-instant",      // <100ms TTFT — latency-critical
  balanced: "llama-3.3-70b-versatile",  // <200ms TTFT — quality-sensitive
  fast70b: "llama-3.3-70b-specdec",     // 70b quality, faster throughput
} as const;

async function tieredCompletion(prompt: string, tier: keyof typeof SPEED_MAP = "instant") {
  return groq.chat.completions.create({
    model: SPEED_MAP[tier],
    messages: [{ role: "user", content: prompt }],
    temperature: 0,   // deterministic = cacheable
    max_tokens: 256,  // request only what you need
  });
}
```

See [references/implementation.md](references/implementation.md) for the streaming, caching, parallel-queue, and benchmarking functions in full.

## Output

Applying these levers to a Groq integration produces:

- **A tiered model map** (`SPEED_MAP`) so each call site uses the fastest model that meets its quality bar.
- **A streaming helper** that returns `{ content, ttftMs, totalMs, tokPerSec }` for live latency instrumentation.
- **A deterministic prompt cache** (LRU + SHA-256 key) that collapses repeated requests to ~0ms.
- **A rate-limit-aware parallel executor** that maximizes throughput without hitting 429s.
- **A benchmark report** printing average latency and tokens/sec per model, e.g.:

```text
llama-3.1-8b-instant     |  61ms avg | 548 tok/s avg
llama-3.3-70b-versatile  | 148ms avg | 279 tok/s avg
llama-3.3-70b-specdec    | 103ms avg | 401 tok/s avg
```

## Performance Decision Matrix

| Scenario | Model | max_tokens | stream | cache |
|----------|-------|-----------|--------|-------|
| Classification | 8b-instant | 5 | No | Yes |
| Chat response | 70b-versatile | 1024 | Yes | No |
| Data extraction | 8b-instant | 200 | No | Yes |
| Code generation | 70b-versatile | 2048 | Yes | No |
| Bulk processing | 8b-instant | 256 | No | Yes |

## Examples

Common scenarios mapped to the levers above. Full code for each is in [references/examples.md](references/examples.md).

- **Latency-critical classification** — `8b-instant` + one-word prompt + `max_tokens: 5` + cache. First call ~50ms TTFT; identical repeats return from cache at ~0m

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 4f83675

Download folder ↗
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills
git -C claude-code-plugins-plus-skills checkout 4f83675ca38a

The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f83675ca38a only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
Claude CodeMentioned in its text, not testedSkills for Claude Code · About Claude Code
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 4f83675ca38a

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/jeremylongshore/groq-performance-tuning/badge.svg)](https://modelsatlas.com/skills/jeremylongshore/groq-performance-tuning/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/jeremylongshore/groq-performance-tuning/badge.svg)](https://modelsatlas.com/skills/jeremylongshore/groq-performance-tuning/)

Questions about Groq Performance Tuning

What does the Groq Performance Tuning skill do?
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Is Groq Performance Tuning safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Groq Performance Tuning access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Groq Performance Tuning work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f83675ca38a), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.