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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"id": "initial_id",
|
6 |
+
"metadata": {
|
7 |
+
"ExecuteTime": {
|
8 |
+
"end_time": "2024-07-01T11:08:00.253851Z",
|
9 |
+
"start_time": "2024-07-01T11:08:00.067738Z"
|
10 |
+
},
|
11 |
+
"id": "initial_id"
|
12 |
+
},
|
13 |
+
"source": [
|
14 |
+
"import torch\n",
|
15 |
+
"from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, TrainingArguments\n",
|
16 |
+
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")"
|
17 |
+
],
|
18 |
+
"outputs": [],
|
19 |
+
"execution_count": 2
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"cell_type": "code",
|
23 |
+
"id": "df5ce2489db64f8d",
|
24 |
+
"metadata": {
|
25 |
+
"ExecuteTime": {
|
26 |
+
"end_time": "2024-07-01T11:08:15.731889Z",
|
27 |
+
"start_time": "2024-07-01T11:08:03.640950Z"
|
28 |
+
},
|
29 |
+
"colab": {
|
30 |
+
"base_uri": "https://localhost:8080/",
|
31 |
+
"height": 205,
|
32 |
+
"referenced_widgets": [
|
33 |
+
"6ecdc71d497b4ab7bc6dca2ace0bd656",
|
34 |
+
"2af56a7c045d4bc294c6cb6d362a8120",
|
35 |
+
"f5611ea1eab5406eb5796ffed1218a0c",
|
36 |
+
"68855bdfbeed46e7b7e3d82a9b4c0988",
|
37 |
+
"24b9e5603be54e72b2bcf99be716b97d",
|
38 |
+
"64c42ce2cab04fb0aed8e65efebdfd11",
|
39 |
+
"85fc022f4f1841e480af3f5496f36fe0",
|
40 |
+
"2e384f5f20db45579dc708ede8b15c87",
|
41 |
+
"c9409991f35d4966989cf936f88fe99a",
|
42 |
+
"0f4ba7cacc6d49599f3178b738092e09",
|
43 |
+
"ddf9f8decaf948bbb67b8f71610c31b1",
|
44 |
+
"46756e51804c48ebbabee753ea455457",
|
45 |
+
"f98f7a5726d6434d9087fe521e136795",
|
46 |
+
"cc3c582d99d24da1b7bf1f8168961749",
|
47 |
+
"81b3bc430cc7409f9f51cd222fb0ca0e",
|
48 |
+
"f66bc695f26e4603ac38f23168e65763",
|
49 |
+
"d4a74b31d8064a5bba43849ed4b6658b",
|
50 |
+
"72731803b79343b0b6a61d722009b6b6",
|
51 |
+
"0ff317589550455f8eef5021912dd27c",
|
52 |
+
"7e110f5c777442c4aab4ea06a27a3dc1",
|
53 |
+
"ae1843d43b0f4199ba61e8c9e962f2b3",
|
54 |
+
"d72cd66e520a4eea83c06d7df23ccc0e"
|
55 |
+
]
|
56 |
+
},
|
57 |
+
"id": "df5ce2489db64f8d",
|
58 |
+
"outputId": "34a739e5-75cd-4f03-b6b2-15e4b767bb64"
|
59 |
+
},
|
60 |
+
"source": [
|
61 |
+
"tokenizer = AutoTokenizer.from_pretrained(\"google/flan-t5-xl\")\n",
|
62 |
+
"model = AutoModelForSeq2SeqLM.from_pretrained(\"google/flan-t5-xl\")"
|
63 |
+
],
|
64 |
+
"outputs": [
|
65 |
+
{
|
66 |
+
"output_type": "stream",
|
67 |
+
"name": "stderr",
|
68 |
+
"text": [
|
69 |
+
"/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:89: UserWarning: \n",
|
70 |
+
"The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
|
71 |
+
"To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
|
72 |
+
"You will be able to reuse this secret in all of your notebooks.\n",
|
73 |
+
"Please note that authentication is recommended but still optional to access public models or datasets.\n",
|
74 |
+
" warnings.warn(\n"
|
75 |
+
]
|
76 |
+
},
|
77 |
+
{
|
78 |
+
"output_type": "display_data",
|
79 |
+
"data": {
|
80 |
+
"text/plain": [
|
81 |
+
"Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]"
|
82 |
+
],
|
83 |
+
"application/vnd.jupyter.widget-view+json": {
|
84 |
+
"version_major": 2,
|
85 |
+
"version_minor": 0,
|
86 |
+
"model_id": "6ecdc71d497b4ab7bc6dca2ace0bd656"
|
87 |
+
}
|
88 |
+
},
|
89 |
+
"metadata": {}
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"output_type": "display_data",
|
93 |
+
"data": {
|
94 |
+
"text/plain": [
|
95 |
+
"generation_config.json: 0%| | 0.00/147 [00:00<?, ?B/s]"
|
96 |
+
],
|
97 |
+
"application/vnd.jupyter.widget-view+json": {
|
98 |
+
"version_major": 2,
|
99 |
+
"version_minor": 0,
|
100 |
+
"model_id": "46756e51804c48ebbabee753ea455457"
|
101 |
+
}
|
102 |
+
},
|
103 |
+
"metadata": {}
|
104 |
+
}
|
105 |
+
],
|
106 |
+
"execution_count": 3
|
107 |
+
},
|
108 |
+
{
|
109 |
+
"cell_type": "code",
|
110 |
+
"source": [
|
111 |
+
"model.to(device)"
|
112 |
+
],
|
113 |
+
"metadata": {
|
114 |
+
"collapsed": true,
|
115 |
+
"id": "WJ623uJ0XR60",
|
116 |
+
"outputId": "54381bb6-1b49-4478-e5b8-b20b03dc388a",
|
117 |
+
"colab": {
|
118 |
+
"base_uri": "https://localhost:8080/"
|
119 |
+
}
|
120 |
+
},
|
121 |
+
"id": "WJ623uJ0XR60",
|
122 |
+
"execution_count": 4,
|
123 |
+
"outputs": [
|
124 |
+
{
|
125 |
+
"output_type": "execute_result",
|
126 |
+
"data": {
|
127 |
+
"text/plain": [
|
128 |
+
"T5ForConditionalGeneration(\n",
|
129 |
+
" (shared): Embedding(32128, 2048)\n",
|
130 |
+
" (encoder): T5Stack(\n",
|
131 |
+
" (embed_tokens): Embedding(32128, 2048)\n",
|
132 |
+
" (block): ModuleList(\n",
|
133 |
+
" (0): T5Block(\n",
|
134 |
+
" (layer): ModuleList(\n",
|
135 |
+
" (0): T5LayerSelfAttention(\n",
|
136 |
+
" (SelfAttention): T5Attention(\n",
|
137 |
+
" (q): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
138 |
+
" (k): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
139 |
+
" (v): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
140 |
+
" (o): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
141 |
+
" (relative_attention_bias): Embedding(32, 32)\n",
|
142 |
+
" )\n",
|
143 |
+
" (layer_norm): T5LayerNorm()\n",
|
144 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
145 |
+
" )\n",
|
146 |
+
" (1): T5LayerFF(\n",
|
147 |
+
" (DenseReluDense): T5DenseGatedActDense(\n",
|
148 |
+
" (wi_0): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
149 |
+
" (wi_1): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
150 |
+
" (wo): Linear(in_features=5120, out_features=2048, bias=False)\n",
|
151 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
152 |
+
" (act): NewGELUActivation()\n",
|
153 |
+
" )\n",
|
154 |
+
" (layer_norm): T5LayerNorm()\n",
|
155 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
156 |
+
" )\n",
|
157 |
+
" )\n",
|
158 |
+
" )\n",
|
159 |
+
" (1-23): 23 x T5Block(\n",
|
160 |
+
" (layer): ModuleList(\n",
|
161 |
+
" (0): T5LayerSelfAttention(\n",
|
162 |
+
" (SelfAttention): T5Attention(\n",
|
163 |
+
" (q): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
164 |
+
" (k): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
165 |
+
" (v): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
166 |
+
" (o): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
167 |
+
" )\n",
|
168 |
+
" (layer_norm): T5LayerNorm()\n",
|
169 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
170 |
+
" )\n",
|
171 |
+
" (1): T5LayerFF(\n",
|
172 |
+
" (DenseReluDense): T5DenseGatedActDense(\n",
|
173 |
+
" (wi_0): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
174 |
+
" (wi_1): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
175 |
+
" (wo): Linear(in_features=5120, out_features=2048, bias=False)\n",
|
176 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
177 |
+
" (act): NewGELUActivation()\n",
|
178 |
+
" )\n",
|
179 |
+
" (layer_norm): T5LayerNorm()\n",
|
180 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
181 |
+
" )\n",
|
182 |
+
" )\n",
|
183 |
+
" )\n",
|
184 |
+
" )\n",
|
185 |
+
" (final_layer_norm): T5LayerNorm()\n",
|
186 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
187 |
+
" )\n",
|
188 |
+
" (decoder): T5Stack(\n",
|
189 |
+
" (embed_tokens): Embedding(32128, 2048)\n",
|
190 |
+
" (block): ModuleList(\n",
|
191 |
+
" (0): T5Block(\n",
|
192 |
+
" (layer): ModuleList(\n",
|
193 |
+
" (0): T5LayerSelfAttention(\n",
|
194 |
+
" (SelfAttention): T5Attention(\n",
|
195 |
+
" (q): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
196 |
+
" (k): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
197 |
+
" (v): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
198 |
+
" (o): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
199 |
+
" (relative_attention_bias): Embedding(32, 32)\n",
|
200 |
+
" )\n",
|
201 |
+
" (layer_norm): T5LayerNorm()\n",
|
202 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
203 |
+
" )\n",
|
204 |
+
" (1): T5LayerCrossAttention(\n",
|
205 |
+
" (EncDecAttention): T5Attention(\n",
|
206 |
+
" (q): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
207 |
+
" (k): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
208 |
+
" (v): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
209 |
+
" (o): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
210 |
+
" )\n",
|
211 |
+
" (layer_norm): T5LayerNorm()\n",
|
212 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
213 |
+
" )\n",
|
214 |
+
" (2): T5LayerFF(\n",
|
215 |
+
" (DenseReluDense): T5DenseGatedActDense(\n",
|
216 |
+
" (wi_0): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
217 |
+
" (wi_1): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
218 |
+
" (wo): Linear(in_features=5120, out_features=2048, bias=False)\n",
|
219 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
220 |
+
" (act): NewGELUActivation()\n",
|
221 |
+
" )\n",
|
222 |
+
" (layer_norm): T5LayerNorm()\n",
|
223 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
224 |
+
" )\n",
|
225 |
+
" )\n",
|
226 |
+
" )\n",
|
227 |
+
" (1-23): 23 x T5Block(\n",
|
228 |
+
" (layer): ModuleList(\n",
|
229 |
+
" (0): T5LayerSelfAttention(\n",
|
230 |
+
" (SelfAttention): T5Attention(\n",
|
231 |
+
" (q): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
232 |
+
" (k): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
233 |
+
" (v): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
234 |
+
" (o): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
235 |
+
" )\n",
|
236 |
+
" (layer_norm): T5LayerNorm()\n",
|
237 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
238 |
+
" )\n",
|
239 |
+
" (1): T5LayerCrossAttention(\n",
|
240 |
+
" (EncDecAttention): T5Attention(\n",
|
241 |
+
" (q): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
242 |
+
" (k): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
243 |
+
" (v): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
244 |
+
" (o): Linear(in_features=2048, out_features=2048, bias=False)\n",
|
245 |
+
" )\n",
|
246 |
+
" (layer_norm): T5LayerNorm()\n",
|
247 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
248 |
+
" )\n",
|
249 |
+
" (2): T5LayerFF(\n",
|
250 |
+
" (DenseReluDense): T5DenseGatedActDense(\n",
|
251 |
+
" (wi_0): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
252 |
+
" (wi_1): Linear(in_features=2048, out_features=5120, bias=False)\n",
|
253 |
+
" (wo): Linear(in_features=5120, out_features=2048, bias=False)\n",
|
254 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
255 |
+
" (act): NewGELUActivation()\n",
|
256 |
+
" )\n",
|
257 |
+
" (layer_norm): T5LayerNorm()\n",
|
258 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
259 |
+
" )\n",
|
260 |
+
" )\n",
|
261 |
+
" )\n",
|
262 |
+
" )\n",
|
263 |
+
" (final_layer_norm): T5LayerNorm()\n",
|
264 |
+
" (dropout): Dropout(p=0.1, inplace=False)\n",
|
265 |
+
" )\n",
|
266 |
+
" (lm_head): Linear(in_features=2048, out_features=32128, bias=False)\n",
|
267 |
+
")"
|
268 |
+
]
|
269 |
+
},
|
270 |
+
"metadata": {},
|
271 |
+
"execution_count": 4
|
272 |
+
}
|
273 |
+
]
|
274 |
+
},
|
275 |
+
{
|
276 |
+
"cell_type": "code",
|
277 |
+
"source": [
|
278 |
+
"from transformers import Trainer, TrainingArguments\n",
|
279 |
+
"\n",
|
280 |
+
"# Define training arguments\n",
|
281 |
+
"training_args = TrainingArguments(\n",
|
282 |
+
" output_dir=\"./output\",\n",
|
283 |
+
" num_train_epochs=3,\n",
|
284 |
+
" per_device_train_batch_size=8,\n",
|
285 |
+
" # ... other training arguments\n",
|
286 |
+
")\n",
|
287 |
+
"\n",
|
288 |
+
"# Create a Trainer object\n",
|
289 |
+
"trainer = Trainer(\n",
|
290 |
+
" model=model,\n",
|
291 |
+
" args=training_args,\n",
|
292 |
+
" train_dataset=Financial.csv, # Load your training dataset\n",
|
293 |
+
")\n",
|
294 |
+
"\n",
|
295 |
+
"# Start training\n",
|
296 |
+
"trainer.train()"
|
297 |
+
],
|
298 |
+
"metadata": {
|
299 |
+
"id": "j_Y33_fMfGd9"
|
300 |
+
},
|
301 |
+
"id": "j_Y33_fMfGd9",
|
302 |
+
"execution_count": null,
|
303 |
+
"outputs": []
|
304 |
+
},
|
305 |
+
{
|
306 |
+
"cell_type": "code",
|
307 |
+
"id": "7ce8ee88e61ac738",
|
308 |
+
"metadata": {
|
309 |
+
"ExecuteTime": {
|
310 |
+
"end_time": "2024-07-01T11:08:50.346303Z",
|
311 |
+
"start_time": "2024-07-01T11:08:50.336252Z"
|
312 |
+
},
|
313 |
+
"id": "7ce8ee88e61ac738"
|
314 |
+
},
|
315 |
+
"source": [
|
316 |
+
"def get_response(prompt, max_new_tokens=50):\n",
|
317 |
+
" inputs = tokenizer(prompt, return_tensors=\"pt\").to(device)\n",
|
318 |
+
" outputs = model.generate(**inputs, max_new_tokens=max_new_tokens, temperature= 0.0001, do_sample=True)\n",
|
319 |
+
" response = tokenizer.decode(outputs[0], skip_special_tokens=True) # Use indexing instead of calling\n",
|
320 |
+
" return response"
|
321 |
+
],
|
322 |
+
"outputs": [],
|
323 |
+
"execution_count": 15
|
324 |
+
},
|
325 |
+
{
|
326 |
+
"metadata": {
|
327 |
+
"jupyter": {
|
328 |
+
"is_executing": true
|
329 |
+
},
|
330 |
+
"colab": {
|
331 |
+
"base_uri": "https://localhost:8080/",
|
332 |
+
"height": 36
|
333 |
+
},
|
334 |
+
"id": "de9f0fcc6dc9fa82",
|
335 |
+
"outputId": "91cc9e78-4e4e-4f29-99b4-94fdaedccd1b"
|
336 |
+
},
|
337 |
+
"cell_type": "code",
|
338 |
+
"source": [
|
339 |
+
"prompt ='What is capital of Madhya Pradesh'\n",
|
340 |
+
"get_response(prompt, max_new_tokens=50)"
|
341 |
+
],
|
342 |
+
"id": "de9f0fcc6dc9fa82",
|
343 |
+
"outputs": [
|
344 |
+
{
|
345 |
+
"output_type": "execute_result",
|
346 |
+
"data": {
|
347 |
+
"text/plain": [
|
348 |
+
"'bhopal'"
|
349 |
+
],
|
350 |
+
"application/vnd.google.colaboratory.intrinsic+json": {
|
351 |
+
"type": "string"
|
352 |
+
}
|
353 |
+
},
|
354 |
+
"metadata": {},
|
355 |
+
"execution_count": 34
|
356 |
+
}
|
357 |
+
],
|
358 |
+
"execution_count": 34
|
359 |
+
},
|
360 |
+
{
|
361 |
+
"cell_type": "code",
|
362 |
+
"source": [],
|
363 |
+
"metadata": {
|
364 |
+
"id": "s77Nu-3UaeZ9"
|
365 |
+
},
|
366 |
+
"id": "s77Nu-3UaeZ9",
|
367 |
+
"execution_count": null,
|
368 |
+
"outputs": []
|
369 |
+
}
|
370 |
+
],
|
371 |
+
"metadata": {
|
372 |
+
"kernelspec": {
|
373 |
+
"display_name": "Python 3",
|
374 |
+
"name": "python3"
|
375 |
+
},
|
376 |
+
"language_info": {
|
377 |
+
"codemirror_mode": {
|
378 |
+
"name": "ipython",
|
379 |
+
"version": 3
|
380 |
+
},
|
381 |
+
"file_extension": ".py",
|
382 |
+
"mimetype": "text/x-python",
|
383 |
+
"name": "python",
|
384 |
+
"nbconvert_exporter": "python",
|
385 |
+
"pygments_lexer": "ipython3",
|
386 |
+
"version": "3.12.4"
|
387 |
+
},
|
388 |
+
"colab": {
|
389 |
+
"provenance": [],
|
390 |
+
"gpuType": "T4"
|
391 |
+
},
|
392 |
+
"widgets": {
|
393 |
+
"application/vnd.jupyter.widget-state+json": {
|
394 |
+
"6ecdc71d497b4ab7bc6dca2ace0bd656": {
|
395 |
+
"model_module": "@jupyter-widgets/controls",
|
396 |
+
"model_name": "HBoxModel",
|
397 |
+
"model_module_version": "1.5.0",
|
398 |
+
"state": {
|
399 |
+
"_dom_classes": [],
|
400 |
+
"_model_module": "@jupyter-widgets/controls",
|
401 |
+
"_model_module_version": "1.5.0",
|
402 |
+
"_model_name": "HBoxModel",
|
403 |
+
"_view_count": null,
|
404 |
+
"_view_module": "@jupyter-widgets/controls",
|
405 |
+
"_view_module_version": "1.5.0",
|
406 |
+
"_view_name": "HBoxView",
|
407 |
+
"box_style": "",
|
408 |
+
"children": [
|
409 |
+
"IPY_MODEL_2af56a7c045d4bc294c6cb6d362a8120",
|
410 |
+
"IPY_MODEL_f5611ea1eab5406eb5796ffed1218a0c",
|
411 |
+
"IPY_MODEL_68855bdfbeed46e7b7e3d82a9b4c0988"
|
412 |
+
],
|
413 |
+
"layout": "IPY_MODEL_24b9e5603be54e72b2bcf99be716b97d"
|
414 |
+
}
|
415 |
+
},
|
416 |
+
"2af56a7c045d4bc294c6cb6d362a8120": {
|
417 |
+
"model_module": "@jupyter-widgets/controls",
|
418 |
+
"model_name": "HTMLModel",
|
419 |
+
"model_module_version": "1.5.0",
|
420 |
+
"state": {
|
421 |
+
"_dom_classes": [],
|
422 |
+
"_model_module": "@jupyter-widgets/controls",
|
423 |
+
"_model_module_version": "1.5.0",
|
424 |
+
"_model_name": "HTMLModel",
|
425 |
+
"_view_count": null,
|
426 |
+
"_view_module": "@jupyter-widgets/controls",
|
427 |
+
"_view_module_version": "1.5.0",
|
428 |
+
"_view_name": "HTMLView",
|
429 |
+
"description": "",
|
430 |
+
"description_tooltip": null,
|
431 |
+
"layout": "IPY_MODEL_64c42ce2cab04fb0aed8e65efebdfd11",
|
432 |
+
"placeholder": "",
|
433 |
+
"style": "IPY_MODEL_85fc022f4f1841e480af3f5496f36fe0",
|
434 |
+
"value": "Loading checkpoint shards: 100%"
|
435 |
+
}
|
436 |
+
},
|
437 |
+
"f5611ea1eab5406eb5796ffed1218a0c": {
|
438 |
+
"model_module": "@jupyter-widgets/controls",
|
439 |
+
"model_name": "FloatProgressModel",
|
440 |
+
"model_module_version": "1.5.0",
|
441 |
+
"state": {
|
442 |
+
"_dom_classes": [],
|
443 |
+
"_model_module": "@jupyter-widgets/controls",
|
444 |
+
"_model_module_version": "1.5.0",
|
445 |
+
"_model_name": "FloatProgressModel",
|
446 |
+
"_view_count": null,
|
447 |
+
"_view_module": "@jupyter-widgets/controls",
|
448 |
+
"_view_module_version": "1.5.0",
|
449 |
+
"_view_name": "ProgressView",
|
450 |
+
"bar_style": "success",
|
451 |
+
"description": "",
|
452 |
+
"description_tooltip": null,
|
453 |
+
"layout": "IPY_MODEL_2e384f5f20db45579dc708ede8b15c87",
|
454 |
+
"max": 2,
|
455 |
+
"min": 0,
|
456 |
+
"orientation": "horizontal",
|
457 |
+
"style": "IPY_MODEL_c9409991f35d4966989cf936f88fe99a",
|
458 |
+
"value": 2
|
459 |
+
}
|
460 |
+
},
|
461 |
+
"68855bdfbeed46e7b7e3d82a9b4c0988": {
|
462 |
+
"model_module": "@jupyter-widgets/controls",
|
463 |
+
"model_name": "HTMLModel",
|
464 |
+
"model_module_version": "1.5.0",
|
465 |
+
"state": {
|
466 |
+
"_dom_classes": [],
|
467 |
+
"_model_module": "@jupyter-widgets/controls",
|
468 |
+
"_model_module_version": "1.5.0",
|
469 |
+
"_model_name": "HTMLModel",
|
470 |
+
"_view_count": null,
|
471 |
+
"_view_module": "@jupyter-widgets/controls",
|
472 |
+
"_view_module_version": "1.5.0",
|
473 |
+
"_view_name": "HTMLView",
|
474 |
+
"description": "",
|
475 |
+
"description_tooltip": null,
|
476 |
+
"layout": "IPY_MODEL_0f4ba7cacc6d49599f3178b738092e09",
|
477 |
+
"placeholder": "",
|
478 |
+
"style": "IPY_MODEL_ddf9f8decaf948bbb67b8f71610c31b1",
|
479 |
+
"value": " 2/2 [00:52<00:00, 23.08s/it]"
|
480 |
+
}
|
481 |
+
},
|
482 |
+
"24b9e5603be54e72b2bcf99be716b97d": {
|
483 |
+
"model_module": "@jupyter-widgets/base",
|
484 |
+
"model_name": "LayoutModel",
|
485 |
+
"model_module_version": "1.2.0",
|
486 |
+
"state": {
|
487 |
+
"_model_module": "@jupyter-widgets/base",
|
488 |
+
"_model_module_version": "1.2.0",
|
489 |
+
"_model_name": "LayoutModel",
|
490 |
+
"_view_count": null,
|
491 |
+
"_view_module": "@jupyter-widgets/base",
|
492 |
+
"_view_module_version": "1.2.0",
|
493 |
+
"_view_name": "LayoutView",
|
494 |
+
"align_content": null,
|
495 |
+
"align_items": null,
|
496 |
+
"align_self": null,
|
497 |
+
"border": null,
|
498 |
+
"bottom": null,
|
499 |
+
"display": null,
|
500 |
+
"flex": null,
|
501 |
+
"flex_flow": null,
|
502 |
+
"grid_area": null,
|
503 |
+
"grid_auto_columns": null,
|
504 |
+
"grid_auto_flow": null,
|
505 |
+
"grid_auto_rows": null,
|
506 |
+
"grid_column": null,
|
507 |
+
"grid_gap": null,
|
508 |
+
"grid_row": null,
|
509 |
+
"grid_template_areas": null,
|
510 |
+
"grid_template_columns": null,
|
511 |
+
"grid_template_rows": null,
|
512 |
+
"height": null,
|
513 |
+
"justify_content": null,
|
514 |
+
"justify_items": null,
|
515 |
+
"left": null,
|
516 |
+
"margin": null,
|
517 |
+
"max_height": null,
|
518 |
+
"max_width": null,
|
519 |
+
"min_height": null,
|
520 |
+
"min_width": null,
|
521 |
+
"object_fit": null,
|
522 |
+
"object_position": null,
|
523 |
+
"order": null,
|
524 |
+
"overflow": null,
|
525 |
+
"overflow_x": null,
|
526 |
+
"overflow_y": null,
|
527 |
+
"padding": null,
|
528 |
+
"right": null,
|
529 |
+
"top": null,
|
530 |
+
"visibility": null,
|
531 |
+
"width": null
|
532 |
+
}
|
533 |
+
},
|
534 |
+
"64c42ce2cab04fb0aed8e65efebdfd11": {
|
535 |
+
"model_module": "@jupyter-widgets/base",
|
536 |
+
"model_name": "LayoutModel",
|
537 |
+
"model_module_version": "1.2.0",
|
538 |
+
"state": {
|
539 |
+
"_model_module": "@jupyter-widgets/base",
|
540 |
+
"_model_module_version": "1.2.0",
|
541 |
+
"_model_name": "LayoutModel",
|
542 |
+
"_view_count": null,
|
543 |
+
"_view_module": "@jupyter-widgets/base",
|
544 |
+
"_view_module_version": "1.2.0",
|
545 |
+
"_view_name": "LayoutView",
|
546 |
+
"align_content": null,
|
547 |
+
"align_items": null,
|
548 |
+
"align_self": null,
|
549 |
+
"border": null,
|
550 |
+
"bottom": null,
|
551 |
+
"display": null,
|
552 |
+
"flex": null,
|
553 |
+
"flex_flow": null,
|
554 |
+
"grid_area": null,
|
555 |
+
"grid_auto_columns": null,
|
556 |
+
"grid_auto_flow": null,
|
557 |
+
"grid_auto_rows": null,
|
558 |
+
"grid_column": null,
|
559 |
+
"grid_gap": null,
|
560 |
+
"grid_row": null,
|
561 |
+
"grid_template_areas": null,
|
562 |
+
"grid_template_columns": null,
|
563 |
+
"grid_template_rows": null,
|
564 |
+
"height": null,
|
565 |
+
"justify_content": null,
|
566 |
+
"justify_items": null,
|
567 |
+
"left": null,
|
568 |
+
"margin": null,
|
569 |
+
"max_height": null,
|
570 |
+
"max_width": null,
|
571 |
+
"min_height": null,
|
572 |
+
"min_width": null,
|
573 |
+
"object_fit": null,
|
574 |
+
"object_position": null,
|
575 |
+
"order": null,
|
576 |
+
"overflow": null,
|
577 |
+
"overflow_x": null,
|
578 |
+
"overflow_y": null,
|
579 |
+
"padding": null,
|
580 |
+
"right": null,
|
581 |
+
"top": null,
|
582 |
+
"visibility": null,
|
583 |
+
"width": null
|
584 |
+
}
|
585 |
+
},
|
586 |
+
"85fc022f4f1841e480af3f5496f36fe0": {
|
587 |
+
"model_module": "@jupyter-widgets/controls",
|
588 |
+
"model_name": "DescriptionStyleModel",
|
589 |
+
"model_module_version": "1.5.0",
|
590 |
+
"state": {
|
591 |
+
"_model_module": "@jupyter-widgets/controls",
|
592 |
+
"_model_module_version": "1.5.0",
|
593 |
+
"_model_name": "DescriptionStyleModel",
|
594 |
+
"_view_count": null,
|
595 |
+
"_view_module": "@jupyter-widgets/base",
|
596 |
+
"_view_module_version": "1.2.0",
|
597 |
+
"_view_name": "StyleView",
|
598 |
+
"description_width": ""
|
599 |
+
}
|
600 |
+
},
|
601 |
+
"2e384f5f20db45579dc708ede8b15c87": {
|
602 |
+
"model_module": "@jupyter-widgets/base",
|
603 |
+
"model_name": "LayoutModel",
|
604 |
+
"model_module_version": "1.2.0",
|
605 |
+
"state": {
|
606 |
+
"_model_module": "@jupyter-widgets/base",
|
607 |
+
"_model_module_version": "1.2.0",
|
608 |
+
"_model_name": "LayoutModel",
|
609 |
+
"_view_count": null,
|
610 |
+
"_view_module": "@jupyter-widgets/base",
|
611 |
+
"_view_module_version": "1.2.0",
|
612 |
+
"_view_name": "LayoutView",
|
613 |
+
"align_content": null,
|
614 |
+
"align_items": null,
|
615 |
+
"align_self": null,
|
616 |
+
"border": null,
|
617 |
+
"bottom": null,
|
618 |
+
"display": null,
|
619 |
+
"flex": null,
|
620 |
+
"flex_flow": null,
|
621 |
+
"grid_area": null,
|
622 |
+
"grid_auto_columns": null,
|
623 |
+
"grid_auto_flow": null,
|
624 |
+
"grid_auto_rows": null,
|
625 |
+
"grid_column": null,
|
626 |
+
"grid_gap": null,
|
627 |
+
"grid_row": null,
|
628 |
+
"grid_template_areas": null,
|
629 |
+
"grid_template_columns": null,
|
630 |
+
"grid_template_rows": null,
|
631 |
+
"height": null,
|
632 |
+
"justify_content": null,
|
633 |
+
"justify_items": null,
|
634 |
+
"left": null,
|
635 |
+
"margin": null,
|
636 |
+
"max_height": null,
|
637 |
+
"max_width": null,
|
638 |
+
"min_height": null,
|
639 |
+
"min_width": null,
|
640 |
+
"object_fit": null,
|
641 |
+
"object_position": null,
|
642 |
+
"order": null,
|
643 |
+
"overflow": null,
|
644 |
+
"overflow_x": null,
|
645 |
+
"overflow_y": null,
|
646 |
+
"padding": null,
|
647 |
+
"right": null,
|
648 |
+
"top": null,
|
649 |
+
"visibility": null,
|
650 |
+
"width": null
|
651 |
+
}
|
652 |
+
},
|
653 |
+
"c9409991f35d4966989cf936f88fe99a": {
|
654 |
+
"model_module": "@jupyter-widgets/controls",
|
655 |
+
"model_name": "ProgressStyleModel",
|
656 |
+
"model_module_version": "1.5.0",
|
657 |
+
"state": {
|
658 |
+
"_model_module": "@jupyter-widgets/controls",
|
659 |
+
"_model_module_version": "1.5.0",
|
660 |
+
"_model_name": "ProgressStyleModel",
|
661 |
+
"_view_count": null,
|
662 |
+
"_view_module": "@jupyter-widgets/base",
|
663 |
+
"_view_module_version": "1.2.0",
|
664 |
+
"_view_name": "StyleView",
|
665 |
+
"bar_color": null,
|
666 |
+
"description_width": ""
|
667 |
+
}
|
668 |
+
},
|
669 |
+
"0f4ba7cacc6d49599f3178b738092e09": {
|
670 |
+
"model_module": "@jupyter-widgets/base",
|
671 |
+
"model_name": "LayoutModel",
|
672 |
+
"model_module_version": "1.2.0",
|
673 |
+
"state": {
|
674 |
+
"_model_module": "@jupyter-widgets/base",
|
675 |
+
"_model_module_version": "1.2.0",
|
676 |
+
"_model_name": "LayoutModel",
|
677 |
+
"_view_count": null,
|
678 |
+
"_view_module": "@jupyter-widgets/base",
|
679 |
+
"_view_module_version": "1.2.0",
|
680 |
+
"_view_name": "LayoutView",
|
681 |
+
"align_content": null,
|
682 |
+
"align_items": null,
|
683 |
+
"align_self": null,
|
684 |
+
"border": null,
|
685 |
+
"bottom": null,
|
686 |
+
"display": null,
|
687 |
+
"flex": null,
|
688 |
+
"flex_flow": null,
|
689 |
+
"grid_area": null,
|
690 |
+
"grid_auto_columns": null,
|
691 |
+
"grid_auto_flow": null,
|
692 |
+
"grid_auto_rows": null,
|
693 |
+
"grid_column": null,
|
694 |
+
"grid_gap": null,
|
695 |
+
"grid_row": null,
|
696 |
+
"grid_template_areas": null,
|
697 |
+
"grid_template_columns": null,
|
698 |
+
"grid_template_rows": null,
|
699 |
+
"height": null,
|
700 |
+
"justify_content": null,
|
701 |
+
"justify_items": null,
|
702 |
+
"left": null,
|
703 |
+
"margin": null,
|
704 |
+
"max_height": null,
|
705 |
+
"max_width": null,
|
706 |
+
"min_height": null,
|
707 |
+
"min_width": null,
|
708 |
+
"object_fit": null,
|
709 |
+
"object_position": null,
|
710 |
+
"order": null,
|
711 |
+
"overflow": null,
|
712 |
+
"overflow_x": null,
|
713 |
+
"overflow_y": null,
|
714 |
+
"padding": null,
|
715 |
+
"right": null,
|
716 |
+
"top": null,
|
717 |
+
"visibility": null,
|
718 |
+
"width": null
|
719 |
+
}
|
720 |
+
},
|
721 |
+
"ddf9f8decaf948bbb67b8f71610c31b1": {
|
722 |
+
"model_module": "@jupyter-widgets/controls",
|
723 |
+
"model_name": "DescriptionStyleModel",
|
724 |
+
"model_module_version": "1.5.0",
|
725 |
+
"state": {
|
726 |
+
"_model_module": "@jupyter-widgets/controls",
|
727 |
+
"_model_module_version": "1.5.0",
|
728 |
+
"_model_name": "DescriptionStyleModel",
|
729 |
+
"_view_count": null,
|
730 |
+
"_view_module": "@jupyter-widgets/base",
|
731 |
+
"_view_module_version": "1.2.0",
|
732 |
+
"_view_name": "StyleView",
|
733 |
+
"description_width": ""
|
734 |
+
}
|
735 |
+
},
|
736 |
+
"46756e51804c48ebbabee753ea455457": {
|
737 |
+
"model_module": "@jupyter-widgets/controls",
|
738 |
+
"model_name": "HBoxModel",
|
739 |
+
"model_module_version": "1.5.0",
|
740 |
+
"state": {
|
741 |
+
"_dom_classes": [],
|
742 |
+
"_model_module": "@jupyter-widgets/controls",
|
743 |
+
"_model_module_version": "1.5.0",
|
744 |
+
"_model_name": "HBoxModel",
|
745 |
+
"_view_count": null,
|
746 |
+
"_view_module": "@jupyter-widgets/controls",
|
747 |
+
"_view_module_version": "1.5.0",
|
748 |
+
"_view_name": "HBoxView",
|
749 |
+
"box_style": "",
|
750 |
+
"children": [
|
751 |
+
"IPY_MODEL_f98f7a5726d6434d9087fe521e136795",
|
752 |
+
"IPY_MODEL_cc3c582d99d24da1b7bf1f8168961749",
|
753 |
+
"IPY_MODEL_81b3bc430cc7409f9f51cd222fb0ca0e"
|
754 |
+
],
|
755 |
+
"layout": "IPY_MODEL_f66bc695f26e4603ac38f23168e65763"
|
756 |
+
}
|
757 |
+
},
|
758 |
+
"f98f7a5726d6434d9087fe521e136795": {
|
759 |
+
"model_module": "@jupyter-widgets/controls",
|
760 |
+
"model_name": "HTMLModel",
|
761 |
+
"model_module_version": "1.5.0",
|
762 |
+
"state": {
|
763 |
+
"_dom_classes": [],
|
764 |
+
"_model_module": "@jupyter-widgets/controls",
|
765 |
+
"_model_module_version": "1.5.0",
|
766 |
+
"_model_name": "HTMLModel",
|
767 |
+
"_view_count": null,
|
768 |
+
"_view_module": "@jupyter-widgets/controls",
|
769 |
+
"_view_module_version": "1.5.0",
|
770 |
+
"_view_name": "HTMLView",
|
771 |
+
"description": "",
|
772 |
+
"description_tooltip": null,
|
773 |
+
"layout": "IPY_MODEL_d4a74b31d8064a5bba43849ed4b6658b",
|
774 |
+
"placeholder": "",
|
775 |
+
"style": "IPY_MODEL_72731803b79343b0b6a61d722009b6b6",
|
776 |
+
"value": "generation_config.json: 100%"
|
777 |
+
}
|
778 |
+
},
|
779 |
+
"cc3c582d99d24da1b7bf1f8168961749": {
|
780 |
+
"model_module": "@jupyter-widgets/controls",
|
781 |
+
"model_name": "FloatProgressModel",
|
782 |
+
"model_module_version": "1.5.0",
|
783 |
+
"state": {
|
784 |
+
"_dom_classes": [],
|
785 |
+
"_model_module": "@jupyter-widgets/controls",
|
786 |
+
"_model_module_version": "1.5.0",
|
787 |
+
"_model_name": "FloatProgressModel",
|
788 |
+
"_view_count": null,
|
789 |
+
"_view_module": "@jupyter-widgets/controls",
|
790 |
+
"_view_module_version": "1.5.0",
|
791 |
+
"_view_name": "ProgressView",
|
792 |
+
"bar_style": "success",
|
793 |
+
"description": "",
|
794 |
+
"description_tooltip": null,
|
795 |
+
"layout": "IPY_MODEL_0ff317589550455f8eef5021912dd27c",
|
796 |
+
"max": 147,
|
797 |
+
"min": 0,
|
798 |
+
"orientation": "horizontal",
|
799 |
+
"style": "IPY_MODEL_7e110f5c777442c4aab4ea06a27a3dc1",
|
800 |
+
"value": 147
|
801 |
+
}
|
802 |
+
},
|
803 |
+
"81b3bc430cc7409f9f51cd222fb0ca0e": {
|
804 |
+
"model_module": "@jupyter-widgets/controls",
|
805 |
+
"model_name": "HTMLModel",
|
806 |
+
"model_module_version": "1.5.0",
|
807 |
+
"state": {
|
808 |
+
"_dom_classes": [],
|
809 |
+
"_model_module": "@jupyter-widgets/controls",
|
810 |
+
"_model_module_version": "1.5.0",
|
811 |
+
"_model_name": "HTMLModel",
|
812 |
+
"_view_count": null,
|
813 |
+
"_view_module": "@jupyter-widgets/controls",
|
814 |
+
"_view_module_version": "1.5.0",
|
815 |
+
"_view_name": "HTMLView",
|
816 |
+
"description": "",
|
817 |
+
"description_tooltip": null,
|
818 |
+
"layout": "IPY_MODEL_ae1843d43b0f4199ba61e8c9e962f2b3",
|
819 |
+
"placeholder": "",
|
820 |
+
"style": "IPY_MODEL_d72cd66e520a4eea83c06d7df23ccc0e",
|
821 |
+
"value": " 147/147 [00:00<00:00, 7.99kB/s]"
|
822 |
+
}
|
823 |
+
},
|
824 |
+
"f66bc695f26e4603ac38f23168e65763": {
|
825 |
+
"model_module": "@jupyter-widgets/base",
|
826 |
+
"model_name": "LayoutModel",
|
827 |
+
"model_module_version": "1.2.0",
|
828 |
+
"state": {
|
829 |
+
"_model_module": "@jupyter-widgets/base",
|
830 |
+
"_model_module_version": "1.2.0",
|
831 |
+
"_model_name": "LayoutModel",
|
832 |
+
"_view_count": null,
|
833 |
+
"_view_module": "@jupyter-widgets/base",
|
834 |
+
"_view_module_version": "1.2.0",
|
835 |
+
"_view_name": "LayoutView",
|
836 |
+
"align_content": null,
|
837 |
+
"align_items": null,
|
838 |
+
"align_self": null,
|
839 |
+
"border": null,
|
840 |
+
"bottom": null,
|
841 |
+
"display": null,
|
842 |
+
"flex": null,
|
843 |
+
"flex_flow": null,
|
844 |
+
"grid_area": null,
|
845 |
+
"grid_auto_columns": null,
|
846 |
+
"grid_auto_flow": null,
|
847 |
+
"grid_auto_rows": null,
|
848 |
+
"grid_column": null,
|
849 |
+
"grid_gap": null,
|
850 |
+
"grid_row": null,
|
851 |
+
"grid_template_areas": null,
|
852 |
+
"grid_template_columns": null,
|
853 |
+
"grid_template_rows": null,
|
854 |
+
"height": null,
|
855 |
+
"justify_content": null,
|
856 |
+
"justify_items": null,
|
857 |
+
"left": null,
|
858 |
+
"margin": null,
|
859 |
+
"max_height": null,
|
860 |
+
"max_width": null,
|
861 |
+
"min_height": null,
|
862 |
+
"min_width": null,
|
863 |
+
"object_fit": null,
|
864 |
+
"object_position": null,
|
865 |
+
"order": null,
|
866 |
+
"overflow": null,
|
867 |
+
"overflow_x": null,
|
868 |
+
"overflow_y": null,
|
869 |
+
"padding": null,
|
870 |
+
"right": null,
|
871 |
+
"top": null,
|
872 |
+
"visibility": null,
|
873 |
+
"width": null
|
874 |
+
}
|
875 |
+
},
|
876 |
+
"d4a74b31d8064a5bba43849ed4b6658b": {
|
877 |
+
"model_module": "@jupyter-widgets/base",
|
878 |
+
"model_name": "LayoutModel",
|
879 |
+
"model_module_version": "1.2.0",
|
880 |
+
"state": {
|
881 |
+
"_model_module": "@jupyter-widgets/base",
|
882 |
+
"_model_module_version": "1.2.0",
|
883 |
+
"_model_name": "LayoutModel",
|
884 |
+
"_view_count": null,
|
885 |
+
"_view_module": "@jupyter-widgets/base",
|
886 |
+
"_view_module_version": "1.2.0",
|
887 |
+
"_view_name": "LayoutView",
|
888 |
+
"align_content": null,
|
889 |
+
"align_items": null,
|
890 |
+
"align_self": null,
|
891 |
+
"border": null,
|
892 |
+
"bottom": null,
|
893 |
+
"display": null,
|
894 |
+
"flex": null,
|
895 |
+
"flex_flow": null,
|
896 |
+
"grid_area": null,
|
897 |
+
"grid_auto_columns": null,
|
898 |
+
"grid_auto_flow": null,
|
899 |
+
"grid_auto_rows": null,
|
900 |
+
"grid_column": null,
|
901 |
+
"grid_gap": null,
|
902 |
+
"grid_row": null,
|
903 |
+
"grid_template_areas": null,
|
904 |
+
"grid_template_columns": null,
|
905 |
+
"grid_template_rows": null,
|
906 |
+
"height": null,
|
907 |
+
"justify_content": null,
|
908 |
+
"justify_items": null,
|
909 |
+
"left": null,
|
910 |
+
"margin": null,
|
911 |
+
"max_height": null,
|
912 |
+
"max_width": null,
|
913 |
+
"min_height": null,
|
914 |
+
"min_width": null,
|
915 |
+
"object_fit": null,
|
916 |
+
"object_position": null,
|
917 |
+
"order": null,
|
918 |
+
"overflow": null,
|
919 |
+
"overflow_x": null,
|
920 |
+
"overflow_y": null,
|
921 |
+
"padding": null,
|
922 |
+
"right": null,
|
923 |
+
"top": null,
|
924 |
+
"visibility": null,
|
925 |
+
"width": null
|
926 |
+
}
|
927 |
+
},
|
928 |
+
"72731803b79343b0b6a61d722009b6b6": {
|
929 |
+
"model_module": "@jupyter-widgets/controls",
|
930 |
+
"model_name": "DescriptionStyleModel",
|
931 |
+
"model_module_version": "1.5.0",
|
932 |
+
"state": {
|
933 |
+
"_model_module": "@jupyter-widgets/controls",
|
934 |
+
"_model_module_version": "1.5.0",
|
935 |
+
"_model_name": "DescriptionStyleModel",
|
936 |
+
"_view_count": null,
|
937 |
+
"_view_module": "@jupyter-widgets/base",
|
938 |
+
"_view_module_version": "1.2.0",
|
939 |
+
"_view_name": "StyleView",
|
940 |
+
"description_width": ""
|
941 |
+
}
|
942 |
+
},
|
943 |
+
"0ff317589550455f8eef5021912dd27c": {
|
944 |
+
"model_module": "@jupyter-widgets/base",
|
945 |
+
"model_name": "LayoutModel",
|
946 |
+
"model_module_version": "1.2.0",
|
947 |
+
"state": {
|
948 |
+
"_model_module": "@jupyter-widgets/base",
|
949 |
+
"_model_module_version": "1.2.0",
|
950 |
+
"_model_name": "LayoutModel",
|
951 |
+
"_view_count": null,
|
952 |
+
"_view_module": "@jupyter-widgets/base",
|
953 |
+
"_view_module_version": "1.2.0",
|
954 |
+
"_view_name": "LayoutView",
|
955 |
+
"align_content": null,
|
956 |
+
"align_items": null,
|
957 |
+
"align_self": null,
|
958 |
+
"border": null,
|
959 |
+
"bottom": null,
|
960 |
+
"display": null,
|
961 |
+
"flex": null,
|
962 |
+
"flex_flow": null,
|
963 |
+
"grid_area": null,
|
964 |
+
"grid_auto_columns": null,
|
965 |
+
"grid_auto_flow": null,
|
966 |
+
"grid_auto_rows": null,
|
967 |
+
"grid_column": null,
|
968 |
+
"grid_gap": null,
|
969 |
+
"grid_row": null,
|
970 |
+
"grid_template_areas": null,
|
971 |
+
"grid_template_columns": null,
|
972 |
+
"grid_template_rows": null,
|
973 |
+
"height": null,
|
974 |
+
"justify_content": null,
|
975 |
+
"justify_items": null,
|
976 |
+
"left": null,
|
977 |
+
"margin": null,
|
978 |
+
"max_height": null,
|
979 |
+
"max_width": null,
|
980 |
+
"min_height": null,
|
981 |
+
"min_width": null,
|
982 |
+
"object_fit": null,
|
983 |
+
"object_position": null,
|
984 |
+
"order": null,
|
985 |
+
"overflow": null,
|
986 |
+
"overflow_x": null,
|
987 |
+
"overflow_y": null,
|
988 |
+
"padding": null,
|
989 |
+
"right": null,
|
990 |
+
"top": null,
|
991 |
+
"visibility": null,
|
992 |
+
"width": null
|
993 |
+
}
|
994 |
+
},
|
995 |
+
"7e110f5c777442c4aab4ea06a27a3dc1": {
|
996 |
+
"model_module": "@jupyter-widgets/controls",
|
997 |
+
"model_name": "ProgressStyleModel",
|
998 |
+
"model_module_version": "1.5.0",
|
999 |
+
"state": {
|
1000 |
+
"_model_module": "@jupyter-widgets/controls",
|
1001 |
+
"_model_module_version": "1.5.0",
|
1002 |
+
"_model_name": "ProgressStyleModel",
|
1003 |
+
"_view_count": null,
|
1004 |
+
"_view_module": "@jupyter-widgets/base",
|
1005 |
+
"_view_module_version": "1.2.0",
|
1006 |
+
"_view_name": "StyleView",
|
1007 |
+
"bar_color": null,
|
1008 |
+
"description_width": ""
|
1009 |
+
}
|
1010 |
+
},
|
1011 |
+
"ae1843d43b0f4199ba61e8c9e962f2b3": {
|
1012 |
+
"model_module": "@jupyter-widgets/base",
|
1013 |
+
"model_name": "LayoutModel",
|
1014 |
+
"model_module_version": "1.2.0",
|
1015 |
+
"state": {
|
1016 |
+
"_model_module": "@jupyter-widgets/base",
|
1017 |
+
"_model_module_version": "1.2.0",
|
1018 |
+
"_model_name": "LayoutModel",
|
1019 |
+
"_view_count": null,
|
1020 |
+
"_view_module": "@jupyter-widgets/base",
|
1021 |
+
"_view_module_version": "1.2.0",
|
1022 |
+
"_view_name": "LayoutView",
|
1023 |
+
"align_content": null,
|
1024 |
+
"align_items": null,
|
1025 |
+
"align_self": null,
|
1026 |
+
"border": null,
|
1027 |
+
"bottom": null,
|
1028 |
+
"display": null,
|
1029 |
+
"flex": null,
|
1030 |
+
"flex_flow": null,
|
1031 |
+
"grid_area": null,
|
1032 |
+
"grid_auto_columns": null,
|
1033 |
+
"grid_auto_flow": null,
|
1034 |
+
"grid_auto_rows": null,
|
1035 |
+
"grid_column": null,
|
1036 |
+
"grid_gap": null,
|
1037 |
+
"grid_row": null,
|
1038 |
+
"grid_template_areas": null,
|
1039 |
+
"grid_template_columns": null,
|
1040 |
+
"grid_template_rows": null,
|
1041 |
+
"height": null,
|
1042 |
+
"justify_content": null,
|
1043 |
+
"justify_items": null,
|
1044 |
+
"left": null,
|
1045 |
+
"margin": null,
|
1046 |
+
"max_height": null,
|
1047 |
+
"max_width": null,
|
1048 |
+
"min_height": null,
|
1049 |
+
"min_width": null,
|
1050 |
+
"object_fit": null,
|
1051 |
+
"object_position": null,
|
1052 |
+
"order": null,
|
1053 |
+
"overflow": null,
|
1054 |
+
"overflow_x": null,
|
1055 |
+
"overflow_y": null,
|
1056 |
+
"padding": null,
|
1057 |
+
"right": null,
|
1058 |
+
"top": null,
|
1059 |
+
"visibility": null,
|
1060 |
+
"width": null
|
1061 |
+
}
|
1062 |
+
},
|
1063 |
+
"d72cd66e520a4eea83c06d7df23ccc0e": {
|
1064 |
+
"model_module": "@jupyter-widgets/controls",
|
1065 |
+
"model_name": "DescriptionStyleModel",
|
1066 |
+
"model_module_version": "1.5.0",
|
1067 |
+
"state": {
|
1068 |
+
"_model_module": "@jupyter-widgets/controls",
|
1069 |
+
"_model_module_version": "1.5.0",
|
1070 |
+
"_model_name": "DescriptionStyleModel",
|
1071 |
+
"_view_count": null,
|
1072 |
+
"_view_module": "@jupyter-widgets/base",
|
1073 |
+
"_view_module_version": "1.2.0",
|
1074 |
+
"_view_name": "StyleView",
|
1075 |
+
"description_width": ""
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
},
|
1080 |
+
"accelerator": "GPU"
|
1081 |
+
},
|
1082 |
+
"nbformat": 4,
|
1083 |
+
"nbformat_minor": 5
|
1084 |
+
}
|