Text Classification
Transformers
PyTorch
Safetensors
Arabic
bert
custom_code
text-embeddings-inference
Instructions to use tunis-ai/TunBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tunis-ai/TunBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tunis-ai/TunBERT", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tunis-ai/TunBERT", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("tunis-ai/TunBERT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload TunBERT
Browse files- config.json +3 -4
config.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "not-lain/TunBERT",
|
| 3 |
"architectures": [
|
| 4 |
-
"
|
| 5 |
],
|
|
|
|
| 6 |
"auto_map": {
|
| 7 |
"AutoConfig": "config_tunbert.TunBertConfig",
|
| 8 |
"AutoModelForSequenceClassification": "modeling_tunbert.TunBERT"
|
| 9 |
},
|
| 10 |
-
"attention_probs_dropout_prob": 0.1,
|
| 11 |
"classifier_dropout": null,
|
| 12 |
"gradient_checkpointing": false,
|
| 13 |
"hidden_act": "gelu",
|
|
@@ -20,10 +20,9 @@
|
|
| 20 |
"model_type": "bert",
|
| 21 |
"num_attention_heads": 12,
|
| 22 |
"num_hidden_layers": 12,
|
| 23 |
-
"pad_token_id": 0,
|
| 24 |
"position_embedding_type": "absolute",
|
| 25 |
"torch_dtype": "float32",
|
| 26 |
-
"transformers_version": "4.35.
|
| 27 |
"type_vocab_size": 2,
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 30522
|
|
|
|
| 1 |
{
|
| 2 |
"_name_or_path": "not-lain/TunBERT",
|
| 3 |
"architectures": [
|
| 4 |
+
"TunBERT"
|
| 5 |
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
"auto_map": {
|
| 8 |
"AutoConfig": "config_tunbert.TunBertConfig",
|
| 9 |
"AutoModelForSequenceClassification": "modeling_tunbert.TunBERT"
|
| 10 |
},
|
|
|
|
| 11 |
"classifier_dropout": null,
|
| 12 |
"gradient_checkpointing": false,
|
| 13 |
"hidden_act": "gelu",
|
|
|
|
| 20 |
"model_type": "bert",
|
| 21 |
"num_attention_heads": 12,
|
| 22 |
"num_hidden_layers": 12,
|
|
|
|
| 23 |
"position_embedding_type": "absolute",
|
| 24 |
"torch_dtype": "float32",
|
| 25 |
+
"transformers_version": "4.35.2",
|
| 26 |
"type_vocab_size": 2,
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 30522
|