# facebookresearch/XLM

PyTorch original implementation of Cross-lingual Language Model Pretraining.

Repository: https://github.com/facebookresearch/XLM
Canonical: https://ross.abutalabs.com/products/xlm
Language: Python
License: NOASSERTION
License Family: other
Archived: true
Last push: 2023-02-14T14:44:13+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2770, "days_push": 1296, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2920, forks 498 (observed 2026-08-28T04:07:30.179188+00:00)

## What it is
PyTorch implementation of Cross-lingual Language Model Pretraining (XLM) from Facebook AI Research, covering MLM, CLM, and TLM objectives plus XLM-R. It includes pretrained models and fine-tuning code for GLUE, XNLI, and supervised/unsupervised machine translation.

## Use cases
- pretrain a cross-lingual language model
- fine-tune BERT-style models on XNLI
- train unsupervised machine translation models
- reproduce the XLM research paper
- run masked language model pretraining on custom corpora
- evaluate cross-lingual text classification

## When to choose
- you need the original XLM/XLM-R research code and pretrained weights
- you want to experiment with cross-lingual pretraining objectives like TLM
- you need multi-GPU/multi-node pretraining in PyTorch

## When to avoid
- you want a maintained library for production NLP - use Hugging Face Transformers instead
- you need modern tooling or recent PyTorch support (code tested on PyTorch 0.4/1.0)
- you only need inference with pretrained multilingual models

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, llm-training, nlp
- domain: machine-learning, deep-learning
- platform: python
- tags: pytorch, cross-lingual, pretraining, bert, machine-translation, research-code, facebook-research, natural-language-processing, gpu, linux

## Member repositories
- facebookresearch/XLM (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:30.179188+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:33:51.067337+00:00, confidence not recorded.
  - readme: https://github.com/facebookresearch/XLM (fetched 2026-08-28T04:07:30.179188+00:00, sha 2bf84f798a85)
- Data as of 2026-08-30T08:39:29.467469+00:00.
