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
{{ message }}
Repository navigation
[Question]: stack of multi-forward,multi-backward , and multi gives very low cos similarity #3688
Hello @wildfluss thats a good question. There's likely two factors at play here: very important is the amount of multilingual text data used to train these models. You could try some examples with a bigger transformer-based model such as xlm-roberta-large, which I would recommend for such use cases. The multilingual flair models are older and RNN-based, and so haven't been trained over as much data as the transformer models.
The other factor is that the flair models are character-level, whereas the transformer-based models are at the subword level. Character-level models likely learn more language-specific surface-level features which probably don't transfer too well across languages.
Hi! Drive-by triage of older issues — @alanakbik's reply above is the answer to this one (two factors: training-data volume and char-level vs sub-word granularity). The follow-up since then has been quiet for ~6 months.
Evidence:
The recommended replacement for cross-lingual cosine work is xlm-roberta-large / a transformer-based embedding, not the legacy char-level FlairEmbeddings — class lives at
— the older char-level Flair models were trained on smaller multilingual corpora than the modern transformer LMs.
The reference to issue Multilingual NER #1518 (2020) is from an era before TransformerWordEmbeddings became the default recommendation; the current tutorial and StackedEmbeddings doc point to transformer embeddings:
If there's an actionable follow-up beyond "use xlm-roberta-large instead", let me know what to look at; otherwise this can probably be closed as answered.
Disclosure: I drafted this comment with help from Claude Code while triaging stale issues; the references above were verified manually.
Activity
alanakbik commentedon Oct 29, 2025
Hello @wildfluss thats a good question. There's likely two factors at play here: very important is the amount of multilingual text data used to train these models. You could try some examples with a bigger transformer-based model such as
xlm-roberta-large, which I would recommend for such use cases. The multilingual flair models are older and RNN-based, and so haven't been trained over as much data as the transformer models.The other factor is that the flair models are character-level, whereas the transformer-based models are at the subword level. Character-level models likely learn more language-specific surface-level features which probably don't transfer too well across languages.
jbbqqf commentedon May 23, 2026
Hi! Drive-by triage of older issues —
@alanakbik's reply above is the answer to this one (two factors: training-data volume and char-level vs sub-word granularity). The follow-up since then has been quiet for ~6 months.Evidence:
xlm-roberta-large/ a transformer-based embedding, not the legacy char-levelFlairEmbeddings— class lives atflair/flair/embeddings/token.py
Line 553 in d4ea377
TransformerWordEmbeddingsbecame the default recommendation; the current tutorial andStackedEmbeddingsdoc point to transformer embeddings:flair/flair/embeddings/token.py
Line 64 in d4ea377
If there's an actionable follow-up beyond "use
xlm-roberta-largeinstead", let me know what to look at; otherwise this can probably be closed as answered.Disclosure: I drafted this comment with help from Claude Code while triaging stale issues; the references above were verified manually.