MacBERT's repository holds no weights, no code and no tokenizer
Revisiting Pre-trained Models for Chinese Natural Language Processing (MacBERT)
At a glance
- What is it?
- A Chinese BERT variant whose pretraining task writes a synonym into the mask instead of a placeholder, documented in a repository that carries two READMEs and a pictures folder, with the checkpoints hosted on other people's accounts.
- Who is it for?
- MacBERT is a model you fetch from elsewhere, described by a repository you can read in five minutes. Use the hfl checkpoints with stock BERT classes, and read the results tables as best of ten figures rather than averages, since the gap between the two is widest on the row carrying the strongest claim.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 7 months ago.
- What is it written in?
- GitHub does not report a main language for this repository.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- ymcui/MacBERT728 ★ · +7
| Repository | 2026-09-17 | 2026-11-15 |
|---|---|---|
| ymcui/MacBERT | 721 | 728 |
7 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The tree holds two READMEs and a pictures folder
MacBERT is distributed as prose. The listing runs .github/, .gitignore, LICENSE, README.md, README_EN.md and pics/, and that is all of it: no Python module, no tokenizer, no configuration file, no checkpoint. The top line offers two languages, Simplified Chinese in README.md and English in README_EN.md. The tables and the figures below come from the Chinese side. What you clone is a pointer file. The 102M and 324M parameter checkpoints belong to a different account and live under the hfl namespace on HuggingFace, which is also where the model names in the loading table come from, so the repository you are reading and the model you will run are maintained by different people.
The download table hands out extraction codes inside the links
Two rows, two sizes, two hosts each. MacBERT-large, Chinese is listed as 24-layer, 1024-hidden, 16-heads and 324M parameters at 1.2G, and MacBERT-base, Chinese as 12-layer, 768-hidden, 12-heads and 102M at 383M. Both rows point at hfl/chinese-macbert-large and hfl/chinese-macbert-base, and both also point at a Baidu Pan link for the TensorFlow version of the weights. Each of those two Baidu links carries its extraction code as a pwd parameter inside the URL, zejf for the large archive and 61ga for the base one. That is convenient for a single download and it is also a permanent public record of the share codes, so anyone mirroring these files has to expect that trail to exist.
Loading MacBERT means calling the stock BERT classes
The loading section is two lines, and the model identifier is the hfl path from the download table:
tokenizer = BertTokenizer.from_pretrained("MODEL_NAME")
model = BertModel.from_pretrained("MODEL_NAME")The classes are the plain ones. There is no MacBertTokenizer and no MacBertModel to import, and the text asks readers in bold to load MacBERT with BertTokenizer and BertModel. That is the practical shape of the design: the vocabulary is rebuilt so the mask token carries a synonym instead of a placeholder, the architecture is left alone, and changing one model string is the whole migration for a pipeline already written against BERT. The framing sentence in the introduction claims a main framework completely identical to BERT, switchable over without touching existing code.
A missing synonym becomes a random word
The pretraining task is named MLM as correction. Plain masked language modeling inserts a [MASK] token, and that token never turns up in downstream work, which the paper treats as an inconsistency between pretraining and the task that follows. MacBERT writes a similar word into the gap instead. Synonyms come from a toolkit cited as Wang and Hu, 2017 and hosted at github.com/chatopera/Synonyms, with word2vec similarity from Mikolov et al., 2013 underneath. Whole word masking and N-gram masking come with it, and each word in a masked N-gram is looked up separately. When no synonym is found, the substitution is a random word, which is the honest edge of the method: part of the pretraining signal is deliberate noise, and how much depends on the coverage of a synonym list from 2017.
The headline scores are the best of ten runs
One sentence above the tables explains the notation: to keep the numbers stable, the page gives the average of ten independent runs inside parentheses and the maximum value outside them. Read that way, every plain number in these tables is a best case with the mean sitting beside it in brackets. The distance between the two varies by row, and it is widest where the claim is boldest. On the CMRC 2018 challenge set MacBERT-base is 30.2 EM with 26.4 in parentheses, a spread of 3.8 points and the widest in that column, while ELECTRA-base sits at 22.6 (21.7) and RoBERTa-wwm-ext at 26.2 (24.6). The large row is thinner: MacBERT-large reaches 31.9 (29.6) against RoBERTa-wwm-ext-large at 31.5 (30.1), so that headline lead is 0.4 EM and 0.1 F1.
The same dataset is linked under two organizations
DRCD appears twice with two different addresses. In the list of six downstream tasks it links to github.com/DRCSolutionService/DRCD, and in the section that describes the dataset it links to github.com/DRCKnowledgeTeam/DRCD. Both entries describe the same set, extractive reading comprehension in Traditional Chinese, SQuAD in form, released by a Delta research institute in Taiwan. Whichever address a reader follows, the surrounding note matters more than the link: ERNIE is advised against for this data because traditional characters were dropped from its vocabulary, with conversion to Simplified Chinese offered as the workaround. Two of the six task links are plain http, the LCQMC and BQ Corpus pages, sitting among https addresses.
The news block is a portfolio, and it stops in 2023
Five of the news entries point away from this repository. Chinese-LLaMA-Alpaca from March 2023, PERT from March 2022, TextPruner from December 2021 and CINO from October 2021, with the two pruning and distillation tools hosted on the airaria account, and a July 2021 entry for a book sold through a JD.com item page. Only two entries concern MacBERT itself: the paper's acceptance at Findings of EMNLP in September 2020, and the release of the pretrained Chinese model in November 2020, which notes that usage is identical to BERT. The newest entry is from March 2023. The default branch is master, its last commit is dated 2026-04-19, and the repository has never published a release.
The contents promise an FAQ and a citation the text does not reach
The table of contents names six sections: an introduction, download, quick loading, baseline results, an FAQ and a citation block. The text reaches the fourth. The baseline section opens six downstream tasks, CMRC 2018, DRCD, XNLI, ChnSentiCorp, LCQMC and BQ Corpus, and two of them get tables. CMRC 2018 runs nine rows from BERT-base to MacBERT-large across development, test and challenge splits. DRCD gets three rows, and the third ends mid-cell at 83.6 in the test column. The other four tasks carry no numbers here, with XNLI pointing at a BERT multilingual page and ChnSentiCorp at someone else's classification repository, and the FAQ and citation sections named in the contents are not written out. The paper is still one link away, at the ACL Anthology page and on arXiv.
Editorial conclusion
MacBERT is a model you fetch from elsewhere, described by a repository you can read in five minutes. Use the hfl checkpoints with stock BERT classes, and read the results tables as best of ten figures rather than averages, since the gap between the two is widest on the row carrying the strongest claim. Anyone building on this model should also note that no weight sits in version control here, the download codes are public, and no release has ever been published.
Frequently asked questions
Where do the MacBERT weights come from?
Not from this repository, whose listing holds two READMEs, a license, a .github folder and pics/. The checkpoints are published under the hfl account on HuggingFace as hfl/chinese-macbert-large and hfl/chinese-macbert-base, with TensorFlow copies on Baidu Pan whose links carry their extraction codes in the URL.
Which classes does MacBERT need to be loaded with?
The stock ones from transformers. The page asks for BertTokenizer and BertModel with the hfl model path passed to from_pretrained, and names no MacBert specific class of its own.
What does the number outside the parentheses mean in the MacBERT results tables?
It is the maximum over ten independent runs, and the parenthesised value is the average of those runs. On the CMRC 2018 challenge set MacBERT-base reads 30.2 EM with 26.4 averaged.
Is the ymcui MacBERT repository still being updated?
Its default branch is master and the last commit is dated 2026-04-19, and no release has been published. The newest entry in its news block is from March 2023 and points at a different project, Chinese-LLaMA-Alpaca.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ymcui-macbert)Star history chart for your README
[](https://hysenlabs.com/projects/ymcui-macbert)Was this useful?