@energetic-ai/model-embeddings-en
v0.2.0
Published
Pre-trained English-language model weights for `@energetic-ai/embeddings`.
Downloads
2,794
Maintainers
Readme
EnergeticAI Embedding Model Weights (English)
This package contains pre-trained English-language model weights for @energetic-ai/embeddings
.
Install
npm install @energetic-ai/model-embeddings-en
Usage
To use this, simply import modelSource
from this package and pass it to initModel()
in @energetic-ai/embeddings
:
import { initModel } from "@energetic-ai/embeddings";
import { modelSource } from "@energetic-ai/model-embeddings-en";
(async () => {
const model = await initModel(modelSource);
const embeddings = await model.embed(["hello", "world"]);
console.log(embeddings);
})();
Examples
See the examples directory for examples.
Development
This repository uses Lerna to manage packages, and Vitest to run tests.
Run tests with this method:
npm run test
License
Apache 2.0, except for dependencies.
Acknowledgements
This package is derived from the Universal Sentence Encoder Lite model weights, which are also Apache 2.0 licensed.