Runs ML model benchmarks and evaluations. Measures inference speed, memory usage, and accuracy metrics. Use for "벤치마크", "모델 평가", "성능 테스트", "inference 속도" requests.
Model performance benchmarking.
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")
| Metric | Description | Command |
|--------|-------------|---------|
| Latency | Inference time | time.time() |
| Throughput | Samples/sec | samples / elapsed |
| Memory | VRAM usage | torch.cuda.max_memory_allocated() |
| Accuracy | Model quality | accuracy_score(y_true, y_pred) |
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.
# 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.
## 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
results = {}
for model_name, model in models.items():
results[model_name] = benchmark(model)
# Generate comparison table
torch.cuda.synchronize() for GPUnpx skills add jiunbae/benchmarking-ml-models下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer