Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

LLM Token Count

William HardestyWilliam Hardesty43 downloads

Accurate LLM token counts in the status bar — GLM-5.2/GPT/Qwen/DeepSeek exact, Claude/Gemini approx.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

Real LLM token counts for GLM, GPT, Qwen & DeepSeek in Obsidian's status bar — so you know if a note fits the context budget before you send it.

Status bar — the highlighted portion (10,485 tokens · glm-5.2 (exact)) is added by the plugin, alongside Obsidian's built-in word/character counts

The token count appears in the status bar alongside Obsidian's built-in word and character counts — live, for whatever note you have open.

What it does

  • See token counts before you send. The status bar shows the active note's token count under your chosen model's tokenizer, so you can tell at a glance whether it fits the context window or needs chunking/summarizing.
  • Accurate for GLM-5.2 — not a GPT approximation. The only Obsidian token-count plugin that tokenizes GLM-5.2 with its real HuggingFace tokenizer. GPT-based counters over-count Chinese by 10–30%, which misleads your context-budget decisions if you actually run GLM.
  • 11 models, honestly labeled. GLM, GPT, Qwen, and DeepSeek are exact; Claude and Gemini are approx (o200k_base × 1.15, clearly labeled — never silently passed off as exact).
  • Offline after first use. The tokenizer is fetched once from HuggingFace and cached locally. Subsequent counts are instant and need no network. GPT/Claude/Gemini need no fetch at all.

Installation

  1. Download main.js, manifest.json, and styles.css.
  2. Place them in your vault at .obsidian/plugins/llm-token-count/.
  3. In Obsidian: Settings → Community plugins, reload the plugin list, enable LLM Token Count.

On first use with a HuggingFace-sourced model (GLM, Qwen, DeepSeek), the plugin fetches the tokenizer and caches it locally. The first count takes a few seconds; every count after is instant.

Configuration

Open Settings → LLM Token Count:

  • Default model — dropdown of all 11 supported models. Changing it re-counts the active note immediately.
  • Re-download tokenizer — clears the cached tokenizer for the current model so the next count re-fetches from HuggingFace. Use after a tokenizer version bump or if the cache becomes corrupt.

Compatibility

  • Obsidian 1.4.0+, desktop only. The plugin uses Node's fs and fetch for the tokenizer cache, which aren't available on mobile.
  • Coexists with other token-count plugins (TokenBar, Token Count, TikToken Tokenizer, LLM Token Counter). This plugin's differentiator is GLM support and multi-model exact counting via HuggingFace tokenizers.
  • No data leaves your machine except the one-time HuggingFace tokenizer fetch. Notes are never sent anywhere — tokenization is fully local.

Supported models

Model Source Mode
glm-5.2, glm-5, glm-4.6v-flash HuggingFace tokenizer.json (pinned SHA) exact
gpt-5, gpt-4o js-tiktoken o200k_base exact
gpt-4, gpt-3.5 js-tiktoken cl100k_base exact
qwen, deepseek-v3.1 HuggingFace tokenizer.json (pinned SHA) exact
claude, gemini o200k_base × 1.15 approx

GLM/Qwen/DeepSeek tokenizer SHAs are pinned to a specific HuggingFace commit for reproducible counts across machines and over time.

License

MIT

HealthExcellent
ReviewSatisfactory
About
Display real LLM token counts for GLM, GPT, Qwen and DeepSeek in Obsidian's status bar alongside word and character counts to check context budget before sending. Cache HuggingFace tokenizers locally for instant offline counts after the first fetch, apply exact HuggingFace tokenization for GLM‑5.2, and clearly label models that are approximate.
AIStatus bar
Details
Current version
1.0.1
Last updated
2 weeks ago
Created
3 weeks ago
Updates
2 releases
Downloads
43
Compatible with
Obsidian 1.4.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
William HardestyWilliam Hardestyhardes11
GitHubhardes11
  1. Community
  2. Plugins
  3. AI
  4. LLM Token Count

Related plugins

Vault as MCP

MCP server connecting Open WebUI, Claude Desktop, and other LLMs to your vault.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Copilot

Your AI Copilot: Chat with Your Second Brain, Learn Faster, Work Smarter.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Agent Client

Chat with Claude Code, Codex, Gemini CLI, and more via the Agent Client Protocol — right from your vault.

Text Generator

Generate text content using GPT-3 (OpenAI).

Smart Composer

AI chat with note context, smart writing assistance, and one-click edits for your vault.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Karpathy LLM Wiki

Karpathy's LLM Wiki implementation - multi-page knowledge generation with entity/concept pages and conversational query.

HiNote

Add comments to highlighted notes, use AI for thinking, and flashcards for memory.