@lenml/tokenizer-gemma2
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

@lenml/tokenizer-gemma2

a tokenizer.

based on @lenml/tokenizers

Usage

import { fromPreTrained } from "@lenml/tokenizer-gemma2";

const tokenizer = fromPreTrained();
console.log(
    "encode()",
    tokenizer.encode("Hello, my dog is cute", null, {
        add_special_tokens: true,
    })
);
console.log(
    "_encode_text",
    tokenizer._encode_text("Hello, my dog is cute")
);

Full Tokenizer API

Complete api parameters and usage can be found in transformer.js tokenizers document

License

Apache-2.0

Dependencies (1)

Dev Dependencies (5)

Package Sidebar

Install

npm i @lenml/tokenizer-gemma2

Weekly Downloads

58

Version

3.0.1

License

Apache-2.0

Unpacked Size

153 MB

Total Files

14

Last publish

Collaborators

  • luke_zhang