# Finetuning with SFTtrainer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuning-with-sfttrainer%2F91770%3E%5C
**Category:** Intermediate\
**Created:** [June 12, 2024, 2:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuning-with-sfttrainer%2F91770 "2024-06-12T14:14:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naviiiid](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@naviiiid](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnaviiiid)%5C
**Post date:** [June 12, 2024, 2:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuning-with-sfttrainer%2F91770%2F1 "2024-06-12T14:14:41Z")

</div>

Hell everyone!  
I’ve been trying to finetune a GPT based model using SFT trainer from TRl library. it is my understanding that you could directly pass a non-tokenized dataset and the SFT trainer class handles the tokenization internally.  
However after defining my dataset(with only one row named “text”), the error “you should provide a list of encodings but you have provided none” is raised.  
what could be the problem here??  
#Intermediate #TRL #SFTTrainer

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [June 12, 2024, 2:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuning-with-sfttrainer%2F91770%2F2 "2024-06-12T14:16:28Z")

</div>

See my answer here: [Fine tune with SFTTrainer - #8 by nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tune-with-sfttrainer%2F67311%2F8)
