replicate / all-mpnet-base-v2

This is a language model that can be used to obtain document embeddings suitable for downstream tasks like semantic search and clustering.

  • Public
  • 2.2M runs
  • T4
  • GitHub
  • Paper
  • License

Run replicate/all-mpnet-base-v2 with an API

Use one of our client libraries to get started quickly.

Set the REPLICATE_API_TOKEN environment variable

export REPLICATE_API_TOKEN=<paste-your-token-here>

Learn more about authentication

Install Replicate’s Node.js client library

npm install replicate
Learn more about setup

Run replicate/all-mpnet-base-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

import Replicate from "replicate";
const replicate = new Replicate();

const input = {
    text: "You shall know a word by the company it keeps."
};

const output = await replicate.run("replicate/all-mpnet-base-v2:b6b7585c9640cd7a9572c6e129c9549d79c9c31f0d3fdce7baac7c67ca38f305", { input });
console.log(output)
//=> [{"embedding":[0.02005307748913765,0.041290685534477234,0...
Learn more