31 lines
927 B
Python
31 lines
927 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Training runner script for unsloth/Qwen3-8B-bnb-4bit model
|
|
Optimized for RTX3070 8GB VRAM
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add src to path
|
|
sys.path.append(str(Path(__file__).parent / "src"))
|
|
|
|
from main import main
|
|
|
|
if __name__ == "__main__":
|
|
# Set environment variables for better CUDA performance with Qwen3
|
|
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
|
|
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:512'
|
|
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
|
|
|
# Use Qwen3 configuration by default
|
|
if '--config' not in sys.argv:
|
|
sys.argv.extend(['--config', 'configs/training_config_qwen3.yaml'])
|
|
|
|
print("🚀 Starting training with unsloth/Qwen3-8B-bnb-4bit model")
|
|
print("📊 Configuration: configs/training_config_qwen3.yaml")
|
|
print("🧠 Memory optimization: RTX3070 8GB mode")
|
|
|
|
# Run the main training application
|
|
main() |