crossencoder
v1.0.5
Published
Cross Encoder for SentencePiece
Downloads
2
Readme
crossencoder
Install
npm i crossencoder
Usage
import { CrossEncoder } from 'crossencoder';
const encoder = new CrossEncoder('./spm.model');
await encoder.loadModel()
const ids = await encoder.encode("a", [
"a b",
"a b c",
]);
Inspiration
With credit to:
https://github.com/JanKaul/sentencepiece