llama-tokenizer-js VS tokenizer

Compare llama-tokenizer-js vs tokenizer and see what are their differences.

tokenizer

Pure Go implementation of OpenAI's tiktoken tokenizer (by tiktoken-go)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
llama-tokenizer-js tokenizer
5 2
305 228
- 0.4%
7.1 4.3
20 days ago about 1 year ago
JavaScript Go
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

llama-tokenizer-js

Posts with mentions or reviews of llama-tokenizer-js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-13.

tokenizer

Posts with mentions or reviews of tokenizer. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-08.
  • Understanding GPT Tokenizers
    10 projects | news.ycombinator.com | 8 Jun 2023
    How I wish this post had appeared a few days earlier... I am writing on my own library for some agent experiments (in go, to make my life more interesting I guess), and knowing the number of tokens is important to implement a token buffer memory (as you approach the model's context window size, you prune enough messages from the beginning of the conversation that the whole thing keeps some given size, in tokens). While there's a nice native library in go for OpenAI models (https://github.com/tiktoken-go/tokenizer), the only library I found for Hugging Face models (and Claude, they published their tokenizer spec in the same JSON format) calls into HF's Rust implementation, which makes it challenging as a dependency in Go. What is more, any tokenizer needs to keep some representation of its vocabulary in memory. So, in the end I removed the true tokenizers, and ended up using an approximate version (just split it in on spaces and multiply by a factor I determined experimentally for the models I use using the real tokenizer, with a little extra for safety). If it turns out someone needs the real thing they can always provide their own token counter). I was actually rather happy with this result: I have less dependencies, and use less memory. But to get there I needed to do a deep dive too understand BPE tokenizers :)

    (The library, if anyone is interested: https://github.com/ryszard/agency.)

  • Pure Go implementation of OpenAI's tokenizer
    4 projects | /r/golang | 7 Apr 2023

What are some alternatives?

When comparing llama-tokenizer-js and tokenizer you can also consider the following projects:

Constrained-Text-Generation-Studio - Code repo for "Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio" at the (CAI2) workshop, jointly held at (COLING 2022)

tiktoken - tiktoken is a fast BPE tokeniser for use with OpenAI's models.

fastbpe - Java library implementing Byte-Pair Encoding Tokenization

llama.go - llama.go is like llama.cpp in pure Golang!

Constrained-Text-Genera

agency - Agency: Robust LLM Agent Management with Go

sentences - A multilingual command line sentence tokenizer in Golang

tiktoken - JS port and JS/WASM bindings for openai/tiktoken

gpt4-tokenizer-visualizer - GPT4 Tokenizer Visualizer

tokenizer-go - A Go wrapper for GPT-3 token encode/decode. https://platform.openai.com/tokenizer