# thunlp/ERNIE

Source code and dataset for ACL 2019 paper "ERNIE: Enhanced Language Representation with Informative Entities"

Repository: https://github.com/thunlp/ERNIE
Canonical: https://ross.abutalabs.com/products/thunlp-ernie
Language: Python
License: MIT
License Family: permissive
Last push: 2024-01-10T11:53:50+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": 2665, "days_push": 966, "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 1417, forks 262 (observed 2026-08-28T04:04:40.055827+00:00)

## What it is
ERNIE is a PyTorch toolkit and dataset for augmenting pre-trained language models like BERT with knowledge graph entity representations, from the ACL 2019 paper by Tsinghua's THUNLP. It includes pre-training data pipelines and fine-tuning commands for knowledge-driven NLP tasks.

## Use cases
- augment BERT with knowledge graph entities
- fine-tune a knowledge-enhanced language model
- run entity typing on FIGER or OpenEntity
- relation classification on FewRel or TACRED
- pretrain a language model on Wikipedia with entity links
- compare knowledge-enhanced vs vanilla BERT performance

## When to choose
- you need entity/knowledge-graph-aware language representations for NLP research
- you want to reproduce or extend the ACL 2019 ERNIE paper
- your downstream tasks benefit from informative entity signals, like entity typing or relation classification

## When to avoid
- you need a modern, actively maintained LLM toolkit - the codebase targets old PyTorch versions
- you want plug-and-play inference rather than research code requiring custom data pipelines
- your tasks do not benefit from knowledge graph entity information

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, nlp, llm-training
- domain: machine-learning, deep-learning, artificial-intelligence
- platform: python, cross-platform
- tags: knowledge-graph, pretrained-language-model, bert, entity-typing, relation-classification, research-code, pytorch, natural-language-processing, linux

## Member repositories
- thunlp/ERNIE (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:40.055827+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-30T04:38:02.863346+00:00, confidence not recorded.
  - readme: https://github.com/thunlp/ERNIE (fetched 2026-08-28T04:04:40.055827+00:00, sha 864616603972)
- Data as of 2026-08-30T08:39:29.467469+00:00.
