Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Pre-release 2023 December version (Mistral, Prelim DPO, WSL, bug fixes) (#16)
Daniel Han6416f235cfdc
diff --git a/README.md b/README.mdindex 4580e831704..9c44e2628de 100644--- a/README.md+++ b/README.md@@ -1,23 +1,25 @@<div class="align-center"><img src="./images/unsloth new logo.png" width="400" /><a href="https://discord.gg/u54VK8m8tk"><img src="./images/Discord.png" width="180"></a>+ <a href="https://colab.research.google.com/drive/1oW55fBmwzCOrBVX66RcpptL3a99qWBxb?usp=sharing"><img src="./images/try live demo green.png" width="130"></a></div>--## 80% faster 50% less memory local QLoRA finetuning+## 2-5x faster 50% less memory local LLM finetuning* Manual autograd engine - hand derived backprop steps.-* QLoRA / LoRA 80% faster, 50% less memory.-* All kernels written in OpenAI's Triton language.+* 2x to 5x faster than QLoRA. 50% less memory usage.+* All kernels written in [OpenAI's Triton](https://openai.com/research/triton) language.* 0% loss in accuracy - no approximation methods - all exact.-* No change of hardware necessary. Supports NVIDIA GPUs since 2018+. CUDA 7.5+. Tesla T4, RTX 20, 30, 40 series, A100, H100s-* Flash Attention support via Xformers.-* Supports 4bit and 16bit LoRA finetuning.+* No change of hardware necessary. Supports NVIDIA GPUs since 2018+. Minimum CUDA Compute Capability 7.0 (V100, T4, Titan V, RTX 20, 30, 40x, A100, H100, L40 etc) [Check your GPU](https://developer.nvidia.com/cuda-gpus)+* [Flash Attention v2](https://github.com/Dao-AILab/flash-attention) support via [Xformers](https://github.com/facebookresearch/xformers).+* **NEW!** Works on **Linux** and **Windows** via WSL.+* **NEW!** Experimental support for [DPO (Direct Preference Optimization)](https://arxiv.org/abs/2305.18290)!+* Supports 4bit and 16bit QLoRA / LoRA finetuning via [bitsandbytes](https://github.com/TimDettmers/bitsandbytes).* Train Slim Orca **fully locally in 260 hours from 1301 hours (5x faster).*** Open source version trains 5x faster or you can check out [Unsloth Pro and Max](https://unsloth.ai/) codepaths for **30x faster training**!<div class="align-center"><img src="./images/Slim Orca 2GPUs.png" width="400" />- <img src="./images/LAION%202GPU.svg" width="400" />+ <img src="./images/LAION 2GPU.png" width="400" /></div>1. Try our Colab examples for [the Alpaca 52K dataset](https://colab.research.google.com/drive/1oW55fBmwzCOrBVX66RcpptL3a99qWBxb?usp=sharing) or [the Slim Orca 518K dataset](https://colab.research.google.com/drive/1VNqLARpE8N8eYwNrUSDoHVjtbR9W0_c7?usp=sharing).@@ -49,7 +51,13 @@ pip install --upgrade --force-reinstall --no-cache-dir torch triton \```Change `cu121` to `cu118` for CUDA version 11.8 or 12.1. Go to https://pytorch.org/ to learn more.-# Alpaca Example+4. If you get errors, try the below first, then go back to step 1:+```+pip install --upgrade pip+```++# Documentation+We support Huggingface's TRL, Trainer, Seq2SeqTrainer or even Pytorch code!```from unsloth import FastLlamaModelimport torch@@ -59,7 +67,7 @@ load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False# Load Llama modelmodel, tokenizer = FastLlamaModel.from_pretrained(- model_name = "unsloth/llama-2-7b", # Supports any llama model+ model_name = "unsloth/llama-2-7b", # Supports any llama model eg meta-llama/Llama-2-7b-hfmax_seq_length = max_seq_length,dtype = dtype,load_in_4bit = load_in_4bit,@@ -80,12 +88,16 @@ model = FastLlamaModel.get_peft_model(max_seq_length = max_seq_length,)-trainer = .... Use Huggingface's Trainer and dataset loading+trainer = .... Use Huggingface's Trainer and dataset loading (TRL, transformers etc)```If you trained a model with Unsloth, we made a cool sticker!!<img src="./images/unsloth made with love.png" width="200" />+# DPO (Direct Preference Optimization) Experimental support+[152334H](https://github.com/152334H) hacked Unsloth to work with DPO via TRL!+1. Hack the model's `config.json` to be llama model. [Example gist](https://gist.github.com/152334H/d8a68b51b83bac008a02e69ecc81d5c1).+2. Use Unsloth for DPO for both base and reference models. [Example gist](https://gist.github.com/152334H/4847f3a8cca12894877e6b30698b0b64).# Future Milestones and limitations1. Support sqrt gradient checkpointing which further slashes memory usage by 25%.@@ -94,6 +106,9 @@ If you trained a model with Unsloth, we made a cool sticker!!# Performance comparisons on 1 Tesla T4 GPU:**Time taken for 1 epoch**+One Tesla T4 on Google Colab+`bsz = 2, ga = 4, max_grad_norm = 0.3, num_train_epochs = 1, seed = 3047, lr = 2e-4, wd = 0.01, optim = "adamw_8bit", schedule = "linear", schedule_steps = 10`+| System | GPU | Alpaca (52K) | LAION OIG (210K) | Open Assistant (10K) | SlimOrca (518K) || --- | --- | --- | --- | --- | --- || Huggingface | 1 T4 | 23h 15m | 56h 28m | 8h 38m | 391h 41m |@@ -113,19 +128,28 @@ If you trained a model with Unsloth, we made a cool sticker!!# Performance comparisons on 2 Tesla T4 GPUs via DDP:**Time taken for 1 epoch**-| System | GPU | Alpaca (52K) | LAION OIG (210K) | Open Assistant (10K) | SlimOrca (518K) |+Two Tesla T4s on Kaggle+`bsz = 2, ga = 4, max_grad_norm = 0.3, num_train_epochs = 1, seed = 3047, lr = 2e-4, wd = 0.01, optim = "adamw_8bit", schedule = "linear", schedule_steps = 10`++| System | GPU | Alpaca (52K) | LAION OIG (210K) | Open Assistant (10K) | SlimOrca (518K) * || --- | --- | --- | --- | --- | --- |-| Huggingface | 2 T4 | 84h 47m | 163h 48m | 30h 51m | 1301h 24m |-| Unsloth Pro | 2 T4 | 3h 20m (25.4x) | 5h 43m (28.7x) | 1h 12m (25.7x) | 71h 40m (18.1x) |-| Unsloth Max | 2 T4 | 3h 4m (27.6x) | 5h 14m (31.3x) | 1h 6m (28.1x) | 54h 20m (23.9x) |+| Huggingface | 2 T4 | 84h 47m | 163h 48m | 30h 51m | 1301h 24m * |+| Unsloth Pro | 2 T4 | 3h 20m (25.4x) | 5h 43m (28.7x) | 1h 12m (25.7x) | 71h 40m (18.1x) * |+| Unsloth Max | 2 T4 | 3h 4m (27.6x) | 5h 14m (31.3x) | 1h 6m (28.1x) | 54h 20m (23.9x) * |**Peak Memory Usage on a Multi GPU System (2 GPUs)**-| System | GPU | Alpaca (52K) | LAION OIG (210K) | Open Assistant (10K) | SlimOrca (518K) |+| System | GPU | Alpaca (52K) | LAION OIG (210K) | Open Assistant (10K) | SlimOrca (518K) * || --- | --- | --- | --- | --- | --- |-| Huggingface | 2 T4 | 8.4GB \| 6GB | 7.2GB \| 5.3GB | 14.3GB \| 6.6GB | 10.9GB \| 5.9GB |-| Unsloth Pro | 2 T4 | 7.7GB \| 4.9GB | 7.5GB \| 4.9GB | 8.5GB \| 4.9GB | 6.2GB \| 4.7GB |-| Unsloth Max | 2 T4 | 10.5GB \| 5GB | 10.6GB \| 5GB | 10.6GB \| 5GB | 10.5GB \| 5GB |+| Huggingface | 2 T4 | 8.4GB \| 6GB | 7.2GB \| 5.3GB | 14.3GB \| 6.6GB | 10.9GB \| 5.9GB * |+| Unsloth Pro | 2 T4 | 7.7GB \| 4.9GB | 7.5GB \| 4.9GB | 8.5GB \| 4.9GB | 6.2GB \| 4.7GB * |+| Unsloth Max | 2 T4 | 10.5GB \| 5GB | 10.6GB \| 5GB | 10.6GB \| 5GB | 10.5GB \| 5GB * |++* Slim Orca `bsz=1` for all benchmarks since `bsz=2` OOMs. We can handle `bsz=2`, but we benchmark it with `bsz=1` for consistency.++### For replication of timings:+* [Huggingface LAION DDP reference implementation](https://www.kaggle.com/code/danielhanchen/huggingface-original-laion-oig) 60 steps on DDP Kaggle 2 Tesla T4 GPUs takes 40 minutes and 46 seconds+* [Unsloth LAION DDP fast implementation](https://www.kaggle.com/code/danielhanchen/unsloth-laion-chip2-kaggle) 60 steps on DDP Kaggle 2 Tesla T4 GPUs - **Unsloth only uses 1 GPU whilst Pro plans use more.** takes 4 minutes and 34 seconds **(8.64x speedup)**# Troubleshooting1. Sometimes `bitsandbytes` or `xformers` does not link properly. Try running:@@ -136,4 +160,8 @@ If you trained a model with Unsloth, we made a cool sticker!!3. If it doesn't install - maybe try updating `pip`.+# Credits+1. [RandomInternetPreson](https://github.com/RandomInternetPreson) for confirming WSL support+2. [152334H](https://github.com/152334H) for experimental DPO support+<img src="./images/unsloth loading page render.png" width="300" />diff --git a/images/Discord.png b/images/Discord.pngindex 00b4d53f78f..e1a0e14a567 100644Binary files a/images/Discord.png and b/images/Discord.png differdiff --git a/images/LAION 2GPU.png b/images/LAION 2GPU.pngnew file mode 100644index 00000000000..d154a526dbaBinary files /dev/null and b/images/LAION 2GPU.png differdiff --git a/images/LAION 2GPU.svg b/images/LAION 2GPU.svgdeleted file mode 100644index 724035676c0..00000000000--- a/images/LAION 2GPU.svg+++ /dev/null@@ -1,1518 +0,0 @@-<?xml version="1.0" encoding="utf-8" standalone="no"?>-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">-<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="720pt" height="432pt" viewBox="0 0 720 432" xmlns="http://www.w3.org/2000/svg" version="1.1">- <metadata>- <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">- <cc:Work>- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>- <dc:date>2023-11-30T13:10:10.501490</dc:date>- <dc:format>image/svg+xml</dc:format>- <dc:creator>- <cc:Agent>- <dc:title>Matplotlib v3.7.1, https://matplotlib.org/</dc:title>- </cc:Agent>- </dc:creator>- </cc:Work>- </rdf:RDF>- </metadata>- <defs>- <style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>- </defs>- <g id="figure_1">- <g id="patch_1">- <path d="M 0 432-L 720 432-L 720 0-L 0 0-L 0 432-z-" style="fill: none"/>- </g>- <g id="axes_1">- <g id="patch_2">- <path d="M 90 384.48-L 648 384.48-L 648 51.84-L 90 51.84-L 90 384.48-z-" style="fill: none"/>- </g>- <g id="patch_3">- <path d="M 90 369.36-L 621.428571 369.36-L 621.428571 305.696842-L 90 305.696842-z-" clip-path="url(#p42f2634aae)" style="fill: #fff4c6; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="patch_4">- <path d="M 90 289.781053-L 202.147218 289.781053-L 202.147218 226.117895-L 90 226.117895-z-" clip-path="url(#p42f2634aae)" style="fill: #f6f9f9; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="patch_5">- <path d="M 90 210.202105-L 108.547009 210.202105-L 108.547009 146.538947-L 90 146.538947-z-" clip-path="url(#p42f2634aae)" style="fill: #d9f4d7; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="patch_6">- <path d="M 90 130.623158-L 106.978894 130.623158-L 106.978894 66.96-L 90 66.96-z-" clip-path="url(#p42f2634aae)" style="fill: #ede1ff; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="matplotlib.axis_1">- <g id="xtick_1">- <g id="line2d_1">- <defs>- <path id="m7f9e7b8ac6" d="M 0 0-L 0 3.5-" style="stroke: #000000; stroke-width: 0.8"/>- </defs>- <g>- <use xlink:href="#m7f9e7b8ac6" x="90" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_1">- <!-- 0 -->- <g transform="translate(86.81875 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-30" d="M 2034 4250-Q 1547 4250 1301 3770-Q 1056 3291 1056 2328-Q 1056 1369 1301 889-Q 1547 409 2034 409-Q 2525 409 2770 889-Q 3016 1369 3016 2328-Q 3016 3291 2770 3770-Q 2525 4250 2034 4250-z-M 2034 4750-Q 2819 4750 3233 4129-Q 3647 3509 3647 2328-Q 3647 1150 3233 529-Q 2819 -91 2034 -91-Q 1250 -91 836 529-Q 422 1150 422 2328-Q 422 3509 836 4129-Q 1250 4750 2034 4750-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-30"/>- </g>- </g>- </g>- <g id="xtick_2">- <g id="line2d_2">- <g>- <use xlink:href="#m7f9e7b8ac6" x="154.887493" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_2">- <!-- 20 -->- <g transform="translate(148.524993 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-32" d="M 1228 531-L 3431 531-L 3431 0-L 469 0-L 469 531-Q 828 903 1448 1529-Q 2069 2156 2228 2338-Q 2531 2678 2651 2914-Q 2772 3150 2772 3378-Q 2772 3750 2511 3984-Q 2250 4219 1831 4219-Q 1534 4219 1204 4116-Q 875 4013 500 3803-L 500 4441-Q 881 4594 1212 4672-Q 1544 4750 1819 4750-Q 2544 4750 2975 4387-Q 3406 4025 3406 3419-Q 3406 3131 3298 2873-Q 3191 2616 2906 2266-Q 2828 2175 2409 1742-Q 1991 1309 1228 531-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-32"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- </g>- </g>- </g>- <g id="xtick_3">- <g id="line2d_3">- <g>- <use xlink:href="#m7f9e7b8ac6" x="219.774987" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_3">- <!-- 40 -->- <g transform="translate(213.412487 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-34" d="M 2419 4116-L 825 1625-L 2419 1625-L 2419 4116-z-M 2253 4666-L 3047 4666-L 3047 1625-L 3713 1625-L 3713 1100-L 3047 1100-L 3047 0-L 2419 0-L 2419 1100-L 313 1100-L 313 1709-L 2253 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-34"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- </g>- </g>- </g>- <g id="xtick_4">- <g id="line2d_4">- <g>- <use xlink:href="#m7f9e7b8ac6" x="284.66248" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_4">- <!-- 60 -->- <g transform="translate(278.29998 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-36" d="M 2113 2584-Q 1688 2584 1439 2293-Q 1191 2003 1191 1497-Q 1191 994 1439 701-Q 1688 409 2113 409-Q 2538 409 2786 701-Q 3034 994 3034 1497-Q 3034 2003 2786 2293-Q 2538 2584 2113 2584-z-M 3366 4563-L 3366 3988-Q 3128 4100 2886 4159-Q 2644 4219 2406 4219-Q 1781 4219 1451 3797-Q 1122 3375 1075 2522-Q 1259 2794 1537 2939-Q 1816 3084 2150 3084-Q 2853 3084 3261 2657-Q 3669 2231 3669 1497-Q 3669 778 3244 343-Q 2819 -91 2113 -91-Q 1303 -91 875 529-Q 447 1150 447 2328-Q 447 3434 972 4092-Q 1497 4750 2381 4750-Q 2619 4750 2861 4703-Q 3103 4656 3366 4563-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-36"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- </g>- </g>- </g>- <g id="xtick_5">- <g id="line2d_5">- <g>- <use xlink:href="#m7f9e7b8ac6" x="349.549974" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_5">- <!-- 80 -->- <g transform="translate(343.187474 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-38" d="M 2034 2216-Q 1584 2216 1326 1975-Q 1069 1734 1069 1313-Q 1069 891 1326 650-Q 1584 409 2034 409-Q 2484 409 2743 651-Q 3003 894 3003 1313-Q 3003 1734 2745 1975-Q 2488 2216 2034 2216-z-M 1403 2484-Q 997 2584 770 2862-Q 544 3141 544 3541-Q 544 4100 942 4425-Q 1341 4750 2034 4750-Q 2731 4750 3128 4425-Q 3525 4100 3525 3541-Q 3525 3141 3298 2862-Q 3072 2584 2669 2484-Q 3125 2378 3379 2068-Q 3634 1759 3634 1313-Q 3634 634 3220 271-Q 2806 -91 2034 -91-Q 1263 -91 848 271-Q 434 634 434 1313-Q 434 1759 690 2068-Q 947 2378 1403 2484-z-M 1172 3481-Q 1172 3119 1398 2916-Q 1625 2713 2034 2713-Q 2441 2713 2670 2916-Q 2900 3119 2900 3481-Q 2900 3844 2670 4047-Q 2441 4250 2034 4250-Q 1625 4250 1398 4047-Q 1172 3844 1172 3481-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-38"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- </g>- </g>- </g>- <g id="xtick_6">- <g id="line2d_6">- <g>- <use xlink:href="#m7f9e7b8ac6" x="414.437467" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_6">- <!-- 100 -->- <g transform="translate(404.893717 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-31" d="M 794 531-L 1825 531-L 1825 4091-L 703 3866-L 703 4441-L 1819 4666-L 2450 4666-L 2450 531-L 3481 531-L 3481 0-L 794 0-L 794 531-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_7">- <g id="line2d_7">- <g>- <use xlink:href="#m7f9e7b8ac6" x="479.324961" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_7">- <!-- 120 -->- <g transform="translate(469.781211 399.078438) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-32" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_8">- <g id="line2d_8">- <g>- <use xlink:href="#m7f9e7b8ac6" x="544.212454" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_8">- <!-- 140 -->- <g transform="translate(534.668704 399.078438) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-34" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_9">- <g id="line2d_9">- <g>- <use xlink:href="#m7f9e7b8ac6" x="609.099948" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_9">- <!-- 160 -->- <g transform="translate(599.556198 399.078438) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-36" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="text_10">- <!-- Time taken (lower is better). * Unsloth Open uses 1 GPU only. -->- <g transform="translate(184.611563 414.27625) scale(0.12 -0.12)">- <defs>- <path id="DejaVuSans-54" d="M -19 4666-L 3928 4666-L 3928 4134-L 2272 4134-L 2272 0-L 1638 0-L 1638 4134-L -19 4134-L -19 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-69" d="M 603 3500-L 1178 3500-L 1178 0-L 603 0-L 603 3500-z-M 603 4863-L 1178 4863-L 1178 4134-L 603 4134-L 603 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6d" d="M 3328 2828-Q 3544 3216 3844 3400-Q 4144 3584 4550 3584-Q 5097 3584 5394 3201-Q 5691 2819 5691 2113-L 5691 0-L 5113 0-L 5113 2094-Q 5113 2597 4934 2840-Q 4756 3084 4391 3084-Q 3944 3084 3684 2787-Q 3425 2491 3425 1978-L 3425 0-L 2847 0-L 2847 2094-Q 2847 2600 2669 2842-Q 2491 3084 2119 3084-Q 1678 3084 1418 2786-Q 1159 2488 1159 1978-L 1159 0-L 581 0-L 581 3500-L 1159 3500-L 1159 2956-Q 1356 3278 1631 3431-Q 1906 3584 2284 3584-Q 2666 3584 2933 3390-Q 3200 3197 3328 2828-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-65" d="M 3597 1894-L 3597 1613-L 953 1613-Q 991 1019 1311 708-Q 1631 397 2203 397-Q 2534 397 2845 478-Q 3156 559 3463 722-L 3463 178-Q 3153 47 2828 -22-Q 2503 -91 2169 -91-Q 1331 -91 842 396-Q 353 884 353 1716-Q 353 2575 817 3079-Q 1281 3584 2069 3584-Q 2775 3584 3186 3129-Q 3597 2675 3597 1894-z-M 3022 2063-Q 3016 2534 2758 2815-Q 2500 3097 2075 3097-Q 1594 3097 1305 2825-Q 1016 2553 972 2059-L 3022 2063-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-20" transform="scale(0.015625)"/>- <path id="DejaVuSans-74" d="M 1172 4494-L 1172 3500-L 2356 3500-L 2356 3053-L 1172 3053-L 1172 1153-Q 1172 725 1289 603-Q 1406 481 1766 481-L 2356 481-L 2356 0-L 1766 0-Q 1100 0 847 248-Q 594 497 594 1153-L 594 3053-L 172 3053-L 172 3500-L 594 3500-L 594 4494-L 1172 4494-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-61" d="M 2194 1759-Q 1497 1759 1228 1600-Q 959 1441 959 1056-Q 959 750 1161 570-Q 1363 391 1709 391-Q 2188 391 2477 730-Q 2766 1069 2766 1631-L 2766 1759-L 2194 1759-z-M 3341 1997-L 3341 0-L 2766 0-L 2766 531-Q 2569 213 2275 61-Q 1981 -91 1556 -91-Q 1019 -91 701 211-Q 384 513 384 1019-Q 384 1609 779 1909-Q 1175 2209 1959 2209-L 2766 2209-L 2766 2266-Q 2766 2663 2505 2880-Q 2244 3097 1772 3097-Q 1472 3097 1187 3025-Q 903 2953 641 2809-L 641 3341-Q 956 3463 1253 3523-Q 1550 3584 1831 3584-Q 2591 3584 2966 3190-Q 3341 2797 3341 1997-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6b" d="M 581 4863-L 1159 4863-L 1159 1991-L 2875 3500-L 3609 3500-L 1753 1863-L 3688 0-L 2938 0-L 1159 1709-L 1159 0-L 581 0-L 581 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6e" d="M 3513 2113-L 3513 0-L 2938 0-L 2938 2094-Q 2938 2591 2744 2837-Q 2550 3084 2163 3084-Q 1697 3084 1428 2787-Q 1159 2491 1159 1978-L 1159 0-L 581 0-L 581 3500-L 1159 3500-L 1159 2956-Q 1366 3272 1645 3428-Q 1925 3584 2291 3584-Q 2894 3584 3203 3211-Q 3513 2838 3513 2113-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-28" d="M 1984 4856-Q 1566 4138 1362 3434-Q 1159 2731 1159 2009-Q 1159 1288 1364 580-Q 1569 -128 1984 -844-L 1484 -844-Q 1016 -109 783 600-Q 550 1309 550 2009-Q 550 2706 781 3412-Q 1013 4119 1484 4856-L 1984 4856-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6c" d="M 603 4863-L 1178 4863-L 1178 0-L 603 0-L 603 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6f" d="M 1959 3097-Q 1497 3097 1228 2736-Q 959 2375 959 1747-Q 959 1119 1226 758-Q 1494 397 1959 397-Q 2419 397 2687 759-Q 2956 1122 2956 1747-Q 2956 2369 2687 2733-Q 2419 3097 1959 3097-z-M 1959 3584-Q 2709 3584 3137 3096-Q 3566 2609 3566 1747-Q 3566 888 3137 398-Q 2709 -91 1959 -91-Q 1206 -91 779 398-Q 353 888 353 1747-Q 353 2609 779 3096-Q 1206 3584 1959 3584-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-77" d="M 269 3500-L 844 3500-L 1563 769-L 2278 3500-L 2956 3500-L 3675 769-L 4391 3500-L 4966 3500-L 4050 0-L 3372 0-L 2619 2869-L 1863 0-L 1184 0-L 269 3500-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-72" d="M 2631 2963-Q 2534 3019 2420 3045-Q 2306 3072 2169 3072-Q 1681 3072 1420 2755-Q 1159 2438 1159 1844-L 1159 0-L 581 0-L 581 3500-L 1159 3500-L 1159 2956-Q 1341 3275 1631 3429-Q 1922 3584 2338 3584-Q 2397 3584 2469 3576-Q 2541 3569 2628 3553-L 2631 2963-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-73" d="M 2834 3397-L 2834 2853-Q 2591 2978 2328 3040-Q 2066 3103 1784 3103-Q 1356 3103 1142 2972-Q 928 2841 928 2578-Q 928 2378 1081 2264-Q 1234 2150 1697 2047-L 1894 2003-Q 2506 1872 2764 1633-Q 3022 1394 3022 966-Q 3022 478 2636 193-Q 2250 -91 1575 -91-Q 1294 -91 989 -36-Q 684 19 347 128-L 347 722-Q 666 556 975 473-Q 1284 391 1588 391-Q 1994 391 2212 530-Q 2431 669 2431 922-Q 2431 1156 2273 1281-Q 2116 1406 1581 1522-L 1381 1569-Q 847 1681 609 1914-Q 372 2147 372 2553-Q 372 3047 722 3315-Q 1072 3584 1716 3584-Q 2034 3584 2315 3537-Q 2597 3491 2834 3397-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-62" d="M 3116 1747-Q 3116 2381 2855 2742-Q 2594 3103 2138 3103-Q 1681 3103 1420 2742-Q 1159 2381 1159 1747-Q 1159 1113 1420 752-Q 1681 391 2138 391-Q 2594 391 2855 752-Q 3116 1113 3116 1747-z-M 1159 2969-Q 1341 3281 1617 3432-Q 1894 3584 2278 3584-Q 2916 3584 3314 3078-Q 3713 2572 3713 1747-Q 3713 922 3314 415-Q 2916 -91 2278 -91-Q 1894 -91 1617 61-Q 1341 213 1159 525-L 1159 0-L 581 0-L 581 4863-L 1159 4863-L 1159 2969-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-29" d="M 513 4856-L 1013 4856-Q 1481 4119 1714 3412-Q 1947 2706 1947 2009-Q 1947 1309 1714 600-Q 1481 -109 1013 -844-L 513 -844-Q 928 -128 1133 580-Q 1338 1288 1338 2009-Q 1338 2731 1133 3434-Q 928 4138 513 4856-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-2e" d="M 684 794-L 1344 794-L 1344 0-L 684 0-L 684 794-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-2a" d="M 3009 3897-L 1888 3291-L 3009 2681-L 2828 2375-L 1778 3009-L 1778 1831-L 1422 1831-L 1422 3009-L 372 2375-L 191 2681-L 1313 3291-L 191 3897-L 372 4206-L 1422 3572-L 1422 4750-L 1778 4750-L 1778 3572-L 2828 4206-L 3009 3897-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-55" d="M 556 4666-L 1191 4666-L 1191 1831-Q 1191 1081 1462 751-Q 1734 422 2344 422-Q 2950 422 3222 751-Q 3494 1081 3494 1831-L 3494 4666-L 4128 4666-L 4128 1753-Q 4128 841 3676 375-Q 3225 -91 2344 -91-Q 1459 -91 1007 375-Q 556 841 556 1753-L 556 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-68" d="M 3513 2113-L 3513 0-L 2938 0-L 2938 2094-Q 2938 2591 2744 2837-Q 2550 3084 2163 3084-Q 1697 3084 1428 2787-Q 1159 2491 1159 1978-L 1159 0-L 581 0-L 581 4863-L 1159 4863-L 1159 2956-Q 1366 3272 1645 3428-Q 1925 3584 2291 3584-Q 2894 3584 3203 3211-Q 3513 2838 3513 2113-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-4f" d="M 2522 4238-Q 1834 4238 1429 3725-Q 1025 3213 1025 2328-Q 1025 1447 1429 934-Q 1834 422 2522 422-Q 3209 422 3611 934-Q 4013 1447 4013 2328-Q 4013 3213 3611 3725-Q 3209 4238 2522 4238-z-M 2522 4750-Q 3503 4750 4090 4092-Q 4678 3434 4678 2328-Q 4678 1225 4090 567-Q 3503 -91 2522 -91-Q 1538 -91 948 565-Q 359 1222 359 2328-Q 359 3434 948 4092-Q 1538 4750 2522 4750-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-70" d="M 1159 525-L 1159 -1331-L 581 -1331-L 581 3500-L 1159 3500-L 1159 2969-Q 1341 3281 1617 3432-Q 1894 3584 2278 3584-Q 2916 3584 3314 3078-Q 3713 2572 3713 1747-Q 3713 922 3314 415-Q 2916 -91 2278 -91-Q 1894 -91 1617 61-Q 1341 213 1159 525-z-M 3116 1747-Q 3116 2381 2855 2742-Q 2594 3103 2138 3103-Q 1681 3103 1420 2742-Q 1159 2381 1159 1747-Q 1159 1113 1420 752-Q 1681 391 2138 391-Q 2594 391 2855 752-Q 3116 1113 3116 1747-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-75" d="M 544 1381-L 544 3500-L 1119 3500-L 1119 1403-Q 1119 906 1312 657-Q 1506 409 1894 409-Q 2359 409 2629 706-Q 2900 1003 2900 1516-L 2900 3500-L 3475 3500-L 3475 0-L 2900 0-L 2900 538-Q 2691 219 2414 64-Q 2138 -91 1772 -91-Q 1169 -91 856 284-Q 544 659 544 1381-z-M 1991 3584-L 1991 3584-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-47" d="M 3809 666-L 3809 1919-L 2778 1919-L 2778 2438-L 4434 2438-L 4434 434-Q 4069 175 3628 42-Q 3188 -91 2688 -91-Q 1594 -91 976 548-Q 359 1188 359 2328-Q 359 3472 976 4111-Q 1594 4750 2688 4750-Q 3144 4750 3555 4637-Q 3966 4525 4313 4306-L 4313 3634-Q 3963 3931 3569 4081-Q 3175 4231 2741 4231-Q 1884 4231 1454 3753-Q 1025 3275 1025 2328-Q 1025 1384 1454 906-Q 1884 428 2741 428-Q 3075 428 3337 486-Q 3600 544 3809 666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-50" d="M 1259 4147-L 1259 2394-L 2053 2394-Q 2494 2394 2734 2622-Q 2975 2850 2975 3272-Q 2975 3691 2734 3919-Q 2494 4147 2053 4147-L 1259 4147-z-M 628 4666-L 2053 4666-Q 2838 4666 3239 4311-Q 3641 3956 3641 3272-Q 3641 2581 3239 2228-Q 2838 1875 2053 1875-L 1259 1875-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-79" d="M 2059 -325-Q 1816 -950 1584 -1140-Q 1353 -1331 966 -1331-L 506 -1331-L 506 -850-L 844 -850-Q 1081 -850 1212 -737-Q 1344 -625 1503 -206-L 1606 56-L 191 3500-L 800 3500-L 1894 763-L 2988 3500-L 3597 3500-L 2059 -325-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-54"/>- <use xlink:href="#DejaVuSans-69" x="57.958984"/>- <use xlink:href="#DejaVuSans-6d" x="85.742188"/>- <use xlink:href="#DejaVuSans-65" x="183.154297"/>- <use xlink:href="#DejaVuSans-20" x="244.677734"/>- <use xlink:href="#DejaVuSans-74" x="276.464844"/>- <use xlink:href="#DejaVuSans-61" x="315.673828"/>- <use xlink:href="#DejaVuSans-6b" x="376.953125"/>- <use xlink:href="#DejaVuSans-65" x="431.238281"/>- <use xlink:href="#DejaVuSans-6e" x="492.761719"/>- <use xlink:href="#DejaVuSans-20" x="556.140625"/>- <use xlink:href="#DejaVuSans-28" x="587.927734"/>- <use xlink:href="#DejaVuSans-6c" x="626.941406"/>- <use xlink:href="#DejaVuSans-6f" x="654.724609"/>- <use xlink:href="#DejaVuSans-77" x="715.90625"/>- <use xlink:href="#DejaVuSans-65" x="797.693359"/>- <use xlink:href="#DejaVuSans-72" x="859.216797"/>- <use xlink:href="#DejaVuSans-20" x="900.330078"/>- <use xlink:href="#DejaVuSans-69" x="932.117188"/>- <use xlink:href="#DejaVuSans-73" x="959.900391"/>- <use xlink:href="#DejaVuSans-20" x="1012"/>- <use xlink:href="#DejaVuSans-62" x="1043.787109"/>- <use xlink:href="#DejaVuSans-65" x="1107.263672"/>- <use xlink:href="#DejaVuSans-74" x="1168.787109"/>- <use xlink:href="#DejaVuSans-74" x="1207.996094"/>- <use xlink:href="#DejaVuSans-65" x="1247.205078"/>- <use xlink:href="#DejaVuSans-72" x="1308.728516"/>- <use xlink:href="#DejaVuSans-29" x="1349.841797"/>- <use xlink:href="#DejaVuSans-2e" x="1388.855469"/>- <use xlink:href="#DejaVuSans-20" x="1420.642578"/>- <use xlink:href="#DejaVuSans-2a" x="1452.429688"/>- <use xlink:href="#DejaVuSans-20" x="1502.429688"/>- <use xlink:href="#DejaVuSans-55" x="1534.216797"/>- <use xlink:href="#DejaVuSans-6e" x="1607.410156"/>- <use xlink:href="#DejaVuSans-73" x="1670.789062"/>- <use xlink:href="#DejaVuSans-6c" x="1722.888672"/>- <use xlink:href="#DejaVuSans-6f" x="1750.671875"/>- <use xlink:href="#DejaVuSans-74" x="1811.853516"/>- <use xlink:href="#DejaVuSans-68" x="1851.0625"/>- <use xlink:href="#DejaVuSans-20" x="1914.441406"/>- <use xlink:href="#DejaVuSans-4f" x="1946.228516"/>- <use xlink:href="#DejaVuSans-70" x="2024.939453"/>- <use xlink:href="#DejaVuSans-65" x="2088.416016"/>- <use xlink:href="#DejaVuSans-6e" x="2149.939453"/>- <use xlink:href="#DejaVuSans-20" x="2213.318359"/>- <use xlink:href="#DejaVuSans-75" x="2245.105469"/>- <use xlink:href="#DejaVuSans-73" x="2308.484375"/>- <use xlink:href="#DejaVuSans-65" x="2360.583984"/>- <use xlink:href="#DejaVuSans-73" x="2422.107422"/>- <use xlink:href="#DejaVuSans-20" x="2474.207031"/>- <use xlink:href="#DejaVuSans-31" x="2505.994141"/>- <use xlink:href="#DejaVuSans-20" x="2569.617188"/>- <use xlink:href="#DejaVuSans-47" x="2601.404297"/>- <use xlink:href="#DejaVuSans-50" x="2678.894531"/>- <use xlink:href="#DejaVuSans-55" x="2739.197266"/>- <use xlink:href="#DejaVuSans-20" x="2812.390625"/>- <use xlink:href="#DejaVuSans-6f" x="2844.177734"/>- <use xlink:href="#DejaVuSans-6e" x="2905.359375"/>- <use xlink:href="#DejaVuSans-6c" x="2968.738281"/>- <use xlink:href="#DejaVuSans-79" x="2996.521484"/>- <use xlink:href="#DejaVuSans-2e" x="3041.451172"/>- </g>- </g>- </g>- <g id="matplotlib.axis_2">- <g id="ytick_1">- <g id="line2d_10">- <defs>- <path id="me3cc6245ad" d="M 0 0-L -3.5 0-" style="stroke: #000000; stroke-width: 0.8"/>- </defs>- <g>- <use xlink:href="#me3cc6245ad" x="90" y="337.528421" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_11">- <!-- Huggingface -->- <g transform="translate(19.68125 341.32764) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-48" d="M 628 4666-L 1259 4666-L 1259 2753-L 3553 2753-L 3553 4666-L 4184 4666-L 4184 0-L 3553 0-L 3553 2222-L 1259 2222-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-67" d="M 2906 1791-Q 2906 2416 2648 2759-Q 2391 3103 1925 3103-Q 1463 3103 1205 2759-Q 947 2416 947 1791-Q 947 1169 1205 825-Q 1463 481 1925 481-Q 2391 481 2648 825-Q 2906 1169 2906 1791-z-M 3481 434-Q 3481 -459 3084 -895-Q 2688 -1331 1869 -1331-Q 1566 -1331 1297 -1286-Q 1028 -1241 775 -1147-L 775 -588-Q 1028 -725 1275 -790-Q 1522 -856 1778 -856-Q 2344 -856 2625 -561-Q 2906 -266 2906 331-L 2906 616-Q 2728 306 2450 153-Q 2172 0 1784 0-Q 1141 0 747 490-Q 353 981 353 1791-Q 353 2603 747 3093-Q 1141 3584 1784 3584-Q 2172 3584 2450 3431-Q 2728 3278 2906 2969-L 2906 3500-L 3481 3500-L 3481 434-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-66" d="M 2375 4863-L 2375 4384-L 1825 4384-Q 1516 4384 1395 4259-Q 1275 4134 1275 3809-L 1275 3500-L 2222 3500-L 2222 3053-L 1275 3053-L 1275 0-L 697 0-L 697 3053-L 147 3053-L 147 3500-L 697 3500-L 697 3744-Q 697 4328 969 4595-Q 1241 4863 1831 4863-L 2375 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-63" d="M 3122 3366-L 3122 2828-Q 2878 2963 2633 3030-Q 2388 3097 2138 3097-Q 1578 3097 1268 2742-Q 959 2388 959 1747-Q 959 1106 1268 751-Q 1578 397 2138 397-Q 2388 397 2633 464-Q 2878 531 3122 666-L 3122 134-Q 2881 22 2623 -34-Q 2366 -91 2075 -91-Q 1284 -91 818 406-Q 353 903 353 1747-Q 353 2603 823 3093-Q 1294 3584 2113 3584-Q 2378 3584 2631 3529-Q 2884 3475 3122 3366-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-48"/>- <use xlink:href="#DejaVuSans-75" x="75.195312"/>- <use xlink:href="#DejaVuSans-67" x="138.574219"/>- <use xlink:href="#DejaVuSans-67" x="202.050781"/>- <use xlink:href="#DejaVuSans-69" x="265.527344"/>- <use xlink:href="#DejaVuSans-6e" x="293.310547"/>- <use xlink:href="#DejaVuSans-67" x="356.689453"/>- <use xlink:href="#DejaVuSans-66" x="420.166016"/>- <use xlink:href="#DejaVuSans-61" x="455.371094"/>- <use xlink:href="#DejaVuSans-63" x="516.650391"/>- <use xlink:href="#DejaVuSans-65" x="571.630859"/>- </g>- </g>- </g>- <g id="ytick_2">- <g id="line2d_11">- <g>- <use xlink:href="#me3cc6245ad" x="90" y="257.949474" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_12">- <!-- Unsloth Open* -->- <g transform="translate(10.090625 261.748692) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-55"/>- <use xlink:href="#DejaVuSans-6e" x="73.193359"/>- <use xlink:href="#DejaVuSans-73" x="136.572266"/>- <use xlink:href="#DejaVuSans-6c" x="188.671875"/>- <use xlink:href="#DejaVuSans-6f" x="216.455078"/>- <use xlink:href="#DejaVuSans-74" x="277.636719"/>- <use xlink:href="#DejaVuSans-68" x="316.845703"/>- <use xlink:href="#DejaVuSans-20" x="380.224609"/>- <use xlink:href="#DejaVuSans-4f" x="412.011719"/>- <use xlink:href="#DejaVuSans-70" x="490.722656"/>- <use xlink:href="#DejaVuSans-65" x="554.199219"/>- <use xlink:href="#DejaVuSans-6e" x="615.722656"/>- <use xlink:href="#DejaVuSans-2a" x="679.101562"/>- </g>- </g>- </g>- <g id="ytick_3">- <g id="line2d_12">- <g>- <use xlink:href="#me3cc6245ad" x="90" y="178.370526" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_13">- <!-- Unsloth Pro -->- <g transform="translate(25.942187 182.169745) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-55"/>- <use xlink:href="#DejaVuSans-6e" x="73.193359"/>- <use xlink:href="#DejaVuSans-73" x="136.572266"/>- <use xlink:href="#DejaVuSans-6c" x="188.671875"/>- <use xlink:href="#DejaVuSans-6f" x="216.455078"/>- <use xlink:href="#DejaVuSans-74" x="277.636719"/>- <use xlink:href="#DejaVuSans-68" x="316.845703"/>- <use xlink:href="#DejaVuSans-20" x="380.224609"/>- <use xlink:href="#DejaVuSans-50" x="412.011719"/>- <use xlink:href="#DejaVuSans-72" x="470.564453"/>- <use xlink:href="#DejaVuSans-6f" x="509.427734"/>- </g>- </g>- </g>- <g id="ytick_4">- <g id="line2d_13">- <g>- <use xlink:href="#me3cc6245ad" x="90" y="98.791579" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_14">- <!-- Unsloth Max -->- <g transform="translate(21.126562 102.590798) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-4d" d="M 628 4666-L 1569 4666-L 2759 1491-L 3956 4666-L 4897 4666-L 4897 0-L 4281 0-L 4281 4097-L 3078 897-L 2444 897-L 1241 4097-L 1241 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-78" d="M 3513 3500-L 2247 1797-L 3578 0-L 2900 0-L 1881 1375-L 863 0-L 184 0-L 1544 1831-L 300 3500-L 978 3500-L 1906 2253-L 2834 3500-L 3513 3500-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-55"/>- <use xlink:href="#DejaVuSans-6e" x="73.193359"/>- <use xlink:href="#DejaVuSans-73" x="136.572266"/>- <use xlink:href="#DejaVuSans-6c" x="188.671875"/>- <use xlink:href="#DejaVuSans-6f" x="216.455078"/>- <use xlink:href="#DejaVuSans-74" x="277.636719"/>- <use xlink:href="#DejaVuSans-68" x="316.845703"/>- <use xlink:href="#DejaVuSans-20" x="380.224609"/>- <use xlink:href="#DejaVuSans-4d" x="412.011719"/>- <use xlink:href="#DejaVuSans-61" x="498.291016"/>- <use xlink:href="#DejaVuSans-78" x="559.570312"/>- </g>- </g>- </g>- </g>- <g id="patch_7">- <path d="M 90 384.48-L 90 51.84-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="patch_8">- <path d="M 648 384.48-L 648 51.84-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="patch_9">- <path d="M 90 384.48-L 648 384.48-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="patch_10">- <path d="M 90 51.84-L 648 51.84-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="text_15">- <!-- 163.80 hrs (1.0X) -->- <g transform="translate(491.653585 340.839671) scale(0.12 -0.12)">- <defs>- <path id="DejaVuSans-33" d="M 2597 2516-Q 3050 2419 3304 2112-Q 3559 1806 3559 1356-Q 3559 666 3084 287-Q 2609 -91 1734 -91-Q 1441 -91 1130 -33-Q 819 25 488 141-L 488 750-Q 750 597 1062 519-Q 1375 441 1716 441-Q 2309 441 2620 675-Q 2931 909 2931 1356-Q 2931 1769 2642 2001-Q 2353 2234 1838 2234-L 1294 2234-L 1294 2753-L 1863 2753-Q 2328 2753 2575 2939-Q 2822 3125 2822 3475-Q 2822 3834 2567 4026-Q 2313 4219 1838 4219-Q 1578 4219 1281 4162-Q 984 4106 628 3988-L 628 4550-Q 988 4650 1302 4700-Q 1616 4750 1894 4750-Q 2613 4750 3031 4423-Q 3450 4097 3450 3541-Q 3450 3153 3228 2886-Q 3006 2619 2597 2516-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-58" d="M 403 4666-L 1081 4666-L 2241 2931-L 3406 4666-L 4084 4666-L 2584 2425-L 4184 0-L 3506 0-L 2194 1984-L 872 0-L 191 0-L 1856 2491-L 403 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-36" x="63.623047"/>- <use xlink:href="#DejaVuSans-33" x="127.246094"/>- <use xlink:href="#DejaVuSans-2e" x="190.869141"/>- <use xlink:href="#DejaVuSans-38" x="222.65625"/>- <use xlink:href="#DejaVuSans-30" x="286.279297"/>- <use xlink:href="#DejaVuSans-20" x="349.902344"/>- <use xlink:href="#DejaVuSans-68" x="381.689453"/>- <use xlink:href="#DejaVuSans-72" x="445.068359"/>- <use xlink:href="#DejaVuSans-73" x="486.181641"/>- <use xlink:href="#DejaVuSans-20" x="538.28125"/>- <use xlink:href="#DejaVuSans-28" x="570.068359"/>- <use xlink:href="#DejaVuSans-31" x="609.082031"/>- <use xlink:href="#DejaVuSans-2e" x="672.705078"/>- <use xlink:href="#DejaVuSans-30" x="704.492188"/>- <use xlink:href="#DejaVuSans-58" x="768.115234"/>- <use xlink:href="#DejaVuSans-29" x="836.621094"/>- </g>- </g>- <g id="text_16">- <!-- 34.57 hrs (4.7X) -->- <g transform="translate(205.391593 261.260724) scale(0.12 -0.12)">- <defs>- <path id="DejaVuSans-35" d="M 691 4666-L 3169 4666-L 3169 4134-L 1269 4134-L 1269 2991-Q 1406 3038 1543 3061-Q 1681 3084 1819 3084-Q 2600 3084 3056 2656-Q 3513 2228 3513 1497-Q 3513 744 3044 326-Q 2575 -91 1722 -91-Q 1428 -91 1123 -41-Q 819 9 494 109-L 494 744-Q 775 591 1075 516-Q 1375 441 1709 441-Q 2250 441 2565 725-Q 2881 1009 2881 1497-Q 2881 1984 2565 2268-Q 2250 2553 1709 2553-Q 1456 2553 1204 2497-Q 953 2441 691 2322-L 691 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-37" d="M 525 4666-L 3525 4666-L 3525 4397-L 1831 0-L 1172 0-L 2766 4134-L 525 4134-L 525 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-33"/>- <use xlink:href="#DejaVuSans-34" x="63.623047"/>- <use xlink:href="#DejaVuSans-2e" x="127.246094"/>- <use xlink:href="#DejaVuSans-35" x="159.033203"/>- <use xlink:href="#DejaVuSans-37" x="222.65625"/>- <use xlink:href="#DejaVuSans-20" x="286.279297"/>- <use xlink:href="#DejaVuSans-68" x="318.066406"/>- <use xlink:href="#DejaVuSans-72" x="381.445312"/>- <use xlink:href="#DejaVuSans-73" x="422.558594"/>- <use xlink:href="#DejaVuSans-20" x="474.658203"/>- <use xlink:href="#DejaVuSans-28" x="506.445312"/>- <use xlink:href="#DejaVuSans-34" x="545.458984"/>- <use xlink:href="#DejaVuSans-2e" x="609.082031"/>- <use xlink:href="#DejaVuSans-37" x="640.869141"/>- <use xlink:href="#DejaVuSans-58" x="704.492188"/>- <use xlink:href="#DejaVuSans-29" x="772.998047"/>- </g>- </g>- <g id="text_17">- <!-- 5.72 hrs (28.7X) -->- <g transform="translate(111.791383 181.681776) scale(0.12 -0.12)">- <use xlink:href="#DejaVuSans-35"/>- <use xlink:href="#DejaVuSans-2e" x="63.623047"/>- <use xlink:href="#DejaVuSans-37" x="95.410156"/>- <use xlink:href="#DejaVuSans-32" x="159.033203"/>- <use xlink:href="#DejaVuSans-20" x="222.65625"/>- <use xlink:href="#DejaVuSans-68" x="254.443359"/>- <use xlink:href="#DejaVuSans-72" x="317.822266"/>- <use xlink:href="#DejaVuSans-73" x="358.935547"/>- <use xlink:href="#DejaVuSans-20" x="411.035156"/>- <use xlink:href="#DejaVuSans-28" x="442.822266"/>- <use xlink:href="#DejaVuSans-32" x="481.835938"/>- <use xlink:href="#DejaVuSans-38" x="545.458984"/>- <use xlink:href="#DejaVuSans-2e" x="609.082031"/>- <use xlink:href="#DejaVuSans-37" x="640.869141"/>- <use xlink:href="#DejaVuSans-58" x="704.492188"/>- <use xlink:href="#DejaVuSans-29" x="772.998047"/>- </g>- </g>- <g id="text_18">- <!-- 5.23 hrs (31.3X) -->- <g transform="translate(110.223269 102.102829) scale(0.12 -0.12)">- <use xlink:href="#DejaVuSans-35"/>- <use xlink:href="#DejaVuSans-2e" x="63.623047"/>- <use xlink:href="#DejaVuSans-32" x="95.410156"/>- <use xlink:href="#DejaVuSans-33" x="159.033203"/>- <use xlink:href="#DejaVuSans-20" x="222.65625"/>- <use xlink:href="#DejaVuSans-68" x="254.443359"/>- <use xlink:href="#DejaVuSans-72" x="317.822266"/>- <use xlink:href="#DejaVuSans-73" x="358.935547"/>- <use xlink:href="#DejaVuSans-20" x="411.035156"/>- <use xlink:href="#DejaVuSans-28" x="442.822266"/>- <use xlink:href="#DejaVuSans-33" x="481.835938"/>- <use xlink:href="#DejaVuSans-31" x="545.458984"/>- <use xlink:href="#DejaVuSans-2e" x="609.082031"/>- <use xlink:href="#DejaVuSans-33" x="640.869141"/>- <use xlink:href="#DejaVuSans-58" x="704.492188"/>- <use xlink:href="#DejaVuSans-29" x="772.998047"/>- </g>- </g>- <g id="text_19">- <!-- LAION Chip2 210K (1 epoch on 2 T4 GPUs DDP) -->- <g transform="translate(178.88375 45.84) scale(0.16 -0.16)">- <defs>- <path id="DejaVuSans-4c" d="M 628 4666-L 1259 4666-L 1259 531-L 3531 531-L 3531 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-41" d="M 2188 4044-L 1331 1722-L 3047 1722-L 2188 4044-z-M 1831 4666-L 2547 4666-L 4325 0-L 3669 0-L 3244 1197-L 1141 1197-L 716 0-L 50 0-L 1831 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-49" d="M 628 4666-L 1259 4666-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-4e" d="M 628 4666-L 1478 4666-L 3547 763-L 3547 4666-L 4159 4666-L 4159 0-L 3309 0-L 1241 3903-L 1241 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-43" d="M 4122 4306-L 4122 3641-Q 3803 3938 3442 4084-Q 3081 4231 2675 4231-Q 1875 4231 1450 3742-Q 1025 3253 1025 2328-Q 1025 1406 1450 917-Q 1875 428 2675 428-Q 3081 428 3442 575-Q 3803 722 4122 1019-L 4122 359-Q 3791 134 3420 21-Q 3050 -91 2638 -91-Q 1578 -91 968 557-Q 359 1206 359 2328-Q 359 3453 968 4101-Q 1578 4750 2638 4750-Q 3056 4750 3426 4639-Q 3797 4528 4122 4306-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-4b" d="M 628 4666-L 1259 4666-L 1259 2694-L 3353 4666-L 4166 4666-L 1850 2491-L 4331 0-L 3500 0-L 1259 2247-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-44" d="M 1259 4147-L 1259 519-L 2022 519-Q 2988 519 3436 956-Q 3884 1394 3884 2338-Q 3884 3275 3436 3711-Q 2988 4147 2022 4147-L 1259 4147-z-M 628 4666-L 1925 4666-Q 3281 4666 3915 4102-Q 4550 3538 4550 2338-Q 4550 1131 3912 565-Q 3275 0 1925 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-4c"/>- <use xlink:href="#DejaVuSans-41" x="57.962891"/>- <use xlink:href="#DejaVuSans-49" x="126.371094"/>- <use xlink:href="#DejaVuSans-4f" x="155.863281"/>- <use xlink:href="#DejaVuSans-4e" x="234.574219"/>- <use xlink:href="#DejaVuSans-20" x="309.378906"/>- <use xlink:href="#DejaVuSans-43" x="341.166016"/>- <use xlink:href="#DejaVuSans-68" x="410.990234"/>- <use xlink:href="#DejaVuSans-69" x="474.369141"/>- <use xlink:href="#DejaVuSans-70" x="502.152344"/>- <use xlink:href="#DejaVuSans-32" x="565.628906"/>- <use xlink:href="#DejaVuSans-20" x="629.251953"/>- <use xlink:href="#DejaVuSans-32" x="661.039062"/>- <use xlink:href="#DejaVuSans-31" x="724.662109"/>- <use xlink:href="#DejaVuSans-30" x="788.285156"/>- <use xlink:href="#DejaVuSans-4b" x="851.908203"/>- <use xlink:href="#DejaVuSans-20" x="917.484375"/>- <use xlink:href="#DejaVuSans-28" x="949.271484"/>- <use xlink:href="#DejaVuSans-31" x="988.285156"/>- <use xlink:href="#DejaVuSans-20" x="1051.908203"/>- <use xlink:href="#DejaVuSans-65" x="1083.695312"/>- <use xlink:href="#DejaVuSans-70" x="1145.21875"/>- <use xlink:href="#DejaVuSans-6f" x="1208.695312"/>- <use xlink:href="#DejaVuSans-63" x="1269.876953"/>- <use xlink:href="#DejaVuSans-68" x="1324.857422"/>- <use xlink:href="#DejaVuSans-20" x="1388.236328"/>- <use xlink:href="#DejaVuSans-6f" x="1420.023438"/>- <use xlink:href="#DejaVuSans-6e" x="1481.205078"/>- <use xlink:href="#DejaVuSans-20" x="1544.583984"/>- <use xlink:href="#DejaVuSans-32" x="1576.371094"/>- <use xlink:href="#DejaVuSans-20" x="1639.994141"/>- <use xlink:href="#DejaVuSans-54" x="1671.78125"/>- <use xlink:href="#DejaVuSans-34" x="1732.865234"/>- <use xlink:href="#DejaVuSans-20" x="1796.488281"/>- <use xlink:href="#DejaVuSans-47" x="1828.275391"/>- <use xlink:href="#DejaVuSans-50" x="1905.765625"/>- <use xlink:href="#DejaVuSans-55" x="1966.068359"/>- <use xlink:href="#DejaVuSans-73" x="2039.261719"/>- <use xlink:href="#DejaVuSans-20" x="2091.361328"/>- <use xlink:href="#DejaVuSans-44" x="2123.148438"/>- <use xlink:href="#DejaVuSans-44" x="2200.150391"/>- <use xlink:href="#DejaVuSans-50" x="2277.152344"/>- <use xlink:href="#DejaVuSans-29" x="2337.455078"/>- </g>- </g>- </g>- </g>- <defs>- <clipPath id="p42f2634aae">- <rect x="90" y="51.84" width="558" height="332.64"/>- </clipPath>- </defs>-</svg>diff --git a/images/SlimOrca 1GPU.svg b/images/SlimOrca 1GPU.svgdeleted file mode 100644index a7861f7ad58..00000000000--- a/images/SlimOrca 1GPU.svg+++ /dev/null@@ -1,1424 +0,0 @@-<?xml version="1.0" encoding="utf-8" standalone="no"?>-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">-<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="720pt" height="432pt" viewBox="0 0 720 432" xmlns="http://www.w3.org/2000/svg" version="1.1">- <metadata>- <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">- <cc:Work>- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>- <dc:date>2023-11-30T13:15:28.212061</dc:date>- <dc:format>image/svg+xml</dc:format>- <dc:creator>- <cc:Agent>- <dc:title>Matplotlib v3.7.1, https://matplotlib.org/</dc:title>- </cc:Agent>- </dc:creator>- </cc:Work>- </rdf:RDF>- </metadata>- <defs>- <style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>- </defs>- <g id="figure_1">- <g id="patch_1">- <path d="M 0 432-L 720 432-L 720 0-L 0 0-L 0 432-z-" style="fill: none"/>- </g>- <g id="axes_1">- <g id="patch_2">- <path d="M 90 384.48-L 648 384.48-L 648 51.84-L 90 51.84-L 90 384.48-z-" style="fill: none"/>- </g>- <g id="patch_3">- <path d="M 90 369.36-L 621.428571 369.36-L 621.428571 305.696842-L 90 305.696842-z-" clip-path="url(#p682a0e8bed)" style="fill: #fff4c6; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="patch_4">- <path d="M 90 289.781053-L 415.717933 289.781053-L 415.717933 226.117895-L 90 226.117895-z-" clip-path="url(#p682a0e8bed)" style="fill: #f6f9f9; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="patch_5">- <path d="M 90 210.202105-L 287.004626 210.202105-L 287.004626 146.538947-L 90 146.538947-z-" clip-path="url(#p682a0e8bed)" style="fill: #d9f4d7; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="patch_6">- <path d="M 90 130.623158-L 159.87423 130.623158-L 159.87423 66.96-L 90 66.96-z-" clip-path="url(#p682a0e8bed)" style="fill: #ede1ff; stroke: #000000; stroke-width: 0.5; stroke-linejoin: miter"/>- </g>- <g id="matplotlib.axis_1">- <g id="xtick_1">- <g id="line2d_1">- <defs>- <path id="m7e152711a6" d="M 0 0-L 0 3.5-" style="stroke: #000000; stroke-width: 0.8"/>- </defs>- <g>- <use xlink:href="#m7e152711a6" x="90" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_1">- <!-- 0 -->- <g transform="translate(86.81875 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-30" d="M 2034 4250-Q 1547 4250 1301 3770-Q 1056 3291 1056 2328-Q 1056 1369 1301 889-Q 1547 409 2034 409-Q 2525 409 2770 889-Q 3016 1369 3016 2328-Q 3016 3291 2770 3770-Q 2525 4250 2034 4250-z-M 2034 4750-Q 2819 4750 3233 4129-Q 3647 3509 3647 2328-Q 3647 1150 3233 529-Q 2819 -91 2034 -91-Q 1250 -91 836 529-Q 422 1150 422 2328-Q 422 3509 836 4129-Q 1250 4750 2034 4750-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-30"/>- </g>- </g>- </g>- <g id="xtick_2">- <g id="line2d_2">- <g>- <use xlink:href="#m7e152711a6" x="157.839059" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_2">- <!-- 50 -->- <g transform="translate(151.476559 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-35" d="M 691 4666-L 3169 4666-L 3169 4134-L 1269 4134-L 1269 2991-Q 1406 3038 1543 3061-Q 1681 3084 1819 3084-Q 2600 3084 3056 2656-Q 3513 2228 3513 1497-Q 3513 744 3044 326-Q 2575 -91 1722 -91-Q 1428 -91 1123 -41-Q 819 9 494 109-L 494 744-Q 775 591 1075 516-Q 1375 441 1709 441-Q 2250 441 2565 725-Q 2881 1009 2881 1497-Q 2881 1984 2565 2268-Q 2250 2553 1709 2553-Q 1456 2553 1204 2497-Q 953 2441 691 2322-L 691 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-35"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- </g>- </g>- </g>- <g id="xtick_3">- <g id="line2d_3">- <g>- <use xlink:href="#m7e152711a6" x="225.678117" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_3">- <!-- 100 -->- <g transform="translate(216.134367 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-31" d="M 794 531-L 1825 531-L 1825 4091-L 703 3866-L 703 4441-L 1819 4666-L 2450 4666-L 2450 531-L 3481 531-L 3481 0-L 794 0-L 794 531-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_4">- <g id="line2d_4">- <g>- <use xlink:href="#m7e152711a6" x="293.517176" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_4">- <!-- 150 -->- <g transform="translate(283.973426 399.078438) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-35" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_5">- <g id="line2d_5">- <g>- <use xlink:href="#m7e152711a6" x="361.356234" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_5">- <!-- 200 -->- <g transform="translate(351.812484 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-32" d="M 1228 531-L 3431 531-L 3431 0-L 469 0-L 469 531-Q 828 903 1448 1529-Q 2069 2156 2228 2338-Q 2531 2678 2651 2914-Q 2772 3150 2772 3378-Q 2772 3750 2511 3984-Q 2250 4219 1831 4219-Q 1534 4219 1204 4116-Q 875 4013 500 3803-L 500 4441-Q 881 4594 1212 4672-Q 1544 4750 1819 4750-Q 2544 4750 2975 4387-Q 3406 4025 3406 3419-Q 3406 3131 3298 2873-Q 3191 2616 2906 2266-Q 2828 2175 2409 1742-Q 1991 1309 1228 531-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-32"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_6">- <g id="line2d_6">- <g>- <use xlink:href="#m7e152711a6" x="429.195293" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_6">- <!-- 250 -->- <g transform="translate(419.651543 399.078438) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-32"/>- <use xlink:href="#DejaVuSans-35" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_7">- <g id="line2d_7">- <g>- <use xlink:href="#m7e152711a6" x="497.034351" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_7">- <!-- 300 -->- <g transform="translate(487.490601 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-33" d="M 2597 2516-Q 3050 2419 3304 2112-Q 3559 1806 3559 1356-Q 3559 666 3084 287-Q 2609 -91 1734 -91-Q 1441 -91 1130 -33-Q 819 25 488 141-L 488 750-Q 750 597 1062 519-Q 1375 441 1716 441-Q 2309 441 2620 675-Q 2931 909 2931 1356-Q 2931 1769 2642 2001-Q 2353 2234 1838 2234-L 1294 2234-L 1294 2753-L 1863 2753-Q 2328 2753 2575 2939-Q 2822 3125 2822 3475-Q 2822 3834 2567 4026-Q 2313 4219 1838 4219-Q 1578 4219 1281 4162-Q 984 4106 628 3988-L 628 4550-Q 988 4650 1302 4700-Q 1616 4750 1894 4750-Q 2613 4750 3031 4423-Q 3450 4097 3450 3541-Q 3450 3153 3228 2886-Q 3006 2619 2597 2516-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-33"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_8">- <g id="line2d_8">- <g>- <use xlink:href="#m7e152711a6" x="564.87341" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_8">- <!-- 350 -->- <g transform="translate(555.32966 399.078438) scale(0.1 -0.1)">- <use xlink:href="#DejaVuSans-33"/>- <use xlink:href="#DejaVuSans-35" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="xtick_9">- <g id="line2d_9">- <g>- <use xlink:href="#m7e152711a6" x="632.712468" y="384.48" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_9">- <!-- 400 -->- <g transform="translate(623.168718 399.078438) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-34" d="M 2419 4116-L 825 1625-L 2419 1625-L 2419 4116-z-M 2253 4666-L 3047 4666-L 3047 1625-L 3713 1625-L 3713 1100-L 3047 1100-L 3047 0-L 2419 0-L 2419 1100-L 313 1100-L 313 1709-L 2253 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-34"/>- <use xlink:href="#DejaVuSans-30" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- </g>- </g>- </g>- <g id="text_10">- <!-- Time taken (lower is better). -->- <g transform="translate(283.763438 414.27625) scale(0.12 -0.12)">- <defs>- <path id="DejaVuSans-54" d="M -19 4666-L 3928 4666-L 3928 4134-L 2272 4134-L 2272 0-L 1638 0-L 1638 4134-L -19 4134-L -19 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-69" d="M 603 3500-L 1178 3500-L 1178 0-L 603 0-L 603 3500-z-M 603 4863-L 1178 4863-L 1178 4134-L 603 4134-L 603 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6d" d="M 3328 2828-Q 3544 3216 3844 3400-Q 4144 3584 4550 3584-Q 5097 3584 5394 3201-Q 5691 2819 5691 2113-L 5691 0-L 5113 0-L 5113 2094-Q 5113 2597 4934 2840-Q 4756 3084 4391 3084-Q 3944 3084 3684 2787-Q 3425 2491 3425 1978-L 3425 0-L 2847 0-L 2847 2094-Q 2847 2600 2669 2842-Q 2491 3084 2119 3084-Q 1678 3084 1418 2786-Q 1159 2488 1159 1978-L 1159 0-L 581 0-L 581 3500-L 1159 3500-L 1159 2956-Q 1356 3278 1631 3431-Q 1906 3584 2284 3584-Q 2666 3584 2933 3390-Q 3200 3197 3328 2828-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-65" d="M 3597 1894-L 3597 1613-L 953 1613-Q 991 1019 1311 708-Q 1631 397 2203 397-Q 2534 397 2845 478-Q 3156 559 3463 722-L 3463 178-Q 3153 47 2828 -22-Q 2503 -91 2169 -91-Q 1331 -91 842 396-Q 353 884 353 1716-Q 353 2575 817 3079-Q 1281 3584 2069 3584-Q 2775 3584 3186 3129-Q 3597 2675 3597 1894-z-M 3022 2063-Q 3016 2534 2758 2815-Q 2500 3097 2075 3097-Q 1594 3097 1305 2825-Q 1016 2553 972 2059-L 3022 2063-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-20" transform="scale(0.015625)"/>- <path id="DejaVuSans-74" d="M 1172 4494-L 1172 3500-L 2356 3500-L 2356 3053-L 1172 3053-L 1172 1153-Q 1172 725 1289 603-Q 1406 481 1766 481-L 2356 481-L 2356 0-L 1766 0-Q 1100 0 847 248-Q 594 497 594 1153-L 594 3053-L 172 3053-L 172 3500-L 594 3500-L 594 4494-L 1172 4494-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-61" d="M 2194 1759-Q 1497 1759 1228 1600-Q 959 1441 959 1056-Q 959 750 1161 570-Q 1363 391 1709 391-Q 2188 391 2477 730-Q 2766 1069 2766 1631-L 2766 1759-L 2194 1759-z-M 3341 1997-L 3341 0-L 2766 0-L 2766 531-Q 2569 213 2275 61-Q 1981 -91 1556 -91-Q 1019 -91 701 211-Q 384 513 384 1019-Q 384 1609 779 1909-Q 1175 2209 1959 2209-L 2766 2209-L 2766 2266-Q 2766 2663 2505 2880-Q 2244 3097 1772 3097-Q 1472 3097 1187 3025-Q 903 2953 641 2809-L 641 3341-Q 956 3463 1253 3523-Q 1550 3584 1831 3584-Q 2591 3584 2966 3190-Q 3341 2797 3341 1997-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6b" d="M 581 4863-L 1159 4863-L 1159 1991-L 2875 3500-L 3609 3500-L 1753 1863-L 3688 0-L 2938 0-L 1159 1709-L 1159 0-L 581 0-L 581 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6e" d="M 3513 2113-L 3513 0-L 2938 0-L 2938 2094-Q 2938 2591 2744 2837-Q 2550 3084 2163 3084-Q 1697 3084 1428 2787-Q 1159 2491 1159 1978-L 1159 0-L 581 0-L 581 3500-L 1159 3500-L 1159 2956-Q 1366 3272 1645 3428-Q 1925 3584 2291 3584-Q 2894 3584 3203 3211-Q 3513 2838 3513 2113-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-28" d="M 1984 4856-Q 1566 4138 1362 3434-Q 1159 2731 1159 2009-Q 1159 1288 1364 580-Q 1569 -128 1984 -844-L 1484 -844-Q 1016 -109 783 600-Q 550 1309 550 2009-Q 550 2706 781 3412-Q 1013 4119 1484 4856-L 1984 4856-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6c" d="M 603 4863-L 1178 4863-L 1178 0-L 603 0-L 603 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-6f" d="M 1959 3097-Q 1497 3097 1228 2736-Q 959 2375 959 1747-Q 959 1119 1226 758-Q 1494 397 1959 397-Q 2419 397 2687 759-Q 2956 1122 2956 1747-Q 2956 2369 2687 2733-Q 2419 3097 1959 3097-z-M 1959 3584-Q 2709 3584 3137 3096-Q 3566 2609 3566 1747-Q 3566 888 3137 398-Q 2709 -91 1959 -91-Q 1206 -91 779 398-Q 353 888 353 1747-Q 353 2609 779 3096-Q 1206 3584 1959 3584-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-77" d="M 269 3500-L 844 3500-L 1563 769-L 2278 3500-L 2956 3500-L 3675 769-L 4391 3500-L 4966 3500-L 4050 0-L 3372 0-L 2619 2869-L 1863 0-L 1184 0-L 269 3500-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-72" d="M 2631 2963-Q 2534 3019 2420 3045-Q 2306 3072 2169 3072-Q 1681 3072 1420 2755-Q 1159 2438 1159 1844-L 1159 0-L 581 0-L 581 3500-L 1159 3500-L 1159 2956-Q 1341 3275 1631 3429-Q 1922 3584 2338 3584-Q 2397 3584 2469 3576-Q 2541 3569 2628 3553-L 2631 2963-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-73" d="M 2834 3397-L 2834 2853-Q 2591 2978 2328 3040-Q 2066 3103 1784 3103-Q 1356 3103 1142 2972-Q 928 2841 928 2578-Q 928 2378 1081 2264-Q 1234 2150 1697 2047-L 1894 2003-Q 2506 1872 2764 1633-Q 3022 1394 3022 966-Q 3022 478 2636 193-Q 2250 -91 1575 -91-Q 1294 -91 989 -36-Q 684 19 347 128-L 347 722-Q 666 556 975 473-Q 1284 391 1588 391-Q 1994 391 2212 530-Q 2431 669 2431 922-Q 2431 1156 2273 1281-Q 2116 1406 1581 1522-L 1381 1569-Q 847 1681 609 1914-Q 372 2147 372 2553-Q 372 3047 722 3315-Q 1072 3584 1716 3584-Q 2034 3584 2315 3537-Q 2597 3491 2834 3397-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-62" d="M 3116 1747-Q 3116 2381 2855 2742-Q 2594 3103 2138 3103-Q 1681 3103 1420 2742-Q 1159 2381 1159 1747-Q 1159 1113 1420 752-Q 1681 391 2138 391-Q 2594 391 2855 752-Q 3116 1113 3116 1747-z-M 1159 2969-Q 1341 3281 1617 3432-Q 1894 3584 2278 3584-Q 2916 3584 3314 3078-Q 3713 2572 3713 1747-Q 3713 922 3314 415-Q 2916 -91 2278 -91-Q 1894 -91 1617 61-Q 1341 213 1159 525-L 1159 0-L 581 0-L 581 4863-L 1159 4863-L 1159 2969-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-29" d="M 513 4856-L 1013 4856-Q 1481 4119 1714 3412-Q 1947 2706 1947 2009-Q 1947 1309 1714 600-Q 1481 -109 1013 -844-L 513 -844-Q 928 -128 1133 580-Q 1338 1288 1338 2009-Q 1338 2731 1133 3434-Q 928 4138 513 4856-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-2e" d="M 684 794-L 1344 794-L 1344 0-L 684 0-L 684 794-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-54"/>- <use xlink:href="#DejaVuSans-69" x="57.958984"/>- <use xlink:href="#DejaVuSans-6d" x="85.742188"/>- <use xlink:href="#DejaVuSans-65" x="183.154297"/>- <use xlink:href="#DejaVuSans-20" x="244.677734"/>- <use xlink:href="#DejaVuSans-74" x="276.464844"/>- <use xlink:href="#DejaVuSans-61" x="315.673828"/>- <use xlink:href="#DejaVuSans-6b" x="376.953125"/>- <use xlink:href="#DejaVuSans-65" x="431.238281"/>- <use xlink:href="#DejaVuSans-6e" x="492.761719"/>- <use xlink:href="#DejaVuSans-20" x="556.140625"/>- <use xlink:href="#DejaVuSans-28" x="587.927734"/>- <use xlink:href="#DejaVuSans-6c" x="626.941406"/>- <use xlink:href="#DejaVuSans-6f" x="654.724609"/>- <use xlink:href="#DejaVuSans-77" x="715.90625"/>- <use xlink:href="#DejaVuSans-65" x="797.693359"/>- <use xlink:href="#DejaVuSans-72" x="859.216797"/>- <use xlink:href="#DejaVuSans-20" x="900.330078"/>- <use xlink:href="#DejaVuSans-69" x="932.117188"/>- <use xlink:href="#DejaVuSans-73" x="959.900391"/>- <use xlink:href="#DejaVuSans-20" x="1012"/>- <use xlink:href="#DejaVuSans-62" x="1043.787109"/>- <use xlink:href="#DejaVuSans-65" x="1107.263672"/>- <use xlink:href="#DejaVuSans-74" x="1168.787109"/>- <use xlink:href="#DejaVuSans-74" x="1207.996094"/>- <use xlink:href="#DejaVuSans-65" x="1247.205078"/>- <use xlink:href="#DejaVuSans-72" x="1308.728516"/>- <use xlink:href="#DejaVuSans-29" x="1349.841797"/>- <use xlink:href="#DejaVuSans-2e" x="1388.855469"/>- </g>- </g>- </g>- <g id="matplotlib.axis_2">- <g id="ytick_1">- <g id="line2d_10">- <defs>- <path id="m45234ecef3" d="M 0 0-L -3.5 0-" style="stroke: #000000; stroke-width: 0.8"/>- </defs>- <g>- <use xlink:href="#m45234ecef3" x="90" y="337.528421" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_11">- <!-- Huggingface -->- <g transform="translate(19.68125 341.32764) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-48" d="M 628 4666-L 1259 4666-L 1259 2753-L 3553 2753-L 3553 4666-L 4184 4666-L 4184 0-L 3553 0-L 3553 2222-L 1259 2222-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-75" d="M 544 1381-L 544 3500-L 1119 3500-L 1119 1403-Q 1119 906 1312 657-Q 1506 409 1894 409-Q 2359 409 2629 706-Q 2900 1003 2900 1516-L 2900 3500-L 3475 3500-L 3475 0-L 2900 0-L 2900 538-Q 2691 219 2414 64-Q 2138 -91 1772 -91-Q 1169 -91 856 284-Q 544 659 544 1381-z-M 1991 3584-L 1991 3584-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-67" d="M 2906 1791-Q 2906 2416 2648 2759-Q 2391 3103 1925 3103-Q 1463 3103 1205 2759-Q 947 2416 947 1791-Q 947 1169 1205 825-Q 1463 481 1925 481-Q 2391 481 2648 825-Q 2906 1169 2906 1791-z-M 3481 434-Q 3481 -459 3084 -895-Q 2688 -1331 1869 -1331-Q 1566 -1331 1297 -1286-Q 1028 -1241 775 -1147-L 775 -588-Q 1028 -725 1275 -790-Q 1522 -856 1778 -856-Q 2344 -856 2625 -561-Q 2906 -266 2906 331-L 2906 616-Q 2728 306 2450 153-Q 2172 0 1784 0-Q 1141 0 747 490-Q 353 981 353 1791-Q 353 2603 747 3093-Q 1141 3584 1784 3584-Q 2172 3584 2450 3431-Q 2728 3278 2906 2969-L 2906 3500-L 3481 3500-L 3481 434-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-66" d="M 2375 4863-L 2375 4384-L 1825 4384-Q 1516 4384 1395 4259-Q 1275 4134 1275 3809-L 1275 3500-L 2222 3500-L 2222 3053-L 1275 3053-L 1275 0-L 697 0-L 697 3053-L 147 3053-L 147 3500-L 697 3500-L 697 3744-Q 697 4328 969 4595-Q 1241 4863 1831 4863-L 2375 4863-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-63" d="M 3122 3366-L 3122 2828-Q 2878 2963 2633 3030-Q 2388 3097 2138 3097-Q 1578 3097 1268 2742-Q 959 2388 959 1747-Q 959 1106 1268 751-Q 1578 397 2138 397-Q 2388 397 2633 464-Q 2878 531 3122 666-L 3122 134-Q 2881 22 2623 -34-Q 2366 -91 2075 -91-Q 1284 -91 818 406-Q 353 903 353 1747-Q 353 2603 823 3093-Q 1294 3584 2113 3584-Q 2378 3584 2631 3529-Q 2884 3475 3122 3366-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-48"/>- <use xlink:href="#DejaVuSans-75" x="75.195312"/>- <use xlink:href="#DejaVuSans-67" x="138.574219"/>- <use xlink:href="#DejaVuSans-67" x="202.050781"/>- <use xlink:href="#DejaVuSans-69" x="265.527344"/>- <use xlink:href="#DejaVuSans-6e" x="293.310547"/>- <use xlink:href="#DejaVuSans-67" x="356.689453"/>- <use xlink:href="#DejaVuSans-66" x="420.166016"/>- <use xlink:href="#DejaVuSans-61" x="455.371094"/>- <use xlink:href="#DejaVuSans-63" x="516.650391"/>- <use xlink:href="#DejaVuSans-65" x="571.630859"/>- </g>- </g>- </g>- <g id="ytick_2">- <g id="line2d_11">- <g>- <use xlink:href="#m45234ecef3" x="90" y="257.949474" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_12">- <!-- Unsloth Open -->- <g transform="translate(15.090625 261.748692) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-55" d="M 556 4666-L 1191 4666-L 1191 1831-Q 1191 1081 1462 751-Q 1734 422 2344 422-Q 2950 422 3222 751-Q 3494 1081 3494 1831-L 3494 4666-L 4128 4666-L 4128 1753-Q 4128 841 3676 375-Q 3225 -91 2344 -91-Q 1459 -91 1007 375-Q 556 841 556 1753-L 556 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-68" d="M 3513 2113-L 3513 0-L 2938 0-L 2938 2094-Q 2938 2591 2744 2837-Q 2550 3084 2163 3084-Q 1697 3084 1428 2787-Q 1159 2491 1159 1978-L 1159 0-L 581 0-L 581 4863-L 1159 4863-L 1159 2956-Q 1366 3272 1645 3428-Q 1925 3584 2291 3584-Q 2894 3584 3203 3211-Q 3513 2838 3513 2113-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-4f" d="M 2522 4238-Q 1834 4238 1429 3725-Q 1025 3213 1025 2328-Q 1025 1447 1429 934-Q 1834 422 2522 422-Q 3209 422 3611 934-Q 4013 1447 4013 2328-Q 4013 3213 3611 3725-Q 3209 4238 2522 4238-z-M 2522 4750-Q 3503 4750 4090 4092-Q 4678 3434 4678 2328-Q 4678 1225 4090 567-Q 3503 -91 2522 -91-Q 1538 -91 948 565-Q 359 1222 359 2328-Q 359 3434 948 4092-Q 1538 4750 2522 4750-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-70" d="M 1159 525-L 1159 -1331-L 581 -1331-L 581 3500-L 1159 3500-L 1159 2969-Q 1341 3281 1617 3432-Q 1894 3584 2278 3584-Q 2916 3584 3314 3078-Q 3713 2572 3713 1747-Q 3713 922 3314 415-Q 2916 -91 2278 -91-Q 1894 -91 1617 61-Q 1341 213 1159 525-z-M 3116 1747-Q 3116 2381 2855 2742-Q 2594 3103 2138 3103-Q 1681 3103 1420 2742-Q 1159 2381 1159 1747-Q 1159 1113 1420 752-Q 1681 391 2138 391-Q 2594 391 2855 752-Q 3116 1113 3116 1747-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-55"/>- <use xlink:href="#DejaVuSans-6e" x="73.193359"/>- <use xlink:href="#DejaVuSans-73" x="136.572266"/>- <use xlink:href="#DejaVuSans-6c" x="188.671875"/>- <use xlink:href="#DejaVuSans-6f" x="216.455078"/>- <use xlink:href="#DejaVuSans-74" x="277.636719"/>- <use xlink:href="#DejaVuSans-68" x="316.845703"/>- <use xlink:href="#DejaVuSans-20" x="380.224609"/>- <use xlink:href="#DejaVuSans-4f" x="412.011719"/>- <use xlink:href="#DejaVuSans-70" x="490.722656"/>- <use xlink:href="#DejaVuSans-65" x="554.199219"/>- <use xlink:href="#DejaVuSans-6e" x="615.722656"/>- </g>- </g>- </g>- <g id="ytick_3">- <g id="line2d_12">- <g>- <use xlink:href="#m45234ecef3" x="90" y="178.370526" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_13">- <!-- Unsloth Pro -->- <g transform="translate(25.942187 182.169745) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-50" d="M 1259 4147-L 1259 2394-L 2053 2394-Q 2494 2394 2734 2622-Q 2975 2850 2975 3272-Q 2975 3691 2734 3919-Q 2494 4147 2053 4147-L 1259 4147-z-M 628 4666-L 2053 4666-Q 2838 4666 3239 4311-Q 3641 3956 3641 3272-Q 3641 2581 3239 2228-Q 2838 1875 2053 1875-L 1259 1875-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-55"/>- <use xlink:href="#DejaVuSans-6e" x="73.193359"/>- <use xlink:href="#DejaVuSans-73" x="136.572266"/>- <use xlink:href="#DejaVuSans-6c" x="188.671875"/>- <use xlink:href="#DejaVuSans-6f" x="216.455078"/>- <use xlink:href="#DejaVuSans-74" x="277.636719"/>- <use xlink:href="#DejaVuSans-68" x="316.845703"/>- <use xlink:href="#DejaVuSans-20" x="380.224609"/>- <use xlink:href="#DejaVuSans-50" x="412.011719"/>- <use xlink:href="#DejaVuSans-72" x="470.564453"/>- <use xlink:href="#DejaVuSans-6f" x="509.427734"/>- </g>- </g>- </g>- <g id="ytick_4">- <g id="line2d_13">- <g>- <use xlink:href="#m45234ecef3" x="90" y="98.791579" style="stroke: #000000; stroke-width: 0.8"/>- </g>- </g>- <g id="text_14">- <!-- Unsloth Max -->- <g transform="translate(21.126562 102.590798) scale(0.1 -0.1)">- <defs>- <path id="DejaVuSans-4d" d="M 628 4666-L 1569 4666-L 2759 1491-L 3956 4666-L 4897 4666-L 4897 0-L 4281 0-L 4281 4097-L 3078 897-L 2444 897-L 1241 4097-L 1241 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-78" d="M 3513 3500-L 2247 1797-L 3578 0-L 2900 0-L 1881 1375-L 863 0-L 184 0-L 1544 1831-L 300 3500-L 978 3500-L 1906 2253-L 2834 3500-L 3513 3500-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-55"/>- <use xlink:href="#DejaVuSans-6e" x="73.193359"/>- <use xlink:href="#DejaVuSans-73" x="136.572266"/>- <use xlink:href="#DejaVuSans-6c" x="188.671875"/>- <use xlink:href="#DejaVuSans-6f" x="216.455078"/>- <use xlink:href="#DejaVuSans-74" x="277.636719"/>- <use xlink:href="#DejaVuSans-68" x="316.845703"/>- <use xlink:href="#DejaVuSans-20" x="380.224609"/>- <use xlink:href="#DejaVuSans-4d" x="412.011719"/>- <use xlink:href="#DejaVuSans-61" x="498.291016"/>- <use xlink:href="#DejaVuSans-78" x="559.570312"/>- </g>- </g>- </g>- </g>- <g id="patch_7">- <path d="M 90 384.48-L 90 51.84-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="patch_8">- <path d="M 648 384.48-L 648 51.84-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="patch_9">- <path d="M 90 384.48-L 648 384.48-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="patch_10">- <path d="M 90 51.84-L 648 51.84-" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>- </g>- <g id="text_15">- <!-- 391.68 hrs (1.0X) -->- <g transform="translate(512.886078 340.839671) scale(0.12 -0.12)">- <defs>- <path id="DejaVuSans-39" d="M 703 97-L 703 672-Q 941 559 1184 500-Q 1428 441 1663 441-Q 2288 441 2617 861-Q 2947 1281 2994 2138-Q 2813 1869 2534 1725-Q 2256 1581 1919 1581-Q 1219 1581 811 2004-Q 403 2428 403 3163-Q 403 3881 828 4315-Q 1253 4750 1959 4750-Q 2769 4750 3195 4129-Q 3622 3509 3622 2328-Q 3622 1225 3098 567-Q 2575 -91 1691 -91-Q 1453 -91 1209 -44-Q 966 3 703 97-z-M 1959 2075-Q 2384 2075 2632 2365-Q 2881 2656 2881 3163-Q 2881 3666 2632 3958-Q 2384 4250 1959 4250-Q 1534 4250 1286 3958-Q 1038 3666 1038 3163-Q 1038 2656 1286 2365-Q 1534 2075 1959 2075-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-36" d="M 2113 2584-Q 1688 2584 1439 2293-Q 1191 2003 1191 1497-Q 1191 994 1439 701-Q 1688 409 2113 409-Q 2538 409 2786 701-Q 3034 994 3034 1497-Q 3034 2003 2786 2293-Q 2538 2584 2113 2584-z-M 3366 4563-L 3366 3988-Q 3128 4100 2886 4159-Q 2644 4219 2406 4219-Q 1781 4219 1451 3797-Q 1122 3375 1075 2522-Q 1259 2794 1537 2939-Q 1816 3084 2150 3084-Q 2853 3084 3261 2657-Q 3669 2231 3669 1497-Q 3669 778 3244 343-Q 2819 -91 2113 -91-Q 1303 -91 875 529-Q 447 1150 447 2328-Q 447 3434 972 4092-Q 1497 4750 2381 4750-Q 2619 4750 2861 4703-Q 3103 4656 3366 4563-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-38" d="M 2034 2216-Q 1584 2216 1326 1975-Q 1069 1734 1069 1313-Q 1069 891 1326 650-Q 1584 409 2034 409-Q 2484 409 2743 651-Q 3003 894 3003 1313-Q 3003 1734 2745 1975-Q 2488 2216 2034 2216-z-M 1403 2484-Q 997 2584 770 2862-Q 544 3141 544 3541-Q 544 4100 942 4425-Q 1341 4750 2034 4750-Q 2731 4750 3128 4425-Q 3525 4100 3525 3541-Q 3525 3141 3298 2862-Q 3072 2584 2669 2484-Q 3125 2378 3379 2068-Q 3634 1759 3634 1313-Q 3634 634 3220 271-Q 2806 -91 2034 -91-Q 1263 -91 848 271-Q 434 634 434 1313-Q 434 1759 690 2068-Q 947 2378 1403 2484-z-M 1172 3481-Q 1172 3119 1398 2916-Q 1625 2713 2034 2713-Q 2441 2713 2670 2916-Q 2900 3119 2900 3481-Q 2900 3844 2670 4047-Q 2441 4250 2034 4250-Q 1625 4250 1398 4047-Q 1172 3844 1172 3481-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-58" d="M 403 4666-L 1081 4666-L 2241 2931-L 3406 4666-L 4084 4666-L 2584 2425-L 4184 0-L 3506 0-L 2194 1984-L 872 0-L 191 0-L 1856 2491-L 403 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-33"/>- <use xlink:href="#DejaVuSans-39" x="63.623047"/>- <use xlink:href="#DejaVuSans-31" x="127.246094"/>- <use xlink:href="#DejaVuSans-2e" x="190.869141"/>- <use xlink:href="#DejaVuSans-36" x="222.65625"/>- <use xlink:href="#DejaVuSans-38" x="286.279297"/>- <use xlink:href="#DejaVuSans-20" x="349.902344"/>- <use xlink:href="#DejaVuSans-68" x="381.689453"/>- <use xlink:href="#DejaVuSans-72" x="445.068359"/>- <use xlink:href="#DejaVuSans-73" x="486.181641"/>- <use xlink:href="#DejaVuSans-20" x="538.28125"/>- <use xlink:href="#DejaVuSans-28" x="570.068359"/>- <use xlink:href="#DejaVuSans-31" x="609.082031"/>- <use xlink:href="#DejaVuSans-2e" x="672.705078"/>- <use xlink:href="#DejaVuSans-30" x="704.492188"/>- <use xlink:href="#DejaVuSans-58" x="768.115234"/>- <use xlink:href="#DejaVuSans-29" x="836.621094"/>- </g>- </g>- <g id="text_16">- <!-- 240.07 hrs (1.6X) -->- <g transform="translate(417.074714 261.260724) scale(0.12 -0.12)">- <defs>- <path id="DejaVuSans-37" d="M 525 4666-L 3525 4666-L 3525 4397-L 1831 0-L 1172 0-L 2766 4134-L 525 4134-L 525 4666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-32"/>- <use xlink:href="#DejaVuSans-34" x="63.623047"/>- <use xlink:href="#DejaVuSans-30" x="127.246094"/>- <use xlink:href="#DejaVuSans-2e" x="190.869141"/>- <use xlink:href="#DejaVuSans-30" x="222.65625"/>- <use xlink:href="#DejaVuSans-37" x="286.279297"/>- <use xlink:href="#DejaVuSans-20" x="349.902344"/>- <use xlink:href="#DejaVuSans-68" x="381.689453"/>- <use xlink:href="#DejaVuSans-72" x="445.068359"/>- <use xlink:href="#DejaVuSans-73" x="486.181641"/>- <use xlink:href="#DejaVuSans-20" x="538.28125"/>- <use xlink:href="#DejaVuSans-28" x="570.068359"/>- <use xlink:href="#DejaVuSans-31" x="609.082031"/>- <use xlink:href="#DejaVuSans-2e" x="672.705078"/>- <use xlink:href="#DejaVuSans-36" x="704.492188"/>- <use xlink:href="#DejaVuSans-58" x="768.115234"/>- <use xlink:href="#DejaVuSans-29" x="836.621094"/>- </g>- </g>- <g id="text_17">- <!-- 145.20 hrs (2.7X) -->- <g transform="translate(288.361407 181.681776) scale(0.12 -0.12)">- <use xlink:href="#DejaVuSans-31"/>- <use xlink:href="#DejaVuSans-34" x="63.623047"/>- <use xlink:href="#DejaVuSans-35" x="127.246094"/>- <use xlink:href="#DejaVuSans-2e" x="190.869141"/>- <use xlink:href="#DejaVuSans-32" x="222.65625"/>- <use xlink:href="#DejaVuSans-30" x="286.279297"/>- <use xlink:href="#DejaVuSans-20" x="349.902344"/>- <use xlink:href="#DejaVuSans-68" x="381.689453"/>- <use xlink:href="#DejaVuSans-72" x="445.068359"/>- <use xlink:href="#DejaVuSans-73" x="486.181641"/>- <use xlink:href="#DejaVuSans-20" x="538.28125"/>- <use xlink:href="#DejaVuSans-28" x="570.068359"/>- <use xlink:href="#DejaVuSans-32" x="609.082031"/>- <use xlink:href="#DejaVuSans-2e" x="672.705078"/>- <use xlink:href="#DejaVuSans-37" x="704.492188"/>- <use xlink:href="#DejaVuSans-58" x="768.115234"/>- <use xlink:href="#DejaVuSans-29" x="836.621094"/>- </g>- </g>- <g id="text_18">- <!-- 51.50 hrs (7.6X) -->- <g transform="translate(161.231011 102.102829) scale(0.12 -0.12)">- <use xlink:href="#DejaVuSans-35"/>- <use xlink:href="#DejaVuSans-31" x="63.623047"/>- <use xlink:href="#DejaVuSans-2e" x="127.246094"/>- <use xlink:href="#DejaVuSans-35" x="159.033203"/>- <use xlink:href="#DejaVuSans-30" x="222.65625"/>- <use xlink:href="#DejaVuSans-20" x="286.279297"/>- <use xlink:href="#DejaVuSans-68" x="318.066406"/>- <use xlink:href="#DejaVuSans-72" x="381.445312"/>- <use xlink:href="#DejaVuSans-73" x="422.558594"/>- <use xlink:href="#DejaVuSans-20" x="474.658203"/>- <use xlink:href="#DejaVuSans-28" x="506.445312"/>- <use xlink:href="#DejaVuSans-37" x="545.458984"/>- <use xlink:href="#DejaVuSans-2e" x="609.082031"/>- <use xlink:href="#DejaVuSans-36" x="640.869141"/>- <use xlink:href="#DejaVuSans-58" x="704.492188"/>- <use xlink:href="#DejaVuSans-29" x="772.998047"/>- </g>- </g>- <g id="text_19">- <!-- SlimOrca 518K (1 epoch on 1 T4 GPU) -->- <g transform="translate(217.05625 45.84) scale(0.16 -0.16)">- <defs>- <path id="DejaVuSans-53" d="M 3425 4513-L 3425 3897-Q 3066 4069 2747 4153-Q 2428 4238 2131 4238-Q 1616 4238 1336 4038-Q 1056 3838 1056 3469-Q 1056 3159 1242 3001-Q 1428 2844 1947 2747-L 2328 2669-Q 3034 2534 3370 2195-Q 3706 1856 3706 1288-Q 3706 609 3251 259-Q 2797 -91 1919 -91-Q 1588 -91 1214 -16-Q 841 59 441 206-L 441 856-Q 825 641 1194 531-Q 1563 422 1919 422-Q 2459 422 2753 634-Q 3047 847 3047 1241-Q 3047 1584 2836 1778-Q 2625 1972 2144 2069-L 1759 2144-Q 1053 2284 737 2584-Q 422 2884 422 3419-Q 422 4038 858 4394-Q 1294 4750 2059 4750-Q 2388 4750 2728 4690-Q 3069 4631 3425 4513-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-4b" d="M 628 4666-L 1259 4666-L 1259 2694-L 3353 4666-L 4166 4666-L 1850 2491-L 4331 0-L 3500 0-L 1259 2247-L 1259 0-L 628 0-L 628 4666-z-" transform="scale(0.015625)"/>- <path id="DejaVuSans-47" d="M 3809 666-L 3809 1919-L 2778 1919-L 2778 2438-L 4434 2438-L 4434 434-Q 4069 175 3628 42-Q 3188 -91 2688 -91-Q 1594 -91 976 548-Q 359 1188 359 2328-Q 359 3472 976 4111-Q 1594 4750 2688 4750-Q 3144 4750 3555 4637-Q 3966 4525 4313 4306-L 4313 3634-Q 3963 3931 3569 4081-Q 3175 4231 2741 4231-Q 1884 4231 1454 3753-Q 1025 3275 1025 2328-Q 1025 1384 1454 906-Q 1884 428 2741 428-Q 3075 428 3337 486-Q 3600 544 3809 666-z-" transform="scale(0.015625)"/>- </defs>- <use xlink:href="#DejaVuSans-53"/>- <use xlink:href="#DejaVuSans-6c" x="63.476562"/>- <use xlink:href="#DejaVuSans-69" x="91.259766"/>- <use xlink:href="#DejaVuSans-6d" x="119.042969"/>- <use xlink:href="#DejaVuSans-4f" x="216.455078"/>- <use xlink:href="#DejaVuSans-72" x="295.166016"/>- <use xlink:href="#DejaVuSans-63" x="334.029297"/>- <use xlink:href="#DejaVuSans-61" x="389.009766"/>- <use xlink:href="#DejaVuSans-20" x="450.289062"/>- <use xlink:href="#DejaVuSans-35" x="482.076172"/>- <use xlink:href="#DejaVuSans-31" x="545.699219"/>- <use xlink:href="#DejaVuSans-38" x="609.322266"/>- <use xlink:href="#DejaVuSans-4b" x="672.945312"/>- <use xlink:href="#DejaVuSans-20" x="738.521484"/>- <use xlink:href="#DejaVuSans-28" x="770.308594"/>- <use xlink:href="#DejaVuSans-31" x="809.322266"/>- <use xlink:href="#DejaVuSans-20" x="872.945312"/>- <use xlink:href="#DejaVuSans-65" x="904.732422"/>- <use xlink:href="#DejaVuSans-70" x="966.255859"/>- <use xlink:href="#DejaVuSans-6f" x="1029.732422"/>- <use xlink:href="#DejaVuSans-63" x="1090.914062"/>- <use xlink:href="#DejaVuSans-68" x="1145.894531"/>- <use xlink:href="#DejaVuSans-20" x="1209.273438"/>- <use xlink:href="#DejaVuSans-6f" x="1241.060547"/>- <use xlink:href="#DejaVuSans-6e" x="1302.242188"/>- <use xlink:href="#DejaVuSans-20" x="1365.621094"/>- <use xlink:href="#DejaVuSans-31" x="1397.408203"/>- <use xlink:href="#DejaVuSans-20" x="1461.03125"/>- <use xlink:href="#DejaVuSans-54" x="1492.818359"/>- <use xlink:href="#DejaVuSans-34" x="1553.902344"/>- <use xlink:href="#DejaVuSans-20" x="1617.525391"/>- <use xlink:href="#DejaVuSans-47" x="1649.3125"/>- <use xlink:href="#DejaVuSans-50" x="1726.802734"/>- <use xlink:href="#DejaVuSans-55" x="1787.105469"/>- <use xlink:href="#DejaVuSans-29" x="1860.298828"/>- </g>- </g>- </g>- </g>- <defs>- <clipPath id="p682a0e8bed">- <rect x="90" y="51.84" width="558" height="332.64"/>- </clipPath>- </defs>-</svg>diff --git a/images/try live demo green.png b/images/try live demo green.pngnew file mode 100644index 00000000000..540ff5595feBinary files /dev/null and b/images/try live demo green.png differdiff --git a/pyproject.toml b/pyproject.tomlindex 070ae2572eb..09dd118414a 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -33,7 +33,7 @@ exclude = ["images*"][project.optional-dependencies]huggingface = [- "transformers",+ "transformers","datasets","sentencepiece","accelerate",@@ -70,4 +70,4 @@ colab = [[project.urls]homepage = "http://www.unsloth.ai"documentation = "https://github.com/unslothai/unsloth"-repository = "https://github.com/unslothai/unsloth"\ No newline at end of file+repository = "https://github.com/unslothai/unsloth"diff --git a/unsloth/__init__.py b/unsloth/__init__.pyindex 100625fac4f..e9f8b5e65bd 100644--- a/unsloth/__init__.py+++ b/unsloth/__init__.py@@ -11,7 +11,7 @@# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.-__version__ = "2023.11"+__version__ = "2023.12"import osimport warningsimport importlib@@ -35,7 +35,7 @@ if "CUDA_VISIBLE_DEVICES" in os.environ:)os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"else:- warnings.warn("Unsloth: 'CUDA_VISIBLE_DEVICES' is not set. We shall set it ourselves.")+ # warnings.warn("Unsloth: 'CUDA_VISIBLE_DEVICES' is not set. We shall set it ourselves.")os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"os.environ["CUDA_VISIBLE_DEVICES"] = "0"passdiff --git a/unsloth/kernels/cross_entropy_loss.py b/unsloth/kernels/cross_entropy_loss.pyindex 175caab0d7b..67ad306fcf8 100644--- a/unsloth/kernels/cross_entropy_loss.py+++ b/unsloth/kernels/cross_entropy_loss.py@@ -43,7 +43,6 @@ def _cross_entropy_forward(logits_ptr, logits_row_stride,mask = col_offsets < n_cols# TODO: Fixup int32 locations to int64- # https://github.com/Dao-AILab/flash-attention/commit/c79de85ffa0d19b80fa468f90c5086e837499d72label_idx = tl.load(labels_ptr).to(tl.int32)logits = tl.load(logits_ptr + col_offsets, mask = mask, other = -float("inf")).to(tl.float32)max_logits = tl.max(logits, 0)@@ -88,7 +87,6 @@ def _cross_entropy_backward(logits_ptr, logits_row_stride,col_offsets = tl.arange(0, BLOCK_SIZE)mask = col_offsets < n_cols# TODO: Fixup int32 locations to int64- # https://github.com/Dao-AILab/flash-attention/commit/c79de85ffa0d19b80fa468f90c5086e837499d72label_idx = tl.load(labels_ptr + row_idx).to(tl.int32)if label_idx != -100:diff --git a/unsloth/kernels/rope_embedding.py b/unsloth/kernels/rope_embedding.pyindex ee1b20f88f1..99a7a50f47b 100644--- a/unsloth/kernels/rope_embedding.py+++ b/unsloth/kernels/rope_embedding.py@@ -35,7 +35,6 @@ def _rope_embedding(mask = col_offsets < half_head_dim# TODO: Fixup int32 locations to int64- # https://github.com/Dao-AILab/flash-attention/commit/c79de85ffa0d19b80fa468f90c5086e837499d72rot_position = row_position % seqlenQ += row_position* Q_row_stride + head_position*head_dim@@ -48,8 +47,6 @@ def _rope_embedding(Q2 = tl.load(Q + half_head_dim*1 + col_offsets, mask = mask, other = 0)# RoPE repeats sin and cos so 128 = [64, 64].- # sin2 = tl.load(sin + half_head_dim*1, mask = mask, other = 0)- # cos2 = tl.load(cos + half_head_dim*1, mask = mask, other = 0)if BACKWARD_PASS:"""@@ -62,11 +59,8 @@ def _rope_embedding(where R.T is again the same [ 0, -I]but the minus is transposed. [ I, 0]"""- # sin1, sin2 = -sin1, -sin2sin1 = -sin1-- # tl.store(Q + half_head_dim*0, Q1*cos1 - Q2*sin1, mask = mask)- # tl.store(Q + half_head_dim*1, Q2*cos2 + Q1*sin2, mask = mask)+# RoPE repeats sin and cos so 128 = [64, 64].tl.store(Q + half_head_dim*0 + col_offsets, Q1*cos1 - Q2*sin1, mask = mask)tl.store(Q + half_head_dim*1 + col_offsets, Q2*cos1 + Q1*sin1, mask = mask)diff --git a/unsloth/kernels/utils.py b/unsloth/kernels/utils.pyindex df4b85f0b6c..34906a5a1a1 100644--- a/unsloth/kernels/utils.py+++ b/unsloth/kernels/utils.py@@ -13,12 +13,12 @@# limitations under the License.import triton-MAX_FUSED_SIZE = 65535 # 2**16 - 1+MAX_FUSED_SIZE = 65536 # 2**16 Solves https://github.com/unslothai/unsloth/issues/7next_power_of_2 = triton.next_power_of_2def calculate_settings(n):BLOCK_SIZE = next_power_of_2(n)- # CUDA only supports 65535 - 2^16-1 threads per block+ # CUDA only supports 65536 - 2^16 threads per blockif BLOCK_SIZE > MAX_FUSED_SIZE:raise RuntimeError(f"Cannot launch Triton kernel since n = {n} exceeds "\f"the maximum CUDA blocksize = {MAX_FUSED_SIZE}.")diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 8ab451f7d5f..bfc0e26c0be 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -16,14 +16,15 @@ import torchfrom typing import Optional, Tuple, List, Unionfrom torch.nn.functional import scaled_dot_product_attentionfrom transformers.models.llama.modeling_llama import (- # apply_rotary_pos_emb,- # repeat_kv,- # _prepare_4d_causal_attention_mask,+ _prepare_4d_causal_attention_mask,logger,BaseModelOutputWithPast,CausalLMOutputWithPast,)from ..kernels import *+from ._utils import (+ prepare_model_for_kbit_training,+)# Get Flash Attention v2 if Ampere (RTX 30xx, A100)major_version, minor_version = torch.cuda.get_device_capability()@@ -37,7 +38,6 @@ else:# Tri Dao's benchmark shows xformers is faster for now.HAS_FLASH_ATTENTION = Falsepass-import xformers.ops.fmha as xformersxformers_attention = xformers.memory_efficient_attention@@ -55,12 +55,9 @@ import bitsandbytes as bnbimport numpy as npimport types-from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig+from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig, AutoConfigfrom transformers import set_seed as transformers_set_seedfrom peft import LoraConfig, TaskType, get_peft_model as _get_peft_model-from ._utils import (- prepare_model_for_kbit_training,-)def original_apply_qkv(self, X):@@ -92,10 +89,6 @@ def LlamaAttention_fast_forward() -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:bsz, q_len, _ = hidden_states.size()-- # Q = self.q_proj(hidden_states)- # K = self.k_proj(hidden_states)- # V = self.v_proj(hidden_states)Q, K, V = self.apply_qkv(self, hidden_states)n_heads = self.num_heads@@ -112,8 +105,6 @@ def LlamaAttention_fast_forward(if past_key_value is not None:kv_seq_len += past_key_value[0].shape[-2]- # cos, sin = self.rotary_emb(V, seq_len = kv_seq_len)- # Q, K = apply_rotary_pos_emb(Q, K, cos, sin, position_ids)if position_ids is None:cos = self.rotary_emb.cos_cachedsin = self.rotary_emb.sin_cached@@ -130,10 +121,9 @@ def LlamaAttention_fast_forward(past_key_value = (K, V) if use_cache else None# Attention module- # no_attention_mask = attention_mask is None- # Ignore attention_mask-- if (not HAS_FLASH_ATTENTION): #and no_attention_mask:+ # Xformers doesnt support backward pass for GQA (yet)+ # TEMP fix+ if (n_groups == 1) and (not HAS_FLASH_ATTENTION):# Xformers memory efficient attention# Also has Flash Attention v2 dispatching# (batch_size, n_heads, seq_len, head_dim) -> (batch_size, seq_len, n_heads, head_dim)@@ -143,18 +133,17 @@ def LlamaAttention_fast_forward(# Grouped query attentionif n_groups != 1:- Q = Q.reshape(bsz, q_len, n_groups, n_kv_heads, head_dim)-- K = K.reshape(bsz, q_len, n_groups, 1, head_dim)- V = V.reshape(bsz, q_len, n_groups, 1, head_dim)- K = K .expand(bsz, q_len, n_groups, n_kv_heads, head_dim)- V = V .expand(bsz, q_len, n_groups, n_kv_heads, head_dim)+ Q = Q.reshape(bsz, q_len, n_kv_heads, n_groups, head_dim)+ K = K.reshape(bsz, q_len, n_kv_heads, 1, head_dim)+ V = V.reshape(bsz, q_len, n_kv_heads, 1, head_dim)+ K = K .expand(bsz, q_len, n_kv_heads, n_groups, head_dim)+ V = V .expand(bsz, q_len, n_kv_heads, n_groups, head_dim)passA = xformers_attention(Q, K, V, attn_bias = causal_mask)A = A.view(bsz, q_len, n_heads, head_dim)- elif HAS_FLASH_ATTENTION:# and no_attention_mask:+ elif HAS_FLASH_ATTENTION:# Flash Attention# (batch_size, n_heads, seq_len, head_dim) -> (batch_size, seq_len, n_heads, head_dim)Q = Q.transpose(1, 2)@@ -163,37 +152,22 @@ def LlamaAttention_fast_forward(# Flash Attention v2 auto supports grouped query attentionA = flash_attn_func(Q, K, V, causal = True)-else:- # Uses Pytorch's scaled dot product attention- if attention_mask is not None:- if attention_mask.size() != (bsz, 1, q_len, kv_seq_len):- raise ValueError(- f"Attention mask should be of size {(bsz, 1, q_len, kv_seq_len)}, but is {attention_mask.size()}"- )- pass-# Grouped query attention- # K = repeat_kv(K, n_groups)- # V = repeat_kv(V, n_groups)if n_groups != 1:K = K[:, :, None, :, :].expand(bsz, n_kv_heads, n_groups, q_len, head_dim)V = V[:, :, None, :, :].expand(bsz, n_kv_heads, n_groups, q_len, head_dim)K = K.reshape(bsz, n_heads, q_len, head_dim)V = V.reshape(bsz, n_heads, q_len, head_dim)pass-# Needs (batch_size, n_heads, seq_len, head_dim)# is_casual and attention_mask must not be both set!- A = scaled_dot_product_attention(Q, K, V, attn_mask = attention_mask, is_causal = attention_mask is None)+ A = scaled_dot_product_attention(Q, K, V, attn_mask = None, is_causal = True)# Go back to (batch_size, seq_len, n_heads, head_dim)A = A.transpose(1, 2)passattn_output = A.reshape(bsz, q_len, self.hidden_size)-- # attn_output = self.o_proj(attn_output)attn_output = self.apply_o(self, attn_output)-attn_weights = Nonereturn attn_output, attn_weights, past_key_valuepass@@ -227,7 +201,6 @@ def LlamaDecoderLayer_fast_forward("""residual = hidden_states- # hidden_states = self.input_layernorm(hidden_states)hidden_states = fast_rms_layernorm(self.input_layernorm, hidden_states)# Self Attention@@ -245,7 +218,6 @@ def LlamaDecoderLayer_fast_forward(# Fully Connectedresidual = hidden_states- # hidden_states = self.post_attention_layernorm(hidden_states)hidden_states = fast_rms_layernorm(self.post_attention_layernorm, hidden_states)hidden_states = self.mlp(hidden_states)hidden_states = residual + hidden_states@@ -308,7 +280,7 @@ def LlamaModel_fast_forward(if (past_key_values_length != 0):position_ids = torch.arange(past_key_values_length, seq_length + past_key_values_length,- dtype = torch.int32,#dtype=torch.long,+ dtype = torch.int32,device = "cuda",)position_ids = position_ids.unsqueeze(0).view(-1, seq_length)@@ -326,11 +298,7 @@ def LlamaModel_fast_forward(inputs_embeds = self.embed_tokens(input_ids)# Ignore attention_mask- if True:- # if attention_mask is None:- # attention_mask = torch.ones(- # (batch_size, seq_length_with_past), dtype=torch.bool, device=inputs_embeds.device- # )+ if attention_mask is None:padding_mask = Noneelse:if 0 in attention_mask:@@ -339,7 +307,7 @@ def LlamaModel_fast_forward(padding_mask = Noneattention_mask = _prepare_4d_causal_attention_mask(- attention_mask, (batch_size, seq_length), inputs_embeds, past_key_values_length+ attention_mask, (batch_size, seq_length), inputs_embeds, past_key_values_length,)pass@@ -403,7 +371,6 @@ def LlamaModel_fast_forward(all_self_attns += (layer_outputs[1],)pass- # hidden_states = self.norm(hidden_states)hidden_states = fast_rms_layernorm(self.norm, hidden_states)# add hidden states from the last decoder layer@@ -466,19 +433,13 @@ def LlamaForCausalLM_fast_forward(loss = Noneif labels is not None:- # logits = logits.float()- # shift_logits = logits[..., :-1, :].contiguous()- # shift_labels = labels[..., 1:].contiguous()- # shift_labels = shift_labels.view(-1)- # shift_logits = shift_logits.view(-1, self.config.vocab_size)shift_logits = logits+ if not hasattr(self, "extra_ignored_labels"):+ # Fixes https://github.com/unslothai/unsloth/issues/10+ self.extra_ignored_labels = torch.full((self.max_seq_length, 1), -100, device = "cuda")+ pass+shift_labels = torch.hstack((labels[..., 1:], self.extra_ignored_labels[:labels.shape[0]]))-- # loss_fct = torch.nn.CrossEntropyLoss(- # ignore_index = self.ignore_index,- # label_smoothing = self.label_smoothing,- # )- # loss = loss_fct(shift_logits, shift_labels)loss = fast_cross_entropy_loss(logits = shift_logits,labels = shift_labels,@@ -547,13 +508,14 @@ class FastLlamaModel:load_in_4bit = True,token = None,device_map = "sequential",+ rope_scaling = None,):gpu_stats = torch.cuda.get_device_properties(0)max_memory = round(gpu_stats.total_memory / 1024 / 1024 / 1024, 3)SUPPORTS_BFLOAT16 = torch.cuda.is_bf16_supported()statistics = \- "==((====))== Unsloth: Fast Llama patching release 23.11\n"\+ "==((====))== Unsloth: Fast Llama patching release 2023.12\n"\f" \\\ /| GPU: {gpu_stats.name}. Max memory: {max_memory} GB\n"\f"O^O/ \_/ \\ CUDA compute capability = {gpu_stats.major}.{gpu_stats.minor}\n"\f"\ / Pytorch version: {torch.__version__}. CUDA Toolkit = {torch.version.cuda}\n"\@@ -570,9 +532,20 @@ class FastLlamaModel:assert(dtype == torch.float16 or dtype == torch.bfloat16 or dtype == torch.float32)- # [TODO]: Determine RoPE scaling- # https://github.com/huggingface/transformers/pull/24653- assert(max_seq_length <= 4096)+ # RoPE scaling+ model_max_seq_length = \+ AutoConfig.from_pretrained(model_name, token = token).max_position_embeddings++ if (rope_scaling is None) and (max_seq_length > model_max_seq_length):+ rope_scaling = max_seq_length / model_max_seq_length+ logger.warning_once(+ f"Unsloth: {model_name} can only handle sequence lengths of of most "\+ f"{model_max_seq_length}.\nBut with kaiokendev's RoPE scaling of "\+ f"{round(rope_scaling, 3)}, it can be magically be extended to "\+ f"{max_seq_length}!"+ )+ rope_scaling = {"type": "linear", "factor": rope_scaling,}+ passbnb_config = Noneif load_in_4bit:@@ -589,6 +562,7 @@ class FastLlamaModel:torch_dtype = dtype,quantization_config = bnb_config,token = token,+ rope_scaling = rope_scaling,)tokenizer = AutoTokenizer.from_pretrained(model_name,@@ -596,9 +570,22 @@ class FastLlamaModel:padding_side = "right",token = token,)- tokenizer.add_special_tokens({"pad_token" : tokenizer.unk_token});- tokenizer.pad_token = tokenizer.unk_token- config = model.config.update({"pad_token_id" : tokenizer.unk_token_id});++ if not hasattr(tokenizer, "pad_token"):+ # Fixes https://github.com/unslothai/unsloth/issues/5+ if hasattr(tokenizer, "unk_token"):+ tokenizer.add_special_tokens({"pad_token" : tokenizer.unk_token})+ tokenizer.pad_token = tokenizer.unk_token+ else:+ logger.warning_one(+ f"{model_name} does not have a padding or unknown token!\n"\+ f"Will use the EOS token of id {tokenizer.eos_token_id} as padding."+ )+ assert(hasattr(tokenizer, "eos_token"))+ tokenizer.add_special_tokens({"pad_token" : tokenizer.eos_token})+ tokenizer.pad_token = tokenizer.eos_token+ config = model.config.update({"pad_token_id" : tokenizer.eos_token_id})+ passmodel = FastLlamaModel.post_patch(model)@@ -607,6 +594,8 @@ class FastLlamaModel:layer.self_attn.apply_qkv = original_apply_qkvlayer.self_attn.apply_o = original_apply_opass++ model.max_seq_length = max_seq_lengthreturn model, tokenizerpass@@ -668,6 +657,8 @@ class FastLlamaModel:random_state = 3407,max_seq_length = 2048,):+ assert(max_seq_length <= model.max_seq_length)+if lora_dropout != 0:raise TypeError("Unsloth: Fast Llama patching only works with dropout = 0.")if bias != "none":@@ -727,8 +718,14 @@ class FastLlamaModel:pass# Patch cross entropy loss labels- model.model.extra_ignored_labels = torch.full((max_seq_length, 1), -100, device = "cuda")-+ # Fixes https://github.com/unslothai/unsloth/issues/10+ extra_ignored_labels = torch.full((max_seq_length, 1), -100, device = "cuda")+ model.model.extra_ignored_labels = extra_ignored_labels+ internal_model = model+ while hasattr(internal_model, "model"):+ internal_model.max_seq_length = max_seq_length+ internal_model = internal_model.model+ passreturn modelpasspass