# How to convert from base to instruct

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-convert-from-base-to-instruct%2F127111%3E%5C
**Category:** Beginners\
**Created:** [November 23, 2024, 8:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-convert-from-base-to-instruct%2F127111 "2024-11-23T20:57:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![etemiz](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@etemiz](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fetemiz)%5C
**Post date:** [November 23, 2024, 8:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-convert-from-base-to-instruct%2F127111%2F1 "2024-11-23T20:57:40Z")

</div>

How do I convert a base model to an instruct model? so far I tried unsloth and ms-swift and it didn’t work.

llama3.1 8b base → instruct

I know some instruct fine tuning is involved but then the model that is produced won’t have \<|eot\_id|\> as eos or correct chat template in the tokenizer\_config.json… I manually edited the files but it doesn’t seem to work.

I achieved proper answers but it doesn’t seem to end with \<|eot\_id|\>. Do I have to fine tune for days and days to see it properly end?

---

<div class="post-metadata">

**Author:** ![noicerabeta](https://avatars.discourse-cdn.com/v4/letter/n/898d66/32.png) [@noicerabeta](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnoicerabeta)%5C
**Post date:** [July 14, 2025, 3:49am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-convert-from-base-to-instruct%2F127111%2F2 "2025-07-14T03:49:02Z")

</div>

Hi, I wanted to ask—when converting a base language model into an instruction-tuned model, is it possible to do so without causing catastrophic forgetting? Specifically, I’m concerned about whether the model retains the knowledge it acquired during continued pretraining, or if that information is lost during the instruction tuning process.

and also can i know the data format you used for instruction tuning.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [July 14, 2025, 4:24am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-convert-from-base-to-instruct%2F127111%2F3 "2025-07-14T04:24:49Z")

</div>

If LoRA alone is insufficient for that purpose, there seems to be a method called `FIP`…

> **[Engineering flexible machine learning systems by traversing...](https://ar5iv.labs.arxiv.org/html/2205.00334)**

[https://www.nature.com/articles/s42256-024-00902-x](https://www.nature.com/articles/s42256-024-00902-x)

---

<div class="post-metadata">

**Author:** ![Angelina067](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/angelina067/32/51060_2.png) [@Angelina067](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAngelina067)%5C
**Post date:** [July 14, 2025, 3:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-convert-from-base-to-instruct%2F127111%2F4 "2025-07-14T15:07:46Z")

</div>

The model isn’t ending responses with `<|eot_id|>` because it wasn’t trained to do so. Just editing the config files afterward doesn’t teach the model when to stop.

Simple Solution:

1. Make sure every example in your training data ends with `<|eot_id|>` so the model learns to generate it

2. Don’t mask out `<|eot_id|>` during training - let the model learn to predict it

3. Train with the full chat template format from the start

Instead of starting from base model, try fine-tuning an existing Llama 3.1 instruct model with your specific data. This way the chat format is already learned.
