{"id":16364653,"url":"https://github.com/anush008/tokenizers","last_synced_at":"2026-03-14T07:18:43.003Z","repository":{"id":195105188,"uuid":"692452603","full_name":"Anush008/tokenizers","owner":"Anush008","description":"Multi-arch bindings for @huggingface/tokenizers.","archived":false,"fork":false,"pushed_at":"2023-09-17T07:33:59.000Z","size":914,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-27T22:51:37.543Z","etag":null,"topics":["huggingface","tokenizers"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anush008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-16T14:21:39.000Z","updated_at":"2024-08-15T19:44:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"1eed0bdd-8220-4277-8041-24937d57fdda","html_url":"https://github.com/Anush008/tokenizers","commit_stats":null,"previous_names":["anush008/tokenizers"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ftokenizers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ftokenizers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ftokenizers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anush008%2Ftokenizers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anush008","download_url":"https://codeload.github.com/Anush008/tokenizers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221842523,"owners_count":16890158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["huggingface","tokenizers"],"created_at":"2024-10-11T02:31:20.622Z","updated_at":"2026-03-14T07:18:42.998Z","avatar_url":"https://github.com/Anush008.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @anush008/tokenizers\n\nThe official Node bindings are in a jinx with limited support for Node versions and architectures. This package offers multi-arch bindings for [@huggingface/tokenizers](https://github.com/huggingface/tokenizers) with Node v20.x supported. \n\n## Supports:\n\u003e * Windows x86_64\n\u003e * Linux x86_64 (glibc, musl/Alpine)\n\u003e * Linux aarch64 (glibc, musl/Alpine)\n\u003e * macOS x86_64\n\u003e * macOS aarch64 (Apple Silicon)\n\u003e * macOS Universal binary\n\n## Installation\n\n```bash\nnpm install @anush008/tokenizers\n```\n\n## Features\n\n - Train new vocabularies and tokenize using 4 pre-made tokenizers (Bert WordPiece and the 3\n   most common BPE versions).\n - Extremely fast (both training and tokenization), thanks to the Rust implementation. Takes\n   less than 20 seconds to tokenize a GB of text on a server's CPU.\n - Easy to use, but also extremely versatile.\n - Designed for research and production.\n - Normalization comes with alignments tracking. It's always possible to get the part of the\n   original sentence that corresponds to a given token.\n - Does all the pre-processing: Truncate, Pad, add the special tokens your model needs.\n\n\n## Basic example\n\n```ts\nimport { Tokenizer } from \"@anush008/tokenizers\";\n\nconst tokenizer = await Tokenizer.fromFile(\"tokenizer.json\");\nconst wpEncoded = await tokenizer.encode(\"Who is John?\");\n\nconsole.log(wpEncoded.getLength());\nconsole.log(wpEncoded.getTokens());\nconsole.log(wpEncoded.getIds());\nconsole.log(wpEncoded.getAttentionMask());\nconsole.log(wpEncoded.getOffsets());\nconsole.log(wpEncoded.getOverflowing());\nconsole.log(wpEncoded.getSpecialTokensMask());\nconsole.log(wpEncoded.getTypeIds());\nconsole.log(wpEncoded.getWordIds());\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanush008%2Ftokenizers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanush008%2Ftokenizers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanush008%2Ftokenizers/lists"}