Text Generation
Transformers
Vietnamese
English
tokenizer
byte-level-bpe
vietnamese
english
code
qwen-style
conversational
Instructions to use PaxiAI/Vietnamese-Tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PaxiAI/Vietnamese-Tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PaxiAI/Vietnamese-Tokenizer") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PaxiAI/Vietnamese-Tokenizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PaxiAI/Vietnamese-Tokenizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PaxiAI/Vietnamese-Tokenizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PaxiAI/Vietnamese-Tokenizer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PaxiAI/Vietnamese-Tokenizer
- SGLang
How to use PaxiAI/Vietnamese-Tokenizer 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 "PaxiAI/Vietnamese-Tokenizer" \ --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": "PaxiAI/Vietnamese-Tokenizer", "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 "PaxiAI/Vietnamese-Tokenizer" \ --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": "PaxiAI/Vietnamese-Tokenizer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PaxiAI/Vietnamese-Tokenizer with Docker Model Runner:
docker model run hf.co/PaxiAI/Vietnamese-Tokenizer
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,9 +14,9 @@ tags:
|
|
| 14 |
license: apache-2.0
|
| 15 |
---
|
| 16 |
|
| 17 |
-
#
|
| 18 |
|
| 19 |
-
`
|
| 20 |
|
| 21 |
The tokenizer is optimized for Vietnamese while retaining practical coverage of English and source code. It is intended to be architecture-independent and can be used with Qwen-style, LLaMA-style, or other autoregressive language model architectures as long as the model configuration uses the same vocabulary and token IDs.
|
| 22 |
|
|
@@ -90,7 +90,7 @@ The total serialized corpus size was approximately **8 GiB**.
|
|
| 90 |
from transformers import AutoTokenizer
|
| 91 |
|
| 92 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 93 |
-
"PaxiAI/
|
| 94 |
use_fast=True,
|
| 95 |
)
|
| 96 |
|
|
|
|
| 14 |
license: apache-2.0
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Vietnamese-Tokenizer
|
| 18 |
|
| 19 |
+
`Vietnamese-Tokenizer` is a **48,000-token Byte-level BPE tokenizer** designed primarily for Vietnamese language models trained from scratch.
|
| 20 |
|
| 21 |
The tokenizer is optimized for Vietnamese while retaining practical coverage of English and source code. It is intended to be architecture-independent and can be used with Qwen-style, LLaMA-style, or other autoregressive language model architectures as long as the model configuration uses the same vocabulary and token IDs.
|
| 22 |
|
|
|
|
| 90 |
from transformers import AutoTokenizer
|
| 91 |
|
| 92 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 93 |
+
"PaxiAI/Vietnamese-Tokenizer",
|
| 94 |
use_fast=True,
|
| 95 |
)
|
| 96 |
|