Skip to content

Commit 4e6d8fa

Browse files
Nits in "Fine-tuning a Multilingual Reasoner with Hugging Face" recipe (#1999)
1 parent 6ac62d9 commit 4e6d8fa

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

articles/gpt-oss/fine-tune-transfomers.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@
190190
"source": [
191191
"|||\n",
192192
"| :---- | :--|\n",
193-
"| `developer` | The developer message is used to provide custom instructions for the model (what we usually call the `system` role) |\n",
194-
"| `user` | The user message is used to provide the input to the model |\n",
193+
"| `developer` | The developer message is used to provide custom instructions for the model (what we usually call the `system` role). |\n",
194+
"| `user` | The user message is used to provide the input to the model. |\n",
195195
"| `assistant` | Output by the model which can either be a tool call or a message output. The output might also be associated with a particular “channel” identifying what the intent of the message is. |\n",
196-
"| `analysis` | These are messages that are being used by the model for its chain-of thought |\n",
196+
"| `analysis` | These are messages that are being used by the model for its chain-of-thought |\n",
197197
"| `final` | Messages tagged in the final channel are messages intended to be shown to the end-user and represent the responses from the model. |\n",
198198
"| `messages` | The list of messages that combine the content of the above to produce a full conversation. This is the input to the model. |"
199199
]
@@ -345,7 +345,7 @@
345345
"\n",
346346
"To do so, we will use a technique called [LoRA](https://huggingface.co/learn/llm-course/chapter11/4) (Low-Rank Adaptation) to fine-tune the model. This technique allows us to tune a few specific layers of the model, which is particularly useful for large models like `openai/gpt-oss-20b`.\n",
347347
"\n",
348-
"First we need wrap the model as a `PeftModel` and define the LoRA configuration. We will use the `LoraConfig` class from the [PEFT library](https://github.com/huggingface/peft) to do this:"
348+
"First we need to wrap the model as a `PeftModel` and define the LoRA configuration. We will use the `LoraConfig` class from the [PEFT library](https://github.com/huggingface/peft) to do this:"
349349
]
350350
},
351351
{
@@ -604,7 +604,6 @@
604604
"metadata": {},
605605
"outputs": [],
606606
"source": [
607-
"\n",
608607
"REASONING_LANGUAGE = \"Chinese\" # or Hindi, or any other language...\n",
609608
"SYSTEM_PROMPT = f\"reasoning language: {REASONING_LANGUAGE}\"\n",
610609
"USER_PROMPT = \"What is the national symbol of Canada?\"\n",

0 commit comments

Comments
 (0)