diff --git a/training/scripts/inference.py b/inference.py similarity index 100% rename from training/scripts/inference.py rename to inference.py diff --git a/training/scripts/prepare_dataset.py b/prepare_dataset.py similarity index 100% rename from training/scripts/prepare_dataset.py rename to prepare_dataset.py diff --git a/train-on-this-server.sh b/train-on-this-server.sh index 6dd219e..1d256f4 100755 --- a/train-on-this-server.sh +++ b/train-on-this-server.sh @@ -20,6 +20,6 @@ pip install transformers datasets trl peft accelerate bitsandbytes deepspeed # Run training echo "Starting training with accelerate..." -accelerate launch --multi_gpu --num_processes 2 training/scripts/train.py --config training/configs/ornith-35b-lora.yaml +accelerate launch --multi_gpu --num_processes 2 train.py --config training/configs/ornith-35b-lora.yaml echo "Training completed!" \ No newline at end of file diff --git a/training/scripts/train.py b/train.py similarity index 97% rename from training/scripts/train.py rename to train.py index bc9b21d..1406b83 100644 --- a/training/scripts/train.py +++ b/train.py @@ -110,8 +110,8 @@ def train(config_path): from datasets import load_dataset import os - # Get dataset paths - go up to project root - repo_root = Path(__file__).parent.parent.parent + # Get dataset paths - training/data/ is relative to project root + repo_root = Path(__file__).parent train_path = str(repo_root / "training" / "data" / "train.jsonl") test_path = str(repo_root / "training" / "data" / "test.jsonl") print(f"Looking for dataset at: {train_path}") @@ -168,7 +168,7 @@ def train(config_path): def main(): parser = argparse.ArgumentParser(description="Train LoRA adapter") - parser.add_argument("--config", type=str, default="training/configs/ornith-35b-lora.yaml", + parser.add_argument("--config", type=str, default="training/configs/ornith-35b-lora.yaml", help="Training configuration file") parser.add_argument("--check-only", action="store_true", help="Validate config and dependencies without training") @@ -206,7 +206,7 @@ def check_setup(config_path): # Check dataset files print("\n3. Dataset files:") - repo_root = Path(__file__).parent.parent.parent # Go up to project root + repo_root = Path(__file__).parent train_path = repo_root / "training" / "data" / "train.jsonl" test_path = repo_root / "training" / "data" / "test.jsonl" diff --git a/training/scripts/run_with_accelerate.sh b/training/scripts/run_with_accelerate.sh deleted file mode 100644 index 64a5b55..0000000 --- a/training/scripts/run_with_accelerate.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Run training with distributed setup - -set -e - -# Install accelerate if not present -pip install -q accelerate - -# Launch with accelerate -# Note: Use the dedicated train-on-this-server.sh instead -echo "See train-on-this-server.sh for full setup"