caf324b09d
Build documentation / build (push) Failing after 0s
Deploy "method_comparison" Gradio to Spaces / deploy (push) Has been cancelled
Deploy "PEFT shop" Gradio app to Spaces / deploy (push) Has been cancelled
tests on transformers main / tests (push) Has been cancelled
tests / check_code_quality (push) Has been cancelled
tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
tests / tests (windows-latest, 3.10) (push) Has been cancelled
tests / tests (windows-latest, 3.11) (push) Has been cancelled
tests / tests (windows-latest, 3.12) (push) Has been cancelled
tests / tests (windows-latest, 3.13) (push) Has been cancelled
Secret Leaks / trufflehog (push) Has been cancelled
CI security linting / zizmor latest via Cargo (push) Has been cancelled
2748 lines
93 KiB
Plaintext
Executable File
2748 lines
93 KiB
Plaintext
Executable File
{
|
||
"cells": [
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"id": "0c152fc8",
|
||
"metadata": {
|
||
"id": "5f93b7d1"
|
||
},
|
||
"outputs": [],
|
||
"source": "from transformers import AutoModelForSeq2SeqLM\nimport peft\nfrom peft import get_peft_config, get_peft_model, get_peft_model_state_dict, IA3Config, TaskType\nimport torch\nfrom datasets import load_dataset\nimport os\n\nos.environ[\"TOKENIZERS_PARALLELISM\"] = \"false\"\nfrom transformers import AutoTokenizer\nfrom torch.utils.data import DataLoader\nfrom transformers import default_data_collator, get_linear_schedule_with_warmup\nfrom tqdm import tqdm\nfrom datasets import load_dataset\n\ndevice = torch.accelerator.current_accelerator().type if hasattr(torch, \"accelerator\") else \"cuda\"\nmodel_name_or_path = \"bigscience/mt0-large\"\ntokenizer_name_or_path = \"bigscience/mt0-large\"\n\ntext_column = \"text\"\nlabel_column = \"text_label\"\nmax_length = 128\nlr = 8e-3\nnum_epochs = 3\nbatch_size = 8"
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 2,
|
||
"id": "4e23624f",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "b9e6368c",
|
||
"outputId": "fc2888a8-4fe9-4d61-dd2d-753e751e1416"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"<module 'peft' from '/usr/local/lib/python3.11/dist-packages/peft/__init__.py'>"
|
||
]
|
||
},
|
||
"execution_count": 2,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"import importlib\n",
|
||
"\n",
|
||
"importlib.reload(peft)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"id": "da74b569",
|
||
"metadata": {
|
||
"id": "8d0850ac"
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"# creating model\n",
|
||
"peft_config = IA3Config(task_type=TaskType.SEQ_2_SEQ_LM, inference_mode=False, feedforward_modules=[])\n",
|
||
"\n",
|
||
"model = AutoModelForSeq2SeqLM.from_pretrained(model_name_or_path)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 4,
|
||
"id": "df33fce2",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "e10c3831",
|
||
"outputId": "e69c5e07-ae58-446c-8301-e99ac6b85d62"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"MT5ForConditionalGeneration(\n",
|
||
" (shared): Embedding(250112, 1024)\n",
|
||
" (encoder): MT5Stack(\n",
|
||
" (embed_tokens): Embedding(250112, 1024)\n",
|
||
" (block): ModuleList(\n",
|
||
" (0): MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (relative_attention_bias): Embedding(32, 16)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (1-23): 23 x MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (final_layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (decoder): MT5Stack(\n",
|
||
" (embed_tokens): Embedding(250112, 1024)\n",
|
||
" (block): ModuleList(\n",
|
||
" (0): MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (relative_attention_bias): Embedding(32, 16)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerCrossAttention(\n",
|
||
" (EncDecAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (2): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (1-23): 23 x MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerCrossAttention(\n",
|
||
" (EncDecAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (v): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (2): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (final_layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (lm_head): Linear(in_features=1024, out_features=250112, bias=False)\n",
|
||
")"
|
||
]
|
||
},
|
||
"execution_count": 4,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"model"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 5,
|
||
"id": "63d7bc2d",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "05978e96",
|
||
"outputId": "ea9b7d40-010f-4df0-ec64-a7146a5f8b08"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"trainable params: 282,624 || all params: 1,229,863,936 || trainable%: 0.0230\n"
|
||
]
|
||
},
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"PeftModelForSeq2SeqLM(\n",
|
||
" (base_model): IA3Model(\n",
|
||
" (model): MT5ForConditionalGeneration(\n",
|
||
" (shared): Embedding(250112, 1024)\n",
|
||
" (encoder): MT5Stack(\n",
|
||
" (embed_tokens): Embedding(250112, 1024)\n",
|
||
" (block): ModuleList(\n",
|
||
" (0): MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (v): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (relative_attention_bias): Embedding(32, 16)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 2816x1])\n",
|
||
" )\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (1-23): 23 x MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (v): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 2816x1])\n",
|
||
" )\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (final_layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (decoder): MT5Stack(\n",
|
||
" (embed_tokens): Embedding(250112, 1024)\n",
|
||
" (block): ModuleList(\n",
|
||
" (0): MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (v): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (relative_attention_bias): Embedding(32, 16)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerCrossAttention(\n",
|
||
" (EncDecAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (v): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (2): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 2816x1])\n",
|
||
" )\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (1-23): 23 x MT5Block(\n",
|
||
" (layer): ModuleList(\n",
|
||
" (0): MT5LayerSelfAttention(\n",
|
||
" (SelfAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (v): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (1): MT5LayerCrossAttention(\n",
|
||
" (EncDecAttention): MT5Attention(\n",
|
||
" (q): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (k): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (v): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 1024x1])\n",
|
||
" )\n",
|
||
" (o): Linear(in_features=1024, out_features=1024, bias=False)\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (2): MT5LayerFF(\n",
|
||
" (DenseReluDense): MT5DenseGatedActDense(\n",
|
||
" (wi_0): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (wi_1): Linear(\n",
|
||
" (base_layer): Linear(in_features=1024, out_features=2816, bias=False)\n",
|
||
" (ia3_l): ParameterDict( (default): Parameter containing: [torch.FloatTensor of size 2816x1])\n",
|
||
" )\n",
|
||
" (wo): Linear(in_features=2816, out_features=1024, bias=False)\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" (act): NewGELUActivation()\n",
|
||
" )\n",
|
||
" (layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" )\n",
|
||
" (final_layer_norm): MT5LayerNorm()\n",
|
||
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
||
" )\n",
|
||
" (lm_head): Linear(in_features=1024, out_features=250112, bias=False)\n",
|
||
" )\n",
|
||
" )\n",
|
||
")"
|
||
]
|
||
},
|
||
"execution_count": 5,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"model = get_peft_model(model, peft_config)\n",
|
||
"model.print_trainable_parameters()\n",
|
||
"model"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 6,
|
||
"id": "155b8728",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/",
|
||
"height": 140,
|
||
"referenced_widgets": [
|
||
"bbfb7533b5ca459194e171df56b79566",
|
||
"c894e8237aa34c56bb250acab1466005",
|
||
"a5a126b229064812bf3dcb228118be50",
|
||
"661e1b29c59a4295b594edfa4f50ff87",
|
||
"1bcba805972b484d8b6aa6542c81841c",
|
||
"e71f5c7f1d5d4f83b58c68d2fa310d9c",
|
||
"6a567e0a1a5447519c5df10e777520cf",
|
||
"7aeca19b84904906a04c12659f84ff9e",
|
||
"dd4b895874ce46ceb1ad0d9bc973f98f",
|
||
"b138f91be7f94008806eaf0a6988bc3f",
|
||
"da14180f51ab44b48470cb9ea74d3864",
|
||
"9e12d97af6124a5a8c6627708b300c1e",
|
||
"faa18df899c14e9cac6721253e6c9128",
|
||
"79d0ede7a5b24756aa6d34fda8c29159",
|
||
"3b175b452f4347558aa3c4501cc90030",
|
||
"fc4637a1b37e4e90874c71aa4271ac74",
|
||
"1b8aada826a0451bb60c418b19178c8c",
|
||
"a91916e02e9c424e881e45b3aa978574",
|
||
"ca509bd409624c998e555c9a779b8aae",
|
||
"9c890fc422954347b86d3bde7a421caf",
|
||
"6f9453484ea94587a64d70f1b3a1f6e4",
|
||
"48770ef159f44c01be2a75c75aecd80f",
|
||
"0c561dab67914ea9b6e1aab803600551",
|
||
"1e021a1954b44d69a90101a96c360661",
|
||
"013e3343285f437a893bdd673fb90e22",
|
||
"28802da68fb04d70b1c6bc511a04676f",
|
||
"94174da0d6554be087d4527bea5b511a",
|
||
"dc8ab16a1e6c4e6893c95ccd16568f9a",
|
||
"72383136663448d89cf3b82b87cbb392",
|
||
"5b1bdaf16cbc473081e4237f839167b9",
|
||
"51f8fb45485540bb985b606d43ae04ea",
|
||
"f760cd4758334ca9a43fd15612fd808b",
|
||
"f60e9915d2a74ca7bc010d7684f5acf6"
|
||
]
|
||
},
|
||
"id": "4ee2babf",
|
||
"outputId": "3c413083-247d-47da-f25c-032764be0beb"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"Using the latest cached version of the dataset since financial_phrasebank couldn't be found on the Hugging Face Hub\n",
|
||
"Found the latest cached dataset configuration 'sentences_allagree' at /root/.cache/huggingface/datasets/financial_phrasebank/sentences_allagree/1.0.0/550bde12e6c30e2674da973a55f57edde5181d53f5a5a34c1531c53f93b7e141 (last modified on Thu Jul 31 03:15:41 2025).\n"
|
||
]
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "43b03e9b6de94bf0921228482d7be1e5",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"Map: 0%| | 0/2037 [00:00<?, ? examples/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "d08de1efca67472781017b806f33870c",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"Map: 0%| | 0/227 [00:00<?, ? examples/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"{'sentence': 'SCOPI Chief Business Excellence Officer , Eng .',\n",
|
||
" 'label': 1,\n",
|
||
" 'text_label': 'neutral'}"
|
||
]
|
||
},
|
||
"execution_count": 6,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"# loading dataset\n",
|
||
"dataset = load_dataset(\"zeroshot/twitter-financial-news-sentiment\")\n",
|
||
"dataset = dataset[\"train\"].train_test_split(test_size=0.1)\n",
|
||
"dataset[\"validation\"] = dataset[\"test\"]\n",
|
||
"del dataset[\"test\"]\n",
|
||
"\n",
|
||
"if hasattr(dataset[\"train\"].features[\"label\"], \"names\"):\n",
|
||
" classes = dataset[\"train\"].features[\"label\"].names\n",
|
||
"else:\n",
|
||
" classes = [\"Bearish\", \"Bullish\", \"Neutral\"]\n",
|
||
"dataset = dataset.map(\n",
|
||
" lambda x: {\"text_label\": [classes[label] for label in x[\"label\"]]},\n",
|
||
" batched=True,\n",
|
||
" num_proc=1,\n",
|
||
")\n",
|
||
"\n",
|
||
"dataset[\"train\"][0]"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 7,
|
||
"id": "723fb67d",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/",
|
||
"height": 17,
|
||
"referenced_widgets": [
|
||
"e1e80a68a9e7429397cafc96c3c11f80",
|
||
"5307864c2b1143f4b44f3f172611113e",
|
||
"2e2b6c3f48974ea4aca9b7710a03379e",
|
||
"aae78f9bd53348bda45967a38736cb78",
|
||
"34db17e0f28d40d6abafb8acd5dda379",
|
||
"8361dc2e0a834da6a0ad87f7b0cb4e1b",
|
||
"56f1d9d56dd44c8aa923d09a59cb0ebc",
|
||
"d93bfb366db14c2fa77b038752f69b38",
|
||
"749aaa39135841f98b344ffb840df3d4",
|
||
"5e5aa58adb0f48579871df33845e30b1",
|
||
"c25b49b7adaa48a0a3a306aa1e0661b4",
|
||
"21f582e1208a4a38ae3c0cdce87e5c14",
|
||
"d9d37b8b79f24dbf837327a250a5a346",
|
||
"8ba99043c350456d8623ce1d8c98f7a0",
|
||
"8bf37c12d5f74f7d8dbba423a9ee3ac3",
|
||
"f9d86ad7fa734f3a857505a542256a3c",
|
||
"86bf02b06ed740a88015c2b944205c1e",
|
||
"aef6a6be67f749908060d8038b6d3804",
|
||
"664c02903cb248fb9339805bccfd6c1d",
|
||
"82195b807b664a9585a76e0e50fe7609",
|
||
"8621932be14f42858d841e2ac1b173e7",
|
||
"71bcdb1e02144c9587879d8d815b91d4"
|
||
]
|
||
},
|
||
"id": "adf9608c",
|
||
"outputId": "3e4bc95f-1dc4-4d34-c212-6d2374359673"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "7e08a312e5454c188f52fc2ca902c463",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"tokenizer_config.json: 0%| | 0.00/430 [00:00<?, ?B/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "25d5de12709748c9959cd011c5c641de",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"spiece.model: 0%| | 0.00/4.31M [00:00<?, ?B/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "5b39c130813843c18e7f9187ffec37df",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"tokenizer.json: 0%| | 0.00/16.3M [00:00<?, ?B/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "de27076e123243fd89dbad1c9e1f0596",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"special_tokens_map.json: 0%| | 0.00/74.0 [00:00<?, ?B/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "1b55669bf13a4e2886f34c12d5f50354",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"Running tokenizer on dataset: 0%| | 0/2037 [00:00<?, ? examples/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"model_id": "f914229f180b4188925d9e804b92475c",
|
||
"version_major": 2,
|
||
"version_minor": 0
|
||
},
|
||
"text/plain": [
|
||
"Running tokenizer on dataset: 0%| | 0/227 [00:00<?, ? examples/s]"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
}
|
||
],
|
||
"source": [
|
||
"# data preprocessing\n",
|
||
"tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)\n",
|
||
"\n",
|
||
"\n",
|
||
"def preprocess_function(examples):\n",
|
||
" inputs = examples[text_column]\n",
|
||
" targets = examples[label_column]\n",
|
||
" model_inputs = tokenizer(inputs, max_length=max_length, padding=\"max_length\", truncation=True, return_tensors=\"pt\")\n",
|
||
" labels = tokenizer(targets, max_length=3, padding=\"max_length\", truncation=True, return_tensors=\"pt\")\n",
|
||
" labels = labels[\"input_ids\"]\n",
|
||
" labels[labels == tokenizer.pad_token_id] = -100\n",
|
||
" model_inputs[\"labels\"] = labels\n",
|
||
" return model_inputs\n",
|
||
"\n",
|
||
"\n",
|
||
"processed_datasets = dataset.map(\n",
|
||
" preprocess_function,\n",
|
||
" batched=True,\n",
|
||
" num_proc=1,\n",
|
||
" remove_columns=dataset[\"train\"].column_names,\n",
|
||
" load_from_cache_file=False,\n",
|
||
" desc=\"Running tokenizer on dataset\",\n",
|
||
")\n",
|
||
"\n",
|
||
"train_dataset = processed_datasets[\"train\"]\n",
|
||
"eval_dataset = processed_datasets[\"validation\"]\n",
|
||
"\n",
|
||
"train_dataloader = DataLoader(\n",
|
||
" train_dataset, shuffle=True, collate_fn=default_data_collator, batch_size=batch_size, pin_memory=True\n",
|
||
")\n",
|
||
"eval_dataloader = DataLoader(eval_dataset, collate_fn=default_data_collator, batch_size=batch_size, pin_memory=True)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 8,
|
||
"id": "36d56ea7",
|
||
"metadata": {
|
||
"id": "f733a3c6"
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"# optimizer and lr scheduler\n",
|
||
"optimizer = torch.optim.AdamW(model.parameters(), lr=lr)\n",
|
||
"lr_scheduler = get_linear_schedule_with_warmup(\n",
|
||
" optimizer=optimizer,\n",
|
||
" num_warmup_steps=0,\n",
|
||
" num_training_steps=(len(train_dataloader) * num_epochs),\n",
|
||
")"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 9,
|
||
"id": "6b0a0536",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "6b3a4090",
|
||
"outputId": "369cfce9-90f2-47a1-8653-ea1168943949"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 255/255 [00:52<00:00, 4.86it/s]\n",
|
||
"100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 29/29 [00:02<00:00, 12.67it/s]\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"epoch=0: train_ppl=tensor(1.4686, device='xpu:0') train_epoch_loss=tensor(0.3843, device='xpu:0') eval_ppl=tensor(1.0421, device='xpu:0') eval_epoch_loss=tensor(0.0412, device='xpu:0')\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 255/255 [00:49<00:00, 5.20it/s]\n",
|
||
"100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 29/29 [00:02<00:00, 13.62it/s]\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"epoch=1: train_ppl=tensor(1.0683, device='xpu:0') train_epoch_loss=tensor(0.0661, device='xpu:0') eval_ppl=tensor(1.0264, device='xpu:0') eval_epoch_loss=tensor(0.0261, device='xpu:0')\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 255/255 [00:49<00:00, 5.20it/s]\n",
|
||
"100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 29/29 [00:02<00:00, 13.63it/s]"
|
||
]
|
||
},
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"epoch=2: train_ppl=tensor(1.0451, device='xpu:0') train_epoch_loss=tensor(0.0441, device='xpu:0') eval_ppl=tensor(1.0191, device='xpu:0') eval_epoch_loss=tensor(0.0190, device='xpu:0')\n"
|
||
]
|
||
},
|
||
{
|
||
"name": "stderr",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"# training and evaluation\n",
|
||
"model = model.to(device)\n",
|
||
"\n",
|
||
"for epoch in range(num_epochs):\n",
|
||
" model.train()\n",
|
||
" total_loss = 0\n",
|
||
" for step, batch in enumerate(tqdm(train_dataloader)):\n",
|
||
" batch = {k: v.to(device) for k, v in batch.items()}\n",
|
||
" outputs = model(**batch)\n",
|
||
" loss = outputs.loss\n",
|
||
" total_loss += loss.detach().float()\n",
|
||
" loss.backward()\n",
|
||
" optimizer.step()\n",
|
||
" lr_scheduler.step()\n",
|
||
" optimizer.zero_grad()\n",
|
||
"\n",
|
||
" model.eval()\n",
|
||
" eval_loss = 0\n",
|
||
" eval_preds = []\n",
|
||
" for step, batch in enumerate(tqdm(eval_dataloader)):\n",
|
||
" batch = {k: v.to(device) for k, v in batch.items()}\n",
|
||
" with torch.no_grad():\n",
|
||
" outputs = model(**batch)\n",
|
||
" loss = outputs.loss\n",
|
||
" eval_loss += loss.detach().float()\n",
|
||
" eval_preds.extend(\n",
|
||
" tokenizer.batch_decode(torch.argmax(outputs.logits, -1).detach().cpu().numpy(), skip_special_tokens=True)\n",
|
||
" )\n",
|
||
"\n",
|
||
" eval_epoch_loss = eval_loss / len(eval_dataloader)\n",
|
||
" eval_ppl = torch.exp(eval_epoch_loss)\n",
|
||
" train_epoch_loss = total_loss / len(train_dataloader)\n",
|
||
" train_ppl = torch.exp(train_epoch_loss)\n",
|
||
" print(f\"{epoch=}: {train_ppl=} {train_epoch_loss=} {eval_ppl=} {eval_epoch_loss=}\")"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 21,
|
||
"id": "761b90e4",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "6cafa67b",
|
||
"outputId": "0db923d2-522c-4cb7-b694-6e2e20beae98"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"accuracy=96.91629955947137 % on the evaluation dataset\n",
|
||
"eval_preds[:10]=['neutral', 'neutral', 'neutral', 'neutral', 'positive', 'neutral', 'neutral', 'neutral', 'neutral', 'neutral']\n",
|
||
"dataset['validation']['text_label'][:10]=['neutral', 'neutral', 'neutral', 'neutral', 'positive', 'neutral', 'neutral', 'neutral', 'neutral', 'neutral']\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"# print accuracy\n",
|
||
"correct = 0\n",
|
||
"total = 0\n",
|
||
"for pred, true in zip(eval_preds, dataset[\"validation\"][\"text_label\"]):\n",
|
||
" if pred.strip() == true.strip():\n",
|
||
" correct += 1\n",
|
||
" total += 1\n",
|
||
"accuracy = correct / total * 100\n",
|
||
"print(f\"{accuracy=} % on the evaluation dataset\")\n",
|
||
"print(f\"{eval_preds[:10]=}\")\n",
|
||
"print(f\"{dataset['validation']['text_label'][:10]=}\")"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 22,
|
||
"id": "8e0658ac",
|
||
"metadata": {
|
||
"id": "a8de6005"
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"# saving model\n",
|
||
"peft_model_id = f\"{model_name_or_path}_{peft_config.peft_type}_{peft_config.task_type}\"\n",
|
||
"model.save_pretrained(peft_model_id)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"id": "ef7fbf9c",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "bd20cd4c",
|
||
"outputId": "0f25d837-80b1-476f-c897-92c3fef04fb2"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"1.2M\tbigscience/mt0-large_IA3_SEQ_2_SEQ_LM/adapter_model.safetensors\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"ckpt = f\"{peft_model_id}/adapter_model.safetensors\"\n",
|
||
"!du -h $ckpt"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 24,
|
||
"id": "4774d931",
|
||
"metadata": {
|
||
"id": "76c2fc29"
|
||
},
|
||
"outputs": [],
|
||
"source": [
|
||
"from peft import PeftModel, PeftConfig\n",
|
||
"\n",
|
||
"peft_model_id = f\"{model_name_or_path}_{peft_config.peft_type}_{peft_config.task_type}\"\n",
|
||
"\n",
|
||
"config = PeftConfig.from_pretrained(peft_model_id)\n",
|
||
"model = AutoModelForSeq2SeqLM.from_pretrained(config.base_model_name_or_path)\n",
|
||
"model = PeftModel.from_pretrained(model, peft_model_id)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 25,
|
||
"id": "996ddf0a",
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "37d712ce",
|
||
"outputId": "4828819a-b640-4f6c-91e3-878b648e9a75"
|
||
},
|
||
"outputs": [
|
||
{
|
||
"name": "stdout",
|
||
"output_type": "stream",
|
||
"text": [
|
||
"25 November 2010 - Finnish paints and coatings company Tikkurila Oyj ( HEL : TIK1V ) said today that Finnish state-owned investment company Solidium Oy sold its 14.7 % stake in the company for a total of EUR98m .\n",
|
||
"{'input_ids': tensor([[ 877, 3277, 1068, 259, 264, 515, 143136, 42068, 263,\n",
|
||
" 305, 259, 101264, 263, 5835, 22538, 4496, 2697, 20860,\n",
|
||
" 385, 274, 76347, 259, 267, 259, 93686, 353, 561,\n",
|
||
" 259, 271, 2426, 7883, 533, 515, 143136, 6509, 264,\n",
|
||
" 45815, 37624, 5835, 35133, 16558, 20860, 22026, 2476, 5006,\n",
|
||
" 487, 1448, 259, 96189, 281, 287, 5835, 332, 259,\n",
|
||
" 262, 2725, 304, 2687, 5577, 282, 259, 260, 1]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
|
||
" 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
|
||
" 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])}\n",
|
||
"tensor([[ 0, 59006, 1]])\n",
|
||
"['neutral']\n"
|
||
]
|
||
}
|
||
],
|
||
"source": [
|
||
"model.eval()\n",
|
||
"i = 13\n",
|
||
"inputs = tokenizer(dataset[\"validation\"][text_column][i], return_tensors=\"pt\")\n",
|
||
"print(dataset[\"validation\"][text_column][i])\n",
|
||
"print(inputs)\n",
|
||
"\n",
|
||
"with torch.no_grad():\n",
|
||
" outputs = model.generate(input_ids=inputs[\"input_ids\"], max_new_tokens=10)\n",
|
||
" print(outputs)\n",
|
||
" print(tokenizer.batch_decode(outputs.detach().cpu().numpy(), skip_special_tokens=True))"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"id": "701eda1b",
|
||
"metadata": {
|
||
"id": "66c65ea4"
|
||
},
|
||
"outputs": [],
|
||
"source": []
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": null,
|
||
"id": "7d7718c5",
|
||
"metadata": {
|
||
"id": "65e71f78"
|
||
},
|
||
"outputs": [],
|
||
"source": []
|
||
}
|
||
],
|
||
"metadata": {
|
||
"accelerator": "GPU",
|
||
"colab": {
|
||
"gpuType": "T4",
|
||
"machine_shape": "hm",
|
||
"provenance": []
|
||
},
|
||
"kernelspec": {
|
||
"display_name": "Python 3 (ipykernel)",
|
||
"language": "python",
|
||
"name": "python3"
|
||
},
|
||
"language_info": {
|
||
"codemirror_mode": {
|
||
"name": "ipython",
|
||
"version": 3
|
||
},
|
||
"file_extension": ".py",
|
||
"mimetype": "text/x-python",
|
||
"name": "python",
|
||
"nbconvert_exporter": "python",
|
||
"pygments_lexer": "ipython3",
|
||
"version": "3.11.13"
|
||
},
|
||
"vscode": {
|
||
"interpreter": {
|
||
"hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49"
|
||
}
|
||
},
|
||
"widgets": {
|
||
"application/vnd.jupyter.widget-state+json": {
|
||
"013e3343285f437a893bdd673fb90e22": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "FloatProgressModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "FloatProgressModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "ProgressView",
|
||
"bar_style": "",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_5b1bdaf16cbc473081e4237f839167b9",
|
||
"max": 227,
|
||
"min": 0,
|
||
"orientation": "horizontal",
|
||
"style": "IPY_MODEL_51f8fb45485540bb985b606d43ae04ea",
|
||
"value": 227
|
||
}
|
||
},
|
||
"0c561dab67914ea9b6e1aab803600551": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HBoxModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HBoxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HBoxView",
|
||
"box_style": "",
|
||
"children": [
|
||
"IPY_MODEL_1e021a1954b44d69a90101a96c360661",
|
||
"IPY_MODEL_013e3343285f437a893bdd673fb90e22",
|
||
"IPY_MODEL_28802da68fb04d70b1c6bc511a04676f"
|
||
],
|
||
"layout": "IPY_MODEL_94174da0d6554be087d4527bea5b511a"
|
||
}
|
||
},
|
||
"1b8aada826a0451bb60c418b19178c8c": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"1bcba805972b484d8b6aa6542c81841c": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"1e021a1954b44d69a90101a96c360661": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_dc8ab16a1e6c4e6893c95ccd16568f9a",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_72383136663448d89cf3b82b87cbb392",
|
||
"value": "Map: 0%"
|
||
}
|
||
},
|
||
"21f582e1208a4a38ae3c0cdce87e5c14": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HBoxModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HBoxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HBoxView",
|
||
"box_style": "",
|
||
"children": [
|
||
"IPY_MODEL_d9d37b8b79f24dbf837327a250a5a346",
|
||
"IPY_MODEL_8ba99043c350456d8623ce1d8c98f7a0",
|
||
"IPY_MODEL_8bf37c12d5f74f7d8dbba423a9ee3ac3"
|
||
],
|
||
"layout": "IPY_MODEL_f9d86ad7fa734f3a857505a542256a3c"
|
||
}
|
||
},
|
||
"28802da68fb04d70b1c6bc511a04676f": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_f760cd4758334ca9a43fd15612fd808b",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_f60e9915d2a74ca7bc010d7684f5acf6",
|
||
"value": " 0/227 [00:00<?, ? examples/s]"
|
||
}
|
||
},
|
||
"2e2b6c3f48974ea4aca9b7710a03379e": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "FloatProgressModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "FloatProgressModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "ProgressView",
|
||
"bar_style": "",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_d93bfb366db14c2fa77b038752f69b38",
|
||
"max": 2037,
|
||
"min": 0,
|
||
"orientation": "horizontal",
|
||
"style": "IPY_MODEL_749aaa39135841f98b344ffb840df3d4",
|
||
"value": 2037
|
||
}
|
||
},
|
||
"34db17e0f28d40d6abafb8acd5dda379": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": "hidden",
|
||
"width": null
|
||
}
|
||
},
|
||
"3b175b452f4347558aa3c4501cc90030": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_6f9453484ea94587a64d70f1b3a1f6e4",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_48770ef159f44c01be2a75c75aecd80f",
|
||
"value": " 0/2037 [00:00<?, ? examples/s]"
|
||
}
|
||
},
|
||
"48770ef159f44c01be2a75c75aecd80f": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"51f8fb45485540bb985b606d43ae04ea": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "ProgressStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ProgressStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"bar_color": null,
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"5307864c2b1143f4b44f3f172611113e": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_8361dc2e0a834da6a0ad87f7b0cb4e1b",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_56f1d9d56dd44c8aa923d09a59cb0ebc",
|
||
"value": "Running tokenizer on dataset: 98%"
|
||
}
|
||
},
|
||
"56f1d9d56dd44c8aa923d09a59cb0ebc": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"5b1bdaf16cbc473081e4237f839167b9": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"5e5aa58adb0f48579871df33845e30b1": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"661e1b29c59a4295b594edfa4f50ff87": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_b138f91be7f94008806eaf0a6988bc3f",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_da14180f51ab44b48470cb9ea74d3864",
|
||
"value": " 1/1 [00:00<00:00, 67.12it/s]"
|
||
}
|
||
},
|
||
"664c02903cb248fb9339805bccfd6c1d": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"6a567e0a1a5447519c5df10e777520cf": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"6f9453484ea94587a64d70f1b3a1f6e4": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"71bcdb1e02144c9587879d8d815b91d4": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"72383136663448d89cf3b82b87cbb392": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"749aaa39135841f98b344ffb840df3d4": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "ProgressStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ProgressStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"bar_color": null,
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"79d0ede7a5b24756aa6d34fda8c29159": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "FloatProgressModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "FloatProgressModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "ProgressView",
|
||
"bar_style": "",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_ca509bd409624c998e555c9a779b8aae",
|
||
"max": 2037,
|
||
"min": 0,
|
||
"orientation": "horizontal",
|
||
"style": "IPY_MODEL_9c890fc422954347b86d3bde7a421caf",
|
||
"value": 2037
|
||
}
|
||
},
|
||
"7aeca19b84904906a04c12659f84ff9e": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"82195b807b664a9585a76e0e50fe7609": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "ProgressStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ProgressStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"bar_color": null,
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"8361dc2e0a834da6a0ad87f7b0cb4e1b": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"8621932be14f42858d841e2ac1b173e7": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"86bf02b06ed740a88015c2b944205c1e": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"8ba99043c350456d8623ce1d8c98f7a0": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "FloatProgressModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "FloatProgressModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "ProgressView",
|
||
"bar_style": "",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_664c02903cb248fb9339805bccfd6c1d",
|
||
"max": 227,
|
||
"min": 0,
|
||
"orientation": "horizontal",
|
||
"style": "IPY_MODEL_82195b807b664a9585a76e0e50fe7609",
|
||
"value": 227
|
||
}
|
||
},
|
||
"8bf37c12d5f74f7d8dbba423a9ee3ac3": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_8621932be14f42858d841e2ac1b173e7",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_71bcdb1e02144c9587879d8d815b91d4",
|
||
"value": " 0/227 [00:00<?, ? examples/s]"
|
||
}
|
||
},
|
||
"94174da0d6554be087d4527bea5b511a": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": "hidden",
|
||
"width": null
|
||
}
|
||
},
|
||
"9c890fc422954347b86d3bde7a421caf": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "ProgressStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ProgressStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"bar_color": null,
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"9e12d97af6124a5a8c6627708b300c1e": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HBoxModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HBoxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HBoxView",
|
||
"box_style": "",
|
||
"children": [
|
||
"IPY_MODEL_faa18df899c14e9cac6721253e6c9128",
|
||
"IPY_MODEL_79d0ede7a5b24756aa6d34fda8c29159",
|
||
"IPY_MODEL_3b175b452f4347558aa3c4501cc90030"
|
||
],
|
||
"layout": "IPY_MODEL_fc4637a1b37e4e90874c71aa4271ac74"
|
||
}
|
||
},
|
||
"a5a126b229064812bf3dcb228118be50": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "FloatProgressModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "FloatProgressModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "ProgressView",
|
||
"bar_style": "success",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_7aeca19b84904906a04c12659f84ff9e",
|
||
"max": 1,
|
||
"min": 0,
|
||
"orientation": "horizontal",
|
||
"style": "IPY_MODEL_dd4b895874ce46ceb1ad0d9bc973f98f",
|
||
"value": 1
|
||
}
|
||
},
|
||
"a91916e02e9c424e881e45b3aa978574": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"aae78f9bd53348bda45967a38736cb78": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_5e5aa58adb0f48579871df33845e30b1",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_c25b49b7adaa48a0a3a306aa1e0661b4",
|
||
"value": " 2000/2037 [00:00<00:00, 3864.28 examples/s]"
|
||
}
|
||
},
|
||
"aef6a6be67f749908060d8038b6d3804": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"b138f91be7f94008806eaf0a6988bc3f": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"bbfb7533b5ca459194e171df56b79566": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HBoxModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HBoxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HBoxView",
|
||
"box_style": "",
|
||
"children": [
|
||
"IPY_MODEL_c894e8237aa34c56bb250acab1466005",
|
||
"IPY_MODEL_a5a126b229064812bf3dcb228118be50",
|
||
"IPY_MODEL_661e1b29c59a4295b594edfa4f50ff87"
|
||
],
|
||
"layout": "IPY_MODEL_1bcba805972b484d8b6aa6542c81841c"
|
||
}
|
||
},
|
||
"c25b49b7adaa48a0a3a306aa1e0661b4": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"c894e8237aa34c56bb250acab1466005": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_e71f5c7f1d5d4f83b58c68d2fa310d9c",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_6a567e0a1a5447519c5df10e777520cf",
|
||
"value": "100%"
|
||
}
|
||
},
|
||
"ca509bd409624c998e555c9a779b8aae": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"d93bfb366db14c2fa77b038752f69b38": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"d9d37b8b79f24dbf837327a250a5a346": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_86bf02b06ed740a88015c2b944205c1e",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_aef6a6be67f749908060d8038b6d3804",
|
||
"value": "Running tokenizer on dataset: 0%"
|
||
}
|
||
},
|
||
"da14180f51ab44b48470cb9ea74d3864": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"dc8ab16a1e6c4e6893c95ccd16568f9a": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"dd4b895874ce46ceb1ad0d9bc973f98f": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "ProgressStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ProgressStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"bar_color": null,
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"e1e80a68a9e7429397cafc96c3c11f80": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HBoxModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HBoxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HBoxView",
|
||
"box_style": "",
|
||
"children": [
|
||
"IPY_MODEL_5307864c2b1143f4b44f3f172611113e",
|
||
"IPY_MODEL_2e2b6c3f48974ea4aca9b7710a03379e",
|
||
"IPY_MODEL_aae78f9bd53348bda45967a38736cb78"
|
||
],
|
||
"layout": "IPY_MODEL_34db17e0f28d40d6abafb8acd5dda379"
|
||
}
|
||
},
|
||
"e71f5c7f1d5d4f83b58c68d2fa310d9c": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"f60e9915d2a74ca7bc010d7684f5acf6": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "DescriptionStyleModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
},
|
||
"f760cd4758334ca9a43fd15612fd808b": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": null,
|
||
"width": null
|
||
}
|
||
},
|
||
"f9d86ad7fa734f3a857505a542256a3c": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": "hidden",
|
||
"width": null
|
||
}
|
||
},
|
||
"faa18df899c14e9cac6721253e6c9128": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_module_version": "1.5.0",
|
||
"model_name": "HTMLModel",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "HTMLModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "HTMLView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_1b8aada826a0451bb60c418b19178c8c",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_a91916e02e9c424e881e45b3aa978574",
|
||
"value": "Map: 0%"
|
||
}
|
||
},
|
||
"fc4637a1b37e4e90874c71aa4271ac74": {
|
||
"model_module": "@jupyter-widgets/base",
|
||
"model_module_version": "1.2.0",
|
||
"model_name": "LayoutModel",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/base",
|
||
"_model_module_version": "1.2.0",
|
||
"_model_name": "LayoutModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "LayoutView",
|
||
"align_content": null,
|
||
"align_items": null,
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": null,
|
||
"flex": null,
|
||
"flex_flow": null,
|
||
"grid_area": null,
|
||
"grid_auto_columns": null,
|
||
"grid_auto_flow": null,
|
||
"grid_auto_rows": null,
|
||
"grid_column": null,
|
||
"grid_gap": null,
|
||
"grid_row": null,
|
||
"grid_template_areas": null,
|
||
"grid_template_columns": null,
|
||
"grid_template_rows": null,
|
||
"height": null,
|
||
"justify_content": null,
|
||
"justify_items": null,
|
||
"left": null,
|
||
"margin": null,
|
||
"max_height": null,
|
||
"max_width": null,
|
||
"min_height": null,
|
||
"min_width": null,
|
||
"object_fit": null,
|
||
"object_position": null,
|
||
"order": null,
|
||
"overflow": null,
|
||
"overflow_x": null,
|
||
"overflow_y": null,
|
||
"padding": null,
|
||
"right": null,
|
||
"top": null,
|
||
"visibility": "hidden",
|
||
"width": null
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"nbformat": 4,
|
||
"nbformat_minor": 5
|
||
}
|