{ "cells": [ { "cell_type": "markdown", "id": "072120f9", "metadata": {}, "source": [ "If you would like to modify a base model to add our custom reasoning tokens,\n", "here's how to do it.\n", "\n", "Firstly, please install the `add-tokens` extra via\n", "`pip install ether0[add-tokens]` for the `transformers` package.\n", "\n", "Then, configure the following inputs." ] }, { "cell_type": "code", "execution_count": null, "id": "a2fb6296", "metadata": {}, "outputs": [], "source": [ "# Model name/revisions for Hugging Face Hub\n", "input_model_name = \"mistralai/Mistral-Small-24B-Instruct-2501\"\n", "input_model_revision: str | None = None\n", "output_model_name = \"FILL ME IN\"\n", "output_model_revision: str | None = None\n", "output_model_is_private = True\n", "tokenizer_only = False # Set True to only update the tokenizer\n", "push_to_hf = False # Set True to push to Hugging Face Hub\n", "\n", "# Chat template file that uses the new tokens\n", "chat_template_path = \"updated_mistral_chat_template.jinja\"" ] }, { "cell_type": "code", "execution_count": null, "id": "99927d80", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8e15d3fb5e864e1286cf94fc588e504d", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Loading checkpoint shards: 0%| | 0/10 [00:00