How to use GPU to train my model

rasa-x 0.42.5 rasa-sdk :2.8.4

I have about 5000 nul data, everytime train model in rasa-x is too slow, How do I speed up my training

It has some methods use GPU to train my model ? if have ,hao to config

Looking forward to your reply


you mean training examples right? and can you tell us what time it’s taking to train the model? please also share your system configuration i.e RAM, CPU etc.


train the model taking more than 2 hours and popup error “Training failed”


Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
Stepping:              7
CPU MHz:               2500.002
BogoMIPS:              5000.00
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              1024K
L3 cache:              36608K
NUMA node0 CPU(s):     0-3


               total        used        free      shared  buff/cache   available
Mem:          31490       17902        4076          14        9510       13182

and there is my rasa config

language: zh

  - name: components.nlu.tokenizers.bert_tokenizer.CustomBertTokenizer
    cache_dir: ./tmp
    model_weights: pre_models
  - name: LanguageModelFeaturizer
    cache_dir: ./tmp
    model_name: bert
    model_weights: pre_models
  - name: DIETClassifier
    epochs: 100
    constrain_similarities: True
    model_confidence: linear_norm
    entity_recognition: false
    evaluate_on_number_of_examples: 1000
    evaluate_every_number_of_epochs: 5
    tensorboard_log_directory: "./tensorboard"
    tensorboard_log_level: "epoch"
    number_of_negative_examples: 20
  - name: RegexEntityExtractor
  - name: EntitySynonymMapper
  - name: ResponseSelector
    retrieval_intent: faq
    scale_loss: false
    epochs: 100
  - name: ResponseSelector
    retrieval_intent: 闲聊
    scale_loss: false
    epochs: 100
  - name: FallbackClassifier
    threshold: 0.5
#    ambiguity_threshold: 0.1

   - name: AugmentedMemoizationPolicy
   - name: TEDPolicy
     max_history: 5
     epochs: 100
   - name: RulePolicy
     core_fallback_threshold: 0.3
     core_fallback_action_name: "action_default_fallback"
     enable_fallback_prediction: True

when i train about 3000 examples ,it take about 40 minutes and train success

Strange, can you train the same by using rasa open-source, please and check the time of training?

use rasa open-source also too slowly. it take more than two hours and training is not over

phew again strange :frowning: