This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.0.x).

Version: Master/Unreleased


HFTransformersNLP Objects

class HFTransformersNLP(Component)

Utility Component for interfacing between Transformers library and Rasa OS.

The transformers( library is used to load pre-trained language models like BERT, GPT-2, etc. The component also tokenizes and featurizes dense featurizable attributes of each message.


| train(training_data: TrainingData, config: Optional[RasaNLUModelConfig] = None, **kwargs: Any, ,) -> None

Compute tokens and dense features for each message in training data.


  • training_data - NLU training data to be tokenized and featurized
  • config - NLU pipeline config consisting of all components.


| process(message: Message, **kwargs: Any) -> None

Process an incoming message by computing its tokens and dense features.


  • message - Incoming message object