facebook / mgenre-wiki

huggingface.co
Total runs: 1.6K
24-hour runs: 0
7-day runs: 167
30-day runs: 324
Model's Last Updated: January 25 2023
text-generation

Introduction of mgenre-wiki

Model Details of mgenre-wiki

mGENRE

The mGENRE (multilingual Generative ENtity REtrieval) system as presented in Multilingual Autoregressive Entity Linking implemented in pytorch.

In a nutshell, mGENRE uses a sequence-to-sequence approach to entity retrieval (e.g., linking), based on fine-tuned mBART architecture. GENRE performs retrieval generating the unique entity name conditioned on the input text using constrained beam search to only generate valid identifiers. The model was first released in the facebookresearch/GENRE repository using fairseq (the transformers models are obtained with a conversion script similar to this .

This model was trained on 105 languages from Wikipedia.

BibTeX entry and citation info

Please consider citing our works if you use code from this repository.

@article{decao2020multilingual,
    author = {De Cao, Nicola and Wu, Ledell and Popat, Kashyap and Artetxe, Mikel 
    and Goyal, Naman and Plekhanov, Mikhail and Zettlemoyer, Luke 
    and Cancedda, Nicola and Riedel, Sebastian and Petroni, Fabio},
    title = "{Multilingual Autoregressive Entity Linking}",
    journal = {Transactions of the Association for Computational Linguistics},
    volume = {10},
    pages = {274-290},
    year = {2022},
    month = {03},
    issn = {2307-387X},
    doi = {10.1162/tacl_a_00460},
    url = {https://doi.org/10.1162/tacl\_a\_00460},
    eprint = {https://direct.mit.edu/tacl/article-pdf/doi/10.1162/tacl\_a\_00460/2004070/tacl\_a\_00460.pdf},
}
Usage

Here is an example of generation for Wikipedia page disambiguation:

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# OPTIONAL: load the prefix tree (trie), you need to additionally download
# https://huggingface.co/facebook/mgenre-wiki/blob/main/trie.py and 
# https://huggingface.co/facebook/mgenre-wiki/blob/main/titles_lang_all105_trie_with_redirect.pkl
# that is fast but memory inefficient prefix tree (trie) -- it is implemented with nested python `dict`
# NOTE: loading this map may take up to 10 minutes and occupy a lot of RAM!
# import pickle
# from trie import Trie
# with open("titles_lang_all105_marisa_trie_with_redirect.pkl", "rb") as f:
#     trie = Trie.load_from_dict(pickle.load(f))

# or a memory efficient but a bit slower prefix tree (trie) -- it is implemented with `marisa_trie` from
# https://huggingface.co/facebook/mgenre-wiki/blob/main/titles_lang_all105_marisa_trie_with_redirect.pkl
# from genre.trie import MarisaTrie
# with open("titles_lang_all105_marisa_trie_with_redirect.pkl", "rb") as f:
#     trie = pickle.load(f)

tokenizer = AutoTokenizer.from_pretrained("facebook/mgenre-wiki")
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/mgenre-wiki").eval()

sentences = ["[START] Einstein [END] era un fisico tedesco."]
# Italian for "[START] Einstein [END] was a German physicist."

outputs = model.generate(
    **tokenizer(sentences, return_tensors="pt"),
    num_beams=5,
    num_return_sequences=5,
    # OPTIONAL: use constrained beam search
    # prefix_allowed_tokens_fn=lambda batch_id, sent: trie.get(sent.tolist()),
)

tokenizer.batch_decode(outputs, skip_special_tokens=True)

which outputs the following top-5 predictions (using constrained beam search)

['Albert Einstein >> it',
 'Albert Einstein (disambiguation) >> en',
 'Alfred Einstein >> it',
 'Alberto Einstein >> it',
 'Einstein >> it']

Runs of facebook mgenre-wiki on huggingface.co

1.6K
Total runs
0
24-hour runs
-31
3-day runs
167
7-day runs
324
30-day runs

More Information About mgenre-wiki huggingface.co Model

mgenre-wiki huggingface.co

mgenre-wiki huggingface.co is an AI model on huggingface.co that provides mgenre-wiki's model effect (), which can be used instantly with this facebook mgenre-wiki model. huggingface.co supports a free trial of the mgenre-wiki model, and also provides paid use of the mgenre-wiki. Support call mgenre-wiki model through api, including Node.js, Python, http.

mgenre-wiki huggingface.co Url

https://huggingface.co/facebook/mgenre-wiki

facebook mgenre-wiki online free

mgenre-wiki huggingface.co is an online trial and call api platform, which integrates mgenre-wiki's modeling effects, including api services, and provides a free online trial of mgenre-wiki, you can try mgenre-wiki online for free by clicking the link below.

facebook mgenre-wiki online free url in huggingface.co:

https://huggingface.co/facebook/mgenre-wiki

mgenre-wiki install

mgenre-wiki is an open source model from GitHub that offers a free installation service, and any user can find mgenre-wiki on GitHub to install. At the same time, huggingface.co provides the effect of mgenre-wiki install, users can directly use mgenre-wiki installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mgenre-wiki install url in huggingface.co:

https://huggingface.co/facebook/mgenre-wiki

Url of mgenre-wiki

mgenre-wiki huggingface.co Url

Provider of mgenre-wiki huggingface.co

facebook
ORGANIZATIONS

Other API from facebook

huggingface.co

Total runs: 8.0M
Run Growth: 26.1K
Growth Rate: 0.33%
Updated:January 20 2022
huggingface.co

Total runs: 8.0M
Run Growth: -8.9M
Growth Rate: -110.38%
Updated:September 15 2023
huggingface.co

Total runs: 3.7M
Run Growth: -840.3K
Growth Rate: -21.97%
Updated:September 06 2023
huggingface.co

Total runs: 3.2M
Run Growth: 876.4K
Growth Rate: 27.17%
Updated:January 17 2024
huggingface.co

Total runs: 2.7M
Run Growth: -574.4K
Growth Rate: -20.96%
Updated:December 28 2021
huggingface.co

Total runs: 2.2M
Run Growth: 468.9K
Growth Rate: 20.87%
Updated:January 25 2024
huggingface.co

Total runs: 2.2M
Run Growth: 159.7K
Growth Rate: 7.39%
Updated:March 23 2023
huggingface.co

Total runs: 1.9M
Run Growth: -434.9K
Growth Rate: -23.25%
Updated:November 21 2025
huggingface.co

Total runs: 738.2K
Run Growth: -201.5K
Growth Rate: -27.91%
Updated:September 06 2023
huggingface.co

Total runs: 475.3K
Run Growth: -136.5K
Growth Rate: -28.37%
Updated:May 22 2023
huggingface.co

Total runs: 442.3K
Run Growth: 74.9K
Growth Rate: 16.95%
Updated:February 29 2024
huggingface.co

Total runs: 429.4K
Run Growth: -69.0K
Growth Rate: -16.06%
Updated:March 17 2025
huggingface.co

Total runs: 383.6K
Run Growth: -200.9K
Growth Rate: -51.66%
Updated:January 12 2024
huggingface.co

Total runs: 330.5K
Run Growth: -60.2K
Growth Rate: -17.53%
Updated:January 12 2024
huggingface.co

Total runs: 308.7K
Run Growth: 35.7K
Growth Rate: 11.47%
Updated:September 15 2023
huggingface.co

Total runs: 307.7K
Run Growth: -66.3K
Growth Rate: -21.68%
Updated:September 06 2023
huggingface.co

Total runs: 281.7K
Run Growth: -26.8K
Growth Rate: -9.17%
Updated:November 17 2022
huggingface.co

Total runs: 280.9K
Run Growth: 61.9K
Growth Rate: 21.40%
Updated:June 15 2023
huggingface.co

Total runs: 260.0K
Run Growth: 167.8K
Growth Rate: 63.90%
Updated:May 22 2023
huggingface.co

Total runs: 236.9K
Run Growth: 14.3K
Growth Rate: 6.02%
Updated:July 23 2024
huggingface.co

Total runs: 210.0K
Run Growth: -142.4K
Growth Rate: -65.85%
Updated:July 25 2023
huggingface.co

Total runs: 187.6K
Run Growth: 79.9K
Growth Rate: 42.35%
Updated:February 12 2023
huggingface.co

Total runs: 176.4K
Run Growth: 74.8K
Growth Rate: 42.40%
Updated:September 06 2023
huggingface.co

Total runs: 169.5K
Run Growth: -205.2K
Growth Rate: -119.47%
Updated:November 17 2023
huggingface.co

Total runs: 162.8K
Run Growth: -734
Growth Rate: -0.45%
Updated:September 01 2023
huggingface.co

Total runs: 147.1K
Run Growth: 108.3K
Growth Rate: 73.09%
Updated:November 16 2023
huggingface.co

Total runs: 120.4K
Run Growth: -3.4K
Growth Rate: -2.72%
Updated:June 03 2022
huggingface.co

Total runs: 109.8K
Run Growth: 26.2K
Growth Rate: 23.91%
Updated:November 20 2023
huggingface.co

Total runs: 109.5K
Run Growth: 25.9K
Growth Rate: 23.71%
Updated:January 25 2023
huggingface.co

Total runs: 107.8K
Run Growth: -8.5K
Growth Rate: -7.79%
Updated:September 15 2023
huggingface.co

Total runs: 104.7K
Run Growth: -8.1K
Growth Rate: -7.35%
Updated:June 13 2023
huggingface.co

Total runs: 100.3K
Run Growth: -210.0K
Growth Rate: -215.14%
Updated:June 13 2023
huggingface.co

Total runs: 86.7K
Run Growth: 59.4K
Growth Rate: 69.67%
Updated:February 12 2023
huggingface.co

Total runs: 61.6K
Run Growth: -17.6K
Growth Rate: -28.52%
Updated:March 28 2026
huggingface.co

Total runs: 59.2K
Run Growth: 16.3K
Growth Rate: 27.79%
Updated:January 25 2023
huggingface.co

Total runs: 50.1K
Run Growth: -19.8K
Growth Rate: -39.48%
Updated:January 29 2026