{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Finetune DeepSeek Coder 1.3B for NBA Kaggle Database SQLite Generation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "import pandas as pd\n", "import torch\n", "from datasets import Dataset\n", "from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments, Trainer, BitsAndBytesConfig, EarlyStoppingCallback, PreTrainedTokenizer\n", "from torch.utils.data import DataLoader\n", "import sys\n", "from peft import LoraConfig, get_peft_model, TaskType\n", "from huggingface_hub import snapshot_download\n", "import os\n", "import re\n", "import contextlib #helps make pip silent\n", "import sys\n", "import os\n", "import numpy as np\n", "with contextlib.redirect_stdout(sys.__stdout__), contextlib.redirect_stderr(sys.__stderr__):\n", " %pip install datasets" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "is_google_colab = False\n", "use_bnb = True" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'is_google_colab' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "Cell \u001b[0;32mIn[3], line 10\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mwrite_path\u001b[39m(rel_path):\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m os\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mjoin(current_write_path, rel_path)\n\u001b[0;32m---> 10\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_google_colab:\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mgoogle\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcolab\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m drive\n\u001b[1;32m 12\u001b[0m drive\u001b[38;5;241m.\u001b[39mmount(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m/content/drive\u001b[39m\u001b[38;5;124m'\u001b[39m)\n", "\u001b[0;31mNameError\u001b[0m: name 'is_google_colab' is not defined" ] } ], "source": [ "current_read_path = \"./\"\n", "current_write_path = \"./\"\n", "\n", "def read_path(rel_path):\n", " return os.path.join(current_read_path, rel_path)\n", "\n", "def write_path(rel_path):\n", " return os.path.join(current_write_path, rel_path)\n", "\n", "if is_google_colab:\n", " from google.colab import drive\n", " drive.mount('/content/drive')\n", " current_write_path = \"/content/drive/MyDrive/sql_gen\"\n", "\n", " hugging_face_path = snapshot_download(\n", " repo_id=\"USC-Applied-NLP-Group/SQL-Generation\",\n", " repo_type=\"model\",\n", " allow_patterns=[\"train-data/*\", \"deepseek-coder-1.3b-instruct/*\"], \n", " )\n", " sys.path.append(hugging_face_path)\n", " current_read_path = hugging_face_path" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## First define prompt" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "9035\n" ] } ], "source": [ "from src.prompts.prompt import input_text as input_prompt\n", "\n", "print(len(input_prompt))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load data and convert to Dataset object tokenized by the DeepSeek model" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/g0/47tr69v179dg7w6zyphp9b280000gn/T/ipykernel_35112/48906000.py:8: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.\n", " df = df.applymap(lambda x: re.sub(r'\\s+', ' ', x) if isinstance(x, str) else x)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Total dataset examples: 1044\n", " natural_query \\\n", "0 Which NBA teams were established after the yea... \n", "1 What is the most points the Los Angeles Lakers... \n", "2 What is the second-highest number of points th... \n", "3 How many home games did the Golden State Warri... \n", "4 What is the average number of assists by the B... \n", "\n", " sql_query result \n", "0 SELECT full_name FROM team WHERE year_founded ... New Orleans Pelicans \n", "1 SELECT MAX(pts_home) FROM game WHERE team_name... 162 \n", "2 SELECT pts_home FROM game WHERE team_name_home... 156 \n", "3 SELECT COUNT(*) FROM game WHERE team_abbreviat... 29 \n", "4 SELECT AVG(ast_home) FROM game WHERE team_abbr... 26.51355662 \n", "adding!\n", "32022\n", "32023\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Map: 100%|██████████| 1044/1044 [00:17<00:00, 59.19 examples/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "939\n", "105\n", "{'input_ids': [32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32014, 32013, 2042, 417, 274, 20926, 20391, 344, 6145, 1267, 3881, 4694, 12780, 878, 4629, 5975, 547, 12780, 13, 185, 14108, 11593, 732, 285, 2066, 11767, 715, 185, 185, 21598, 6922, 185, 50, 577, 379, 1748, 782, 461, 8443, 9474, 13, 185, 13403, 11866, 15787, 5787, 7449, 30862, 440, 21598, 1, 334, 185, 207, 440, 304, 1, 323, 13532, 24590, 14356, 11, 730, 1585, 1198, 2710, 21411, 327, 254, 2547, 185, 207, 440, 9875, 62, 1523, 1, 323, 13532, 11, 3137, 1585, 11417, 6270, 1208, 280, 254, 2547, 334, 68, 13, 70, 1787, 440, 43, 378, 14204, 412, 9961, 2456, 185, 207, 440, 356, 26321, 335, 1, 323, 13532, 11, 436, 1585, 15545, 2942, 2547, 1208, 334, 68, 13, 70, 1787, 440, 43, 1743, 2456, 185, 207, 440, 77, 767, 1523, 1, 323, 13532, 11, 655, 1585, 15389, 326, 1219, 25229, 1523, 327, 254, 2547, 334, 68, 13, 70, 1787, 440, 43, 9961, 2456, 185, 207, 440, 23861, 1, 323, 13532, 11, 1044, 1585, 5174, 1064, 254, 2547, 317, 2842, 185, 207, 440, 4968, 1, 323, 13532, 11, 4885, 1585, 4734, 1064, 254, 2547, 317, 6288, 185, 207, 440, 5456, 62, 10246, 271, 1, 5878, 1743, 294, 1585, 10971, 254, 2547, 438, 8143, 185, 477, 185, 185, 14641, 6922, 185, 29133, 9339, 13024, 327, 1317, 461, 8443, 2612, 11, 2837, 1712, 285, 2292, 2547, 3779, 13, 185, 13403, 11866, 15787, 5787, 7449, 30862, 440, 14641, 1, 334, 185, 207, 440, 21810, 62, 304, 1, 323, 13532, 11, 655, 1585, 23825, 21411, 11, 31131, 372, 440, 17, 19393, 19393, 1, 334, 68, 13, 70, 1787, 440, 17, 16, 24, 22, 15, 1, 327, 254, 207, 16, 24, 22, 15, 4314, 8, 185, 207, 440, 21598, 62, 304, 62, 5816, 1, 323, 13532, 11, 294, 1585, 4982, 280, 254, 1712, 2547, 334, 3101, 3238, 440, 304, 1, 279, 2547, 2365, 8, 185, 207, 440, 21598, 62, 356, 26321, 335, 62, 5816, 1, 323, 13532, 11, 1585, 4196, 26321, 335, 280, 254, 1712, 2547, 185, 207, 440, 21598, 62, 1523, 62, 5816, 1, 323, 13532, 11, 1032, 1585, 11417, 1208, 280, 254, 1712, 2547, 185, 207, 440, 14641, 62, 304, 1, 323, 13532, 24590, 14356, 11, 207, 1585, 1198, 2710, 21411, 327, 254, 2612, 185, 207, 440, 14641, 62, 1984, 1, 323, 10920, 1428, 17483, 11, 1032, 1585, 9312, 254, 2612, 438, 7226, 334, 19393, 19393, 12, 8213, 12, 7127, 4797, 8, 185, 207, 440, 10108, 393, 62, 5816, 1, 323, 13532, 11, 294, 1585, 23772, 393, 4283, 2837, 25999, 334, 68, 13, 70, 1787, 440, 43, 1743, 7617, 13, 380, 2951, 2456, 185, 207, 440, 13443, 62, 5816, 1, 323, 13532, 11, 3462, 1585, 440, 54, 1, 562, 254, 1712, 2547, 2103, 11, 440, 43, 1, 562, 653, 4726, 185, 207, 440, 1513, 1, 3379, 4463, 18924, 11, 4885, 1585, 19090, 4054, 7226, 279, 254, 2612, 185, 207, 440, 17982, 76, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 11739, 9054, 1396, 457, 254, 1712, 2547, 185, 207, 440, 69, 2417, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 11739, 9054, 18012, 457, 254, 1712, 2547, 185, 207, 440, 17982, 62, 79, 296, 62, 5816, 1, 5878, 1743, 11, 1574, 1585, 11739, 6206, 14986, 280, 254, 1712, 2547, 185, 207, 440, 17982, 18, 76, 62, 5816, 1, 5878, 1743, 11, 655, 1585, 14910, 12, 3772, 2010, 9054, 1396, 457, 254, 1712, 2547, 185, 207, 440, 17982, 18, 64, 62, 5816, 1, 5878, 1743, 11, 655, 1585, 14910, 12, 3772, 15343, 457, 254, 1712, 2547, 185, 207, 440, 17982, 18, 62, 79, 296, 62, 5816, 1, 5878, 1743, 11, 294, 1585, 14910, 12, 3772, 2010, 6206, 14986, 280, 254, 1712, 2547, 185, 207, 440, 659, 76, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 7264, 8474, 1396, 457, 254, 1712, 2547, 185, 207, 440, 659, 64, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 7264, 8474, 18012, 457, 254, 1712, 2547, 185, 207, 440, 659, 62, 79, 296, 62, 5816, 1, 5878, 1743, 11, 1574, 1585, 7264, 5245, 14986, 280, 254, 1712, 2547, 185, 207, 440, 419, 65, 62, 5816, 1, 5878, 1743, 11, 655, 1585, 6050, 4630, 11435, 5740, 457, 254, 1712, 2547, 185, 207, 440, 67, 248, 65, 62, 5816, 1, 5878, 1743, 11, 655, 1585, 5855, 4630, 11435, 5740, 457, 254, 1712, 2547, 185, 207, 440, 248, 65, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 19090, 11435, 5740, 457, 254, 1712, 2547, 185, 207, 440, 537, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 3512, 1923, 457, 254, 1712, 2547, 185, 207, 440, 292, 75, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 3725, 909, 457, 254, 1712, 2547, 185, 207, 440, 1638, 74, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 380, 19722, 457, 254, 1712, 2547, 185, 207, 440, 577, 85, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 13974, 17396, 457, 254, 1712, 2547, 185, 207, 440, 26862, 62, 5816, 1, 5878, 1743, 11, 3462, 1585, 20414, 3931, 2724, 457, 254, 1712, 2547, 185, 207, 440, 462, 82, 62, 5816, 1, 5878, 1743, 11, 2481, 1585, 19090, 3472, 18605, 457, 254, 1712, 2547, 185, 207, 440, 13289, 62, 10646, 62, 5816, 1, 3379, 4463, 18924, 11, 243, 1585, 14751, 14, 10646, 14026, 327, 254, 1712, 2547, 185, 207, 440, 12986, 62, 16647, 62, 5816, 1, 3379, 4463, 18924, 11, 1585, 2325, 278, 980, 3192, 3905, 317, 2315, 334, 16, 405, 7589, 11, 207, 15, 405, 2357, 8, 185, 207, 440, 21598, 62, 304, 62, 11507, 1, 323, 13532, 11, 294, 1585, 4982, 280, 254, 2292, 2547, 185, 207, 440, 21598, 62, 356, 26321, 335, 62, 11507, 1, 323, 13532, 11, 1585, 4196, 26321, 335, 280, 254, 2292, 2547, 185, 207, 440, 21598, 62, 1523, 62, 11507, 1, 323, 13532, 11, 1032, 1585, 11417, 1208, 280, 254, 2292, 2547, 185, 207, 440, 10108, 393, 62, 11507, 1, 323, 13532, 11, 294, 1585, 23772, 393, 4283, 473, 254, 2292, 2547, 486, 82, 12422, 185, 207, 440, 13443, 62, 11507, 1, 323, 13532, 11, 3462, 1585, 440, 54, 1, 562, 254, 2292, 2547, 2103, 11, 440, 43, 1, 562, 653, 4726, 185, 207, 440, 17982, 76, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 11739, 9054, 1396, 457, 254, 2292, 2547, 185, 207, 440, 69, 2417, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 11739, 9054, 18012, 457, 254, 2292, 2547, 185, 207, 440, 17982, 62, 79, 296, 62, 11507, 1, 5878, 1743, 11, 1574, 1585, 11739, 6206, 14986, 280, 254, 2292, 2547, 185, 207, 440, 17982, 18, 76, 62, 11507, 1, 5878, 1743, 11, 655, 1585, 14910, 12, 3772, 2010, 9054, 1396, 457, 254, 2292, 2547, 185, 207, 440, 17982, 18, 64, 62, 11507, 1, 5878, 1743, 11, 655, 1585, 14910, 12, 3772, 15343, 457, 254, 2292, 2547, 185, 207, 440, 17982, 18, 62, 79, 296, 62, 11507, 1, 5878, 1743, 11, 294, 1585, 14910, 12, 3772, 2010, 6206, 14986, 280, 254, 2292, 2547, 185, 207, 440, 659, 76, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 7264, 8474, 1396, 457, 254, 2292, 2547, 185, 207, 440, 659, 64, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 7264, 8474, 18012, 457, 254, 2292, 2547, 185, 207, 440, 659, 62, 79, 296, 62, 11507, 1, 5878, 1743, 11, 1574, 1585, 7264, 5245, 14986, 280, 254, 2292, 2547, 185, 207, 440, 419, 65, 62, 11507, 1, 5878, 1743, 11, 655, 1585, 6050, 4630, 11435, 5740, 457, 254, 2292, 2547, 185, 207, 440, 67, 248, 65, 62, 11507, 1, 5878, 1743, 11, 655, 1585, 5855, 4630, 11435, 5740, 457, 254, 2292, 2547, 185, 207, 440, 248, 65, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 19090, 11435, 5740, 457, 254, 2292, 2547, 185, 207, 440, 537, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 3512, 1923, 457, 254, 2292, 2547, 185, 207, 440, 292, 75, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 3725, 909, 457, 254, 2292, 2547, 185, 207, 440, 1638, 74, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 380, 19722, 457, 254, 2292, 2547, 185, 207, 440, 577, 85, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 13974, 17396, 457, 254, 2292, 2547, 185, 207, 440, 26862, 62, 11507, 1, 5878, 1743, 11, 3462, 1585, 20414, 3931, 2724, 457, 254, 2292, 2547, 185, 207, 440, 462, 82, 62, 11507, 1, 5878, 1743, 11, 2481, 1585, 19090, 3472, 18605, 457, 254, 2292, 2547, 185, 207, 440, 13289, 62, 10646, 62, 11507, 1, 3379, 4463, 18924, 11, 243, 1585, 14751, 14, 10646, 14026, 327, 254, 2292, 2547, 185, 207, 440, 12986, 62, 16647, 62, 11507, 1, 3379, 4463, 18924, 11, 1585, 2325, 278, 980, 3192, 3905, 317, 2315, 334, 16, 405, 7589, 11, 207, 15, 405, 2357, 8, 185, 207, 440, 21810, 62, 2139, 1, 323, 13532, 3137, 1585, 3980, 996, 4314, 409, 1530, 23836, 185, 477, 185, 185, 1156, 62, 16204, 6922, 185, 50, 577, 379, 4577, 13024, 11, 12144, 276, 254, 2612, 2365, 3752, 2612, 62, 304, 13, 185, 13403, 11866, 15787, 5787, 7449, 30862, 440, 1156, 62, 16204, 1, 334, 185, 207, 440, 14641, 62, 304, 1, 323, 13532, 11, 2481, 1585, 1198, 2710, 2612, 21411, 11, 12050, 1975, 3812, 473, 2612, 2365, 185, 207, 440, 275, 6006, 62, 304, 1, 323, 13532, 11, 3137, 1585, 13040, 21411, 185, 207, 440, 21598, 62, 304, 62, 5816, 1, 323, 13532, 11, 436, 1585, 7161, 2547, 21411, 185, 207, 440, 21598, 62, 356, 26321, 335, 62, 5816, 1, 323, 13532, 11, 1585, 7161, 2547, 31593, 335, 185, 207, 440, 21598, 62, 23861, 62, 5816, 1, 323, 13532, 11, 730, 1585, 7161, 2547, 3775, 185, 207, 440, 462, 82, 62, 79, 2994, 62, 5816, 1, 3379, 4463, 18924, 11, 243, 1585, 11119, 82, 279, 254, 7416, 457, 254, 1712, 2547, 185, 207, 440, 462, 82, 62, 17, 425, 62, 358, 645, 62, 5816, 1, 3379, 4463, 18924, 11, 1585, 11419, 5504, 3472, 457, 254, 1712, 2547, 185, 207, 440, 462, 82, 62, 19837, 62, 5816, 1, 3379, 4463, 18924, 11, 730, 1585, 19654, 2963, 3472, 457, 254, 1712, 2547, 185, 207, 440, 17819, 370, 62, 30953, 62, 5816, 1, 3379, 4463, 18924, 5200, 412, 1139, 370, 2012, 457, 254, 1712, 2547, 185, 207, 440, 30953, 62, 22054, 1, 3379, 4463, 18924, 11, 251, 1585, 11988, 280, 2012, 4177, 207, 185, 207, 440, 2969, 62, 83, 1050, 1, 3379, 4463, 18924, 11, 1032, 1585, 11988, 280, 2591, 254, 8129, 438, 16538, 185, 207, 440, 21598, 62, 788, 17396, 62, 5816, 1, 3379, 4463, 18924, 11, 1585, 7161, 2547, 1936, 17396, 185, 207, 440, 11695, 62, 788, 17396, 62, 5816, 1, 3379, 4463, 18924, 11, 1585, 19090, 1936, 17396, 457, 254, 1712, 2547, 185, 207, 440, 21598, 62, 248, 65, 5740, 62, 5816, 1, 3379, 4463, 18924, 11, 1585, 7161, 2547, 11435, 5740, 185, 207, 440, 462, 82, 62, 2959, 62, 577, 62, 5816, 1, 3379, 4463, 18924, 11, 207, 1585, 11119, 82, 838, 1936, 17396, 457, 254, 1712, 2547, 185, 207, 440, 21598, 62, 304, 62, 11507, 1, 323, 13532, 11, 436, 1585, 338, 1406, 2547, 21411, 185, 207, 440, 21598, 62, 356, 26321, 335, 62, 11507, 1, 323, 13532, 11, 207, 1585, 338, 1406, 2547, 31593, 335, 185, 207, 440, 462, 82, 62, 79, 2994, 62, 11507, 1, 3379, 4463, 18924, 11, 243, 1585, 11119, 82, 279, 254, 7416, 457, 254, 2292, 2547, 185, 207, 440, 462, 82, 62, 17, 425, 62, 358, 645, 62, 11507, 1, 3379, 4463, 18924, 11, 1585, 11419, 5504, 3472, 457, 254, 2292, 2547, 185, 207, 440, 462, 82, 62, 19837, 62, 11507, 1, 3379, 4463, 18924, 11, 730, 1585, 19654, 2963, 3472, 457, 254, 2292, 2547, 185, 207, 440, 17819, 370, 62, 30953, 62, 11507, 1, 3379, 4463, 18924, 5200, 412, 1139, 370, 2012, 457, 254, 2292, 2547, 185, 207, 440, 21598, 62, 788, 17396, 62, 11507, 1, 3379, 4463, 18924, 11, 1585, 338, 1406, 2547, 1936, 17396, 185, 207, 440, 11695, 62, 788, 17396, 62, 11507, 1, 3379, 4463, 18924, 11, 1585, 19090, 1936, 17396, 457, 254, 2292, 2547, 185, 207, 440, 21598, 62, 248, 65, 5740, 62, 11507, 1, 3379, 4463, 18924, 11, 1585, 338, 1406, 2547, 11435, 5740, 185, 207, 440, 462, 82, 62, 2959, 62, 577, 62, 11507, 1, 3379, 4463, 18924, 243, 1585, 11119, 82, 838, 1936, 17396, 457, 254, 2292, 2547, 185, 477, 185, 185, 185, 28440, 9715, 9843, 185, 769, 254, 8803, 818, 2664, 4301, 11, 885, 254, 2192, 2547, 4761, 540, 330, 1219, 11, 545, 279, 254, 12780, 340, 970, 931, 254, 2192, 2547, 4761, 409, 254, 31593, 715, 13, 207, 185, 546, 2192, 2547, 4761, 482, 330, 1219, 365, 254, 2612, 2365, 11, 1470, 254, 31593, 715, 1020, 330, 1219, 365, 254, 746, 62, 16204, 2365, 13, 185, 27298, 653, 417, 14843, 457, 254, 939, 3188, 279, 254, 1884, 1517, 25, 185, 185, 3554, 75, 9568, 12499, 705, 91, 1392, 43, 185, 33, 11885, 339, 3467, 959, 91, 33, 2951, 185, 34, 28412, 339, 22281, 4961, 91, 34, 1535, 185, 4843, 24270, 19871, 9017, 91, 45, 5080, 185, 1915, 10595, 21915, 82, 91, 3388, 40, 185, 35, 20315, 6658, 329, 6388, 91, 35, 1743, 185, 23559, 329, 461, 905, 16806, 91, 35, 1732, 185, 25884, 255, 4734, 6370, 25546, 91, 11096, 54, 185, 39, 264, 7664, 10602, 1542, 91, 11317, 52, 185, 43, 378, 14204, 1854, 515, 6474, 91, 43, 2585, 185, 43, 378, 14204, 412, 9961, 91, 43, 1743, 185, 44, 20452, 31410, 91, 44, 7183, 185, 26389, 86, 1766, 25032, 380, 14450, 91, 44, 4470, 185, 7729, 21603, 10389, 696, 86, 313, 1596, 91, 19293, 185, 22120, 541, 18679, 461, 1542, 91, 33, 42, 45, 185, 4843, 4420, 716, 5072, 705, 91, 25399, 42, 185, 3161, 30075, 24247, 91, 1692, 43, 185, 3283, 4659, 12167, 407, 91, 13547, 185, 24374, 19362, 207, 22, 21, 407, 91, 11914, 40, 185, 47, 1389, 23218, 324, 4103, 91, 11914, 55, 185, 9915, 1561, 27258, 380, 1419, 89, 407, 91, 47, 1692, 185, 50, 19524, 28899, 23646, 91, 50, 2585, 185, 23920, 16924, 2566, 2750, 91, 50, 3146, 185, 17917, 25062, 5174, 24022, 91, 9516, 34, 185, 25869, 16466, 432, 1870, 710, 91, 51, 1692, 185, 52, 23667, 565, 10534, 91, 3219, 32, 185, 44, 4522, 262, 452, 368, 4877, 9123, 91, 30695, 185, 54, 7599, 422, 529, 2539, 91, 54, 3146, 185, 7983, 22852, 375, 382, 875, 91, 35, 2421, 185, 8061, 23106, 31538, 1542, 91, 3388, 32, 185, 185, 5995, 2881, 15143, 185, 9138, 2547, 62, 1523, 62, 5816, 285, 2547, 62, 1523, 62, 11507, 276, 4168, 9474, 276, 254, 2612, 2365, 13, 7310, 2547, 62, 356, 26321, 335, 62, 5816, 285, 2547, 62, 356, 26321, 335, 2292, 276, 4168, 9474, 276, 254, 746, 62, 16204, 2365, 13, 185, 185, 1889, 6226, 457, 4314, 11, 931, 4314, 62, 304, 405, 651, 17, 19393, 19393, 6683, 185, 185, 15013, 25, 2147, 748, 13024, 473, 207, 17, 15, 15, 20, 11, 931, 245, 6158, 833, 25, 4314, 62, 304, 405, 651, 17, 17, 15, 15, 20, 6683, 2147, 748, 13024, 473, 207, 16, 24, 22, 17, 11, 931, 245, 6158, 833, 25, 4314, 62, 304, 405, 440, 17, 16, 24, 22, 17, 2770, 2147, 748, 13024, 473, 207, 17, 15, 16, 20, 11, 931, 245, 6158, 833, 25, 4314, 62, 304, 405, 440, 17, 17, 15, 16, 20, 2770, 185, 185, 2269, 18912, 12780, 967, 7688, 10115, 285, 4934, 20976, 29980, 13, 185, 185, 15013, 10481, 10413, 6074, 285, 5975, 547, 3130, 7486, 185, 4397, 25, 185, 1, 2628, 317, 254, 1093, 3472, 254, 10851, 14204, 412, 9961, 463, 2634, 18605, 429, 1712, 1956, 185, 6231, 547, 25, 185, 7507, 21234, 7, 462, 82, 62, 5816, 8, 7432, 2612, 11294, 2547, 62, 1523, 62, 5816, 405, 651, 43, 378, 14204, 412, 9961, 4057, 185, 185, 4397, 25, 185, 1, 15575, 9474, 417, 6288, 279, 254, 1967, 280, 8700, 1956, 185, 6231, 547, 25, 185, 7507, 2192, 62, 1523, 7432, 2547, 11294, 1967, 405, 651, 9517, 351, 8092, 4057, 185, 185, 4397, 25, 185, 1, 15575, 2547, 658, 254, 7495, 1594, 280, 2547, 1936, 17396, 279, 274, 2292, 2612, 1956, 185, 6231, 547, 25, 185, 7507, 2547, 62, 356, 26321, 335, 62, 11507, 7432, 746, 62, 16204, 25554, 9784, 2547, 62, 788, 17396, 62, 11507, 22187, 34, 29731, 207, 16, 26, 185, 185, 4397, 25, 185, 1, 15575, 9474, 773, 16316, 1321, 207, 16, 24, 22, 24, 1956, 185, 6231, 547, 25, 185, 7507, 2192, 62, 1523, 7432, 2547, 11294, 1008, 62, 10246, 271, 8086, 16, 24, 22, 24, 26, 185, 185, 4397, 25, 185, 1, 13000, 254, 13164, 339, 3467, 959, 8402, 1712, 14009, 7037, 279, 254, 207, 17, 15, 15, 23, 4314, 876, 185, 6231, 547, 25, 185, 7507, 21234, 7, 462, 82, 62, 5816, 567, 265, 1267, 62, 11507, 8, 4958, 10919, 62, 7541, 7432, 2612, 11294, 2547, 62, 1523, 62, 5816, 405, 651, 33, 11885, 339, 3467, 959, 6, 5584, 4314, 62, 304, 405, 651, 17, 17, 15, 15, 23, 4057, 185, 185, 7605, 387, 885, 254, 5975, 547, 5151, 3651, 3250, 457, 5975, 547, 25, 285, 637, 746, 2422, 11, 533, 441, 2816, 274, 11543, 280, 254, 5151, 13, 4195, 8297, 274, 5975, 547, 5151, 327, 254, 1884, 2664, 3092, 13, 17858, 25, 185, 2808, 1311, 3212, 3472, 1213, 254, 11738, 21915, 82, 8129, 2310, 254, 207, 16, 24, 24, 21, 4314, 30, 185, 6231, 547, 25, 185, 7507, 20861, 7, 462, 82, 8, 4958, 3212, 62, 12168, 7432, 334, 11789, 265, 1267, 62, 5816, 4958, 265, 1267, 7432, 2612, 11294, 2547, 62, 356, 26321, 335, 62, 5816, 405, 651, 3388, 40, 6, 5584, 4314, 62, 304, 405, 651, 17, 16, 24, 24, 21, 6, 8763, 2738, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'labels': [-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, 62, 16204, 25554, 9784, 2547, 62, 788, 17396, 62, 11507, 22187, 34, 29731, 207, 16, 26, 185, 185, 4397, 25, 185, 1, 15575, 9474, 773, 16316, 1321, 207, 16, 24, 22, 24, 1956, 185, 6231, 547, 25, 185, 7507, 2192, 62, 1523, 7432, 2547, 11294, 1008, 62, 10246, 271, 8086, 16, 24, 22, 24, 26, 185, 185, 4397, 25, 185, 1, 13000, 254, 13164, 339, 3467, 959, 8402, 1712, 14009, 7037, 279, 254, 207, 17, 15, 15, 23, 4314, 876, 185, 6231, 547, 25, 185, 7507, 21234, 7, 462, 82, 62, 5816, 567, 265, 1267, 62, 11507, 8, 4958, 10919, 62, 7541, 7432, 2612, 11294, 2547, 62, 1523, 62, 5816, 405, 651, 33, 11885, 339, 3467, 959, 6, 5584, 4314, 62, 304, 405, 651, 17, 17, 15, 15, 23, 4057, 185, 185, 7605, 387, 885, 254, 5975, 547, 5151, 3651, 3250, 457, 5975, 547, 25, 285, 637, 746, 2422, 11, 533, 441, 2816, 274, 11543, 280, 254, 5151, 13, 4195, 8297, 274, 5975, 547, 5151, 327, 254, 1884, 2664, 3092, 13, 17858, 25, 185, 2808, 1311, 3212, 3472, 1213, 254, 11738, 21915, 82, 8129, 2310, 254, 207, 16, 24, 24, 21, 4314, 30, 185, 6231, 547, 25, 185, 7507, 20861, 7, 462, 82, 8, 4958, 3212, 62, 12168, 7432, 334, 11789, 265, 1267, 62, 5816, 4958, 265, 1267, 7432, 2612, 11294, 2547, 62, 356, 26321, 335, 62, 5816, 405, 651, 3388, 40, 6, 5584, 4314, 62, 304, 405, 651, 17, 16, 24, 24, 21, 6, 8763, 2738, 14177, 11789, 265, 1267, 62, 11507, 4958, 265, 1267, 7432, 2612, 11294, 2547, 62, 356, 26321, 335, 62, 11507, 405, 651, 3388, 40, 6, 5584, 4314, 62, 304, 405, 651, 17, 16, 24, 24, 21, 6, 4363, 32022]}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "\n", "\n", "# Model output directories\n", "MODEL_DIR = write_path(\"fine-tuned-model-16-test\")\n", "VAL_OUTPUT = write_path(\"val-16.hf\")\n", "\n", "# Load dataset\n", "df = pd.read_csv(read_path(\"train-data/sql_train.tsv\"), sep='\\t')\n", "\n", "df = df.applymap(lambda x: re.sub(r'\\s+', ' ', x) if isinstance(x, str) else x)\n", "\n", "# Display dataset info\n", "print(f\"Total dataset examples: {len(df)}\")\n", "print(df.head())\n", "\n", "# Load tokenizer\n", "model_name = read_path(\"deepseek-coder-1.3b-instruct\")\n", "tokenizer = AutoTokenizer.from_pretrained(model_name)\n", "\n", "# Enable 8-bit quantization for lower memory usage\n", "bnb_config = None\n", "if use_bnb:\n", " bnb_config = BitsAndBytesConfig(\n", " load_in_8bit=True, \n", " bnb_8bit_compute_dtype=torch.float16\n", " )\n", "\n", "# Load model with quantization\n", "#device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n", "device_name = 'cuda' if torch.cuda.is_available() else 'cpu'\n", "device = torch.device(device_name)\n", "model = AutoModelForCausalLM.from_pretrained(\n", " model_name, \n", " quantization_config=bnb_config,\n", " device_map=device\n", ")\n", "\n", "# Add a custom stop token (can be anything that won’t show up in your data)\n", "special_token = \"<|endofsql|>\"\n", "\n", "# Only add if it doesn’t already exist\n", "#if special_token not in tokenizer.get_vocab():\n", "print(\"adding!\")\n", "print(len(tokenizer))\n", "tokenizer.add_special_tokens({\"additional_special_tokens\": [special_token]})\n", "tokenizer.eos_token = special_token\n", "model.resize_token_embeddings(len(tokenizer))\n", "print(len(tokenizer)) \n", "\n", "tokenizer.truncation_side = \"left\"\n", "\n", "def format_deepseek_chat(example, tokenizer, special_token=\"<|endofsql|>\"):\n", " # Manually build the prompt as one flat string\n", " prompt = f\"{input_prompt}{example['natural_query']}\\n\"\n", " completion = f\"SQLite:\\n{example['sql_query']}{special_token}\"\n", "\n", " full_text = prompt + completion\n", " tokenized = tokenizer(\n", " full_text,\n", " truncation=True,\n", " padding=\"max_length\",\n", " max_length=3156, # or whatever your model can handle\n", " )\n", "\n", " # Mask out prompt tokens in the labels\n", " prompt_len = len(tokenizer(prompt, truncation=True)[\"input_ids\"])\n", " labels = tokenized[\"input_ids\"][:]\n", " labels[:prompt_len] = [-100] * prompt_len\n", " tokenized[\"labels\"] = labels\n", "\n", " return tokenized\n", "\n", "# Build dataset dict\n", "dataset_dict = {\n", " \"natural_query\": df[\"natural_query\"].tolist(),\n", " \"sql_query\": df[\"sql_query\"].tolist(),\n", "}\n", "\n", "# Create HuggingFace Dataset\n", "dataset = Dataset.from_dict(dataset_dict)\n", "\n", "# Apply formatting\n", "tokenized_dataset = dataset.map(\n", " lambda x: format_deepseek_chat(x, tokenizer),\n", " remove_columns=[\"natural_query\", \"sql_query\"]\n", ")\n", "\n", "# Split into train/validation\n", "split = int(0.9 * len(tokenized_dataset)) # 90% train, 10% validation\n", "train_dataset = tokenized_dataset.select(range(split))\n", "val_dataset = tokenized_dataset.select(range(split, len(tokenized_dataset)))\n", "\n", "print(len(train_dataset))\n", "print(len(val_dataset))\n", "\n", "for v in val_dataset:\n", " print(v)\n", " break" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load model and define training arguments" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "trainable params: 14,991,360 || all params: 1,360,508,928 || trainable%: 1.1019\n" ] } ], "source": [ "# Define LoRA configuration\n", "lora_config = LoraConfig(\n", " r=16, # Rank of LoRA matrices (adjust for memory vs. accuracy)\n", " lora_alpha=32, # Scaling factor\n", " lora_dropout=0.0, # Dropout for regularization\n", " bias=\"none\",\n", " task_type=TaskType.CAUSAL_LM,\n", " target_modules=[\n", " \"q_proj\",\n", " \"k_proj\",\n", " \"v_proj\",\n", " \"o_proj\",\n", " \"gate_proj\",\n", " \"up_proj\",\n", " \"down_proj\"\n", " ]\n", ")\n", "\n", "# Wrap model with LoRA adapters\n", "model = get_peft_model(model, lora_config)\n", "model = model.to(device)\n", "model.print_trainable_parameters() # Show trainable parameters count" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Setup model trainer" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\Dean\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\transformers\\training_args.py:1611: FutureWarning: `evaluation_strategy` is deprecated and will be removed in version 4.46 of 🤗 Transformers. Use `eval_strategy` instead\n", " warnings.warn(\n", "C:\\Users\\Dean\\AppData\\Local\\Temp\\ipykernel_6496\\510577166.py:21: FutureWarning: `tokenizer` is deprecated and will be removed in version 5.0.0 for `Trainer.__init__`. Use `processing_class` instead.\n", " trainer = Trainer(\n", "No label_names provided for model class `PeftModelForCausalLM`. Since `PeftModel` hides base models input arguments, if label_names is not given, label_names can't be set automatically within `Trainer`. Note that empty label_names list will be used instead.\n" ] } ], "source": [ "training_args = TrainingArguments(\n", " output_dir=MODEL_DIR,\n", " evaluation_strategy=\"epoch\", # Evaluate at the end of each epoch\n", " save_strategy=\"epoch\", # Save model every epoch\n", " per_device_train_batch_size=1, # LoRA allows higher batch size\n", " per_device_eval_batch_size=1,\n", " gradient_accumulation_steps=16,\n", " num_train_epochs=10, # Increase if needed\n", " learning_rate=5e-5, # Higher LR since we're only training LoRA layers\n", " weight_decay=0.001,\n", " logging_steps=50, # Print loss every 50 steps\n", " save_total_limit=2, # Keep last 4 checkpoints\n", " bf16=True if torch.cuda.is_available() else False,\n", " push_to_hub=False,\n", " load_best_model_at_end=True,\n", " metric_for_best_model=\"eval_loss\",\n", " greater_is_better=False\n", ")\n", "\n", "# Trainer setup\n", "trainer = Trainer(\n", " model=model,\n", " args=training_args,\n", " train_dataset=train_dataset,\n", " eval_dataset=val_dataset,\n", " tokenizer=tokenizer,\n", " callbacks=[EarlyStoppingCallback(early_stopping_patience=2)]\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run fine-tuning and save model weights when complete" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\Dean\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\transformers\\integrations\\sdpa_attention.py:54: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\\actions-runner\\_work\\pytorch\\pytorch\\builder\\windows\\pytorch\\aten\\src\\ATen\\native\\transformers\\cuda\\sdp_utils.cpp:555.)\n", " attn_output = torch.nn.functional.scaled_dot_product_attention(\n", "c:\\Users\\Dean\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\bitsandbytes\\autograd\\_functions.py:315: UserWarning: MatMul8bitLt: inputs will be cast from torch.bfloat16 to float16 during quantization\n", " warnings.warn(f\"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization\")\n", "c:\\Users\\Dean\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\bitsandbytes\\autograd\\_functions.py:315: UserWarning: MatMul8bitLt: inputs will be cast from torch.float32 to float16 during quantization\n", " warnings.warn(f\"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization\")\n" ] }, { "data": { "text/html": [ "\n", "
Epoch | \n", "Training Loss | \n", "Validation Loss | \n", "
---|---|---|
1 | \n", "0.516300 | \n", "0.173060 | \n", "
2 | \n", "0.165600 | \n", "0.150385 | \n", "
3 | \n", "0.133000 | \n", "0.145320 | \n", "
4 | \n", "0.117900 | \n", "0.140578 | \n", "
5 | \n", "0.104100 | \n", "0.137178 | \n", "
6 | \n", "0.087700 | \n", "0.137124 | \n", "
7 | \n", "0.078700 | \n", "0.136369 | \n", "
8 | \n", "0.077300 | \n", "0.139831 | \n", "
9 | \n", "0.072900 | \n", "0.143621 | \n", "
"
],
"text/plain": [
"