Instructions to use mariklolik/AraToken-Qwen3-0.6B-CPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mariklolik/AraToken-Qwen3-0.6B-CPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mariklolik/AraToken-Qwen3-0.6B-CPT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mariklolik/AraToken-Qwen3-0.6B-CPT") model = AutoModelForCausalLM.from_pretrained("mariklolik/AraToken-Qwen3-0.6B-CPT", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mariklolik/AraToken-Qwen3-0.6B-CPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mariklolik/AraToken-Qwen3-0.6B-CPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mariklolik/AraToken-Qwen3-0.6B-CPT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mariklolik/AraToken-Qwen3-0.6B-CPT
- SGLang
How to use mariklolik/AraToken-Qwen3-0.6B-CPT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mariklolik/AraToken-Qwen3-0.6B-CPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mariklolik/AraToken-Qwen3-0.6B-CPT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mariklolik/AraToken-Qwen3-0.6B-CPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mariklolik/AraToken-Qwen3-0.6B-CPT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mariklolik/AraToken-Qwen3-0.6B-CPT with Docker Model Runner:
docker model run hf.co/mariklolik/AraToken-Qwen3-0.6B-CPT
AraToken-Qwen3-0.6B-CPT
The continued-pretraining (CPT) baseline of the AraToken paper. Qwen3-0.6B-Base keeps its original tokenizer and is trained on the same 500M-token FineWeb2-HQ Arabic budget as mariklolik/AraToken-Qwen3-0.6B-LEP: 5,086 steps, transformer layers 24–27 trainable.
Paper: AraToken: Optimizing Arabic Tokenization with Normalization Pipeline and Language Extension for Qwen3. Code: https://github.com/mariklolik/Aratoken.
| Model | Arabic BPC ↓ |
|---|---|
| Qwen3-0.6B-Base | 1.5446 |
| this model | 1.4047 |
| AraToken-Qwen3-0.6B-LEP | 1.3219 |
BPC is bits per character on the first 1,500 documents of the held-out test split of
mariklolik/AraToken-FineWeb2-HQ-ar.
It compares models with different vocabularies on the same characters.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "mariklolik/AraToken-Qwen3-0.6B-CPT"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16")
The tokenizer carries the AraToken normalizer: NFKC, Tatweel removal, Western digits, Latin punctuation and diacritics removal. Raw Arabic text can therefore be passed to it directly.
Citation
@article{kashirskiy2025aratoken,
title = {AraToken: Optimizing Arabic Tokenization with Normalization Pipeline and Language Extension for Qwen3},
author = {Kashirskiy, Mark and Lipinski, Artiom and Makarov, Ilya},
journal = {arXiv preprint arXiv:2512.18399},
year = {2025}
}
- Downloads last month
- 330
Model tree for mariklolik/AraToken-Qwen3-0.6B-CPT
Base model
Qwen/Qwen3-0.6B-Base