Instructions to use NLP-EXP/Affect-ArRoberta-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NLP-EXP/Affect-ArRoberta-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="NLP-EXP/Affect-ArRoberta-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("NLP-EXP/Affect-ArRoberta-v1") model = AutoModelForMaskedLM.from_pretrained("NLP-EXP/Affect-ArRoberta-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from NLP-EXP/Affect-ArRoberta-v1: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/NLP-EXP/Affect-ArRoberta-v1/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://NLP-EXP/Affect-ArRoberta-v1/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/NLP-EXP/Affect-ArRoberta-v1/resolve/main/tokenizer_config.json
1.42 kB
| { | |
| "add_prefix_space": false, | |
| "bos_token": { | |
| "__type": "AddedToken", | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "cls_token": { | |
| "__type": "AddedToken", | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "__type": "AddedToken", | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "errors": "replace", | |
| "mask_token": { | |
| "__type": "AddedToken", | |
| "content": "<mask>", | |
| "lstrip": true, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "max_seq_length": 512, | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": { | |
| "__type": "AddedToken", | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "sep_token": { | |
| "__type": "AddedToken", | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "special_tokens_map_file": "/content/config/special_tokens_map.json", | |
| "tokenizer_class": "RobertaTokenizer", | |
| "trim_offsets": true, | |
| "unk_token": { | |
| "__type": "AddedToken", | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |