# Training with Trainer really slow

**URL:** <https://discuss.huggingface.co/t/training-with-trainer-really-slow/42925>\
**Category:** 🤗Transformers\
**Created:** [June 12, 2023, 12:27pm UTC](https://discuss.huggingface.co/t/training-with-trainer-really-slow/42925 "2023-06-12T12:27:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![srivassid](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@srivassid](https://discuss.huggingface.co/u/srivassid)\
**Post date:** [June 12, 2023, 12:27pm UTC](https://discuss.huggingface.co/t/training-with-trainer-really-slow/42925/1 "2023-06-12T12:27:35Z")

</div>

Hi

I am trying out this tutorial here ([Iink](https://huggingface.co/learn/nlp-course/chapter7/6)), which is about training a large language model from scratch, but the training process is really slow with Trainer. For the 6 GB dataset, it is mentioned that it will take about 20 hours for the full dataset, 2 hours for 10% of the dataset, but i see that it’ll take 15 days for training to complete for the whole dataset.

I think some part of the code is being executed on CPU, (I see something about iterations per second), and i was wondering if there is any way to speed it up?

I am a beginner at this. I have 2x3080TI gpus, and a really slow CPU. 64 gigs of RAM.

Thanks

---

<div class="post-metadata">

**Author:** ![Zoe0427](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/zoe0427/32/53729_2.png) [@Zoe0427](https://discuss.huggingface.co/u/Zoe0427)\
**Post date:** [October 27, 2025, 8:20pm UTC](https://discuss.huggingface.co/t/training-with-trainer-really-slow/42925/2 "2025-10-27T20:20:09Z")

</div>

I think I met the similar issue. I think `trainer` is slow to start to train, like this issue [https://github.com/huggingface/transformers/issues/19245](https://github.com/huggingface/transformers/issues/19245)
