commit ce0fb28caeb3eab30363c93a304f2d79834443da Author: ModelHub XC Date: Sun Jun 28 16:58:12 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: unsloth/gpt-oss-20b-GGUF Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d13ea17 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,65 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bin.* filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zstandard filter=lfs diff=lfs merge=lfs -text +*.tfevents* filter=lfs diff=lfs merge=lfs -text +*.db* filter=lfs diff=lfs merge=lfs -text +*.ark* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.gguf* filter=lfs diff=lfs merge=lfs -text +*.ggml filter=lfs diff=lfs merge=lfs -text +*.llamafile* filter=lfs diff=lfs merge=lfs -text +*.pt2 filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-BF16.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-F16.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-F32.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q2_K_L.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-UD-Q4_K_XL.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-UD-Q6_K_XL.gguf filter=lfs diff=lfs merge=lfs -text +gpt-oss-20b-UD-Q8_K_XL.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c6ef50 --- /dev/null +++ b/README.md @@ -0,0 +1,205 @@ +--- +base_model: +- openai/gpt-oss-20b +license: apache-2.0 +pipeline_tag: text-generation +library_name: transformers +tags: +- openai +- unsloth +--- +# Read our How to [Run gpt-oss Guide here!](https://docs.unsloth.ai/models/gpt-oss-how-to-run-and-fine-tune) + +
+

+ See our collection for all versions of gpt-oss including GGUF, 4-bit & 16-bit formats. +

+

+ Learn to run gpt-oss correctly - Read our Guide. +

+

+ See Unsloth Dynamic 2.0 GGUFs for our quantization benchmarks. +

+
+ + + + + + + + + +
+

✨ Read our gpt-oss Guide here!

