npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mnemehq/embedder-local

v0.1.1

Published

On-device embeddings for @mnemehq/sdk via @huggingface/transformers. Zero-config local mode with Xenova/all-MiniLM-L6-v2.

Readme

@mnemehq/embedder-local

On-device embeddings for @mnemehq/sdk, backed by @huggingface/transformers. Drop it in to upgrade recall() from lexical BM25 to true semantic search — no API key, no hosted service, no data leaving the machine.

Install

bun add @mnemehq/sdk @mnemehq/embedder-local
# or npm i @mnemehq/sdk @mnemehq/embedder-local

Use

import { Mneme } from '@mnemehq/sdk'
import { LocalEmbedder } from '@mnemehq/embedder-local'

const mneme = new Mneme({ embedder: new LocalEmbedder() })

await mneme.remember({
  kind: 'preference',
  body: 'Prefers concise code review comments',
})

// "feedback style" never appears literally in any stored memory.
// Semantic recall finds it anyway.
const matches = await mneme.recall('feedback style on pull requests')
console.log(matches[0]?.record.body)

The first call to embed() downloads the model (~25 MB for the default Xenova/all-MiniLM-L6-v2). Subsequent calls reuse the cache in the platform's standard transformers.js cache directory.

Choosing a model

new LocalEmbedder({
  model: 'Xenova/multilingual-e5-small', // example
  dimensions: 384,
})

The default is the right choice for most English-language use cases. Use a multilingual or larger model if your inputs justify the extra weight. Whatever model you pick must produce L2-normalised mean-pooled vectors (sentence- transformers compatible). The dimensions option must match the model output.

How it relates to the SDK

LocalEmbedder implements the Embedder interface exported by @mnemehq/sdk. The SDK uses it on every plaintext remember() to store an embedding, and on every recall() to rank candidates by cosine similarity. Records written before an embedder is configured remain in the store but are invisible to semantic search until re-embedded (re-embedding migration ships in a later version).

See ADR 0004 for the rationale behind the model choice, the single-embedder-per-store constraint in v0.0.2, and why this package is separate from @mnemehq/sdk.

Running the integration tests

Shape tests run by default. Real-model integration tests are gated behind an environment variable because Bun 1.3.x crashes on process exit when onnxruntime-node's native addon is loaded — the tests themselves pass, but the non-zero exit code breaks CI. Until upstream lands a fix, run them manually:

MNEME_RUN_INTEGRATION=1 bun test packages/embedder-local

CI tracks the underlying Bun + ONNX issue and will flip this default back to opt-out as soon as it's resolved.

License

Apache-2.0.