belladoreai/llama-tokenizer-js

JS tokenizer for LLaMA 1 and 2

39
/ 100
Emerging

This is a tool for developers building web applications or Node.js services that use LLaMA 1 or LLaMA 2 language models. It takes text input and accurately tells you how many "tokens" it contains, or converts tokens back into human-readable text. Developers use this to manage the length of user input or model responses, ensuring they fit within LLaMA's context limits.

363 stars. No commits in the last 6 months.

Use this if you are a web developer or Node.js developer working with LLaMA 1 or LLaMA 2 models and need to accurately count tokens directly in the user's browser or your server without relying on external API calls.

Not ideal if you are working with LLaMA 3 models (there's a separate tool for that) or non-LLaMA models like OpenAI's GPT series, as the tokenization will be incompatible and inaccurate.

web-development LLM-integration front-end-development prompt-engineering-tools text-processing
Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 13 / 25

How are scores calculated?

Stars

363

Forks

24

Language

JavaScript

License

MIT

Last pushed

Jun 27, 2024

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/belladoreai/llama-tokenizer-js"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.