{ "cells": [ { "cell_type": "code", "execution_count": 49, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 223 }, "id": "SuZd5pi0QpVm", "outputId": "77e8a733-bbe9-4925-cd19-802d2afae079" }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
questionanswer
0What was the Total revenue in 2023?The Total revenue in 2023 was USD 593,036.
1What was the Total revenue in 2023?In 2023, the company reported Total revenue of...
2What was the Total revenue in 2023?Total revenue stood at USD 593,036 in 2023.
3What was the Total revenue in 2023?The company recorded USD 593,036 as Total reve...
4How much was the Total revenue in 2023?The Total revenue in 2023 was USD 593,036.
\n", "
" ], "text/plain": [ " question \\\n", "0 What was the Total revenue in 2023? \n", "1 What was the Total revenue in 2023? \n", "2 What was the Total revenue in 2023? \n", "3 What was the Total revenue in 2023? \n", "4 How much was the Total revenue in 2023? \n", "\n", " answer \n", "0 The Total revenue in 2023 was USD 593,036. \n", "1 In 2023, the company reported Total revenue of... \n", "2 Total revenue stood at USD 593,036 in 2023. \n", "3 The company recorded USD 593,036 as Total reve... \n", "4 The Total revenue in 2023 was USD 593,036. " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import pandas as pd\n", "file_path = r'makemytrip_qa_dataset_mini.json'\n", "try:\n", " df = pd.read_json(file_path)\n", " display(df.head())\n", "except FileNotFoundError:\n", " print(f\"Error: File not found at {file_path}. Please check the path.\")\n", "except Exception as e:\n", " print(f\"An error occurred: {e}\")" ] }, { "cell_type": "markdown", "metadata": { "id": "ac7d498d" }, "source": [ "## Prepare data for fine-tuning\n", "\n", "### Subtask:\n", "Format the questions and answers from the JSON data into a suitable format for fine-tuning the model." ] }, { "cell_type": "markdown", "metadata": { "id": "0ada1848" }, "source": [ "**Reasoning**:\n", "Convert the dataframe into a list of dictionaries, where each dictionary represents a training example with the question and answer formatted as a single text string." ] }, { "cell_type": "code", "execution_count": 50, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "a939598d", "outputId": "5104cec1-c2c9-4e61-ef83-de9f24690d61" }, "outputs": [], "source": [ "# Prepare data for fine-tuning\n", "training_data = []\n", "\n", "# Define a system prompt for your domain\n", "system_prompt = \"You are a helpful assistant that provides financial data from MakeMyTrip reports.\"\n", "\n", "# Correctly format each training example with the chat template\n", "for index, row in df.iterrows():\n", " question = row['question']\n", " answer = row['answer']\n", "\n", " # Format the data using the TinyLlama chat template\n", " training_data.append({\n", " \"text\": f\"<|system|>\\n{system_prompt}\\n<|user|>\\n{question}\\n<|assistant|>\\n{answer}\"\n", " })" ] }, { "cell_type": "code", "execution_count": 51, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 277 }, "id": "Sbe8O5k8bg7-", "outputId": "b92de614-f0c3-4f47-dcdc-63c930dfef1d" }, "outputs": [ { "data": { "text/plain": [ "[{'text': '<|system|>\\nYou are a helpful assistant that provides financial data from MakeMyTrip reports.\\n<|user|>\\nWhat was the Total revenue in 2023?\\n<|assistant|>\\nThe Total revenue in 2023 was USD 593,036.'},\n", " {'text': '<|system|>\\nYou are a helpful assistant that provides financial data from MakeMyTrip reports.\\n<|user|>\\nWhat was the Total revenue in 2023?\\n<|assistant|>\\nIn 2023, the company reported Total revenue of USD 593,036.'},\n", " {'text': '<|system|>\\nYou are a helpful assistant that provides financial data from MakeMyTrip reports.\\n<|user|>\\nWhat was the Total revenue in 2023?\\n<|assistant|>\\nTotal revenue stood at USD 593,036 in 2023.'},\n", " {'text': '<|system|>\\nYou are a helpful assistant that provides financial data from MakeMyTrip reports.\\n<|user|>\\nWhat was the Total revenue in 2023?\\n<|assistant|>\\nThe company recorded USD 593,036 as Total revenue in 2023.'},\n", " {'text': '<|system|>\\nYou are a helpful assistant that provides financial data from MakeMyTrip reports.\\n<|user|>\\nHow much was the Total revenue in 2023?\\n<|assistant|>\\nThe Total revenue in 2023 was USD 593,036.'}]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Display the first few training examples\n", "display(training_data[:5])" ] }, { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8c1663441f6f4212bd433f53e76db9b6", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Map: 0%| | 0/151 [00:00 is ignored in loss\n", " text = example['text']\n", " assistant_index = text.find(\"<|assistant|>\")\n", " \n", " # Convert character index to token index\n", " prefix_ids = tokenizer(text[:assistant_index], add_special_tokens=False)['input_ids']\n", " prefix_len = len(prefix_ids)\n", " \n", " # Prepare labels: -100 for question/system tokens\n", " labels = tokens['input_ids'].copy()\n", " labels[:prefix_len] = [-100] * prefix_len\n", " \n", " tokens['labels'] = labels\n", " return tokens\n", "\n", "dataset = Dataset.from_list(training_data)\n", "tokenized_dataset = dataset.map(preprocess, remove_columns=[\"text\"])" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [], "source": [ "import os\n", "import torch\n", "import math\n", "from torch import nn\n", "from transformers import (\n", " AutoModelForCausalLM,\n", " Trainer,\n", " TrainingArguments,\n", " DataCollatorForLanguageModeling,\n", " BitsAndBytesConfig\n", ")\n", "from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training\n", "\n", "class LoraLinear(nn.Module):\n", " def __init__(self, in_features, out_features, r=8, lora_alpha=16, lora_dropout=0.05, bias=False):\n", " super().__init__()\n", " self.in_features = in_features\n", " self.out_features = out_features\n", " self.r = r\n", " self.scaling = lora_alpha / r if r > 0 else 1.0\n", "\n", " # Base frozen linear layer\n", " self.weight = nn.Parameter(torch.empty(out_features, in_features), requires_grad=False)\n", " self.bias = nn.Parameter(torch.zeros(out_features), requires_grad=False) if bias else None\n", "\n", " if r > 0:\n", " self.lora_A = nn.Parameter(torch.zeros((r, in_features)))\n", " self.lora_B = nn.Parameter(torch.zeros((out_features, r)))\n", " nn.init.kaiming_uniform_(self.lora_A, a=math.sqrt(5))\n", " nn.init.zeros_(self.lora_B)\n", " self.lora_dropout = nn.Dropout(p=lora_dropout)\n", " else:\n", " self.lora_A, self.lora_B, self.lora_dropout = None, None, None\n", "\n", " def forward(self, x):\n", " # Base forward\n", " result = F.linear(x, self.weight, self.bias)\n", "\n", " # LoRA adaptation\n", " if self.r > 0:\n", " lora_out = self.lora_dropout(x) @ self.lora_A.T @ self.lora_B.T\n", " result = result + self.scaling * lora_out\n", "\n", " return result\n" ] }, { "cell_type": "code", "execution_count": 54, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 744, "referenced_widgets": [ "103a55741c0447b09372dab8cd5baab1", "b24d2bd402724f7d87cb55e6c5df1565", "17320951e1414dd1a32e481f3bf3e1af", "fa06f9a8334c47ca9fdbb7eebdda9841", "5e9123329f9e4bb7bd3fc9b6ada6eb6e", "48d257dc8440486d8cfefb2c45cc31c1", "22fb8fc7d2744fb09b9415eeb3678d3c", "8f841d825d0a4d6faae3f4ec5f3186e9", "83ebe67ef39d4065a5d17a8a6edb9917", "7f432508a76d41ddb65b3ccf0de9f7d1", "26ea530125f5483d925e18ac5b22aa2b", "d528659578a74156ab59d48f5e492157", "46e74b3a5bb4405f88a55183f5f6d653", "a200698366d34e968d71a76c9528a9fc", "a78be2de499846608acd3495d69b75ea", "49ee2a0a793345c89460530514e80328", "d3da9462268847d7bb773a91c8709730", "9d595a620fe84ebb9f091dc6df0850a0", "cf4e469c878c4112bbed1d4c37a2d8da", "588d1fa90c8943dd8499149d04fde041", "655b068f4a68407083b286d7c3a86b90", "514e63462c5342a3ba297f6bf0180436", "8fb045a5c01449e1adeb93f63f1fdc65", "c976e76b7ff04c40b3f187623e0c6c97", "cb12f312bd154fe4900d5a079f3c471a", "22e236d603894b1cab0ab67469adcd08", "3bf780ab5f85449284238020fd0e5579", "6ca1e28edc4e4d14ae13ba3bf9abf912", "352fcdf2d232448999daa3049b1120d8", "0bbd390ba0d542588b4ab6edbb057d0c", "50f1d0d6918844faa487f125301c4d56", "216d9e317a974dd296a82336ce480fcc", "394a4fac1f9f4357a5dfd1338fd24f70", "789873fa189f4cbba8556b997833ff99", "ad9869b33a0e4400a92a6c12380061f9", "db38d933987c4a06a0412c4ae4b323c0", "c779236c110548c18510af590e85b24d", "67bc0102096545d6b30a2e6dc3223cd1", "705ea683d1e84fb1853364bf0d967c3b", "4a30c6fe45bc4fa98d5631cd612326b5", "e5dbb25ff07e4d268013572b5ba29cff", "139d3411bc354c0c8aa8d57c2cc68ca1", "ca97b78c301e4638a8193aa424e1525f", "66830f149af045a9ae1bbaf9666514a0", "17f9177e8e9540a1b16ef7c610389b8d", "c72ccb7a857e4061806cb42c0514beb4", "47fc475a0e484d5eada1df6547be2e19", "19599db7bc2741d096ee5eabb2fbbea6", "7fb052a8f9714ab4a6a74502c198a094", "955a4e475d8a4670b2d880da127562a8", "8fd5771af0514a858087e1b1d9e8cd99", "ac438ca4ba1f4887b77176e9c4bacb77", "0ae8ac47150d487b988b1f859ea81fa3", "9cb99300827a49648ef90dc802787090", "feb5dfdc846e4b7699ce3de4946c075b", "1e63003a27334b5f920f9324344bac3b", "d2e9482785834e2888e7da5a22087588", "dcd4b2a285e64ee8ae8e8a8e905b54a2", "c83bcd703adb4e80ad4348d3320639cc", "c1bb94cc8d1f4433a97722cf42373c65", "5ffd066a1a6749d1a0bc6c8bae513bd3", "c1bcca766a5e435d86e2de9e4bf75b89", "6823603a37804a1ebff1a8faf0888024", "d04c0869e3eb46798171e88cc39e17d0", "e130daf551894aaa9ed52af639261f85", "a02b8a051309459c8c4978563cc9e09d", "cd947289e84e45b7835544c6152c3423", "59b9871f2e4d4d978dda7e6a487bf7dc", "a1a4a36e1e12400ba5a65d946e0027fc", "f94634ed23ee44b4bfda3b8d4d6e6ffe", "c0a61351107f425499ed0f977684b9c1", "cde9e80966ab42e59442c57725dc67ca", "cc304990e13d43bd831bc8c0c0f42b90", "d8c84f0d3abf43848396a0109ff43216", "0d00d20f26104253813ba158cc4a0b68", "6a34f0da12e84bc1aa0107681e70651a", "6c660cbd9cf6437593b5d0ccc557c767", "45804e643729412cac8aae322bcfe801", "7a53af50718341259655a8acfef3360a", "53c0ec07ddab4a359c9218d7eb02795b", "b98a32996272441688ac3a0b172d2848", "82c5d8bdcb5740a09b62b01a67accc13", "c0f01d62b6c742c4880d7e0611c7c20e", "d60c4db0571d4706b718076c666cac5a", "87e2150682944db18f630733342f2088", "ac9041cbdf214e89bd435043caadb22b", "f1e917a93d7b4e8f831d508fa38e98ca", "88b047110e1e47c984b42bf2d284e488" ] }, "id": "b4C63VA0FqzD", "outputId": "0c6a6934-bba9-4376-b6ca-96c724b6eace" }, "outputs": [], "source": [ "# ----------------------------\n", "# 0. Disable WandB\n", "# ----------------------------\n", "os.environ[\"WANDB_MODE\"] = \"disabled\"\n", "\n", "# ----------------------------\n", "# 3. Define an EFFICIENT 4-expert MoE Layer\n", "# ----------------------------\n", "import torch\n", "import torch.nn as nn\n", "import torch.nn.functional as F\n", "\n", "class MoELoRALinear(nn.Module):\n", " def __init__(self, base_linear, r, num_experts=2, k=1, lora_alpha=16, lora_dropout=0.05):\n", " super().__init__()\n", " self.base_linear = base_linear # <-- frozen pretrained weight\n", " self.num_experts = num_experts\n", " self.k = k\n", "\n", " self.experts = nn.ModuleList([\n", " LoraLinear( # LoRA adapter only\n", " in_features=base_linear.in_features,\n", " out_features=base_linear.out_features,\n", " r=r,\n", " lora_alpha=lora_alpha,\n", " lora_dropout=lora_dropout\n", " )\n", " for _ in range(num_experts)\n", " ])\n", "\n", " self.gate = nn.Linear(base_linear.in_features, num_experts)\n", "\n", " def forward(self, x):\n", " # keep frozen pretrained path\n", " base_out = self.base_linear(x)\n", "\n", " # gating for experts\n", " gate_scores = torch.softmax(self.gate(x), dim=-1)\n", "\n", " expert_out = 0\n", " for i, expert in enumerate(self.experts):\n", " expert_out += gate_scores[..., i:i+1] * expert(x)\n", "\n", " return base_out + expert_out\n", "\n", "def replace_proj_with_moe_lora(model, r=8, num_experts=2, k=1, lora_alpha=16, lora_dropout=0.05):\n", " \"\"\"\n", " Replace only up_proj, down_proj, o_proj in each MLP with MoE(LoRA) versions.\n", " \"\"\"\n", " for layer in model.model.layers:\n", " for proj_name in [\"up_proj\", \"down_proj\"]:\n", " old = getattr(layer.mlp, proj_name)\n", " moe = MoELoRALinear(\n", " base_linear=old,\n", " r=r,\n", " num_experts=num_experts,\n", " k=k,\n", " lora_alpha=lora_alpha,\n", " lora_dropout=lora_dropout,\n", " ).to(next(old.parameters()).device)\n", " setattr(layer.mlp, proj_name, moe)\n", "\n", " return model\n", "\n", "\n", "# ----------------------------\n", "# 4. Load base model with 4-bit quantization\n", "# ----------------------------\n", "quantization_config = BitsAndBytesConfig(\n", " load_in_4bit=True,\n", " bnb_4bit_quant_type=\"nf4\",\n", " bnb_4bit_compute_dtype=torch.bfloat16,\n", " bnb_4bit_use_double_quant=True,\n", ")\n", "\n", "base_model = AutoModelForCausalLM.from_pretrained(\n", " model_id,\n", " # quantization_config=quantization_config, #Kundan: Not supported on MAC\n", " # torch_dtype=torch.bfloat16, changed for cpu\n", " torch_dtype=torch.float32, # Change to float32 for CPU\n", " device_map=\"cpu\",\n", " trust_remote_code=True,\n", ")\n", "\n", "base_model.config.use_cache = False\n", "base_model.config.pretraining_tp = 1\n", "\n", "\n", "# ----------------------------\n", "# 5. Apply PEFT / LoRA adapters\n", "# ----------------------------\n", "# Prepare model for k-bit training\n", "# Kundan: since we are not doing quantisation, this step is not neeeded as This function from the PEFT library specifically prepares a quantized model for training.\n", "# base_model = prepare_model_for_kbit_training(base_model)\n", "\n", "model = replace_proj_with_moe_lora(\n", " base_model,\n", " r=8,\n", " num_experts=2,\n", " k=1,\n", " lora_alpha=16,\n", " lora_dropout=0.05\n", ")" ] }, { "cell_type": "code", "execution_count": 55, "metadata": {}, "outputs": [], "source": [ "peft_config = LoraConfig(\n", " r=8,\n", " lora_alpha=16,\n", " lora_dropout=0.05,\n", " target_modules=[\"o_proj\"], # or o_proj too if exists\n", " bias=\"none\",\n", " task_type=\"CAUSAL_LM\",\n", ")\n", "\n", "model = get_peft_model(model, peft_config)" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "id": "8c8SrmCyBzIZ", "outputId": "2864e983-509e-4798-ac15-f322e9a8a1e4" }, "outputs": [ { "data": { "text/plain": [ "[{'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': \"I do not have access to the latest financial reports of makemytrip. However, according to the company's website, the total revenue for the fiscal year 2023 ended on march 31, 20\"},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': \"I do not have access to the latest financial reports of makemytrip. However, according to the company's website, the total revenue for the fiscal year 2023 ended on march 31, 20\"},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': \"I do not have access to the latest financial reports of makemytrip. However, according to the company's website, the total revenue for the fiscal year 2023 ended on march 31, 20\"},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': \"I do not have access to the latest financial reports of makemytrip. However, according to the company's website, the total revenue for the fiscal year 2023 ended on march 31, 20\"},\n", " {'question': 'How much was the Total revenue in 2023?',\n", " 'generated_answer': \"I do not have access to the latest financial reports of makemytrip. However, according to the company's website, the total revenue for the fiscal year 2023 ended on march 31, 20\"}]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Test the fine-tuned model\n", "baseline_responses = []\n", "\n", "# Define the system prompt used during fine-tuning\n", "system_prompt = \"You are a helpful assistant that provides financial data from MakeMyTrip reports.\"\n", "\n", "for index, row in df.head(5).iterrows():\n", " question = row['question']\n", "\n", " # Create the message list for the chat template\n", " messages = [\n", " {\"role\": \"system\", \"content\": system_prompt},\n", " {\"role\": \"user\", \"content\": question},\n", " ]\n", "\n", " # Apply the chat template to format the input\n", " input_text = tokenizer.apply_chat_template(\n", " messages,\n", " tokenize=False,\n", " add_generation_prompt=True # This adds the <|assistant|> token at the end\n", " )\n", "\n", " # Tokenize the formatted input\n", " inputs = tokenizer(input_text, return_tensors=\"pt\").to(model.device)\n", "\n", " # Generate response\n", " with torch.no_grad():\n", " outputs = model.generate(**inputs, max_new_tokens=50)\n", "\n", " # Decode the entire generated output\n", " decoded_output = tokenizer.decode(outputs[0], skip_special_tokens=True)\n", "\n", " # Extract only the generated answer part\n", " try:\n", " # The response will look like \"<|system|>\\n...\\n<|user|>\\n...\\n<|assistant|>\\n...answer...\"\n", " # We need to find the <|assistant|> token and get everything after it\n", " answer_start_token = '<|assistant|>'\n", " answer_start_index = decoded_output.rfind(answer_start_token)\n", "\n", " if answer_start_index != -1:\n", " generated_answer = decoded_output[answer_start_index + len(answer_start_token):].strip()\n", " # The model might generate a final token, which we should remove\n", " if generated_answer.endswith(''):\n", " generated_answer = generated_answer[:-len('')].strip()\n", " else:\n", " generated_answer = \"Could not extract answer from model output.\"\n", "\n", " except Exception as e:\n", " generated_answer = f\"An error occurred: {e}\"\n", "\n", " baseline_responses.append({\"question\": question, \"generated_answer\": generated_answer})\n", "\n", "# Display the first few generated responses\n", "display(baseline_responses[:5])" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Trainable params: 6,127,616 || Total params: 2,121,535,576 || Trainable%: 0.2888\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/kundankumar/Documents/CAI/.venv/lib/python3.13/site-packages/transformers/training_args.py:1609: FutureWarning: using `no_cuda` is deprecated and will be removed in version 5.0 of 🤗 Transformers. Use `use_cpu` instead\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "\n", "
\n", " \n", " \n", " [190/190 10:24, Epoch 5/5]\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
StepTraining Loss
12.162300
22.102800
32.074600
42.051200
51.878500
61.919700
71.897400
81.873100
91.806700
101.800200
111.755600
121.691600
131.608000
141.569300
151.480900
161.450900
171.372400
181.413300
191.332100
201.270500
211.288400
221.247400
231.190600
241.136500
251.078200
261.066900
271.062800
280.994900
290.910400
300.897200
310.927900
320.764800
330.744900
340.715900
350.679600
360.690300
370.620400
380.540300
390.514700
400.565000
410.470500
420.515200
430.444100
440.412500
450.407500
460.465500
470.481600
480.407800
490.443400
500.506200
510.442100
520.440100
530.516100
540.405600
550.388000
560.377200
570.371300
580.432300
590.375000
600.433100
610.477500
620.376300
630.367500
640.336700
650.327600
660.343100
670.278300
680.385200
690.326900
700.359300
710.367500
720.409000
730.330200
740.355200
750.434000
760.433200
770.274700
780.355300
790.348800
800.321500
810.271200
820.371200
830.331000
840.286300
850.284300
860.259600
870.304600
880.318000
890.329400
900.342700
910.345500
920.409100
930.399600
940.449200
950.412000
960.339000
970.315100
980.353200
990.270200
1000.323600
1010.323000
1020.333000
1030.342500
1040.373300
1050.313600
1060.358700
1070.285100
1080.296800
1090.269300
1100.355900
1110.280800
1120.376400
1130.363800
1140.404900
1150.336400
1160.349700
1170.346800
1180.319700
1190.306900
1200.257700
1210.295400
1220.290300
1230.267800
1240.418200
1250.285300
1260.259400
1270.277500
1280.349500
1290.349700
1300.304600
1310.324200
1320.299300
1330.327100
1340.269400
1350.289700
1360.256700
1370.277000
1380.289600
1390.263200
1400.257300
1410.261900
1420.349600
1430.380100
1440.261600
1450.259000
1460.257800
1470.312900
1480.325300
1490.312000
1500.254200
1510.274600
1520.401600
1530.272900
1540.299000
1550.282000
1560.297800
1570.300000
1580.269500
1590.293700
1600.375900
1610.239500
1620.319300
1630.354100
1640.312300
1650.295900
1660.250800
1670.267100
1680.244600
1690.265000
1700.284100
1710.246500
1720.387000
1730.326300
1740.262300
1750.323500
1760.296400
1770.326300
1780.252400
1790.231800
1800.257900
1810.270600
1820.252300
1830.234700
1840.300500
1850.287400
1860.277000
1870.312300
1880.267700
1890.246900
1900.261000

" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "TrainOutput(global_step=190, training_loss=0.5360341130902893, metrics={'train_runtime': 627.9923, 'train_samples_per_second': 1.202, 'train_steps_per_second': 0.303, 'total_flos': 788640317362080.0, 'train_loss': 0.5360341130902893, 'epoch': 5.0})" ] }, "execution_count": 57, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trainable = sum(p.numel() for p in model.parameters() if p.requires_grad)\n", "total = sum(p.numel() for p in model.parameters())\n", "print(f\"Trainable params: {trainable:,d} || Total params: {total:,d} || \"\n", " f\"Trainable%: {100 * trainable / total:.4f}\")\n", "\n", "# ----------------------------\n", "# 8. Gradient checkpointing\n", "# ----------------------------\n", "model.config.use_cache = False\n", "model.gradient_checkpointing_disable()\n", "\n", "# ----------------------------\n", "# 9. Prepare collator\n", "# ----------------------------\n", "data_collator = DataCollatorForLanguageModeling(\n", " tokenizer=tokenizer,\n", " mlm=False\n", ")\n", "\n", "# ----------------------------\n", "# 10. Training arguments\n", "# ----------------------------\n", "training_args = TrainingArguments(\n", " learning_rate=5e-5,\n", " output_dir=\"./results\",\n", " num_train_epochs=5,\n", " per_device_train_batch_size=1, # Keep batch size small\n", " gradient_accumulation_steps=4, # Increased gradient accumulation steps\n", " logging_steps=1,\n", " save_steps=10,\n", " save_total_limit=2,\n", " fp16=False, # fp16 and bf16 are mutually exclusive. bf16 is recommended for Ampere+ GPUs.\n", " bf16=False, # Use bf16 for better performance with 4-bit models\n", " # Explicitly force CPU settings\n", " no_cuda=True, # Force disable CUDA\n", " use_cpu=True, # Explicitly use CPU\n", " dataloader_pin_memory=False, # Disable GPU memory pinning\n", ")\n", "\n", "# ----------------------------\n", "# 11. Trainer\n", "# ----------------------------\n", "\n", "trainer = Trainer(\n", " model=model,\n", " args=training_args,\n", " train_dataset=tokenized_dataset,\n", " data_collator=data_collator\n", ")\n", "\n", "# ----------------------------\n", "# 12. Train\n", "# ----------------------------\n", "trainer.train()" ] }, { "cell_type": "code", "execution_count": 58, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 315 }, "id": "4i0KmguUd7or", "outputId": "9cc82250-bf24-473b-9245-630f16450ba7" }, "outputs": [ { "data": { "text/plain": [ "[{'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'How much was the Total revenue in 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2023.'}]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Test the fine-tuned model\n", "fine_tuned_responses = []\n", "\n", "# Define the system prompt used during fine-tuning\n", "system_prompt = \"You are a helpful assistant that provides financial data from MakeMyTrip reports.\"\n", "\n", "for index, row in df.iterrows():\n", " question = row['question']\n", "\n", " # Create the message list for the chat template\n", " messages = [\n", " {\"role\": \"system\", \"content\": system_prompt},\n", " {\"role\": \"user\", \"content\": question},\n", " ]\n", "\n", " # Apply the chat template to format the input\n", " input_text = tokenizer.apply_chat_template(\n", " messages,\n", " tokenize=False,\n", " add_generation_prompt=True # This adds the <|assistant|> token at the end\n", " )\n", "\n", " # Tokenize the formatted input\n", " inputs = tokenizer(input_text, return_tensors=\"pt\").to(model.device)\n", "\n", " # Generate response\n", " with torch.no_grad():\n", " outputs = model.generate(**inputs, max_new_tokens=50)\n", "\n", " # Decode the entire generated output\n", " decoded_output = tokenizer.decode(outputs[0], skip_special_tokens=True)\n", "\n", " # Extract only the generated answer part\n", " try:\n", " # The response will look like \"<|system|>\\n...\\n<|user|>\\n...\\n<|assistant|>\\n...answer...\"\n", " # We need to find the <|assistant|> token and get everything after it\n", " answer_start_token = '<|assistant|>'\n", " answer_start_index = decoded_output.rfind(answer_start_token)\n", "\n", " if answer_start_index != -1:\n", " generated_answer = decoded_output[answer_start_index + len(answer_start_token):].strip()\n", " # The model might generate a final token, which we should remove\n", " if generated_answer.endswith(''):\n", " generated_answer = generated_answer[:-len('')].strip()\n", " else:\n", " generated_answer = \"Could not extract answer from model output.\"\n", "\n", " except Exception as e:\n", " generated_answer = f\"An error occurred: {e}\"\n", "\n", " fine_tuned_responses.append({\"question\": question, \"generated_answer\": generated_answer})\n", "\n", "# Display the first few generated responses\n", "display(fine_tuned_responses[:5])" ] }, { "cell_type": "code", "execution_count": 59, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[{'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'What was the Total revenue in 2023?',\n", " 'generated_answer': 'The Total revenue in 2023 was USD 1,224,233.00.'},\n", " {'question': 'How much was the Total revenue in 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2023.'},\n", " {'question': 'How much was the Total revenue in 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2023.'},\n", " {'question': 'How much was the Total revenue in 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2023.'},\n", " {'question': 'How much was the Total revenue in 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2023.'},\n", " {'question': 'Can you tell me the Total revenue for 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2023.'},\n", " {'question': 'Can you tell me the Total revenue for 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2023.'},\n", " {'question': 'Can you tell me the Total revenue for 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2023.'},\n", " {'question': 'Can you tell me the Total revenue for 2023?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2023.'},\n", " {'question': 'How much did the company report as Total revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'How much did the company report as Total revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'How much did the company report as Total revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'How much did the company report as Total revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'What was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'What was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'What was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'What was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'How much was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'How much was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'How much was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'How much was the Total revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2024.'},\n", " {'question': 'Can you tell me the Total revenue for 2024?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2024.'},\n", " {'question': 'Can you tell me the Total revenue for 2024?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2024.'},\n", " {'question': 'Can you tell me the Total revenue for 2024?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2024.'},\n", " {'question': 'Can you tell me the Total revenue for 2024?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,222,233 in 2024.'},\n", " {'question': 'How much did the company report as Total revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'How much did the company report as Total revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'How much did the company report as Total revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'How much did the company report as Total revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Total revenue of USD 1,224,233.'},\n", " {'question': 'What was the Total revenue in 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'What was the Total revenue in 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'What was the Total revenue in 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'What was the Total revenue in 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'How much was the Total revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2025.'},\n", " {'question': 'How much was the Total revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2025.'},\n", " {'question': 'How much was the Total revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2025.'},\n", " {'question': 'How much was the Total revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,224,233 as Total revenue in 2025.'},\n", " {'question': 'Can you tell me the Total revenue for 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'Can you tell me the Total revenue for 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'Can you tell me the Total revenue for 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'Can you tell me the Total revenue for 2025?',\n", " 'generated_answer': 'The company reported Total revenue of USD 1,224,233 in 2025.'},\n", " {'question': 'How much did the company report as Total revenue in 2025?',\n", " 'generated_answer': 'Total revenue stood at USD 1,224,233 in 2025.'},\n", " {'question': 'How much did the company report as Total revenue in 2025?',\n", " 'generated_answer': 'Total revenue stood at USD 1,224,233 in 2025.'},\n", " {'question': 'How much did the company report as Total revenue in 2025?',\n", " 'generated_answer': 'Total revenue stood at USD 1,224,233 in 2025.'},\n", " {'question': 'How much did the company report as Total revenue in 2025?',\n", " 'generated_answer': 'Total revenue stood at USD 1,224,233 in 2025.'},\n", " {'question': 'What was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'What was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'What was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'What was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'How much was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2023.'},\n", " {'question': 'How much was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2023.'},\n", " {'question': 'How much was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2023.'},\n", " {'question': 'How much was the Air ticketing revenue in 2023?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2023.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2023?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2023.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2023?',\n", " 'generated_answer': 'In 2023, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'What was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'What was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'What was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'What was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'How much was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'How much was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'How much was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'How much was the Air ticketing revenue in 2024?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2024.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2024?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2024.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2024?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2024.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2024?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2024.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2024?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 144,222 in 2024.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2024?',\n", " 'generated_answer': 'In 2024, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'What was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'What was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'What was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'What was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'How much was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'How much was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'How much was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'How much was the Air ticketing revenue in 2025?',\n", " 'generated_answer': 'The company recorded USD 144,222 as Air ticketing revenue in 2025.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2025?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 134,222 in 2025.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2025?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 134,222 in 2025.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2025?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 134,222 in 2025.'},\n", " {'question': 'Can you tell me the Air ticketing revenue for 2025?',\n", " 'generated_answer': 'The company reported Air ticketing revenue of USD 134,222 in 2025.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2025?',\n", " 'generated_answer': 'In 2025, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2025?',\n", " 'generated_answer': 'In 2025, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': 'How much did the company report as Air ticketing revenue in 2025?',\n", " 'generated_answer': 'In 2025, the company reported Air ticketing revenue of USD 134,222.'},\n", " {'question': \"What was MakeMyTrip's Hotels and packages revenue in 2025?\",\n", " 'generated_answer': 'Hotels and packages revenue stood at USD 1,222,233 in 2025.'},\n", " {'question': \"What was MakeMyTrip's Hotels and packages revenue in 2025?\",\n", " 'generated_answer': 'Hotels and packages revenue stood at USD 1,222,233 in 2025.'},\n", " {'question': \"What was MakeMyTrip's Hotels and packages revenue in 2025?\",\n", " 'generated_answer': 'Hotels and packages revenue stood at USD 1,222,233 in 2025.'},\n", " {'question': \"What was MakeMyTrip's Hotels and packages revenue in 2025?\",\n", " 'generated_answer': 'Hotels and packages revenue stood at USD 1,222,233 in 2025.'},\n", " {'question': 'How much was the Bus ticketing revenue in 2024?',\n", " 'generated_answer': 'Bus ticketing revenue stood at USD 144,222 in 2024.'},\n", " {'question': 'How much was the Bus ticketing revenue in 2024?',\n", " 'generated_answer': 'Bus ticketing revenue stood at USD 144,222 in 2024.'},\n", " {'question': 'How much was the Bus ticketing revenue in 2024?',\n", " 'generated_answer': 'Bus ticketing revenue stood at USD 144,222 in 2024.'},\n", " {'question': 'How much was the Bus ticketing revenue in 2024?',\n", " 'generated_answer': 'Bus ticketing revenue stood at USD 124,222 in 2024.'},\n", " {'question': 'What is the total equity attributable to owners in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,222,233 thousand as total equity attributable to owners in 2025.'},\n", " {'question': 'What is the total equity attributable to owners in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,222,233 thousand as total equity attributable to owners in 2025.'},\n", " {'question': 'What is the total equity attributable to owners in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,222,233 thousand as total equity attributable to owners in 2025.'},\n", " {'question': 'What is the total equity attributable to owners in 2025?',\n", " 'generated_answer': 'The company recorded USD 1,222,233 thousand as total equity attributable to owners in 2025.'},\n", " {'question': 'What was the cash and cash equivalents balance at the end of 2025?',\n", " 'generated_answer': 'The company had cash and cash equivalents of USD 1,224,223 thousand at the end of 2025.'},\n", " {'question': 'What was the cash and cash equivalents balance at the end of 2025?',\n", " 'generated_answer': 'The company had cash and cash equivalents of USD 144,223 thousand at the end of 2025.'},\n", " {'question': 'What was the cash and cash equivalents balance at the end of 2025?',\n", " 'generated_answer': 'The company had cash and cash equivalents of USD 1,224,223 thousand at the end of 2025.'},\n", " {'question': 'What was the cash and cash equivalents balance at the end of 2025?',\n", " 'generated_answer': 'The company had cash and cash equivalents of USD 144,223 thousand at the end of 2025.'},\n", " {'question': 'How much profit did MakeMyTrip make in 2024?',\n", " 'generated_answer': 'In 2024, MakeMyTrip reported a profit of USD 144,233 thousand.'},\n", " {'question': 'How much profit did MakeMyTrip make in 2024?',\n", " 'generated_answer': 'In 2024, MakeMyTrip reported a profit of USD 144,233 thousand.'},\n", " {'question': 'How much profit did MakeMyTrip make in 2024?',\n", " 'generated_answer': 'In 2024, MakeMyTrip reported a profit of USD 144,233 thousand.'},\n", " {'question': 'How much profit did MakeMyTrip make in 2024?',\n", " 'generated_answer': 'In 2024, MakeMyTrip reported a profit of USD 144,233 thousand.'},\n", " {'question': 'What was the total assets value in 2025?',\n", " 'generated_answer': 'In 2025, the company had total assets of USD 1,322,233 thousand.'},\n", " {'question': 'What was the total assets value in 2025?',\n", " 'generated_answer': 'In 2025, the company had total assets of USD 1,322,233 thousand.'},\n", " {'question': 'What was the total assets value in 2025?',\n", " 'generated_answer': 'In 2025, the company had total assets of USD 1,322,233 thousand.'},\n", " {'question': 'What was the total assets value in 2025?',\n", " 'generated_answer': 'In 2025, the company had total assets of USD 1,322,233 thousand.'},\n", " {'question': 'How much did MakeMyTrip spend on marketing and sales promotion in 2025?',\n", " 'generated_answer': 'Marketing and sales promotion expenses in 2025 were USD 124,223 thousand.'},\n", " {'question': 'How much did MakeMyTrip spend on marketing and sales promotion in 2025?',\n", " 'generated_answer': 'Marketing and sales promotion expenses in 2025 were USD 124,223 thousand.'},\n", " {'question': 'How much did MakeMyTrip spend on marketing and sales promotion in 2025?',\n", " 'generated_answer': 'Marketing and sales promotion expenses in 2025 were USD 124,223 thousand.'},\n", " {'question': 'How much did MakeMyTrip spend on marketing and sales promotion in 2025?',\n", " 'generated_answer': 'Marketing and sales promotion expenses in 2025 were USD 124,223 thousand.'},\n", " {'question': 'What was the personnel expenses amount in 2024?',\n", " 'generated_answer': 'Personnel expenses were USD 144,223 thousand in 2024.'},\n", " {'question': 'What was the personnel expenses amount in 2024?',\n", " 'generated_answer': 'Personnel expenses were USD 144,223 thousand in 2024.'},\n", " {'question': 'What was the personnel expenses amount in 2024?',\n", " 'generated_answer': 'Personnel expenses were USD 144,223 thousand in 2024.'},\n", " {'question': 'What was the personnel expenses amount in 2024?',\n", " 'generated_answer': 'Personnel expenses were USD 144,223 thousand in 2024.'},\n", " {'question': 'How much was the procurement cost of hotels and packages services in 2025?',\n", " 'generated_answer': 'The procurement cost of hotels and packages services in 2025 was USD 124,223 thousand.'},\n", " {'question': 'How much was the procurement cost of hotels and packages services in 2025?',\n", " 'generated_answer': 'The procurement cost of hotels and packages services in 2025 was USD 124,223 thousand.'},\n", " {'question': 'How much was the procurement cost of hotels and packages services in 2025?',\n", " 'generated_answer': 'The procurement cost of hotels and packages services in 2025 was USD 124,223 thousand.'},\n", " {'question': 'How much was the procurement cost of hotels and packages services in 2025?',\n", " 'generated_answer': 'The procurement cost of hotels and packages services in 2025 was USD 124,223 thousand.'},\n", " {'question': \"What was MakeMyTrip's earnings per share in 2024?\",\n", " 'generated_answer': 'Earnings per share stood at USD 0.22 in 2024.'},\n", " {'question': \"What was MakeMyTrip's earnings per share in 2024?\",\n", " 'generated_answer': 'Earnings per share stood at USD 0.22 in 2024.'},\n", " {'question': \"What was MakeMyTrip's earnings per share in 2024?\",\n", " 'generated_answer': 'Earnings per share were USD 0.22 in 2024.'},\n", " {'question': \"What was MakeMyTrip's earnings per share in 2024?\",\n", " 'generated_answer': 'Earnings per share stood at USD 0.22 in 2024.'},\n", " {'question': 'How much did the company invest in term deposits in 2025?',\n", " 'generated_answer': 'In 2025, the company invested USD 144,223 thousand in term deposits.'},\n", " {'question': 'How much did the company invest in term deposits in 2025?',\n", " 'generated_answer': 'In 2025, the company invested USD 144,223 thousand in term deposits.'},\n", " {'question': 'How much did the company invest in term deposits in 2025?',\n", " 'generated_answer': 'In 2025, the company invested USD 144,223 thousand in term deposits.'},\n", " {'question': 'How much did the company invest in term deposits in 2025?',\n", " 'generated_answer': 'In 2025, the company invested USD 144,223 thousand in term deposits.'},\n", " {'question': 'What was the total comprehensive income in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,223 thousand as total comprehensive income in 2025.'},\n", " {'question': 'What was the total comprehensive income in 2025?',\n", " 'generated_answer': 'The company reported total comprehensive income of USD 134,223 thousand in 2025.'},\n", " {'question': 'What was the total comprehensive income in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,223 thousand as total comprehensive income in 2025.'},\n", " {'question': 'What was the total comprehensive income in 2025?',\n", " 'generated_answer': 'The company recorded USD 149,223 thousand as total comprehensive income in 2025.'},\n", " {'question': 'How much was the other operating expenses in 2024?',\n", " 'generated_answer': 'Other operating expenses in 2024 were USD 134,223 thousand.'},\n", " {'question': 'How much was the other operating expenses in 2024?',\n", " 'generated_answer': 'Other operating expenses in 2024 were USD 134,223 thousand.'},\n", " {'question': 'How much was the other operating expenses in 2024?',\n", " 'generated_answer': 'Other operating expenses in 2024 were USD 134,223 thousand.'},\n", " {'question': 'How much was the other operating expenses in 2024?',\n", " 'generated_answer': 'Other operating expenses in 2024 were USD 134,223 thousand.'},\n", " {'question': 'What was the total revenue in 2025?',\n", " 'generated_answer': 'The total revenue in 2025 was USD 1,324,233.00.'},\n", " {'question': 'What was the total revenue in 2025?',\n", " 'generated_answer': 'The total revenue in 2025 was USD 1,324,233.00.'},\n", " {'question': 'What was the total revenue in 2025?',\n", " 'generated_answer': 'The total revenue in 2025 was USD 1,324,233.00.'},\n", " {'question': 'What was the total revenue in 2025?',\n", " 'generated_answer': 'The total revenue in 2025 was USD 1,324,233.00.'}]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(fine_tuned_responses)" ] }, { "cell_type": "code", "execution_count": 60, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "LlamaForCausalLM(\n", " (model): LlamaModel(\n", " (embed_tokens): Embedding(32000, 2048)\n", " (layers): ModuleList(\n", " (0-21): 22 x LlamaDecoderLayer(\n", " (self_attn): LlamaAttention(\n", " (q_proj): Linear(in_features=2048, out_features=2048, bias=False)\n", " (k_proj): Linear(in_features=2048, out_features=256, bias=False)\n", " (v_proj): Linear(in_features=2048, out_features=256, bias=False)\n", " (o_proj): lora.Linear(\n", " (base_layer): Linear(in_features=2048, out_features=2048, bias=False)\n", " (lora_dropout): ModuleDict(\n", " (default): Dropout(p=0.05, inplace=False)\n", " )\n", " (lora_A): ModuleDict(\n", " (default): Linear(in_features=2048, out_features=8, bias=False)\n", " )\n", " (lora_B): ModuleDict(\n", " (default): Linear(in_features=8, out_features=2048, bias=False)\n", " )\n", " (lora_embedding_A): ParameterDict()\n", " (lora_embedding_B): ParameterDict()\n", " (lora_magnitude_vector): ModuleDict()\n", " )\n", " )\n", " (mlp): LlamaMLP(\n", " (gate_proj): Linear(in_features=2048, out_features=5632, bias=False)\n", " (up_proj): MoELoRALinear(\n", " (base_linear): Linear(in_features=2048, out_features=5632, bias=False)\n", " (experts): ModuleList(\n", " (0-1): 2 x LoraLinear(\n", " (lora_dropout): Dropout(p=0.05, inplace=False)\n", " )\n", " )\n", " (gate): Linear(in_features=2048, out_features=2, bias=True)\n", " )\n", " (down_proj): MoELoRALinear(\n", " (base_linear): Linear(in_features=5632, out_features=2048, bias=False)\n", " (experts): ModuleList(\n", " (0-1): 2 x LoraLinear(\n", " (lora_dropout): Dropout(p=0.05, inplace=False)\n", " )\n", " )\n", " (gate): Linear(in_features=5632, out_features=2, bias=True)\n", " )\n", " (act_fn): SiLU()\n", " )\n", " (input_layernorm): LlamaRMSNorm((2048,), eps=1e-05)\n", " (post_attention_layernorm): LlamaRMSNorm((2048,), eps=1e-05)\n", " )\n", " )\n", " (norm): LlamaRMSNorm((2048,), eps=1e-05)\n", " (rotary_emb): LlamaRotaryEmbedding()\n", " )\n", " (lm_head): Linear(in_features=2048, out_features=32000, bias=False)\n", ")" ] }, "execution_count": 60, "metadata": {}, "output_type": "execute_result" } ], "source": [ "base_model" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 61, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "✅ Successfully logged in to Hugging Face\n", "✅ Repository created/verified: kundan621/tinyllama-makemytrip-financial-qa\n", "💾 Saving model...\n", "🔧 Merging PEFT adapters for better compatibility...\n", "📄 Model card created\n", "📤 Uploading to Hugging Face Hub...\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "598d09134ac44b66aadd11a968ff1444", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Processing Files (0 / 0) : | | 0.00B / 0.00B " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f2259079ce2445fbbaec1fb792a07446", "version_major": 2, "version_minor": 0 }, "text/plain": [ "New Data Upload : | | 0.00B / 0.00B " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "800054b5706149c3b60bc42511bbdc88", "version_major": 2, "version_minor": 0 }, "text/plain": [ " ...sf/model-00001-of-00002.safetensors: 4%|3 | 193MB / 4.99GB " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8c78c3dfb4034008b169f8375662f6fc", "version_major": 2, "version_minor": 0 }, "text/plain": [ " ...sf/model-00002-of-00002.safetensors: 6%|5 | 193MB / 3.50GB " ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "No files have been modified since last commit. Skipping to prevent empty commit.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "🎉 Model successfully uploaded to: https://huggingface.co/kundan621/tinyllama-makemytrip-financial-qa\n", "✅ Upload completed successfully!\n" ] } ], "source": [ "# Save the fine-tuned model to Hugging Face Hub\n", "from huggingface_hub import HfApi, login, create_repo\n", "import os\n", "from dotenv import load_dotenv\n", "\n", "# Load environment variables\n", "load_dotenv()\n", "\n", "# Get the access token from environment\n", "hf_token = os.getenv(\"HF_API_KEY\")\n", "\n", "if hf_token:\n", " try:\n", " # Login to Hugging Face\n", " login(token=hf_token)\n", " print(\"✅ Successfully logged in to Hugging Face\")\n", " \n", " # Define repository name\n", " repo_name = \"kundan621/tinyllama-makemytrip-financial-qa\"\n", " \n", " # Create repository (if it doesn't exist)\n", " try:\n", " create_repo(repo_name, exist_ok=True, private=False, token=hf_token)\n", " print(f\"✅ Repository created/verified: {repo_name}\")\n", " except Exception as e:\n", " print(f\"ℹ️ Repository info: {e}\")\n", " \n", " # Handle PEFT model properly\n", " print(\"💾 Saving model...\")\n", " if hasattr(model, 'merge_and_unload'):\n", " print(\"🔧 Merging PEFT adapters for better compatibility...\")\n", " merged_model = model.merge_and_unload()\n", " merged_model.save_pretrained(\"./fine_tuned_tinyllama_makemytrip\")\n", " model_to_push = merged_model\n", " else:\n", " print(\"💾 Saving PEFT model directly...\")\n", " model.save_pretrained(\"./fine_tuned_tinyllama_makemytrip\")\n", " model_to_push = model\n", " \n", " # Save tokenizer\n", " tokenizer.save_pretrained(\"./fine_tuned_tinyllama_makemytrip\")\n", " \n", " # Create a comprehensive model card\n", " model_card_content = f\"\"\"---\n", "library_name: transformers\n", "pipeline_tag: text-generation\n", "language:\n", "- en\n", "tags:\n", "- tinyllama\n", "- financial-qa\n", "- makemytrip\n", "- fine-tuned\n", "- peft\n", "- lora\n", "datasets:\n", "- custom\n", "license: apache-2.0\n", "base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0\n", "---\n", "\n", "# TinyLlama MakeMyTrip Financial QA Model\n", "\n", "This is a fine-tuned version of TinyLlama-1.1B-Chat-v1.0 specifically trained on MakeMyTrip financial data for question-answering tasks.\n", "\n", "## Model Description\n", "\n", "- **Base Model**: TinyLlama/TinyLlama-1.1B-Chat-v1.0\n", "- **Fine-tuning Method**: LoRA (Low-Rank Adaptation) with PEFT\n", "- **Dataset**: MakeMyTrip Financial Statements QA\n", "- **Task**: Financial Question Answering\n", "- **Language**: English\n", "\n", "## Usage\n", "\n", "```python\n", "from transformers import AutoTokenizer, AutoModelForCausalLM\n", "\n", "# Load model and tokenizer\n", "tokenizer = AutoTokenizer.from_pretrained(\"{repo_name}\")\n", "model = AutoModelForCausalLM.from_pretrained(\"{repo_name}\")\n", "\n", "# Generate response\n", "system_prompt = \"You are a helpful assistant that provides financial data from MakeMyTrip reports.\"\n", "messages = [\n", " {{\"role\": \"system\", \"content\": system_prompt}},\n", " {{\"role\": \"user\", \"content\": \"What was MakeMyTrip's revenue in the last quarter?\"}}\n", "]\n", "\n", "input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)\n", "inputs = tokenizer(input_text, return_tensors=\"pt\")\n", "outputs = model.generate(**inputs, max_new_tokens=100, temperature=0.7)\n", "response = tokenizer.decode(outputs[0], skip_special_tokens=True)\n", "\n", "# Extract the assistant's response\n", "answer_start = response.rfind('<|assistant|>')\n", "if answer_start != -1:\n", " answer = response[answer_start + len('<|assistant|>'):].strip()\n", " print(answer)\n", "```\n", "\n", "## Training Details\n", "\n", "- **Framework**: Transformers + PEFT\n", "- **Optimizer**: AdamW\n", "- **Learning Rate**: 5e-5\n", "- **Batch Size**: 1 (with gradient accumulation steps: 4)\n", "- **Epochs**: 10\n", "- **LoRA Config**:\n", " - r: 8\n", " - alpha: 16\n", " - dropout: 0.05\n", " - target_modules: [\"o_proj\", \"up_proj\", \"down_proj\"]\n", "\n", "## Performance\n", "\n", "The model has been fine-tuned to provide accurate financial information about MakeMyTrip, including:\n", "- Revenue figures\n", "- Marketing expenditure\n", "- Business segments\n", "- Customer metrics\n", "- Profit margins\n", "\n", "## Limitations\n", "\n", "- Trained specifically on MakeMyTrip financial data\n", "- Limited to financial domain knowledge\n", "- May not generalize well to other companies or domains\n", "- Responses should be verified with official financial reports\n", "\n", "## Citation\n", "\n", "If you use this model, please cite:\n", "```\n", "@misc{{tinyllama-makemytrip-qa,\n", " title={{TinyLlama MakeMyTrip Financial QA Model}},\n", " author={{Your Name}},\n", " year={{2025}},\n", " url={{https://huggingface.co/{repo_name}}}\n", "}}\n", "```\n", "\"\"\"\n", " \n", " # Save model card\n", " with open(\"./fine_tuned_tinyllama_makemytrip/README.md\", \"w\") as f:\n", " f.write(model_card_content)\n", " print(\"📄 Model card created\")\n", " \n", " # Push to hub\n", " print(\"📤 Uploading to Hugging Face Hub...\")\n", " model_to_push.push_to_hub(repo_name, token=hf_token)\n", " tokenizer.push_to_hub(repo_name, token=hf_token)\n", " \n", " print(f\"🎉 Model successfully uploaded to: https://huggingface.co/{repo_name}\")\n", " print(\"✅ Upload completed successfully!\")\n", " \n", " except Exception as e:\n", " print(f\"❌ Error uploading model: {e}\")\n", " print(\"Please check your internet connection and HF token permissions.\")\n", "else:\n", " print(\"❌ HF_API_KEY not found in environment variables\")\n", " print(\"Please make sure your .env file contains: HF_API_KEY=your_token_here\")" ] } ], "metadata": { "accelerator": "GPU", "colab": { "gpuType": "T4", "provenance": [] }, "kernelspec": { "display_name": ".venv", "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.13.1" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "0ae8ac47150d487b988b1f859ea81fa3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "0bbd390ba0d542588b4ab6edbb057d0c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "0d00d20f26104253813ba158cc4a0b68": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "103a55741c0447b09372dab8cd5baab1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_b24d2bd402724f7d87cb55e6c5df1565", "IPY_MODEL_17320951e1414dd1a32e481f3bf3e1af", "IPY_MODEL_fa06f9a8334c47ca9fdbb7eebdda9841" ], "layout": "IPY_MODEL_5e9123329f9e4bb7bd3fc9b6ada6eb6e" } }, "139d3411bc354c0c8aa8d57c2cc68ca1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "17320951e1414dd1a32e481f3bf3e1af": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_8f841d825d0a4d6faae3f4ec5f3186e9", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_83ebe67ef39d4065a5d17a8a6edb9917", "value": 1 } }, "17f9177e8e9540a1b16ef7c610389b8d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_c72ccb7a857e4061806cb42c0514beb4", "IPY_MODEL_47fc475a0e484d5eada1df6547be2e19", "IPY_MODEL_19599db7bc2741d096ee5eabb2fbbea6" ], "layout": "IPY_MODEL_7fb052a8f9714ab4a6a74502c198a094" } }, "19599db7bc2741d096ee5eabb2fbbea6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_9cb99300827a49648ef90dc802787090", "placeholder": "​", "style": "IPY_MODEL_feb5dfdc846e4b7699ce3de4946c075b", "value": " 50/50 [00:00<00:00, 672.27 examples/s]" } }, "1e63003a27334b5f920f9324344bac3b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_d2e9482785834e2888e7da5a22087588", "IPY_MODEL_dcd4b2a285e64ee8ae8e8a8e905b54a2", "IPY_MODEL_c83bcd703adb4e80ad4348d3320639cc" ], "layout": "IPY_MODEL_c1bb94cc8d1f4433a97722cf42373c65" } }, "216d9e317a974dd296a82336ce480fcc": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "22e236d603894b1cab0ab67469adcd08": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_216d9e317a974dd296a82336ce480fcc", "placeholder": "​", "style": "IPY_MODEL_394a4fac1f9f4357a5dfd1338fd24f70", "value": " 1.84M/? [00:00<00:00, 26.9MB/s]" } }, "22fb8fc7d2744fb09b9415eeb3678d3c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "26ea530125f5483d925e18ac5b22aa2b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "352fcdf2d232448999daa3049b1120d8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "394a4fac1f9f4357a5dfd1338fd24f70": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3bf780ab5f85449284238020fd0e5579": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "45804e643729412cac8aae322bcfe801": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_7a53af50718341259655a8acfef3360a", "IPY_MODEL_53c0ec07ddab4a359c9218d7eb02795b", "IPY_MODEL_b98a32996272441688ac3a0b172d2848" ], "layout": "IPY_MODEL_82c5d8bdcb5740a09b62b01a67accc13" } }, "46e74b3a5bb4405f88a55183f5f6d653": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_d3da9462268847d7bb773a91c8709730", "placeholder": "​", "style": "IPY_MODEL_9d595a620fe84ebb9f091dc6df0850a0", "value": "tokenizer.model: 100%" } }, "47fc475a0e484d5eada1df6547be2e19": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_ac438ca4ba1f4887b77176e9c4bacb77", "max": 50, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_0ae8ac47150d487b988b1f859ea81fa3", "value": 50 } }, "48d257dc8440486d8cfefb2c45cc31c1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "49ee2a0a793345c89460530514e80328": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "4a30c6fe45bc4fa98d5631cd612326b5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "50f1d0d6918844faa487f125301c4d56": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "514e63462c5342a3ba297f6bf0180436": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "53c0ec07ddab4a359c9218d7eb02795b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_87e2150682944db18f630733342f2088", "max": 124, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_ac9041cbdf214e89bd435043caadb22b", "value": 124 } }, "588d1fa90c8943dd8499149d04fde041": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "59b9871f2e4d4d978dda7e6a487bf7dc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_cde9e80966ab42e59442c57725dc67ca", "placeholder": "​", "style": "IPY_MODEL_cc304990e13d43bd831bc8c0c0f42b90", "value": "model.safetensors: 100%" } }, "5e9123329f9e4bb7bd3fc9b6ada6eb6e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "5ffd066a1a6749d1a0bc6c8bae513bd3": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "655b068f4a68407083b286d7c3a86b90": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "66830f149af045a9ae1bbaf9666514a0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "67bc0102096545d6b30a2e6dc3223cd1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "6823603a37804a1ebff1a8faf0888024": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "6a34f0da12e84bc1aa0107681e70651a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "6c660cbd9cf6437593b5d0ccc557c767": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "6ca1e28edc4e4d14ae13ba3bf9abf912": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "705ea683d1e84fb1853364bf0d967c3b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "789873fa189f4cbba8556b997833ff99": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_ad9869b33a0e4400a92a6c12380061f9", "IPY_MODEL_db38d933987c4a06a0412c4ae4b323c0", "IPY_MODEL_c779236c110548c18510af590e85b24d" ], "layout": "IPY_MODEL_67bc0102096545d6b30a2e6dc3223cd1" } }, "7a53af50718341259655a8acfef3360a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_c0f01d62b6c742c4880d7e0611c7c20e", "placeholder": "​", "style": "IPY_MODEL_d60c4db0571d4706b718076c666cac5a", "value": "generation_config.json: 100%" } }, "7f432508a76d41ddb65b3ccf0de9f7d1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "7fb052a8f9714ab4a6a74502c198a094": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "82c5d8bdcb5740a09b62b01a67accc13": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "83ebe67ef39d4065a5d17a8a6edb9917": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "87e2150682944db18f630733342f2088": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "88b047110e1e47c984b42bf2d284e488": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "8f841d825d0a4d6faae3f4ec5f3186e9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": "20px" } }, "8fb045a5c01449e1adeb93f63f1fdc65": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_c976e76b7ff04c40b3f187623e0c6c97", "IPY_MODEL_cb12f312bd154fe4900d5a079f3c471a", "IPY_MODEL_22e236d603894b1cab0ab67469adcd08" ], "layout": "IPY_MODEL_3bf780ab5f85449284238020fd0e5579" } }, "8fd5771af0514a858087e1b1d9e8cd99": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "955a4e475d8a4670b2d880da127562a8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "9cb99300827a49648ef90dc802787090": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "9d595a620fe84ebb9f091dc6df0850a0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a02b8a051309459c8c4978563cc9e09d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a1a4a36e1e12400ba5a65d946e0027fc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_d8c84f0d3abf43848396a0109ff43216", "max": 2200119864, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_0d00d20f26104253813ba158cc4a0b68", "value": 2200119864 } }, "a200698366d34e968d71a76c9528a9fc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_cf4e469c878c4112bbed1d4c37a2d8da", "max": 499723, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_588d1fa90c8943dd8499149d04fde041", "value": 499723 } }, "a78be2de499846608acd3495d69b75ea": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_655b068f4a68407083b286d7c3a86b90", "placeholder": "​", "style": "IPY_MODEL_514e63462c5342a3ba297f6bf0180436", "value": " 500k/500k [00:00<00:00, 678kB/s]" } }, "ac438ca4ba1f4887b77176e9c4bacb77": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ac9041cbdf214e89bd435043caadb22b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "ad9869b33a0e4400a92a6c12380061f9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_705ea683d1e84fb1853364bf0d967c3b", "placeholder": "​", "style": "IPY_MODEL_4a30c6fe45bc4fa98d5631cd612326b5", "value": "special_tokens_map.json: 100%" } }, "b24d2bd402724f7d87cb55e6c5df1565": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_48d257dc8440486d8cfefb2c45cc31c1", "placeholder": "​", "style": "IPY_MODEL_22fb8fc7d2744fb09b9415eeb3678d3c", "value": "tokenizer_config.json: " } }, "b98a32996272441688ac3a0b172d2848": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_f1e917a93d7b4e8f831d508fa38e98ca", "placeholder": "​", "style": "IPY_MODEL_88b047110e1e47c984b42bf2d284e488", "value": " 124/124 [00:00<00:00, 11.6kB/s]" } }, "c0a61351107f425499ed0f977684b9c1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c0f01d62b6c742c4880d7e0611c7c20e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c1bb94cc8d1f4433a97722cf42373c65": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c1bcca766a5e435d86e2de9e4bf75b89": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "c72ccb7a857e4061806cb42c0514beb4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_955a4e475d8a4670b2d880da127562a8", "placeholder": "​", "style": "IPY_MODEL_8fd5771af0514a858087e1b1d9e8cd99", "value": "Map: 100%" } }, "c779236c110548c18510af590e85b24d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_ca97b78c301e4638a8193aa424e1525f", "placeholder": "​", "style": "IPY_MODEL_66830f149af045a9ae1bbaf9666514a0", "value": " 551/551 [00:00<00:00, 62.1kB/s]" } }, "c83bcd703adb4e80ad4348d3320639cc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e130daf551894aaa9ed52af639261f85", "placeholder": "​", "style": "IPY_MODEL_a02b8a051309459c8c4978563cc9e09d", "value": " 608/608 [00:00<00:00, 39.4kB/s]" } }, "c976e76b7ff04c40b3f187623e0c6c97": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_6ca1e28edc4e4d14ae13ba3bf9abf912", "placeholder": "​", "style": "IPY_MODEL_352fcdf2d232448999daa3049b1120d8", "value": "tokenizer.json: " } }, "ca97b78c301e4638a8193aa424e1525f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cb12f312bd154fe4900d5a079f3c471a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_0bbd390ba0d542588b4ab6edbb057d0c", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_50f1d0d6918844faa487f125301c4d56", "value": 1 } }, "cc304990e13d43bd831bc8c0c0f42b90": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "cd947289e84e45b7835544c6152c3423": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_59b9871f2e4d4d978dda7e6a487bf7dc", "IPY_MODEL_a1a4a36e1e12400ba5a65d946e0027fc", "IPY_MODEL_f94634ed23ee44b4bfda3b8d4d6e6ffe" ], "layout": "IPY_MODEL_c0a61351107f425499ed0f977684b9c1" } }, "cde9e80966ab42e59442c57725dc67ca": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "cf4e469c878c4112bbed1d4c37a2d8da": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d04c0869e3eb46798171e88cc39e17d0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ProgressStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ProgressStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "bar_color": null, "description_width": "" } }, "d2e9482785834e2888e7da5a22087588": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_5ffd066a1a6749d1a0bc6c8bae513bd3", "placeholder": "​", "style": "IPY_MODEL_c1bcca766a5e435d86e2de9e4bf75b89", "value": "config.json: 100%" } }, "d3da9462268847d7bb773a91c8709730": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d528659578a74156ab59d48f5e492157": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_46e74b3a5bb4405f88a55183f5f6d653", "IPY_MODEL_a200698366d34e968d71a76c9528a9fc", "IPY_MODEL_a78be2de499846608acd3495d69b75ea" ], "layout": "IPY_MODEL_49ee2a0a793345c89460530514e80328" } }, "d60c4db0571d4706b718076c666cac5a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "d8c84f0d3abf43848396a0109ff43216": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "db38d933987c4a06a0412c4ae4b323c0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e5dbb25ff07e4d268013572b5ba29cff", "max": 551, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_139d3411bc354c0c8aa8d57c2cc68ca1", "value": 551 } }, "dcd4b2a285e64ee8ae8e8a8e905b54a2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "FloatProgressModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "FloatProgressModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ProgressView", "bar_style": "success", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_6823603a37804a1ebff1a8faf0888024", "max": 608, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_d04c0869e3eb46798171e88cc39e17d0", "value": 608 } }, "e130daf551894aaa9ed52af639261f85": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e5dbb25ff07e4d268013572b5ba29cff": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f1e917a93d7b4e8f831d508fa38e98ca": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f94634ed23ee44b4bfda3b8d4d6e6ffe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_6a34f0da12e84bc1aa0107681e70651a", "placeholder": "​", "style": "IPY_MODEL_6c660cbd9cf6437593b5d0ccc557c767", "value": " 2.20G/2.20G [00:26<00:00, 118MB/s]" } }, "fa06f9a8334c47ca9fdbb7eebdda9841": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_7f432508a76d41ddb65b3ccf0de9f7d1", "placeholder": "​", "style": "IPY_MODEL_26ea530125f5483d925e18ac5b22aa2b", "value": " 1.29k/? [00:00<00:00, 117kB/s]" } }, "feb5dfdc846e4b7699ce3de4946c075b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } } } } }, "nbformat": 4, "nbformat_minor": 4 }