feat: add deploy-and-train.sh script for server deployment

This commit is contained in:
Christian Medina
2026-06-30 15:02:13 -04:00
parent 418a4cc76d
commit 3d2ae812a7
2 changed files with 135 additions and 18 deletions

View File

@@ -23,25 +23,24 @@ training/
- GPU with 40GB+ VRAM (A100 recommended)
- 64GB+ system RAM
- 100GB+ free disk space
- CUDA drivers installed
## Installation
## Server Deployment (Recommended)
Use the deployment script to clone and train on your GPU server:
```bash
cd scripts/lora_training/training
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install transformers datasets trl peft accelerate bitsandbytes
# Or use conda
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install transformers datasets trl peft accelerate bitsandbytes
# Deploy and train in one command
bash deploy-and-train.sh
```
## Usage
This will:
1. Clone the repo to `/opt/loras/agenx-lora-training`
2. Setup Python environment with CUDA support
3. Prepare the dataset
4. Train the LoRA adapter
## Manual Setup
### 1. Prepare Dataset
@@ -123,7 +122,3 @@ Trained model is saved to `output/llama2-7b-lora/`:
**Generation too long/short:**
- Adjust `max_new_tokens` in inference script
- Tune `temperature` and `top_p`
## License
This training infrastructure is part of the AgenX project.