# Fine-tuning GPT-J for conversations

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-gpt-j-for-conversations%2F21016%3E%5C
**Category:** Beginners\
**Created:** [July 29, 2022, 10:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-gpt-j-for-conversations%2F21016 "2022-07-29T22:00:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eichhof](https://avatars.discourse-cdn.com/v4/letter/e/f4b2a3/32.png) [@Eichhof](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FEichhof)%5C
**Post date:** [July 29, 2022, 10:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-gpt-j-for-conversations%2F21016%2F1 "2022-07-29T22:00:17Z")

</div>

Hello

I would like to fine-tune a GPT-J model for conversations that is running locally on my machine. There are two models that I can use: The [original GPT-J model](https://huggingface.co/EleutherAI/gpt-j-6B) or the [Quantized EleutherAI/gpt-j-6b with 8-bit weights](https://huggingface.co/hivemind/gpt-j-6B-8bit). I have a machine with a 24GB GPU (RTX 3090). How much GPU memory would the original GPT-J model need for fine-tuning and for inference? As far as I understand, the main advantage of the quantized GPT-J is that it needs less GPU memory.

Second, I would like to fine-tune the GPT-J model on conversation datasets such as [daily dialog](https://huggingface.co/datasets/daily_dialog), [Blended Skill Talk](https://huggingface.co/datasets/blended_skill_talk) (but without different personas), Multi-Session Chat and Wizard of the Internet.

In general, for fine-tuning GPT-J should I just format the conversation in the following way?

> Person\_a: Say , Jim , how about going for a few beers after dinner ?  
> Person\_b: You know that is tempting but is really not good for our fitness.  
> Person\_a: What do you mean ? It will help us to relax .  
> …

Or are there any other delimiters such as `<|endoftext|>` necessary? During inference, when the user is for example sending “Hello, how are you?” to the chatbot, I would then format it as “Person\_a: Hello, how are you? Person\_b:”.

Finally, for fine-tuning I see the following options:

1. Fine-tuning on only one conversation dataset.
2. Fine-tuning on several conversation dataset and just stacking the datasets.
3. Fine-tuning on the first dataset, then fine-tuning on the second dataset and so on.

Which of these three options is best?

I’m happy about any input. Thank you very much in advance.

---

<div class="post-metadata">

**Author:** ![Kickbub](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@Kickbub](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKickbub)%5C
**Post date:** [July 29, 2022, 10:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-gpt-j-for-conversations%2F21016%2F2 "2022-07-29T22:19:41Z")

</div>

You could use deepspeed to reduce the system requirements needed for training.

[https://github.com/mallorbc/Finetune\_GPTNEO\_GPTJ6B](https://github.com/mallorbc/Finetune_GPTNEO_GPTJ6B)

---

<div class="post-metadata">

**Author:** ![doufulai](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/doufulai/32/13546_2.png) [@doufulai](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdoufulai)%5C
**Post date:** [January 15, 2023, 8:42am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-gpt-j-for-conversations%2F21016%2F3 "2023-01-15T08:42:29Z")

</div>

Have you found the answer? I am looking to finetune the model for these conversation dataset as well!
