Fill-Mask
Transformers
Safetensors
bert
babylm
babylm-2026
strict-small
masked-language-modeling
accuracy-morph
Instructions to use alonsopg/babylm-2026-accuracy-morph-strict-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alonsopg/babylm-2026-accuracy-morph-strict-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="alonsopg/babylm-2026-accuracy-morph-strict-small")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("alonsopg/babylm-2026-accuracy-morph-strict-small") model = AutoModelForMaskedLM.from_pretrained("alonsopg/babylm-2026-accuracy-morph-strict-small") - Notebooks
- Google Colab
- Kaggle
Upload BabyLM 2026 Accuracy-Morph Strict-Small checkpoint
Browse files- README.md +73 -0
- config.json +28 -0
- metadata.json +4 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
- training_config.yaml +43 -0
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- babylm
|
| 5 |
+
- babylm-2026
|
| 6 |
+
- strict-small
|
| 7 |
+
- masked-language-modeling
|
| 8 |
+
- bert
|
| 9 |
+
- accuracy-morph
|
| 10 |
+
pipeline_tag: fill-mask
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# BabyLM 2026 Strict-Small Accuracy-Morph
|
| 14 |
+
|
| 15 |
+
This is the final Accuracy-Morph seed-2 checkpoint from the BabyLM 2026 Strict-Small masking experiments.
|
| 16 |
+
|
| 17 |
+
The model is a compact BERT-style masked language model trained from scratch under a controlled masking-only setup. The experiment keeps the dataset, tokenizer, architecture, optimizer, schedule, training length, and total 15% MLM mask rate fixed, changing only how masked positions are selected.
|
| 18 |
+
|
| 19 |
+
## Intended Use
|
| 20 |
+
|
| 21 |
+
This checkpoint is intended for BabyLM 2026 shared-task evaluation and for reproducing the accompanying controlled masking study. It is not intended as a general-purpose language model.
|
| 22 |
+
|
| 23 |
+
## Training Setup
|
| 24 |
+
|
| 25 |
+
- Track: BabyLM 2026 Strict-Small
|
| 26 |
+
- Training data: `BabyLM-community/BabyLM-2026-Strict-Small`
|
| 27 |
+
- Tokenizer: `bert-base-uncased`
|
| 28 |
+
- Architecture: compact BERT masked language model
|
| 29 |
+
- Hidden size: 256
|
| 30 |
+
- Layers: 4
|
| 31 |
+
- Attention heads: 4
|
| 32 |
+
- Intermediate size: 1024
|
| 33 |
+
- Parameters: approximately 11.2M
|
| 34 |
+
- Maximum sequence length: 128
|
| 35 |
+
- Batch size: 64
|
| 36 |
+
- Training steps: 10,000
|
| 37 |
+
- Learning rate: 5e-4
|
| 38 |
+
- Weight decay: 0.01
|
| 39 |
+
- Warmup fraction: 0.06
|
| 40 |
+
- Total MLM mask rate: 15%
|
| 41 |
+
- Seed: 2
|
| 42 |
+
|
| 43 |
+
## Masking Policy
|
| 44 |
+
|
| 45 |
+
Accuracy-Morph uses smoothed top-1 prediction correctness as the online difficulty signal. During warmup, masking is random. After warmup, the fixed 15% MLM mask budget is allocated as:
|
| 46 |
+
|
| 47 |
+
- 80% random masking
|
| 48 |
+
- 15% token-level correctness-guided masking
|
| 49 |
+
- 5% character-trigram correctness-guided masking
|
| 50 |
+
|
| 51 |
+
Sketches count masked-token exposures and wrong top-1 predictions. Candidate difficulty is estimated from smoothed error rates rather than raw cross-entropy loss.
|
| 52 |
+
|
| 53 |
+
## Local Validation Result
|
| 54 |
+
|
| 55 |
+
The final local validation MLM loss for this seed-2 checkpoint was:
|
| 56 |
+
|
| 57 |
+
```text
|
| 58 |
+
3.0105
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
In the matched seed-2 comparison, the random MLM baseline validation loss was 3.0296.
|
| 62 |
+
|
| 63 |
+
## Files
|
| 64 |
+
|
| 65 |
+
- `model.safetensors`: model weights
|
| 66 |
+
- `config.json`: model configuration
|
| 67 |
+
- `tokenizer.json`, `tokenizer_config.json`: tokenizer files
|
| 68 |
+
- `training_config.yaml`: training and masking configuration used for the run
|
| 69 |
+
- `metadata.json`: run metadata
|
| 70 |
+
|
| 71 |
+
## Caveats
|
| 72 |
+
|
| 73 |
+
This is a research checkpoint from a small-data controlled experiment. The associated paper frames the result cautiously: Accuracy-Morph is the most promising tested masking signal, but it is not a settled robust improvement without broader multi-seed confirmation.
|
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForMaskedLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": null,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_dropout_prob": 0.1,
|
| 13 |
+
"hidden_size": 256,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 1024,
|
| 16 |
+
"is_decoder": false,
|
| 17 |
+
"layer_norm_eps": 1e-12,
|
| 18 |
+
"max_position_embeddings": 512,
|
| 19 |
+
"model_type": "bert",
|
| 20 |
+
"num_attention_heads": 4,
|
| 21 |
+
"num_hidden_layers": 4,
|
| 22 |
+
"pad_token_id": 0,
|
| 23 |
+
"tie_word_embeddings": true,
|
| 24 |
+
"transformers_version": "5.7.0",
|
| 25 |
+
"type_vocab_size": 1,
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 30522
|
| 28 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"seed": 2,
|
| 3 |
+
"git_hash": "unknown"
|
| 4 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:717f3e8dbaf8036e4a3b386bfaefc2cecf629e41eb87a4fa986e1dfece1d6bc4
|
| 3 |
+
size 44813832
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_lower_case": true,
|
| 5 |
+
"is_local": false,
|
| 6 |
+
"local_files_only": false,
|
| 7 |
+
"mask_token": "[MASK]",
|
| 8 |
+
"model_max_length": 512,
|
| 9 |
+
"pad_token": "[PAD]",
|
| 10 |
+
"sep_token": "[SEP]",
|
| 11 |
+
"strip_accents": null,
|
| 12 |
+
"tokenize_chinese_chars": true,
|
| 13 |
+
"tokenizer_class": "BertTokenizer",
|
| 14 |
+
"unk_token": "[UNK]"
|
| 15 |
+
}
|
training_config.yaml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: accuracy_morph_seed2
|
| 2 |
+
output_root: outputs
|
| 3 |
+
data:
|
| 4 |
+
dataset_name: BabyLM-community/BabyLM-2026-Strict-Small
|
| 5 |
+
text_column: text
|
| 6 |
+
validation_size: 2000
|
| 7 |
+
num_proc: 4
|
| 8 |
+
tokenizer:
|
| 9 |
+
name: bert-base-uncased
|
| 10 |
+
model:
|
| 11 |
+
hidden_size: 256
|
| 12 |
+
num_hidden_layers: 4
|
| 13 |
+
num_attention_heads: 4
|
| 14 |
+
intermediate_size: 1024
|
| 15 |
+
max_position_embeddings: 512
|
| 16 |
+
training:
|
| 17 |
+
max_length: 128
|
| 18 |
+
batch_size: 64
|
| 19 |
+
max_steps: 10000
|
| 20 |
+
learning_rate: 0.0005
|
| 21 |
+
weight_decay: 0.01
|
| 22 |
+
warmup_fraction: 0.06
|
| 23 |
+
max_grad_norm: 1.0
|
| 24 |
+
eval_every: 500
|
| 25 |
+
eval_batches: 40
|
| 26 |
+
masking:
|
| 27 |
+
type: accuracy_morph
|
| 28 |
+
mask_rate: 0.15
|
| 29 |
+
random_share: 0.8
|
| 30 |
+
hard_token_share: 0.15
|
| 31 |
+
hard_morph_share: 0.05
|
| 32 |
+
adaptive_warmup_fraction: 0.3
|
| 33 |
+
update_every_steps: 200
|
| 34 |
+
smoothing_alpha: 1.0
|
| 35 |
+
min_seen: 3.0
|
| 36 |
+
score_cap: 0.9
|
| 37 |
+
char_ngram_n: 3
|
| 38 |
+
add_boundaries: true
|
| 39 |
+
token_cms_width: 65536
|
| 40 |
+
token_cms_depth: 4
|
| 41 |
+
morph_cms_width: 65536
|
| 42 |
+
morph_cms_depth: 4
|
| 43 |
+
conservative_update: true
|