File size: 2,801 Bytes
5e0532d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
    "cells": [
        {
            "cell_type": "markdown",
            "metadata": {
                "id": "introduction"
            },
            "source": [
                "# ORA Fine-tuning on Google Colab\n",
                "This notebook allows you to fine-tune the ORA model using Unsloth and QLoRA for high-performance training on NVIDIA GPUs.\n",
                "\n",
                "## Setup\n",
                "1. Go to **Runtime** > **Change runtime type** and ensure **GPU** (T4 or A100) is selected.\n",
                "2. Run the following cells to install dependencies and load your curated data."
            ]
        },
        {
            "cell_type": "code",
            "execution_count": null,
            "metadata": {
                "id": "install-deps"
            },
            "outputs": [],
            "source": [
                "!pip install unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git\n",
                "!pip install --no-deps \"xformers<0.0.29\" \"trl<0.9.0\" peft accelerate bitsandbytes"
            ]
        },
        {
            "cell_type": "markdown",
            "metadata": {
                "id": "upload-data"
            },
            "source": [
                "## Upload Data\n",
                "Upload the `ora_colab_training.zip` file generated by `scripts/prepare_colab.py`."
            ]
        },
        {
            "cell_type": "code",
            "execution_count": null,
            "metadata": {
                "id": "unzip-data"
            },
            "outputs": [],
            "source": [
                "!unzip ora_colab_training.zip"
            ]
        },
        {
            "cell_type": "markdown",
            "metadata": {
                "id": "training"
            },
            "source": [
                "## Start Training\n",
                "Run the training script."
            ]
        },
        {
            "cell_type": "code",
            "execution_count": null,
            "metadata": {
                "id": "run-training"
            },
            "outputs": [],
            "source": [
                "!python scripts/train_ora.py"
            ]
        }
    ],
    "metadata": {
        "kernelspec": {
            "display_name": "Python 3",
            "language": "python",
            "name": "python3"
        },
        "language_info": {
            "codemirror_mode": {
                "name": "ipython",
                "version": 3
            },
            "file_extension": ".py",
            "mimetype": "text/x-python",
            "name": "python",
            "nbconvert_exporter": "python",
            "pygments_lexer": "ipython3",
            "version": "3.10.12"
        }
    },
    "nbformat": 4,
    "nbformat_minor": 4
}