# TsinghuaAI/CPM-1-Generate

Chinese Pre-Trained Language Models (CPM-LM) Version-I

Repository: https://github.com/TsinghuaAI/CPM-1-Generate
Canonical: https://ross.abutalabs.com/products/cpm-1-generate
Language: Python
License: MIT
License Family: permissive
Last push: 2023-03-18T14:59:44+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": 2119, "days_push": 1264, "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 1578, forks 209 (observed 2026-08-28T04:05:06.674965+00:00)

## What it is
CPM-Generate provides inference code for CPM-LM, a 2.6B-parameter Chinese pre-trained language model based on the GPT-2 architecture and Megatron-LM. It supports interactive and scripted text generation, model parallelism tuning, and zero-shot evaluation on Chinese NLP benchmarks like OCNLI, TNEWS, and IFLYTEK.

## Use cases
- generate Chinese text with a large pretrained language model
- run zero-shot classification on Chinese NLP benchmarks
- experiment with few-shot and zero-shot learning in Chinese
- run a 2.6B parameter GPT-style model locally on GPUs
- adjust model parallelism size for inference

## When to choose
- you need a large Chinese-language pretrained model for text generation or zero-shot tasks
- you have multi-GPU hardware and want to run CPM-LM locally
- you want to reproduce or build on CPM-1 research

## When to avoid
- you need a lightweight model for consumer hardware - use BMInf or CPM-Distill instead
- you need a maintained general-purpose LLM framework rather than a model-specific inference repo
- you work primarily with English or multilingual models

## Facets
- artifact type: library
- maturity: maintenance
- function: llm-inference, nlp, machine-learning
- domain: large-language-models, artificial-intelligence
- platform: python
- tags: chinese-language-model, text-generation, gpt-2, zero-shot-learning, megatron-lm, sentencepiece, model-parallelism, natural-language-processing, gpu, linux, docker

## Member repositories
- TsinghuaAI/CPM-1-Generate (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:06.674965+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-30T03:56:54.384079+00:00, confidence not recorded.
  - readme: https://github.com/TsinghuaAI/CPM-1-Generate (fetched 2026-08-28T04:05:06.674965+00:00, sha 228c4c855658)
- Data as of 2026-08-30T08:39:29.467469+00:00.
