Skip to content

Repository files navigation

GPU Deep Learning Benchmark Suite

By Crossfirelab — Vibe Coded

Türkçe | English


🇹🇷 Türkçe

NVIDIA GPU'lar için yapay zeka odaklı benchmark paketi. Eğitim hızı, çıkarım performansı, LLM token üretimi, VRAM kapasitesi, nesne algılama ve çift-GPU ölçeklemeyi tek seferde ölçer. PyTorch + llama.cpp üzerine kurulu — Docker gerektirmez.

Hızlı Başlangıç

1. Klonla ve Kur

git clone <repo-url>
cd GPUDLBENCH
python3 install.py

Kurulum otomatik olarak sanal ortam oluşturur, GPU'nuza uygun PyTorch'u yükler, llama.cpp'yi derler ve test modellerini indirir (~57 GB).

2. Ortamı Aktifleştir

source venv/bin/activate

3. Benchmark'ları Çalıştır

python run_benchmarks.py

Tüm testleri sırayla çalıştırır (~2–4 saat). Sonuçlar results/ altında zaman damgalı bir klasöre kaydedilir.

4. Karşılaştırma Grafikleri Oluştur

Birden fazla GPU'yu test ettikten sonra (ayrı oturumlarda) GPU karşılaştırma grafikleri oluşturun:

python utils/generate_comparison.py --lang tr     # Türkçe
python utils/generate_comparison.py               # İngilizce (varsayılan)

Grafikler results/comparison_charts/ klasörüne kaydedilir.

Ne Test Ediliyor?

# Benchmark Ne Ölçüyor
1 CNN Eğitimi (ResNet-50/101) Eğitim hızı (görüntü/sn)
2 Transformer Eğitimi (BERT-Base/Large) Eğitim hızı (örnek/sn)
3 CNN Çıkarımı (ResNet-50/101) Çıkarım gecikmesi ve hızı
4 Transformer Çıkarımı (BERT-Base/Large) NLP çıkarım hızı
5 LLM Token Üretimi (llama.cpp) Token üretim hızı (token/sn)
6 VRAM Kapasite Testi En büyük yüklenebilir model, maks. bağlam uzunluğu
7 Nesne Algılama Eğitimi (Faster/Mask R-CNN) Algılama modeli eğitim hızı
8 Çift-GPU Ölçekleme (DDP + FSDP) 2 GPU ile ölçekleme verimi

Gereksinimler

  • Linux (Ubuntu 20.04+ önerilir)
  • NVIDIA GPU — CUDA 11.8+
  • Python 3.9+
  • 16 GB RAM minimum
  • İnternet bağlantısı (ilk model indirmeleri için)

Çalıştırma Seçenekleri

python run_benchmarks.py --demo              # ~5 dk hızlı test
python run_benchmarks.py --skip 5 6 8        # belirli testleri atla
python benchmarks/1_training_vision.py       # tek bir benchmark çalıştır

Kurulum Seçenekleri

python3 install.py --skip-llama        # llama.cpp'yi atla
python3 install.py --skip-models       # model indirmeyi atla
python3 install.py --model-set popular # daha küçük model seti (~38 GB)

Sonuçlar ve Raporlar

Her çalışma results/ altında zaman damgalı bir klasör oluşturur.

python utils/generate_report.py                   # oturum özet raporu
python utils/generate_comparison.py --lang tr      # Türkçe karşılaştırma grafikleri
python utils/generate_comparison.py --skip-charts  # sadece metrik, grafik yok

Çift-GPU Kurulumu

Sisteminizde 2 aynı GPU varsa, benchmark 8 (çift-GPU ölçekleme) otomatik çalışır. Farklı GPU'larınız varsa hangisini test edeceğiniz sorulur ve çift-GPU testi atlanır.

Sorun Giderme

"no kernel image is available" → Kurulum tekrar çalıştırıldığında GPU'nuza uygun PyTorch otomatik yüklenir:

python3 install.py

GPU değiştirdiniz mi? → Kurulumu tekrar çalıştırın. Yeni kartı algılar, PyTorch'u günceller ve llama.cpp'yi yeniden derler.

Kaldırma (Uninstall)

Sanal ortam, llama.cpp, indirilen modeller, önbellek ve geçici dosyaları temizlemek için:

python uninstall.py                 # onay ile temizle
python uninstall.py --force          # onay sormadan temizle
python uninstall.py --include-results # sonuçları da sil
python uninstall.py --dry-run        # ne silineceğini göster

