DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to serve local text embeddings for search or RAG with Tensai

Turn texts into vectors with Tensai embed and answer OpenAI-style /v1/embeddings requests.

Short answer: Clone the repository and build or install the Tensai command from its root; then run tensai embed on a few sample texts to confirm vectors are produced; run tensai serve to start the OpenAI-compatible endpoint. All steps.

Who it is forA developer building semantic search or retrieval for a private document set who does not want to send text to a hosted API.

The problemRetrieval pipelines need embedding vectors, and calling a cloud service exposes the documents.

The outcomeA local server that accepts OpenAI-compatible embedding requests, backed by a ModernBERT encoder.

What you need first

  • Go toolchain (Go 1.26 or 1.27 is needed only for the GOEXPERIMENT=simd build)
  • git to clone the repository
  • Disk space for model checkpoints when using the image, audio, or embedding commands

Steps

  1. Clone the repository and build or install the Tensai command from its root. (inferred, check the README)
  2. Run tensai embed on a few sample texts to confirm vectors are produced.
  3. Run tensai serve to start the OpenAI-compatible endpoint.
  4. Send a POST request to the server's /v1/embeddings path with a sample input and check the returned vector length. (inferred, check the README)

Prompt for your agent

Use the mattn/tensai repository to run tensai embed on three sample sentences, then start tensai serve. Report the vector dimension returned by the /v1/embeddings endpoint. Verify that all three vectors have the same length.

Caveat. The README does not say where the default model is downloaded from or how large it is, so plan for the first-run setup time.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for mattn/tensai and "Serve local text embeddings for search or RAG"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer