npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cyberlangke/tokkit-ibm-granite

v1.11.0

Published

IBM Granite tokenizer families for tokkit.

Readme

@cyberlangke/tokkit-ibm-granite

IBM Granite 官方 tokenizer 的 tokkit 子包。

当前内置 family:

  • granite-3-instruct
    • 覆盖 Granite 3.0 / 3.1 / 3.2 官方 instruct 主线
    • 例如:ibm-granite/granite-3.0-2b-instructibm-granite/granite-3.1-3b-a800m-instructibm-granite/granite-3.2-8b-instruct-preview
  • granite-3.3-base
    • 覆盖 Granite 3.0 / 3.1 / 3.3 官方 base 主线
    • 也聚合当前确认完全复用同一 tokenizer 的 granite-20b-code-*granite-3b-code-instruct-*granite-8b-code-instruct-*
  • granite-3.3-instruct
    • 覆盖 Granite 3.3 官方 instruct 主线
  • granite-7b-base
    • 覆盖 ibm-granite/granite-7b-base
  • granite-7b-instruct
    • 覆盖 ibm-granite/granite-7b-instruct
  • granite-code-base
    • 覆盖 granite-3b-code-base-*granite-8b-code-base-*granite-34b-code-base-8k
    • 也聚合当前确认复用同一 tokenizer 的 granite-34b-code-instruct-8k
  • granite-4
    • 覆盖 Granite 4.0 language 主线,包括 350m1bmicro 以及 h-* 变体
  • granite-4-tiny-base-preview
  • granite-4-tiny-preview

当前不纳入:

  • GGUF / FP8 / LoRA / aLoRA / granitelib-*
  • guardianfunctioncallingmath-prmraguncertainty 等专项模型
  • 官方根目录缺少 tokenizer.json 的模型,例如 ibm-granite/granite-3.0-3b-a800m-instruct

使用方法

npm install @cyberlangke/tokkit-ibm-granite
import { getTokenizer } from "@cyberlangke/tokkit-ibm-granite"

const language = await getTokenizer("granite-3.3-base")
const code = await getTokenizer("granite-code-base")
const sevenB = await getTokenizer("ibm-granite/granite-7b-instruct")

console.log(language === code) // false
console.log(sevenB.encode("Hello, Granite!"))