# Problem loading local dataset using TRL

**URL:** <https://discuss.huggingface.co/t/problem-loading-local-dataset-using-trl/81900>\
**Category:** Beginners\
**Created:** [April 15, 2024, 6:37pm UTC](https://discuss.huggingface.co/t/problem-loading-local-dataset-using-trl/81900 "2024-04-15T18:37:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![symonjsg](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@symonjsg](https://discuss.huggingface.co/u/symonjsg)\
**Post date:** [April 15, 2024, 6:37pm UTC](https://discuss.huggingface.co/t/problem-loading-local-dataset-using-trl/81900/1 "2024-04-15T18:37:15Z")

</div>

I’ve managed to run and fine-tune on an example huggingface dataset per the instructions here:[Welcome Gemma - Google’s new open LLM](https://huggingface.co/blog/gemma#fine-tuning-with-%F0%9F%A4%97-trl)

However, when I can’t seem to load a local dataset of my own construction. I have a folder with following structure:

Directory  
-train.csv  
-test.csv

But the following code (with substitutions for the bolded text) throws “error sft.py: error: the following arguments are required: --output\_dir”:

accelerate launch --config\_file examples/accelerate\_configs/multi\_gpu.yaml --num\_processes=1  
examples/scripts/sft.py  
–model\_name google/gemma-7b  
–dataset\_name **path/to/mycorpus**  
–per\_device\_train\_batch\_size 2  
–gradient\_accumulation\_steps 1  
–learning\_rate 2e-4  
–save\_steps 20\_000  
–use\_peft  
–lora\_r 16 --lora\_alpha 32  
–lora\_target\_modules q\_proj k\_proj v\_proj o\_proj  
–load\_in\_4bit  
–output\_dir **myOutputDir**

This code is only minimally different from the working code below, using a dataset from the huggingface hub:

accelerate launch --config\_file examples/accelerate\_configs/multi\_gpu.yaml --num\_processes=1   
examples/scripts/sft.py   
–model\_name google/gemma-7b   
–dataset\_name OpenAssistant/oasst\_top1\_2023-08-25   
–per\_device\_train\_batch\_size 2   
–gradient\_accumulation\_steps 1   
–learning\_rate 2e-4   
–save\_steps 20\_000   
–use\_peft   
–lora\_r 16 --lora\_alpha 32   
–lora\_target\_modules q\_proj k\_proj v\_proj o\_proj   
–load\_in\_4bit   
–output\_dir gemma-finetuned-openassistant

What am I doing wrong? What is the minimal change to the example script needed to finetune the model on my own **local** dataset?
