Views
No views yet

transformers library from Hugging Face. Below is an example of how to load and use the tokenizer in your Python project:1from transformers import AutoTokenizer
2
3# Load the Aranizer tokenizer
4tokenizer = AutoTokenizer.from_pretrained("riotu-lab/Aranizer-SP-64k")
5
6# Example usage
7text = "اكتب النص العربي"
8tokens = tokenizer.tokenize(text)
9token_ids = tokenizer.convert_tokens_to_ids(tokens)
10
11print("Tokens:", tokens)
12print("Token IDs:", token_ids)1## Citation
2
3@article{koubaa2024arabiangpt,
4 title={ArabianGPT: Native Arabic GPT-based Large Language Model},
5 author={Koubaa, Anis and Ammar, Adel and Ghouti, Lahouari and Necar, Omer and Sibaee, Serry},
6 year={2024},
7 publisher={Preprints}
8}