ml-benchmark
/ml-benchmark
Guides ML model benchmarks and evaluations. Measures inference speed, memory usage, and accuracy metrics. Use for "벤치마크", "모델 평가", "성능 테스트", "inference 속도" requests.
- Author
- jiunbae ↗
- Repository
- agent-skills ↗
- Licence
- MIT
- Last repository change
- 01.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/ml-benchmark.sh, tests/ml-benchmark.test.sh
What it does and when to use it
Guides ML model benchmarks and evaluations. Measures inference speed, memory usage, and accuracy metrics. Use for "벤치마크", "모델 평가", "성능 테스트", "inference 속도" requests.
Triggers from the description
Original author description
Guides ML model benchmarks and evaluations. Measures inference speed, memory usage, and accuracy metrics. Use for "벤치마크", "모델 평가", "성능 테스트", "inference 속도" requests.
How it works
- Quick Benchmark
- Metrics
- Benchmark Script
- Output Format
- Compare Models
- Best Practices
SKILL.md preview
---
name: ml-benchmark
description: Guides ML model benchmarks and evaluations. Measures inference speed, memory usage, and accuracy metrics. Use for "벤치마크", "모델 평가", "성능 테스트", "inference 속도" requests.
---
# ML Benchmark
Model performance benchmarking.
## Quick Benchmark
```python
import time
import torch
# Warmup
for _ in range(10):
model(sample_input)
# CUDA calls are asynchronous. Finish warmup before starting the clock.
use_cuda = torch.cuda.is_available()
if use_cuda:
torch.cuda.synchronize()
# Benchmark
start = time.perf_counter()
for _ in range(100):
model(sample_input)
if use_cuda:
torch.cuda.synchronize()
elapsed = time.perf_counter() - start
print(f"Avg latency: {elapsed/100*1000:.2f}ms")
```
## Metrics
| Metric | Description | Command |
|--------|-------------|---------|
| Latency | Inference time | `time.perf_counter()` (after `torch.cuda.synchronize()`) |
| Throughput | Samples/sec | `samples / elapsed` |
| Memory | VRAM usage | `torch.cuda.max_memory_allocated()` |
| Accuracy | Model quality | `accuracy_score(y_true, y_pred)` |
## Benchmark Script
The bundled helper has no inference or dataset adapter. Its `run` and `evaluate`
commands intentionally exit nonzero before printing or saving results. Do not
treat endpoint health, sleeps, or generated labels as model measurements.
```bash
# From this Skill's directory; currently verifies the fail-closed contract.
bash scripts/ml-benchmark.sh run \
--url localhost:8001 \
--model langdetector \
--input ./sample.wav \
--batch-size 32 \
--runs 100
```
Before enabling that command, add a real, versioned inference adapter and test
that every recorded sample comes from a completed model response. Accuracy also
requires a dataset adapter that reads ground-truth labels and predictions.
## Output Format
```markdown
## Benchmark Results: {model_name}
| Metric | Value |
|--------|-------|
| Latency (p50) | 15.2ms |
| Latency (p99) | 22.1ms |
| Throughput | 65 samples/sec |
| Memory | 4.2 GB |
| Accuracy | 92.3% |
### Configuration
- GPU: NVIDIA A100
- Batch size: 32
- Precision: FP16
```
## Compare Models
```python
results = {}
for model_name, model in models.items():
results[model_name] = benchmark(model)
# Generate comparison table
```
## Best Practices
- Always warmup before measuring
- Use `torch.cuda.synchronize()` for GPU
- Report p50/p99 latencies
- Document hardware configuration
Files in this package (3)
- SKILL.md 2 KB
- scripts/ml-benchmark.sh 9 KB
- tests/ml-benchmark.test.sh 5 KB
Versions
The database has no other skills named ml-benchmark.
Database snapshot: 13.11.2026 · package version 661a44bca3be (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100ollama-inference-test
Test and benchmark local Ollama inference - status, test, benchmark. Check model availability, run generation/classification tests, measure response time. Use when user says "test Ollama", "Ollama status", "benchmark inference". - 100evaluate-edge-ai-phi4
Evaluate Edge AI Phi-4 — benchmark inference speed, memory footprint, quality vs cloud model, offline reliability, battery impact. Use when: evaluate, benchmark edge performance. - 100benchmark-manager
Create and manage AILANG eval benchmarks. Use when user asks to create benchmarks, fix benchmark issues, debug failing benchmarks, or analyze benchmark results. - 100benchmark-manager
Create and manage AILANG eval benchmarks. Use when user asks to create benchmarks, fix benchmark issues, debug failing benchmarks, or analyze benchmark results. - 95overmind-inference
Inspect Overmind model deployments, serving metrics, worker state and live routing; test inference and activate an approved model. Use for Inference and serving operations, not training or benchmark selection. - 90inference-format-optimizer
Iterative benchmarking, evaluation, and algorithmic optimization of alternative A2UI inference formats (such as Express, Atom, and Elemental). Trigger when asked to: (1) Run optimization passes or loops on an inference format, (2) Evaluate or benchmark format accuracy, latency,…