You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/nlu/using-bert.rst
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,16 +81,19 @@ config/config-heavy.yml
81
81
82
82
Note the differences in these files.
83
83
84
-
In the light configuration we have a CountVectorsFeaturizer, which we
85
-
replace in the heavy variant with a HFTransformersNLP together with the
86
-
LanguageModelTokenizer and LanguageModelFeaturizer. Notice that we're
87
-
no longer using the original WhitespaceTokenizer because tokenization
88
-
is now handled by Bert.
84
+
In the light configuration we have :ref:`CountVectorsFeaturizer` which create bag-of-word
85
+
representations for each incoming message(at word and character levels). The heavy configuration replaces it with a
86
+
BERT model inside the pipeline. :ref:`HFTransformersNLP` is a utility component that does the heavy lifting work of loading the
87
+
``BERT`` model in memory. Under the hood it leverages HuggingFace's `Transformers library <https://huggingface.co/transformers/>`_ to initialize the specified language model.
88
+
Notice that we add two additional components :ref:`LanguageModelTokenizer` and :ref:`LanguageModelFeaturizer` which
89
+
pick up the tokens and feature vectors respectively that are constructed by the utility component.
90
+
91
+
We use the same :ref:`diet-classifier` model for combined intent classification and entity recognition in both cases.
89
92
90
93
Run the Pipelines
91
94
-----------------
92
95
93
-
You can run both configuarions yourself.
96
+
You can run both configurations yourself.
94
97
95
98
.. code-block:: yaml
96
99
@@ -127,7 +130,7 @@ something to seriously consider.
127
130
Results
128
131
-------
129
132
130
-
We've summerised the results into two charts, one for intents and
133
+
We've summarised the results into two charts, one for intents and
0 commit comments