Error in loading fastText word embedding in rasa_nlu_example

Hi RASAian! I’ve tried to train my Word2Vec model with gensim and fastText library to use in rasa_nlu_example project pipeline. my goal is to test supervised word embedding model for improve NER. the load_model function in fasttext library could not load my .bin model. i’ve tested my model on python code and tried to load model and there isn’t any problem.

@koaning help me again!plz

my model.bin file for download: snipe of python code:

from gensim.models import Word2Vec
embedding_model = Word2Vec.load('model.bin')

rasa version:1.10.8 python: 3 extra project installation: pip install git+

pipeline config:

language: fa
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 5
  - name: rasa_nlu_examples.featurizers.dense.FastTextFeaturizer
    cache_dir: fasttext/
    file: model.bin
  - name: DIETClassifier
    epochs: 1
  - name: EntitySynonymMapper

rasa train nlu log:

Training NLU model...
Warning : `load_model` does not return WordVectorModel or SupervisedModel any more, but a `FastText` object which is very similar.
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/rasa", line 8, in <module>
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/", line 92, in main
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/cli/", line 140, in train_nlu
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/", line 414, in train_nlu
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/", line 453, in _train_nlu_async
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/", line 482, in _train_nlu_with_validated_data
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/nlu/", line 75, in train
    trainer = Trainer(nlu_config, component_builder)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/nlu/", line 145, in __init__
    self.pipeline = self._build_pipeline(cfg, component_builder)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/nlu/", line 157, in _build_pipeline
    component = component_builder.create_component(component_cfg, cfg)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/nlu/", line 781, in create_component
    component = registry.create_component_by_config(component_config, cfg)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/nlu/", line 246, in create_component_by_config
    return component_class.create(component_config, config)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/nlu/", line 489, in create
    return cls(component_config)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa_nlu_examples/featurizers/dense/", line 51, in __init__
    self.model = fasttext.load_model(path)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/fasttext/", line 441, in load_model
    return _FastText(model_path=path)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/fasttext/", line 98, in __init__
ValueError: fasttext/model.bin has wrong file format!

I think gensim has a slightly different format than fasttext. Could you add an issue on github for this one? I’m the maintainer of that project but I’m also currently on holiday. If you add this issue to github I’ll adress it when I get back.