{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "view-in-github", "colab_type": "text" }, "source": [ "\"Open" ] }, { "cell_type": "code", "source": [ "!pip install -qU langchain_openai langchain_huggingface langchain_core langchain langchain_community langchain-text-splitters" ], "metadata": { "id": "O4IK-XaJpM2w" }, "execution_count": 1, "outputs": [] }, { "cell_type": "code", "source": [ "!pip install -qU faiss-cpu python-pptx==1.0.2 nltk==3.9.1 pymupdf beautifulsoup4 lxml" ], "metadata": { "id": "S_ZycFsHpMw2" }, "execution_count": 2, "outputs": [] }, { "cell_type": "code", "source": [ "!pip install datasets==3.2.0" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "eVnYMfImqqYY", "outputId": "f99d0794-1de0-4f27-d063-dfbeee61b489" }, "execution_count": 3, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: datasets==3.2.0 in /usr/local/lib/python3.11/dist-packages (3.2.0)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (3.17.0)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (1.26.4)\n", "Requirement already satisfied: pyarrow>=15.0.0 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (17.0.0)\n", "Requirement already satisfied: dill<0.3.9,>=0.3.0 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (0.3.8)\n", "Requirement already satisfied: pandas in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (2.2.2)\n", "Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (2.32.3)\n", "Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (4.67.1)\n", "Requirement already satisfied: xxhash in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (3.5.0)\n", "Requirement already satisfied: multiprocess<0.70.17 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (0.70.16)\n", "Requirement already satisfied: fsspec<=2024.9.0,>=2023.1.0 in /usr/local/lib/python3.11/dist-packages (from fsspec[http]<=2024.9.0,>=2023.1.0->datasets==3.2.0) (2024.9.0)\n", "Requirement already satisfied: aiohttp in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (3.11.12)\n", "Requirement already satisfied: huggingface-hub>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (0.28.1)\n", "Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (24.2)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from datasets==3.2.0) (6.0.2)\n", "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (2.4.6)\n", "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (1.3.2)\n", "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (25.1.0)\n", "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (1.5.0)\n", "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (6.1.0)\n", "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (0.2.1)\n", "Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp->datasets==3.2.0) (1.18.3)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.23.0->datasets==3.2.0) (4.12.2)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.2->datasets==3.2.0) (3.4.1)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.2->datasets==3.2.0) (3.10)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.2->datasets==3.2.0) (2.3.0)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests>=2.32.2->datasets==3.2.0) (2025.1.31)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from pandas->datasets==3.2.0) (2.8.2)\n", "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.11/dist-packages (from pandas->datasets==3.2.0) (2025.1)\n", "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.11/dist-packages (from pandas->datasets==3.2.0) (2025.1)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.8.2->pandas->datasets==3.2.0) (1.17.0)\n" ] } ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "id": "bjWpafsdpEC6" }, "outputs": [], "source": [ "import nest_asyncio\n", "\n", "nest_asyncio.apply()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ci8L8bXOpEC7", "outputId": "6d67456c-f118-4e85-ff01-c6dfc255b356" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Enter Your OpenAI API Key: ··········\n" ] } ], "source": [ "import os\n", "import getpass\n", "\n", "os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(\"Enter Your OpenAI API Key: \")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "a8JCw5cjpEC7", "outputId": "abd44bae-875a-49ca-a9d2-4cec07930053" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "mkdir: cannot create directory ‘static/’: File exists\n", "mkdir: cannot create directory ‘static/training_data’: File exists\n", " % Total % Received % Xferd Average Speed Time Time Time Current\n", " Dload Upload Total Spent Left Speed\n", "100 340k 100 340k 0 0 1649k 0 --:--:-- --:--:-- --:--:-- 1652k\n" ] } ], "source": [ "!mkdir static/\n", "!mkdir static/training_data\n", "!curl https://python.langchain.com/docs/tutorials/rag/ -o static/training_data/langchain_rag_tutorial.html" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "w1jVcY__pEC7", "outputId": "94d2ef01-7c66-4836-8c9c-be06a83fe65c" }, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "1" ] }, "metadata": {}, "execution_count": 7 } ], "source": [ "from langchain_community.document_loaders import DirectoryLoader\n", "from langchain_community.document_loaders import BSHTMLLoader\n", "\n", "path = \"static/training_data/\"\n", "text_loader = DirectoryLoader(path, glob=\"*.html\", loader_cls=BSHTMLLoader)\n", "docs = text_loader.load()\n", "len(docs)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "m6-krgUrpEC7", "outputId": "c566f00e-9842-48b8-f84a-b9bb63516444" }, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "81" ] }, "metadata": {}, "execution_count": 8 } ], "source": [ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", "text_splitter = RecursiveCharacterTextSplitter(\n", " chunk_size = 750,\n", " chunk_overlap = 20,\n", " length_function = len\n", ")\n", "training_documents = text_splitter.split_documents(text_loader.load())\n", "len(training_documents)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "id": "JSIE4CqYpEC7" }, "outputs": [], "source": [ "import uuid\n", "\n", "id_set = set()\n", "\n", "for document in training_documents:\n", " id = str(uuid.uuid4())\n", " while id in id_set:\n", " id = uuid.uuid4()\n", " id_set.add(id)\n", " document.metadata[\"id\"] = id" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "id": "-lPkNLzcpEC8" }, "outputs": [], "source": [ "# break up training documents into training, validation, and test sets\n", "import random\n", "\n", "# set seed for reproducibility\n", "random.seed(42)\n", "\n", "random.shuffle(training_documents)\n", "\n", "training_split_documents = training_documents[:int(0.8 * len(training_documents))]\n", "val_split_documents = training_documents[int(0.8 * len(training_documents)):int(0.9 * len(training_documents))]\n", "test_split_documents = training_documents[int(0.9 * len(training_documents)):]" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "id": "5ckUQad1pEC8" }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 10, "metadata": { "id": "nNS_UDSOpEC8" }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 11, "metadata": { "id": "3q7YaP_lpEC8" }, "outputs": [], "source": [ "from langchain_openai import ChatOpenAI\n", "\n", "qa_chat_model = ChatOpenAI(\n", " model=\"gpt-4o-mini\",\n", " temperature=0\n", ")\n", "\n", "from langchain_core.prompts import ChatPromptTemplate\n", "\n", "qa_prompt = \"\"\"\\\n", "Given the following context, you must generate questions based on only the provided context.\n", "\n", "You are to generate {n_questions} questions which should be provided in the following format:\n", "\n", "1. QUESTION #1\n", "2. QUESTION #2\n", "...\n", "\n", "Context:\n", "{context}\n", "\"\"\"\n", "\n", "qa_prompt_template = ChatPromptTemplate.from_template(qa_prompt)\n", "question_generation_chain = qa_prompt_template | qa_chat_model" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "id": "EocviZT0pEC8" }, "outputs": [], "source": [ "import tqdm\n", "\n", "async def create_questions(documents, n_questions):\n", " questions = {}\n", " contexts = {}\n", " for document in documents:\n", " question = await question_generation_chain.ainvoke({\"context\": document.page_content, \"n_questions\": n_questions})\n", " questions[document.metadata[\"id\"]] = question\n", " contexts[document.metadata[\"id\"]] = [document.metadata[\"id\"]]\n", " return questions, contexts" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "id": "3QBN1GDUpEC8" }, "outputs": [], "source": [ "training_questions, training_relevant_contexts = await create_questions(training_split_documents, 2)\n", "val_questions, val_relevant_contexts = await create_questions(val_split_documents, 2)\n", "test_questions, test_relevant_contexts = await create_questions(test_split_documents, 2)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "id": "kEfNTkqXpEC8" }, "outputs": [], "source": [ "import json\n", "\n", "training_corpus = {train_item.metadata[\"id\"] : train_item.page_content for train_item in training_split_documents}\n", "\n", "# Convert AIMessage objects to their string content\n", "training_questions_serializable = {k: v.content for k, v in training_questions.items()}\n", "\n", "train_dataset = {\n", " \"questions\": training_questions_serializable,\n", " \"relevant_contexts\": training_relevant_contexts,\n", " \"corpus\": training_corpus\n", "}\n", "\n", "with open(\"static/training_data/training_dataset.jsonl\", \"w\") as f:\n", " json.dump(train_dataset, f)\n", "\n", "val_corpus = {val_item.metadata[\"id\"] : val_item.page_content for val_item in val_split_documents}\n", "\n", "# Convert AIMessage objects to their string content\n", "val_questions_serializable = {k: v.content for k, v in val_questions.items()}\n", "\n", "val_dataset = {\n", " \"questions\": val_questions_serializable,\n", " \"relevant_contexts\": val_relevant_contexts,\n", " \"corpus\": val_corpus\n", "}\n", "\n", "with open(\"static/training_data/val_dataset.jsonl\", \"w\") as f:\n", " json.dump(val_dataset, f)\n", "\n", "test_corpus = {test_item.metadata[\"id\"] : test_item.page_content for test_item in test_split_documents}\n", "\n", "# Convert AIMessage objects to their string content\n", "test_questions_serializable = {k: v.content for k, v in test_questions.items()}\n", "\n", "test_dataset = {\n", " \"questions\": test_questions_serializable,\n", " \"relevant_contexts\": test_relevant_contexts,\n", " \"corpus\": test_corpus\n", "}\n", "\n", "with open(\"static/training_data/test_dataset.jsonl\", \"w\") as f:\n", " json.dump(test_dataset, f)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "id": "abFeG5OcpEC8" }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 15, "metadata": { "id": "asyH4PlYpEC8" }, "outputs": [], "source": [ "from sentence_transformers import SentenceTransformer\n", "\n", "model_id = \"Snowflake/snowflake-arctic-embed-l\"\n", "model = SentenceTransformer(model_id)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "id": "0hYIXL4KpEC8" }, "outputs": [], "source": [ "from torch.utils.data import DataLoader\n", "from torch.utils.data import Dataset\n", "from sentence_transformers import InputExample\n", "\n", "corpus = train_dataset['corpus']\n", "queries = train_dataset['questions']\n", "relevant_docs = train_dataset['relevant_contexts']\n", "\n", "examples = []\n", "for query_id, query in queries.items():\n", " doc_id = relevant_docs[query_id][0]\n", " text = corpus[doc_id]\n", " example = InputExample(texts=[query, text])\n", " examples.append(example)\n", "\n", "BATCH_SIZE = 16\n", "\n", "loader = DataLoader(\n", " examples,\n", " batch_size=BATCH_SIZE,\n", ")\n", "\n", "from sentence_transformers.losses import MatryoshkaLoss, MultipleNegativesRankingLoss\n", "\n", "matryoshka_dimensions = [768, 512, 256, 128, 64]\n", "inner_train_loss = MultipleNegativesRankingLoss(model)\n", "train_loss = MatryoshkaLoss(\n", " model, inner_train_loss, matryoshka_dims=matryoshka_dimensions\n", ")" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "id": "W6FFdpMVpEC8" }, "outputs": [], "source": [ "from sentence_transformers.evaluation import InformationRetrievalEvaluator\n", "\n", "corpus = val_dataset['corpus']\n", "queries = val_dataset['questions']\n", "relevant_docs = val_dataset['relevant_contexts']\n", "\n", "evaluator = InformationRetrievalEvaluator(queries, corpus, relevant_docs)" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "id": "lfWUVDLgpEC8" }, "outputs": [], "source": [ "EPOCHS = 10" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 39 }, "id": "AKU7tS0ApEC8", "outputId": "5243bf3d-1d8d-4814-a5dd-07c8f7993eaf" }, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "execution_count": 19 } ], "source": [ "import wandb\n", "wandb.init(mode=\"disabled\")" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 444, "referenced_widgets": [ "fe3544500fe3490ea8160ad8f97dd83b", "1436400ef9f9436b893b2648595470ed", "a5629e7f756241799849d12b80ea9d2f", "76f58839f7234aa4aaff371e3ebeef0f", "760803fdf5714bd286fde5bfe6d19028", "7501478ab7dd4bcaa9f86deb1cf34389", "743ba854952e487c93f0627dee07bc23", "232877e6cf6b4d7192fc4f53cc66a517", "155509672c344ad5882c70df24152a02", "cb3c554ebacd430aa3f8d87d7ccbba30", "66a090103ac74ea98af40ad3645c1ba8" ] }, "id": "5yJo1jKlpEC8", "outputId": "4f8dfa01-5030-4e1f-b3cf-ee60dad979d7" }, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "Computing widget examples: 0%| | 0/1 [00:00" ], "text/html": [ "\n", "
\n", " \n", " \n", " [40/40 00:27, Epoch 10/10]\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \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 LossValidation LossCosine Accuracy@1Cosine Accuracy@3Cosine Accuracy@5Cosine Accuracy@10Cosine Precision@1Cosine Precision@3Cosine Precision@5Cosine Precision@10Cosine Recall@1Cosine Recall@3Cosine Recall@5Cosine Recall@10Cosine Ndcg@10Cosine Mrr@10Cosine Map@100
4No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
8No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
12No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
16No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
20No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
24No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
28No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
32No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
36No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000
40No logNo log1.0000001.0000001.0000001.0000001.0000000.3333330.2000000.1000001.0000001.0000001.0000001.0000001.0000001.0000001.000000

" ] }, "metadata": {} } ], "source": [ "import datasets\n", "\n", "warmup_steps = int(len(loader) * EPOCHS * 0.1)\n", "\n", "model.fit(\n", " train_objectives=[(loader, train_loss)],\n", " epochs=EPOCHS,\n", " warmup_steps=warmup_steps,\n", " output_path='finetuned_arctic_ft',\n", " show_progress_bar=True,\n", " evaluator=evaluator,\n", " evaluation_steps=50\n", ")" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 17, "referenced_widgets": [ "cfa4b24acf1448658fce192d13fb85c7", "d1517b337e1945dab7d74747a532490e", "96998de625454d9f931147916b68111b", "50fff0e983184c2698e9283bcf15f6dd", "67dd35582b944946b86c9b2068590541", "45f142dbf1094059950d919db640f26d", "fbf244b28188469cbcb9ea45606a5ed9", "9565038f3a5e4ba9a75068ec1202e6ce", "c1ca1e0b8d674958b6bcca0f7ab233af", "a5e4c1fa2bb24065bf24b554af13a262", "e7c075f1cd114e21a98bd327c40bf031", "6eba55470c4d4853a9c5c0973a1ee824", "e63de24055d24199b01aac0110764fb6", "b613cff44000413cac23d92700d0f655", "0df923ccb7cd4033acdd31a3f8c314dd", "91ecbd26c4044e8390df9ea10f39f4aa", "cd55bad731bb447e8240a9bb75ae37c7", "fa7d463c6c024650987153f678953d46", "faa9359e3a3d4af0bdc50e1a846c5b78", "ecfb24224b454baabeae4dfb3c9faa22" ] }, "id": "1g9JJiNTpEC8", "outputId": "7b2cc05e-5f7e-4576-b562-a463df90fcba" }, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "VBox(children=(HTML(value='


Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.
" } }, "96998de625454d9f931147916b68111b": { "model_module": "@jupyter-widgets/controls", "model_name": "PasswordModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "PasswordModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "PasswordView", "continuous_update": true, "description": "Token:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_a5e4c1fa2bb24065bf24b554af13a262", "placeholder": "​", "style": "IPY_MODEL_e7c075f1cd114e21a98bd327c40bf031", "value": "" } }, "50fff0e983184c2698e9283bcf15f6dd": { "model_module": "@jupyter-widgets/controls", "model_name": "CheckboxModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "CheckboxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "CheckboxView", "description": "Add token as git credential?", "description_tooltip": null, "disabled": false, "indent": true, "layout": "IPY_MODEL_6eba55470c4d4853a9c5c0973a1ee824", "style": "IPY_MODEL_e63de24055d24199b01aac0110764fb6", "value": true } }, "67dd35582b944946b86c9b2068590541": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Login", "disabled": false, "icon": "", "layout": "IPY_MODEL_b613cff44000413cac23d92700d0f655", "style": "IPY_MODEL_0df923ccb7cd4033acdd31a3f8c314dd", "tooltip": "" } }, "45f142dbf1094059950d919db640f26d": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "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_91ecbd26c4044e8390df9ea10f39f4aa", "placeholder": "​", "style": "IPY_MODEL_cd55bad731bb447e8240a9bb75ae37c7", "value": "\nPro Tip: If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. " } }, "fbf244b28188469cbcb9ea45606a5ed9": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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": "center", "align_self": null, "border": null, "bottom": null, "display": "flex", "flex": null, "flex_flow": "column", "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": "50%" } }, "9565038f3a5e4ba9a75068ec1202e6ce": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "c1ca1e0b8d674958b6bcca0f7ab233af": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": "" } }, "a5e4c1fa2bb24065bf24b554af13a262": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "e7c075f1cd114e21a98bd327c40bf031": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": "" } }, "6eba55470c4d4853a9c5c0973a1ee824": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "e63de24055d24199b01aac0110764fb6": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": "" } }, "b613cff44000413cac23d92700d0f655": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "0df923ccb7cd4033acdd31a3f8c314dd": { "model_module": "@jupyter-widgets/controls", "model_name": "ButtonStyleModel", "model_module_version": "1.5.0", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "91ecbd26c4044e8390df9ea10f39f4aa": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "cd55bad731bb447e8240a9bb75ae37c7": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": "" } }, "fa7d463c6c024650987153f678953d46": { "model_module": "@jupyter-widgets/controls", "model_name": "LabelModel", "model_module_version": "1.5.0", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_faa9359e3a3d4af0bdc50e1a846c5b78", "placeholder": "​", "style": "IPY_MODEL_ecfb24224b454baabeae4dfb3c9faa22", "value": "Connecting..." } }, "faa9359e3a3d4af0bdc50e1a846c5b78": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "ecfb24224b454baabeae4dfb3c9faa22": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": "" } }, "838a80e21ed14386b752cfcde4411794": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "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_e0be2afe8a394ade988451c70c72365f", "IPY_MODEL_e947bfcd5f564b2fbd5b2e1cf2456b67", "IPY_MODEL_54eb0595ae514931940ddff693480593" ], "layout": "IPY_MODEL_bd0c87b78eab49e6b3b6798514409baf" } }, "e0be2afe8a394ade988451c70c72365f": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "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_e05d3cf5258042d28a1902ed3572ac06", "placeholder": "​", "style": "IPY_MODEL_10e99c32989f4cbc98956b3e79fdce29", "value": "model.safetensors: 100%" } }, "e947bfcd5f564b2fbd5b2e1cf2456b67": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "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_9057b3adcfc84ab9be91ae87d6194ece", "max": 1336413848, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_1db227928181429880c22653ba282906", "value": 1336413848 } }, "54eb0595ae514931940ddff693480593": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "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_4a7bee32a1684ea3803c9f1613dc667f", "placeholder": "​", "style": "IPY_MODEL_3e7cf2771b4b443781bc4bc0d77d039a", "value": " 1.34G/1.34G [00:27<00:00, 51.1MB/s]" } }, "bd0c87b78eab49e6b3b6798514409baf": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "e05d3cf5258042d28a1902ed3572ac06": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "10e99c32989f4cbc98956b3e79fdce29": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": "" } }, "9057b3adcfc84ab9be91ae87d6194ece": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "1db227928181429880c22653ba282906": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "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": "" } }, "4a7bee32a1684ea3803c9f1613dc667f": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "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 } }, "3e7cf2771b4b443781bc4bc0d77d039a": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "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": 0 }