Grok-1 Tokenizer

A πŸ€—-compatible version of the Grok-1 tokenizer (adapted from xai-org/grok-1). This means it can be used with Hugging Face libraries including Transformers, Tokenizers, and Transformers.js.

Example usage:

Transformers/Tokenizers

from transformers import LlamaTokenizerFast

tokenizer = LlamaTokenizerFast.from_pretrained('Xenova/grok-1-tokenizer')
assert tokenizer.encode('hello world') == [21560, 1135]

Transformers.js

import { AutoTokenizer } from '@xenova/transformers';

const tokenizer = await AutoTokenizer.from_pretrained('Xenova/grok-1-tokenizer');
const tokens = tokenizer.encode('hello world'); // [21560, 1135]
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Spaces using Xenova/grok-1-tokenizer 9