File size: 1,250 Bytes
1221328 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/bash
set -e
echo "=== VerilogEval v1 Benchmark Setup ==="
# 1. Python venv
python3 -m venv venv
source venv/bin/activate
# 2. Gerekli paketler
pip install torch transformers accelerate tqdm huggingface_hub
# 3. iverilog kurulumu (Ubuntu/Debian)
if ! command -v iverilog &> /dev/null; then
echo "iverilog kuruluyor..."
apt-get update && apt-get install -y iverilog
fi
# 4. VerilogEval v1 dataset indir
if [ ! -d "verilog-eval-v1" ]; then
echo "VerilogEval v1 indiriliyor..."
git clone --depth 1 --branch v1.0.0 https://github.com/NVlabs/verilog-eval.git verilog-eval-v1
fi
# 5. Model oncelikleri indir (cache)
echo "Model cache'leniyor..."
python3 -c "
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
for name, hf_id in [
('qwen-base', 'Qwen/Qwen2.5-Coder-7B'),
('qwen-instruct', 'Qwen/Qwen2.5-Coder-7B-Instruct'),
('codev-qwen', 'muratkarahan/codev-qwen2.5-coder-7B'),
]:
print(f'Indiriliyor: {hf_id}...')
AutoTokenizer.from_pretrained(hf_id, trust_remote_code=True)
AutoModelForCausalLM.from_pretrained(hf_id, torch_dtype=torch.float16, trust_remote_code=True)
print(f'{name} OK')
"
echo ""
echo "=== Setup tamamlandi ==="
echo "Calistirmak icin: bash run_all.sh"
|