Fill-Mask
Transformers
Safetensors
English
modernbert
trimmed
lbourdois commited on
Commit
18d700a
·
verified ·
1 Parent(s): 22f90cb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +62 -36
README.md CHANGED
@@ -1,36 +1,62 @@
1
- ---
2
- pipeline_tag: fill-mask
3
- language: eng
4
- license: apache-2.0
5
- tags:
6
- - trimmed
7
- library_name: transformers
8
- base_model: answerdotai/ModernBERT-large
9
- base_model_relation: quantized
10
- datasets:
11
- - Who-find-it-first/fineweb-2-trimming
12
- ---
13
-
14
- # ModernBERT-large-eng-16384
15
-
16
- This model is a trimmed version of [answerdotai/ModernBERT-large](https://huggingface.co/answerdotai/ModernBERT-large)
17
- optimized for **English** via vocabulary reduction
18
- ([trimming method](https://huggingface.co/blog/introduction-to-trimming)).
19
-
20
- ## Model Statistics
21
- | Metric | Original | Trimmed | Reduction |
22
- |--------|----------|---------|-----------|
23
- | **Vocabulary size** | 50,368 | 16,384 | **67.47%** |
24
- | **Model size** | 395,881,664 params | 361,048,064 params | **8.80%** |
25
-
26
- ## Mining Dataset Statistics
27
- - **Texts used for mining**: 200,000
28
- - **Dataset**: [Who-find-it-first/fineweb-2-trimming](https://huggingface.co/datasets/Who-find-it-first/fineweb-2-trimming)
29
-
30
- ## Usage
31
- ```python
32
- from transformers import AutoModelForMaskedLM, AutoTokenizer
33
-
34
- model = AutoModelForMaskedLM.from_pretrained("lbourdois/ModernBERT-large-16384")
35
- tokenizer = AutoTokenizer.from_pretrained("lbourdois/ModernBERT-large-16384")
36
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: fill-mask
3
+ language: en
4
+ license: apache-2.0
5
+ tags:
6
+ - trimmed
7
+ library_name: transformers
8
+ base_model: answerdotai/ModernBERT-large
9
+ base_model_relation: quantized
10
+ datasets:
11
+ - lbourdois/fineweb-2-trimming
12
+ ---
13
+
14
+ # ModernBERT-large-16384
15
+ This model is a **8.80% smaller** version of [answerdotai/ModernBERT-large](https://huggingface.co/answerdotai/ModernBERT-large) optimized for **English** 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.
17
+
18
+ ## Model Statistics
19
+ | Metric | Original | Trimmed | Reduction |
20
+ |--------|----------|---------|-----------|
21
+ | **Vocabulary size** | 50,368 | 16,384 | **67.47%** |
22
+ | **Model size** | 395,881,664 params | 361,048,064 params | **8.80%** |
23
+
24
+ ![image](https://raw.githubusercontent.com/lbourdois/blog/refs/heads/master/assets/images/Trimming/ModernBERT-large-16384.png)
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/ModernBERT-large-16384"
35
+ model = AutoModel.from_pretrained(model_name)
36
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
37
+ ```
38
+
39
+ ## Citations
40
+
41
+ #### ModernBERT
42
+ ```
43
+ @misc{modernbert,
44
+ title={Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference},
45
+ author={Benjamin Warner and Antoine Chaffin and Benjamin Clavié and Orion Weller and Oskar Hallström and Said Taghadouini and Alexis Gallagher and Raja Biswas and Faisal Ladhak and Tom Aarsen and Nathan Cooper and Griffin Adams and Jeremy Howard and Iacopo Poli},
46
+ year={2024},
47
+ eprint={2412.13663},
48
+ archivePrefix={arXiv},
49
+ primaryClass={cs.CL},
50
+ url={https://arxiv.org/abs/2412.13663},
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
+ ```