# Dataset format which will be given SFTTrainer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-format-which-will-be-given-sfttrainer%2F92430%3E%5C
**Category:** 🤗Transformers\
**Created:** [June 16, 2024, 2:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-format-which-will-be-given-sfttrainer%2F92430 "2024-06-16T14:35:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjrlwjd1](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@tjrlwjd1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftjrlwjd1)%5C
**Post date:** [June 16, 2024, 2:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-format-which-will-be-given-sfttrainer%2F92430%2F1 "2024-06-16T14:35:22Z")

</div>

As I mentioned in title, I’m curious what is exact format of dataset which will be given SFTTrainer?

I want to finetune a LLM in Code Generation task.  
Below is the my ideal situation.

When model is given the below:  
{Natural Language Problem(e.g. Code competition problem),  
I want to make model answer(code) like the below:  
{Solution Code}.

I made the dataset(Dataset class) with columns (“prompt”, “completion”).  
Then, I look at train\_dataset after pass SFTTrainer.

\<start token for tokenizer\> \<INST\> {Natural Language Problem} \</INST\> {Solution Code}\ .

I am wondering that is it wrong??  
If it is, please let me know how to make a dataset, especially column names.

In addition, I tried to use DataCollatorForCompletionOnly. But it didn’t work (always train loss = 0)
