Downloads · 30 days
0
Xenova/gpt-4o
gpt-4o is a machine learning model from Xenova. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
A 🤗-compatible version of the GPT-4o tokenizer (adapted from openai/tiktoken). This means it can be used with Hugging Face libraries including Transformers, Tokenizers, and Transformers.js.
Downloads · 30 days
0
Access
Public
Updated Aug 18, 2025
Repo size
—
Likes
70
Public
Click a slice to open those files.
.json14.4 MB · 86%
From the Hugging Face model README
A 🤗-compatible version of the GPT-4o tokenizer (adapted from openai/tiktoken). This means it can be used with Hugging Face libraries including Transformers, Tokenizers, and Transformers.js.
from transformers import GPT2TokenizerFast
tokenizer = GPT2TokenizerFast.from_pretrained('Xenova/gpt-4o')
assert tokenizer.encode('hello world') == [24912, 2375]
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
import { AutoTokenizer } from '@huggingface/transformers';
const tokenizer = await AutoTokenizer.from_pretrained('Xenova/gpt-4o');
const tokens = tokenizer.encode('hello world'); // [24912, 2375]