brutusxu commited on
Commit
3a0c190
·
verified ·
1 Parent(s): 47903fc

Upload Tevatron-Elastic checkpoint (final model)

Browse files
Files changed (6) hide show
  1. README.md +29 -0
  2. config.json +78 -0
  3. granularities.json +36 -0
  4. model.safetensors +3 -0
  5. tokenizer.json +0 -0
  6. tokenizer_config.json +17 -0
README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: answerdotai/ModernBERT-base
4
+ library_name: transformers
5
+ tags:
6
+ - tevatron
7
+ - tevatron-elastic
8
+ - information-retrieval
9
+ - retriever
10
+ - elastic
11
+ ---
12
+
13
+ # tevatron-elastic-modernbert-retriever-mrl
14
+
15
+ A **retriever** trained with [Tevatron-Elastic](https://github.com/zhichaoxu-shufe/tevatron-elastic),
16
+ which trains one checkpoint to serve many operating points along the depth / width / token
17
+ compression axes. This checkpoint is an elastic **width** axis (Matryoshka / MRL): one checkpoint serves several embedding dimensions.
18
+
19
+ - **Base model:** `answerdotai/ModernBERT-base`
20
+ - **Task:** retriever
21
+ - **Elastic axis:** mrl
22
+ - **Training data:** [rlhn/rlhn-680K](https://huggingface.co/datasets/rlhn/rlhn-680K), max length 512, `query:`/`passage:` prefixes.
23
+
24
+ Full-point BEIR-15 nDCG@10: **0.463**.
25
+
26
+ Load with the Tevatron-Elastic framework and select an operating point with `prune_to` /
27
+ `encode_at`; see the repository for usage. Part of a release of 20 checkpoints (3 backbones,
28
+ retrieval and reranking, all compression axes) accompanying the Tevatron-Elastic paper. Reported as
29
+ a reproducibility resource, not a state-of-the-art claim.
config.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 50281,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 50281,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "dtype": "bfloat16",
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 50282,
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
+ "max_position_embeddings": 8192,
52
+ "mlp_bias": false,
53
+ "mlp_dropout": 0.0,
54
+ "model_type": "modernbert",
55
+ "norm_bias": false,
56
+ "norm_eps": 1e-05,
57
+ "num_attention_heads": 12,
58
+ "num_hidden_layers": 22,
59
+ "pad_token_id": 50283,
60
+ "position_embedding_type": "absolute",
61
+ "rope_parameters": {
62
+ "full_attention": {
63
+ "rope_theta": 160000.0,
64
+ "rope_type": "default"
65
+ },
66
+ "sliding_attention": {
67
+ "rope_theta": 10000.0,
68
+ "rope_type": "default"
69
+ }
70
+ },
71
+ "sep_token_id": 50282,
72
+ "sparse_pred_ignore_index": -100,
73
+ "sparse_prediction": false,
74
+ "tie_word_embeddings": true,
75
+ "transformers_version": "5.12.1",
76
+ "use_cache": false,
77
+ "vocab_size": 50368
78
+ }
granularities.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "pooling": "cls",
3
+ "normalize": true,
4
+ "points": [
5
+ {
6
+ "layer": 22,
7
+ "dim": 32,
8
+ "name": null
9
+ },
10
+ {
11
+ "layer": 22,
12
+ "dim": 64,
13
+ "name": null
14
+ },
15
+ {
16
+ "layer": 22,
17
+ "dim": 128,
18
+ "name": null
19
+ },
20
+ {
21
+ "layer": 22,
22
+ "dim": 256,
23
+ "name": null
24
+ },
25
+ {
26
+ "layer": 22,
27
+ "dim": 512,
28
+ "name": null
29
+ },
30
+ {
31
+ "layer": 22,
32
+ "dim": 768,
33
+ "name": null
34
+ }
35
+ ]
36
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c03cca7e14fe15aa272dd061b6459bf6e0fa8b34b22cbaed2f37c9c36b7d1ad
3
+ size 298041696
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "clean_up_tokenization_spaces": true,
4
+ "cls_token": "[CLS]",
5
+ "is_local": true,
6
+ "local_files_only": false,
7
+ "mask_token": "[MASK]",
8
+ "model_input_names": [
9
+ "input_ids",
10
+ "attention_mask"
11
+ ],
12
+ "model_max_length": 8192,
13
+ "pad_token": "[PAD]",
14
+ "sep_token": "[SEP]",
15
+ "tokenizer_class": "TokenizersBackend",
16
+ "unk_token": "[UNK]"
17
+ }