Created
July 2, 2026 15:03
-
-
Save 45deg/293e7a1f41b7ec00aebba70e7041b9da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "id": "d5d61642", | |
| "metadata": { | |
| "id": "d5d61642" | |
| }, | |
| "source": [ | |
| "# Japanese punctuation restoration\n", | |
| "\n", | |
| "Colab notebook version.\n", | |
| "\n", | |
| "Data source:\n", | |
| "- LLM-jp Corpus v4 GitLab repository API\n", | |
| "- Lists `.jsonl.gz` files through GitLab API\n", | |
| "- Downloads selected gzip files on demand into `/content/llmjp_gitlab_cache`\n", | |
| "- Reads JSONL lines from local gzip cache during training\n", | |
| "\n", | |
| "Each JSONL row is expected to contain:\n", | |
| "```json\n", | |
| "{\"text\": \"...\", \"meta\": {...}}\n", | |
| "```\n", | |
| "\n", | |
| "Punctuation labels:\n", | |
| "- `NONE`\n", | |
| "- `、`\n", | |
| "- `。`\n", | |
| "\n", | |
| "Newline labels:\n", | |
| "- `0`\n", | |
| "- `1`\n", | |
| "\n", | |
| "The model predicts punctuation and newline insertion immediately after each input character.\n", | |
| "\n", | |
| "## 1. Install" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "id": "589f82d1", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 8435, | |
| "status": "ok", | |
| "timestamp": 1777267844166, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "589f82d1", | |
| "outputId": "182856cc-99f1-472b-cc68-93540209fb7b" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/64.9 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m64.9/64.9 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
| "\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/8.9 MB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m \u001b[32m8.9/8.9 MB\u001b[0m \u001b[31m280.1 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.9/8.9 MB\u001b[0m \u001b[31m147.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
| "\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/155.6 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m155.6/155.6 kB\u001b[0m \u001b[31m13.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
| "\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", | |
| "google-colab 1.0.0 requires requests==2.32.4, but you have requests 2.33.1 which is incompatible.\u001b[0m\u001b[31m\n", | |
| "\u001b[0m" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "\n", | |
| "!pip -q install -U requests scikit-learn psutil tqdm" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "2430964a", | |
| "metadata": { | |
| "id": "2430964a" | |
| }, | |
| "source": [ | |
| "## 2. Imports / Config" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 11, | |
| "id": "d8da75ee", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 1028, | |
| "status": "ok", | |
| "timestamp": 1777267933242, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "d8da75ee", | |
| "outputId": "38cbae56-0feb-40f4-f2dc-862f7c0c389d" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "DEVICE: cuda\n", | |
| "NVIDIA L4\n", | |
| "VRAM GB: 22.03\n", | |
| "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n", | |
| "checkpoint dir: /content/drive/MyDrive/punct-to-text-2/checkpoints\n", | |
| "TrainConfig(gitlab_base_url='https://gitlab.llm-jp.nii.ac.jp', gitlab_project_path='datasets/llm-jp-corpus-v4', gitlab_ref='main', gitlab_token_env='GITLAB_TOKEN', gitlab_timeout_sec=180, api_per_page=100, api_max_pages_per_corpus=80, cache_dir='/content/llmjp_gitlab_cache', force_redownload=False, max_files_per_corpus=32, download_workers=4, vocab_scan_docs_per_corpus=20000, vocab_min_freq=2, vocab_max_size=12000, experiment_name='vocab12000_swiglu', max_len=192, hidden=384, heads=6, layers=4, ffn_type='swiglu', swiglu_hidden=1024, norm_first=True, num_labels=3, dropout=0.12, epochs=5, steps_per_epoch=2000, batch_size=256, val_chunks=4096, shuffle_buffer_chunks=2048, num_workers=2, use_train_chunk_cache=True, use_val_chunk_cache=True, train_cache_chunks=1000000, train_chunk_cache_path=None, val_chunk_cache_path=None, min_chars_per_chunk=48, stride=144, max_chunks_per_document=6, val_doc_ratio=0.04, min_line_chars=8, max_line_chars=2000, min_text_chars=64, max_text_chars=12000, min_japanese_ratio=0.35, max_ascii_ratio=0.35, max_digit_ratio=0.25, min_punct_ratio=0.004, max_punct_ratio=0.22, drop_duplicate_lines=True, lr=0.0005, min_lr_ratio=0.06, warmup_ratio=0.06, weight_decay=0.01, label_smoothing=0.0, newline_loss_weight=0.5, newline_pos_weight=4.0, newline_threshold=0.5, punct_margin=0.0, newline_threshold_candidates=(0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6), punct_margin_candidates=(0.0, 0.25, 0.5, 0.75, 1.0), inference_mode='logits_center_weighted', auto_tune=True, auto_tune_results_path='stage_a_auto_tune_results.json', auto_tune_select_path='stage_a_selected_config.json', auto_tune_max_files_per_corpus=32, auto_tune_steps_per_epoch=600, auto_tune_epochs=2, auto_tune_val_chunks=4096, auto_tune_train_cache_chunks=1000000, auto_tune_candidates=({'name': 'A1_vocab16000_gelu', 'vocab_max_size': 16000, 'ffn_type': 'gelu'}, {'name': 'A2_vocab12000_gelu', 'vocab_max_size': 12000, 'ffn_type': 'gelu'}, {'name': 'A3_vocab8000_gelu', 'vocab_max_size': 8000, 'ffn_type': 'gelu'}, {'name': 'A4_vocab12000_swiglu', 'vocab_max_size': 12000, 'ffn_type': 'swiglu', 'swiglu_hidden': 1024}), grad_clip=1.0, use_torch_compile=False, class_weights=(0.25, 0.8, 1.0), work_dir='punct_train_llmjp_gitlab_work', ckpt_path='/content/drive/MyDrive/punct-to-text-2/checkpoints/best_punct_llmjp.pt', bundle_path='/content/drive/MyDrive/punct-to-text-2/checkpoints/punct_llmjp_bundle.json', save_checkpoint_to_drive=True, drive_mount_point='/content/drive', drive_dir='/content/drive/MyDrive/punct-to-text-2/checkpoints', resume_from_checkpoint=False, resume_ckpt_path=None, resume_ckpt_candidates=('/content/drive/MyDrive/punct-to-text-2/checkpoints/best_punct_llmjp.pt', 'best_punct_llmjp.pt'))\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "\n", | |
| "import os\n", | |
| "import re\n", | |
| "import gc\n", | |
| "import json\n", | |
| "import math\n", | |
| "import time\n", | |
| "import gzip\n", | |
| "import glob\n", | |
| "import random\n", | |
| "import hashlib\n", | |
| "import shutil\n", | |
| "import uuid\n", | |
| "from concurrent.futures import ThreadPoolExecutor, as_completed\n", | |
| "from dataclasses import dataclass, asdict\n", | |
| "from typing import Dict, List, Tuple, Optional, Iterator\n", | |
| "from collections import defaultdict, Counter\n", | |
| "from urllib.parse import quote\n", | |
| "\n", | |
| "import numpy as np\n", | |
| "import requests\n", | |
| "import psutil\n", | |
| "from tqdm.auto import tqdm\n", | |
| "from sklearn.metrics import precision_recall_fscore_support, classification_report\n", | |
| "\n", | |
| "import torch\n", | |
| "import torch.nn as nn\n", | |
| "from torch.utils.data import Dataset, IterableDataset, DataLoader\n", | |
| "\n", | |
| "SEED = 42\n", | |
| "random.seed(SEED)\n", | |
| "np.random.seed(SEED)\n", | |
| "torch.manual_seed(SEED)\n", | |
| "torch.cuda.manual_seed_all(SEED)\n", | |
| "\n", | |
| "DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n", | |
| "print(\"DEVICE:\", DEVICE)\n", | |
| "if DEVICE == \"cuda\":\n", | |
| " print(torch.cuda.get_device_name(0))\n", | |
| " print(\"VRAM GB:\", round(torch.cuda.get_device_properties(0).total_memory / 1024**3, 2))\n", | |
| " torch.backends.cuda.matmul.allow_tf32 = True\n", | |
| " torch.backends.cudnn.allow_tf32 = True\n", | |
| " torch.set_float32_matmul_precision(\"high\")\n", | |
| "\n", | |
| "LABEL2ID = {\n", | |
| " \"NONE\": 0,\n", | |
| " \"、\": 1,\n", | |
| " \"。\": 2,\n", | |
| "}\n", | |
| "ID2LABEL = {v: k for k, v in LABEL2ID.items()}\n", | |
| "PAD_ID = 0\n", | |
| "UNK_ID = 1\n", | |
| "PUNCT_BOUNDARY_CHARS = {\"、\", \"。\"}\n", | |
| "BOUNDARY_CHARS = PUNCT_BOUNDARY_CHARS | {\"\\n\"}\n", | |
| "REMOVE_CHARS = {\"\\u3000\", \"\\t\", \"\\r\"}\n", | |
| "\n", | |
| "@dataclass\n", | |
| "class TrainConfig:\n", | |
| " # GitLab repository API\n", | |
| " gitlab_base_url: str = \"https://gitlab.llm-jp.nii.ac.jp\"\n", | |
| " gitlab_project_path: str = \"datasets/llm-jp-corpus-v4\"\n", | |
| " gitlab_ref: str = \"main\"\n", | |
| " gitlab_token_env: str = \"GITLAB_TOKEN\"\n", | |
| " gitlab_timeout_sec: int = 180\n", | |
| " api_per_page: int = 100\n", | |
| " api_max_pages_per_corpus: int = 80\n", | |
| "\n", | |
| " # Download/cache\n", | |
| " cache_dir: str = \"/content/llmjp_gitlab_cache\"\n", | |
| " force_redownload: bool = False\n", | |
| "\n", | |
| " # Keep this small for GitLab API mode. Increase only after the first run is cached.\n", | |
| " max_files_per_corpus: Optional[int] = 32\n", | |
| " download_workers: int = 4\n", | |
| "\n", | |
| " # Compact character vocabulary. This keeps the web ONNX model much smaller\n", | |
| " # than the old 65k hash embedding table.\n", | |
| " vocab_scan_docs_per_corpus: int = 20_000\n", | |
| " vocab_min_freq: int = 2\n", | |
| " vocab_max_size: int = 12_000\n", | |
| " experiment_name: Optional[str] = None\n", | |
| "\n", | |
| " # Model\n", | |
| " max_len: int = 192\n", | |
| " hidden: int = 384\n", | |
| " heads: int = 6\n", | |
| " layers: int = 4\n", | |
| " ffn_type: str = \"swiglu\"\n", | |
| " swiglu_hidden: int = 1_024\n", | |
| " norm_first: bool = True\n", | |
| " num_labels: int = len(LABEL2ID)\n", | |
| " dropout: float = 0.12\n", | |
| "\n", | |
| " # Streaming training size.\n", | |
| " # Effective train chunks = epochs * steps_per_epoch * batch_size.\n", | |
| " epochs: int = 5\n", | |
| " steps_per_epoch: int = 2_000\n", | |
| " batch_size: int = 256\n", | |
| "\n", | |
| " # Small memory buffers.\n", | |
| " val_chunks: int = 4_096\n", | |
| " shuffle_buffer_chunks: int = 2_048\n", | |
| " num_workers: int = 2\n", | |
| " use_train_chunk_cache: bool = True\n", | |
| " use_val_chunk_cache: bool = True\n", | |
| " train_cache_chunks: Optional[int] = 1_000_000\n", | |
| " train_chunk_cache_path: Optional[str] = None\n", | |
| " val_chunk_cache_path: Optional[str] = None\n", | |
| "\n", | |
| " # Chunking\n", | |
| " min_chars_per_chunk: int = 48\n", | |
| " stride: int = 144\n", | |
| " max_chunks_per_document: int = 6\n", | |
| " val_doc_ratio: float = 0.04\n", | |
| "\n", | |
| " # Line/document quality filters.\n", | |
| " # Each accepted line must contain 、 or 。.\n", | |
| " min_line_chars: int = 8\n", | |
| " max_line_chars: int = 2_000\n", | |
| " min_text_chars: int = 64\n", | |
| " max_text_chars: int = 12_000\n", | |
| " min_japanese_ratio: float = 0.35\n", | |
| " max_ascii_ratio: float = 0.35\n", | |
| " max_digit_ratio: float = 0.25\n", | |
| " min_punct_ratio: float = 0.004\n", | |
| " max_punct_ratio: float = 0.22\n", | |
| " drop_duplicate_lines: bool = True\n", | |
| "\n", | |
| " # Optimization\n", | |
| " lr: float = 5e-4 # 少し学習率を上げて収束を早める\n", | |
| " min_lr_ratio: float = 0.06\n", | |
| " warmup_ratio: float = 0.06\n", | |
| " weight_decay: float = 0.01\n", | |
| "\n", | |
| " # 修正ポイント: label_smoothing を 0.0 に変更\n", | |
| " # PyTorchの ignore_index(-100) と label_smoothing が同時に使われると、\n", | |
| " # パディング部分に確率が漏れて学習が歪むバグを回避します。\n", | |
| " label_smoothing: float = 0.0\n", | |
| " newline_loss_weight: float = 0.5\n", | |
| " newline_pos_weight: float = 4.0\n", | |
| "\n", | |
| " # Inference threshold search.\n", | |
| " newline_threshold: float = 0.5\n", | |
| " punct_margin: float = 0.0\n", | |
| " newline_threshold_candidates: Tuple[float, ...] = (0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60)\n", | |
| " punct_margin_candidates: Tuple[float, ...] = (0.00, 0.25, 0.50, 0.75, 1.00)\n", | |
| " inference_mode: str = \"logits_center_weighted\"\n", | |
| "\n", | |
| " # Short automatic Stage A sweep. Enable this before build_vocab runs.\n", | |
| " auto_tune: bool = False\n", | |
| " auto_tune_results_path: str = \"stage_a_auto_tune_results.json\"\n", | |
| " auto_tune_select_path: str = \"stage_a_selected_config.json\"\n", | |
| " auto_tune_max_files_per_corpus: int = 32\n", | |
| " auto_tune_steps_per_epoch: int = 600\n", | |
| " auto_tune_epochs: int = 2\n", | |
| " auto_tune_val_chunks: int = 4_096\n", | |
| " auto_tune_train_cache_chunks: int = 1_000_000\n", | |
| " auto_tune_candidates: Tuple[Dict[str, object], ...] = (\n", | |
| " {\"name\": \"A1_vocab16000_gelu\", \"vocab_max_size\": 16_000, \"ffn_type\": \"gelu\"},\n", | |
| " {\"name\": \"A2_vocab12000_gelu\", \"vocab_max_size\": 12_000, \"ffn_type\": \"gelu\"},\n", | |
| " {\"name\": \"A3_vocab8000_gelu\", \"vocab_max_size\": 8_000, \"ffn_type\": \"gelu\"},\n", | |
| " {\"name\": \"A4_vocab12000_swiglu\", \"vocab_max_size\": 12_000, \"ffn_type\": \"swiglu\", \"swiglu_hidden\": 1_024},\n", | |
| " )\n", | |
| "\n", | |
| " grad_clip: float = 1.0\n", | |
| " use_torch_compile: bool = False\n", | |
| "\n", | |
| " # Manual class weights because we do not run a label-count pre-scan.\n", | |
| " # Order: NONE, 、, 。\n", | |
| " class_weights: Tuple[float, ...] = (\n", | |
| " 0.25,\n", | |
| " 0.80,\n", | |
| " 1.00,\n", | |
| " )\n", | |
| "\n", | |
| " # Output / resume\n", | |
| " work_dir: str = \"punct_train_llmjp_gitlab_work\"\n", | |
| " ckpt_path: str = \"best_punct_llmjp.pt\"\n", | |
| " bundle_path: str = \"punct_llmjp_bundle.json\"\n", | |
| " save_checkpoint_to_drive: bool = True\n", | |
| " drive_mount_point: str = \"/content/drive\"\n", | |
| " drive_dir: str = \"/content/drive/MyDrive/punct-to-text-2/checkpoints\"\n", | |
| " resume_from_checkpoint: bool = False\n", | |
| " resume_ckpt_path: Optional[str] = None\n", | |
| " # Also checks the user-mentioned/older-looking file name if present.\n", | |
| " resume_ckpt_candidates: Tuple[str, ...] = (\n", | |
| " \"best_punct_llmjp.pt\",\n", | |
| " )\n", | |
| "\n", | |
| "CFG = TrainConfig()\n", | |
| "# Set True for a short Stage A sweep that estimates vocab/FFN/thresholds.\n", | |
| "os.makedirs(CFG.work_dir, exist_ok=True)\n", | |
| "os.makedirs(CFG.cache_dir, exist_ok=True)\n", | |
| "\n", | |
| "def configure_checkpoint_storage() -> None:\n", | |
| " if not CFG.save_checkpoint_to_drive:\n", | |
| " return\n", | |
| "\n", | |
| " try:\n", | |
| " from google.colab import drive\n", | |
| " except Exception as e:\n", | |
| " print(\"Google Drive mount skipped:\", repr(e))\n", | |
| " return\n", | |
| "\n", | |
| " drive.mount(CFG.drive_mount_point)\n", | |
| " os.makedirs(CFG.drive_dir, exist_ok=True)\n", | |
| "\n", | |
| " CFG.ckpt_path = os.path.join(CFG.drive_dir, os.path.basename(CFG.ckpt_path))\n", | |
| " CFG.bundle_path = os.path.join(CFG.drive_dir, os.path.basename(CFG.bundle_path))\n", | |
| " CFG.resume_ckpt_candidates = (CFG.ckpt_path, *CFG.resume_ckpt_candidates)\n", | |
| " print(\"checkpoint dir:\", CFG.drive_dir)\n", | |
| "\n", | |
| "configure_checkpoint_storage()\n", | |
| "if CFG.experiment_name is None:\n", | |
| " CFG.experiment_name = f\"vocab{CFG.vocab_max_size}_{CFG.ffn_type}\"\n", | |
| "print(CFG)\n", | |
| "\n", | |
| "# Optional, if the repository requires auth:\n", | |
| "# os.environ[\"GITLAB_TOKEN\"] = \"paste_your_token_here\"" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "79b81eb8", | |
| "metadata": { | |
| "id": "79b81eb8" | |
| }, | |
| "source": [ | |
| "## 3. Corpus mix\n", | |
| "\n", | |
| "Wikiと議事録を中心にし、Web系を補助にする。" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 12, | |
| "id": "fd0729b1", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 2, | |
| "status": "ok", | |
| "timestamp": 1777267933246, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "fd0729b1" | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "LLMJP_CORPORA = [\n", | |
| " # Main: stable general prose and formal spoken text.\n", | |
| " {\"key\": \"ja_wiki\", \"path\": \"ja/ja_wiki\", \"ratio\": 0.30},\n", | |
| " {\"key\": \"ja_kokkai_giji\", \"path\": \"ja/ja_kokkai_giji\", \"ratio\": 0.20},\n", | |
| "\n", | |
| " # Secondary: web coverage for generalization.\n", | |
| " {\"key\": \"ja_fineweb_2\", \"path\": \"ja/ja_fineweb-2\", \"ratio\": 0.40},\n", | |
| "\n", | |
| " # ダウンロードの重さを軽減するため、以下のコーパスは一旦無効化(必要に応じて復活させてください)\n", | |
| " # {\"key\": \"ja_cc_level0\", \"path\": \"ja/ja_cc/level0\", \"ratio\": 0.08},\n", | |
| " # {\"key\": \"ja_nwc2010\", \"path\": \"ja/ja_nwc2010\", \"ratio\": 0.05},\n", | |
| " # {\"key\": \"ja_warp_html\", \"path\": \"ja/ja_warp_html\", \"ratio\": 0.03},\n", | |
| " {\"key\": \"ja_aozorabunko\", \"path\": \"ja/ja_aozorabunko\", \"ratio\": 0.1},\n", | |
| " # {\"key\": \"ja_kaken\", \"path\": \"ja/ja_kaken\", \"ratio\": 0.04},\n", | |
| " # {\"key\": \"ja_e_gov\", \"path\": \"ja/ja_e-gov\", \"ratio\": 0.02},\n", | |
| "]" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "a95f7444", | |
| "metadata": { | |
| "id": "a95f7444" | |
| }, | |
| "source": [ | |
| "## 4. GitLab API helpers" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 13, | |
| "id": "091ce114", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 10, | |
| "status": "ok", | |
| "timestamp": 1777267933258, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "091ce114", | |
| "lines_to_next_cell": 1 | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "SESSION = requests.Session()\n", | |
| "\n", | |
| "def gitlab_headers() -> Dict[str, str]:\n", | |
| " token = os.environ.get(CFG.gitlab_token_env, \"\").strip()\n", | |
| " if token:\n", | |
| " return {\"PRIVATE-TOKEN\": token}\n", | |
| " return {}\n", | |
| "\n", | |
| "\n", | |
| "def gitlab_project_id() -> str:\n", | |
| " return quote(CFG.gitlab_project_path, safe=\"\")\n", | |
| "\n", | |
| "\n", | |
| "def gitlab_api_url(path: str) -> str:\n", | |
| " return f\"{CFG.gitlab_base_url}/api/v4/{path.lstrip('/')}\"\n", | |
| "\n", | |
| "\n", | |
| "def request_gitlab_json(url: str, params: Dict) -> requests.Response:\n", | |
| " r = SESSION.get(\n", | |
| " url,\n", | |
| " headers=gitlab_headers(),\n", | |
| " params=params,\n", | |
| " timeout=CFG.gitlab_timeout_sec,\n", | |
| " )\n", | |
| " if r.status_code in {401, 403}:\n", | |
| " raise RuntimeError(\n", | |
| " f\"GitLab auth failed: HTTP {r.status_code}. \"\n", | |
| " f\"Set os.environ['{CFG.gitlab_token_env}'] to a valid token if required.\"\n", | |
| " )\n", | |
| " if r.status_code == 404:\n", | |
| " raise FileNotFoundError(f\"GitLab API path not found: {r.url}\")\n", | |
| " r.raise_for_status()\n", | |
| " return r\n", | |
| "\n", | |
| "\n", | |
| "def list_gitlab_jsonl_gz_paths(rel_path: str) -> List[str]:\n", | |
| " \"\"\"List .jsonl.gz blobs under one repository path through GitLab API.\"\"\"\n", | |
| " url = gitlab_api_url(f\"projects/{gitlab_project_id()}/repository/tree\")\n", | |
| " files: List[str] = []\n", | |
| "\n", | |
| " page = 1\n", | |
| " while True:\n", | |
| " params = {\n", | |
| " \"path\": rel_path,\n", | |
| " \"ref\": CFG.gitlab_ref,\n", | |
| " \"recursive\": \"true\",\n", | |
| " \"per_page\": CFG.api_per_page,\n", | |
| " \"page\": page,\n", | |
| " }\n", | |
| " try:\n", | |
| " r = request_gitlab_json(url, params)\n", | |
| " except FileNotFoundError:\n", | |
| " return []\n", | |
| "\n", | |
| " rows = r.json()\n", | |
| " for row in rows:\n", | |
| " if row.get(\"type\") == \"blob\":\n", | |
| " p = row.get(\"path\", \"\")\n", | |
| " if p.endswith(\".jsonl.gz\"):\n", | |
| " files.append(p)\n", | |
| "\n", | |
| " next_page = r.headers.get(\"X-Next-Page\")\n", | |
| " if not next_page:\n", | |
| " break\n", | |
| " page = int(next_page)\n", | |
| " if page > CFG.api_max_pages_per_corpus:\n", | |
| " print(f\"API page cap reached for {rel_path}; files found so far: {len(files)}\")\n", | |
| " break\n", | |
| "\n", | |
| " return sorted(set(files))\n", | |
| "\n", | |
| "\n", | |
| "def cache_path_for_gitlab_file(file_path: str) -> str:\n", | |
| " digest = hashlib.md5(file_path.encode(\"utf-8\")).hexdigest()[:16]\n", | |
| " base = os.path.basename(file_path)\n", | |
| " return os.path.join(CFG.cache_dir, f\"{digest}_{base}\")\n", | |
| "\n", | |
| "\n", | |
| "def is_valid_gzip_file(path: str) -> bool:\n", | |
| " if not os.path.exists(path) or os.path.getsize(path) < 3:\n", | |
| " return False\n", | |
| " try:\n", | |
| " with open(path, \"rb\") as f:\n", | |
| " return f.read(2) == b\"\\x1f\\x8b\"\n", | |
| " except Exception:\n", | |
| " return False\n", | |
| "\n", | |
| "\n", | |
| "def download_gitlab_file_to_cache(file_path: str) -> str:\n", | |
| " \"\"\"Download one repository file through GitLab API raw endpoint into cache.\"\"\"\n", | |
| " out_path = cache_path_for_gitlab_file(file_path)\n", | |
| " if not CFG.force_redownload and is_valid_gzip_file(out_path):\n", | |
| " return out_path\n", | |
| "\n", | |
| " encoded_path = quote(file_path, safe=\"\")\n", | |
| " url = gitlab_api_url(f\"projects/{gitlab_project_id()}/repository/files/{encoded_path}/raw\")\n", | |
| " params = {\n", | |
| " \"ref\": CFG.gitlab_ref,\n", | |
| " \"lfs\": \"true\",\n", | |
| " }\n", | |
| "\n", | |
| " # DataLoaderのマルチプロセスで同時にダウンロードしても壊れないように一時ファイル名にUUIDを付与\n", | |
| " tmp_path = f\"{out_path}.{uuid.uuid4().hex}.part\"\n", | |
| " if os.path.exists(tmp_path):\n", | |
| " os.remove(tmp_path)\n", | |
| "\n", | |
| " print(\"download:\", file_path)\n", | |
| " with SESSION.get(\n", | |
| " url,\n", | |
| " headers=gitlab_headers(),\n", | |
| " params=params,\n", | |
| " stream=True,\n", | |
| " timeout=CFG.gitlab_timeout_sec,\n", | |
| " ) as r:\n", | |
| " if r.status_code in {401, 403}:\n", | |
| " raise RuntimeError(\n", | |
| " f\"GitLab auth failed: HTTP {r.status_code}. \"\n", | |
| " f\"Set os.environ['{CFG.gitlab_token_env}'] to a valid token if required.\"\n", | |
| " )\n", | |
| " if r.status_code == 404:\n", | |
| " raise FileNotFoundError(f\"GitLab raw file not found: {file_path}\")\n", | |
| " r.raise_for_status()\n", | |
| "\n", | |
| " total = int(r.headers.get(\"Content-Length\", \"0\") or 0)\n", | |
| " with open(tmp_path, \"wb\") as f:\n", | |
| " if total > 0:\n", | |
| " pbar = tqdm(total=total, unit=\"B\", unit_scale=True, desc=os.path.basename(file_path))\n", | |
| " else:\n", | |
| " pbar = None\n", | |
| " for chunk in r.iter_content(chunk_size=1024 * 1024):\n", | |
| " if not chunk:\n", | |
| " continue\n", | |
| " f.write(chunk)\n", | |
| " if pbar:\n", | |
| " pbar.update(len(chunk))\n", | |
| " if pbar:\n", | |
| " pbar.close()\n", | |
| "\n", | |
| " if not is_valid_gzip_file(tmp_path):\n", | |
| " with open(tmp_path, \"rb\") as f:\n", | |
| " head = f.read(300)\n", | |
| " os.remove(tmp_path)\n", | |
| " raise RuntimeError(\n", | |
| " \"Downloaded file is not gzip. This can mean the repository returned a Git LFS pointer, \"\n", | |
| " \"an HTML error page, or a permission error. First bytes: \" + repr(head[:200])\n", | |
| " )\n", | |
| "\n", | |
| " os.replace(tmp_path, out_path)\n", | |
| " return out_path" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "79199192", | |
| "metadata": { | |
| "id": "79199192" | |
| }, | |
| "source": [ | |
| "## 5. Discover remote corpus files" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 14, | |
| "id": "6d379c31", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 6803, | |
| "status": "ok", | |
| "timestamp": 1777267940063, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "6d379c31", | |
| "lines_to_next_cell": 1, | |
| "outputId": "e104a5b3-6f3c-4eb7-b7b7-e04bdcd541c0" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "list GitLab: ja_wiki ja/ja_wiki\n", | |
| "list GitLab: ja_kokkai_giji ja/ja_kokkai_giji\n", | |
| "list GitLab: ja_fineweb_2 ja/ja_fineweb-2\n", | |
| "list GitLab: ja_aozorabunko ja/ja_aozorabunko\n", | |
| "available corpora:\n", | |
| "ja_wiki files 6 ratio 0.3 sample ja/ja_wiki/0004.jsonl.gz\n", | |
| "ja_kokkai_giji files 12 ratio 0.2 sample ja/ja_kokkai_giji/0002.jsonl.gz\n", | |
| "ja_fineweb_2 files 32 ratio 0.4 sample ja/ja_fineweb-2/1558.jsonl.gz\n", | |
| "ja_aozorabunko files 1 ratio 0.1 sample ja/ja_aozorabunko/0000.jsonl.gz\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "\n", | |
| "AVAILABLE_CORPORA = []\n", | |
| "missing_corpora = []\n", | |
| "\n", | |
| "for spec in LLMJP_CORPORA:\n", | |
| " print(\"list GitLab:\", spec[\"key\"], spec[\"path\"])\n", | |
| " paths = list_gitlab_jsonl_gz_paths(spec[\"path\"])\n", | |
| " if not paths:\n", | |
| " missing_corpora.append(spec[\"key\"])\n", | |
| " continue\n", | |
| "\n", | |
| " rng = random.Random(SEED + len(spec[\"key\"]))\n", | |
| " rng.shuffle(paths)\n", | |
| " if CFG.max_files_per_corpus is not None:\n", | |
| " paths = paths[: CFG.max_files_per_corpus]\n", | |
| "\n", | |
| " item = dict(spec)\n", | |
| " item[\"gitlab_paths\"] = paths\n", | |
| " AVAILABLE_CORPORA.append(item)\n", | |
| "\n", | |
| "if not AVAILABLE_CORPORA:\n", | |
| " raise FileNotFoundError(\n", | |
| " \"No .jsonl.gz files were found through GitLab API. \"\n", | |
| " \"Check gitlab_project_path/ref, repository access, or token.\"\n", | |
| " )\n", | |
| "\n", | |
| "if missing_corpora:\n", | |
| " print(\"missing corpora skipped:\")\n", | |
| " for key in missing_corpora:\n", | |
| " print(\" -\", key)\n", | |
| "\n", | |
| "ratio_sum = sum(c[\"ratio\"] for c in AVAILABLE_CORPORA)\n", | |
| "for c in AVAILABLE_CORPORA:\n", | |
| " c[\"ratio\"] = c[\"ratio\"] / ratio_sum\n", | |
| "\n", | |
| "print(\"available corpora:\")\n", | |
| "for c in AVAILABLE_CORPORA:\n", | |
| " print(\n", | |
| " c[\"key\"],\n", | |
| " \"files\", len(c[\"gitlab_paths\"]),\n", | |
| " \"ratio\", round(c[\"ratio\"], 4),\n", | |
| " \"sample\", c[\"gitlab_paths\"][0],\n", | |
| " )" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "d0efcf51", | |
| "metadata": { | |
| "id": "d0efcf51" | |
| }, | |
| "source": [ | |
| "## 6. JSONL.GZ reader and text cleaning" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 15, | |
| "id": "31ab495b", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 2, | |
| "status": "ok", | |
| "timestamp": 1777267940077, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "31ab495b", | |
| "lines_to_next_cell": 1 | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "def iter_jsonl_gz_texts_from_gitlab_path(file_path: str) -> Iterator[str]:\n", | |
| " # In the fast path, file_path is already a local cached .jsonl.gz path.\n", | |
| " # Fallback supports old calls with a GitLab repository path.\n", | |
| " local_path = file_path if os.path.exists(file_path) else download_gitlab_file_to_cache(file_path)\n", | |
| " with gzip.open(local_path, \"rt\", encoding=\"utf-8\", errors=\"ignore\") as f:\n", | |
| " for line in f:\n", | |
| " line = line.strip()\n", | |
| " if not line:\n", | |
| " continue\n", | |
| " try:\n", | |
| " row = json.loads(line)\n", | |
| " except Exception:\n", | |
| " continue\n", | |
| " text = row.get(\"text\")\n", | |
| " if isinstance(text, str) and text.strip():\n", | |
| " yield text\n", | |
| "\n", | |
| "TRANSLATION = str.maketrans({\n", | |
| " \"。\": \"。\",\n", | |
| " \".\": \"。\",\n", | |
| " \"!\": \"。\",\n", | |
| " \"!\": \"。\",\n", | |
| " \"?\": \"。\",\n", | |
| " \"?\": \"。\",\n", | |
| " \",\": \"、\",\n", | |
| " \"、\": \"、\",\n", | |
| "})\n", | |
| "\n", | |
| "def japanese_ratio(text: str) -> float:\n", | |
| " if not text:\n", | |
| " return 0.0\n", | |
| " jp = 0\n", | |
| " for ch in text:\n", | |
| " if (\"\\u3040\" <= ch <= \"\\u30ff\") or (\"\\u4e00\" <= ch <= \"\\u9fff\"):\n", | |
| " jp += 1\n", | |
| " return jp / max(1, len(text))\n", | |
| "\n", | |
| "def ascii_ratio(text: str) -> float:\n", | |
| " return sum(1 for ch in text if ord(ch) < 128) / max(1, len(text))\n", | |
| "\n", | |
| "def digit_ratio(text: str) -> float:\n", | |
| " return sum(1 for ch in text if ch.isdigit()) / max(1, len(text))\n", | |
| "\n", | |
| "def punct_ratio(text: str) -> float:\n", | |
| " return sum(1 for ch in text if ch in {\"、\", \"。\"}) / max(1, len(text))\n", | |
| "\n", | |
| "def normalize_line(line: str) -> str:\n", | |
| " line = line.translate(TRANSLATION)\n", | |
| " line = line.replace(\"\\u3000\", \" \").replace(\"\\t\", \" \")\n", | |
| " line = re.sub(r\"\\s+\", \" \", line)\n", | |
| " return line.strip()\n", | |
| "\n", | |
| "def split_long_line(line: str) -> List[str]:\n", | |
| " if len(line) <= CFG.max_line_chars:\n", | |
| " return [line]\n", | |
| "\n", | |
| " parts = re.split(r\"(?<=。)\", line)\n", | |
| " out = []\n", | |
| " buf = \"\"\n", | |
| " for part in parts:\n", | |
| " if not part:\n", | |
| " continue\n", | |
| " if len(buf) + len(part) <= CFG.max_line_chars:\n", | |
| " buf += part\n", | |
| " else:\n", | |
| " if buf:\n", | |
| " out.append(buf.strip())\n", | |
| " buf = part\n", | |
| " if buf:\n", | |
| " out.append(buf.strip())\n", | |
| " return [x for x in out if x]\n", | |
| "\n", | |
| "def looks_like_noise_line(line: str) -> bool:\n", | |
| " if len(line) < CFG.min_line_chars:\n", | |
| " return True\n", | |
| "\n", | |
| " # Remove non-sentence-like lines.\n", | |
| " if \"、\" not in line and \"。\" not in line:\n", | |
| " return True\n", | |
| "\n", | |
| " if re.search(r\"https?://|www\\.|<[^>]+>|&[a-z]+;\", line, flags=re.IGNORECASE):\n", | |
| " return True\n", | |
| " if re.search(r\"^[\\-_=*#]{4,}$\", line):\n", | |
| " return True\n", | |
| " if line.count(\"|\") >= 3 or line.count(\",\") >= 8:\n", | |
| " return True\n", | |
| " if ascii_ratio(line) > CFG.max_ascii_ratio:\n", | |
| " return True\n", | |
| " if digit_ratio(line) > CFG.max_digit_ratio:\n", | |
| " return True\n", | |
| " if japanese_ratio(line) < CFG.min_japanese_ratio:\n", | |
| " return True\n", | |
| "\n", | |
| " pr = punct_ratio(line)\n", | |
| " if pr < CFG.min_punct_ratio or pr > CFG.max_punct_ratio:\n", | |
| " return True\n", | |
| "\n", | |
| " if len(line) < 32 and re.match(r\"^[\\-・*●○◎◇◆■□▶▷※注\\d0-9一二三四五六七八九十]+[\\s、。.))]\", line):\n", | |
| " return True\n", | |
| "\n", | |
| " return False\n", | |
| "\n", | |
| "def clean_text(raw_text: str) -> str:\n", | |
| " raw_text = str(raw_text).replace(\"\\r\\n\", \"\\n\").replace(\"\\r\", \"\\n\")\n", | |
| " accepted: List[str] = []\n", | |
| " seen = set()\n", | |
| "\n", | |
| " for raw_line in raw_text.split(\"\\n\"):\n", | |
| " line = normalize_line(raw_line)\n", | |
| " if not line:\n", | |
| " continue\n", | |
| " for segment in split_long_line(line):\n", | |
| " segment = normalize_line(segment)\n", | |
| " if looks_like_noise_line(segment):\n", | |
| " continue\n", | |
| " if CFG.drop_duplicate_lines:\n", | |
| " h = hashlib.md5(segment.encode(\"utf-8\", errors=\"ignore\")).hexdigest()\n", | |
| " if h in seen:\n", | |
| " continue\n", | |
| " seen.add(h)\n", | |
| " accepted.append(segment)\n", | |
| "\n", | |
| " text = \"\\n\".join(accepted)\n", | |
| " if len(text) < CFG.min_text_chars or len(text) > CFG.max_text_chars:\n", | |
| " return \"\"\n", | |
| " return text" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "2eb3481e", | |
| "metadata": { | |
| "id": "2eb3481e" | |
| }, | |
| "source": [ | |
| "## 7. Labels, vocab, chunking" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 16, | |
| "id": "e2fd3252", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 3, | |
| "status": "ok", | |
| "timestamp": 1777267940096, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "e2fd3252", | |
| "lines_to_next_cell": 1 | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "def add_punct_label(current_label_id: int, boundary: str) -> int:\n", | |
| " current = ID2LABEL[int(current_label_id)]\n", | |
| " punct = \"\"\n", | |
| "\n", | |
| " if \"、\" in current:\n", | |
| " punct = \"、\"\n", | |
| " elif \"。\" in current:\n", | |
| " punct = \"。\"\n", | |
| "\n", | |
| " if boundary in PUNCT_BOUNDARY_CHARS:\n", | |
| " punct = boundary\n", | |
| "\n", | |
| " return LABEL2ID.get(punct, LABEL2ID[\"NONE\"])\n", | |
| "\n", | |
| "def text_to_pairs(text: str) -> Tuple[List[str], List[int], List[int]]:\n", | |
| " chars: List[str] = []\n", | |
| " punct_labels: List[int] = []\n", | |
| " newline_labels: List[int] = []\n", | |
| " last_idx: Optional[int] = None\n", | |
| "\n", | |
| " for ch in text:\n", | |
| " if ch in BOUNDARY_CHARS:\n", | |
| " if last_idx is not None:\n", | |
| " if ch in PUNCT_BOUNDARY_CHARS:\n", | |
| " punct_labels[last_idx] = add_punct_label(punct_labels[last_idx], ch)\n", | |
| " elif ch == \"\\n\":\n", | |
| " newline_labels[last_idx] = 1\n", | |
| " continue\n", | |
| " if ch in REMOVE_CHARS or ch == \" \":\n", | |
| " continue\n", | |
| " chars.append(ch)\n", | |
| " punct_labels.append(LABEL2ID[\"NONE\"])\n", | |
| " newline_labels.append(0)\n", | |
| " last_idx = len(punct_labels) - 1\n", | |
| "\n", | |
| " return chars, punct_labels, newline_labels\n", | |
| "\n", | |
| "def make_chunks(chars: List[str], punct_labels: List[int], newline_labels: List[int]) -> List[Tuple[List[str], List[int], List[int]]]:\n", | |
| " chunks = []\n", | |
| " n = len(chars)\n", | |
| " if n < CFG.min_chars_per_chunk:\n", | |
| " return chunks\n", | |
| " for start in range(0, n, CFG.stride):\n", | |
| " end = min(start + CFG.max_len, n)\n", | |
| " c = chars[start:end]\n", | |
| " y_punct = punct_labels[start:end]\n", | |
| " y_newline = newline_labels[start:end]\n", | |
| " if len(c) >= CFG.min_chars_per_chunk and (any(v != 0 for v in y_punct) or any(v != 0 for v in y_newline)):\n", | |
| " chunks.append((c, y_punct, y_newline))\n", | |
| " if end >= n or len(chunks) >= CFG.max_chunks_per_document:\n", | |
| " break\n", | |
| " return chunks\n", | |
| "\n", | |
| "def build_vocab() -> Tuple[Dict[str, int], List[str]]:\n", | |
| " counter = Counter()\n", | |
| " per_corpus_docs = {}\n", | |
| "\n", | |
| " for spec in AVAILABLE_CORPORA:\n", | |
| " seen = 0\n", | |
| " kept = 0\n", | |
| " print(\"vocab scan:\", spec[\"key\"])\n", | |
| "\n", | |
| " for gitlab_path in spec[\"gitlab_paths\"]:\n", | |
| " try:\n", | |
| " for raw_text in iter_jsonl_gz_texts_from_gitlab_path(gitlab_path):\n", | |
| " text = clean_text(raw_text)\n", | |
| " if not text:\n", | |
| " continue\n", | |
| "\n", | |
| " seen += 1\n", | |
| " chars, punct_labels, newline_labels = text_to_pairs(text)\n", | |
| " if len(chars) >= CFG.min_chars_per_chunk and make_chunks(chars, punct_labels, newline_labels):\n", | |
| " counter.update(chars)\n", | |
| " kept += 1\n", | |
| "\n", | |
| " if seen >= CFG.vocab_scan_docs_per_corpus:\n", | |
| " break\n", | |
| " except Exception as e:\n", | |
| " print(\"SKIP vocab file\", gitlab_path, repr(e))\n", | |
| "\n", | |
| " if seen >= CFG.vocab_scan_docs_per_corpus:\n", | |
| " break\n", | |
| "\n", | |
| " per_corpus_docs[spec[\"key\"]] = {\"seen\": seen, \"kept\": kept}\n", | |
| "\n", | |
| " itos = [\"<pad>\", \"<unk>\"]\n", | |
| " for ch, freq in counter.most_common(CFG.vocab_max_size - len(itos)):\n", | |
| " if freq >= CFG.vocab_min_freq:\n", | |
| " itos.append(ch)\n", | |
| "\n", | |
| " stoi = {ch: i for i, ch in enumerate(itos)}\n", | |
| " if len(itos) >= 65_000:\n", | |
| " raise ValueError(\"vocab too large for compact assumptions; lower vocab_max_size\")\n", | |
| "\n", | |
| " print(\"vocab size:\", len(itos))\n", | |
| " print(\"vocab docs:\", per_corpus_docs)\n", | |
| " with open(os.path.join(CFG.work_dir, \"vocab.json\"), \"w\", encoding=\"utf-8\") as f:\n", | |
| " json.dump(\n", | |
| " {\"itos\": itos, \"label2id\": LABEL2ID, \"id2label\": ID2LABEL, \"per_corpus_docs\": per_corpus_docs},\n", | |
| " f,\n", | |
| " ensure_ascii=False,\n", | |
| " indent=2,\n", | |
| " )\n", | |
| " return stoi, itos\n", | |
| "\n", | |
| "stoi: Dict[str, int] = {}\n", | |
| "itos: List[str] = []\n", | |
| "\n", | |
| "def char_to_id(ch: str) -> int:\n", | |
| " return stoi.get(ch, UNK_ID)\n", | |
| "\n", | |
| "def stable_is_val(corpus_key: str, text: str) -> bool:\n", | |
| " h = hashlib.md5((corpus_key + \"\\n\" + text[:512]).encode(\"utf-8\", errors=\"ignore\")).hexdigest()\n", | |
| " x = int(h[:8], 16) / 0xFFFFFFFF\n", | |
| " return x < CFG.val_doc_ratio\n", | |
| "\n", | |
| "def encode_chunk(chars: List[str], punct_labels: List[int], newline_labels: List[int]) -> Dict[str, torch.Tensor]:\n", | |
| " n = min(len(chars), CFG.max_len)\n", | |
| " x = np.zeros((CFG.max_len,), dtype=np.int32)\n", | |
| " y_punct = np.full((CFG.max_len,), -100, dtype=np.int64)\n", | |
| " y_newline = np.full((CFG.max_len,), -100, dtype=np.int64)\n", | |
| " m = np.zeros((CFG.max_len,), dtype=np.bool_)\n", | |
| "\n", | |
| " x[:n] = [char_to_id(ch) for ch in chars[:n]]\n", | |
| " y_punct[:n] = punct_labels[:n]\n", | |
| " y_newline[:n] = newline_labels[:n]\n", | |
| " m[:n] = True\n", | |
| "\n", | |
| " return {\n", | |
| " \"input_ids\": torch.from_numpy(x),\n", | |
| " \"punct_labels\": torch.from_numpy(y_punct),\n", | |
| " \"newline_labels\": torch.from_numpy(y_newline),\n", | |
| " \"attention_mask\": torch.from_numpy(m),\n", | |
| " }" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "223851cd", | |
| "metadata": { | |
| "id": "223851cd" | |
| }, | |
| "source": [ | |
| "## 8. Streaming Dataset" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 17, | |
| "id": "8f6b89cd", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 15, | |
| "status": "ok", | |
| "timestamp": 1777267940131, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "8f6b89cd", | |
| "lines_to_next_cell": 1 | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "def iter_corpus_chunks(spec: Dict, split: str, rng: random.Random, repeat: bool) -> Iterator[Dict[str, torch.Tensor]]:\n", | |
| " paths = list(spec.get(\"local_paths\", spec[\"gitlab_paths\"]))\n", | |
| " if not paths:\n", | |
| " return\n", | |
| "\n", | |
| " while True:\n", | |
| " rng.shuffle(paths)\n", | |
| " yielded_this_pass = 0\n", | |
| "\n", | |
| " for gitlab_path in paths:\n", | |
| " try:\n", | |
| " text_iter = iter_jsonl_gz_texts_from_gitlab_path(gitlab_path)\n", | |
| " for raw_text in text_iter:\n", | |
| " text = clean_text(raw_text)\n", | |
| " if not text:\n", | |
| " continue\n", | |
| "\n", | |
| " is_val = stable_is_val(spec[\"key\"], text)\n", | |
| " if split == \"train\" and is_val:\n", | |
| " continue\n", | |
| " if split == \"val\" and not is_val:\n", | |
| " continue\n", | |
| "\n", | |
| " chars, punct_labels, newline_labels = text_to_pairs(text)\n", | |
| " chunks = make_chunks(chars, punct_labels, newline_labels)\n", | |
| " if not chunks:\n", | |
| " continue\n", | |
| " rng.shuffle(chunks)\n", | |
| " for c, y_punct, y_newline in chunks:\n", | |
| " yielded_this_pass += 1\n", | |
| " yield encode_chunk(c, y_punct, y_newline)\n", | |
| " except Exception as e:\n", | |
| " print(\"SKIP file\", gitlab_path, repr(e))\n", | |
| " continue\n", | |
| "\n", | |
| " if not repeat or yielded_this_pass == 0:\n", | |
| " break\n", | |
| "\n", | |
| "def buffer_shuffle(iterator: Iterator[Dict[str, torch.Tensor]], buffer_size: int, rng: random.Random) -> Iterator[Dict[str, torch.Tensor]]:\n", | |
| " if buffer_size <= 1:\n", | |
| " yield from iterator\n", | |
| " return\n", | |
| "\n", | |
| " buf: List[Dict[str, torch.Tensor]] = []\n", | |
| " for item in iterator:\n", | |
| " if len(buf) < buffer_size:\n", | |
| " buf.append(item)\n", | |
| " continue\n", | |
| " j = rng.randrange(len(buf))\n", | |
| " yield buf[j]\n", | |
| " buf[j] = item\n", | |
| "\n", | |
| " while buf:\n", | |
| " j = rng.randrange(len(buf))\n", | |
| " yield buf.pop(j)\n", | |
| "\n", | |
| "class StreamingGzipPunctDataset(IterableDataset):\n", | |
| " def __init__(self, corpora: List[Dict], shuffle_buffer_chunks: int):\n", | |
| " super().__init__()\n", | |
| " self.corpora = corpora\n", | |
| " self.shuffle_buffer_chunks = shuffle_buffer_chunks\n", | |
| " self.epoch = 0\n", | |
| "\n", | |
| " def set_epoch(self, epoch: int):\n", | |
| " self.epoch = int(epoch)\n", | |
| "\n", | |
| " def __iter__(self):\n", | |
| " worker_info = torch.utils.data.get_worker_info()\n", | |
| " worker_id = worker_info.id if worker_info else 0\n", | |
| " num_workers = worker_info.num_workers if worker_info else 1\n", | |
| " rng = random.Random(SEED + 1009 * self.epoch + 17 * worker_id)\n", | |
| "\n", | |
| " worker_corpora = []\n", | |
| " for spec in self.corpora:\n", | |
| " paths = list(spec[\"gitlab_paths\"])\n", | |
| " part = paths[worker_id::num_workers]\n", | |
| " if not part:\n", | |
| " part = paths\n", | |
| " item = dict(spec)\n", | |
| " item[\"gitlab_paths\"] = part\n", | |
| " worker_corpora.append(item)\n", | |
| "\n", | |
| " keys = [c[\"key\"] for c in worker_corpora]\n", | |
| " weights = [c[\"ratio\"] for c in worker_corpora]\n", | |
| " generators = {\n", | |
| " c[\"key\"]: iter_corpus_chunks(\n", | |
| " c,\n", | |
| " split=\"train\",\n", | |
| " rng=random.Random(rng.randint(0, 10**9)),\n", | |
| " repeat=True,\n", | |
| " )\n", | |
| " for c in worker_corpora\n", | |
| " }\n", | |
| "\n", | |
| " def mixed_stream():\n", | |
| " while True:\n", | |
| " key = rng.choices(keys, weights=weights, k=1)[0]\n", | |
| " try:\n", | |
| " yield next(generators[key])\n", | |
| " except StopIteration:\n", | |
| " idx = keys.index(key)\n", | |
| " keys.pop(idx)\n", | |
| " weights.pop(idx)\n", | |
| " generators.pop(key, None)\n", | |
| " if not keys:\n", | |
| " raise RuntimeError(\"All corpus streams are empty after filtering.\")\n", | |
| "\n", | |
| " yield from buffer_shuffle(mixed_stream(), self.shuffle_buffer_chunks, rng)\n", | |
| "\n", | |
| "class CachedPunctDataset(Dataset):\n", | |
| " def __init__(self, rows: List[Dict[str, torch.Tensor]]):\n", | |
| " self.rows = rows\n", | |
| "\n", | |
| " def __len__(self):\n", | |
| " return len(self.rows)\n", | |
| "\n", | |
| " def __getitem__(self, idx):\n", | |
| " return self.rows[idx]\n", | |
| "\n", | |
| "def compact_cache_item(item: Dict[str, torch.Tensor]) -> Dict[str, torch.Tensor]:\n", | |
| " return {\n", | |
| " \"input_ids\": item[\"input_ids\"].short(),\n", | |
| " \"punct_labels\": item[\"punct_labels\"].short(),\n", | |
| " \"newline_labels\": item[\"newline_labels\"].short(),\n", | |
| " \"attention_mask\": item[\"attention_mask\"].bool(),\n", | |
| " }\n", | |
| "\n", | |
| "def describe_chunk_rows(rows: List[Dict[str, torch.Tensor]], name: str) -> None:\n", | |
| " punct_counts = Counter()\n", | |
| " newline_counts = Counter()\n", | |
| " valid_tokens = 0\n", | |
| " for row in rows:\n", | |
| " punct = row[\"punct_labels\"]\n", | |
| " newline = row[\"newline_labels\"]\n", | |
| " mask = punct != -100\n", | |
| " if mask.any():\n", | |
| " punct_counts.update(punct[mask].long().tolist())\n", | |
| " valid_tokens += int(mask.sum())\n", | |
| " newline_mask = newline != -100\n", | |
| " if newline_mask.any():\n", | |
| " newline_counts.update(newline[newline_mask].long().tolist())\n", | |
| " print(\n", | |
| " f\"{name} label stats:\",\n", | |
| " {\n", | |
| " \"chunks\": len(rows),\n", | |
| " \"tokens\": valid_tokens,\n", | |
| " \"punct\": {ID2LABEL[int(k)]: int(v) for k, v in sorted(punct_counts.items())},\n", | |
| " \"newline\": {int(k): int(v) for k, v in sorted(newline_counts.items())},\n", | |
| " },\n", | |
| " )\n", | |
| "\n", | |
| "def build_or_load_chunk_cache(\n", | |
| " split: str,\n", | |
| " corpora: List[Dict],\n", | |
| " cache_path: str,\n", | |
| " max_chunks: Optional[int] = None,\n", | |
| ") -> List[Dict[str, torch.Tensor]]:\n", | |
| " if os.path.exists(cache_path):\n", | |
| " print(\"load chunk cache:\", cache_path)\n", | |
| " try:\n", | |
| " rows = torch.load(cache_path, map_location=\"cpu\", weights_only=False)\n", | |
| " except TypeError:\n", | |
| " rows = torch.load(cache_path, map_location=\"cpu\")\n", | |
| " describe_chunk_rows(rows, f\"{split} cache\")\n", | |
| " return rows\n", | |
| "\n", | |
| " os.makedirs(os.path.dirname(cache_path) or \".\", exist_ok=True)\n", | |
| " rows: List[Dict[str, torch.Tensor]] = []\n", | |
| " per_corpus_count = defaultdict(int)\n", | |
| " per_corpus_target = None\n", | |
| " if split == \"val\":\n", | |
| " per_corpus_target = {\n", | |
| " c[\"key\"]: max(1, int(round(CFG.val_chunks * c[\"ratio\"])))\n", | |
| " for c in corpora\n", | |
| " }\n", | |
| "\n", | |
| " for spec in corpora:\n", | |
| " rng = random.Random(SEED + 3000 + len(spec[\"key\"]) + (0 if split == \"val\" else 100_000))\n", | |
| " target = per_corpus_target[spec[\"key\"]] if per_corpus_target else None\n", | |
| " print(\"build chunk cache:\", split, spec[\"key\"], \"target\", target or max_chunks or \"all\")\n", | |
| " iterator = iter_corpus_chunks(spec, split=split, rng=rng, repeat=False)\n", | |
| " progress_total = target if target is not None else max_chunks\n", | |
| " for item in tqdm(iterator, total=progress_total, desc=f\"{split} {spec['key']}\"):\n", | |
| " rows.append(compact_cache_item(item))\n", | |
| " per_corpus_count[spec[\"key\"]] += 1\n", | |
| " if target is not None and per_corpus_count[spec[\"key\"]] >= target:\n", | |
| " break\n", | |
| " if max_chunks is not None and len(rows) >= max_chunks:\n", | |
| " break\n", | |
| " if max_chunks is not None and len(rows) >= max_chunks:\n", | |
| " break\n", | |
| "\n", | |
| " if split == \"val\" and len(rows) < 256:\n", | |
| " raise RuntimeError(\"Validation cache is too small. Loosen filters or increase val_doc_ratio/max_files_per_corpus.\")\n", | |
| " if not rows:\n", | |
| " raise RuntimeError(f\"{split} chunk cache is empty. Loosen filters or check corpus paths.\")\n", | |
| "\n", | |
| " rng = random.Random(SEED + (4444 if split == \"val\" else 5555))\n", | |
| " rng.shuffle(rows)\n", | |
| " if split == \"val\":\n", | |
| " rows = rows[: CFG.val_chunks]\n", | |
| " elif max_chunks is not None:\n", | |
| " rows = rows[:max_chunks]\n", | |
| " describe_chunk_rows(rows, f\"{split} cache\")\n", | |
| " torch.save(rows, cache_path)\n", | |
| " print(\"saved chunk cache:\", cache_path, \"chunks\", len(rows), dict(per_corpus_count))\n", | |
| " return rows\n", | |
| "\n", | |
| "def default_chunk_cache_path(split: str) -> str:\n", | |
| " if split == \"train\":\n", | |
| " chunk_part = \"all\" if CFG.train_cache_chunks is None else str(CFG.train_cache_chunks)\n", | |
| " else:\n", | |
| " chunk_part = str(CFG.val_chunks)\n", | |
| " return os.path.join(\n", | |
| " CFG.cache_dir,\n", | |
| " f\"{CFG.experiment_name}_{split}_chunks_{chunk_part}_len{CFG.max_len}_stride{CFG.stride}_vocab{CFG.vocab_max_size}.pt\",\n", | |
| " )\n", | |
| "\n", | |
| "def build_val_dataset(corpora: List[Dict]) -> CachedPunctDataset:\n", | |
| " if CFG.use_val_chunk_cache:\n", | |
| " cache_path = CFG.val_chunk_cache_path or default_chunk_cache_path(\"val\")\n", | |
| " return CachedPunctDataset(build_or_load_chunk_cache(\"val\", corpora, cache_path, CFG.val_chunks))\n", | |
| "\n", | |
| " rows: List[Dict[str, torch.Tensor]] = []\n", | |
| " per_corpus_target = {\n", | |
| " c[\"key\"]: max(1, int(round(CFG.val_chunks * c[\"ratio\"])))\n", | |
| " for c in corpora\n", | |
| " }\n", | |
| " per_corpus_count = defaultdict(int)\n", | |
| "\n", | |
| " for spec in corpora:\n", | |
| " target = per_corpus_target[spec[\"key\"]]\n", | |
| " rng = random.Random(SEED + 3000 + len(spec[\"key\"]))\n", | |
| " print(\"build val:\", spec[\"key\"], \"target\", target)\n", | |
| " iterator = iter_corpus_chunks(spec, split=\"val\", rng=rng, repeat=False)\n", | |
| " for item in tqdm(iterator, total=target, desc=f\"val {spec['key']}\"):\n", | |
| " rows.append(item)\n", | |
| " per_corpus_count[spec[\"key\"]] += 1\n", | |
| " if per_corpus_count[spec[\"key\"]] >= target or len(rows) >= CFG.val_chunks:\n", | |
| " break\n", | |
| "\n", | |
| " if len(rows) < 256:\n", | |
| " raise RuntimeError(\"Validation cache is too small. Loosen filters or increase val_doc_ratio/max_files_per_corpus.\")\n", | |
| "\n", | |
| " random.Random(SEED + 4444).shuffle(rows)\n", | |
| " rows = rows[: CFG.val_chunks]\n", | |
| " print(\"val chunks:\", len(rows), dict(per_corpus_count))\n", | |
| " return CachedPunctDataset(rows)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "a7dc9f25", | |
| "metadata": { | |
| "id": "a7dc9f25" | |
| }, | |
| "source": [ | |
| "## 9. Build DataLoaders" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 18, | |
| "id": "c68df681", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 3, | |
| "status": "ok", | |
| "timestamp": 1777267940172, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "c68df681", | |
| "lines_to_next_cell": 1 | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "def build_dataloaders() -> Tuple[Dataset, Dataset, DataLoader, DataLoader]:\n", | |
| " if CFG.use_train_chunk_cache:\n", | |
| " train_cache_path = CFG.train_chunk_cache_path or default_chunk_cache_path(\"train\")\n", | |
| " train_ds = CachedPunctDataset(\n", | |
| " build_or_load_chunk_cache(\"train\", AVAILABLE_CORPORA, train_cache_path, CFG.train_cache_chunks)\n", | |
| " )\n", | |
| " else:\n", | |
| " train_ds = StreamingGzipPunctDataset(AVAILABLE_CORPORA, CFG.shuffle_buffer_chunks)\n", | |
| " val_ds = build_val_dataset(AVAILABLE_CORPORA)\n", | |
| "\n", | |
| " loader_kwargs = dict(\n", | |
| " batch_size=CFG.batch_size,\n", | |
| " num_workers=CFG.num_workers,\n", | |
| " pin_memory=(DEVICE == \"cuda\"),\n", | |
| " )\n", | |
| " if CFG.num_workers > 0:\n", | |
| " loader_kwargs.update(dict(persistent_workers=False, prefetch_factor=2))\n", | |
| "\n", | |
| " train_loader = DataLoader(\n", | |
| " train_ds,\n", | |
| " shuffle=isinstance(train_ds, CachedPunctDataset),\n", | |
| " drop_last=True,\n", | |
| " **loader_kwargs,\n", | |
| " )\n", | |
| " val_loader = DataLoader(val_ds, shuffle=False, drop_last=False, **loader_kwargs)\n", | |
| " return train_ds, val_ds, train_loader, val_loader" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "3d534deb", | |
| "metadata": { | |
| "id": "3d534deb" | |
| }, | |
| "source": [ | |
| "## 10. Model" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 24, | |
| "id": "8ceb6b96", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 54, | |
| "status": "ok", | |
| "timestamp": 1777280464378, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "8ceb6b96" | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "class SwiGLUFFN(nn.Module):\n", | |
| " def __init__(self, hidden: int, ffn_hidden: int, dropout: float):\n", | |
| " super().__init__()\n", | |
| " self.w1 = nn.Linear(hidden, ffn_hidden, bias=True)\n", | |
| " self.w2 = nn.Linear(hidden, ffn_hidden, bias=True)\n", | |
| " self.w3 = nn.Linear(ffn_hidden, hidden, bias=True)\n", | |
| " self.drop = nn.Dropout(dropout)\n", | |
| "\n", | |
| " def forward(self, x):\n", | |
| " x = torch.nn.functional.silu(self.w1(x)) * self.w2(x)\n", | |
| " x = self.drop(x)\n", | |
| " return self.w3(x)\n", | |
| "\n", | |
| "class CustomEncoderLayer(nn.Module):\n", | |
| " def __init__(\n", | |
| " self,\n", | |
| " hidden: int,\n", | |
| " heads: int,\n", | |
| " dropout: float,\n", | |
| " ffn_type: str,\n", | |
| " swiglu_hidden: int,\n", | |
| " norm_first: bool,\n", | |
| " ):\n", | |
| " super().__init__()\n", | |
| " self.norm_first = norm_first\n", | |
| " self.self_attn = nn.MultiheadAttention(hidden, heads, dropout=dropout, batch_first=True)\n", | |
| " self.attn_drop = nn.Dropout(dropout)\n", | |
| " self.ffn_drop = nn.Dropout(dropout)\n", | |
| " self.norm1 = nn.LayerNorm(hidden)\n", | |
| " self.norm2 = nn.LayerNorm(hidden)\n", | |
| "\n", | |
| " if ffn_type == \"swiglu\":\n", | |
| " self.ffn = SwiGLUFFN(hidden, swiglu_hidden, dropout)\n", | |
| " elif ffn_type == \"gelu\":\n", | |
| " self.ffn = nn.Sequential(\n", | |
| " nn.Linear(hidden, hidden * 4),\n", | |
| " nn.GELU(),\n", | |
| " nn.Dropout(dropout),\n", | |
| " nn.Linear(hidden * 4, hidden),\n", | |
| " )\n", | |
| " else:\n", | |
| " raise ValueError(f\"Unsupported ffn_type: {ffn_type!r}\")\n", | |
| "\n", | |
| " def _sa_block(self, x, key_padding_mask):\n", | |
| " x, _ = self.self_attn(\n", | |
| " x,\n", | |
| " x,\n", | |
| " x,\n", | |
| " key_padding_mask=key_padding_mask,\n", | |
| " need_weights=False,\n", | |
| " )\n", | |
| " return self.attn_drop(x)\n", | |
| "\n", | |
| " def _ff_block(self, x):\n", | |
| " return self.ffn_drop(self.ffn(x))\n", | |
| "\n", | |
| " def forward(self, x, key_padding_mask):\n", | |
| " if self.norm_first:\n", | |
| " x = x + self._sa_block(self.norm1(x), key_padding_mask)\n", | |
| " x = x + self._ff_block(self.norm2(x))\n", | |
| " else:\n", | |
| " x = self.norm1(x + self._sa_block(x, key_padding_mask))\n", | |
| " x = self.norm2(x + self._ff_block(x))\n", | |
| " return x\n", | |
| "\n", | |
| "class CustomEncoder(nn.Module):\n", | |
| " def __init__(\n", | |
| " self,\n", | |
| " hidden: int,\n", | |
| " heads: int,\n", | |
| " layers: int,\n", | |
| " dropout: float,\n", | |
| " ffn_type: str,\n", | |
| " swiglu_hidden: int,\n", | |
| " norm_first: bool,\n", | |
| " ):\n", | |
| " super().__init__()\n", | |
| " self.layers = nn.ModuleList(\n", | |
| " [\n", | |
| " CustomEncoderLayer(hidden, heads, dropout, ffn_type, swiglu_hidden, norm_first)\n", | |
| " for _ in range(layers)\n", | |
| " ]\n", | |
| " )\n", | |
| " self.norm = nn.LayerNorm(hidden)\n", | |
| "\n", | |
| " def forward(self, x, src_key_padding_mask):\n", | |
| " for layer in self.layers:\n", | |
| " x = layer(x, src_key_padding_mask)\n", | |
| " return self.norm(x)\n", | |
| "\n", | |
| "class CharTransformerPunct(nn.Module):\n", | |
| " def __init__(\n", | |
| " self,\n", | |
| " vocab_size,\n", | |
| " hidden=384,\n", | |
| " heads=6,\n", | |
| " layers=4,\n", | |
| " max_len=192,\n", | |
| " dropout=0.12,\n", | |
| " num_labels=len(LABEL2ID),\n", | |
| " ffn_type=\"gelu\",\n", | |
| " swiglu_hidden=1024,\n", | |
| " norm_first=True,\n", | |
| " ):\n", | |
| " super().__init__()\n", | |
| " self.token_emb = nn.Embedding(vocab_size, hidden, padding_idx=PAD_ID)\n", | |
| " self.pos_emb = nn.Embedding(max_len, hidden)\n", | |
| " self.emb_norm = nn.LayerNorm(hidden)\n", | |
| " self.drop = nn.Dropout(dropout)\n", | |
| " self.ffn_type = ffn_type\n", | |
| "\n", | |
| " self.encoder = CustomEncoder(\n", | |
| " hidden=hidden,\n", | |
| " heads=heads,\n", | |
| " layers=layers,\n", | |
| " dropout=dropout,\n", | |
| " ffn_type=ffn_type,\n", | |
| " swiglu_hidden=swiglu_hidden,\n", | |
| " norm_first=norm_first,\n", | |
| " )\n", | |
| "\n", | |
| " self.punct_head = nn.Linear(hidden, num_labels)\n", | |
| " self.newline_head = nn.Linear(hidden, 1)\n", | |
| "\n", | |
| " def forward(self, input_ids, attention_mask):\n", | |
| " input_ids = input_ids.long()\n", | |
| " bsz, seqlen = input_ids.shape\n", | |
| " pos = torch.arange(seqlen, device=input_ids.device).unsqueeze(0).expand(bsz, seqlen)\n", | |
| " x = self.token_emb(input_ids) + self.pos_emb(pos)\n", | |
| " x = self.emb_norm(x)\n", | |
| " x = self.drop(x)\n", | |
| "\n", | |
| " # TransformerEncoderLayer に渡す boolean mask\n", | |
| " # (Trueの場所がパディングとして無視されます)\n", | |
| " x = self.encoder(x, src_key_padding_mask=(~attention_mask))\n", | |
| " return {\n", | |
| " \"punct_logits\": self.punct_head(x),\n", | |
| " \"newline_logits\": self.newline_head(x).squeeze(-1),\n", | |
| " }\n", | |
| "\n", | |
| "def build_model():\n", | |
| " model = CharTransformerPunct(\n", | |
| " vocab_size=len(itos),\n", | |
| " hidden=CFG.hidden,\n", | |
| " heads=CFG.heads,\n", | |
| " layers=CFG.layers,\n", | |
| " max_len=CFG.max_len,\n", | |
| " dropout=CFG.dropout,\n", | |
| " num_labels=CFG.num_labels,\n", | |
| " ffn_type=CFG.ffn_type,\n", | |
| " swiglu_hidden=CFG.swiglu_hidden,\n", | |
| " norm_first=CFG.norm_first,\n", | |
| " ).to(DEVICE)\n", | |
| " if CFG.use_torch_compile and hasattr(torch, \"compile\"):\n", | |
| " model = torch.compile(model)\n", | |
| " print(\"parameters:\", sum(p.numel() for p in model.parameters()))\n", | |
| " return model\n", | |
| "\n", | |
| "model = None\n", | |
| "if not CFG.auto_tune:\n", | |
| " stoi, itos = build_vocab()\n", | |
| " train_ds, val_ds, train_loader, val_loader = build_dataloaders()\n", | |
| " model = build_model()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "8bdacfe7", | |
| "metadata": { | |
| "id": "8bdacfe7" | |
| }, | |
| "source": [ | |
| "## 11. Loss / Optimizer / Scheduler" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 20, | |
| "id": "9ebab425", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 222, | |
| "status": "ok", | |
| "timestamp": 1777267940421, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "9ebab425", | |
| "lines_to_next_cell": 1, | |
| "outputId": "61b15062-8273-402c-d7ed-55700f78d32c" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "class_weights: {'NONE': 0.3658536672592163, '、': 1.1707316637039185, '。': 1.4634146690368652}\n", | |
| "start_epoch: 1 best_score: -1.0 history_rows: 0\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "\n", | |
| "weights = np.asarray(CFG.class_weights, dtype=np.float32)\n", | |
| "weights = weights / weights.mean()\n", | |
| "class_weights = torch.tensor(weights, dtype=torch.float32, device=DEVICE)\n", | |
| "print(\"class_weights:\", {ID2LABEL[i]: float(class_weights[i].detach().cpu()) for i in range(CFG.num_labels)})\n", | |
| "\n", | |
| "punct_criterion = nn.CrossEntropyLoss(\n", | |
| " weight=class_weights,\n", | |
| " ignore_index=-100,\n", | |
| " label_smoothing=CFG.label_smoothing,\n", | |
| ")\n", | |
| "newline_criterion = nn.BCEWithLogitsLoss(\n", | |
| " pos_weight=torch.tensor(CFG.newline_pos_weight, dtype=torch.float32, device=DEVICE),\n", | |
| " reduction=\"none\",\n", | |
| ")\n", | |
| "\n", | |
| "def compute_loss(outputs, punct_labels, newline_labels):\n", | |
| " punct_logits = outputs[\"punct_logits\"]\n", | |
| " newline_logits = outputs[\"newline_logits\"]\n", | |
| " punct_labels = punct_labels.long()\n", | |
| " newline_labels = newline_labels.long()\n", | |
| " punct_loss = punct_criterion(punct_logits.view(-1, CFG.num_labels), punct_labels.view(-1))\n", | |
| "\n", | |
| " newline_mask = newline_labels != -100\n", | |
| " if newline_mask.any():\n", | |
| " newline_loss_raw = newline_criterion(\n", | |
| " newline_logits[newline_mask],\n", | |
| " newline_labels[newline_mask].float(),\n", | |
| " )\n", | |
| " newline_loss = newline_loss_raw.mean()\n", | |
| " else:\n", | |
| " newline_loss = newline_logits.sum() * 0.0\n", | |
| "\n", | |
| " return punct_loss + CFG.newline_loss_weight * newline_loss, punct_loss, newline_loss\n", | |
| "\n", | |
| "def build_optimizer_scheduler_scaler(model):\n", | |
| " try:\n", | |
| " optimizer = torch.optim.AdamW(model.parameters(), lr=CFG.lr, weight_decay=CFG.weight_decay, fused=(DEVICE == \"cuda\"))\n", | |
| " except TypeError:\n", | |
| " optimizer = torch.optim.AdamW(model.parameters(), lr=CFG.lr, weight_decay=CFG.weight_decay)\n", | |
| "\n", | |
| " total_updates = max(1, CFG.steps_per_epoch * CFG.epochs)\n", | |
| " warmup_updates = max(1, int(total_updates * CFG.warmup_ratio))\n", | |
| "\n", | |
| " def lr_lambda(step):\n", | |
| " if step < warmup_updates:\n", | |
| " return max(1e-8, step / warmup_updates)\n", | |
| " progress = (step - warmup_updates) / max(1, total_updates - warmup_updates)\n", | |
| " cosine = 0.5 * (1.0 + math.cos(math.pi * progress))\n", | |
| " return CFG.min_lr_ratio + (1.0 - CFG.min_lr_ratio) * cosine\n", | |
| "\n", | |
| " scheduler = torch.optim.lr_scheduler.LambdaLR(optimizer, lr_lambda)\n", | |
| " scaler = torch.amp.GradScaler(\"cuda\", enabled=(DEVICE == \"cuda\"))\n", | |
| " return optimizer, scheduler, scaler\n", | |
| "\n", | |
| "optimizer = scheduler = scaler = None\n", | |
| "if not CFG.auto_tune:\n", | |
| " optimizer, scheduler, scaler = build_optimizer_scheduler_scaler(model)\n", | |
| "\n", | |
| "# Resume support. Old checkpoints that contain only model weights can still be used;\n", | |
| "# newer checkpoints also restore optimizer/scheduler/scaler and continue at the next epoch.\n", | |
| "def _strip_state_dict_prefixes(state_dict):\n", | |
| " cleaned = {}\n", | |
| " for key, value in state_dict.items():\n", | |
| " for prefix in (\"module.\", \"_orig_mod.\"):\n", | |
| " if key.startswith(prefix):\n", | |
| " key = key[len(prefix):]\n", | |
| " cleaned[key] = value\n", | |
| " return cleaned\n", | |
| "\n", | |
| "\n", | |
| "def find_resume_checkpoint() -> Optional[str]:\n", | |
| " if not CFG.resume_from_checkpoint:\n", | |
| " return None\n", | |
| " candidates = []\n", | |
| " if CFG.resume_ckpt_path:\n", | |
| " candidates.append(CFG.resume_ckpt_path)\n", | |
| " candidates.extend(CFG.resume_ckpt_candidates)\n", | |
| " for candidate in candidates:\n", | |
| " if candidate and os.path.exists(candidate):\n", | |
| " return candidate\n", | |
| " return None\n", | |
| "\n", | |
| "\n", | |
| "def torch_load_checkpoint(path: str):\n", | |
| " try:\n", | |
| " return torch.load(path, map_location=DEVICE, weights_only=False)\n", | |
| " except TypeError:\n", | |
| " return torch.load(path, map_location=DEVICE)\n", | |
| "\n", | |
| "\n", | |
| "def load_training_checkpoint(path: str):\n", | |
| " print(\"resume checkpoint:\", path)\n", | |
| " ckpt = torch_load_checkpoint(path)\n", | |
| " state_dict = ckpt.get(\"model\", ckpt)\n", | |
| " model_to_load = model.module if hasattr(model, \"module\") else model\n", | |
| " missing, unexpected = model_to_load.load_state_dict(_strip_state_dict_prefixes(state_dict), strict=False)\n", | |
| " if missing or unexpected:\n", | |
| " print(\"checkpoint load notes:\", {\"missing\": missing, \"unexpected\": unexpected})\n", | |
| "\n", | |
| " if \"optimizer\" in ckpt:\n", | |
| " try:\n", | |
| " optimizer.load_state_dict(ckpt[\"optimizer\"])\n", | |
| " print(\"optimizer restored\")\n", | |
| " except ValueError as e:\n", | |
| " print(\"optimizer state not restored; architecture changed:\", repr(e))\n", | |
| " else:\n", | |
| " print(\"optimizer state not found; continuing with a fresh optimizer\")\n", | |
| "\n", | |
| " if \"scheduler\" in ckpt:\n", | |
| " try:\n", | |
| " scheduler.load_state_dict(ckpt[\"scheduler\"])\n", | |
| " print(\"scheduler restored\")\n", | |
| " except Exception as e:\n", | |
| " print(\"scheduler state not restored; architecture changed:\", repr(e))\n", | |
| " else:\n", | |
| " print(\"scheduler state not found; continuing with a fresh scheduler\")\n", | |
| "\n", | |
| " if \"scaler\" in ckpt and DEVICE == \"cuda\":\n", | |
| " scaler.load_state_dict(ckpt[\"scaler\"])\n", | |
| " print(\"AMP scaler restored\")\n", | |
| "\n", | |
| " resume_history = list(ckpt.get(\"history\", []))\n", | |
| " if \"epoch\" in ckpt:\n", | |
| " completed_epoch = int(ckpt[\"epoch\"])\n", | |
| " elif resume_history:\n", | |
| " completed_epoch = max(int(row.get(\"epoch\", idx + 1)) for idx, row in enumerate(resume_history))\n", | |
| " print(\"epoch key not found; inferred completed_epoch from history:\", completed_epoch)\n", | |
| " else:\n", | |
| " completed_epoch = 0\n", | |
| "\n", | |
| " resume_epoch = completed_epoch + 1\n", | |
| " resume_best_score = float(ckpt.get(\"best_score\", -1.0))\n", | |
| " if resume_best_score < 0.0 and resume_history:\n", | |
| " resume_best_score = max(float(row.get(\"score\", -1.0)) for row in resume_history)\n", | |
| " return resume_epoch, resume_best_score, resume_history\n", | |
| "\n", | |
| "resume_ckpt = find_resume_checkpoint() if not CFG.auto_tune else None\n", | |
| "if resume_ckpt:\n", | |
| " start_epoch, best_score, history = load_training_checkpoint(resume_ckpt)\n", | |
| "else:\n", | |
| " start_epoch, best_score, history = 1, -1.0, []\n", | |
| "\n", | |
| "print(\"start_epoch:\", start_epoch, \"best_score:\", best_score, \"history_rows:\", len(history))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "279bed0e", | |
| "metadata": { | |
| "id": "279bed0e" | |
| }, | |
| "source": [ | |
| "## 12. Evaluation" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 26, | |
| "id": "c9aef193", | |
| "metadata": { | |
| "executionInfo": { | |
| "elapsed": 56, | |
| "status": "ok", | |
| "timestamp": 1777280630563, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "c9aef193" | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "@torch.no_grad()\n", | |
| "def evaluate(model, loader):\n", | |
| " model.eval()\n", | |
| " total_loss = 0.0\n", | |
| " total_punct_loss = 0.0\n", | |
| " total_newline_loss = 0.0\n", | |
| " total_batches = 0\n", | |
| " punct_ys = []\n", | |
| " punct_preds = []\n", | |
| " newline_ys = []\n", | |
| " newline_preds = []\n", | |
| "\n", | |
| " for batch in tqdm(loader, desc=\"eval\", leave=False):\n", | |
| " input_ids = batch[\"input_ids\"].to(DEVICE, non_blocking=True)\n", | |
| " attention_mask = batch[\"attention_mask\"].to(DEVICE, non_blocking=True)\n", | |
| " punct_labels = batch[\"punct_labels\"].to(DEVICE, non_blocking=True)\n", | |
| " newline_labels = batch[\"newline_labels\"].to(DEVICE, non_blocking=True)\n", | |
| "\n", | |
| " with torch.amp.autocast(\"cuda\", enabled=(DEVICE == \"cuda\")):\n", | |
| " outputs = model(input_ids, attention_mask)\n", | |
| " loss, punct_loss, newline_loss = compute_loss(outputs, punct_labels, newline_labels)\n", | |
| "\n", | |
| " total_loss += loss.item()\n", | |
| " total_punct_loss += punct_loss.item()\n", | |
| " total_newline_loss += newline_loss.item()\n", | |
| " total_batches += 1\n", | |
| " punct_pred = outputs[\"punct_logits\"].argmax(dim=-1)\n", | |
| " punct_mask = punct_labels != -100\n", | |
| " punct_ys.append(punct_labels[punct_mask].detach().cpu().numpy())\n", | |
| " punct_preds.append(punct_pred[punct_mask].detach().cpu().numpy())\n", | |
| "\n", | |
| " newline_pred = (torch.sigmoid(outputs[\"newline_logits\"]) >= 0.5).long()\n", | |
| " newline_mask = newline_labels != -100\n", | |
| " newline_ys.append(newline_labels[newline_mask].detach().cpu().numpy())\n", | |
| " newline_preds.append(newline_pred[newline_mask].detach().cpu().numpy())\n", | |
| "\n", | |
| " y_true = np.concatenate(punct_ys)\n", | |
| " y_pred = np.concatenate(punct_preds)\n", | |
| " newline_true = np.concatenate(newline_ys)\n", | |
| " newline_pred = np.concatenate(newline_preds)\n", | |
| "\n", | |
| " label_ids = list(range(CFG.num_labels))\n", | |
| " target_names = [ID2LABEL[i] for i in label_ids]\n", | |
| " report = classification_report(\n", | |
| " y_true,\n", | |
| " y_pred,\n", | |
| " labels=label_ids,\n", | |
| " target_names=target_names,\n", | |
| " zero_division=0,\n", | |
| " )\n", | |
| "\n", | |
| " punctuation_label_ids = [\n", | |
| " LABEL2ID[\"、\"], LABEL2ID[\"。\"],\n", | |
| " ]\n", | |
| "\n", | |
| " def binary_f1(true_ids, pred_ids, positive_ids):\n", | |
| " _, _, f1, _ = precision_recall_fscore_support(\n", | |
| " np.isin(true_ids, positive_ids).astype(np.int32),\n", | |
| " np.isin(pred_ids, positive_ids).astype(np.int32),\n", | |
| " labels=[1],\n", | |
| " average=None,\n", | |
| " zero_division=0,\n", | |
| " )\n", | |
| " return float(f1[0])\n", | |
| "\n", | |
| " punct_f1 = binary_f1(y_true, y_pred, punctuation_label_ids)\n", | |
| " comma_f1 = binary_f1(y_true, y_pred, [LABEL2ID[\"、\"]])\n", | |
| " period_f1 = binary_f1(y_true, y_pred, [LABEL2ID[\"。\"]])\n", | |
| " newline_f1 = binary_f1(newline_true, newline_pred, [1])\n", | |
| " punct_macro_f1 = float((comma_f1 + period_f1) / 2)\n", | |
| " score = float(0.4 * comma_f1 + 0.4 * period_f1 + 0.2 * newline_f1)\n", | |
| "\n", | |
| " return {\n", | |
| " \"loss\": total_loss / max(1, total_batches),\n", | |
| " \"punct_loss\": total_punct_loss / max(1, total_batches),\n", | |
| " \"newline_loss\": total_newline_loss / max(1, total_batches),\n", | |
| " \"punct_binary_f1\": punct_f1,\n", | |
| " \"comma_f1\": comma_f1,\n", | |
| " \"period_f1\": period_f1,\n", | |
| " \"punct_macro_f1\": punct_macro_f1,\n", | |
| " \"newline_f1\": newline_f1,\n", | |
| " \"newline_binary_f1\": newline_f1,\n", | |
| " \"score\": score,\n", | |
| " \"report\": report,\n", | |
| " }\n", | |
| "\n", | |
| "@torch.no_grad()\n", | |
| "def search_thresholds(model, loader):\n", | |
| " model.eval()\n", | |
| " punct_logits_all = []\n", | |
| " punct_labels_all = []\n", | |
| " newline_logits_all = []\n", | |
| " newline_labels_all = []\n", | |
| "\n", | |
| " for batch in tqdm(loader, desc=\"threshold search\", leave=False):\n", | |
| " input_ids = batch[\"input_ids\"].to(DEVICE, non_blocking=True)\n", | |
| " attention_mask = batch[\"attention_mask\"].to(DEVICE, non_blocking=True)\n", | |
| " punct_labels = batch[\"punct_labels\"].to(DEVICE, non_blocking=True)\n", | |
| " newline_labels = batch[\"newline_labels\"].to(DEVICE, non_blocking=True)\n", | |
| "\n", | |
| " with torch.amp.autocast(\"cuda\", enabled=(DEVICE == \"cuda\")):\n", | |
| " outputs = model(input_ids, attention_mask)\n", | |
| "\n", | |
| " punct_mask = punct_labels != -100\n", | |
| " newline_mask = newline_labels != -100\n", | |
| " punct_logits_all.append(outputs[\"punct_logits\"][punct_mask].float().detach().cpu())\n", | |
| " punct_labels_all.append(punct_labels[punct_mask].long().detach().cpu())\n", | |
| " newline_logits_all.append(outputs[\"newline_logits\"][newline_mask].float().detach().cpu())\n", | |
| " newline_labels_all.append(newline_labels[newline_mask].long().detach().cpu())\n", | |
| "\n", | |
| " punct_logits = torch.cat(punct_logits_all, dim=0).numpy()\n", | |
| " punct_true = torch.cat(punct_labels_all, dim=0).numpy()\n", | |
| " newline_logits = torch.cat(newline_logits_all, dim=0).numpy()\n", | |
| " newline_true = torch.cat(newline_labels_all, dim=0).numpy()\n", | |
| "\n", | |
| " def binary_f1(true_ids, pred_ids, positive_ids):\n", | |
| " _, _, f1, _ = precision_recall_fscore_support(\n", | |
| " np.isin(true_ids, positive_ids).astype(np.int32),\n", | |
| " np.isin(pred_ids, positive_ids).astype(np.int32),\n", | |
| " labels=[1],\n", | |
| " average=None,\n", | |
| " zero_division=0,\n", | |
| " )\n", | |
| " return float(f1[0])\n", | |
| "\n", | |
| " best = None\n", | |
| " none_id = LABEL2ID[\"NONE\"]\n", | |
| " for punct_margin in CFG.punct_margin_candidates:\n", | |
| " raw_best = punct_logits.argmax(axis=-1)\n", | |
| " best_logits = punct_logits[np.arange(len(raw_best)), raw_best]\n", | |
| " none_logits = punct_logits[:, none_id]\n", | |
| " punct_pred = np.where(\n", | |
| " (raw_best != none_id) & ((best_logits - none_logits) >= punct_margin),\n", | |
| " raw_best,\n", | |
| " none_id,\n", | |
| " )\n", | |
| " comma_f1 = binary_f1(punct_true, punct_pred, [LABEL2ID[\"、\"]])\n", | |
| " period_f1 = binary_f1(punct_true, punct_pred, [LABEL2ID[\"。\"]])\n", | |
| " punct_macro_f1 = float((comma_f1 + period_f1) / 2)\n", | |
| "\n", | |
| " for newline_threshold in CFG.newline_threshold_candidates:\n", | |
| " newline_pred = (1.0 / (1.0 + np.exp(-newline_logits)) >= newline_threshold).astype(np.int32)\n", | |
| " newline_f1 = binary_f1(newline_true, newline_pred, [1])\n", | |
| " score = float(0.4 * comma_f1 + 0.4 * period_f1 + 0.2 * newline_f1)\n", | |
| " row = {\n", | |
| " \"newline_threshold\": float(newline_threshold),\n", | |
| " \"punct_margin\": float(punct_margin),\n", | |
| " \"comma_f1\": comma_f1,\n", | |
| " \"period_f1\": period_f1,\n", | |
| " \"punct_macro_f1\": punct_macro_f1,\n", | |
| " \"newline_f1\": newline_f1,\n", | |
| " \"score\": score,\n", | |
| " }\n", | |
| " if best is None or row[\"score\"] > best[\"score\"]:\n", | |
| " best = row\n", | |
| "\n", | |
| " return best\n", | |
| "\n", | |
| "def train_for_epochs(model, train_ds, train_loader, val_loader, save_best: bool):\n", | |
| " optimizer, scheduler, scaler = build_optimizer_scheduler_scaler(model)\n", | |
| " proc = psutil.Process(os.getpid())\n", | |
| " local_history = []\n", | |
| " local_best_score = -1.0\n", | |
| " local_best_metrics = None\n", | |
| " local_best_epoch = 0\n", | |
| "\n", | |
| " for epoch in range(1, CFG.epochs + 1):\n", | |
| " if hasattr(train_ds, \"set_epoch\"):\n", | |
| " train_ds.set_epoch(epoch)\n", | |
| " model.train()\n", | |
| " t0 = time.perf_counter()\n", | |
| " running = 0.0\n", | |
| " seen_tokens = 0\n", | |
| "\n", | |
| " pbar = tqdm(enumerate(train_loader, start=1), total=CFG.steps_per_epoch, desc=f\"{CFG.experiment_name} epoch {epoch}\")\n", | |
| " for step, batch in pbar:\n", | |
| " if step > CFG.steps_per_epoch:\n", | |
| " break\n", | |
| "\n", | |
| " input_ids = batch[\"input_ids\"].to(DEVICE, non_blocking=True)\n", | |
| " attention_mask = batch[\"attention_mask\"].to(DEVICE, non_blocking=True)\n", | |
| " punct_labels = batch[\"punct_labels\"].to(DEVICE, non_blocking=True)\n", | |
| " newline_labels = batch[\"newline_labels\"].to(DEVICE, non_blocking=True)\n", | |
| "\n", | |
| " optimizer.zero_grad(set_to_none=True)\n", | |
| " with torch.amp.autocast(\"cuda\", enabled=(DEVICE == \"cuda\")):\n", | |
| " outputs = model(input_ids, attention_mask)\n", | |
| " loss, punct_loss, newline_loss = compute_loss(outputs, punct_labels, newline_labels)\n", | |
| "\n", | |
| " scaler.scale(loss).backward()\n", | |
| " scaler.unscale_(optimizer)\n", | |
| " torch.nn.utils.clip_grad_norm_(model.parameters(), CFG.grad_clip)\n", | |
| " scaler.step(optimizer)\n", | |
| " scaler.update()\n", | |
| " scheduler.step()\n", | |
| "\n", | |
| " running += loss.item()\n", | |
| " seen_tokens += int(attention_mask.sum().detach().cpu())\n", | |
| "\n", | |
| " if step % 25 == 0:\n", | |
| " elapsed = max(1e-6, time.perf_counter() - t0)\n", | |
| " postfix = {\n", | |
| " \"loss\": f\"{running / 25:.4f}\",\n", | |
| " \"p_loss\": f\"{punct_loss.item():.4f}\",\n", | |
| " \"n_loss\": f\"{newline_loss.item():.4f}\",\n", | |
| " \"lr\": f\"{scheduler.get_last_lr()[0]:.2e}\",\n", | |
| " \"tok/s\": f\"{seen_tokens / elapsed:,.0f}\",\n", | |
| " \"rssGB\": f\"{proc.memory_info().rss / 1024**3:.2f}\",\n", | |
| " }\n", | |
| " if DEVICE == \"cuda\":\n", | |
| " postfix[\"vramGB\"] = f\"{torch.cuda.max_memory_allocated() / 1024**3:.2f}\"\n", | |
| " pbar.set_postfix(postfix)\n", | |
| " running = 0.0\n", | |
| "\n", | |
| " metrics = evaluate(model, val_loader)\n", | |
| " threshold_metrics = search_thresholds(model, val_loader)\n", | |
| " if threshold_metrics:\n", | |
| " CFG.newline_threshold = threshold_metrics[\"newline_threshold\"]\n", | |
| " CFG.punct_margin = threshold_metrics[\"punct_margin\"]\n", | |
| " metrics[\"threshold_search\"] = threshold_metrics\n", | |
| " metrics[\"score\"] = threshold_metrics[\"score\"]\n", | |
| " epoch_time = time.perf_counter() - t0\n", | |
| " row = {\"epoch\": epoch, \"time_sec\": epoch_time, **metrics}\n", | |
| " local_history.append({k: v for k, v in row.items() if k != \"report\"})\n", | |
| "\n", | |
| " print(\n", | |
| " f\"epoch {epoch} val_loss={metrics['loss']:.4f} \"\n", | |
| " f\"comma_f1={metrics['comma_f1']:.4f} \"\n", | |
| " f\"period_f1={metrics['period_f1']:.4f} \"\n", | |
| " f\"punct_macro_f1={metrics['punct_macro_f1']:.4f} \"\n", | |
| " f\"newline_f1={metrics['newline_f1']:.4f} \"\n", | |
| " f\"score={metrics['score']:.4f} \"\n", | |
| " f\"thr=({CFG.newline_threshold:.2f}, margin={CFG.punct_margin:.2f}) \"\n", | |
| " f\"time={epoch_time:.1f}s\"\n", | |
| " )\n", | |
| "\n", | |
| " if metrics[\"score\"] > local_best_score:\n", | |
| " local_best_score = metrics[\"score\"]\n", | |
| " local_best_metrics = metrics\n", | |
| " local_best_epoch = epoch\n", | |
| " if save_best:\n", | |
| " save_obj = {\n", | |
| " \"model\": model.module.state_dict() if hasattr(model, \"module\") else model.state_dict(),\n", | |
| " \"cfg\": asdict(CFG),\n", | |
| " \"label2id\": LABEL2ID,\n", | |
| " \"id2label\": ID2LABEL,\n", | |
| " \"heads\": {\"punct\": len(LABEL2ID), \"newline\": 1},\n", | |
| " \"history\": local_history,\n", | |
| " \"corpora\": [{k: v for k, v in c.items() if k != \"gitlab_paths\"} | {\"num_files\": len(c[\"gitlab_paths\"])} for c in AVAILABLE_CORPORA],\n", | |
| " \"itos\": itos,\n", | |
| " \"vocab_size\": len(itos),\n", | |
| " \"inference\": {\n", | |
| " \"mode\": CFG.inference_mode,\n", | |
| " \"newline_threshold\": CFG.newline_threshold,\n", | |
| " \"punct_margin\": CFG.punct_margin,\n", | |
| " },\n", | |
| " \"epoch\": epoch,\n", | |
| " \"best_score\": local_best_score,\n", | |
| " \"optimizer\": optimizer.state_dict(),\n", | |
| " \"scheduler\": scheduler.state_dict(),\n", | |
| " \"scaler\": scaler.state_dict(),\n", | |
| " }\n", | |
| " torch.save(save_obj, CFG.ckpt_path)\n", | |
| " with open(CFG.bundle_path, \"w\", encoding=\"utf-8\") as f:\n", | |
| " json.dump({k: v for k, v in save_obj.items() if k != \"model\"}, f, ensure_ascii=False, indent=2, default=str)\n", | |
| " print(\"saved:\", CFG.ckpt_path, \"best_score\", local_best_score)\n", | |
| "\n", | |
| " return local_best_epoch, local_best_score, local_best_metrics, local_history\n", | |
| "\n", | |
| "def apply_auto_tune_candidate(candidate: Dict[str, object]) -> None:\n", | |
| " CFG.vocab_max_size = int(candidate[\"vocab_max_size\"])\n", | |
| " CFG.ffn_type = str(candidate[\"ffn_type\"])\n", | |
| " CFG.swiglu_hidden = int(candidate.get(\"swiglu_hidden\", CFG.swiglu_hidden))\n", | |
| " CFG.experiment_name = str(candidate[\"name\"])\n", | |
| " CFG.max_files_per_corpus = CFG.auto_tune_max_files_per_corpus\n", | |
| " CFG.steps_per_epoch = CFG.auto_tune_steps_per_epoch\n", | |
| " CFG.epochs = CFG.auto_tune_epochs\n", | |
| " CFG.val_chunks = CFG.auto_tune_val_chunks\n", | |
| " CFG.train_cache_chunks = CFG.auto_tune_train_cache_chunks\n", | |
| " CFG.resume_from_checkpoint = False\n", | |
| " CFG.train_chunk_cache_path = None\n", | |
| " CFG.val_chunk_cache_path = None\n", | |
| " CFG.ckpt_path = os.path.join(CFG.work_dir, f\"{CFG.experiment_name}.pt\")\n", | |
| " CFG.bundle_path = os.path.join(CFG.work_dir, f\"{CFG.experiment_name}_bundle.json\")\n", | |
| "\n", | |
| "def candidate_summary(candidate: Dict[str, object], best_epoch: int, best_score: float, metrics: Dict, history_rows: List[Dict]) -> Dict:\n", | |
| " threshold = metrics.get(\"threshold_search\", {}) if metrics else {}\n", | |
| " return {\n", | |
| " \"name\": str(candidate[\"name\"]),\n", | |
| " \"vocab_max_size\": int(candidate[\"vocab_max_size\"]),\n", | |
| " \"actual_vocab_size\": len(itos),\n", | |
| " \"ffn_type\": str(candidate[\"ffn_type\"]),\n", | |
| " \"swiglu_hidden\": int(candidate.get(\"swiglu_hidden\", CFG.swiglu_hidden)),\n", | |
| " \"best_epoch\": int(best_epoch),\n", | |
| " \"best_score\": float(best_score),\n", | |
| " \"comma_f1\": float(metrics[\"comma_f1\"]),\n", | |
| " \"period_f1\": float(metrics[\"period_f1\"]),\n", | |
| " \"punct_macro_f1\": float(metrics[\"punct_macro_f1\"]),\n", | |
| " \"newline_f1\": float(metrics[\"newline_f1\"]),\n", | |
| " \"newline_threshold\": float(threshold.get(\"newline_threshold\", CFG.newline_threshold)),\n", | |
| " \"punct_margin\": float(threshold.get(\"punct_margin\", CFG.punct_margin)),\n", | |
| " \"history\": history_rows,\n", | |
| " }\n", | |
| "\n", | |
| "def select_auto_tune_config(results: List[Dict]) -> Dict:\n", | |
| " by_name = {row[\"name\"]: row for row in results}\n", | |
| " baseline = by_name.get(\"A1_vocab16000_gelu\")\n", | |
| " if baseline is None:\n", | |
| " baseline = max(results, key=lambda row: row[\"punct_macro_f1\"])\n", | |
| "\n", | |
| " punct_floor = baseline[\"punct_macro_f1\"] - 0.003\n", | |
| " acceptable = [row for row in results if row[\"punct_macro_f1\"] >= punct_floor]\n", | |
| " if not acceptable:\n", | |
| " acceptable = [baseline]\n", | |
| "\n", | |
| " best = max(\n", | |
| " acceptable,\n", | |
| " key=lambda row: (\n", | |
| " row[\"best_score\"],\n", | |
| " -row[\"vocab_max_size\"],\n", | |
| " 1 if row[\"ffn_type\"] == \"swiglu\" else 0,\n", | |
| " ),\n", | |
| " )\n", | |
| "\n", | |
| " return {\n", | |
| " \"selected\": {\n", | |
| " \"vocab_max_size\": best[\"vocab_max_size\"],\n", | |
| " \"ffn_type\": best[\"ffn_type\"],\n", | |
| " \"swiglu_hidden\": best[\"swiglu_hidden\"],\n", | |
| " \"newline_threshold\": best[\"newline_threshold\"],\n", | |
| " \"punct_margin\": best[\"punct_margin\"],\n", | |
| " \"source_candidate\": best[\"name\"],\n", | |
| " },\n", | |
| " \"baseline_candidate\": baseline[\"name\"],\n", | |
| " \"punct_macro_floor\": float(punct_floor),\n", | |
| " \"selection_rule\": \"highest score among candidates whose punct_macro_f1 is within 0.003 of A1 baseline; ties prefer smaller vocab and SwiGLU\",\n", | |
| " }\n", | |
| "\n", | |
| "def run_auto_tune() -> None:\n", | |
| " global stoi, itos\n", | |
| "\n", | |
| " base_candidates = [dict(x) for x in CFG.auto_tune_candidates]\n", | |
| " pending = list(base_candidates)\n", | |
| " results: List[Dict] = []\n", | |
| " ran_names = set()\n", | |
| "\n", | |
| " while pending:\n", | |
| " candidate = pending.pop(0)\n", | |
| " if candidate[\"name\"] in ran_names:\n", | |
| " continue\n", | |
| " ran_names.add(candidate[\"name\"])\n", | |
| " print(\"\\n===== AUTO TUNE\", candidate[\"name\"], \"=====\")\n", | |
| " apply_auto_tune_candidate(candidate)\n", | |
| " stoi, itos = build_vocab()\n", | |
| " train_ds, val_ds, train_loader, val_loader = build_dataloaders()\n", | |
| " model = build_model()\n", | |
| " best_epoch, best_score, best_metrics, history_rows = train_for_epochs(\n", | |
| " model,\n", | |
| " train_ds,\n", | |
| " train_loader,\n", | |
| " val_loader,\n", | |
| " save_best=False,\n", | |
| " )\n", | |
| " row = candidate_summary(candidate, best_epoch, best_score, best_metrics, history_rows)\n", | |
| " results.append(row)\n", | |
| " print(\"AUTO TUNE RESULT:\", json.dumps({k: v for k, v in row.items() if k != \"history\"}, ensure_ascii=False, indent=2))\n", | |
| "\n", | |
| " baseline = next((x for x in results if x[\"name\"] == \"A1_vocab16000_gelu\"), None)\n", | |
| " vocab8000 = next((x for x in results if x[\"name\"] == \"A3_vocab8000_gelu\"), None)\n", | |
| " if baseline and vocab8000 and vocab8000[\"punct_macro_f1\"] >= baseline[\"punct_macro_f1\"] - 0.003:\n", | |
| " pending.append(\n", | |
| " {\n", | |
| " \"name\": \"A5_vocab8000_swiglu\",\n", | |
| " \"vocab_max_size\": 8_000,\n", | |
| " \"ffn_type\": \"swiglu\",\n", | |
| " \"swiglu_hidden\": 1_024,\n", | |
| " }\n", | |
| " )\n", | |
| "\n", | |
| " del model, train_loader, val_loader, train_ds, val_ds\n", | |
| " gc.collect()\n", | |
| " if DEVICE == \"cuda\":\n", | |
| " torch.cuda.empty_cache()\n", | |
| "\n", | |
| " results_path = os.path.join(CFG.work_dir, CFG.auto_tune_results_path)\n", | |
| " with open(results_path, \"w\", encoding=\"utf-8\") as f:\n", | |
| " json.dump(results, f, ensure_ascii=False, indent=2, default=str)\n", | |
| " print(\"auto tune partial results:\", results_path)\n", | |
| "\n", | |
| " selection = select_auto_tune_config(results)\n", | |
| " out = {\"results\": results, **selection}\n", | |
| " results_path = os.path.join(CFG.work_dir, CFG.auto_tune_results_path)\n", | |
| " select_path = os.path.join(CFG.work_dir, CFG.auto_tune_select_path)\n", | |
| " with open(results_path, \"w\", encoding=\"utf-8\") as f:\n", | |
| " json.dump(out, f, ensure_ascii=False, indent=2, default=str)\n", | |
| " with open(select_path, \"w\", encoding=\"utf-8\") as f:\n", | |
| " json.dump(selection, f, ensure_ascii=False, indent=2, default=str)\n", | |
| " print(\"auto tune results:\", results_path)\n", | |
| " print(\"auto tune selected:\", select_path)\n", | |
| " print(\"SELECTED CONFIG:\", json.dumps(selection[\"selected\"], ensure_ascii=False, indent=2))\n", | |
| "\n", | |
| "#if CFG.auto_tune:\n", | |
| "# run_auto_tune()\n", | |
| "# raise SystemExit(\"auto_tune completed\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "0b2be684", | |
| "metadata": { | |
| "id": "0b2be684" | |
| }, | |
| "source": [ | |
| "## 13. Train" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 35, | |
| "id": "gwEngYSgLlir", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/", | |
| "height": 408 | |
| }, | |
| "executionInfo": { | |
| "elapsed": 114562, | |
| "status": "error", | |
| "timestamp": 1777286360202, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "gwEngYSgLlir", | |
| "outputId": "ed79e63c-4249-4d29-8f2d-5c7c621902b5" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Configuration updated to A2 selection.\n", | |
| "vocab scan: ja_wiki\n", | |
| "vocab scan: ja_kokkai_giji\n" | |
| ] | |
| }, | |
| { | |
| "ename": "KeyboardInterrupt", | |
| "evalue": "", | |
| "output_type": "error", | |
| "traceback": [ | |
| "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
| "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", | |
| "\u001b[0;32m/tmp/ipykernel_12856/1266080359.py\u001b[0m in \u001b[0;36m<cell line: 0>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;31m# Re-initialize vocab and data loaders based on updated CFG\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0mstoi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mitos\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbuild_vocab\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 13\u001b[0m \u001b[0mtrain_ds\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mval_ds\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtrain_loader\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mval_loader\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbuild_dataloaders\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0mmodel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbuild_model\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
| "\u001b[0;32m/tmp/ipykernel_12856/2069738902.py\u001b[0m in \u001b[0;36mbuild_vocab\u001b[0;34m()\u001b[0m\n\u001b[1;32m 64\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 65\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mraw_text\u001b[0m \u001b[0;32min\u001b[0m \u001b[0miter_jsonl_gz_texts_from_gitlab_path\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgitlab_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 66\u001b[0;31m \u001b[0mtext\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mclean_text\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mraw_text\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 67\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mtext\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
| "\u001b[0;32m/tmp/ipykernel_12856/759019609.py\u001b[0m in \u001b[0;36mclean_text\u001b[0;34m(raw_text)\u001b[0m\n\u001b[1;32m 111\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 112\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0msegment\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msplit_long_line\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mline\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 113\u001b[0;31m \u001b[0msegment\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnormalize_line\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msegment\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 114\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlooks_like_noise_line\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msegment\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[0;32mcontinue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
| "\u001b[0;32m/tmp/ipykernel_12856/759019609.py\u001b[0m in \u001b[0;36mnormalize_line\u001b[0;34m(line)\u001b[0m\n\u001b[1;32m 46\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 47\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mnormalize_line\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mline\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 48\u001b[0;31m \u001b[0mline\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mline\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtranslate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mTRANSLATION\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 49\u001b[0m \u001b[0mline\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mline\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"\\u3000\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\" \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"\\t\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\" \"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[0mline\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mre\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msub\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mr\"\\s+\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\" \"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mline\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
| "\u001b[0;31mKeyboardInterrupt\u001b[0m: " | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "# Apply selected auto-tune configuration\n", | |
| "CFG.vocab_max_size = 12000\n", | |
| "CFG.ffn_type = \"gelu\"\n", | |
| "CFG.swiglu_hidden = 1024\n", | |
| "CFG.newline_threshold = 0.3\n", | |
| "CFG.punct_margin = 0.0\n", | |
| "CFG.experiment_name = \"A2_vocab12000_gelu\"\n", | |
| "\n", | |
| "print(\"Configuration updated to A2 selection.\")\n", | |
| "\n", | |
| "# Re-initialize vocab and data loaders based on updated CFG\n", | |
| "stoi, itos = build_vocab()\n", | |
| "train_ds, val_ds, train_loader, val_loader = build_dataloaders()\n", | |
| "model = build_model()\n", | |
| "\n", | |
| "# Re-initialize optimizer, scheduler, and scaler\n", | |
| "optimizer, scheduler, scaler = build_optimizer_scheduler_scaler(model)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 30, | |
| "id": "4R3YPijCW0yn", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 75, | |
| "status": "ok", | |
| "timestamp": 1777283594960, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "4R3YPijCW0yn", | |
| "outputId": "0b053c2c-31c5-42da-a9e1-b140a1e990f3" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "parameters: 10369668\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "# Apply selected auto-tune configuration\n", | |
| "CFG.vocab_max_size = 12000\n", | |
| "CFG.ffn_type = \"swiglu\"\n", | |
| "CFG.swiglu_hidden = 1024\n", | |
| "CFG.newline_threshold = 0.3\n", | |
| "CFG.punct_margin = 0.0\n", | |
| "CFG.experiment_name = \"A2_vocab12000_swiglu\"\n", | |
| "model = build_model()\n", | |
| "\n", | |
| "# Re-initialize optimizer, scheduler, and scaler\n", | |
| "optimizer, scheduler, scaler = build_optimizer_scheduler_scaler(model)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 32, | |
| "id": "PQJyNzbZXDPb", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 12, | |
| "status": "ok", | |
| "timestamp": 1777283664998, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "PQJyNzbZXDPb", | |
| "outputId": "a325af00-49ae-4ad1-facd-5a8b067b206b" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "Reverted to default: epochs=5, steps_per_epoch=2000\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "# Revert training duration parameters to default\n", | |
| "CFG.epochs = 5\n", | |
| "CFG.steps_per_epoch = 2000\n", | |
| "CFG.max_files_per_corpus = 32\n", | |
| "CFG.train_cache_chunks = 1000000\n", | |
| "\n", | |
| "print(f\"Reverted to default: epochs={CFG.epochs}, steps_per_epoch={CFG.steps_per_epoch}\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 33, | |
| "id": "2e28eb0f", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/", | |
| "height": 1000, | |
| "referenced_widgets": [ | |
| "a0f5901d9d494ce4b2c3c3c1fcabd06e", | |
| "09f8dcbd7cc544108e43fead639ce277", | |
| "fd81a797f70a4e5a9043750586774fed", | |
| "554a8cfc16b647a7b6e68a43bb13ef4a", | |
| "7b95b36d83c44f5cb6d270aaab448883", | |
| "a45644ce46e44a7abc1cd9d701ae66fc", | |
| "b5033174abbc4eb8871ecaa764231ba7", | |
| "aec866f26d7147c6ad2c9175a3d2f076", | |
| "70e92fcc70e34d969ac7722f9ec0882b", | |
| "21e39a7f2fc641f5923f096425ba5fbd", | |
| "ef7995f9babf447f959df314b89d54a2", | |
| "4776891f42a84f4aafbdbe3f74cd66a2", | |
| "7b7cf83dbd214c6ca29340a376ba0188", | |
| "2137415ed4064c1bb1c69856af0c22b7", | |
| "041a636352994ebc870fd076fc6ccd69", | |
| "502cb323941b4fa48995979b96e169d3", | |
| "7d4b47b3692142279f7082bc7e3a62df", | |
| "45586a223595426990ea412755f7a7c7", | |
| "2e5bebd32d994437a75aab26549aaa64", | |
| "e1cb8d90b9d841c4adb5d2696208c169", | |
| "fdac6f566099458fa038d11e7aa44452", | |
| "1e288dfa575c41f198ca0cb09235a721", | |
| "180f3d66814d4888a7f1cfa5d5efd683", | |
| "aab889a6f5114d15a1572b4a96de6434", | |
| "08a1c054d81d4ed08147017c3026fa77", | |
| "49b8fe32e5f84104a9fcb9e32ac1ee21", | |
| "a42f75516bbb47ed9290bb4a3c75379c", | |
| "39d94eae6b534d04946f534afc3250ab", | |
| "1566aaff7a8c4e119103f8f76b4afb70", | |
| "8170a2dba6594d7db272ad52436d5a37", | |
| "19421bf7b12c40d6b788792e2914c853", | |
| "fd0343bc7fbc4c9ea14fefac4f7c4d05", | |
| "8f5d53603f784d19a8756b92a13a8329", | |
| "cd3f6fff352a45fd9aa853e95cd2706c", | |
| "a749690d6e5e48d4b9d3314e73830487", | |
| "f49fc60609dc40dd8bc7f82380f70b5a", | |
| "0b316a18319644108a1b2f70a5d7fe42", | |
| "9f7eabb7ee5d42bd84c1c58f77c8a300", | |
| "ea346f402476488fb4e199783a6ab1e0", | |
| "e08bfb41a114424f94565f0807c43db4", | |
| "8a0aca6587d34623b6ef752c28ac43bc", | |
| "27a28b493e2c4942b094dde8151623f4", | |
| "26dd110c6ef1424e983a65e551ce366d", | |
| "8132e5f353f1440d808373a2dd6eba00", | |
| "5ce1a0cd8c7841649d5a82b6712aa20e", | |
| "3b81f0be353e44e4b01056e9822f009d", | |
| "5c39a8db5353446f9563543e08fa0e64", | |
| "c0b0d68c39db415abe7b6c92e250c451", | |
| "4f0ba045438d47d1a39190b8478053ac", | |
| "fefc2eba241e4adfa56ced16e098b6bf", | |
| "6160e0acd5bd405ebf8954b9a4319c56", | |
| "dd3eccb6c46348a69d10948abbf0022d", | |
| "292ea043876d42b2873940f59432731b", | |
| "aea1966bdb2143cca681bf847aab023e", | |
| "8aa3ce282f9241639ce22de6b68bef3c", | |
| "627850b0b6974b8993680eda6227f828", | |
| "45c39f21acff4d78a956956c0984a16e", | |
| "ec5985dd680e432f85bffd2b8e1f1c3c", | |
| "7ab1270e0f0e4af8b1a54353a77ce20d", | |
| "0484474d43a34dbabf45fa11b3391881", | |
| "e7e889ec45d64224ab02f5bbe75a1e03", | |
| "6483fb2129c74784b63fd5e955766161", | |
| "e1d90740ddeb4d4d8b3c6a8fce56d3db", | |
| "fbb0d85e685e45c190e7a51919172567", | |
| "ee58e1eaab9146ce9a5612db0ed381ae", | |
| "6d7db29783a848889ecb3bafb116af05", | |
| "9abdd27c6115474886492649d0dc648e", | |
| "71b3f6a3bff648138625e12531733a3c", | |
| "ce34796b31bf4df1bddded3a1f487b9e", | |
| "075d17ef882d4194a5ca7127676ed555", | |
| "becccdae788f40de81cf7aaa5431beaf", | |
| "1a499ab336df4bc8a04b70d3527a4af6", | |
| "9d5feeb47a614109a5672841ea846978", | |
| "787926cd507e4fdbaa0909cdef6965b1", | |
| "167fc03b177e4db39b2f93b80a5cc4ff", | |
| "36b27a2d6d9e429ebf0d5b8394cf48f4", | |
| "17b23beda4c44f5b9c4c7128133caad0", | |
| "e37050b0a75849588860e86fae4a3de5", | |
| "7d6932638b67462a92160bdacef39fb6", | |
| "32a30d4203e94ca7bdaa9f5cef984e09", | |
| "69c363522b2848959affbe12a20a04cd", | |
| "a9e0b849a2c549ae890181cd80aa6f89", | |
| "d642239da7dc4df9b26ec5e64e914a3d", | |
| "98850cebbc794eeb990b15db32ab4e96", | |
| "a38dd16fdb7f4197b965f37a4f68a00b", | |
| "d063aeb7be1149acaa1b7aa181f9bf56", | |
| "0b4f70bbdc134e81bc171bc3b1238ea4", | |
| "12ca3b0daaba42f9b6533359fdeefabc", | |
| "1a81cd63f93c4c3ebd62901ab77ecdfe", | |
| "3e00d721c53243489a2ae9c751d78177", | |
| "aefaeeee1ba5490d921955a897f9541c", | |
| "c212d6d4cbea43fa97694baed3630c3a", | |
| "1d1f2a148d2d4d57b5ef27e224059361", | |
| "024617caf06745eeb5048bc675721e40", | |
| "5a32a56b0a7e4479bc4cc76c816e6761", | |
| "a416a534366b4539a4ad20edaebca067", | |
| "016fd7a3fff3471c8235b05d5e825378", | |
| "c2b5e9ce07db4769ac0f51742d3da924", | |
| "fa9613e7b6cb4ce686d2850d55cb2b2a", | |
| "8cd218c09d544e88bd0791469aa6b91e", | |
| "770463e9a2b9465c89c625cf34f28a7a", | |
| "f15b2b9fab4c4693b57f9952ce8ec8b7", | |
| "77ab293c0f724ccfb340237e0d4c3e2d", | |
| "9549d84184a24d0cb6ce9867f7ddda9d", | |
| "cdbce9ddd5034482b576c633b751356b", | |
| "821ffebb5c6044409920e08051a58c58", | |
| "8f42d0c475ef4c998730c54676dc7571", | |
| "1473f532e6d94ae496cf13a61130644d", | |
| "13cd0dfa941d4e438b70aab28e5d4b16", | |
| "74c56cfe7f0f4392b3627cb2c6907057", | |
| "625b8b0529d144d2bb35ac65a7943e7d", | |
| "1410828c0f53465db662f06761c3e516", | |
| "a1e63911f34a4eb99e8b143354c73177", | |
| "0fa52099c0b747d391e0147c765c6039", | |
| "69b78cd662c24edfa08f6b00be37b6a2", | |
| "b02dac4c47d847079d038a86970f5604", | |
| "69af44e6425a47c691d2218df10ede98", | |
| "8afb205894df4e94b29b957d204a7aa2", | |
| "36c9a51ddc9745029f2de35a79cff975", | |
| "4a970046e4de4718931d2bbe1142d8cd", | |
| "dca5f404bf0c4602917e147a0888a5f0", | |
| "0e9bf51ddbdb413e9d36188189fdc4a0", | |
| "74e7a58d3f1940a884654e645f31485f", | |
| "1c690038190544bea9bdf78da69c9468", | |
| "20e07c941a69499581b6f3be98867f59", | |
| "330c414a44824bda8af6e728e91e1fc9", | |
| "1dfbc9c6dbc7457caed5ddc869bf4869", | |
| "af58010cf4b6458ca05d2bc75c921a7b", | |
| "8180d73c32374a7586b1b20abb63184a", | |
| "5840cd0e7a404fecbbb400e1cff8c4dd", | |
| "8d284c20b9bc437390c4acc737829d80", | |
| "be03d3e6a9c4413890f37cd1fca5cb8f", | |
| "d73a3037907e4dc4ace253e3335e56ab", | |
| "a281bb601c514bd9971d7e5c7573f534", | |
| "2d25ee7b589a4d8bbebe8fee2eea44e6", | |
| "d578407774bb4d94b9fefc4835a6dd23", | |
| "e035a8c273764466a6f3b15500706a99", | |
| "bbb49fca62f64f219f8623adcb2a703d", | |
| "2a73f10fb6a847a1bb04916a80c8481d", | |
| "46502c4bb3314c9fa28990e15144c2a0", | |
| "23b4e0c81fd440948571377dea1e8a44", | |
| "c82b97c7519e45f5b1066be8498d5e8d", | |
| "d938189dfc30407baa674fb25cfda105", | |
| "60c1071ceb3741a78d8f339ca0870b62", | |
| "6da4960dfb5f45e4b7e6af2b416d4060", | |
| "eeca4c0bcacf4b548219af0a8b9e5c2d", | |
| "9f4938e677a04309a230f6a947f8ab6b", | |
| "0c1c65ee7a00442e9308b466a8f4cbaf", | |
| "1366eed9abb54d1e8344833e3279adf1", | |
| "c88a3823c8474771bd96c2c0b28e91bb", | |
| "507e6190c8f24801b6554b99272b6ff6", | |
| "de023f071cb5492191a56e2c534e9218", | |
| "3cfe7bfff845466195703171e3eeaa7a", | |
| "7a1175be5ea947229f1b446d8bdadca0", | |
| "30e9a35d9a2c4408997a34419521d652", | |
| "d39f45b7d83a4f2c87b6c957990958aa", | |
| "211b37cbf7244ec7980442fe844be24a", | |
| "ee941a0b8d3a45d58e960c907b64d9b3", | |
| "6c81a449918d4390943bdcb75f36c839", | |
| "3f67b975573d4cb8b19b5eefbddb06b1", | |
| "4cd16dfccd85470f8f743a8d932a13bf", | |
| "51cfe5d1309e4cabaddc41d90a7ffe59", | |
| "ac8d0e89705c48ae8d2b82fa6fb615e2", | |
| "c5c231ac276c496891531cf58b7bb21c", | |
| "6668ab0d821e4711bb580d5c7315ed1a" | |
| ] | |
| }, | |
| "executionInfo": { | |
| "elapsed": 2362634, | |
| "status": "ok", | |
| "timestamp": 1777286029275, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "2e28eb0f", | |
| "lines_to_next_cell": 1, | |
| "outputId": "b67865d2-05c7-4119-bc32-2814cdf8f76b" | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "a0f5901d9d494ce4b2c3c3c1fcabd06e", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "epoch 1: 0%| | 0/2000 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "4776891f42a84f4aafbdbe3f74cd66a2", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "eval: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "180f3d66814d4888a7f1cfa5d5efd683", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "threshold search: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "epoch 1 val_loss=0.3042 comma_f1=0.5096 period_f1=0.6356 punct_macro_f1=0.5726 newline_f1=0.4579 score=0.5574 thr=(0.35, margin=0.25) time=451.1s\n", | |
| " precision recall f1-score support\n", | |
| "\n", | |
| " NONE 0.98 0.96 0.97 704715\n", | |
| " 、 0.46 0.57 0.51 23677\n", | |
| " 。 0.56 0.73 0.64 18901\n", | |
| "\n", | |
| " accuracy 0.95 747293\n", | |
| " macro avg 0.67 0.76 0.71 747293\n", | |
| "weighted avg 0.95 0.95 0.95 747293\n", | |
| "\n", | |
| "saved: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu.pt best_score 0.5574186101254461\n" | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "cd3f6fff352a45fd9aa853e95cd2706c", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "epoch 2: 0%| | 0/2000 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "5ce1a0cd8c7841649d5a82b6712aa20e", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "eval: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "627850b0b6974b8993680eda6227f828", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "threshold search: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "epoch 2 val_loss=0.2589 comma_f1=0.5481 period_f1=0.6923 punct_macro_f1=0.6202 newline_f1=0.5227 score=0.6094 thr=(0.45, margin=0.50) time=450.9s\n", | |
| " precision recall f1-score support\n", | |
| "\n", | |
| " NONE 0.99 0.96 0.97 704715\n", | |
| " 、 0.48 0.64 0.55 23677\n", | |
| " 。 0.60 0.81 0.69 18901\n", | |
| "\n", | |
| " accuracy 0.95 747293\n", | |
| " macro avg 0.69 0.81 0.74 747293\n", | |
| "weighted avg 0.96 0.95 0.95 747293\n", | |
| "\n", | |
| "saved: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu.pt best_score 0.6094140399627694\n" | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "9abdd27c6115474886492649d0dc648e", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "epoch 3: 0%| | 0/2000 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "e37050b0a75849588860e86fae4a3de5", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "eval: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "1a81cd63f93c4c3ebd62901ab77ecdfe", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "threshold search: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "epoch 3 val_loss=0.2403 comma_f1=0.5803 period_f1=0.7286 punct_macro_f1=0.6544 newline_f1=0.5294 score=0.6401 thr=(0.35, margin=0.50) time=481.1s\n", | |
| " precision recall f1-score support\n", | |
| "\n", | |
| " NONE 0.99 0.97 0.98 704715\n", | |
| " 、 0.51 0.67 0.58 23677\n", | |
| " 。 0.65 0.83 0.73 18901\n", | |
| "\n", | |
| " accuracy 0.96 747293\n", | |
| " macro avg 0.72 0.82 0.76 747293\n", | |
| "weighted avg 0.96 0.96 0.96 747293\n", | |
| "\n", | |
| "saved: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu.pt best_score 0.6400807038803825\n" | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "8cd218c09d544e88bd0791469aa6b91e", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "epoch 4: 0%| | 0/2000 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "625b8b0529d144d2bb35ac65a7943e7d", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "eval: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "0e9bf51ddbdb413e9d36188189fdc4a0", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "threshold search: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "epoch 4 val_loss=0.2257 comma_f1=0.5981 period_f1=0.7436 punct_macro_f1=0.6708 newline_f1=0.5588 score=0.6578 thr=(0.40, margin=0.50) time=451.0s\n", | |
| " precision recall f1-score support\n", | |
| "\n", | |
| " NONE 0.99 0.97 0.98 704715\n", | |
| " 、 0.53 0.69 0.60 23677\n", | |
| " 。 0.66 0.85 0.74 18901\n", | |
| "\n", | |
| " accuracy 0.96 747293\n", | |
| " macro avg 0.73 0.84 0.77 747293\n", | |
| "weighted avg 0.96 0.96 0.96 747293\n", | |
| "\n", | |
| "saved: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu.pt best_score 0.6577902480877615\n" | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "d73a3037907e4dc4ace253e3335e56ab", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "epoch 5: 0%| | 0/2000 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "60c1071ceb3741a78d8f339ca0870b62", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "eval: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/vnd.jupyter.widget-view+json": { | |
| "model_id": "30e9a35d9a2c4408997a34419521d652", | |
| "version_major": 2, | |
| "version_minor": 0 | |
| }, | |
| "text/plain": [ | |
| "threshold search: 0%| | 0/16 [00:00<?, ?it/s]" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "epoch 5 val_loss=0.2181 comma_f1=0.6117 period_f1=0.7602 punct_macro_f1=0.6859 newline_f1=0.5668 score=0.6726 thr=(0.40, margin=0.75) time=500.6s\n", | |
| " precision recall f1-score support\n", | |
| "\n", | |
| " NONE 0.99 0.97 0.98 704715\n", | |
| " 、 0.54 0.70 0.61 23677\n", | |
| " 。 0.68 0.86 0.76 18901\n", | |
| "\n", | |
| " accuracy 0.96 747293\n", | |
| " macro avg 0.74 0.84 0.78 747293\n", | |
| "weighted avg 0.97 0.96 0.96 747293\n", | |
| "\n", | |
| "saved: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu.pt best_score 0.6726245187304916\n", | |
| "training history:\n", | |
| "[\n", | |
| " {\n", | |
| " \"epoch\": 1,\n", | |
| " \"time_sec\": 451.0605950160025,\n", | |
| " \"loss\": 0.30415573716163635,\n", | |
| " \"punct_loss\": 0.23817488178610802,\n", | |
| " \"newline_loss\": 0.13196171168237925,\n", | |
| " \"punct_binary_f1\": 0.6050871807592529,\n", | |
| " \"comma_f1\": 0.509586257502493,\n", | |
| " \"period_f1\": 0.6355838913861114,\n", | |
| " \"punct_macro_f1\": 0.5725850744443022,\n", | |
| " \"newline_f1\": 0.4578520809678556,\n", | |
| " \"newline_binary_f1\": 0.4578520809678556,\n", | |
| " \"score\": 0.5574186101254461,\n", | |
| " \"threshold_search\": {\n", | |
| " \"newline_threshold\": 0.35,\n", | |
| " \"punct_margin\": 0.25,\n", | |
| " \"comma_f1\": 0.5085482350047148,\n", | |
| " \"period_f1\": 0.6424271495383139,\n", | |
| " \"punct_macro_f1\": 0.5754876922715144,\n", | |
| " \"newline_f1\": 0.4851422815411735,\n", | |
| " \"score\": 0.5574186101254461\n", | |
| " }\n", | |
| " },\n", | |
| " {\n", | |
| " \"epoch\": 2,\n", | |
| " \"time_sec\": 450.9349462930004,\n", | |
| " \"loss\": 0.25894941575825214,\n", | |
| " \"punct_loss\": 0.20197359006851912,\n", | |
| " \"newline_loss\": 0.11395165137946606,\n", | |
| " \"punct_binary_f1\": 0.6463850894333384,\n", | |
| " \"comma_f1\": 0.5480802086143333,\n", | |
| " \"period_f1\": 0.6922833220185562,\n", | |
| " \"punct_macro_f1\": 0.6201817653164448,\n", | |
| " \"newline_f1\": 0.5227272727272727,\n", | |
| " \"newline_binary_f1\": 0.5227272727272727,\n", | |
| " \"score\": 0.6094140399627694,\n", | |
| " \"threshold_search\": {\n", | |
| " \"newline_threshold\": 0.45,\n", | |
| " \"punct_margin\": 0.5,\n", | |
| " \"comma_f1\": 0.548344203127968,\n", | |
| " \"period_f1\": 0.7115328608872925,\n", | |
| " \"punct_macro_f1\": 0.6299385320076303,\n", | |
| " \"newline_f1\": 0.5273160717833256,\n", | |
| " \"score\": 0.6094140399627694\n", | |
| " }\n", | |
| " },\n", | |
| " {\n", | |
| " \"epoch\": 3,\n", | |
| " \"time_sec\": 481.1308304359991,\n", | |
| " \"loss\": 0.24031874351203442,\n", | |
| " \"punct_loss\": 0.18404116947203875,\n", | |
| " \"newline_loss\": 0.11255514714866877,\n", | |
| " \"punct_binary_f1\": 0.6796622515876843,\n", | |
| " \"comma_f1\": 0.5803133465114576,\n", | |
| " \"period_f1\": 0.7285504167347606,\n", | |
| " \"punct_macro_f1\": 0.6544318816231092,\n", | |
| " \"newline_f1\": 0.5294227535961143,\n", | |
| " \"newline_binary_f1\": 0.5294227535961143,\n", | |
| " \"score\": 0.6400807038803825,\n", | |
| " \"threshold_search\": {\n", | |
| " \"newline_threshold\": 0.35,\n", | |
| " \"punct_margin\": 0.5,\n", | |
| " \"comma_f1\": 0.5830625764800202,\n", | |
| " \"period_f1\": 0.7445135195865479,\n", | |
| " \"punct_macro_f1\": 0.6637880480332841,\n", | |
| " \"newline_f1\": 0.5452513272687758,\n", | |
| " \"score\": 0.6400807038803825\n", | |
| " }\n", | |
| " },\n", | |
| " {\n", | |
| " \"epoch\": 4,\n", | |
| " \"time_sec\": 451.0275581269998,\n", | |
| " \"loss\": 0.22570471093058586,\n", | |
| " \"punct_loss\": 0.1732629807665944,\n", | |
| " \"newline_loss\": 0.10488346265628934,\n", | |
| " \"punct_binary_f1\": 0.6947168034716394,\n", | |
| " \"comma_f1\": 0.5980752277402293,\n", | |
| " \"period_f1\": 0.7435850016181977,\n", | |
| " \"punct_macro_f1\": 0.6708301146792135,\n", | |
| " \"newline_f1\": 0.558847825306181,\n", | |
| " \"newline_binary_f1\": 0.558847825306181,\n", | |
| " \"score\": 0.6577902480877615,\n", | |
| " \"threshold_search\": {\n", | |
| " \"newline_threshold\": 0.4,\n", | |
| " \"punct_margin\": 0.5,\n", | |
| " \"comma_f1\": 0.6000922896216125,\n", | |
| " \"period_f1\": 0.7612817874467147,\n", | |
| " \"punct_macro_f1\": 0.6806870385341637,\n", | |
| " \"newline_f1\": 0.5662030863021528,\n", | |
| " \"score\": 0.6577902480877615\n", | |
| " }\n", | |
| " },\n", | |
| " {\n", | |
| " \"epoch\": 5,\n", | |
| " \"time_sec\": 500.571824947001,\n", | |
| " \"loss\": 0.21805834583938122,\n", | |
| " \"punct_loss\": 0.16585472878068686,\n", | |
| " \"newline_loss\": 0.1044072350487113,\n", | |
| " \"punct_binary_f1\": 0.7075757263760476,\n", | |
| " \"comma_f1\": 0.6117413812093843,\n", | |
| " \"period_f1\": 0.7601519272249836,\n", | |
| " \"punct_macro_f1\": 0.6859466542171839,\n", | |
| " \"newline_f1\": 0.5667818810260142,\n", | |
| " \"newline_binary_f1\": 0.5667818810260142,\n", | |
| " \"score\": 0.6726245187304916,\n", | |
| " \"threshold_search\": {\n", | |
| " \"newline_threshold\": 0.4,\n", | |
| " \"punct_margin\": 0.75,\n", | |
| " \"comma_f1\": 0.6092300914197599,\n", | |
| " \"period_f1\": 0.7828472716187379,\n", | |
| " \"punct_macro_f1\": 0.696038681519249,\n", | |
| " \"newline_f1\": 0.5789678675754625,\n", | |
| " \"score\": 0.6726245187304916\n", | |
| " }\n", | |
| " }\n", | |
| "]\n", | |
| "best_score: 0.6726245187304916\n", | |
| "max VRAM allocated GB: 4.01\n", | |
| "checkpoint: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu.pt\n", | |
| "bundle: punct_train_llmjp_gitlab_work/A4_vocab12000_swiglu_bundle.json\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "\n", | |
| "proc = psutil.Process(os.getpid())\n", | |
| "if start_epoch > CFG.epochs:\n", | |
| " print(f\"checkpoint already reached epoch {start_epoch - 1}; CFG.epochs={CFG.epochs}. Nothing to train.\")\n", | |
| "\n", | |
| "for epoch in range(start_epoch, CFG.epochs + 1):\n", | |
| " if hasattr(train_ds, \"set_epoch\"):\n", | |
| " train_ds.set_epoch(epoch)\n", | |
| " model.train()\n", | |
| " t0 = time.perf_counter()\n", | |
| " running = 0.0\n", | |
| " seen_tokens = 0\n", | |
| "\n", | |
| " pbar = tqdm(enumerate(train_loader, start=1), total=CFG.steps_per_epoch, desc=f\"epoch {epoch}\")\n", | |
| " for step, batch in pbar:\n", | |
| " if step > CFG.steps_per_epoch:\n", | |
| " break\n", | |
| "\n", | |
| " input_ids = batch[\"input_ids\"].to(DEVICE, non_blocking=True)\n", | |
| " attention_mask = batch[\"attention_mask\"].to(DEVICE, non_blocking=True)\n", | |
| " punct_labels = batch[\"punct_labels\"].to(DEVICE, non_blocking=True)\n", | |
| " newline_labels = batch[\"newline_labels\"].to(DEVICE, non_blocking=True)\n", | |
| "\n", | |
| " optimizer.zero_grad(set_to_none=True)\n", | |
| " with torch.amp.autocast(\"cuda\", enabled=(DEVICE == \"cuda\")):\n", | |
| " outputs = model(input_ids, attention_mask)\n", | |
| " loss, punct_loss, newline_loss = compute_loss(outputs, punct_labels, newline_labels)\n", | |
| "\n", | |
| " scaler.scale(loss).backward()\n", | |
| " scaler.unscale_(optimizer)\n", | |
| " torch.nn.utils.clip_grad_norm_(model.parameters(), CFG.grad_clip)\n", | |
| " scaler.step(optimizer)\n", | |
| " scaler.update()\n", | |
| " scheduler.step()\n", | |
| "\n", | |
| " running += loss.item()\n", | |
| " seen_tokens += int(attention_mask.sum().detach().cpu())\n", | |
| "\n", | |
| " if step % 25 == 0:\n", | |
| " elapsed = max(1e-6, time.perf_counter() - t0)\n", | |
| " postfix = {\n", | |
| " \"loss\": f\"{running / 25:.4f}\",\n", | |
| " \"p_loss\": f\"{punct_loss.item():.4f}\",\n", | |
| " \"n_loss\": f\"{newline_loss.item():.4f}\",\n", | |
| " \"lr\": f\"{scheduler.get_last_lr()[0]:.2e}\",\n", | |
| " \"tok/s\": f\"{seen_tokens / elapsed:,.0f}\",\n", | |
| " \"rssGB\": f\"{proc.memory_info().rss / 1024**3:.2f}\",\n", | |
| " }\n", | |
| " if DEVICE == \"cuda\":\n", | |
| " postfix[\"vramGB\"] = f\"{torch.cuda.max_memory_allocated() / 1024**3:.2f}\"\n", | |
| " pbar.set_postfix(postfix)\n", | |
| " running = 0.0\n", | |
| "\n", | |
| " metrics = evaluate(model, val_loader)\n", | |
| " threshold_metrics = search_thresholds(model, val_loader)\n", | |
| " if threshold_metrics:\n", | |
| " CFG.newline_threshold = threshold_metrics[\"newline_threshold\"]\n", | |
| " CFG.punct_margin = threshold_metrics[\"punct_margin\"]\n", | |
| " metrics[\"threshold_search\"] = threshold_metrics\n", | |
| " metrics[\"score\"] = threshold_metrics[\"score\"]\n", | |
| " epoch_time = time.perf_counter() - t0\n", | |
| " row = {\"epoch\": epoch, \"time_sec\": epoch_time, **metrics}\n", | |
| " history.append({k: v for k, v in row.items() if k != \"report\"})\n", | |
| "\n", | |
| " print(\n", | |
| " f\"epoch {epoch} val_loss={metrics['loss']:.4f} \"\n", | |
| " f\"comma_f1={metrics['comma_f1']:.4f} \"\n", | |
| " f\"period_f1={metrics['period_f1']:.4f} \"\n", | |
| " f\"punct_macro_f1={metrics['punct_macro_f1']:.4f} \"\n", | |
| " f\"newline_f1={metrics['newline_f1']:.4f} \"\n", | |
| " f\"score={metrics['score']:.4f} \"\n", | |
| " f\"thr=({CFG.newline_threshold:.2f}, margin={CFG.punct_margin:.2f}) \"\n", | |
| " f\"time={epoch_time:.1f}s\"\n", | |
| " )\n", | |
| " print(metrics[\"report\"])\n", | |
| "\n", | |
| " if metrics[\"score\"] > best_score:\n", | |
| " best_score = metrics[\"score\"]\n", | |
| " save_obj = {\n", | |
| " \"model\": model.module.state_dict() if hasattr(model, \"module\") else model.state_dict(),\n", | |
| " \"cfg\": asdict(CFG),\n", | |
| " \"label2id\": LABEL2ID,\n", | |
| " \"id2label\": ID2LABEL,\n", | |
| " \"heads\": {\"punct\": len(LABEL2ID), \"newline\": 1},\n", | |
| " \"history\": history,\n", | |
| " \"corpora\": [{k: v for k, v in c.items() if k != \"gitlab_paths\"} | {\"num_files\": len(c[\"gitlab_paths\"])} for c in AVAILABLE_CORPORA],\n", | |
| " \"itos\": itos,\n", | |
| " \"vocab_size\": len(itos),\n", | |
| " \"inference\": {\n", | |
| " \"mode\": CFG.inference_mode,\n", | |
| " \"newline_threshold\": CFG.newline_threshold,\n", | |
| " \"punct_margin\": CFG.punct_margin,\n", | |
| " },\n", | |
| " \"epoch\": epoch,\n", | |
| " \"best_score\": best_score,\n", | |
| " \"optimizer\": optimizer.state_dict(),\n", | |
| " \"scheduler\": scheduler.state_dict(),\n", | |
| " \"scaler\": scaler.state_dict(),\n", | |
| " }\n", | |
| " torch.save(save_obj, CFG.ckpt_path)\n", | |
| " with open(CFG.bundle_path, \"w\", encoding=\"utf-8\") as f:\n", | |
| " json.dump({k: v for k, v in save_obj.items() if k != \"model\"}, f, ensure_ascii=False, indent=2, default=str)\n", | |
| " print(\"saved:\", CFG.ckpt_path, \"best_score\", best_score)\n", | |
| "\n", | |
| "print(\"training history:\")\n", | |
| "print(json.dumps(history, ensure_ascii=False, indent=2))\n", | |
| "print(\"best_score:\", best_score)\n", | |
| "if DEVICE == \"cuda\":\n", | |
| " print(\"max VRAM allocated GB:\", round(torch.cuda.max_memory_allocated() / 1024**3, 3))\n", | |
| "print(\"checkpoint:\", CFG.ckpt_path)\n", | |
| "print(\"bundle:\", CFG.bundle_path)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "9b21ba0b", | |
| "metadata": { | |
| "id": "9b21ba0b" | |
| }, | |
| "source": [ | |
| "## 14. Restore helper" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 34, | |
| "id": "b5531ce8", | |
| "metadata": { | |
| "colab": { | |
| "base_uri": "https://localhost:8080/" | |
| }, | |
| "executionInfo": { | |
| "elapsed": 75, | |
| "status": "ok", | |
| "timestamp": 1777286050861, | |
| "user": { | |
| "displayName": "kz", | |
| "userId": "04068570917018885044" | |
| }, | |
| "user_tz": -540 | |
| }, | |
| "id": "b5531ce8", | |
| "outputId": "91263ef4-0394-40bd-fc58-eb2bc0a257a4" | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "これはテストです。\n", | |
| "句読点と改行を別ヘッドで復元します。\n", | |
| "学習が進むと、自然になります。\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "\n", | |
| "def center_weight(i: int, n: int) -> float:\n", | |
| " if n <= 1:\n", | |
| " return 1.0\n", | |
| " center = (n - 1) / 2\n", | |
| " dist = abs(i - center) / max(1.0, center)\n", | |
| " return 0.25 + 0.75 * (1.0 - dist)\n", | |
| "\n", | |
| "@torch.no_grad()\n", | |
| "def restore_punctuation_and_newlines(\n", | |
| " text: str,\n", | |
| " model,\n", | |
| " max_len: Optional[int] = None,\n", | |
| " newline_threshold: Optional[float] = None,\n", | |
| " punct_margin: Optional[float] = None,\n", | |
| ") -> str:\n", | |
| " model.eval()\n", | |
| " chars = [ch for ch in text if ch not in BOUNDARY_CHARS and ch not in REMOVE_CHARS and ch != \" \"]\n", | |
| " out = []\n", | |
| "\n", | |
| " # 修正ポイント: ストライド推論 (Stride Inference) を導入し、\n", | |
| " # チャンク間のつなぎ目で文脈が途切れて予測精度が落ちるのを防ぎます。\n", | |
| " model_for_shape = model.module if hasattr(model, \"module\") else model\n", | |
| " model_for_shape = model_for_shape._orig_mod if hasattr(model_for_shape, \"_orig_mod\") else model_for_shape\n", | |
| " model_max_len = model_for_shape.pos_emb.num_embeddings\n", | |
| " max_len = model_max_len if max_len is None else min(max_len, model_max_len)\n", | |
| " stride = max(1, int(max_len * 0.75))\n", | |
| " newline_threshold = CFG.newline_threshold if newline_threshold is None else newline_threshold\n", | |
| " punct_margin = CFG.punct_margin if punct_margin is None else punct_margin\n", | |
| "\n", | |
| " punct_logits_sum = np.zeros((len(chars), CFG.num_labels), dtype=np.float64)\n", | |
| " newline_logits_sum = np.zeros((len(chars),), dtype=np.float64)\n", | |
| " weight_sum = np.zeros((len(chars),), dtype=np.float64)\n", | |
| "\n", | |
| " for start in range(0, len(chars), stride):\n", | |
| " chunk = chars[start:start + max_len]\n", | |
| " x = np.zeros((1, max_len), dtype=np.int32)\n", | |
| " m = np.zeros((1, max_len), dtype=np.bool_)\n", | |
| " x[0, :len(chunk)] = [char_to_id(ch) for ch in chunk]\n", | |
| " m[0, :len(chunk)] = True\n", | |
| "\n", | |
| " input_ids = torch.from_numpy(x).to(DEVICE)\n", | |
| " attention_mask = torch.from_numpy(m).to(DEVICE)\n", | |
| " with torch.amp.autocast(\"cuda\", enabled=(DEVICE == \"cuda\")):\n", | |
| " outputs = model(input_ids, attention_mask)\n", | |
| "\n", | |
| " punct_logits = outputs[\"punct_logits\"][0, :len(chunk)].float().detach().cpu().numpy()\n", | |
| " newline_logits = outputs[\"newline_logits\"][0, :len(chunk)].float().detach().cpu().numpy()\n", | |
| "\n", | |
| " for i in range(len(chunk)):\n", | |
| " index = start + i\n", | |
| " weight = center_weight(i, len(chunk))\n", | |
| " punct_logits_sum[index] += weight * punct_logits[i]\n", | |
| " newline_logits_sum[index] += weight * newline_logits[i]\n", | |
| " weight_sum[index] += weight\n", | |
| "\n", | |
| " none_id = LABEL2ID[\"NONE\"]\n", | |
| " for i in range(len(chars)):\n", | |
| " ch = chars[i]\n", | |
| " out.append(ch)\n", | |
| "\n", | |
| " if weight_sum[i] <= 0:\n", | |
| " continue\n", | |
| "\n", | |
| " punct_logits = punct_logits_sum[i] / weight_sum[i]\n", | |
| " best_punct = int(np.argmax(punct_logits))\n", | |
| " if best_punct != none_id and punct_logits[best_punct] - punct_logits[none_id] >= punct_margin:\n", | |
| " out.append(ID2LABEL[best_punct])\n", | |
| "\n", | |
| " newline_logit = newline_logits_sum[i] / weight_sum[i]\n", | |
| " newline_prob = 1.0 / (1.0 + math.exp(-float(newline_logit)))\n", | |
| " if newline_prob >= newline_threshold:\n", | |
| " out.append(\"\\n\")\n", | |
| "\n", | |
| " return \"\".join(out)\n", | |
| "\n", | |
| "sample = \"これはテストです句読点と改行を別ヘッドで復元します学習が進むと自然になります\"\n", | |
| "print(restore_punctuation_and_newlines(sample, model))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "id": "8bf50b27", | |
| "metadata": { | |
| "id": "8bf50b27" | |
| }, | |
| "source": [ | |
| "## 15. Tuning\n", | |
| "\n", | |
| "Auto Stage A sweep:\n", | |
| "```python\n", | |
| "CFG.auto_tune = True\n", | |
| "CFG.auto_tune_steps_per_epoch = 600\n", | |
| "CFG.auto_tune_epochs = 2\n", | |
| "CFG.auto_tune_val_chunks = 4096\n", | |
| "CFG.auto_tune_train_cache_chunks = 1_000_000\n", | |
| "```\n", | |
| "\n", | |
| "Outputs:\n", | |
| "- punct_train_llmjp_gitlab_work/stage_a_auto_tune_results.json\n", | |
| "- punct_train_llmjp_gitlab_work/stage_a_selected_config.json\n", | |
| "\n", | |
| "Smaller initial test:\n", | |
| "```python\n", | |
| "CFG.max_files_per_corpus = 32\n", | |
| "CFG.steps_per_epoch = 600\n", | |
| "CFG.epochs = 2\n", | |
| "CFG.batch_size = 256\n", | |
| "CFG.val_chunks = 4096\n", | |
| "CFG.train_cache_chunks = 1_000_000\n", | |
| "```\n", | |
| "\n", | |
| "Stage A candidates. Set these before `stoi, itos = build_vocab()` so the\n", | |
| "vocabulary and cache names stay aligned.\n", | |
| "```python\n", | |
| "# A1\n", | |
| "CFG.vocab_max_size = 16_000; CFG.ffn_type = \"gelu\"; CFG.experiment_name = \"vocab16000_gelu\"\n", | |
| "# A2\n", | |
| "CFG.vocab_max_size = 12_000; CFG.ffn_type = \"gelu\"; CFG.experiment_name = \"vocab12000_gelu\"\n", | |
| "# A3\n", | |
| "CFG.vocab_max_size = 8_000; CFG.ffn_type = \"gelu\"; CFG.experiment_name = \"vocab8000_gelu\"\n", | |
| "# A4\n", | |
| "CFG.vocab_max_size = 12_000; CFG.ffn_type = \"swiglu\"; CFG.swiglu_hidden = 1024; CFG.experiment_name = \"vocab12000_swiglu\"\n", | |
| "```\n", | |
| "\n", | |
| "More data:\n", | |
| "```python\n", | |
| "CFG.steps_per_epoch = 2000\n", | |
| "CFG.epochs = 5\n", | |
| "CFG.val_chunks = 8192\n", | |
| "CFG.shuffle_buffer_chunks = 4096\n", | |
| "```\n", | |
| "\n", | |
| "If GitLab throttles or fails:\n", | |
| "```python\n", | |
| "os.environ[\"GITLAB_TOKEN\"] = \"your_token\"\n", | |
| "```\n", | |
| "\n", | |
| "Redownload corrupted cache:\n", | |
| "```python\n", | |
| "CFG.force_redownload = True\n", | |
| "```\n", | |
| "\n", | |
| "Clear cache:\n", | |
| "```python\n", | |
| "!rm -rf /content/llmjp_gitlab_cache\n", | |
| "\n", | |
| "```" | |
| ] | |
| } | |
| ], | |
| "metadata": { | |
| "accelerator": "GPU", | |
| "colab": { | |
| "gpuType": "L4", | |
| "machine_shape": "hm", | |
| "provenance": [] | |
| }, | |
| "jupytext": { | |
| "encoding": "# -*- coding: utf-8 -*-", | |
| "formats": "ipynb,py:percent" | |
| }, | |
| "kernelspec": { | |
| "display_name": "Python 3", | |
| "name": "python3" | |
| }, | |
| "widgets": { | |
| "application/vnd.jupyter.widget-state+json": { | |
| "016fd7a3fff3471c8235b05d5e825378": { | |
| "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": "" | |
| } | |
| }, | |
| "024617caf06745eeb5048bc675721e40": { | |
| "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 | |
| } | |
| }, | |
| "041a636352994ebc870fd076fc6ccd69": { | |
| "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_fdac6f566099458fa038d11e7aa44452", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_1e288dfa575c41f198ca0cb09235a721", | |
| "value": " 15/16 [00:01<00:00, 14.62it/s]" | |
| } | |
| }, | |
| "0484474d43a34dbabf45fa11b3391881": { | |
| "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 | |
| } | |
| }, | |
| "075d17ef882d4194a5ca7127676ed555": { | |
| "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_36b27a2d6d9e429ebf0d5b8394cf48f4", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_17b23beda4c44f5b9c4c7128133caad0", | |
| "value": " 2000/2000 [07:54<00:00, 4.50it/s, loss=0.1299, p_loss=0.1109, n_loss=0.0372, lr=2.06e-04, tok/s=191,949, rssGB=7.82, vramGB=4.01]" | |
| } | |
| }, | |
| "08a1c054d81d4ed08147017c3026fa77": { | |
| "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_8170a2dba6594d7db272ad52436d5a37", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_19421bf7b12c40d6b788792e2914c853", | |
| "value": 16 | |
| } | |
| }, | |
| "09f8dcbd7cc544108e43fead639ce277": { | |
| "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_a45644ce46e44a7abc1cd9d701ae66fc", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_b5033174abbc4eb8871ecaa764231ba7", | |
| "value": "epoch 1: 100%" | |
| } | |
| }, | |
| "0b316a18319644108a1b2f70a5d7fe42": { | |
| "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_26dd110c6ef1424e983a65e551ce366d", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_8132e5f353f1440d808373a2dd6eba00", | |
| "value": " 2000/2000 [07:24<00:00, 4.51it/s, loss=0.1474, p_loss=0.1211, n_loss=0.0411, lr=3.69e-04, tok/s=204,962, rssGB=7.82, vramGB=4.01]" | |
| } | |
| }, | |
| "0b4f70bbdc134e81bc171bc3b1238ea4": { | |
| "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 | |
| } | |
| }, | |
| "0c1c65ee7a00442e9308b466a8f4cbaf": { | |
| "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 | |
| } | |
| }, | |
| "0e9bf51ddbdb413e9d36188189fdc4a0": { | |
| "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_74e7a58d3f1940a884654e645f31485f", | |
| "IPY_MODEL_1c690038190544bea9bdf78da69c9468", | |
| "IPY_MODEL_20e07c941a69499581b6f3be98867f59" | |
| ], | |
| "layout": "IPY_MODEL_330c414a44824bda8af6e728e91e1fc9" | |
| } | |
| }, | |
| "0fa52099c0b747d391e0147c765c6039": { | |
| "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_4a970046e4de4718931d2bbe1142d8cd", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_dca5f404bf0c4602917e147a0888a5f0", | |
| "value": " 15/16 [00:01<00:00, 14.76it/s]" | |
| } | |
| }, | |
| "12ca3b0daaba42f9b6533359fdeefabc": { | |
| "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": "" | |
| } | |
| }, | |
| "1366eed9abb54d1e8344833e3279adf1": { | |
| "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 | |
| } | |
| }, | |
| "13cd0dfa941d4e438b70aab28e5d4b16": { | |
| "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 | |
| } | |
| }, | |
| "1410828c0f53465db662f06761c3e516": { | |
| "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_b02dac4c47d847079d038a86970f5604", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_69af44e6425a47c691d2218df10ede98", | |
| "value": "eval: 94%" | |
| } | |
| }, | |
| "1473f532e6d94ae496cf13a61130644d": { | |
| "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": "" | |
| } | |
| }, | |
| "1566aaff7a8c4e119103f8f76b4afb70": { | |
| "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": "" | |
| } | |
| }, | |
| "167fc03b177e4db39b2f93b80a5cc4ff": { | |
| "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": "" | |
| } | |
| }, | |
| "17b23beda4c44f5b9c4c7128133caad0": { | |
| "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": "" | |
| } | |
| }, | |
| "180f3d66814d4888a7f1cfa5d5efd683": { | |
| "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_aab889a6f5114d15a1572b4a96de6434", | |
| "IPY_MODEL_08a1c054d81d4ed08147017c3026fa77", | |
| "IPY_MODEL_49b8fe32e5f84104a9fcb9e32ac1ee21" | |
| ], | |
| "layout": "IPY_MODEL_a42f75516bbb47ed9290bb4a3c75379c" | |
| } | |
| }, | |
| "19421bf7b12c40d6b788792e2914c853": { | |
| "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": "" | |
| } | |
| }, | |
| "1a499ab336df4bc8a04b70d3527a4af6": { | |
| "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 | |
| } | |
| }, | |
| "1a81cd63f93c4c3ebd62901ab77ecdfe": { | |
| "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_3e00d721c53243489a2ae9c751d78177", | |
| "IPY_MODEL_aefaeeee1ba5490d921955a897f9541c", | |
| "IPY_MODEL_c212d6d4cbea43fa97694baed3630c3a" | |
| ], | |
| "layout": "IPY_MODEL_1d1f2a148d2d4d57b5ef27e224059361" | |
| } | |
| }, | |
| "1c690038190544bea9bdf78da69c9468": { | |
| "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_8180d73c32374a7586b1b20abb63184a", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_5840cd0e7a404fecbbb400e1cff8c4dd", | |
| "value": 16 | |
| } | |
| }, | |
| "1d1f2a148d2d4d57b5ef27e224059361": { | |
| "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 | |
| } | |
| }, | |
| "1dfbc9c6dbc7457caed5ddc869bf4869": { | |
| "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 | |
| } | |
| }, | |
| "1e288dfa575c41f198ca0cb09235a721": { | |
| "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": "" | |
| } | |
| }, | |
| "20e07c941a69499581b6f3be98867f59": { | |
| "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_8d284c20b9bc437390c4acc737829d80", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_be03d3e6a9c4413890f37cd1fca5cb8f", | |
| "value": " 15/16 [00:01<00:00, 14.58it/s]" | |
| } | |
| }, | |
| "211b37cbf7244ec7980442fe844be24a": { | |
| "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_51cfe5d1309e4cabaddc41d90a7ffe59", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_ac8d0e89705c48ae8d2b82fa6fb615e2", | |
| "value": 16 | |
| } | |
| }, | |
| "2137415ed4064c1bb1c69856af0c22b7": { | |
| "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_2e5bebd32d994437a75aab26549aaa64", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_e1cb8d90b9d841c4adb5d2696208c169", | |
| "value": 16 | |
| } | |
| }, | |
| "21e39a7f2fc641f5923f096425ba5fbd": { | |
| "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 | |
| } | |
| }, | |
| "23b4e0c81fd440948571377dea1e8a44": { | |
| "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": "" | |
| } | |
| }, | |
| "26dd110c6ef1424e983a65e551ce366d": { | |
| "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 | |
| } | |
| }, | |
| "27a28b493e2c4942b094dde8151623f4": { | |
| "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": "" | |
| } | |
| }, | |
| "292ea043876d42b2873940f59432731b": { | |
| "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": "" | |
| } | |
| }, | |
| "2a73f10fb6a847a1bb04916a80c8481d": { | |
| "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": "" | |
| } | |
| }, | |
| "2d25ee7b589a4d8bbebe8fee2eea44e6": { | |
| "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": "danger", | |
| "description": "", | |
| "description_tooltip": null, | |
| "layout": "IPY_MODEL_46502c4bb3314c9fa28990e15144c2a0", | |
| "max": 2000, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_23b4e0c81fd440948571377dea1e8a44", | |
| "value": 2000 | |
| } | |
| }, | |
| "2e5bebd32d994437a75aab26549aaa64": { | |
| "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 | |
| } | |
| }, | |
| "30e9a35d9a2c4408997a34419521d652": { | |
| "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_d39f45b7d83a4f2c87b6c957990958aa", | |
| "IPY_MODEL_211b37cbf7244ec7980442fe844be24a", | |
| "IPY_MODEL_ee941a0b8d3a45d58e960c907b64d9b3" | |
| ], | |
| "layout": "IPY_MODEL_6c81a449918d4390943bdcb75f36c839" | |
| } | |
| }, | |
| "32a30d4203e94ca7bdaa9f5cef984e09": { | |
| "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_a38dd16fdb7f4197b965f37a4f68a00b", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_d063aeb7be1149acaa1b7aa181f9bf56", | |
| "value": 16 | |
| } | |
| }, | |
| "330c414a44824bda8af6e728e91e1fc9": { | |
| "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 | |
| } | |
| }, | |
| "36b27a2d6d9e429ebf0d5b8394cf48f4": { | |
| "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 | |
| } | |
| }, | |
| "36c9a51ddc9745029f2de35a79cff975": { | |
| "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": "" | |
| } | |
| }, | |
| "39d94eae6b534d04946f534afc3250ab": { | |
| "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 | |
| } | |
| }, | |
| "3b81f0be353e44e4b01056e9822f009d": { | |
| "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_fefc2eba241e4adfa56ced16e098b6bf", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_6160e0acd5bd405ebf8954b9a4319c56", | |
| "value": "eval: 94%" | |
| } | |
| }, | |
| "3cfe7bfff845466195703171e3eeaa7a": { | |
| "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 | |
| } | |
| }, | |
| "3e00d721c53243489a2ae9c751d78177": { | |
| "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_024617caf06745eeb5048bc675721e40", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_5a32a56b0a7e4479bc4cc76c816e6761", | |
| "value": "threshold search: 94%" | |
| } | |
| }, | |
| "3f67b975573d4cb8b19b5eefbddb06b1": { | |
| "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 | |
| } | |
| }, | |
| "45586a223595426990ea412755f7a7c7": { | |
| "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": "" | |
| } | |
| }, | |
| "45c39f21acff4d78a956956c0984a16e": { | |
| "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_e7e889ec45d64224ab02f5bbe75a1e03", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_6483fb2129c74784b63fd5e955766161", | |
| "value": "threshold search: 94%" | |
| } | |
| }, | |
| "46502c4bb3314c9fa28990e15144c2a0": { | |
| "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 | |
| } | |
| }, | |
| "4776891f42a84f4aafbdbe3f74cd66a2": { | |
| "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_7b7cf83dbd214c6ca29340a376ba0188", | |
| "IPY_MODEL_2137415ed4064c1bb1c69856af0c22b7", | |
| "IPY_MODEL_041a636352994ebc870fd076fc6ccd69" | |
| ], | |
| "layout": "IPY_MODEL_502cb323941b4fa48995979b96e169d3" | |
| } | |
| }, | |
| "49b8fe32e5f84104a9fcb9e32ac1ee21": { | |
| "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_fd0343bc7fbc4c9ea14fefac4f7c4d05", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_8f5d53603f784d19a8756b92a13a8329", | |
| "value": " 15/16 [00:01<00:00, 14.57it/s]" | |
| } | |
| }, | |
| "4a970046e4de4718931d2bbe1142d8cd": { | |
| "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 | |
| } | |
| }, | |
| "4cd16dfccd85470f8f743a8d932a13bf": { | |
| "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": "" | |
| } | |
| }, | |
| "4f0ba045438d47d1a39190b8478053ac": { | |
| "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 | |
| } | |
| }, | |
| "502cb323941b4fa48995979b96e169d3": { | |
| "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 | |
| } | |
| }, | |
| "507e6190c8f24801b6554b99272b6ff6": { | |
| "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 | |
| } | |
| }, | |
| "51cfe5d1309e4cabaddc41d90a7ffe59": { | |
| "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 | |
| } | |
| }, | |
| "554a8cfc16b647a7b6e68a43bb13ef4a": { | |
| "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_21e39a7f2fc641f5923f096425ba5fbd", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_ef7995f9babf447f959df314b89d54a2", | |
| "value": " 2000/2000 [07:24<00:00, 4.51it/s, loss=0.1870, p_loss=0.1531, n_loss=0.0479, lr=4.82e-04, tok/s=204,823, rssGB=7.82, vramGB=4.01]" | |
| } | |
| }, | |
| "5840cd0e7a404fecbbb400e1cff8c4dd": { | |
| "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": "" | |
| } | |
| }, | |
| "5a32a56b0a7e4479bc4cc76c816e6761": { | |
| "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": "" | |
| } | |
| }, | |
| "5c39a8db5353446f9563543e08fa0e64": { | |
| "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_dd3eccb6c46348a69d10948abbf0022d", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_292ea043876d42b2873940f59432731b", | |
| "value": 16 | |
| } | |
| }, | |
| "5ce1a0cd8c7841649d5a82b6712aa20e": { | |
| "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_3b81f0be353e44e4b01056e9822f009d", | |
| "IPY_MODEL_5c39a8db5353446f9563543e08fa0e64", | |
| "IPY_MODEL_c0b0d68c39db415abe7b6c92e250c451" | |
| ], | |
| "layout": "IPY_MODEL_4f0ba045438d47d1a39190b8478053ac" | |
| } | |
| }, | |
| "60c1071ceb3741a78d8f339ca0870b62": { | |
| "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_6da4960dfb5f45e4b7e6af2b416d4060", | |
| "IPY_MODEL_eeca4c0bcacf4b548219af0a8b9e5c2d", | |
| "IPY_MODEL_9f4938e677a04309a230f6a947f8ab6b" | |
| ], | |
| "layout": "IPY_MODEL_0c1c65ee7a00442e9308b466a8f4cbaf" | |
| } | |
| }, | |
| "6160e0acd5bd405ebf8954b9a4319c56": { | |
| "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": "" | |
| } | |
| }, | |
| "625b8b0529d144d2bb35ac65a7943e7d": { | |
| "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_1410828c0f53465db662f06761c3e516", | |
| "IPY_MODEL_a1e63911f34a4eb99e8b143354c73177", | |
| "IPY_MODEL_0fa52099c0b747d391e0147c765c6039" | |
| ], | |
| "layout": "IPY_MODEL_69b78cd662c24edfa08f6b00be37b6a2" | |
| } | |
| }, | |
| "627850b0b6974b8993680eda6227f828": { | |
| "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_45c39f21acff4d78a956956c0984a16e", | |
| "IPY_MODEL_ec5985dd680e432f85bffd2b8e1f1c3c", | |
| "IPY_MODEL_7ab1270e0f0e4af8b1a54353a77ce20d" | |
| ], | |
| "layout": "IPY_MODEL_0484474d43a34dbabf45fa11b3391881" | |
| } | |
| }, | |
| "6483fb2129c74784b63fd5e955766161": { | |
| "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": "" | |
| } | |
| }, | |
| "6668ab0d821e4711bb580d5c7315ed1a": { | |
| "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": "" | |
| } | |
| }, | |
| "69af44e6425a47c691d2218df10ede98": { | |
| "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": "" | |
| } | |
| }, | |
| "69b78cd662c24edfa08f6b00be37b6a2": { | |
| "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 | |
| } | |
| }, | |
| "69c363522b2848959affbe12a20a04cd": { | |
| "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_0b4f70bbdc134e81bc171bc3b1238ea4", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_12ca3b0daaba42f9b6533359fdeefabc", | |
| "value": " 15/16 [00:01<00:00, 14.58it/s]" | |
| } | |
| }, | |
| "6c81a449918d4390943bdcb75f36c839": { | |
| "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 | |
| } | |
| }, | |
| "6d7db29783a848889ecb3bafb116af05": { | |
| "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": "" | |
| } | |
| }, | |
| "6da4960dfb5f45e4b7e6af2b416d4060": { | |
| "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_1366eed9abb54d1e8344833e3279adf1", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_c88a3823c8474771bd96c2c0b28e91bb", | |
| "value": "eval: 94%" | |
| } | |
| }, | |
| "70e92fcc70e34d969ac7722f9ec0882b": { | |
| "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": "" | |
| } | |
| }, | |
| "71b3f6a3bff648138625e12531733a3c": { | |
| "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_1a499ab336df4bc8a04b70d3527a4af6", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_9d5feeb47a614109a5672841ea846978", | |
| "value": "epoch 3: 100%" | |
| } | |
| }, | |
| "74c56cfe7f0f4392b3627cb2c6907057": { | |
| "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": "" | |
| } | |
| }, | |
| "74e7a58d3f1940a884654e645f31485f": { | |
| "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_1dfbc9c6dbc7457caed5ddc869bf4869", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_af58010cf4b6458ca05d2bc75c921a7b", | |
| "value": "threshold search: 94%" | |
| } | |
| }, | |
| "770463e9a2b9465c89c625cf34f28a7a": { | |
| "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_cdbce9ddd5034482b576c633b751356b", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_821ffebb5c6044409920e08051a58c58", | |
| "value": "epoch 4: 100%" | |
| } | |
| }, | |
| "77ab293c0f724ccfb340237e0d4c3e2d": { | |
| "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_13cd0dfa941d4e438b70aab28e5d4b16", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_74c56cfe7f0f4392b3627cb2c6907057", | |
| "value": " 2000/2000 [07:24<00:00, 4.50it/s, loss=0.1187, p_loss=0.1044, n_loss=0.0350, lr=7.16e-05, tok/s=204,819, rssGB=7.82, vramGB=4.01]" | |
| } | |
| }, | |
| "787926cd507e4fdbaa0909cdef6965b1": { | |
| "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 | |
| } | |
| }, | |
| "7a1175be5ea947229f1b446d8bdadca0": { | |
| "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": "" | |
| } | |
| }, | |
| "7ab1270e0f0e4af8b1a54353a77ce20d": { | |
| "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_ee58e1eaab9146ce9a5612db0ed381ae", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_6d7db29783a848889ecb3bafb116af05", | |
| "value": " 15/16 [00:01<00:00, 14.64it/s]" | |
| } | |
| }, | |
| "7b7cf83dbd214c6ca29340a376ba0188": { | |
| "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_7d4b47b3692142279f7082bc7e3a62df", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_45586a223595426990ea412755f7a7c7", | |
| "value": "eval: 94%" | |
| } | |
| }, | |
| "7b95b36d83c44f5cb6d270aaab448883": { | |
| "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 | |
| } | |
| }, | |
| "7d4b47b3692142279f7082bc7e3a62df": { | |
| "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 | |
| } | |
| }, | |
| "7d6932638b67462a92160bdacef39fb6": { | |
| "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_d642239da7dc4df9b26ec5e64e914a3d", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_98850cebbc794eeb990b15db32ab4e96", | |
| "value": "eval: 94%" | |
| } | |
| }, | |
| "8132e5f353f1440d808373a2dd6eba00": { | |
| "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": "" | |
| } | |
| }, | |
| "8170a2dba6594d7db272ad52436d5a37": { | |
| "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 | |
| } | |
| }, | |
| "8180d73c32374a7586b1b20abb63184a": { | |
| "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 | |
| } | |
| }, | |
| "821ffebb5c6044409920e08051a58c58": { | |
| "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": "" | |
| } | |
| }, | |
| "8a0aca6587d34623b6ef752c28ac43bc": { | |
| "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 | |
| } | |
| }, | |
| "8aa3ce282f9241639ce22de6b68bef3c": { | |
| "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": "" | |
| } | |
| }, | |
| "8afb205894df4e94b29b957d204a7aa2": { | |
| "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 | |
| } | |
| }, | |
| "8cd218c09d544e88bd0791469aa6b91e": { | |
| "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_770463e9a2b9465c89c625cf34f28a7a", | |
| "IPY_MODEL_f15b2b9fab4c4693b57f9952ce8ec8b7", | |
| "IPY_MODEL_77ab293c0f724ccfb340237e0d4c3e2d" | |
| ], | |
| "layout": "IPY_MODEL_9549d84184a24d0cb6ce9867f7ddda9d" | |
| } | |
| }, | |
| "8d284c20b9bc437390c4acc737829d80": { | |
| "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 | |
| } | |
| }, | |
| "8f42d0c475ef4c998730c54676dc7571": { | |
| "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 | |
| } | |
| }, | |
| "8f5d53603f784d19a8756b92a13a8329": { | |
| "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": "" | |
| } | |
| }, | |
| "9549d84184a24d0cb6ce9867f7ddda9d": { | |
| "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 | |
| } | |
| }, | |
| "98850cebbc794eeb990b15db32ab4e96": { | |
| "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": "" | |
| } | |
| }, | |
| "9abdd27c6115474886492649d0dc648e": { | |
| "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_71b3f6a3bff648138625e12531733a3c", | |
| "IPY_MODEL_ce34796b31bf4df1bddded3a1f487b9e", | |
| "IPY_MODEL_075d17ef882d4194a5ca7127676ed555" | |
| ], | |
| "layout": "IPY_MODEL_becccdae788f40de81cf7aaa5431beaf" | |
| } | |
| }, | |
| "9d5feeb47a614109a5672841ea846978": { | |
| "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": "" | |
| } | |
| }, | |
| "9f4938e677a04309a230f6a947f8ab6b": { | |
| "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_3cfe7bfff845466195703171e3eeaa7a", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_7a1175be5ea947229f1b446d8bdadca0", | |
| "value": " 15/16 [00:01<00:00, 14.73it/s]" | |
| } | |
| }, | |
| "9f7eabb7ee5d42bd84c1c58f77c8a300": { | |
| "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 | |
| } | |
| }, | |
| "a0f5901d9d494ce4b2c3c3c1fcabd06e": { | |
| "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_09f8dcbd7cc544108e43fead639ce277", | |
| "IPY_MODEL_fd81a797f70a4e5a9043750586774fed", | |
| "IPY_MODEL_554a8cfc16b647a7b6e68a43bb13ef4a" | |
| ], | |
| "layout": "IPY_MODEL_7b95b36d83c44f5cb6d270aaab448883" | |
| } | |
| }, | |
| "a1e63911f34a4eb99e8b143354c73177": { | |
| "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_8afb205894df4e94b29b957d204a7aa2", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_36c9a51ddc9745029f2de35a79cff975", | |
| "value": 16 | |
| } | |
| }, | |
| "a281bb601c514bd9971d7e5c7573f534": { | |
| "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_bbb49fca62f64f219f8623adcb2a703d", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_2a73f10fb6a847a1bb04916a80c8481d", | |
| "value": "epoch 5: 100%" | |
| } | |
| }, | |
| "a38dd16fdb7f4197b965f37a4f68a00b": { | |
| "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 | |
| } | |
| }, | |
| "a416a534366b4539a4ad20edaebca067": { | |
| "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 | |
| } | |
| }, | |
| "a42f75516bbb47ed9290bb4a3c75379c": { | |
| "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 | |
| } | |
| }, | |
| "a45644ce46e44a7abc1cd9d701ae66fc": { | |
| "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 | |
| } | |
| }, | |
| "a749690d6e5e48d4b9d3314e73830487": { | |
| "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_ea346f402476488fb4e199783a6ab1e0", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_e08bfb41a114424f94565f0807c43db4", | |
| "value": "epoch 2: 100%" | |
| } | |
| }, | |
| "a9e0b849a2c549ae890181cd80aa6f89": { | |
| "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 | |
| } | |
| }, | |
| "aab889a6f5114d15a1572b4a96de6434": { | |
| "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_39d94eae6b534d04946f534afc3250ab", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_1566aaff7a8c4e119103f8f76b4afb70", | |
| "value": "threshold search: 94%" | |
| } | |
| }, | |
| "ac8d0e89705c48ae8d2b82fa6fb615e2": { | |
| "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": "" | |
| } | |
| }, | |
| "aea1966bdb2143cca681bf847aab023e": { | |
| "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 | |
| } | |
| }, | |
| "aec866f26d7147c6ad2c9175a3d2f076": { | |
| "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 | |
| } | |
| }, | |
| "aefaeeee1ba5490d921955a897f9541c": { | |
| "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_a416a534366b4539a4ad20edaebca067", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_016fd7a3fff3471c8235b05d5e825378", | |
| "value": 16 | |
| } | |
| }, | |
| "af58010cf4b6458ca05d2bc75c921a7b": { | |
| "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": "" | |
| } | |
| }, | |
| "b02dac4c47d847079d038a86970f5604": { | |
| "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 | |
| } | |
| }, | |
| "b5033174abbc4eb8871ecaa764231ba7": { | |
| "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": "" | |
| } | |
| }, | |
| "bbb49fca62f64f219f8623adcb2a703d": { | |
| "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 | |
| } | |
| }, | |
| "be03d3e6a9c4413890f37cd1fca5cb8f": { | |
| "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": "" | |
| } | |
| }, | |
| "becccdae788f40de81cf7aaa5431beaf": { | |
| "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 | |
| } | |
| }, | |
| "c0b0d68c39db415abe7b6c92e250c451": { | |
| "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_aea1966bdb2143cca681bf847aab023e", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_8aa3ce282f9241639ce22de6b68bef3c", | |
| "value": " 15/16 [00:01<00:00, 14.57it/s]" | |
| } | |
| }, | |
| "c212d6d4cbea43fa97694baed3630c3a": { | |
| "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_c2b5e9ce07db4769ac0f51742d3da924", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_fa9613e7b6cb4ce686d2850d55cb2b2a", | |
| "value": " 15/16 [00:01<00:00, 14.88it/s]" | |
| } | |
| }, | |
| "c2b5e9ce07db4769ac0f51742d3da924": { | |
| "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 | |
| } | |
| }, | |
| "c5c231ac276c496891531cf58b7bb21c": { | |
| "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 | |
| } | |
| }, | |
| "c82b97c7519e45f5b1066be8498d5e8d": { | |
| "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 | |
| } | |
| }, | |
| "c88a3823c8474771bd96c2c0b28e91bb": { | |
| "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": "" | |
| } | |
| }, | |
| "cd3f6fff352a45fd9aa853e95cd2706c": { | |
| "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_a749690d6e5e48d4b9d3314e73830487", | |
| "IPY_MODEL_f49fc60609dc40dd8bc7f82380f70b5a", | |
| "IPY_MODEL_0b316a18319644108a1b2f70a5d7fe42" | |
| ], | |
| "layout": "IPY_MODEL_9f7eabb7ee5d42bd84c1c58f77c8a300" | |
| } | |
| }, | |
| "cdbce9ddd5034482b576c633b751356b": { | |
| "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 | |
| } | |
| }, | |
| "ce34796b31bf4df1bddded3a1f487b9e": { | |
| "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": "danger", | |
| "description": "", | |
| "description_tooltip": null, | |
| "layout": "IPY_MODEL_787926cd507e4fdbaa0909cdef6965b1", | |
| "max": 2000, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_167fc03b177e4db39b2f93b80a5cc4ff", | |
| "value": 2000 | |
| } | |
| }, | |
| "d063aeb7be1149acaa1b7aa181f9bf56": { | |
| "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": "" | |
| } | |
| }, | |
| "d39f45b7d83a4f2c87b6c957990958aa": { | |
| "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_3f67b975573d4cb8b19b5eefbddb06b1", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_4cd16dfccd85470f8f743a8d932a13bf", | |
| "value": "threshold search: 94%" | |
| } | |
| }, | |
| "d578407774bb4d94b9fefc4835a6dd23": { | |
| "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_c82b97c7519e45f5b1066be8498d5e8d", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_d938189dfc30407baa674fb25cfda105", | |
| "value": " 2000/2000 [08:14<00:00, 4.50it/s, loss=0.1128, p_loss=0.0976, n_loss=0.0344, lr=3.14e-05, tok/s=184,309, rssGB=7.84, vramGB=4.01]" | |
| } | |
| }, | |
| "d642239da7dc4df9b26ec5e64e914a3d": { | |
| "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 | |
| } | |
| }, | |
| "d73a3037907e4dc4ace253e3335e56ab": { | |
| "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_a281bb601c514bd9971d7e5c7573f534", | |
| "IPY_MODEL_2d25ee7b589a4d8bbebe8fee2eea44e6", | |
| "IPY_MODEL_d578407774bb4d94b9fefc4835a6dd23" | |
| ], | |
| "layout": "IPY_MODEL_e035a8c273764466a6f3b15500706a99" | |
| } | |
| }, | |
| "d938189dfc30407baa674fb25cfda105": { | |
| "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": "" | |
| } | |
| }, | |
| "dca5f404bf0c4602917e147a0888a5f0": { | |
| "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": "" | |
| } | |
| }, | |
| "dd3eccb6c46348a69d10948abbf0022d": { | |
| "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 | |
| } | |
| }, | |
| "de023f071cb5492191a56e2c534e9218": { | |
| "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": "" | |
| } | |
| }, | |
| "e035a8c273764466a6f3b15500706a99": { | |
| "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 | |
| } | |
| }, | |
| "e08bfb41a114424f94565f0807c43db4": { | |
| "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": "" | |
| } | |
| }, | |
| "e1cb8d90b9d841c4adb5d2696208c169": { | |
| "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": "" | |
| } | |
| }, | |
| "e1d90740ddeb4d4d8b3c6a8fce56d3db": { | |
| "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 | |
| } | |
| }, | |
| "e37050b0a75849588860e86fae4a3de5": { | |
| "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_7d6932638b67462a92160bdacef39fb6", | |
| "IPY_MODEL_32a30d4203e94ca7bdaa9f5cef984e09", | |
| "IPY_MODEL_69c363522b2848959affbe12a20a04cd" | |
| ], | |
| "layout": "IPY_MODEL_a9e0b849a2c549ae890181cd80aa6f89" | |
| } | |
| }, | |
| "e7e889ec45d64224ab02f5bbe75a1e03": { | |
| "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 | |
| } | |
| }, | |
| "ea346f402476488fb4e199783a6ab1e0": { | |
| "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 | |
| } | |
| }, | |
| "ec5985dd680e432f85bffd2b8e1f1c3c": { | |
| "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_e1d90740ddeb4d4d8b3c6a8fce56d3db", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_fbb0d85e685e45c190e7a51919172567", | |
| "value": 16 | |
| } | |
| }, | |
| "ee58e1eaab9146ce9a5612db0ed381ae": { | |
| "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 | |
| } | |
| }, | |
| "ee941a0b8d3a45d58e960c907b64d9b3": { | |
| "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_c5c231ac276c496891531cf58b7bb21c", | |
| "placeholder": "", | |
| "style": "IPY_MODEL_6668ab0d821e4711bb580d5c7315ed1a", | |
| "value": " 15/16 [00:01<00:00, 14.68it/s]" | |
| } | |
| }, | |
| "eeca4c0bcacf4b548219af0a8b9e5c2d": { | |
| "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_507e6190c8f24801b6554b99272b6ff6", | |
| "max": 16, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_de023f071cb5492191a56e2c534e9218", | |
| "value": 16 | |
| } | |
| }, | |
| "ef7995f9babf447f959df314b89d54a2": { | |
| "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": "" | |
| } | |
| }, | |
| "f15b2b9fab4c4693b57f9952ce8ec8b7": { | |
| "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": "danger", | |
| "description": "", | |
| "description_tooltip": null, | |
| "layout": "IPY_MODEL_8f42d0c475ef4c998730c54676dc7571", | |
| "max": 2000, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_1473f532e6d94ae496cf13a61130644d", | |
| "value": 2000 | |
| } | |
| }, | |
| "f49fc60609dc40dd8bc7f82380f70b5a": { | |
| "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": "danger", | |
| "description": "", | |
| "description_tooltip": null, | |
| "layout": "IPY_MODEL_8a0aca6587d34623b6ef752c28ac43bc", | |
| "max": 2000, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_27a28b493e2c4942b094dde8151623f4", | |
| "value": 2000 | |
| } | |
| }, | |
| "fa9613e7b6cb4ce686d2850d55cb2b2a": { | |
| "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": "" | |
| } | |
| }, | |
| "fbb0d85e685e45c190e7a51919172567": { | |
| "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": "" | |
| } | |
| }, | |
| "fd0343bc7fbc4c9ea14fefac4f7c4d05": { | |
| "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 | |
| } | |
| }, | |
| "fd81a797f70a4e5a9043750586774fed": { | |
| "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": "danger", | |
| "description": "", | |
| "description_tooltip": null, | |
| "layout": "IPY_MODEL_aec866f26d7147c6ad2c9175a3d2f076", | |
| "max": 2000, | |
| "min": 0, | |
| "orientation": "horizontal", | |
| "style": "IPY_MODEL_70e92fcc70e34d969ac7722f9ec0882b", | |
| "value": 2000 | |
| } | |
| }, | |
| "fdac6f566099458fa038d11e7aa44452": { | |
| "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 | |
| } | |
| }, | |
| "fefc2eba241e4adfa56ced16e098b6bf": { | |
| "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 | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment