Datasets:
Tags:
Not-For-All-Audiences
Upload Qwen destill.ipynb
Browse files- Qwen destill.ipynb +1 -1
Qwen destill.ipynb
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"cells":[{"cell_type":"code","source":["# ============================= CELL 1: Prepare Latents + Distill 768-dim Text Encoder =============================\n","# @title 1. Process Images β Flux VAE Latents + Distill New 768-dim Text Encoder\n","\n","import os\n","import zipfile\n","import torch\n","import torch.nn as nn\n","import torch.nn.functional as F\n","import numpy as np\n","from google.colab import drive\n","from PIL import Image\n","from tqdm import tqdm\n","from diffusers import AutoencoderKL\n","from transformers import AutoTokenizer, AutoModel\n","from datasets import Dataset as HFDataset\n","from torch.utils.data import Dataset\n","from peft import LoraConfig, get_peft_model\n","from transformers import Trainer, TrainingArguments, set_seed\n","\n","set_seed(42)\n","drive.mount('/content/drive', force_remount=True)\n","\n","zip_path = '/content/drive/MyDrive/my_set.zip' # @param {type:'string'}\n","\n","# ====================== 1. Extract Data ======================\n","print(\"π¦ Extracting zip...\")\n","extract_dir = \"/content/data\"\n","os.makedirs(extract_dir, exist_ok=True)\n","\n","with zipfile.ZipFile(zip_path, 'r') as zip_ref:\n"," zip_ref.extractall(extract_dir)\n","\n","image_files = [f for f in os.listdir(extract_dir) if f.lower().endswith(('.png', '.jpg', '.jpeg', '.webp'))]\n","print(f\"β
Found {len(image_files)} images\")\n","\n","text_files = sorted([f for f in os.listdir(extract_dir) if f.endswith('.txt') and f[0].isdigit()])\n","texts = []\n","for tf in text_files:\n"," with open(os.path.join(extract_dir, tf), \"r\", encoding=\"utf-8\") as f:\n"," content = f.read().strip()\n"," if content:\n"," texts.append(content)\n","\n","print(f\"β
Loaded {len(texts)} captions\")\n","\n","# ====================== 2. Encode Images β Flux VAE Latents ======================\n","print(\"\\nπ Loading Flux VAE and encoding images...\")\n","\n","vae = AutoencoderKL.from_pretrained(\n"," \"black-forest-labs/FLUX.1-dev\",\n"," subfolder=\"vae\",\n"," torch_dtype=torch.float32,\n"," device_map=\"auto\"\n",")\n","vae.eval()\n","\n","latent_dir = \"/content/drive/MyDrive/flux_klein_latents\"\n","os.makedirs(latent_dir, exist_ok=True)\n","\n","with torch.no_grad():\n"," for img_file in tqdm(image_files, desc=\"Encoding to latents\"):\n"," img_path = os.path.join(extract_dir, img_file)\n"," image = Image.open(img_path).convert(\"RGB\").resize((1024, 1024), Image.LANCZOS)\n","\n"," pixel_values = (torch.from_numpy(np.array(image)).permute(2, 0, 1).unsqueeze(0).float() / 255.0)\n"," pixel_values = pixel_values.to(vae.device, dtype=vae.dtype) * 2.0 - 1.0\n","\n"," latents = vae.encode(pixel_values).latent_dist.sample() * vae.config.scaling_factor\n"," latent_name = os.path.splitext(img_file)[0] + \".pt\"\n"," torch.save(latents.cpu(), os.path.join(latent_dir, latent_name))\n","\n","print(f\"β
Latents saved to {latent_dir}\")\n","\n","del vae\n","torch.cuda.empty_cache()\n","\n","# ====================== 3. Distill Text Encoder to 768-dim ======================\n","print(\"\\nπ¨βπ Distilling text encoder to 768-dim...\")\n","\n","teacher_model_name = \"Qwen/Qwen3-Embedding-0.6B\"\n","\n","tokenizer = AutoTokenizer.from_pretrained(teacher_model_name)\n","teacher_model = AutoModel.from_pretrained(\n"," teacher_model_name,\n"," torch_dtype=torch.float16,\n"," device_map=\"auto\",\n"," trust_remote_code=True\n",")\n","teacher_model.eval()\n","\n","# Student model\n","student_model_name = \"Qwen/Qwen2.5-0.5B\"\n","base_student = AutoModel.from_pretrained(\n"," student_model_name, torch_dtype=torch.float32, device_map=\"auto\", trust_remote_code=True\n",")\n","\n","lora_config = LoraConfig(\n"," r=16,\n"," lora_alpha=32,\n"," target_modules=[\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\"],\n"," lora_dropout=0.05,\n"," bias=\"none\",\n"," task_type=\"FEATURE_EXTRACTION\"\n",")\n","student_model = get_peft_model(base_student, lora_config)\n","\n","# Projection to **768** (correct for FLUX.2-klein)\n","projection = nn.Linear(base_student.config.hidden_size, 768).to(\"cuda\")\n","projection.train()\n","\n","hf_dataset = HFDataset.from_dict({\"text\": texts})\n","\n","class DistillationDataset(Dataset):\n"," def __init__(self, hf_dataset, tokenizer, max_length=512):\n"," self.dataset = hf_dataset\n"," self.tokenizer = tokenizer\n"," self.max_length = max_length\n","\n"," def __len__(self): return len(self.dataset)\n","\n"," def __getitem__(self, idx):\n"," text = self.dataset[idx][\"text\"]\n"," inputs = self.tokenizer(text, padding=\"max_length\", truncation=True, max_length=self.max_length, return_tensors=\"pt\")\n"," return {\n"," \"input_ids\": inputs[\"input_ids\"].squeeze(0),\n"," \"attention_mask\": inputs[\"attention_mask\"].squeeze(0),\n"," }\n","\n","distill_dataset = DistillationDataset(hf_dataset, tokenizer)\n","\n","def collate_fn(batch):\n"," return {\n"," \"input_ids\": torch.stack([item[\"input_ids\"] for item in batch]),\n"," \"attention_mask\": torch.stack([item[\"attention_mask\"] for item in batch]),\n"," }\n","\n","# Fixed Distillation Trainer - both teacher and student output 768\n","class DistillTrainer(Trainer):\n"," def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):\n"," # Get batch texts for teacher\n"," batch_size = inputs[\"input_ids\"].shape[0]\n"," batch_texts = [texts[i] for i in range(len(inputs[\"input_ids\"]))] # simplistic indexing\n","\n"," # Teacher embedding (768 dim)\n"," with torch.no_grad():\n"," teacher_inputs = tokenizer(\n"," batch_texts, padding=True, truncation=True, max_length=512, return_tensors=\"pt\"\n"," ).to(teacher_model.device)\n"," teacher_out = teacher_model(**teacher_inputs)\n"," teacher_emb = teacher_out.last_hidden_state.mean(dim=1) # (B, 768) - assuming teacher outputs 768\n","\n"," # Student forward\n"," outputs = model(input_ids=inputs[\"input_ids\"], attention_mask=inputs[\"attention_mask\"])\n"," student_hidden = outputs.last_hidden_state.mean(dim=1)\n"," student_emb = projection(student_hidden) # (B, 768)\n","\n"," # Normalize + loss\n"," student_norm = F.normalize(student_emb, p=2, dim=1)\n"," teacher_norm = F.normalize(teacher_emb.to(student_emb.device), p=2, dim=1)\n","\n"," mse_loss = F.mse_loss(student_norm, teacher_norm)\n"," cos_loss = (1 - F.cosine_similarity(student_norm, teacher_norm, dim=1)).mean()\n"," loss = 0.25 * mse_loss + 0.75 * cos_loss\n","\n"," return (loss, outputs) if return_outputs else loss\n","\n","training_args = TrainingArguments(\n"," output_dir=\"./distilled_qwen_768\",\n"," per_device_train_batch_size=8,\n"," num_train_epochs=30,\n"," learning_rate=2e-4,\n"," fp16=True,\n"," logging_steps=50,\n"," save_strategy=\"no\",\n"," report_to=\"none\",\n"," remove_unused_columns=False,\n",")\n","\n","trainer = DistillTrainer(\n"," model=student_model,\n"," args=training_args,\n"," train_dataset=distill_dataset,\n"," data_collator=collate_fn,\n",")\n","\n","print(\"π Starting distillation to 768-dim...\")\n","trainer.train()\n","\n","# Save\n","distilled_save_dir = \"/content/drive/MyDrive/distilled_qwen_768_for_flux\"\n","os.makedirs(distilled_save_dir, exist_ok=True)\n","student_model.save_pretrained(distilled_save_dir)\n","tokenizer.save_pretrained(distilled_save_dir)\n","torch.save(projection.state_dict(), f\"{distilled_save_dir}/projection.pth\")\n","\n","print(f\"β
New 768-dim distilled encoder saved to {distilled_save_dir}\")\n","torch.cuda.empty_cache()"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"7LStjS1KD8hT","outputId":"14f8d492-054a-411c-da26-7f11307061fe"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n","π¦ Extracting zip...\n","β
Found 250 images\n","β
Loaded 250 captions\n","\n","π Loading Flux VAE and encoding images...\n"]},{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_validators.py:206: UserWarning: The `local_dir_use_symlinks` argument is deprecated and ignored in `hf_hub_download`. Downloading to a local directory does not use symlinks anymore.\n"," warnings.warn(\n","Encoding to latents: 96%|ββββββββββ| 239/250 [04:52<00:13, 1.21s/it]"]}]},{"cell_type":"code","source":["# ============================= CELL 2: Save All Assets to Drive =============================\n","# @title 2. Save Latents + New Distilled Encoder\n","\n","import os\n","import torch\n","\n","print(\"πΎ Saving all assets to Google Drive...\")\n","\n","# Ensure directories exist\n","os.makedirs(\"/content/drive/MyDrive/flux_klein_latents\", exist_ok=True)\n","os.makedirs(\"/content/drive/MyDrive/distilled_qwen_768_for_flux\", exist_ok=True)\n","\n","# Move latents if not already there\n","# (assuming they are already saved in Cell 1)\n","\n","print(\"β
Latents are in /content/drive/MyDrive/flux_klein_latents\")\n","print(\"β
New 768-dim distilled model is in /content/drive/MyDrive/distilled_qwen_768_for_flux\")\n","\n","print(\"\\nπ All data is safely saved on Google Drive.\")\n","print(\" You can now **disconnect and delete the runtime** if you want.\")\n","print(\" Everything needed for training is on Drive.\")\n","print(\" When you come back, start from Cell 3.\")"],"metadata":{"id":"9IGpdiL9BBr6"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# ============================= CELL 3: Install Dependencies & Setup =============================\n","# @title 3. Install Dependencies + Setup Parameters\n","\n","!pip install -q diffusers transformers peft accelerate datasets tqdm\n","\n","import os\n","import torch\n","from google.colab import drive, userdata\n","from transformers import AutoTokenizer, AutoModel\n","from peft import PeftModel\n","import gc\n","\n","drive.mount('/content/drive', force_remount=True)\n","\n","# ====================== Parameters ======================\n","DISTILLED_DIR = \"/content/drive/MyDrive/distilled_qwen_768_for_flux\"\n","LATENT_DIR = \"/content/drive/MyDrive/flux_klein_latents\"\n","FINAL_LORA_DIR = \"/content/drive/MyDrive/flux_klein_lora_final\"\n","\n","BATCH_SIZE = 1 # Keep low for safety\n","NUM_EPOCHS = 8\n","LEARNING_RATE = 1e-4\n","LORA_RANK = 32\n","LORA_ALPHA = 64\n","\n","print(\"β
Dependencies installed and parameters set.\")\n","print(f\" Distilled encoder: {DISTILLED_DIR}\")\n","print(f\" Batch size: {BATCH_SIZE} | Epochs: {NUM_EPOCHS}\")\n","\n","# Optional: quick check\n","print(\"\\nπ Quick VRAM check:\")\n","!nvidia-smi --query-gpu=memory.used,memory.total --format=csv"],"metadata":{"id":"ZZaadi1VBK6Z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# ============================= CELL 4: LoRA Training with Debug Prints =============================\n","# @title 4. LoRA Training β FLUX.2-klein-base-4B + 768-dim Distilled Encoder\n","\n","import torch\n","import torch.nn as nn\n","import torch.nn.functional as F\n","from torch.utils.data import Dataset\n","from tqdm import tqdm\n","from transformers import Trainer, TrainingArguments, set_seed\n","from peft import LoraConfig, get_peft_model\n","from diffusers import FluxTransformer2DModel\n","\n","set_seed(42)\n","\n","print(\"=== CELL 4 START ===\")\n","print(f\"VRAM before anything: {torch.cuda.memory_allocated()/1024**3:.2f} GB\")\n","\n","# ====================== 1. Load Distilled 768-dim Encoder ======================\n","print(\"\\n[DEBUG] Loading distilled 768-dim encoder...\")\n","tokenizer = AutoTokenizer.from_pretrained(DISTILLED_DIR)\n","\n","base_qwen = AutoModel.from_pretrained(\n"," \"Qwen/Qwen2.5-0.5B\", torch_dtype=torch.float32, device_map=\"auto\",\n"," trust_remote_code=True, low_cpu_mem_usage=True\n",")\n","student_model = PeftModel.from_pretrained(base_qwen, DISTILLED_DIR)\n","student_model.eval()\n","\n","projection = nn.Linear(base_qwen.config.hidden_size, 768).to(\"cuda\")\n","projection.load_state_dict(torch.load(f\"{DISTILLED_DIR}/projection.pth\", map_location=\"cuda\"))\n","projection.eval()\n","\n","print(\"[DEBUG] Distilled encoder loaded successfully (target dim 768)\")\n","\n","# ====================== 2. Load Latents & Texts ======================\n","print(\"\\n[DEBUG] Loading texts and latents...\")\n","data = torch.load(\"/content/drive/MyDrive/qwen_embeddings.pt\", weights_only=False) # or your saved texts\n","texts = data[\"texts\"]\n","print(f\"[DEBUG] Loaded {len(texts)} texts\")\n","\n","latent_files = sorted([f for f in os.listdir(LATENT_DIR) if f.endswith(\".pt\")])\n","latents = []\n","for lf in tqdm(latent_files, desc=\"[DEBUG] Loading latents\"):\n"," lat = torch.load(os.path.join(LATENT_DIR, lf), weights_only=False)\n"," if lat.dim() == 4 and lat.shape[0] == 1:\n"," lat = lat.squeeze(0)\n"," latents.append(lat)\n","latents = torch.stack(latents)\n","print(f\"[DEBUG] Loaded latents shape: {latents.shape}\")\n","\n","# Dataset (same as before)\n","class FluxLoRADataset(Dataset):\n"," def __init__(self, latents, texts):\n"," self.latents = latents\n"," self.texts = texts\n"," def __len__(self): return len(self.latents)\n"," def __getitem__(self, idx):\n"," return {\"latent\": self.latents[idx], \"text\": self.texts[idx]}\n","\n","dataset = FluxLoRADataset(latents, texts)\n","\n","def collate_fn(batch):\n"," return {\n"," \"latent\": torch.stack([item[\"latent\"] for item in batch]),\n"," \"texts\": [item[\"text\"] for item in batch]\n"," }\n","\n","# ====================== 3. Load Transformer + LoRA ======================\n","print(\"\\n[DEBUG] Loading FLUX.2-klein-base-4B transformer...\")\n","torch.cuda.empty_cache()\n","\n","transformer = FluxTransformer2DModel.from_pretrained(\n"," \"black-forest-labs/FLUX.2-klein-base-4B\",\n"," subfolder=\"transformer\",\n"," torch_dtype=torch.bfloat16,\n"," low_cpu_mem_usage=False,\n",").to(\"cuda\")\n","\n","print(f\"[DEBUG] Transformer loaded. VRAM now: {torch.cuda.memory_allocated()/1024**3:.2f} GB\")\n","\n","lora_config = LoraConfig(\n"," r=LORA_RANK, lora_alpha=LORA_ALPHA,\n"," target_modules=[\"attn.to_q\", \"attn.to_k\", \"attn.to_v\", \"attn.to_out.0\",\n"," \"attn.to_qkv_mlp_proj\", \"attn.add_q_proj\", \"attn.add_k_proj\",\n"," \"attn.add_v_proj\", \"attn.to_add_out\",\n"," \"ff.linear_in\", \"ff.linear_out\",\n"," \"ff_context.linear_in\", \"ff_context.linear_out\"],\n"," lora_dropout=0.05,\n"," bias=\"none\"\n",")\n","\n","transformer = get_peft_model(transformer, lora_config)\n","transformer.train()\n","\n","print(\"[DEBUG] LoRA applied successfully\")\n","\n","# ====================== 4. Trainer with heavy debug ======================\n","class FluxLoRATrainer(Trainer):\n"," def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):\n"," print(f\"[DEBUG compute_loss] Batch size: {inputs['latent'].shape[0]}\")\n"," latents = inputs[\"latent\"].to(dtype=torch.bfloat16, device=model.device)\n"," raw_texts = inputs[\"texts\"]\n","\n"," text_inputs = tokenizer(raw_texts, padding=True, truncation=True, max_length=512, return_tensors=\"pt\").to(\"cuda\")\n"," print(f\"[DEBUG] Text input shape: {text_inputs['input_ids'].shape}\")\n","\n"," with torch.no_grad():\n"," outputs = student_model(**text_inputs)\n"," hidden = outputs.last_hidden_state.mean(dim=1)\n"," text_emb_768 = projection(hidden).to(dtype=torch.bfloat16)\n"," print(f\"[DEBUG] Projected embedding shape: {text_emb_768.shape}\")\n","\n"," batch_size = latents.shape[0]\n"," timesteps = torch.rand(batch_size, device=latents.device)\n"," noise = torch.randn_like(latents)\n","\n"," noisy_latents = (1 - timesteps.view(-1, 1, 1, 1)) * latents + timesteps.view(-1, 1, 1, 1) * noise\n","\n"," emb_unsqueezed = text_emb_768.unsqueeze(1)\n","\n"," print(f\"[DEBUG] Calling transformer with pooled_projections shape: {text_emb_768.shape}\")\n"," model_output = model(\n"," hidden_states=noisy_latents,\n"," timestep=timesteps * 1000,\n"," encoder_hidden_states=emb_unsqueezed,\n"," pooled_projections=text_emb_768,\n"," return_dict=False\n"," )[0]\n","\n"," target = noise - latents\n"," loss = F.mse_loss(model_output, target)\n","\n"," print(f\"[DEBUG] Loss value: {loss.item():.6f}\")\n"," return (loss, model_output) if return_outputs else loss\n","\n","training_args = TrainingArguments(\n"," output_dir=\"/content/flux_klein_lora\",\n"," per_device_train_batch_size=BATCH_SIZE,\n"," num_train_epochs=NUM_EPOCHS,\n"," learning_rate=LEARNING_RATE,\n"," lr_scheduler_type=\"cosine\",\n"," warmup_steps=50,\n"," bf16=True,\n"," logging_steps=10, # more frequent logs\n"," save_strategy=\"epoch\",\n"," save_total_limit=2,\n"," report_to=\"none\",\n"," remove_unused_columns=False,\n",")\n","\n","trainer = FluxLoRATrainer(\n"," model=transformer,\n"," args=training_args,\n"," train_dataset=dataset,\n"," data_collator=collate_fn,\n",")\n","\n","print(\"\\nπ Starting LoRA training with heavy debug output...\")\n","trainer.train()\n","\n","# Save\n","final_lora_dir = FINAL_LORA_DIR\n","os.makedirs(final_lora_dir, exist_ok=True)\n","transformer.save_pretrained(final_lora_dir)\n","\n","print(f\"\\nβ
Training finished! LoRA saved to {final_lora_dir}\")\n","torch.cuda.empty_cache()"],"metadata":{"id":"XkYfTORjBLUx"},"execution_count":null,"outputs":[]}],"metadata":{"accelerator":"GPU","colab":{"gpuType":"T4","provenance":[],"mount_file_id":"1rORehICZ99xZsrwMfy2w8Jxg6M55d81L","authorship_tag":"ABX9TyNsekxs/AxdrweXR2wp86ZR"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"nbformat":4,"nbformat_minor":0}
|
|
|
|
| 1 |
+
{"cells":[{"cell_type":"code","source":["# ============================= CELL 1: Prepare Latents + Distill Correct 768-dim Text Encoder =============================\n","# @title 1. Full Preparation: Latents + 768-dim Distilled Text Encoder\n","\n","import os\n","import zipfile\n","import torch\n","import torch.nn as nn\n","import torch.nn.functional as F\n","import numpy as np\n","from google.colab import drive\n","from PIL import Image\n","from tqdm import tqdm\n","from diffusers import AutoencoderKL\n","from transformers import AutoTokenizer, AutoModel\n","from datasets import Dataset as HFDataset\n","from torch.utils.data import Dataset\n","from peft import LoraConfig, get_peft_model\n","from transformers import Trainer, TrainingArguments, set_seed\n","\n","set_seed(42)\n","drive.mount('/content/drive', force_remount=True)\n","\n","zip_path = '/content/drive/MyDrive/my_set.zip' # @param {type:'string'}\n","\n","# ====================== 1. Extract Data ======================\n","print(\"π¦ Extracting zip...\")\n","extract_dir = \"/content/data\"\n","os.makedirs(extract_dir, exist_ok=True)\n","\n","with zipfile.ZipFile(zip_path, 'r') as zip_ref:\n"," zip_ref.extractall(extract_dir)\n","\n","image_files = [f for f in os.listdir(extract_dir) if f.lower().endswith(('.png', '.jpg', '.jpeg', '.webp'))]\n","print(f\"β
Found {len(image_files)} images\")\n","\n","text_files = sorted([f for f in os.listdir(extract_dir) if f.endswith('.txt') and f[0].isdigit()])\n","texts = []\n","for tf in text_files:\n"," with open(os.path.join(extract_dir, tf), \"r\", encoding=\"utf-8\") as f:\n"," content = f.read().strip()\n"," if content:\n"," texts.append(content)\n","\n","print(f\"β
Loaded {len(texts)} captions\")\n","\n","# ====================== 2. Encode Images β Flux VAE Latents ======================\n","latent_dir = \"/content/drive/MyDrive/flux_klein_latents\"\n","if os.path.exists(latent_dir) and len(os.listdir(latent_dir)) == len(image_files):\n"," print(f\"β
Using existing latents from {latent_dir}\")\n","else:\n"," print(\"\\nπ Encoding images to Flux VAE latents...\")\n"," vae = AutoencoderKL.from_pretrained(\n"," \"black-forest-labs/FLUX.1-dev\",\n"," subfolder=\"vae\",\n"," torch_dtype=torch.float32,\n"," device_map=\"auto\"\n"," )\n"," vae.eval()\n","\n"," os.makedirs(latent_dir, exist_ok=True)\n","\n"," with torch.no_grad():\n"," for img_file in tqdm(image_files, desc=\"Encoding latents\"):\n"," img_path = os.path.join(extract_dir, img_file)\n"," image = Image.open(img_path).convert(\"RGB\").resize((1024, 1024), Image.LANCZOS)\n","\n"," pixel_values = (torch.from_numpy(np.array(image)).permute(2, 0, 1).unsqueeze(0).float() / 255.0)\n"," pixel_values = pixel_values.to(vae.device, dtype=vae.dtype) * 2.0 - 1.0\n","\n"," latents = vae.encode(pixel_values).latent_dist.sample() * vae.config.scaling_factor\n"," latent_name = os.path.splitext(img_file)[0] + \".pt\"\n"," torch.save(latents.cpu(), os.path.join(latent_dir, latent_name))\n","\n"," del vae\n"," torch.cuda.empty_cache()\n"," print(f\"β
Latents saved to {latent_dir}\")\n","\n","# ====================== 3. Compute & Project Teacher Embeddings to 768 ======================\n","print(\"\\nπ Computing teacher embeddings and projecting to 768-dim...\")\n","\n","teacher_model_name = \"Qwen/Qwen3-Embedding-0.6B\"\n","tokenizer = AutoTokenizer.from_pretrained(teacher_model_name)\n","teacher_model = AutoModel.from_pretrained(\n"," teacher_model_name,\n"," torch_dtype=torch.float16,\n"," device_map=\"auto\",\n"," trust_remote_code=True\n",")\n","teacher_model.eval()\n","\n","teacher_embeddings_1024 = []\n","with torch.no_grad():\n"," for text in tqdm(texts, desc=\"Teacher encoding\"):\n"," inputs = tokenizer(text, padding=True, truncation=True, max_length=512, return_tensors=\"pt\").to(teacher_model.device)\n"," outputs = teacher_model(**inputs)\n"," emb = outputs.last_hidden_state.mean(dim=1).squeeze(0).cpu()\n"," teacher_embeddings_1024.append(emb)\n","\n","teacher_embeddings_1024 = torch.stack(teacher_embeddings_1024)\n","print(f\"β
Teacher embeddings (1024): {teacher_embeddings_1024.shape}\")\n","\n","# Project teacher to 768-dim (correct target for FLUX.2-klein)\n","teacher_proj = nn.Linear(1024, 768).to(\"cuda\")\n","with torch.no_grad():\n"," teacher_embeddings_768 = teacher_proj(teacher_embeddings_1024.to(\"cuda\")).cpu()\n","\n","print(f\"β
Projected teacher embeddings (768): {teacher_embeddings_768.shape}\")\n","\n","# Save projected teacher embeddings\n","torch.save({\n"," \"embeddings\": teacher_embeddings_768,\n"," \"texts\": texts,\n"," \"dim\": 768\n","}, \"/content/drive/MyDrive/qwen_embeddings_768.pt\")\n","\n","del teacher_model, teacher_proj\n","torch.cuda.empty_cache()\n","\n","# ====================== 4. Distill Student to 768-dim ======================\n","print(\"\\nπ¨βπ Distilling student model to 768-dim...\")\n","\n","student_model_name = \"Qwen/Qwen2.5-0.5B\"\n","base_student = AutoModel.from_pretrained(\n"," student_model_name, torch_dtype=torch.float32, device_map=\"auto\", trust_remote_code=True\n",")\n","\n","lora_config = LoraConfig(\n"," r=16,\n"," lora_alpha=32,\n"," target_modules=[\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\"],\n"," lora_dropout=0.05,\n"," bias=\"none\",\n"," task_type=\"FEATURE_EXTRACTION\"\n",")\n","student_model = get_peft_model(base_student, lora_config)\n","\n","projection = nn.Linear(base_student.config.hidden_size, 768).to(\"cuda\") # Correct dimension\n","projection.train()\n","\n","hf_dataset = HFDataset.from_dict({\"text\": texts})\n","\n","class DistillationDataset(Dataset):\n"," def __init__(self, hf_dataset, tokenizer, teacher_embs, max_length=512):\n"," self.dataset = hf_dataset\n"," self.tokenizer = tokenizer\n"," self.teacher_embs = teacher_embs\n"," self.max_length = max_length\n","\n"," def __len__(self): return len(self.dataset)\n","\n"," def __getitem__(self, idx):\n"," text = self.dataset[idx][\"text\"]\n"," inputs = self.tokenizer(text, padding=\"max_length\", truncation=True, max_length=self.max_length, return_tensors=\"pt\")\n"," return {\n"," \"input_ids\": inputs[\"input_ids\"].squeeze(0),\n"," \"attention_mask\": inputs[\"attention_mask\"].squeeze(0),\n"," \"labels\": self.teacher_embs[idx],\n"," }\n","\n","distill_dataset = DistillationDataset(hf_dataset, tokenizer, teacher_embeddings_768)\n","\n","def collate_fn(batch):\n"," return {\n"," \"input_ids\": torch.stack([item[\"input_ids\"] for item in batch]),\n"," \"attention_mask\": torch.stack([item[\"attention_mask\"] for item in batch]),\n"," \"labels\": torch.stack([item[\"labels\"] for item in batch])\n"," }\n","\n","class DistillTrainer(Trainer):\n"," def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):\n"," labels = inputs.pop(\"labels\").to(\"cuda\") # 768-dim\n","\n"," outputs = model(input_ids=inputs[\"input_ids\"], attention_mask=inputs[\"attention_mask\"])\n"," hidden = outputs.last_hidden_state.mean(dim=1)\n"," student_emb = projection(hidden) # 768-dim\n","\n"," student_norm = F.normalize(student_emb, p=2, dim=1)\n"," teacher_norm = F.normalize(labels, p=2, dim=1)\n","\n"," mse_loss = F.mse_loss(student_norm, teacher_norm)\n"," cos_loss = (1 - F.cosine_similarity(student_norm, teacher_norm, dim=1)).mean()\n"," loss = 0.25 * mse_loss + 0.75 * cos_loss\n","\n"," return (loss, outputs) if return_outputs else loss\n","\n","training_args = TrainingArguments(\n"," output_dir=\"./distilled_qwen_768\",\n"," per_device_train_batch_size=4, # safe for Colab\n"," num_train_epochs=30,\n"," learning_rate=2e-4,\n"," fp16=True,\n"," logging_steps=50,\n"," save_strategy=\"no\",\n"," report_to=\"none\",\n"," remove_unused_columns=False,\n",")\n","\n","trainer = DistillTrainer(\n"," model=student_model,\n"," args=training_args,\n"," train_dataset=distill_dataset,\n"," data_collator=collate_fn,\n",")\n","\n","print(\"π Starting distillation with correct 768-dim targets...\")\n","trainer.train()\n","\n","# ====================== Save Distilled Model ======================\n","distilled_save_dir = \"/content/drive/MyDrive/distilled_qwen_768_for_flux\"\n","os.makedirs(distilled_save_dir, exist_ok=True)\n","\n","student_model.save_pretrained(distilled_save_dir)\n","tokenizer.save_pretrained(distilled_save_dir)\n","torch.save(projection.state_dict(), f\"{distilled_save_dir}/projection.pth\")\n","\n","print(f\"\\nβ
SUCCESS! 768-dim distilled encoder saved to: {distilled_save_dir}\")\n","print(\" Latents are in: /content/drive/MyDrive/flux_klein_latents\")\n","print(\" You can now safely run Cell 2 to save everything and disconnect.\")\n","\n","torch.cuda.empty_cache()"],"metadata":{"id":"oluEkFV0KMXo"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# ============================= CELL 2: Save All Assets to Drive =============================\n","# @title 2. Save Latents + New Distilled Encoder\n","\n","import os\n","import torch\n","\n","print(\"πΎ Saving all assets to Google Drive...\")\n","\n","# Ensure directories exist\n","os.makedirs(\"/content/drive/MyDrive/flux_klein_latents\", exist_ok=True)\n","os.makedirs(\"/content/drive/MyDrive/distilled_qwen_768_for_flux\", exist_ok=True)\n","\n","# Move latents if not already there\n","# (assuming they are already saved in Cell 1)\n","\n","print(\"β
Latents are in /content/drive/MyDrive/flux_klein_latents\")\n","print(\"β
New 768-dim distilled model is in /content/drive/MyDrive/distilled_qwen_768_for_flux\")\n","\n","print(\"\\nπ All data is safely saved on Google Drive.\")\n","print(\" You can now **disconnect and delete the runtime** if you want.\")\n","print(\" Everything needed for training is on Drive.\")\n","print(\" When you come back, start from Cell 3.\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"9IGpdiL9BBr6","executionInfo":{"status":"ok","timestamp":1774999215889,"user_tz":-120,"elapsed":11,"user":{"displayName":"fukU Google","userId":"02763165356193834046"}},"outputId":"28cffe5f-fa50-4572-bd91-c36ed16bd507"},"execution_count":4,"outputs":[{"output_type":"stream","name":"stdout","text":["πΎ Saving all assets to Google Drive...\n","β
Latents are in /content/drive/MyDrive/flux_klein_latents\n","β
New 768-dim distilled model is in /content/drive/MyDrive/distilled_qwen_768_for_flux\n","\n","π All data is safely saved on Google Drive.\n"," You can now **disconnect and delete the runtime** if you want.\n"," Everything needed for training is on Drive.\n"," When you come back, start from Cell 3.\n"]}]},{"cell_type":"markdown","source":["You can disconnect the colab past thispoint. All data from cells 1 and 2 are saved to drive."],"metadata":{"id":"cfshTDIFM5ND"}},{"cell_type":"code","source":["# ============================= CELL 3: Install Dependencies & Setup =============================\n","# @title 3. Install Dependencies + Setup Parameters\n","\n","!pip install -q diffusers transformers peft accelerate datasets tqdm\n","\n","import os\n","import torch\n","from google.colab import drive, userdata\n","from transformers import AutoTokenizer, AutoModel\n","from peft import PeftModel\n","import gc\n","\n","drive.mount('/content/drive', force_remount=True)\n","\n","# ====================== Parameters ======================\n","DISTILLED_DIR = \"/content/drive/MyDrive/distilled_qwen_768_for_flux\"\n","LATENT_DIR = \"/content/drive/MyDrive/flux_klein_latents\"\n","FINAL_LORA_DIR = \"/content/drive/MyDrive/flux_klein_lora_final\"\n","\n","BATCH_SIZE = 1 # Keep low for safety\n","NUM_EPOCHS = 8\n","LEARNING_RATE = 1e-4\n","LORA_RANK = 32\n","LORA_ALPHA = 64\n","\n","print(\"β
Dependencies installed and parameters set.\")\n","print(f\" Distilled encoder: {DISTILLED_DIR}\")\n","print(f\" Batch size: {BATCH_SIZE} | Epochs: {NUM_EPOCHS}\")\n","\n","# Optional: quick check\n","print(\"\\nπ Quick VRAM check:\")\n","!nvidia-smi --query-gpu=memory.used,memory.total --format=csv"],"metadata":{"id":"ZZaadi1VBK6Z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# ============================= CELL 4: LoRA Training with Debug Prints =============================\n","# @title 4. LoRA Training β FLUX.2-klein-base-4B + 768-dim Distilled Encoder\n","\n","import torch\n","import torch.nn as nn\n","import torch.nn.functional as F\n","from torch.utils.data import Dataset\n","from tqdm import tqdm\n","from transformers import Trainer, TrainingArguments, set_seed\n","from peft import LoraConfig, get_peft_model\n","from diffusers import FluxTransformer2DModel\n","\n","set_seed(42)\n","\n","print(\"=== CELL 4 START ===\")\n","print(f\"VRAM before anything: {torch.cuda.memory_allocated()/1024**3:.2f} GB\")\n","\n","# ====================== 1. Load Distilled 768-dim Encoder ======================\n","print(\"\\n[DEBUG] Loading distilled 768-dim encoder...\")\n","tokenizer = AutoTokenizer.from_pretrained(DISTILLED_DIR)\n","\n","base_qwen = AutoModel.from_pretrained(\n"," \"Qwen/Qwen2.5-0.5B\", torch_dtype=torch.float32, device_map=\"auto\",\n"," trust_remote_code=True, low_cpu_mem_usage=True\n",")\n","student_model = PeftModel.from_pretrained(base_qwen, DISTILLED_DIR)\n","student_model.eval()\n","\n","projection = nn.Linear(base_qwen.config.hidden_size, 768).to(\"cuda\")\n","projection.load_state_dict(torch.load(f\"{DISTILLED_DIR}/projection.pth\", map_location=\"cuda\"))\n","projection.eval()\n","\n","print(\"[DEBUG] Distilled encoder loaded successfully (target dim 768)\")\n","\n","# ====================== 2. Load Latents & Texts ======================\n","print(\"\\n[DEBUG] Loading texts and latents...\")\n","data = torch.load(\"/content/drive/MyDrive/qwen_embeddings.pt\", weights_only=False) # or your saved texts\n","texts = data[\"texts\"]\n","print(f\"[DEBUG] Loaded {len(texts)} texts\")\n","\n","latent_files = sorted([f for f in os.listdir(LATENT_DIR) if f.endswith(\".pt\")])\n","latents = []\n","for lf in tqdm(latent_files, desc=\"[DEBUG] Loading latents\"):\n"," lat = torch.load(os.path.join(LATENT_DIR, lf), weights_only=False)\n"," if lat.dim() == 4 and lat.shape[0] == 1:\n"," lat = lat.squeeze(0)\n"," latents.append(lat)\n","latents = torch.stack(latents)\n","print(f\"[DEBUG] Loaded latents shape: {latents.shape}\")\n","\n","# Dataset (same as before)\n","class FluxLoRADataset(Dataset):\n"," def __init__(self, latents, texts):\n"," self.latents = latents\n"," self.texts = texts\n"," def __len__(self): return len(self.latents)\n"," def __getitem__(self, idx):\n"," return {\"latent\": self.latents[idx], \"text\": self.texts[idx]}\n","\n","dataset = FluxLoRADataset(latents, texts)\n","\n","def collate_fn(batch):\n"," return {\n"," \"latent\": torch.stack([item[\"latent\"] for item in batch]),\n"," \"texts\": [item[\"text\"] for item in batch]\n"," }\n","\n","# ====================== 3. Load Transformer + LoRA ======================\n","print(\"\\n[DEBUG] Loading FLUX.2-klein-base-4B transformer...\")\n","torch.cuda.empty_cache()\n","\n","transformer = FluxTransformer2DModel.from_pretrained(\n"," \"black-forest-labs/FLUX.2-klein-base-4B\",\n"," subfolder=\"transformer\",\n"," torch_dtype=torch.bfloat16,\n"," low_cpu_mem_usage=False,\n",").to(\"cuda\")\n","\n","print(f\"[DEBUG] Transformer loaded. VRAM now: {torch.cuda.memory_allocated()/1024**3:.2f} GB\")\n","\n","lora_config = LoraConfig(\n"," r=LORA_RANK, lora_alpha=LORA_ALPHA,\n"," target_modules=[\"attn.to_q\", \"attn.to_k\", \"attn.to_v\", \"attn.to_out.0\",\n"," \"attn.to_qkv_mlp_proj\", \"attn.add_q_proj\", \"attn.add_k_proj\",\n"," \"attn.add_v_proj\", \"attn.to_add_out\",\n"," \"ff.linear_in\", \"ff.linear_out\",\n"," \"ff_context.linear_in\", \"ff_context.linear_out\"],\n"," lora_dropout=0.05,\n"," bias=\"none\"\n",")\n","\n","transformer = get_peft_model(transformer, lora_config)\n","transformer.train()\n","\n","print(\"[DEBUG] LoRA applied successfully\")\n","\n","# ====================== 4. Trainer with heavy debug ======================\n","class FluxLoRATrainer(Trainer):\n"," def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=None):\n"," print(f\"[DEBUG compute_loss] Batch size: {inputs['latent'].shape[0]}\")\n"," latents = inputs[\"latent\"].to(dtype=torch.bfloat16, device=model.device)\n"," raw_texts = inputs[\"texts\"]\n","\n"," text_inputs = tokenizer(raw_texts, padding=True, truncation=True, max_length=512, return_tensors=\"pt\").to(\"cuda\")\n"," print(f\"[DEBUG] Text input shape: {text_inputs['input_ids'].shape}\")\n","\n"," with torch.no_grad():\n"," outputs = student_model(**text_inputs)\n"," hidden = outputs.last_hidden_state.mean(dim=1)\n"," text_emb_768 = projection(hidden).to(dtype=torch.bfloat16)\n"," print(f\"[DEBUG] Projected embedding shape: {text_emb_768.shape}\")\n","\n"," batch_size = latents.shape[0]\n"," timesteps = torch.rand(batch_size, device=latents.device)\n"," noise = torch.randn_like(latents)\n","\n"," noisy_latents = (1 - timesteps.view(-1, 1, 1, 1)) * latents + timesteps.view(-1, 1, 1, 1) * noise\n","\n"," emb_unsqueezed = text_emb_768.unsqueeze(1)\n","\n"," print(f\"[DEBUG] Calling transformer with pooled_projections shape: {text_emb_768.shape}\")\n"," model_output = model(\n"," hidden_states=noisy_latents,\n"," timestep=timesteps * 1000,\n"," encoder_hidden_states=emb_unsqueezed,\n"," pooled_projections=text_emb_768,\n"," return_dict=False\n"," )[0]\n","\n"," target = noise - latents\n"," loss = F.mse_loss(model_output, target)\n","\n"," print(f\"[DEBUG] Loss value: {loss.item():.6f}\")\n"," return (loss, model_output) if return_outputs else loss\n","\n","training_args = TrainingArguments(\n"," output_dir=\"/content/flux_klein_lora\",\n"," per_device_train_batch_size=BATCH_SIZE,\n"," num_train_epochs=NUM_EPOCHS,\n"," learning_rate=LEARNING_RATE,\n"," lr_scheduler_type=\"cosine\",\n"," warmup_steps=50,\n"," bf16=True,\n"," logging_steps=10, # more frequent logs\n"," save_strategy=\"epoch\",\n"," save_total_limit=2,\n"," report_to=\"none\",\n"," remove_unused_columns=False,\n",")\n","\n","trainer = FluxLoRATrainer(\n"," model=transformer,\n"," args=training_args,\n"," train_dataset=dataset,\n"," data_collator=collate_fn,\n",")\n","\n","print(\"\\nπ Starting LoRA training with heavy debug output...\")\n","trainer.train()\n","\n","# Save\n","final_lora_dir = FINAL_LORA_DIR\n","os.makedirs(final_lora_dir, exist_ok=True)\n","transformer.save_pretrained(final_lora_dir)\n","\n","print(f\"\\nβ
Training finished! LoRA saved to {final_lora_dir}\")\n","torch.cuda.empty_cache()"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":467,"referenced_widgets":["f5426f03975f49b2a93f604987c64dc3","d2382d8fc5e5433abad641f819cce43e","8ea05da221a54022825a0381986c8621","0692869e648b434aa481ff49529b7b31","98c2762a0ac4488ebc8bd0dcc53e6fe7","39affee5f9b54cd08d749e9fe46b109b","b78bf2314db94f9fbc036e9c5a91a575","011209a9700b4e4281a4858f399bf228","fdb8f46f6c3243a5b7ea023efdd3dcb3","e4852a656d1a4c17914f1fdf156776f3","055c4accb3e042a8a1f269497e44a8fa","c82bb026aa1441df99b3b7ac245e8612","e613a9e1c6994c4fa9f35a192074b3e9","8ea55b68c5fb4c349d19ac437d6dde74","066168bd3f5b46b0a5ae9cb40be1e4fa","e5532252ec4f4c79b63be14d8e7aea75","28344fb5da7447b299380df82b370875","9e2b781644134a07b5059f9dc58cd44d","8b6c648d448c4b9da3da5548e4c9372c","eedb204240ae4b13abe1fcd29df1c414","c6801c5bb0e64fa0bea1781fe3f09f91","dcb46e33f39e4d8e8873c6ee8e5e7f4b","67f8c39c8c734cb486431e72ad75310e","e683458145154dbf8bcc2908f7a07ae2","f2bd32402ecf412da05d4c9249028fed","eed1688e42c34402bc33421173afcbba","2982ff7c18af4941818dac32709ebb6d","91a05c4b65b1425a8aa196b6e7b5d3e8","e8b52160d70948bc8d1982118312e8a3","493dafb22fb64215ba9a3402a0518103","a5bc9e73a2c84798ba8867c0aab23e15","4fba1d416afc4981bb0523708b375f13","3f866988334a47209b69f4c32386838a","87fc7f4731a6444d82cf9da34833d2f2","bf09a57095e64c108f873f2a5ccda30a","7666863459674bb4991e8e851032e10b","bcc1ced87ece460dac6660998b0a6778","17a5f0546d51484dbe7c90608ba0193a","297443c83ae7418fa3cfe8dc324ab464","481a871f0d684de084eea0e3e839beaa","42f42cb139df4920b8fcd7841d75ddc5","8b6a171afe9f434da21ce3b25bef3c4e","7f9fdb5f1f9a475c8faad5cc64753f9d","532afd6199f14dcd97387265c0f19725","1c5e32b4c9804fd09f0dd74c38a252da","aa5145cfbeb44d9f9e78ea02c98d994e","77216bbf5ded432fa3b2a6e01c77ae7e","9b24cc31084a4d358fac3bf039867949","4ca8823cab464d889aeef2905d232a36","99fca8c1e87a4c1182d5f0618ca1f3d5","6bba194b06c842b1bff912422e2b3b0d","85b2c2e86a9b43f5853f331990648e7a","5ebff3cbf8434dc19465f8d661048fdc","22a8a0da10434cd58c70ea0f033349da","853e82961ecd49cd91ce2dea6faaf65e"]},"id":"XkYfTORjBLUx","outputId":"e8da5c02-753d-4209-9047-a122982aaa73"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["=== CELL 4 START ===\n","VRAM before anything: 0.00 GB\n","\n","[DEBUG] Loading distilled 768-dim encoder...\n"]},{"output_type":"display_data","data":{"text/plain":["config.json: 0%| | 0.00/681 [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"f5426f03975f49b2a93f604987c64dc3"}},"metadata":{}},{"output_type":"stream","name":"stderr","text":["`torch_dtype` is deprecated! Use `dtype` instead!\n"]},{"output_type":"display_data","data":{"text/plain":["model.safetensors: 0%| | 0.00/988M [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"c82bb026aa1441df99b3b7ac245e8612"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Loading weights: 0%| | 0/290 [00:00<?, ?it/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"67f8c39c8c734cb486431e72ad75310e"}},"metadata":{}},{"output_type":"stream","name":"stdout","text":["[DEBUG] Distilled encoder loaded successfully (target dim 768)\n","\n","[DEBUG] Loading texts and latents...\n","[DEBUG] Loaded 250 texts\n"]},{"output_type":"stream","name":"stderr","text":["[DEBUG] Loading latents: 100%|ββββββββββ| 250/250 [00:09<00:00, 26.61it/s]\n","/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_validators.py:206: UserWarning: The `local_dir_use_symlinks` argument is deprecated and ignored in `hf_hub_download`. Downloading to a local directory does not use symlinks anymore.\n"," warnings.warn(\n"]},{"output_type":"stream","name":"stdout","text":["[DEBUG] Loaded latents shape: torch.Size([250, 16, 128, 128])\n","\n","[DEBUG] Loading FLUX.2-klein-base-4B transformer...\n"]},{"output_type":"display_data","data":{"text/plain":["config.json: 0%| | 0.00/531 [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"87fc7f4731a6444d82cf9da34833d2f2"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["transformer/diffusion_pytorch_model.safe(β¦): 0%| | 0.00/7.75G [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"1c5e32b4c9804fd09f0dd74c38a252da"}},"metadata":{}}]}],"metadata":{"accelerator":"GPU","colab":{"gpuType":"T4","provenance":[],"mount_file_id":"1rORehICZ99xZsrwMfy2w8Jxg6M55d81L","authorship_tag":"ABX9TyODit8fd+zrSzasj61+l12L"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"},"widgets":{"application/vnd.jupyter.widget-state+json":{"f5426f03975f49b2a93f604987c64dc3":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_d2382d8fc5e5433abad641f819cce43e","IPY_MODEL_8ea05da221a54022825a0381986c8621","IPY_MODEL_0692869e648b434aa481ff49529b7b31"],"layout":"IPY_MODEL_98c2762a0ac4488ebc8bd0dcc53e6fe7"}},"d2382d8fc5e5433abad641f819cce43e":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_39affee5f9b54cd08d749e9fe46b109b","placeholder":"β","style":"IPY_MODEL_b78bf2314db94f9fbc036e9c5a91a575","value":"config.json:β100%"}},"8ea05da221a54022825a0381986c8621":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_011209a9700b4e4281a4858f399bf228","max":681,"min":0,"orientation":"horizontal","style":"IPY_MODEL_fdb8f46f6c3243a5b7ea023efdd3dcb3","value":681}},"0692869e648b434aa481ff49529b7b31":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_e4852a656d1a4c17914f1fdf156776f3","placeholder":"β","style":"IPY_MODEL_055c4accb3e042a8a1f269497e44a8fa","value":"β681/681β[00:00<00:00,β37.5kB/s]"}},"98c2762a0ac4488ebc8bd0dcc53e6fe7":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"39affee5f9b54cd08d749e9fe46b109b":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b78bf2314db94f9fbc036e9c5a91a575":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"011209a9700b4e4281a4858f399bf228":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"fdb8f46f6c3243a5b7ea023efdd3dcb3":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e4852a656d1a4c17914f1fdf156776f3":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"055c4accb3e042a8a1f269497e44a8fa":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"c82bb026aa1441df99b3b7ac245e8612":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_e613a9e1c6994c4fa9f35a192074b3e9","IPY_MODEL_8ea55b68c5fb4c349d19ac437d6dde74","IPY_MODEL_066168bd3f5b46b0a5ae9cb40be1e4fa"],"layout":"IPY_MODEL_e5532252ec4f4c79b63be14d8e7aea75"}},"e613a9e1c6994c4fa9f35a192074b3e9":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_28344fb5da7447b299380df82b370875","placeholder":"β","style":"IPY_MODEL_9e2b781644134a07b5059f9dc58cd44d","value":"model.safetensors:β100%"}},"8ea55b68c5fb4c349d19ac437d6dde74":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_8b6c648d448c4b9da3da5548e4c9372c","max":988097824,"min":0,"orientation":"horizontal","style":"IPY_MODEL_eedb204240ae4b13abe1fcd29df1c414","value":988097824}},"066168bd3f5b46b0a5ae9cb40be1e4fa":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_c6801c5bb0e64fa0bea1781fe3f09f91","placeholder":"β","style":"IPY_MODEL_dcb46e33f39e4d8e8873c6ee8e5e7f4b","value":"β988M/988Mβ[00:10<00:00,β77.1MB/s]"}},"e5532252ec4f4c79b63be14d8e7aea75":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"28344fb5da7447b299380df82b370875":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9e2b781644134a07b5059f9dc58cd44d":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"8b6c648d448c4b9da3da5548e4c9372c":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"eedb204240ae4b13abe1fcd29df1c414":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"c6801c5bb0e64fa0bea1781fe3f09f91":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"dcb46e33f39e4d8e8873c6ee8e5e7f4b":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"67f8c39c8c734cb486431e72ad75310e":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_e683458145154dbf8bcc2908f7a07ae2","IPY_MODEL_f2bd32402ecf412da05d4c9249028fed","IPY_MODEL_eed1688e42c34402bc33421173afcbba"],"layout":"IPY_MODEL_2982ff7c18af4941818dac32709ebb6d"}},"e683458145154dbf8bcc2908f7a07ae2":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_91a05c4b65b1425a8aa196b6e7b5d3e8","placeholder":"β","style":"IPY_MODEL_e8b52160d70948bc8d1982118312e8a3","value":"Loadingβweights:β100%"}},"f2bd32402ecf412da05d4c9249028fed":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_493dafb22fb64215ba9a3402a0518103","max":290,"min":0,"orientation":"horizontal","style":"IPY_MODEL_a5bc9e73a2c84798ba8867c0aab23e15","value":290}},"eed1688e42c34402bc33421173afcbba":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_4fba1d416afc4981bb0523708b375f13","placeholder":"β","style":"IPY_MODEL_3f866988334a47209b69f4c32386838a","value":"β290/290β[00:03<00:00,β99.05it/s,βMaterializingβparam=norm.weight]"}},"2982ff7c18af4941818dac32709ebb6d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"91a05c4b65b1425a8aa196b6e7b5d3e8":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e8b52160d70948bc8d1982118312e8a3":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"493dafb22fb64215ba9a3402a0518103":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a5bc9e73a2c84798ba8867c0aab23e15":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"4fba1d416afc4981bb0523708b375f13":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"3f866988334a47209b69f4c32386838a":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"87fc7f4731a6444d82cf9da34833d2f2":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_bf09a57095e64c108f873f2a5ccda30a","IPY_MODEL_7666863459674bb4991e8e851032e10b","IPY_MODEL_bcc1ced87ece460dac6660998b0a6778"],"layout":"IPY_MODEL_17a5f0546d51484dbe7c90608ba0193a"}},"bf09a57095e64c108f873f2a5ccda30a":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_297443c83ae7418fa3cfe8dc324ab464","placeholder":"β","style":"IPY_MODEL_481a871f0d684de084eea0e3e839beaa","value":"config.json:β100%"}},"7666863459674bb4991e8e851032e10b":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_42f42cb139df4920b8fcd7841d75ddc5","max":531,"min":0,"orientation":"horizontal","style":"IPY_MODEL_8b6a171afe9f434da21ce3b25bef3c4e","value":531}},"bcc1ced87ece460dac6660998b0a6778":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_7f9fdb5f1f9a475c8faad5cc64753f9d","placeholder":"β","style":"IPY_MODEL_532afd6199f14dcd97387265c0f19725","value":"β531/531β[00:00<00:00,β27.6kB/s]"}},"17a5f0546d51484dbe7c90608ba0193a":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"297443c83ae7418fa3cfe8dc324ab464":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"481a871f0d684de084eea0e3e839beaa":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"42f42cb139df4920b8fcd7841d75ddc5":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"8b6a171afe9f434da21ce3b25bef3c4e":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"7f9fdb5f1f9a475c8faad5cc64753f9d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"532afd6199f14dcd97387265c0f19725":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"1c5e32b4c9804fd09f0dd74c38a252da":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_aa5145cfbeb44d9f9e78ea02c98d994e","IPY_MODEL_77216bbf5ded432fa3b2a6e01c77ae7e","IPY_MODEL_9b24cc31084a4d358fac3bf039867949"],"layout":"IPY_MODEL_4ca8823cab464d889aeef2905d232a36"}},"aa5145cfbeb44d9f9e78ea02c98d994e":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_99fca8c1e87a4c1182d5f0618ca1f3d5","placeholder":"β","style":"IPY_MODEL_6bba194b06c842b1bff912422e2b3b0d","value":"transformer/diffusion_pytorch_model.safe(β¦):ββ10%"}},"77216bbf5ded432fa3b2a6e01c77ae7e":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"","description":"","description_tooltip":null,"layout":"IPY_MODEL_85b2c2e86a9b43f5853f331990648e7a","max":7751109744,"min":0,"orientation":"horizontal","style":"IPY_MODEL_5ebff3cbf8434dc19465f8d661048fdc","value":768000000}},"9b24cc31084a4d358fac3bf039867949":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_22a8a0da10434cd58c70ea0f033349da","placeholder":"β","style":"IPY_MODEL_853e82961ecd49cd91ce2dea6faaf65e","value":"β768M/7.75Gβ[00:23<02:15,β51.6MB/s]"}},"4ca8823cab464d889aeef2905d232a36":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"99fca8c1e87a4c1182d5f0618ca1f3d5":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"6bba194b06c842b1bff912422e2b3b0d":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"85b2c2e86a9b43f5853f331990648e7a":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"5ebff3cbf8434dc19465f8d661048fdc":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"22a8a0da10434cd58c70ea0f033349da":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"853e82961ecd49cd91ce2dea6faaf65e":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}}}}},"nbformat":4,"nbformat_minor":0}
|