P
📊Analyse de donnéesAdvancedAll AIs

Profile model inference latency

Optimize model inference speed

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Write Python code to profile the inference latency of a [model type] across different batch sizes (1, 8, 32, 128, 512). Measure: p50, p95, p99 latency and throughput (predictions/second). Identify the optimal batch size, memory usage per batch, and recommend optimizations (quantization, ONNX export, TorchScript).

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Use Cases

Optimize model inference speed

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Pour des mesures précises sur GPU, n'oubliez pas d'ajouter un warm-up (quelques inférences) et un `torch.cuda.synchronize()` avant chaque chronométrage. Variante utile : intégrer `torch.cuda.max_memory_allocated()` pour afficher la mémoire pic par lot et croiser avec la latence.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

Data cleaning and preparation

Step-by-step guide to clean and standardize raw data before analysis in Excel or Google Sheets.

0499
📊Analyse de donnéesIntermediateAll AIs

Annual HR Report

HR Reporting

0227

Generate interaction features

Discover feature interactions

0217
📊Analyse de donnéesIntermediateAll AIs

Extract and structure HTML content

Extract structured data from HTML pages

0209