# zihangdai/xlnet

XLNet: Generalized Autoregressive Pretraining for Language Understanding

Repository: https://github.com/zihangdai/xlnet
Canonical: https://ross.abutalabs.com/products/xlnet
Language: Python
License: Apache-2.0
License Family: permissive
Topics: tensorflow, nlp, deep-learning
Last push: 2023-05-28T15:42:23+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2632, "days_push": 1193, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6188, forks 1149 (observed 2026-08-28T04:09:38.922678+00:00)

## What it is
XLNet is a generalized autoregressive pretraining method for language representation learning, built on Transformer-XL. This repo provides TensorFlow code and pretrained XLNet-Base/Large models for NLP tasks like question answering, classification, and GLUE benchmarks.

## Use cases
- fine-tune a pretrained language model for question answering
- run sentiment analysis with XLNet
- reproduce GLUE benchmark results
- pretrain a transformer language model on custom text
- compare XLNet vs BERT on NLP tasks

## When to choose
- you need a strong 2019-era pretrained model with long-context handling
- you work in TensorFlow and want XLNet checkpoints

## When to avoid
- you want actively maintained code or PyTorch/HuggingFace integration
- you need the latest state-of-the-art LLMs

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, nlp, deep-learning
- domain: deep-learning
- platform: python
- tags: pretrained-language-model, transformer, xlnet, research, natural-language-processing, tensorflow

## Member repositories
- zihangdai/xlnet (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:38.922678+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:21:26.897572+00:00, confidence not recorded.
  - readme: https://github.com/zihangdai/xlnet (fetched 2026-08-28T04:09:38.922678+00:00, sha 6bb637d02709)
- Data as of 2026-08-30T08:39:29.467469+00:00.
