muratkarahan's picture
Upload folder using huggingface_hub
1221328 verified
Raw History Blame Contribute Delete
1.25 kB
#!/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"