# Rasa 1.10.14 DIETClassifier takes a very long time and it's not using GPU

**URL:** <https://forum.rasa.com/t/rasa-1-10-14-dietclassifier-takes-a-very-long-time-and-its-not-using-gpu/37167>\
**Category:** Rasa Open Source\
**Created:** [November 19, 2020, 5:35pm UTC](https://forum.rasa.com/t/rasa-1-10-14-dietclassifier-takes-a-very-long-time-and-its-not-using-gpu/37167 "2020-11-19T17:35:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaoloRossi79](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/paolorossi79/32/11887_2.png) [@PaoloRossi79](https://forum.rasa.com/u/PaoloRossi79)\
**Post date:** [November 19, 2020, 5:35pm UTC](https://forum.rasa.com/t/rasa-1-10-14-dietclassifier-takes-a-very-long-time-and-its-not-using-gpu/37167/1 "2020-11-19T17:35:24Z")

</div>

HI, I’m using for an important client a data model (58 intents, an average of 115 utterances per intent) on Rasa Open Source (NLU only) 1.10.14, but it’s taking more than 2 hours to train and it seems not using GPU. The VM used is very powerful: 2 x Tesla V100, 12 vCPU and 224 GB of RAM. Here the config file:

> # Configuration for Rasa NLU.
> 
> # [https://rasa.com/docs/rasa/nlu/components/](https://rasa.com/docs/rasa/nlu/components/)
> 
> language: “en”
> 
> pipeline:
> 
> - name: HFTransformersNLP model\_weights: roberta-large-mnli model\_name: “roberta”
> - name: LanguageModelTokenizer
> - name: LanguageModelFeaturizer
> - name: CountVectorsFeaturizer analyzer: char\_wb min\_ngram: 1 max\_ngram: 4
> - name: CountVectorsFeaturizer
> - name: DIETClassifier epochs: 300 num\_transformer\_layers: 4 transformer\_size: 256 use\_masked\_language\_model: True drop\_rate: 0.25 weight\_sparsity: 0.7 batch\_size: [64,256] embedding\_dimension: 30 hidden\_layer\_sizes: text: [512,128]
> 
> # Configuration for Rasa Core.
> 
> # [Policies](https://rasa.com/docs/rasa/core/policies/)
> 
> # Ted policy
> 
> policies:
> 
> - name: TEDPolicy max\_history: 5 epochs: 100 batch\_size: 50
> - name: MemoizationPolicy
> - name: MappingPolicy
> - name: FallbackPolicy nlu\_threshold: 0.3 core\_threshold: 0.3 ambiguity\_threshold: 0.02

Here the length while training with 400 epochs (but even with 300 it’s almost the same time) Epochs: 20%|████▉ | 82/400 [29:34\<1:47:52, 20.36s/it, t\_loss=4.797, m\_loss=0.757, i\_loss=0.127, entity\_loss=0.235, m\_acc=0.914, i\_acc=0.981, entity\_f1=0.937]

Here the Nvidia-smi log:

 ![no-gpu](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/7/714b66f955b199b43496c791d0b04c28b6e09d3a.png)

Here a screenshot of the training phase with expected time:

 ![Rasa-runningTime](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/49e1b137749b0800e761e0cc17755e72a159aa32.png)

Any suggestion about how to reduce the training time (without changing training data and config, it’s a client one)? And any suggestion about the GPU not being used? I’m happy to provide further details once requested, Thanks a lot! Paolo

---

<div class="post-metadata">

**Author:** ![kalpa916](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@kalpa916](https://forum.rasa.com/u/kalpa916)\
**Post date:** [June 29, 2022, 3:44pm UTC](https://forum.rasa.com/t/rasa-1-10-14-dietclassifier-takes-a-very-long-time-and-its-not-using-gpu/37167/2 "2022-06-29T15:44:38Z")

</div>

@PaoloRossi79 do you get some clarification.I also changed to GPU but it’s not figured it out yet
