Files
agenx-lora-training/train-on-this-server.sh

26 lines
760 B
Bash
Executable File

#!/bin/bash
# Training script for Cyron LoRA on this server (2x RTX 5090)
set -e
# Unload AI model to free GPU memory
echo "Unloading AI model..."
ai none
echo "=== Cyron LoRA Training Setup ==="
# Create venv
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
# Install training dependencies (PyTorch already installed)
echo "Installing training dependencies..."
pip install transformers datasets trl peft accelerate bitsandbytes deepspeed
# Run training with single process (model already distributed via device_map)
echo "Starting training (single process, model pre-distributed)..."
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
python train.py --config training/configs/ornith-35b-lora.yaml
echo "Training completed!"