Package Exports
- @energetic-ai/model-embeddings-en
- @energetic-ai/model-embeddings-en/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@energetic-ai/model-embeddings-en) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Pre-trained English-language model weights for @energetic-ai/embeddings
.
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
Acknowledgements
This package is derived from the Universal Sentence Encoder Lite model weights, which are also Apache 2.0 licensed.