Fill-Mask
Transformers
PyTorch
Safetensors
English
modernbert
ecommerce
e-commerce
retail
marketplace
shopping
amazon
ebay
alibaba
google
rakuten
bestbuy
walmart
flipkart
wayfair
shein
target
etsy
shopify
taobao
asos
carrefour
costco
overstock
pretraining
encoder
language-modeling
foundation-model
Instructions to use thebajajra/RexBERT-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thebajajra/RexBERT-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="thebajajra/RexBERT-mini")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("thebajajra/RexBERT-mini") model = AutoModelForMaskedLM.from_pretrained("thebajajra/RexBERT-mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
d5a3f4e
1
Parent(s): 1a62651
Upload folder using huggingface_hub
Browse files- config.json +11 -75
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -1
- tokenizer_config.json +2 -3
config.json
CHANGED
|
@@ -1,108 +1,44 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
"architectures": [
|
| 4 |
"ModernBertForMaskedLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
-
"attention_layer": "rope",
|
| 9 |
-
"attention_probs_dropout_prob": 0.0,
|
| 10 |
-
"attn_out_bias": false,
|
| 11 |
-
"attn_out_dropout_prob": 0.1,
|
| 12 |
-
"attn_qkv_bias": false,
|
| 13 |
-
"bert_layer": "prenorm",
|
| 14 |
"bos_token_id": 50281,
|
| 15 |
-
"causal_mask": false,
|
| 16 |
"classifier_activation": "gelu",
|
| 17 |
"classifier_bias": false,
|
| 18 |
-
"classifier_dropout":
|
| 19 |
-
"classifier_pooling": "
|
| 20 |
"cls_token_id": 50281,
|
| 21 |
-
"compile_model": true,
|
| 22 |
"decoder_bias": true,
|
| 23 |
-
"deterministic_fa2": false,
|
| 24 |
"deterministic_flash_attn": false,
|
| 25 |
-
"embed_dropout_prob": 0.0,
|
| 26 |
-
"embed_norm": true,
|
| 27 |
"embedding_dropout": 0.0,
|
| 28 |
-
"embedding_layer": "sans_pos",
|
| 29 |
-
"encoder_layer": "base",
|
| 30 |
"eos_token_id": 50282,
|
| 31 |
-
"final_norm": true,
|
| 32 |
"global_attn_every_n_layers": 3,
|
| 33 |
"global_rope_theta": 160000.0,
|
| 34 |
"gradient_checkpointing": false,
|
| 35 |
-
"head_class_act": "silu",
|
| 36 |
-
"head_class_bias": false,
|
| 37 |
-
"head_class_dropout": 0.0,
|
| 38 |
-
"head_class_norm": false,
|
| 39 |
-
"head_pred_act": "gelu",
|
| 40 |
-
"head_pred_bias": false,
|
| 41 |
-
"head_pred_dropout": 0.0,
|
| 42 |
-
"head_pred_norm": true,
|
| 43 |
-
"hidden_act": "gelu",
|
| 44 |
"hidden_activation": "gelu",
|
| 45 |
-
"hidden_dropout_prob": 0.1,
|
| 46 |
"hidden_size": 512,
|
| 47 |
-
"init_cutoff_factor": 2.0,
|
| 48 |
-
"init_method": "full_megatron",
|
| 49 |
-
"init_small_embedding": false,
|
| 50 |
-
"init_std": 0.02,
|
| 51 |
-
"initial_attention_layer": null,
|
| 52 |
-
"initial_bert_layer": null,
|
| 53 |
-
"initial_mlp_layer": null,
|
| 54 |
"initializer_cutoff_factor": 2.0,
|
| 55 |
"initializer_range": 0.02,
|
| 56 |
"intermediate_size": 768,
|
| 57 |
-
"layer_norm_eps": 1e-
|
| 58 |
"local_attention": 128,
|
| 59 |
-
"
|
| 60 |
-
"
|
| 61 |
-
"local_rope_theta": 10000.0,
|
| 62 |
-
"loss_function": "fa_cross_entropy",
|
| 63 |
-
"loss_kwargs": {
|
| 64 |
-
"reduction": "mean"
|
| 65 |
-
},
|
| 66 |
-
"masked_prediction": true,
|
| 67 |
-
"max_position_embeddings": 512,
|
| 68 |
"mlp_bias": false,
|
| 69 |
"mlp_dropout": 0.0,
|
| 70 |
-
"mlp_dropout_prob": 0.0,
|
| 71 |
-
"mlp_in_bias": false,
|
| 72 |
-
"mlp_layer": "glu",
|
| 73 |
-
"mlp_out_bias": false,
|
| 74 |
"model_type": "modernbert",
|
| 75 |
"norm_bias": false,
|
| 76 |
"norm_eps": 1e-05,
|
| 77 |
-
"norm_kwargs": {
|
| 78 |
-
"bias": false,
|
| 79 |
-
"eps": 1e-05
|
| 80 |
-
},
|
| 81 |
-
"normalization": "layernorm",
|
| 82 |
"num_attention_heads": 8,
|
| 83 |
"num_hidden_layers": 19,
|
| 84 |
-
"
|
| 85 |
-
"
|
| 86 |
-
"pad_token_id": 0,
|
| 87 |
-
"padding": "unpadded",
|
| 88 |
-
"pooling_type": "cls",
|
| 89 |
-
"position_embedding_type": "absolute",
|
| 90 |
-
"repad_logits_with_grad": false,
|
| 91 |
-
"rotary_emb_base": 160000.0,
|
| 92 |
-
"rotary_emb_dim": 64,
|
| 93 |
-
"rotary_emb_interleaved": false,
|
| 94 |
-
"rotary_emb_scale_base": null,
|
| 95 |
"sep_token_id": 50282,
|
| 96 |
-
"
|
| 97 |
-
"sliding_window": 128,
|
| 98 |
-
"sparse_pred_ignore_index": -100,
|
| 99 |
-
"sparse_prediction": false,
|
| 100 |
"torch_dtype": "float32",
|
| 101 |
-
"transformers_version": "4.
|
| 102 |
-
"type_vocab_size": 2,
|
| 103 |
-
"unpad_embeddings": true,
|
| 104 |
-
"use_cache": true,
|
| 105 |
-
"use_fa2": true,
|
| 106 |
-
"use_sdpa_attn_mask": false,
|
| 107 |
"vocab_size": 50368
|
| 108 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "RexBERT-mini",
|
| 3 |
"architectures": [
|
| 4 |
"ModernBertForMaskedLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
"attention_dropout": 0.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"bos_token_id": 50281,
|
|
|
|
| 9 |
"classifier_activation": "gelu",
|
| 10 |
"classifier_bias": false,
|
| 11 |
+
"classifier_dropout": 0.0,
|
| 12 |
+
"classifier_pooling": "mean",
|
| 13 |
"cls_token_id": 50281,
|
|
|
|
| 14 |
"decoder_bias": true,
|
|
|
|
| 15 |
"deterministic_flash_attn": false,
|
|
|
|
|
|
|
| 16 |
"embedding_dropout": 0.0,
|
|
|
|
|
|
|
| 17 |
"eos_token_id": 50282,
|
|
|
|
| 18 |
"global_attn_every_n_layers": 3,
|
| 19 |
"global_rope_theta": 160000.0,
|
| 20 |
"gradient_checkpointing": false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"hidden_activation": "gelu",
|
|
|
|
| 22 |
"hidden_size": 512,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
"initializer_cutoff_factor": 2.0,
|
| 24 |
"initializer_range": 0.02,
|
| 25 |
"intermediate_size": 768,
|
| 26 |
+
"layer_norm_eps": 1e-05,
|
| 27 |
"local_attention": 128,
|
| 28 |
+
"local_rope_theta": 160000.0,
|
| 29 |
+
"max_position_embeddings": 7999,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
"mlp_bias": false,
|
| 31 |
"mlp_dropout": 0.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
"model_type": "modernbert",
|
| 33 |
"norm_bias": false,
|
| 34 |
"norm_eps": 1e-05,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
"num_attention_heads": 8,
|
| 36 |
"num_hidden_layers": 19,
|
| 37 |
+
"pad_token_id": 50283,
|
| 38 |
+
"position_embedding_type": "sans_pos",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
"sep_token_id": 50282,
|
| 40 |
+
"tie_word_embeddings": true,
|
|
|
|
|
|
|
|
|
|
| 41 |
"torch_dtype": "float32",
|
| 42 |
+
"transformers_version": "4.48.0",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
"vocab_size": 50368
|
| 44 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4f41f585604367d131be65ed261398d1d5bfa3f3169451ebc349148fe0e8e45
|
| 3 |
+
size 273868543
|
special_tokens_map.json
CHANGED
|
@@ -34,4 +34,4 @@
|
|
| 34 |
"rstrip": false,
|
| 35 |
"single_word": false
|
| 36 |
}
|
| 37 |
-
}
|
|
|
|
| 34 |
"rstrip": false,
|
| 35 |
"single_word": false
|
| 36 |
}
|
| 37 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -931,15 +931,14 @@
|
|
| 931 |
},
|
| 932 |
"clean_up_tokenization_spaces": true,
|
| 933 |
"cls_token": "[CLS]",
|
| 934 |
-
"extra_special_tokens": {},
|
| 935 |
"mask_token": "[MASK]",
|
| 936 |
"model_input_names": [
|
| 937 |
"input_ids",
|
| 938 |
"attention_mask"
|
| 939 |
],
|
| 940 |
-
"model_max_length":
|
| 941 |
"pad_token": "[PAD]",
|
| 942 |
"sep_token": "[SEP]",
|
| 943 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 944 |
"unk_token": "[UNK]"
|
| 945 |
-
}
|
|
|
|
| 931 |
},
|
| 932 |
"clean_up_tokenization_spaces": true,
|
| 933 |
"cls_token": "[CLS]",
|
|
|
|
| 934 |
"mask_token": "[MASK]",
|
| 935 |
"model_input_names": [
|
| 936 |
"input_ids",
|
| 937 |
"attention_mask"
|
| 938 |
],
|
| 939 |
+
"model_max_length": 7999,
|
| 940 |
"pad_token": "[PAD]",
|
| 941 |
"sep_token": "[SEP]",
|
| 942 |
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 943 |
"unk_token": "[UNK]"
|
| 944 |
+
}
|