simon-clmtd commited on
Commit
5cc9bb6
·
verified ·
1 Parent(s): 8e459c2

Upload continued MLM checkpoint

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,76 @@
1
  ---
 
 
 
 
 
 
 
2
  license: mit
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - fr
4
+ - de
5
+ - en
6
+ - lb
7
+ base_model: jhu-clsp/mmBERT-base
8
+ library_name: transformers
9
  license: mit
10
+ tags:
11
+ - modernbert
12
+ - mmbert
13
+ - masked-language-modeling
14
+ - impresso
15
  ---
16
+
17
+ # multilingualmodernimpressoBERT
18
+
19
+ Source card for the future Hugging Face model repository:
20
+
21
+ ```text
22
+ impresso-project/mmbert-multilingual-impresso-continued-mlm
23
+ ```
24
+
25
+ This model is a continued-MLM adaptation of `jhu-clsp/mmBERT-base` on multilingual Impresso newspaper text.
26
+
27
+ The checkpoint is intended as a domain-adapted base model for downstream media-agency token classification.
28
+
29
+ ## License
30
+
31
+ This continued-pretraining checkpoint is released under the MIT license, matching the license of the base model `jhu-clsp/mmBERT-base`.
32
+
33
+ The model is derived from `jhu-clsp/mmBERT-base`; users should cite and comply with the base model terms. The continued-MLM training corpus consists of Impresso newspaper text samples used for domain adaptation. The model weights are published separately from the source text; users remain responsible for checking whether their downstream use of Impresso-derived models and outputs is compatible with their institutional, corpus, and application-specific requirements.
34
+
35
+ ## Continued MLM Run
36
+
37
+ The first completed workbench run used:
38
+
39
+ - source compiled Impresso files: `fr`, `de`, `en`, `lb`
40
+ - source filtering: OCR quality at least `0.90`, minimum text length `200` characters
41
+ - source sampling policy: up to 300,000 texts per language, with smaller languages exhausted
42
+ - sampled corpus: 872,889 train rows and 8,818 validation rows after split
43
+ - training subset: 100,000 train rows
44
+ - validation subset: 2,000 validation rows
45
+ - base model: `jhu-clsp/mmBERT-base`
46
+ - objective: masked language modeling
47
+ - MLM probability: `0.15`
48
+ - max sequence length: `256`
49
+ - padding: fixed max-length padding
50
+ - epochs: `1`
51
+ - per-device train batch size: `1`
52
+ - gradient accumulation steps: `8`
53
+ - effective train batch size per device: `8`
54
+ - gradient checkpointing: enabled
55
+ - learning rate: `2e-5`
56
+ - weight decay: `0.01`
57
+ - warmup: 750 steps, computed as 6 percent of the capped optimizer steps
58
+ - intermediate checkpoint saving: disabled; final model only
59
+ - random seed: `42`
60
+
61
+ Training was run locally on Apple Silicon using the PyTorch MPS backend. The completed run took about 8 hours and 6 minutes. Observed memory use stayed below roughly 30 GB.
62
+
63
+ ## Metrics
64
+
65
+ Final run metrics:
66
+
67
+ | metric | value |
68
+ | --- | ---: |
69
+ | train loss | 1.7775 |
70
+ | eval loss | 1.7172 |
71
+ | train runtime | 29,134 seconds |
72
+ | train samples / second | 3.432 |
73
+ | train steps / second | 0.429 |
74
+ | eval samples / second | 14.885 |
75
+
76
+ The validation loss stayed close to the train loss and the run completed without divergence, so this checkpoint is suitable for downstream comparison against the original `jhu-clsp/mmBERT-base`.
config.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertForMaskedLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 2,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 1,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "dtype": "float32",
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 1,
18
+ "global_attn_every_n_layers": 3,
19
+ "gradient_checkpointing": false,
20
+ "hidden_activation": "gelu",
21
+ "hidden_size": 768,
22
+ "initializer_cutoff_factor": 2.0,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 1152,
25
+ "layer_norm_eps": 1e-05,
26
+ "layer_types": [
27
+ "full_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "full_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "full_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "full_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "full_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "full_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "full_attention"
49
+ ],
50
+ "local_attention": 128,
51
+ "mask_token_id": 4,
52
+ "max_position_embeddings": 8192,
53
+ "mlp_bias": false,
54
+ "mlp_dropout": 0.0,
55
+ "model_type": "modernbert",
56
+ "norm_bias": false,
57
+ "norm_eps": 1e-05,
58
+ "num_attention_heads": 12,
59
+ "num_hidden_layers": 22,
60
+ "pad_token_id": 0,
61
+ "position_embedding_type": "sans_pos",
62
+ "rope_parameters": {
63
+ "full_attention": {
64
+ "rope_theta": 160000,
65
+ "rope_type": "default"
66
+ },
67
+ "sliding_attention": {
68
+ "rope_theta": 160000,
69
+ "rope_type": "default"
70
+ }
71
+ },
72
+ "sep_token_id": 1,
73
+ "sparse_pred_ignore_index": -100,
74
+ "sparse_prediction": false,
75
+ "tie_word_embeddings": true,
76
+ "transformers_version": "5.9.0",
77
+ "use_cache": false,
78
+ "vocab_size": 256000
79
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1edd72e430ece6e02d016da16e97e518e32e3e2a69b539bdb080f34ad10db153
3
+ size 1231159208
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
3
+ size 34363188
tokenizer_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<bos>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "cls_token": "<bos>",
6
+ "eos_token": "<eos>",
7
+ "extra_special_tokens": [
8
+ "<start_of_turn>",
9
+ "<end_of_turn>"
10
+ ],
11
+ "is_local": false,
12
+ "local_files_only": false,
13
+ "mask_token": "<mask>",
14
+ "model_input_names": [
15
+ "input_ids",
16
+ "attention_mask"
17
+ ],
18
+ "model_max_length": 8192,
19
+ "pad_token": "<pad>",
20
+ "padding_side": "right",
21
+ "sep_token": "<eos>",
22
+ "spaces_between_special_tokens": false,
23
+ "tokenizer_class": "TokenizersBackend",
24
+ "unk_token": "<unk>"
25
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:078fd0af81dc073195349062b2b9c2417551d6d2001517362ce19bfb912d251e
3
+ size 5265