Datasets:
Tasks:
Text Generation
Languages:
English
Size:
n<1K
Tags:
code
notebooks
training-scripts
dataset:Nanthasit/sakthai-kaggle-notebooks
license-mit
dataset-card
License:
Upload sakthai-1.5b-t4.ipynb with huggingface_hub
Browse files- sakthai-1.5b-t4.ipynb +69 -0
sakthai-1.5b-t4.ipynb
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"metadata": {},
|
| 6 |
+
"source": [
|
| 7 |
+
"# SakThai Plus 1.5B v11 - Free T4 Training\n",
|
| 8 |
+
"\n",
|
| 9 |
+
"Runs the same QLoRA+rsLoRA recipe as the HF Job version, but on the **free Kaggle T4 GPU** (30h/week).\n",
|
| 10 |
+
"Dataset: `sakthai-combined-v11` (2,965 rows, bench-aligned tool schemas).\n",
|
| 11 |
+
"\n",
|
| 12 |
+
"**Setup before running:**\n",
|
| 13 |
+
"1. Upload `train-sakthai-1.5b-kaggle.py` to the notebook (Add Input > Upload as file, or paste into a cell with `%%writefile`)\n",
|
| 14 |
+
"2. Add `HF_TOKEN` as a Kaggle Secret (Settings > Add Secret, name `HF_TOKEN`)\n",
|
| 15 |
+
"3. Select Accelerator: `GPU T4 x2` (or T4 x1)\n",
|
| 16 |
+
"4. Run all cells\n",
|
| 17 |
+
"\n",
|
| 18 |
+
"Output: adapter `Nanthasit/sakthai-plus-1.5b-lora` + merged `Nanthasit/sakthai-plus-1.5b`"
|
| 19 |
+
]
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"cell_type": "code",
|
| 23 |
+
"execution_count": null,
|
| 24 |
+
"metadata": {},
|
| 25 |
+
"outputs": [],
|
| 26 |
+
"source": [
|
| 27 |
+
"from kaggle_secrets import UserSecretsClient\n",
|
| 28 |
+
"import os\n",
|
| 29 |
+
"os.environ['HF_TOKEN'] = UserSecretsClient().get_secret('HF_TOKEN')\n",
|
| 30 |
+
"print('HF_TOKEN set:', bool(os.environ['HF_TOKEN']))"
|
| 31 |
+
]
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"cell_type": "code",
|
| 35 |
+
"execution_count": null,
|
| 36 |
+
"metadata": {},
|
| 37 |
+
"outputs": [],
|
| 38 |
+
"source": [
|
| 39 |
+
"!pip install -q transformers trl peft datasets accelerate bitsandbytes huggingface_hub\n",
|
| 40 |
+
"!pip show trl | head -1"
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"cell_type": "code",
|
| 45 |
+
"execution_count": null,
|
| 46 |
+
"metadata": {},
|
| 47 |
+
"outputs": [],
|
| 48 |
+
"source": [
|
| 49 |
+
"!python train-sakthai-1.5b-kaggle.py"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
],
|
| 53 |
+
"metadata": {
|
| 54 |
+
"accelerator": "GPU",
|
| 55 |
+
"colab": {"provenance": []},
|
| 56 |
+
"kaggle": {
|
| 57 |
+
"accelerator": "GPU T4 x2",
|
| 58 |
+
"dataSources": [],
|
| 59 |
+
"kernelType": "Notebook",
|
| 60 |
+
"language": "python"
|
| 61 |
+
},
|
| 62 |
+
"language_info": {
|
| 63 |
+
"name": "python",
|
| 64 |
+
"version": "3.11"
|
| 65 |
+
}
|
| 66 |
+
},
|
| 67 |
+
"nbformat": 4,
|
| 68 |
+
"nbformat_minor": 0
|
| 69 |
+
}
|