Instructions to use NanceTide/chinese-babylm-bert-mlm-first with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NanceTide/chinese-babylm-bert-mlm-first with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="NanceTide/chinese-babylm-bert-mlm-first")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("NanceTide/chinese-babylm-bert-mlm-first") model = AutoModelForMaskedLM.from_pretrained("NanceTide/chinese-babylm-bert-mlm-first", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Chinese BabyLM First Model
This repository contains the exported base model package for the first Chinese BabyLM Track 1 masked language model checkpoint in this workspace.
This is a base BertForMaskedLM checkpoint, not a task-specific classifier.
Model summary
- Architecture:
BertForMaskedLM - Hidden size:
768 - Layers:
8 - Attention heads:
12 - Intermediate size:
3072 - Max position embeddings:
512 - Vocab size:
19907 - Weights format:
safetensors - Main weight file size: about
279 MB
Files
config.jsonmodel.safetensorstokenizer.jsontokenizer_config.jsonspecial_tokens_map.jsonvocab.txtREADME.md
Intended use
This checkpoint is suitable for:
- masked language modeling inference
- continued pretraining
- initialization for downstream Chinese classification or NLI finetuning
For downstream classification, the task head still needs to be trained.
Evaluation snapshot
Best local Track 1 candidate scores assembled on 2026-06-11:
ZhoBLiMP:75.49AFQMC:69.02OCNLI:67.56TNEWS:53.04CLUEWSC2020:63.82
These results were produced in the local competition workspace and should be treated as project-side reporting rather than an official leaderboard submission.
Quick start
pip install torch transformers safetensors
from transformers import AutoTokenizer, AutoModelForMaskedLM
model_id = "YOUR_HF_USERNAME_OR_ORG/chinese-babylm-bert-mlm-first"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id)
model.eval()
Use as an encoder for finetuning
from transformers import AutoModel, AutoTokenizer
model_id = "YOUR_HF_USERNAME_OR_ORG/chinese-babylm-bert-mlm-first"
tokenizer = AutoTokenizer.from_pretrained(model_id)
encoder = AutoModel.from_pretrained(model_id)
encoder.eval()
If you want to start a classification model from this checkpoint:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "YOUR_HF_USERNAME_OR_ORG/chinese-babylm-bert-mlm-first"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id, num_labels=2)
The classification head created above is randomly initialized and must be finetuned on the target task.
Notes
- The export excludes intermediate training checkpoints, optimizer states, and scheduler states.
- The package is intended for distribution and reuse, not for exact training-state restoration.
- Downloads last month
- 537
Evaluation results
- accuracyself-reported69.020
- accuracyself-reported67.560
- accuracyself-reported53.040
- accuracyself-reported63.820
- accuracyself-reported75.490