+
+ +- Fine-tune gpt-oss-20b for free using our [Google Colab notebook](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/gpt-oss-(20B)-Fine-tuning.ipynb) +- Read our Blog about gpt-oss support: [unsloth.ai/blog/gpt-oss](https://unsloth.ai/blog/gpt-oss) +- View the rest of our notebooks in our [docs here](https://docs.unsloth.ai/get-started/unsloth-notebooks). +- Thank you to the [llama.cpp](https://github.com/ggml-org/llama.cpp) team for their work on supporting this model. We wouldn't be able to release quants without them! + +The F32 quant is MXFP4 upcasted to BF16 for every single layer and is unquantized. + +# gpt-oss-20b Details + +

+ gpt-oss-20b +

+ +

+ Try gpt-oss · + Guides · + System card · + OpenAI blog +

+ +
+ +Welcome to the gpt-oss series, [OpenAI’s open-weight models](https://openai.com/open-models) designed for powerful reasoning, agentic tasks, and versatile developer use cases. + +We’re releasing two flavors of the open models: +- `gpt-oss-120b` — for production, general purpose, high reasoning use cases that fits into a single H100 GPU (117B parameters with 5.1B active parameters) +- `gpt-oss-20b` — for lower latency, and local or specialized use cases (21B parameters with 3.6B active parameters) + +Both models were trained on our [harmony response format](https://github.com/openai/harmony) and should only be used with the harmony format as it will not work correctly otherwise. + + +> [!NOTE] +> This model card is dedicated to the smaller `gpt-oss-20b` model. Check out [`gpt-oss-120b`](https://huggingface.co/openai/gpt-oss-120b) for the larger model. + +# Highlights + +* **Permissive Apache 2.0 license:** Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment. +* **Configurable reasoning effort:** Easily adjust the reasoning effort (low, medium, high) based on your specific use case and latency needs. +* **Full chain-of-thought:** Gain complete access to the model’s reasoning process, facilitating easier debugging and increased trust in outputs. It’s not intended to be shown to end users. +* **Fine-tunable:** Fully customize models to your specific use case through parameter fine-tuning. +* **Agentic capabilities:** Use the models’ native capabilities for function calling, [web browsing](https://github.com/openai/gpt-oss/tree/main?tab=readme-ov-file#browser), [Python code execution](https://github.com/openai/gpt-oss/tree/main?tab=readme-ov-file#python), and Structured Outputs. +* **Native MXFP4 quantization:** The models are trained with native MXFP4 precision for the MoE layer, making `gpt-oss-120b` run on a single H100 GPU and the `gpt-oss-20b` model run within 16GB of memory. + +--- + +# Inference examples + +## Transformers + +You can use `gpt-oss-120b` and `gpt-oss-20b` with Transformers. If you use the Transformers chat template, it will automatically apply the [harmony response format](https://github.com/openai/harmony). If you use `model.generate` directly, you need to apply the harmony format manually using the chat template or use our [openai-harmony](https://github.com/openai/harmony) package. + +To get started, install the necessary dependencies to setup your environment: + +``` +pip install -U transformers kernels torch +``` + +Once, setup you can proceed to run the model by running the snippet below: + +```py +from transformers import pipeline +import torch + +model_id = "openai/gpt-oss-20b" + +pipe = pipeline( + "text-generation", + model=model_id, + torch_dtype="auto", + device_map="auto", +) + +messages = [ + {"role": "user", "content": "Explain quantum mechanics clearly and concisely."}, +] + +outputs = pipe( + messages, + max_new_tokens=256, +) +print(outputs[0]["generated_text"][-1]) +``` + +Alternatively, you can run the model via [`Transformers Serve`](https://huggingface.co/docs/transformers/main/serving) to spin up a OpenAI-compatible webserver: + +``` +transformers serve +transformers chat localhost:8000 --model-name-or-path openai/gpt-oss-20b +``` + +[Learn more about how to use gpt-oss with Transformers.](https://cookbook.openai.com/articles/gpt-oss/run-transformers) + +## vLLM + +vLLM recommends using [uv](https://docs.astral.sh/uv/) for Python dependency management. You can use vLLM to spin up an OpenAI-compatible webserver. The following command will automatically download the model and start the server. + +```bash +uv pip install --pre vllm==0.10.1+gptoss \ + --extra-index-url https://wheels.vllm.ai/gpt-oss/ \ + --extra-index-url https://download.pytorch.org/whl/nightly/cu128 \ + --index-strategy unsafe-best-match + +vllm serve openai/gpt-oss-20b +``` + +[Learn more about how to use gpt-oss with vLLM.](https://cookbook.openai.com/articles/gpt-oss/run-vllm) + +## PyTorch / Triton + +To learn about how to use this model with PyTorch and Triton, check out our [reference implementations in the gpt-oss repository](https://github.com/openai/gpt-oss?tab=readme-ov-file#reference-pytorch-implementation). + +## Ollama + +If you are trying to run gpt-oss on consumer hardware, you can use Ollama by running the following commands after [installing Ollama](https://ollama.com/download). + +```bash +# gpt-oss-20b +ollama pull gpt-oss:20b +ollama run gpt-oss:20b +``` + +[Learn more about how to use gpt-oss with Ollama.](https://cookbook.openai.com/articles/gpt-oss/run-locally-ollama) + +#### LM Studio + +If you are using [LM Studio](https://lmstudio.ai/) you can use the following commands to download. + +```bash +# gpt-oss-20b +lms get openai/gpt-oss-20b +``` + +Check out our [awesome list](https://github.com/openai/gpt-oss/blob/main/awesome-gpt-oss.md) for a broader collection of gpt-oss resources and inference partners. + +--- + +# Download the model + +You can download the model weights from the [Hugging Face Hub](https://huggingface.co/collections/openai/gpt-oss-68911959590a1634ba11c7a4) directly from Hugging Face CLI: + +```shell +# gpt-oss-20b +huggingface-cli download openai/gpt-oss-20b --include "original/*" --local-dir gpt-oss-20b/ +pip install gpt-oss +python -m gpt_oss.chat model/ +``` + +# Reasoning levels + +You can adjust the reasoning level that suits your task across three levels: + +* **Low:** Fast responses for general dialogue. +* **Medium:** Balanced speed and detail. +* **High:** Deep and detailed analysis. + +The reasoning level can be set in the system prompts, e.g., "Reasoning: high". + +# Tool use + +The gpt-oss models are excellent for: +* Web browsing (using built-in browsing tools) +* Function calling with defined schemas +* Agentic operations like browser tasks + +# Fine-tuning + +Both gpt-oss models can be fine-tuned for a variety of specialized use cases. + +This smaller model `gpt-oss-20b` can be fine-tuned on consumer hardware, whereas the larger [`gpt-oss-120b`](https://huggingface.co/openai/gpt-oss-120b) can be fine-tuned on a single H100 node. diff --git a/config.json b/config.json new file mode 100644 index 0000000..2a40409 --- /dev/null +++ b/config.json @@ -0,0 +1,69 @@ +{ + "architectures": [ + "GptOssForCausalLM" + ], + "attention_bias": true, + "attention_dropout": 0.0, + "eos_token_id": 200002, + "experts_per_token": 4, + "head_dim": 64, + "hidden_act": "silu", + "hidden_size": 2880, + "initial_context_length": 4096, + "initializer_range": 0.02, + "intermediate_size": 2880, + "layer_types": [ + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention", + "sliding_attention", + "full_attention" + ], + "max_position_embeddings": 131072, + "model_type": "gpt_oss", + "num_attention_heads": 64, + "num_experts_per_tok": 4, + "num_hidden_layers": 24, + "num_key_value_heads": 8, + "num_local_experts": 32, + "output_router_logits": false, + "pad_token_id": 200017, + "rms_norm_eps": 1e-05, + "rope_scaling": { + "beta_fast": 32.0, + "beta_slow": 1.0, + "factor": 32.0, + "original_max_position_embeddings": 4096, + "rope_type": "yarn", + "truncate": false + }, + "rope_theta": 150000, + "router_aux_loss_coef": 0.9, + "sliding_window": 128, + "swiglu_limit": 7.0, + "tie_word_embeddings": false, + "torch_dtype": "bfloat16", + "transformers_version": "4.55.0", + "unsloth_fixed": true, + "use_cache": true, + "vocab_size": 201088 +} diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..159097f --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework": "pytorch", "task": "others", "allow_remote": true} \ No newline at end of file diff --git a/gpt-oss-20b-F16.gguf b/gpt-oss-20b-F16.gguf new file mode 100644 index 0000000..3333323 --- /dev/null +++ b/gpt-oss-20b-F16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e4f9cd88d6456e4f389e7262eca4a8d565211e2b22ece9ca7a8556168ff3c66 +size 13792639168 diff --git a/gpt-oss-20b-Q2_K.gguf b/gpt-oss-20b-Q2_K.gguf new file mode 100644 index 0000000..8d1e23a --- /dev/null +++ b/gpt-oss-20b-Q2_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:129b8e3865517cbba55bbb7d4f0cc2444a014e73a619eafbac247ef6573a19ee +size 11468317888 diff --git a/gpt-oss-20b-Q2_K_L.gguf b/gpt-oss-20b-Q2_K_L.gguf new file mode 100644 index 0000000..3576e4d --- /dev/null +++ b/gpt-oss-20b-Q2_K_L.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14de8eca18d52ae76449e0869bfb215686b212716787356b5bdd20793f82c6dc +size 11757884608 diff --git a/gpt-oss-20b-Q3_K_M.gguf b/gpt-oss-20b-Q3_K_M.gguf new file mode 100644 index 0000000..b04e9a2 --- /dev/null +++ b/gpt-oss-20b-Q3_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc02b57e05cfef36b1f6f4a952666a76b26838f8cf431412cb0cd19f41cf8040 +size 11506103488 diff --git a/gpt-oss-20b-Q3_K_S.gguf b/gpt-oss-20b-Q3_K_S.gguf new file mode 100644 index 0000000..5f14752 --- /dev/null +++ b/gpt-oss-20b-Q3_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8deacd2c5ed46d1a62368c52e44abdb55e32a2aa0e5acea86d18d8258339f17d +size 11463894208 diff --git a/gpt-oss-20b-Q4_0.gguf b/gpt-oss-20b-Q4_0.gguf new file mode 100644 index 0000000..554fc94 --- /dev/null +++ b/gpt-oss-20b-Q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f5890ffd832518b1843b8e1b39125c70fb2c104a6e88613d70f45efa6aaba0e +size 11501495488 diff --git a/gpt-oss-20b-Q4_1.gguf b/gpt-oss-20b-Q4_1.gguf new file mode 100644 index 0000000..3671c4b --- /dev/null +++ b/gpt-oss-20b-Q4_1.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de7e287610b8d792090cc3b001fe91957d3738197e53af83f763810c06d519e0 +size 11577504448 diff --git a/gpt-oss-20b-Q4_K_M.gguf b/gpt-oss-20b-Q4_K_M.gguf new file mode 100644 index 0000000..132e1d5 --- /dev/null +++ b/gpt-oss-20b-Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c27536640e410032865dc68781d80a08b98f8db5e93575919af8ccc0568aeb4f +size 11624759488 diff --git a/gpt-oss-20b-Q4_K_S.gguf b/gpt-oss-20b-Q4_K_S.gguf new file mode 100644 index 0000000..8a3bb82 --- /dev/null +++ b/gpt-oss-20b-Q4_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c5483e8749f4865f1aae2c36b796e7b8c43ec02c5a74d663a82a5fe916b2298 +size 11618492608 diff --git a/gpt-oss-20b-Q5_K_M.gguf b/gpt-oss-20b-Q5_K_M.gguf new file mode 100644 index 0000000..ddce211 --- /dev/null +++ b/gpt-oss-20b-Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c3814533c5b4c84d42b5dce4376bbdfd7227e990b8733a3a1c4f741355b3e75 +size 11717357248 diff --git a/gpt-oss-20b-Q5_K_S.gguf b/gpt-oss-20b-Q5_K_S.gguf new file mode 100644 index 0000000..e9116a5 --- /dev/null +++ b/gpt-oss-20b-Q5_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9a5c5312dcf63af3ab5a2a2aed6e3bc86d51d452bce364ff44f573a8b089141 +size 11711827648 diff --git a/gpt-oss-20b-Q6_K.gguf b/gpt-oss-20b-Q6_K.gguf new file mode 100644 index 0000000..9d60f95 --- /dev/null +++ b/gpt-oss-20b-Q6_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2ead52a7842a556ea10d5edd91a88e5af974856d2485ecaad3aade679832935 +size 12041000128 diff --git a/gpt-oss-20b-Q8_0.gguf b/gpt-oss-20b-Q8_0.gguf new file mode 100644 index 0000000..663c053 --- /dev/null +++ b/gpt-oss-20b-Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcd455d4034ec02f71a875b46cb17df44a97911d7258291973be4d21f98329f3 +size 12109567168 diff --git a/gpt-oss-20b-UD-Q4_K_XL.gguf b/gpt-oss-20b-UD-Q4_K_XL.gguf new file mode 100644 index 0000000..a098217 --- /dev/null +++ b/gpt-oss-20b-UD-Q4_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10fe673de12c20b74b8d670a9fdf0fd36b43b0a86ffc04daeb175c0a2b98c4f9 +size 11872347328 diff --git a/gpt-oss-20b-UD-Q6_K_XL.gguf b/gpt-oss-20b-UD-Q6_K_XL.gguf new file mode 100644 index 0000000..9d60f95 --- /dev/null +++ b/gpt-oss-20b-UD-Q6_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2ead52a7842a556ea10d5edd91a88e5af974856d2485ecaad3aade679832935 +size 12041000128 diff --git a/gpt-oss-20b-UD-Q8_K_XL.gguf b/gpt-oss-20b-UD-Q8_K_XL.gguf new file mode 100644 index 0000000..7e40820 --- /dev/null +++ b/gpt-oss-20b-UD-Q8_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b97fa9f3efa642ef3abd599a170f0b26612e5179a4ef5c65fb8852fb974ec239 +size 13195442368 diff --git a/notebook.ipynb b/notebook.ipynb new file mode 100644 index 0000000..ee3c94c --- /dev/null +++ b/notebook.ipynb @@ -0,0 +1,2487 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To run this, press \"*Runtime*\" and press \"*Run all*\" on a **free** Tesla T4 Google Colab instance!\n", + "
\n", + "\n", + "\n", + " Join Discord if you need help + \u2b50 Star us on Github \u2b50\n", + "
\n", + "\n", + "To install Unsloth on your own computer, follow the installation instructions on our Github page [here](https://docs.unsloth.ai/get-started/installing-+-updating).\n", + "\n", + "You will learn how to do [data prep](#Data), how to [train](#Train), how to [run the model](#Inference), & [how to save it](#Save)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### News" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "[Vision RL](https://docs.unsloth.ai/new/vision-reinforcement-learning-vlm-rl) is now supported! Train Qwen2.5-VL, Gemma 3 etc. with GSPO or GRPO.\n", + "\n", + "Introducing Unsloth [Standby for RL](https://docs.unsloth.ai/basics/memory-efficient-rl): GRPO is now faster, uses 30% less memory with 2x longer context.\n", + "\n", + "Gpt-oss fine-tuning now supports 8\u00d7 longer context with 0 accuracy loss. [Read more](https://docs.unsloth.ai/basics/long-context-gpt-oss-training)\n", + "\n", + "Unsloth now supports Text-to-Speech (TTS) models. Read our [guide here](https://docs.unsloth.ai/basics/text-to-speech-tts-fine-tuning).\n", + "\n", + "Visit our docs for all our [model uploads](https://docs.unsloth.ai/get-started/all-our-models) and [notebooks](https://docs.unsloth.ai/get-started/unsloth-notebooks).\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Installation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": "%%capture\n# We're installing the latest Torch, Triton, OpenAI's Triton kernels, Transformers and Unsloth!\n!pip install --upgrade -qqq uv\ntry: import numpy; get_numpy = f\"numpy=={numpy.__version__}\"\nexcept: get_numpy = \"numpy\"\n!uv pip install -qqq \\\n \"torch>=2.8.0\" \"triton>=3.4.0\" {get_numpy} torchvision bitsandbytes \"transformers>=4.55.3\" \\\n \"unsloth_zoo[base] @ git+https://github.com/unslothai/unsloth-zoo\" \\\n \"unsloth[base] @ git+https://github.com/unslothai/unsloth\" \\\n git+https://github.com/triton-lang/triton.git@05b2c186c1b6c9a08375389d5efe9cb4c401c075#subdirectory=python/triton_kernels\n!uv pip install transformers==4.55.4\n!uv pip install --no-deps trl==0.22.2" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%capture\n", + "!uv pip install --force-reinstall --no-deps git+https://github.com/unslothai/unsloth-zoo\n", + "!uv pip install --force-reinstall --no-deps git+https://github.com/unslothai/unsloth" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Unsloth" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "r2v_X2fA0Df5" + }, + "source": [ + "We're about to demonstrate the power of the new OpenAI GPT-OSS 20B model through an inference example. For our `MXFP4` version, use this [notebook](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/GPT_OSS_MXFP4_(20B)-Inference.ipynb) instead." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 371, + "referenced_widgets": [ + "7ca2facea2414549ab2a0a3fd07a0723", + "78676eb3a75f45ed860b488a42fb9bc5", + "b69b75dd3b5745f4a7f869f7ba6593d4", + "ea10da0d677849c28bfdfc9206ac1b73", + "493f6a1af5e94b5eb88a4935361a88c3", + "1a4ef35565f54388afdf1839055eb5c8", + "07ae7e9f6861403ea8064a98f4063754", + "fc2ce36bb32f4c648ccb06d65a4e2aea", + "bf44ec9413b24dda932f575ebe32b222", + "2ad28d8e556b4e17b0859aa3683d31c6", + "e32220b1d3f14386834bcd3736ac9888", + "d9c5466214ed4f06876a89c64c29048f", + "1e0c170f075b43ad9e2d39fcdbaa0a06", + "00abd0bd091f4258b7f61d80ecb3118e", + "0f2c8641a38043d2a218ec0809e7a7d3", + "948972fa1a2e400097b590ad47ff6f3d", + "47a13a9b02ad4181b74cc1f5ddeb3f3f", + "7c01111484b14a5999d48393085b0264", + "fb1a288281fc446788fdd0f432b4732c", + "2f026e4c1ff34aafbf7c5deff6c1e66f", + "acc52213c033476885ee30fb92f55e23", + "9caec4d2cb6e4a72b7155912787d3139", + "2abdab3fdd4f4a70a8faaa7b0e39f811", + "4d432e4349964027bae76c34f5734fcf", + "630c170c04494811b21992d6886a3015", + "cb9a92b76a1d4b189e7ed783bde524c9", + "ccc49354213c4c1394855986a0e07483", + "7bf239e457f04e15b4b0e458f0dd1e19", + "f5c6558ef929438eb117159de0285a58", + "447aa145c09c4c6f8bd9ce3ea8b5cd44", + "9c82690bd07346d1ab875bdf5ed80154", + "5200dae3ba2346c1bca27530b82b38b4", + "c7a3b0cba7ee49ba929e0038d9c03e98", + "36250ac65fcb4756a4368f98902a1617", + "705a1673de934cce8418f7893fbf780a", + "1f7ed3fc3a824e119cf559af8bc7c370", + "cafc86be3bd94bc79cb07bc94461ec5d", + "0c190d903a38402ab452de0a0100a8eb", + "b3362bda7942432692049558d0cdf14e", + "4afb54f2995447e68ae3a8129325ffdc", + "31c7337bfd504409992b7e04b713c243", + "9b5a45647bd74e8c878cf6ba43b27190", + "b9c9010af82b4678af43a20546f3ad49", + "9b818c8e8bac40edb97abf8a266ab28e", + "ebaa8d22074d495ea675f51dc2d5a4d6", + "8fecfa968d55466ba8f42730d32bd9b4", + "dd0e8e4cb46945df8dbec4fefd720358", + "60a80b3316c14ce79945e06cb190be39", + "4f0e06a2e2204dad9f29a1697edd4218", + "66527058da914c73b48221011a2b605a", + "58413234f68b484693f0719166942214", + "84b3814386ee4d04b9817f0da2108725", + "01ede422dc5f4d4da7f913880db4984d", + "2e9f87f895344785855cca39bb64d5e2", + "5512e17f3864445a875e640937f296ef", + "932920c0ee834e3e8ffe53ebf7833fa7", + "cb65c93ecef84c2c947c67481326691c", + "73c3f04df8044f34ab45b92c174e121e", + "13b8be4a5af14bfdbbce24d185187906", + "21d8ebf7cbfd4e2b9db111d163aad8b8", + "3122a97298124d0ab0e6297960c132e2", + "cc829a40832849f586b077f6d8e5795b", + "3f5a8b6d049244959c1558c56483f643", + "11fea1d7e4a8426d98165fa5ca7fc650", + "fc3715b03c5249438965886892ba07bb", + "05d6f6c3efed4ecf9893c8aa86fe4176" + ] + }, + "id": "QmUBVEnvCDJv", + "outputId": "14ca09b9-e1ff-4f91-b98c-7a1ed22eef3a" + }, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "7ca2facea2414549ab2a0a3fd07a0723", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "config.json: 0%| | 0.00/1.15k [00:00.\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "d9c5466214ed4f06876a89c64c29048f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "model.safetensors: 0%| | 0.00/5.70G [00:00\n", + " \n", + " \n", + " \n", + "\n", + " Join Discord if you need help + \u2b50\ufe0f Star us on Github \u2b50\ufe0f\n", + "\n" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "00abd0bd091f4258b7f61d80ecb3118e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fb1a288281fc446788fdd0f432b4732c", + "max": 5702746403, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2f026e4c1ff34aafbf7c5deff6c1e66f", + "value": 5702746403 + } + }, + "01ede422dc5f4d4da7f913880db4984d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "05d6f6c3efed4ecf9893c8aa86fe4176": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "07ae7e9f6861403ea8064a98f4063754": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "0c190d903a38402ab452de0a0100a8eb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "0f2c8641a38043d2a218ec0809e7a7d3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_acc52213c033476885ee30fb92f55e23", + "placeholder": "\u200b", + "style": "IPY_MODEL_9caec4d2cb6e4a72b7155912787d3139", + "value": "\u20075.70G/5.70G\u2007[00:40<00:00,\u2007158MB/s]" + } + }, + "11fea1d7e4a8426d98165fa5ca7fc650": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "13b8be4a5af14bfdbbce24d185187906": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fc3715b03c5249438965886892ba07bb", + "placeholder": "\u200b", + "style": "IPY_MODEL_05d6f6c3efed4ecf9893c8aa86fe4176", + "value": "\u2007449/449\u2007[00:00<00:00,\u200727.4kB/s]" + } + }, + "1a4ef35565f54388afdf1839055eb5c8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1e0c170f075b43ad9e2d39fcdbaa0a06": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_47a13a9b02ad4181b74cc1f5ddeb3f3f", + "placeholder": "\u200b", + "style": "IPY_MODEL_7c01111484b14a5999d48393085b0264", + "value": "model.safetensors:\u2007100%" + } + }, + "1f7ed3fc3a824e119cf559af8bc7c370": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_31c7337bfd504409992b7e04b713c243", + "max": 51015, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_9b5a45647bd74e8c878cf6ba43b27190", + "value": 51015 + } + }, + "21d8ebf7cbfd4e2b9db111d163aad8b8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2abdab3fdd4f4a70a8faaa7b0e39f811": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_4d432e4349964027bae76c34f5734fcf", + "IPY_MODEL_630c170c04494811b21992d6886a3015", + "IPY_MODEL_cb9a92b76a1d4b189e7ed783bde524c9" + ], + "layout": "IPY_MODEL_ccc49354213c4c1394855986a0e07483" + } + }, + "2ad28d8e556b4e17b0859aa3683d31c6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2e9f87f895344785855cca39bb64d5e2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "2f026e4c1ff34aafbf7c5deff6c1e66f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3122a97298124d0ab0e6297960c132e2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "31c7337bfd504409992b7e04b713c243": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "36250ac65fcb4756a4368f98902a1617": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_705a1673de934cce8418f7893fbf780a", + "IPY_MODEL_1f7ed3fc3a824e119cf559af8bc7c370", + "IPY_MODEL_cafc86be3bd94bc79cb07bc94461ec5d" + ], + "layout": "IPY_MODEL_0c190d903a38402ab452de0a0100a8eb" + } + }, + "3f5a8b6d049244959c1558c56483f643": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "447aa145c09c4c6f8bd9ce3ea8b5cd44": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "47a13a9b02ad4181b74cc1f5ddeb3f3f": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "493f6a1af5e94b5eb88a4935361a88c3": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "4afb54f2995447e68ae3a8129325ffdc": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "4d432e4349964027bae76c34f5734fcf": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7bf239e457f04e15b4b0e458f0dd1e19", + "placeholder": "\u200b", + "style": "IPY_MODEL_f5c6558ef929438eb117159de0285a58", + "value": "generation_config.json:\u2007100%" + } + }, + "4f0e06a2e2204dad9f29a1697edd4218": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5200dae3ba2346c1bca27530b82b38b4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "5512e17f3864445a875e640937f296ef": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "58413234f68b484693f0719166942214": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "60a80b3316c14ce79945e06cb190be39": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2e9f87f895344785855cca39bb64d5e2", + "placeholder": "\u200b", + "style": "IPY_MODEL_5512e17f3864445a875e640937f296ef", + "value": "\u20079.09M/9.09M\u2007[00:00<00:00,\u200715.6MB/s]" + } + }, + "630c170c04494811b21992d6886a3015": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_447aa145c09c4c6f8bd9ce3ea8b5cd44", + "max": 131, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_9c82690bd07346d1ab875bdf5ed80154", + "value": 131 + } + }, + "66527058da914c73b48221011a2b605a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "705a1673de934cce8418f7893fbf780a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b3362bda7942432692049558d0cdf14e", + "placeholder": "\u200b", + "style": "IPY_MODEL_4afb54f2995447e68ae3a8129325ffdc", + "value": "tokenizer_config.json:\u2007100%" + } + }, + "73c3f04df8044f34ab45b92c174e121e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3f5a8b6d049244959c1558c56483f643", + "max": 449, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_11fea1d7e4a8426d98165fa5ca7fc650", + "value": 449 + } + }, + "78676eb3a75f45ed860b488a42fb9bc5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_1a4ef35565f54388afdf1839055eb5c8", + "placeholder": "\u200b", + "style": "IPY_MODEL_07ae7e9f6861403ea8064a98f4063754", + "value": "config.json:\u2007100%" + } + }, + "7bf239e457f04e15b4b0e458f0dd1e19": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "7c01111484b14a5999d48393085b0264": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "7ca2facea2414549ab2a0a3fd07a0723": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_78676eb3a75f45ed860b488a42fb9bc5", + "IPY_MODEL_b69b75dd3b5745f4a7f869f7ba6593d4", + "IPY_MODEL_ea10da0d677849c28bfdfc9206ac1b73" + ], + "layout": "IPY_MODEL_493f6a1af5e94b5eb88a4935361a88c3" + } + }, + "84b3814386ee4d04b9817f0da2108725": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "8fecfa968d55466ba8f42730d32bd9b4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_66527058da914c73b48221011a2b605a", + "placeholder": "\u200b", + "style": "IPY_MODEL_58413234f68b484693f0719166942214", + "value": "tokenizer.json:\u2007100%" + } + }, + "932920c0ee834e3e8ffe53ebf7833fa7": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_cb65c93ecef84c2c947c67481326691c", + "IPY_MODEL_73c3f04df8044f34ab45b92c174e121e", + "IPY_MODEL_13b8be4a5af14bfdbbce24d185187906" + ], + "layout": "IPY_MODEL_21d8ebf7cbfd4e2b9db111d163aad8b8" + } + }, + "948972fa1a2e400097b590ad47ff6f3d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "9b5a45647bd74e8c878cf6ba43b27190": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "9b818c8e8bac40edb97abf8a266ab28e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9c82690bd07346d1ab875bdf5ed80154": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "9caec4d2cb6e4a72b7155912787d3139": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "acc52213c033476885ee30fb92f55e23": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b3362bda7942432692049558d0cdf14e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b69b75dd3b5745f4a7f869f7ba6593d4": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_fc2ce36bb32f4c648ccb06d65a4e2aea", + "max": 1149, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_bf44ec9413b24dda932f575ebe32b222", + "value": 1149 + } + }, + "b9c9010af82b4678af43a20546f3ad49": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bf44ec9413b24dda932f575ebe32b222": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "c7a3b0cba7ee49ba929e0038d9c03e98": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "cafc86be3bd94bc79cb07bc94461ec5d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b9c9010af82b4678af43a20546f3ad49", + "placeholder": "\u200b", + "style": "IPY_MODEL_9b818c8e8bac40edb97abf8a266ab28e", + "value": "\u200751.0k/51.0k\u2007[00:00<00:00,\u2007623kB/s]" + } + }, + "cb65c93ecef84c2c947c67481326691c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3122a97298124d0ab0e6297960c132e2", + "placeholder": "\u200b", + "style": "IPY_MODEL_cc829a40832849f586b077f6d8e5795b", + "value": "special_tokens_map.json:\u2007100%" + } + }, + "cb9a92b76a1d4b189e7ed783bde524c9": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5200dae3ba2346c1bca27530b82b38b4", + "placeholder": "\u200b", + "style": "IPY_MODEL_c7a3b0cba7ee49ba929e0038d9c03e98", + "value": "\u2007131/131\u2007[00:00<00:00,\u20075.52kB/s]" + } + }, + "cc829a40832849f586b077f6d8e5795b": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ccc49354213c4c1394855986a0e07483": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d9c5466214ed4f06876a89c64c29048f": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_1e0c170f075b43ad9e2d39fcdbaa0a06", + "IPY_MODEL_00abd0bd091f4258b7f61d80ecb3118e", + "IPY_MODEL_0f2c8641a38043d2a218ec0809e7a7d3" + ], + "layout": "IPY_MODEL_948972fa1a2e400097b590ad47ff6f3d" + } + }, + "dd0e8e4cb46945df8dbec4fefd720358": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_84b3814386ee4d04b9817f0da2108725", + "max": 9085698, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_01ede422dc5f4d4da7f913880db4984d", + "value": 9085698 + } + }, + "e32220b1d3f14386834bcd3736ac9888": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "ea10da0d677849c28bfdfc9206ac1b73": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_2ad28d8e556b4e17b0859aa3683d31c6", + "placeholder": "\u200b", + "style": "IPY_MODEL_e32220b1d3f14386834bcd3736ac9888", + "value": "\u20071.15k/1.15k\u2007[00:00<00:00,\u200749.9kB/s]" + } + }, + "ebaa8d22074d495ea675f51dc2d5a4d6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_8fecfa968d55466ba8f42730d32bd9b4", + "IPY_MODEL_dd0e8e4cb46945df8dbec4fefd720358", + "IPY_MODEL_60a80b3316c14ce79945e06cb190be39" + ], + "layout": "IPY_MODEL_4f0e06a2e2204dad9f29a1697edd4218" + } + }, + "f5c6558ef929438eb117159de0285a58": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "fb1a288281fc446788fdd0f432b4732c": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fc2ce36bb32f4c648ccb06d65a4e2aea": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fc3715b03c5249438965886892ba07bb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "state": {} + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/params b/params new file mode 100644 index 0000000..8a0f9a3 --- /dev/null +++ b/params @@ -0,0 +1,10 @@ +{ + "stop": [ + "<|endoftext|>", + "<|return|>" + ], + "temperature": 1.0, + "min_p" : 0.00, + "top_k" : 0, + "top_p" : 1.0 +} \ No newline at end of file diff --git a/template b/template new file mode 100644 index 0000000..08d0d0f --- /dev/null +++ b/template @@ -0,0 +1,173 @@ +<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI. +Knowledge cutoff: 2024-06 +Current date: {{ currentDate }} +{{- if and .IsThinkSet .Think (ne .ThinkLevel "") }} + +Reasoning: {{ .ThinkLevel }} +{{- else if or (not .IsThinkSet) (and .IsThinkSet .Think) }} + +Reasoning: medium +{{- end }} + +{{- $hasNonBuiltinTools := false }} +{{- if .Tools -}} +{{- $hasBrowserSearch := false }} +{{- $hasBrowserOpen := false }} +{{- $hasBrowserFind := false }} +{{- $hasPython := false }} + {{- range .Tools }} + {{- if eq .Function.Name "browser.search" -}}{{- $hasBrowserSearch = true -}} + {{- else if eq .Function.Name "browser.open" -}}{{- $hasBrowserOpen = true -}} + {{- else if eq .Function.Name "browser.find" -}}{{- $hasBrowserFind = true -}} + {{- else if eq .Function.Name "python" -}}{{- $hasPython = true -}} + {{- else }}{{ $hasNonBuiltinTools = true -}} + {{- end }} + {{- end }} +{{- if or $hasBrowserSearch $hasBrowserOpen $hasBrowserFind $hasPython }} + +# Tools +{{- if or $hasBrowserSearch $hasBrowserOpen $hasBrowserFind }} + +## browser + +// Tool for browsing. +// The `cursor` appears in brackets before each browsing display: `[{cursor}]`. +// Cite information from the tool using the following format: +// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`. +// Do not quote more than 10 words directly from the tool output. +// sources=web (default: web) +namespace browser { +{{- if $hasBrowserSearch }} + +// Searches for information related to `query` and displays `topn` results. +type search = (_: { +query: string, +topn?: number, // default: 10 +source?: string, +}) => any; +{{- end }} +{{- if $hasBrowserOpen }} + +// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines. +// Valid link ids are displayed with the formatting: `【{id}†.*】`. +// If `cursor` is not provided, the most recent page is implied. +// If `id` is a string, it is treated as a fully qualified URL associated with `source`. +// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available. +// Use this function without `id` to scroll to a new location of an opened page. +type open = (_: { +id?: number | string, // default: -1 +cursor?: number, // default: -1 +loc?: number, // default: -1 +num_lines?: number, // default: -1 +view_source?: boolean, // default: false +source?: string, +}) => any; +{{- end }} +{{- if $hasBrowserFind }} + +// Finds exact matches of `pattern` in the current page, or the page given by `cursor`. +type find = (_: { +pattern: string, +cursor?: number, // default: -1 +}) => any; +{{- end }} + +} // namespace browser +{{- end }}{{/* end if has browser tools */}} +{{- if $hasPython }} + +## python + +Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files). + +When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster. +{{- end }}{{/* end if hasPython */}} +{{- end }}{{/* end if has any built-in tools */}} +{{- end }}{{/* end if .Tools */}} + +# Valid channels: analysis, commentary, final. Channel must be included for every message.{{ if $hasNonBuiltinTools }} +Calls to these tools must go to the commentary channel: 'functions'. +{{- end -}}<|end|>{{/* end of system */ -}} +{{- if or $hasNonBuiltinTools .System -}} +<|start|>developer<|message|>{{- if $hasNonBuiltinTools }}# Tools + +## functions + +namespace functions { +{{- range .Tools }} +{{- if not (or (eq .Function.Name "browser.search") (eq .Function.Name "browser.open") (eq .Function.Name "browser.find") (eq .Function.Name "python")) }} +{{if .Function.Description }} +// {{ .Function.Description }} +{{- end }} +{{- if and .Function.Parameters.Properties (gt (len .Function.Parameters.Properties) 0) }} +type {{ .Function.Name }} = (_: { +{{- range $name, $prop := .Function.Parameters.Properties }} +{{- if $prop.Description }} + // {{ $prop.Description }} +{{- end }} + {{ $name }}: {{ if gt (len $prop.Type) 1 }}{{ range $i, $t := $prop.Type }}{{ if $i }} | {{ end }}{{ $t }}{{ end }}{{ else }}{{ index $prop.Type 0 }}{{ end }}, +{{- end }} +}) => any; +{{- else }} +type {{ .Function.Name }} = () => any; +{{- end }} +{{- end }}{{/* end if not browser tool */}} +{{- end }}{{/* end of range .Tools */}} + +} // namespace functions +{{- end }}{{/* end if hasNonBuiltinTools */}} +{{- if .System}} + +# Instructions + +{{ .System }} +{{- end -}} +<|end|> +{{- end -}} +{{- /* Find the index of the last user message */ -}} +{{- $lastUserIdx := -1 }} +{{- $prefillingContent := false }} +{{- $prefillingThinkingOnly := false }} +{{- range $i, $msg := .Messages }} + {{- $last := eq (len (slice $.Messages $i)) 1 -}} + {{- if eq $msg.Role "user" }} + {{- $lastUserIdx = $i }} + {{- end -}} + {{- if and $last (eq $msg.Role "assistant") (gt (len $msg.Content) 0) }} + {{- $prefillingContent = true }} + {{- else if and $last (eq $msg.Role "assistant") (gt (len $msg.Thinking) 0) }} + {{- $prefillingThinkingOnly = true }} + {{- end }} +{{- end -}} +{{- /* Now render messages */ -}} +{{- range $i, $msg := .Messages }} + {{- $last := eq (len (slice $.Messages $i)) 1 -}} + {{- if (ne $msg.Role "system") -}} + {{- if eq $msg.Role "tool" -}} + {{- if or (eq $msg.ToolName "python") (eq $msg.ToolName "browser.search") (eq $msg.ToolName "browser.open") (eq $msg.ToolName "browser.find") -}} + <|start|>{{ $msg.ToolName }} to=assistant<|message|>{{ $msg.Content }}<|end|> + {{- else -}} + <|start|>functions.{{ $msg.ToolName }} to=assistant<|message|>{{ $msg.Content }}<|end|> + {{- end -}} + {{- else if eq $msg.Role "assistant" -}} + {{- if and $msg.Thinking (gt $i $lastUserIdx) -}}{{- /* Show thinking only after last user message */ -}} + <|start|>assistant<|channel|>analysis<|message|>{{ $msg.Thinking }}{{- if not $prefillingThinkingOnly -}}<|end|>{{- end -}} + {{- end -}} + {{- if gt (len $msg.Content) 0 -}} + <|start|>assistant<|channel|>final<|message|>{{ $msg.Content }}{{- if not $prefillingContent -}}<|end|>{{- end -}} + {{- end -}} + {{- if gt (len $msg.ToolCalls) 0 -}} + {{- range $j, $toolCall := $msg.ToolCalls -}} + {{- $isBuiltin := or (eq $toolCall.Function.Name "python") (eq $toolCall.Function.Name "browser.search") (eq $toolCall.Function.Name "browser.open") (eq $toolCall.Function.Name "browser.find") -}} + <|start|>assistant<|channel|>{{ if $isBuiltin }}analysis{{ else }}commentary{{ end }} to={{ if not $isBuiltin}}functions.{{end}}{{ $toolCall.Function.Name }} <|constrain|>json<|message|>{{ $toolCall.Function.Arguments }}<|call|> + {{- end -}} + {{- end -}} + {{- else if eq $msg.Role "user" -}} + <|start|>{{ $msg.Role }}<|message|>{{ $msg.Content }}<|end|> + {{- end }} + {{- else }} + {{- end }} +{{- end -}} +{{- if not (or $prefillingContent $prefillingThinkingOnly) -}} +<|start|>assistant +{{- end -}} \ No newline at end of file