Instructions to use alphaedge-ai/mmBERT-small-zho-16384 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alphaedge-ai/mmBERT-small-zho-16384 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="alphaedge-ai/mmBERT-small-zho-16384")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("alphaedge-ai/mmBERT-small-zho-16384") model = AutoModel.from_pretrained("alphaedge-ai/mmBERT-small-zho-16384", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update model card for Chinese
Browse files
README.md
CHANGED
|
@@ -1,52 +1,62 @@
|
|
| 1 |
-
---
|
| 2 |
-
pipeline_tag: fill-mask
|
| 3 |
-
language: zho
|
| 4 |
-
license: mit
|
| 5 |
-
tags:
|
| 6 |
-
- trimmed
|
| 7 |
-
library_name: transformers
|
| 8 |
-
base_model: jhu-clsp/mmBERT-small
|
| 9 |
-
base_model_relation: quantized
|
| 10 |
-
datasets:
|
| 11 |
-
-
|
| 12 |
-
---
|
| 13 |
-
|
| 14 |
-
# mmBERT-small-zho-16384
|
| 15 |
-
This model is a 65.49% smaller version of [jhu-clsp/mmBERT-small](https://huggingface.co/jhu-clsp/mmBERT-small) optimized for Chinese language via vocabulary size reduction using the [trimming](https://huggingface.co/blog/introduction-to-trimming) method.
|
| 16 |
-
This trimmed model should perform similarly to the original model with only 16,384 tokens and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in the selected languages were removed from the vocabulary.
|
| 17 |
-
|
| 18 |
-
## Model Statistics
|
| 19 |
-
| Metric | Original | Trimmed | Reduction |
|
| 20 |
-
|--------|----------|---------|-----------|
|
| 21 |
-
| **Vocabulary size** | 256,000 tokens | 16,384 tokens | **93.60%** |
|
| 22 |
-
| **Model size** | 140,493,696 params | 48,481,152 params | **65.49%** |
|
| 23 |
-
|
| 24 |
-

|
| 36 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
##
|
| 40 |
-
|
| 41 |
-
#### mmBERT
|
| 42 |
-
```
|
| 43 |
-
@misc{marone2025mmbertmodernmultilingualencoder,
|
| 44 |
-
title={mmBERT: A Modern Multilingual Encoder with Annealed Language Learning},
|
| 45 |
-
author={Marc Marone and Orion Weller and William Fleshman and Eugene Yang and Dawn Lawrie and Benjamin Van Durme},
|
| 46 |
-
year={2025},
|
| 47 |
-
eprint={2509.06888},
|
| 48 |
-
archivePrefix={arXiv},
|
| 49 |
-
primaryClass={cs.CL},
|
| 50 |
-
url={https://arxiv.org/abs/2509.06888},
|
| 51 |
-
}
|
| 52 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: fill-mask
|
| 3 |
+
language: zho
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- trimmed
|
| 7 |
+
library_name: transformers
|
| 8 |
+
base_model: jhu-clsp/mmBERT-small
|
| 9 |
+
base_model_relation: quantized
|
| 10 |
+
datasets:
|
| 11 |
+
- lbourdois/fineweb-2-trimming
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# mmBERT-small-zho-16384
|
| 15 |
+
This model is a **65.49% smaller** version of [jhu-clsp/mmBERT-small](https://huggingface.co/jhu-clsp/mmBERT-small) optimized for **Chinese** language via vocabulary size reduction using the [trimming](https://huggingface.co/blog/lbourdois/introduction-to-trimming) method.
|
| 16 |
+
This trimmed model should perform similarly to the original model with only 16,384 tokens and a much smaller memory footprint. However, it may not perform well for other languages as tokens not commonly used in the selected languages were removed from the vocabulary.
|
| 17 |
+
|
| 18 |
+
## Model Statistics
|
| 19 |
+
| Metric | Original | Trimmed | Reduction |
|
| 20 |
+
|--------|----------|---------|-----------|
|
| 21 |
+
| **Vocabulary size** | 256,000 tokens | 16,384 tokens | **93.60%** |
|
| 22 |
+
| **Model size** | 140,493,696 params | 48,481,152 params | **65.49%** |
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
|
| 26 |
+
## Mining Dataset Statistics
|
| 27 |
+
- **Number of texts used for mining**: 200,000 texts
|
| 28 |
+
- **Dataset**: [lbourdois/fineweb-2-trimming](https://huggingface.co/datasets/lbourdois/fineweb-2-trimming)
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
```python
|
| 32 |
+
from transformers import AutoModel, AutoTokenizer
|
| 33 |
+
|
| 34 |
+
model_name = "alphaedge-ai/mmBERT-small-zho-16384"
|
| 35 |
+
model = AutoModel.from_pretrained(model_name)
|
| 36 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
## Citations
|
| 40 |
+
|
| 41 |
+
#### mmBERT
|
| 42 |
+
```
|
| 43 |
+
@misc{marone2025mmbertmodernmultilingualencoder,
|
| 44 |
+
title={mmBERT: A Modern Multilingual Encoder with Annealed Language Learning},
|
| 45 |
+
author={Marc Marone and Orion Weller and William Fleshman and Eugene Yang and Dawn Lawrie and Benjamin Van Durme},
|
| 46 |
+
year={2025},
|
| 47 |
+
eprint={2509.06888},
|
| 48 |
+
archivePrefix={arXiv},
|
| 49 |
+
primaryClass={cs.CL},
|
| 50 |
+
url={https://arxiv.org/abs/2509.06888},
|
| 51 |
+
}
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
#### Trimming blog post
|
| 55 |
+
```
|
| 56 |
+
@misc{hf_blogpost_trimming,
|
| 57 |
+
title={Introduction to Trimming},
|
| 58 |
+
author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
|
| 59 |
+
year={2026},
|
| 60 |
+
url={https://huggingface.co/blog/lbourdois/introduction-to-trimming},
|
| 61 |
+
}
|
| 62 |
+
```
|