Uyarı: Bu işlem indirilen model dosyalarını (~50+ GB), sanal ortamı ve llama.cpp derlemesini kalıcı olarak siler. Benchmark kaynak kodunuz ve sonuçlarınız (varsayılan olarak) korunur. NVIDIA sürücülerine dokunulmaz.

Detaylı benchmark açıklamaları için → BENCHMARKS_TR.md

For detailed benchmark explanations in English → BENCHMARKS_EN.md


🇬🇧 English

AI-focused benchmark suite for NVIDIA GPUs. Measures training throughput, inference speed, LLM token generation, VRAM capacity, object detection, and dual-GPU scaling in a single run. Built on PyTorch + llama.cpp — no Docker required.

Quick Start

1. Clone & Install

git clone <repo-url>
cd GPUDLBENCH
python3 install.py

The installer automatically creates a virtual environment, installs the correct PyTorch for your GPU, builds llama.cpp, and downloads test models (~57 GB).

2. Activate the Environment

source venv/bin/activate

3. Run Benchmarks

python run_benchmarks.py

Runs all benchmarks sequentially (~2–4 hours). Results are saved to a timestamped folder under results/.

4. Generate Comparison Charts

After benchmarking multiple GPUs (in separate sessions), generate cross-GPU comparison charts:

python utils/generate_comparison.py

Charts are saved to results/comparison_charts/. English is the default language; use --lang tr for Turkish.

What's Being Tested?

# Benchmark What It Measures
1 CNN Training (ResNet-50/101) Training throughput (images/sec)
2 Transformer Training (BERT-Base/Large) Training throughput (samples/sec)
3 CNN Inference (ResNet-50/101) Inference latency & throughput
4 Transformer Inference (BERT-Base/Large) NLP inference throughput
5 LLM Token Generation (llama.cpp) Token generation speed (tokens/sec)
6 VRAM Capacity Test Largest loadable model, max context length
7 Object Detection Training (Faster/Mask R-CNN) Detection model training throughput
8 Dual-GPU Scaling (DDP + FSDP) Scaling efficiency with 2 identical GPUs

Requirements

  • Linux (Ubuntu 20.04+ recommended)
  • NVIDIA GPU with CUDA 11.8+
  • Python 3.9+
  • 16 GB RAM minimum
  • Internet connection (for initial model downloads)

Run Options

python run_benchmarks.py --demo              # ~5-min smoke test
python run_benchmarks.py --skip 5 6 8        # skip specific benchmarks
python benchmarks/1_training_vision.py       # run a single benchmark

Install Options

python3 install.py --skip-llama        # skip llama.cpp build
python3 install.py --skip-models       # skip model downloads
python3 install.py --model-set popular # smaller model set (~38 GB)

Results & Reports

Each run creates a timestamped folder under results/.

python utils/generate_report.py                   # per-session summary
python utils/generate_comparison.py               # English comparison charts
python utils/generate_comparison.py --lang tr      # Turkish
python utils/generate_comparison.py --skip-charts  # metrics only, no PNGs

Dual-GPU Setup

If your system has 2 identical GPUs, benchmark 8 (dual-GPU scaling) runs automatically. If your GPUs are different, you'll be prompted to choose which one to benchmark and the dual-GPU test is skipped.

Troubleshooting

"no kernel image is available" → Re-run the installer. It auto-detects your GPU and installs the correct PyTorch build:

python3 install.py

Switched GPU? → Re-run the installer. It detects the new card, updates PyTorch, and rebuilds llama.cpp.

Uninstall

Clean up the virtual environment, llama.cpp, downloaded models, caches, and temporary files:

python uninstall.py                 # interactive confirmation
python uninstall.py --force          # skip confirmation
python uninstall.py --include-results # also delete results/
python uninstall.py --dry-run        # show what would be deleted

Warning: This permanently deletes downloaded model files (~50+ GB), the virtual environment, and the llama.cpp build. Your benchmark source code and results are preserved by default. NVIDIA drivers are not touched.

For detailed benchmark explanations → BENCHMARKS_EN.md

HuggingFace Token (Optional)

Some gated models require a HuggingFace token. Create a .credentials file:

HF_TOKEN=hf_yourTokenHere

Or pass directly: python3 install.py --hf-token hf_yourTokenHere

Get a token at https://huggingface.co/settings/tokens (Read access is sufficient). The suite works without a token — gated model downloads will simply be skipped.


License

MIT

About

GPU DL Benchmark Suite

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages