Borrowing it
Nothing to install: this file belongs to ScientiaCapital/unsloth-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ScientiaCapital/unsloth-mcp-server/main/.claude/skills/unsloth-tokenizer/SKILL.mdgit clone --depth 1 https://github.com/ScientiaCapital/unsloth-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/scientiacapital/unsloth-mcp-server/unsloth-tokenizer)<a href="https://agentmods.dev/skills/scientiacapital/unsloth-mcp-server/unsloth-tokenizer"><img src="https://agentmods.dev/badge/skills/scientiacapital/unsloth-mcp-server/unsloth-tokenizer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/scientiacapital/unsloth-mcp-server/unsloth-tokenizer"><img src="https://agentmods.dev/badge/skills/scientiacapital/unsloth-mcp-server/unsloth-tokenizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.04120 |
| Opus 5 | $0.00026 | $0.02060 |
| Sonnet 5 | $0.00011 | $0.00824 |
| Haiku 4.5 | $0.00005 | $0.00412 |
Grade A, and why
unsloth-tokenizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 634 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unsloth Tokenizer Tools
Expert guidance for tokenizer comparison, analysis, and integration using Unsloth's tokenizer utilities.
Overview
Unsloth provides powerful tools for:
- Comparing tokenizers - Measure token efficiency across different tokenizers
- Analyzing tokenization - Understand how text is tokenized
- Integration - Use tokenizers with Unsloth models
- Optimization - Find the most efficient tokenizer for your use case
Note: For SuperBPE tokenizer training, see the dedicated
superbpeskill.
Quick Start
Compare Two Tokenizers
from unsloth.tokenizer import compare_tokenizers
results = compare_tokenizers(
text="The quick brown fox jumps over the lazy dog",
tokenizer1="meta-llama/Llama-3.2-1B",
tokenizer2="gpt2"
)
print(f"Llama-3.2: {results['tokenizer1']['tokens']} tokens")
print(f"GPT-2: {results['tokenizer2']['tokens']} tokens")
print(f"Difference: {results['reduction']}")
Analyze Tokenization
from unsloth.tokenizer import analyze_tokenization
analysis = analyze_tokenization(
text="Your text here...",
tokenizer="meta-llama/Llama-3.2-1B"
)
print(f"Total tokens: {analysis['total_tokens']}")
print(f"Unique tokens: {analysis['unique_tokens']}")
print(f"Token breakdown: {analysis['tokens']}")
Batch Compare Multiple Tokenizers
from unsloth.tokenizer import compare_multiple_tokenizers
tokenizers = [
"meta-llama/Llama-3.2-1B",
"meta-llama/Llama-3.2-3B",
"mistralai/Mistral-7B-v0.1",
"gpt2",
"./tokenizers/custom_superbpe.json"
]
results = compare_multiple_tokenizers(
text="Your text...",
tokenizers=tokenizers
)
# Results sorted by efficiency
for result in results:
print(f"{result['name']}: {result['tokens']} tokens")
Use Cases
1. Find Most Efficient Tokenizer
Problem: Need to choose the best tokenizer for your use case
Solution:
# Test multiple candidates
candidates = [
"meta-llama/Llama-3.2-1B",
"mistralai/Mistral-7B-v0.1",
"google/gemma-2b",
"./tokenizers/custom_superbpe.json"
]
# Use representative sample
sample_text = get_production_sample(size_kb=100)
results = compare_multiple_tokenizers(
text=sample_text,
tokenizers=candidates
)
# Choose most efficient
best = min(results, key=lambda x: x['tokens'])
print(f"Best tokenizer: {best['name']} with {best['tokens']} tokens")
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 634 lines · 53 tokens per session scan A bc4210d2d741
unsloth-tokenizer is a skill published in the GitHub repository ScientiaCapital/unsloth-mcp-server (2 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 53 tokens to every session and 4,120 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
developing-genkit-js
Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.
optimize-for-gpu
GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster. Use for CUDA/GPU optimization; CPU-bound NumPy, SciPy, pandas, scikit-learn, NetworkX, scikit-image, vector-search, image-processing, graph, simulation, or file-I/O workloads; CuPy, cuDF, cuML, cuGraph, cuVS…
azure-ai-openai-dotnet
Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants. Triggers: "Azure OpenAI", "AzureOpenAIClient", "ChatClient", "chat completions .NET", "GPT-4", "embeddings", "DALL-E", "Whisper", "OpenAI .NET".
colab-finetuning
Fine-tune LLMs on Google Colab GPUs directly from openscience. Connects to Colab runtimes via WebSocket bridge for remote training with Unsloth. Supports SFT, GRPO, DPO, vision, and TTS workflows on free T4 to Pro A100 GPUs.
ax-cpp-gen
Use when writing C++ code with axllm for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.
ax-go-gen
Use when writing Go code with github.com/ax-llm/ax/packages/go for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.