diff --git a/lab-extractive-question-answering.ipynb b/lab-extractive-question-answering.ipynb index 2d7d5e3..ddc2e5a 100644 --- a/lab-extractive-question-answering.ipynb +++ b/lab-extractive-question-answering.ipynb @@ -21,7 +21,9 @@ { "cell_type": "markdown", "id": "e3f44179", - "metadata": {}, + "metadata": { + "id": "e3f44179" + }, "source": [ "
\n", "\n", @@ -88,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "expressed-executive", "metadata": { "execution": { @@ -105,9 +107,33 @@ "start_time": "2021-04-15T21:06:39.788378", "status": "completed" }, - "tags": [] + "tags": [], + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "62036e57-0412-4ba0-ccdb-d9aac20bef27" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.1/44.1 kB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.0/10.0 MB\u001b[0m \u001b[31m83.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m515.2/515.2 kB\u001b[0m \u001b[31m40.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m427.3/427.3 kB\u001b[0m \u001b[31m34.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m24.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m447.8/447.8 kB\u001b[0m \u001b[31m32.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m87.5/87.5 kB\u001b[0m \u001b[31m8.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.1/50.1 MB\u001b[0m \u001b[31m51.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.0/3.0 MB\u001b[0m \u001b[31m103.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "diffusers 0.39.0 requires huggingface-hub<2.0,>=0.34.0, but you have huggingface-hub 0.26.5 which is incompatible.\n", + "gradio 6.20.0 requires huggingface-hub<2.0,>=1.2.0, but you have huggingface-hub 0.26.5 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0m" + ] + } + ], "source": [ "!pip install -q \\\n", " transformers==4.46.3 \\\n", @@ -115,7 +141,7 @@ " pinecone==5.4.2 \\\n", " sentence-transformers==3.3.1 \\\n", " huggingface_hub==0.26.5\n", - " \n", + "\n", "!rm -rf ~/.cache/huggingface\n", "\n", "\n", @@ -134,9 +160,24 @@ "execution_count": null, "id": "2DCPtl6IhgSz", "metadata": { - "id": "2DCPtl6IhgSz" + "id": "2DCPtl6IhgSz", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "ea603649-125c-46d1-e759-ecfa27ffcec5" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "⚠️ WARNING:\n", + "This code cell will restart the kernel to load the newly installed packages...\n", + "If you used 'Run all', it will stop here — that's expected.\n", + "See the note below on how to continue running the rest of the notebook.\n" + ] + } + ], "source": [ "# Force-kill the kernel process to restart it, ensuring the newly\n", "# installed/uninstalled package versions are loaded in a fresh process\n", @@ -159,7 +200,9 @@ { "cell_type": "markdown", "id": "d339487b", - "metadata": {}, + "metadata": { + "id": "d339487b" + }, "source": [ "
\n", "\n", @@ -175,14 +218,16 @@ { "cell_type": "markdown", "id": "2a62f4d8", - "metadata": {}, + "metadata": { + "id": "2a62f4d8" + }, "source": [ "# Setup for Pinecone" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "WDBzNVM4hqTB", "metadata": { "id": "WDBzNVM4hqTB" @@ -195,13 +240,13 @@ "_ = load_dotenv(find_dotenv())\n", "\n", "#\n", - "# For this notebook, you'll need a Pinecone API key, \n", + "# For this notebook, you'll need a Pinecone API key,\n", "# to get one, sign up for free at https://app.pinecone.io/,\n", "# then go to \"API Keys\" and copy the default key (or create a new one).\n", "#\n", "# Once you have your Pinecone API key,\n", - "# load it from Colab's \"Secrets\" manager \n", - "# (the key icon in the left sidebar). \n", + "# load it from Colab's \"Secrets\" manager\n", + "# (the key icon in the left sidebar).\n", "# Add a secret named PINECONE_API_KEY there and enable notebook access.\n", "#\n", "PINECONE_API_KEY= userdata.get('PINECONE_API_KEY')" @@ -229,7 +274,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "id": "J250IJeh7NIb", "metadata": { "id": "J250IJeh7NIb" @@ -244,17 +289,287 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "id": "FcmeNO97dHDO", "metadata": { - "id": "FcmeNO97dHDO" + "id": "FcmeNO97dHDO", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 424 + }, + "outputId": "e8d7564b-e098-42cc-f48a-1d5e3c4e7c62" }, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " title \\\n", + "0 University_of_Notre_Dame \n", + "5 University_of_Notre_Dame \n", + "10 University_of_Notre_Dame \n", + "15 University_of_Notre_Dame \n", + "20 University_of_Notre_Dame \n", + "... ... \n", + "87574 Kathmandu \n", + "87579 Kathmandu \n", + "87584 Kathmandu \n", + "87589 Kathmandu \n", + "87594 Kathmandu \n", + "\n", + " context \n", + "0 Architecturally, the school has a Catholic cha... \n", + "5 As at most other universities, Notre Dame's st... \n", + "10 The university is the major seat of the Congre... \n", + "15 The College of Engineering was established in ... \n", + "20 All of Notre Dame's undergraduate students are... \n", + "... ... \n", + "87574 Institute of Medicine, the central college of ... \n", + "87579 Football and Cricket are the most popular spor... \n", + "87584 The total length of roads in Nepal is recorded... \n", + "87589 The main international airport serving Kathman... \n", + "87594 Kathmandu Metropolitan City (KMC), in order to... \n", + "\n", + "[18891 rows x 2 columns]" + ], + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
titlecontext
0University_of_Notre_DameArchitecturally, the school has a Catholic cha...
5University_of_Notre_DameAs at most other universities, Notre Dame's st...
10University_of_Notre_DameThe university is the major seat of the Congre...
15University_of_Notre_DameThe College of Engineering was established in ...
20University_of_Notre_DameAll of Notre Dame's undergraduate students are...
.........
87574KathmanduInstitute of Medicine, the central college of ...
87579KathmanduFootball and Cricket are the most popular spor...
87584KathmanduThe total length of roads in Nepal is recorded...
87589KathmanduThe main international airport serving Kathman...
87594KathmanduKathmandu Metropolitan City (KMC), in order to...
\n", + "

18891 rows × 2 columns

\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + " \n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "dataframe", + "variable_name": "df", + "summary": "{\n \"name\": \"df\",\n \"rows\": 18891,\n \"fields\": [\n {\n \"column\": \"title\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 442,\n \"samples\": [\n \"Dominican_Order\",\n \"Brigham_Young_University\",\n \"Matter\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"context\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 18891,\n \"samples\": [\n \"More commonly, in cases where there are three or more parties, no one party is likely to gain power alone, and parties work with each other to form coalition governments. This has been an emerging trend in the politics of the Republic of Ireland since the 1980s and is almost always the case in Germany on national and state level, and in most constituencies at the communal level. Furthermore, since the forming of the Republic of Iceland there has never been a government not led by a coalition (usually of the Independence Party and one other (often the Social Democratic Alliance). A similar situation exists in the Republic of Ireland; since 1989, no one party has held power on its own. Since then, numerous coalition governments have been formed. These coalitions have been exclusively led by one of either Fianna F\\u00e1il or Fine Gael. Political change is often easier with a coalition government than in one-party or two-party dominant systems.[dubious \\u2013 discuss] If factions in a two-party system are in fundamental disagreement on policy goals, or even principles, they can be slow to make policy changes, which appears to be the case now in the U.S. with power split between Democrats and Republicans. Still coalition governments struggle, sometimes for years, to change policy and often fail altogether, post World War II France and Italy being prime examples. When one party in a two-party system controls all elective branches, however, policy changes can be both swift and significant. Democrats Woodrow Wilson, Franklin Roosevelt and Lyndon Johnson were beneficiaries of such fortuitous circumstances, as were Republicans as far removed in time as Abraham Lincoln and Ronald Reagan. Barack Obama briefly had such an advantage between 2009 and 2011.\",\n \"There has been some concern over the potential adverse environmental and ecosystem effects caused by the influx of visitors. Some environmentalists and scientists have made a call for stricter regulations for ships and a tourism quota. The primary response by Antarctic Treaty Parties has been to develop, through their Committee for Environmental Protection and in partnership with IAATO, \\\"site use guidelines\\\" setting landing limits and closed or restricted zones on the more frequently visited sites. Antarctic sightseeing flights (which did not land) operated out of Australia and New Zealand until the fatal crash of Air New Zealand Flight 901 in 1979 on Mount Erebus, which killed all 257 aboard. Qantas resumed commercial overflights to Antarctica from Australia in the mid-1990s.\",\n \"After World War II, the Guam Organic Act of 1950 established Guam as an unincorporated organized territory of the United States, provided for the structure of the island's civilian government, and granted the people U.S. citizenship. The Governor of Guam was federally appointed until 1968, when the Guam Elective Governor Act provided for the office's popular election.:242 Since Guam is not a U.S. state, U.S. citizens residing on Guam are not allowed to vote for president and their congressional representative is a non-voting member.\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" + } + }, + "metadata": {}, + "execution_count": 19 + } + ], "source": [ "# select only title and context column\n", - "df = None\n", + "df = df[['title', 'context']]\n", "# drop rows containing duplicate context passages\n", - "df = None\n", + "df = df.drop_duplicates(subset='context')\n", "df" ] }, @@ -280,7 +595,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "id": "092d1e71", "metadata": { "id": "092d1e71" @@ -311,21 +626,26 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "id": "b3206184", "metadata": { "id": "b3206184" }, "outputs": [], "source": [ - "index_name = None\n", + "index_name = \"extractive-question-answering\"\n", "\n", "# check if the extractive-question-answering index exists\n", - "if index_name not in pinecone.list_indexes().names():\n", + "if index_name not in pc.list_indexes().names():\n", " # create the index if it does not exist\n", - " None\n", + " pc.create_index(\n", + " name=index_name,\n", + " dimension=384, # dimensionality of MiniLM-L6-v2\n", + " metric='cosine',\n", + " spec=spec\n", + " )\n", "# connect to extractive-question-answering index we created\n", - "index = pinecone.Index(index_name)" + "index = pc.Index(index_name)" ] }, { @@ -357,12 +677,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "id": "31a85bb3", "metadata": { - "id": "31a85bb3" + "id": "31a85bb3", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 35 + }, + "outputId": "d39c6da5-e840-4fba-dd7b-a3d53a44574e" }, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "'multi-qa-MiniLM-L6-cos-v1'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 22 + } + ], "source": [ "import torch\n", "from sentence_transformers import SentenceTransformer\n", @@ -370,7 +709,7 @@ "# set device to GPU if available\n", "device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", "# load the retriever model from huggingface model hub\n", - "retriever = None #use the 'multi-qa-MiniLM-L6-cos-v1' model from HuggingFace to build the retriever\n", + "retriever = 'multi-qa-MiniLM-L6-cos-v1' #use the 'multi-qa-MiniLM-L6-cos-v1' model from HuggingFace to build the retriever\n", "\n", "retriever" ] @@ -397,32 +736,94 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "id": "a17824ef", "metadata": { "id": "a17824ef", - "tags": [] + "tags": [], + "colab": { + "base_uri": "https://localhost:8080/", + "height": 120, + "referenced_widgets": [ + "8ac3b2abf9724e6c964ed55f7917a500", + "6a6f55526ebd43fb99f89b6d98a4b7ca", + "95d3657438b64c80891acb808290331f", + "67cd29f35dc944799dec5cd9cf480432", + "61d62b684b2b432cb7c846ffcd1bef5f", + "94561dc6eeee4c0ba41dc479c911677e", + "6a218bcad90c43c98d0f7dbf12f194d8", + "a029b0e10da6484bba5aade763e191d8", + "d60efcf4b4f04c269aad4edd9fc0a8c3", + "c55ec5c98561461cac164de978eb2507", + "e2326be2383c47f0b9a3f7da005f27b3" + ] + }, + "outputId": "66807ef0-d243-4910-e210-74619b652df7" }, - "outputs": [], + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + " 0%| | 0/296 [00:00" + ] + }, + "metadata": {}, + "execution_count": 26 + } + ], "source": [ "from transformers import pipeline\n", "\n", @@ -482,7 +1026,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "id": "lyYaY3QEQiHZ", "metadata": { "id": "lyYaY3QEQiHZ" @@ -492,18 +1036,17 @@ "# gets context passages from the pinecone index\n", "def get_context(question, top_k):\n", " # generate embeddings for the question\n", - " xq = None\n", + " xq = retriever_model.encode(question).tolist()\n", " # search pinecone index for context passage with the answer\n", - " xc = None\n", + " xc = index.query(vector=xq, top_k=top_k, include_metadata=True)\n", " # extract the context passage from pinecone search result\n", - " c = None\n", - " return c\n", - "\n" + " c = [match['metadata']['context'] for match in xc['matches']]\n", + " return c" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 28, "id": "Dc9VYOiUQA7B", "metadata": { "id": "Dc9VYOiUQA7B" @@ -528,12 +1071,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "id": "5E3a3dkJ5ZQD", "metadata": { - "id": "5E3a3dkJ5ZQD" + "id": "5E3a3dkJ5ZQD", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "363600a1-5c62-4145-a367-9fb5786dce56" }, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['Egypt was producing 691,000 bbl/d of oil and 2,141.05 Tcf of natural gas (in 2013), which makes Egypt as the largest oil producer not member of the Organization of the Petroleum Exporting Countries (OPEC) and the second-largest dry natural gas producer in Africa. In 2013, Egypt was the largest consumer of oil and natural gas in Africa, as more than 20% of total oil consumption and more than 40% of total dry natural gas consumption in Africa. Also, Egypt possesses the largest oil refinery capacity in Africa 726,000 bbl/d (in 2012). Egypt is currently planning to build its first nuclear power plant in El Dabaa city, northern Egypt.']" + ] + }, + "metadata": {}, + "execution_count": 29 + } + ], "source": [ "question = \"How much oil is Egypt producing in a day?\"\n", "context = get_context(question, top_k = 1)\n", @@ -552,12 +1110,38 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 30, "id": "DQ4GWdbMSjPl", "metadata": { - "id": "DQ4GWdbMSjPl" + "id": "DQ4GWdbMSjPl", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "1e3ddc7b-8c2b-49a3-abf6-4d9ad1399acd" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[{'answer': '691,000 bbl/d',\n", + " 'context': 'Egypt was producing 691,000 bbl/d of oil and 2,141.05 Tcf of '\n", + " 'natural gas (in 2013), which makes Egypt as the largest oil '\n", + " 'producer not member of the Organization of the Petroleum '\n", + " 'Exporting Countries (OPEC) and the second-largest dry natural '\n", + " 'gas producer in Africa. In 2013, Egypt was the largest consumer '\n", + " 'of oil and natural gas in Africa, as more than 20% of total oil '\n", + " 'consumption and more than 40% of total dry natural gas '\n", + " 'consumption in Africa. Also, Egypt possesses the largest oil '\n", + " 'refinery capacity in Africa 726,000 bbl/d (in 2012). Egypt is '\n", + " 'currently planning to build its first nuclear power plant in El '\n", + " 'Dabaa city, northern Egypt.',\n", + " 'end': 33,\n", + " 'score': 0.9999852180480957,\n", + " 'start': 20}]\n" + ] + } + ], "source": [ "extract_answer(question, context)" ] @@ -574,12 +1158,36 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 31, "id": "_4NRgV4mGWoj", "metadata": { - "id": "_4NRgV4mGWoj" + "id": "_4NRgV4mGWoj", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "8bf57625-d578-4306-c913-fa434e8e1747" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[{'answer': 'Hurley and Chen',\n", + " 'context': 'According to a story that has often been repeated in the media, '\n", + " 'Hurley and Chen developed the idea for YouTube during the early '\n", + " 'months of 2005, after they had experienced difficulty sharing '\n", + " \"videos that had been shot at a dinner party at Chen's apartment \"\n", + " 'in San Francisco. Karim did not attend the party and denied that '\n", + " 'it had occurred, but Chen commented that the idea that YouTube '\n", + " 'was founded after a dinner party \"was probably very strengthened '\n", + " 'by marketing ideas around creating a story that was very '\n", + " 'digestible\".',\n", + " 'end': 79,\n", + " 'score': 0.9999276399612427,\n", + " 'start': 64}]\n" + ] + } + ], "source": [ "question = \"What are the first names of the men that invented youtube?\"\n", "context = get_context(question, top_k=1)\n", @@ -588,12 +1196,36 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "id": "juXlctWgJgMF", "metadata": { - "id": "juXlctWgJgMF" + "id": "juXlctWgJgMF", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "51eedc96-5a31-40fc-8c77-343a3665112f" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[{'answer': 'his theories of special relativity and general relativity',\n", + " 'context': 'Albert Einstein is known for his theories of special relativity '\n", + " 'and general relativity. He also made important contributions to '\n", + " 'statistical mechanics, especially his mathematical treatment of '\n", + " 'Brownian motion, his resolution of the paradox of specific '\n", + " 'heats, and his connection of fluctuations and dissipation. '\n", + " 'Despite his reservations about its interpretation, Einstein also '\n", + " 'made contributions to quantum mechanics and, indirectly, quantum '\n", + " 'field theory, primarily through his theoretical studies of the '\n", + " 'photon.',\n", + " 'end': 86,\n", + " 'score': 0.9500371217727661,\n", + " 'start': 29}]\n" + ] + } + ], "source": [ "question = \"What is Albert Eistein famous for?\"\n", "context = get_context(question, top_k=1)\n", @@ -612,12 +1244,69 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 33, "id": "iXACn71xmett", "metadata": { - "id": "iXACn71xmett" + "id": "iXACn71xmett", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "8e852725-d4e5-4968-deae-159fb7e8c922" }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[{'answer': 'Armstrong',\n", + " 'context': 'The trip to the Moon took just over three days. After achieving '\n", + " 'orbit, Armstrong and Aldrin transferred into the Lunar Module, '\n", + " 'named Eagle, and after a landing gear inspection by Collins '\n", + " 'remaining in the Command/Service Module Columbia, began their '\n", + " 'descent. After overcoming several computer overload alarms '\n", + " 'caused by an antenna switch left in the wrong position, and a '\n", + " 'slight downrange error, Armstrong took over manual flight '\n", + " 'control at about 180 meters (590 ft), and guided the Lunar '\n", + " 'Module to a safe landing spot at 20:18:04 UTC, July 20, 1969 '\n", + " '(3:17:04 pm CDT). The first humans on the Moon would wait '\n", + " 'another six hours before they ventured out of their craft. At '\n", + " '02:56 UTC, July 21 (9:56 pm CDT July 20), Armstrong became the '\n", + " 'first human to set foot on the Moon.',\n", + " 'end': 80,\n", + " 'score': 0.9998037815093994,\n", + " 'start': 71},\n", + " {'answer': 'Aldrin',\n", + " 'context': 'The first step was witnessed by at least one-fifth of the '\n", + " 'population of Earth, or about 723 million people. His first '\n", + " \"words when he stepped off the LM's landing footpad were, \"\n", + " '\"That\\'s one small step for [a] man, one giant leap for '\n", + " 'mankind.\" Aldrin joined him on the surface almost 20 minutes '\n", + " 'later. Altogether, they spent just under two and one-quarter '\n", + " 'hours outside their craft. The next day, they performed the '\n", + " 'first launch from another celestial body, and rendezvoused back '\n", + " 'with Columbia.',\n", + " 'end': 246,\n", + " 'score': 0.695867121219635,\n", + " 'start': 240},\n", + " {'answer': 'Frank Borman',\n", + " 'context': 'On December 21, 1968, Frank Borman, James Lovell, and William '\n", + " 'Anders became the first humans to ride the Saturn V rocket into '\n", + " 'space on Apollo 8. They also became the first to leave low-Earth '\n", + " 'orbit and go to another celestial body, and entered lunar orbit '\n", + " 'on December 24. They made ten orbits in twenty hours, and '\n", + " 'transmitted one of the most watched TV broadcasts in history, '\n", + " 'with their Christmas Eve program from lunar orbit, that '\n", + " 'concluded with a reading from the biblical Book of Genesis. Two '\n", + " 'and a half hours after the broadcast, they fired their engine to '\n", + " 'perform the first trans-Earth injection to leave lunar orbit and '\n", + " 'return to the Earth. Apollo 8 safely landed in the Pacific ocean '\n", + " \"on December 27, in NASA's first dawn splashdown and recovery.\",\n", + " 'end': 34,\n", + " 'score': 0.49246710538864136,\n", + " 'start': 22}]\n" + ] + } + ], "source": [ "question = \"Who was the first person to step foot on the moon?\"\n", "context = get_context(question, top_k=3)\n", @@ -636,7 +1325,93 @@ }, { "cell_type": "code", - "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ac6e37b3", + "outputId": "94099af2-1c9b-4114-cb6c-073b5eccac63" + }, + "source": [ + "question = \"Who wrote the song 'Bohemian Rhapsody'?\"\n", + "context = get_context(question, top_k=1)\n", + "extract_answer(question, context)" + ], + "id": "ac6e37b3", + "execution_count": 34, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[{'answer': 'Freddie Mercury',\n", + " 'context': \"The group's second LP, Queen II, was released in 1974, and \"\n", + " \"features rock photographer Mick Rock's iconic image of the band \"\n", + " 'on the cover. This image would be used as the basis for the 1975 '\n", + " '\"Bohemian Rhapsody\" music video production. The album reached '\n", + " 'number five on the British album chart and became the first '\n", + " 'Queen album to chart in the UK. The Freddie Mercury-written lead '\n", + " 'single \"Seven Seas of Rhye\" reached number ten in the UK, giving '\n", + " 'the band their first hit. The album is the first real testament '\n", + " \"to the band's distinctive layered sound, and features long \"\n", + " 'complex instrumental passages, fantasy-themed lyrics, and '\n", + " 'musical virtuosity. Aside from its only single, the album also '\n", + " 'included the song \"The March of the Black Queen\", a six-minute '\n", + " 'epic which lacks a chorus. The Daily Vault described the number '\n", + " 'as \"menacing\". Critical reaction was mixed; the Winnipeg Free '\n", + " \"Press, while praising the band's debut album, described Queen II \"\n", + " 'as a \"over-produced monstrosity\". Allmusic has described the '\n", + " \"album as a favourite among the band's hardcore fans, and it is \"\n", + " 'the first of three Queen albums to feature in the book 1001 '\n", + " 'Albums You Must Hear Before You Die.',\n", + " 'end': 361,\n", + " 'score': 0.9988227486610413,\n", + " 'start': 346}]\n" + ] + } + ] + }, + { + "cell_type": "code", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "83d168d6", + "outputId": "1610e056-3c60-43d0-d7a2-3af2547728d8" + }, + "source": [ + "question = \"What is the capital of France in 2026?\"\n", + "context = get_context(question, top_k=1)\n", + "extract_answer(question, context)" + ], + "id": "83d168d6", + "execution_count": 36, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "[{'answer': 'In 2015',\n", + " 'context': \"The Paris Region is France's leading region for economic \"\n", + " 'activity, with a 2012 GDP of €624 billion (US$687 billion). In '\n", + " '2011, its GDP ranked second among the regions of Europe and its '\n", + " 'per-capita GDP was the 4th highest in Europe. While the Paris '\n", + " \"region's population accounted for 18.8 percent of metropolitan \"\n", + " \"France in 2011, the Paris region's GDP accounted for 30 percent \"\n", + " \"of metropolitan France's GDP. In 2015 it hosts the world \"\n", + " 'headquarters of 29 of the 31 Fortune Global 500 companies '\n", + " 'located in France.',\n", + " 'end': 410,\n", + " 'score': 2.686782816629235e-13,\n", + " 'start': 403}]\n" + ] + } + ] + }, + { + "cell_type": "code", + "execution_count": 37, "id": "d83f9f55-b099-4280-a12e-1d0192f4f5aa", "metadata": { "id": "d83f9f55-b099-4280-a12e-1d0192f4f5aa" @@ -655,6 +1430,89 @@ "source": [ "### Add a few more questions. What did you observe?" ] + }, + { + "cell_type": "markdown", + "source": [ + "the model will give wrong answers if the exact info is not available in the docs" + ], + "metadata": { + "id": "uUZqO5VSHxoB" + }, + "id": "uUZqO5VSHxoB" + }, + { + "cell_type": "markdown", + "metadata": { + "id": "b2a0cfcf" + }, + "source": [ + "### Learnings from Questions with Incorrect/Irrelevant Answers:\n", + "\n", + "1. **Reliance on Provided Context:** The system is an *extractive* question-answering model. This means it strictly relies on the context passages it retrieves from the Pinecone index. If the relevant information is not present in the retrieved context, it cannot generate an answer from external knowledge.\n", + "\n", + "2. **Lack of Temporal Understanding:** As seen with the question \"What is the capital of France in 2026?\", the model does not possess a sophisticated understanding of time or future events. It will attempt to find an answer within the historical or current data it was trained on and the provided context, even if the question specifies a future scenario that isn't covered.\n", + "\n", + "3. **No \"No Answer\" Capability:** A significant limitation is that the model will always try to extract *an* answer, even if the question is unanswerable from the given context or if the context is completely irrelevant. It doesn't have a mechanism to confidently state \"I don't know\" or \"The answer is not in the provided text.\"\n", + "\n", + "4. **Sensitivity to Context Quality:** The quality and relevance of the retrieved context directly impact the accuracy of the extracted answer. If the retriever fetches a less relevant context (even if it's the top-k match), the reader model will attempt to extract an answer from that suboptimal text, leading to incorrect results.\n", + "\n", + "5. **Score Interpretation:** While the reader model provides a confidence score, a high score doesn't necessarily guarantee a *correct* answer if the underlying context is misleading or the question is designed to be unanswerable from the data. For instance, in the \"capital of France in 2026\" example, despite the context being about Paris's economic activity, the model still extracted an irrelevant time reference with a very low score, indicating its uncertainty, but it still provided *something*.\n", + "\n", + "In summary, for effective extractive QA, it's crucial to have a comprehensive and relevant knowledge base (the Pinecone index) and to understand that the system's output is bounded by the information it can access." + ], + "id": "b2a0cfcf" + }, + { + "cell_type": "markdown", + "source": [ + "## Summary of Notebook Activity\n", + "\n", + "This notebook demonstrates an extractive question-answering system using Pinecone, Hugging Face transformers, and Sentence Transformers. Here's a breakdown of the steps and phases completed:\n", + "\n", + "1. **Setup and Dependency Installation:**\n", + " * Installed necessary Python packages including `transformers`, `datasets`, `pinecone`, `sentence-transformers`, and `huggingface_hub`.\n", + " * A kernel restart was performed to ensure all newly installed packages were properly loaded.\n", + "\n", + "2. **Pinecone API Key Configuration:**\n", + " * The `PINECONE_API_KEY` was securely loaded from Colab's secrets manager, enabling connection to the Pinecone service.\n", + "\n", + "3. **Dataset Loading and Preprocessing:**\n", + " * The SQuAD dataset was loaded from Hugging Face into a pandas DataFrame.\n", + " * The DataFrame was filtered to include only 'title' and 'context' columns.\n", + " * Duplicate context passages were removed, resulting in 18,891 unique context entries.\n", + "\n", + "4. **Pinecone Index Initialization:**\n", + " * A connection to Pinecone was established using the API key.\n", + " * A Pinecone index named `\"extractive-question-answering\"` was created\n", + " * The index was configured with a dimensionality of 384 and 'cosine' metric, matching the retriever model's output.\n", + "\n", + "5. **Retriever Model Initialization:**\n", + " * The `\"multi-qa-MiniLM-L6-cos-v1\"` Sentence Transformer model was selected and initialized as the retriever.\n", + "\n", + "6. **Embedding Generation and Upsertion:**\n", + " * Embeddings for all context passages from the preprocessed DataFrame were generated using the retriever model.\n", + " * The embeddings, along with associated metadata (title and context), were upserted into the `\"extractive-question-answering\"` Pinecone index in batches of 64.\n", + " * Vector IDs were generated by converting non-ASCII characters in titles to ASCII to prevent `PineconeApiException` errors.\n", + " * Successfully upserted 17,686 vectors into the index.\n", + "\n", + "7. **Reader Model Initialization:**\n", + " * The `\"deepset/electra-base-squad2\"` model was loaded into a Hugging Face question-answering pipeline, designated as the reader model.\n", + "\n", + "8. **Helper Function Definition (`get_context` & `extract_answer`):**\n", + " * The `get_context` function was defined to generate embeddings for a given question, query the Pinecone index, and retrieve relevant context passages.\n", + " * The `extract_answer` function was defined to use the reader model to extract specific answers from the retrieved context passages and sort them by score.\n", + "\n", + "9. **Question Answering Demonstration:**\n", + " * Demonstrated the system by asking several questions and successfully retrieving relevant contexts and extracting precise answers. Examples included questions about Egypt's oil production, YouTube inventors, Albert Einstein, and the first person on the moon.\n", + "\n", + "10. **Pinecone Index Cleanup:**\n", + " * The created Pinecone index `\"extractive-question-answering\"` was deleted to clean up resources." + ], + "metadata": { + "id": "Lgy2FYOXGiV8" + }, + "id": "Lgy2FYOXGiV8" } ], "metadata": { @@ -701,8 +1559,2068 @@ "interpreter": { "hash": "5fe10bf018ef3e697f9035d60bf60847932a12bface18908407fd371fe880db9" } + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "version_major": 2, + "version_minor": 0, + "state": { + "8ac3b2abf9724e6c964ed55f7917a500": { + "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_6a6f55526ebd43fb99f89b6d98a4b7ca", + "IPY_MODEL_95d3657438b64c80891acb808290331f", + "IPY_MODEL_67cd29f35dc944799dec5cd9cf480432" + ], + "layout": "IPY_MODEL_61d62b684b2b432cb7c846ffcd1bef5f" + } + }, + "6a6f55526ebd43fb99f89b6d98a4b7ca": { + "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_94561dc6eeee4c0ba41dc479c911677e", + "placeholder": "​", + "style": "IPY_MODEL_6a218bcad90c43c98d0f7dbf12f194d8", + "value": "100%" + } + }, + "95d3657438b64c80891acb808290331f": { + "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_a029b0e10da6484bba5aade763e191d8", + "max": 296, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d60efcf4b4f04c269aad4edd9fc0a8c3", + "value": 296 + } + }, + "67cd29f35dc944799dec5cd9cf480432": { + "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_c55ec5c98561461cac164de978eb2507", + "placeholder": "​", + "style": "IPY_MODEL_e2326be2383c47f0b9a3f7da005f27b3", + "value": " 296/296 [02:25<00:00,  2.14it/s]" + } + }, + "61d62b684b2b432cb7c846ffcd1bef5f": { + "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 + } + }, + "94561dc6eeee4c0ba41dc479c911677e": { + "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 + } + }, + "6a218bcad90c43c98d0f7dbf12f194d8": { + "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": "" + } + }, + "a029b0e10da6484bba5aade763e191d8": { + "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 + } + }, + "d60efcf4b4f04c269aad4edd9fc0a8c3": { + "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": "" + } + }, + "c55ec5c98561461cac164de978eb2507": { + "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 + } + }, + "e2326be2383c47f0b9a3f7da005f27b3": { + "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": "" + } + }, + "9df3b6b66e4e4db6875fea2cb25aa468": { + "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_54593724c112421db129df153245386e", + "IPY_MODEL_8ec5e683684e4b2088377a1707f9e7e2", + "IPY_MODEL_d7570d97b85c4ffcb916d2ecbe0f607f" + ], + "layout": "IPY_MODEL_052813aa5a3b43959a7593444caf7138" + } + }, + "54593724c112421db129df153245386e": { + "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_0f576639823241e58f73a96eea6fb197", + "placeholder": "​", + "style": "IPY_MODEL_29b833dd8d66438bb5afb936d864b5cf", + "value": "config.json: 100%" + } + }, + "8ec5e683684e4b2088377a1707f9e7e2": { + "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_70056e12230943efa7be07ac66539f41", + "max": 635, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_f07f2df88dbb4338bcc2b80786f9c86d", + "value": 635 + } + }, + "d7570d97b85c4ffcb916d2ecbe0f607f": { + "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_3a755b9566184effb8b9cf7d240692d4", + "placeholder": "​", + "style": "IPY_MODEL_9a93663d24434ad18d66dd1c53a5c76b", + "value": " 635/635 [00:00<00:00, 67.3kB/s]" + } + }, + "052813aa5a3b43959a7593444caf7138": { + "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 + } + }, + "0f576639823241e58f73a96eea6fb197": { + "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 + } + }, + "29b833dd8d66438bb5afb936d864b5cf": { + "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": "" + } + }, + "70056e12230943efa7be07ac66539f41": { + "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 + } + }, + "f07f2df88dbb4338bcc2b80786f9c86d": { + "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": "" + } + }, + "3a755b9566184effb8b9cf7d240692d4": { + "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 + } + }, + "9a93663d24434ad18d66dd1c53a5c76b": { + "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": "" + } + }, + "7c709c0a562a417db3749648647d0cad": { + "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_0cf49ed723034632a1b68473e2c3a33f", + "IPY_MODEL_d164b33586c5449198221e5f4cd9735e", + "IPY_MODEL_3b3f310de2184564811a1dca1bbf7dc6" + ], + "layout": "IPY_MODEL_c8581e76eb09493bb9b54ba4392ef72d" + } + }, + "0cf49ed723034632a1b68473e2c3a33f": { + "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_18bb2caaf49a498591810529cac52708", + "placeholder": "​", + "style": "IPY_MODEL_8fca705f5b4e452abe2c6439543579c0", + "value": "model.safetensors: 100%" + } + }, + "d164b33586c5449198221e5f4cd9735e": { + "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_7f606d568f134d219ad03691d8fa7a53", + "max": 435596678, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d2bf7fc0f65b481e82b998d9d5ca5f08", + "value": 435596678 + } + }, + "3b3f310de2184564811a1dca1bbf7dc6": { + "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_8b5aee2288d341fc84d3ff6781c5e8f6", + "placeholder": "​", + "style": "IPY_MODEL_a2d73c5808e4402eb469e6879c2fa7fe", + "value": " 436M/436M [00:03<00:00, 109MB/s]" + } + }, + "c8581e76eb09493bb9b54ba4392ef72d": { + "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 + } + }, + "18bb2caaf49a498591810529cac52708": { + "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 + } + }, + "8fca705f5b4e452abe2c6439543579c0": { + "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": "" + } + }, + "7f606d568f134d219ad03691d8fa7a53": { + "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 + } + }, + "d2bf7fc0f65b481e82b998d9d5ca5f08": { + "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": "" + } + }, + "8b5aee2288d341fc84d3ff6781c5e8f6": { + "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 + } + }, + "a2d73c5808e4402eb469e6879c2fa7fe": { + "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": "" + } + }, + "5a298389566a4fa58e3ad40f19c0cc2a": { + "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_f0e063711470489d92e4a5d3e3c2de87", + "IPY_MODEL_60db5958d0374515add3356de8eb0c1e", + "IPY_MODEL_2426c4320d32459b9e5f23449140dca1" + ], + "layout": "IPY_MODEL_927d9019adb143fea11646fcb1e6525c" + } + }, + "f0e063711470489d92e4a5d3e3c2de87": { + "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_e698f860a5d84201977f45c09b533a2d", + "placeholder": "​", + "style": "IPY_MODEL_d8fae9b1f61d4c0d833b3bc0aa46d75b", + "value": "tokenizer_config.json: 100%" + } + }, + "60db5958d0374515add3356de8eb0c1e": { + "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_6926ee13999d44cfb863a278cfe3800c", + "max": 200, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a9356e06a81847acbc3e41a4d1f8f0d4", + "value": 200 + } + }, + "2426c4320d32459b9e5f23449140dca1": { + "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_4f9f72d57239492f899f4424cd797db8", + "placeholder": "​", + "style": "IPY_MODEL_0f6267da93eb439191888b9a210f1d2e", + "value": " 200/200 [00:00<00:00, 27.1kB/s]" + } + }, + "927d9019adb143fea11646fcb1e6525c": { + "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 + } + }, + "e698f860a5d84201977f45c09b533a2d": { + "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 + } + }, + "d8fae9b1f61d4c0d833b3bc0aa46d75b": { + "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": "" + } + }, + "6926ee13999d44cfb863a278cfe3800c": { + "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 + } + }, + "a9356e06a81847acbc3e41a4d1f8f0d4": { + "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": "" + } + }, + "4f9f72d57239492f899f4424cd797db8": { + "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 + } + }, + "0f6267da93eb439191888b9a210f1d2e": { + "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": "" + } + }, + "4a42316bdad74a4f8d40f2a253898092": { + "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_3ab7ad88e4d64ab3aae95a08cb2cd065", + "IPY_MODEL_f808ecac23814533864b6598a91fd444", + "IPY_MODEL_e6b2058fb7764f51946a20a31be7af3e" + ], + "layout": "IPY_MODEL_1d68a43488894555ac25813c45dd2e14" + } + }, + "3ab7ad88e4d64ab3aae95a08cb2cd065": { + "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_994215fe205c4d9380d099d7eff8e978", + "placeholder": "​", + "style": "IPY_MODEL_33ebc9745e724d57a7344c8579e54133", + "value": "vocab.txt: " + } + }, + "f808ecac23814533864b6598a91fd444": { + "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_cab35d000306426a8108e16a05124d06", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e3599f1660834e538d908fc9ce36e34c", + "value": 1 + } + }, + "e6b2058fb7764f51946a20a31be7af3e": { + "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_9265755275204723aa2a572ab1a85c55", + "placeholder": "​", + "style": "IPY_MODEL_c851e3835d92442587dae023e91e6bcf", + "value": " 232k/? [00:00<00:00, 10.2MB/s]" + } + }, + "1d68a43488894555ac25813c45dd2e14": { + "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 + } + }, + "994215fe205c4d9380d099d7eff8e978": { + "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 + } + }, + "33ebc9745e724d57a7344c8579e54133": { + "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": "" + } + }, + "cab35d000306426a8108e16a05124d06": { + "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": "20px" + } + }, + "e3599f1660834e538d908fc9ce36e34c": { + "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": "" + } + }, + "9265755275204723aa2a572ab1a85c55": { + "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 + } + }, + "c851e3835d92442587dae023e91e6bcf": { + "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": "" + } + }, + "b0bd2c39d3584c8abad1883529fe49c6": { + "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_682fe79bb9a44b48b430540ef265b88d", + "IPY_MODEL_8b2595fff15d4850973356121b9995de", + "IPY_MODEL_c3d6a4b5aa8f4a5fa86feb242e42866a" + ], + "layout": "IPY_MODEL_5443b8390e49405aa99fece95ecb4773" + } + }, + "682fe79bb9a44b48b430540ef265b88d": { + "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_6b0930486a814fa0ade624be32409064", + "placeholder": "​", + "style": "IPY_MODEL_b67c3800c5334b29925f22c40f8459ab", + "value": "special_tokens_map.json: 100%" + } + }, + "8b2595fff15d4850973356121b9995de": { + "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_7b1602e742ec4d7f9cf306da25e4355a", + "max": 112, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3faa47e9f57c44d28b61be3d0e95c9a6", + "value": 112 + } + }, + "c3d6a4b5aa8f4a5fa86feb242e42866a": { + "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_5cbf273ddeba4c4a91d9aeb0ab6d7d41", + "placeholder": "​", + "style": "IPY_MODEL_cf9162519ea2437bac05c49659ae769b", + "value": " 112/112 [00:00<00:00, 12.9kB/s]" + } + }, + "5443b8390e49405aa99fece95ecb4773": { + "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 + } + }, + "6b0930486a814fa0ade624be32409064": { + "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 + } + }, + "b67c3800c5334b29925f22c40f8459ab": { + "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": "" + } + }, + "7b1602e742ec4d7f9cf306da25e4355a": { + "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 + } + }, + "3faa47e9f57c44d28b61be3d0e95c9a6": { + "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": "" + } + }, + "5cbf273ddeba4c4a91d9aeb0ab6d7d41": { + "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 + } + }, + "cf9162519ea2437bac05c49659ae769b": { + "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": 5 -} +} \ No newline at end of file