neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Catches silent embedding-model swaps under a vector index before they corrupt similarity search -- provider-agnostic, zero dependencies.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Catches silent embedding-model swaps under a vector index before they corrupt similarity search — dimension checks plus canary-probe drift detection, provider-agnostic.README 전문 보기 ↗
Catches silent embedding-model swaps under a vector index before they corrupt similarity search — dimension checks plus canary-probe drift detection, provider-agnostic.
When you change the embedding model behind a vector index — upgrade a version, switch providers, change chunking — vectors already in the index were produced by the old model, and new query vectors come from the new one. The two spaces are incompatible: similarity scores and rankings become meaningless, and nothing errors. This is a widely-felt, well-documented failure mode across the RAG/vector-database ecosystem, and today it's usually caught by hand-rolled, per-project scripts (or not caught at all until search quality visibly degrades). The general-purpose ML drift-monitoring platforms (Evidently, Alibi Detect) that do exist are heavyweight Python observability stacks meant for full model-monitoring infrastructure — there wasn't a small, embeddable, provider-agnostic library that just answers the specific question: is the embedding model that produced this vector still the one this index was built with?
embedguard never calls an embedding provider itself — you bring the vectors from whatever model/provider you already use, and it does the math and bookkeeping:
createFingerprint({ canaries, modelId? })Builds a small fingerprint from a handful of "canary" probe strings you've embedded with your current model: their dimension, and the embeddings themselves. Store this alongside your index's metadata.
checkDimension(fingerprint, embedding)The cheap, unambiguous check — does a vector even have the right number of dimensions. Catches an obviously different model immediately.
checkDrift(fingerprint, freshCanaries, { threshold? })The subtle, dangerous case dimension checking can't catch: a swap between models that happen to produce the same dimensionality (common within a provider's model family). Re-embed your fingerprint's exact canary probes with whatever model is currently configured, and this compares cosine similarity per probe — a real model swap shows up as a sharp similarity drop even when dimensions still match.
npm install embedguard
import { createFingerprint, checkDimension, checkDrift } from "embedguard";
// Once, when you build your index -- embed a handful of representative strings yourself:
const fingerprint = createFingerprint({
modelId: "text-embedding-3-small",
canaries: [
{ probe: "return policy", embedding: await embed("return policy") },
{ probe: "shipping times", embedding: await embed("shipping times") },
],
});
// Store `fingerprint` next to your index (a metadata row, a JSON file, whatever you already use).
// Later -- before trusting a batch of new vectors, or on a schedule:
const freshCanaries = await Promise.all(
fingerprint.canaries.map(async (c) => ({ probe: c.probe, embedding: await embed(c.probe) }))
);
const drift = checkDrift(fingerprint, freshCanaries);
if (!drift.ok) {
throw new Error(`embedding model drift detected: ${JSON.stringify(drift.probes)}`);
}
Run the annotated demo (simulates exactly this bug — a same-dimension model swap that dimension-checking alone would miss):
npx tsx examples/demo.ts
npm install
npm run typecheck
npm test
npm run build
MIT
This is one of 8 independent open-source infrastructure tools, each built against a real, researched gap:
Built by ArkNet Digital.