UNPKG

gpt-tokenizer

Version:

A pure JavaScript implementation of a BPE tokenizer (Encoder/Decoder) for GPT-2 / GPT-3 / GPT-4 and other OpenAI models

4 lines (3 loc) 201 B
import type { RawBytePairRanks } from './BytePairEncodingCore.js'; import type { EncodingName } from './mapping.js'; export declare const resolveEncoding: (encoding: EncodingName) => RawBytePairRanks;