Skip to content
Projects

Ikaleio/lm-detector has 1,751 GitHub stars and 59 forks. GitHot measured +38 stars in 24 hours. Last checked 2026-11-07 05:52 UTC. Last push 2026-11-02.

How these counts are measured

Model fingerprint detection with a shared Web and Bun CLI reference bank

Measured star growth

in 24h
+38
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original
LM Fingerpoint Detector

LM Fingerpoint Detector

Identify the large language model behind an API from a few hundred first-instinct integers

简体中文 · English

npm npm SDK crates.io PyPI Web Docs Bun License

Web detector · Docs · Quick start · Command line · SDK · How it works


Introduction

An API relay or a third-party provider can claim to serve one model and actually serve another. LM Fingerpoint Detector checks this claim with a task that has no semantic content: the model writes about 300 integers from 1 to 355, each chosen by first instinct. The "random" numbers that a language model writes are not uniform. Each model has relatively stable preferences for values, ranges, and final digits. The detector compares this distribution with a reference bank and ranks the closest candidate models.

  • Three entry points: the website accepts pasted answers or calls an API directly. The fpd command line tool shows a live terminal interface and supports multiple rounds and JSON output. The SDKs let TypeScript, Rust, Go, and Python programs score replies or check an API channel directly, with the same results as the CLI.
  • Three protocols: OpenAI Responses, Chat Completions, and Anthropic Messages. SSE streaming is the default.
  • Reference bank: covers common model families such as GPT, Claude, Gemini, Grok, Qwen, and DeepSeek. The library page on the website shows the bank in read-only mode and can export it.
  • Tokenizer probe (optional, off by default): turn on “Tokenizer probe” in the API configuration on the website, or add --tokenizer on the command line. Detection then sends about 12 more short requests and identifies the upstream tokenizer (the rule a model uses to cut text into tokens) from the token counts in the API usage. It checks the tokenizer against the model you entered. The result is reference only: the ranking and the confidence come from the number fingerprint alone and do not wait for the probe. Many models share one tokenizer, so a matching tokenizer does not prove the model identity.
  • Choose the connection: by default, requests go through this site's proxy. You can also pick Auto, which lets the browser call an API directly when it allows web pages to and uses this site's proxy when the browser's cross-origin restriction (CORS) blocks that, or always use Direct or a Cloudflare Worker you deploy in one click.
  • Traceable data maintenance: fpd sample, fpd enroll, and fpd retrain collect, enroll, and refit offline. All failures and earlier attempts stay on record.

[!IMPORTANT] A result is a closed-set ranking within the reference bank. A model that is not in the bank still gets a "closest" candidate. Ranking scores and confidence values are not proof of identity. To judge whether a channel is trustworthy, fix the request parameters, repeat several rounds, and use other evidence too. Read the disclaimer before use.

Quick start

Website: open lm.ikale.io and select the Manual or API mode. Each answer must contain at least 80 valid integers; if all three answers are valid, the page shows the ranking and a confidence value for each candidate. If the tokenizer probe is on in API mode, the page also shows the probe result separately.

Command line: no installation is necessary. Run the CLI with either runtime:

# Node.js 22 or later
npx lmfpd@latest -b https://api.example.com/v1 -k sk-xxx -m gpt-6-astra

# Bun 1.4.4 or later
bunx --bun lmfpd@latest -b https://api.example.com/v1 -k sk-xxx -m gpt-6-astra

SDK: score replies or run a detection from your own program. All four languages offer the same features:

npm install lmfpd-sdk                                  # TypeScript (Node.js 22+ or Bun 1.4.4+)
cargo add lmfpd                                        # Rust
go get github.com/Ikaleio/lm-detector/sdk/go@latest    # Go 1.23+
pip install lmfpd                                      # Python 3.10+
import { loadDetector } from 'lmfpd-sdk'

const detector = await loadDetector()  // The first load downloads about 3.6 MB of reference data and caches it
const result = await detector.detect({
  baseUrl: 'https://api.example.com/v1', apiKey: process.env.API_KEY!, model: 'gpt-6-astra', api: 'chat_completions',
})
console.log(result.error ?? result.analysis!.prediction)

See the SDK docs for every language, the parameters, and the result fields.

Local development:

bun install
bun run dev          # Sync data and start the web dev server (includes /api/proxy)
bun run dev:docs     # Start the docs dev server
bun run typecheck    # Type-check the website, CLI, and docs
bun run build        # Build the website and the docs into web/dist
bun run build:cli    # Pack the npm CLI into dist/fpd
bun run fpd --help   # Run the CLI from the repository
bun run sdk:check    # Check all four SDKs against the shared fixtures

Documentation

The full documentation is at lm.ikale.io/docs/en, with its sources in docs/content/docs/:

Section Contents
Website Sampling modes, API configuration, reading results, tokenizer probe, connection modes
Command line Detection, the optional tokenizer probe, sampling and resuming, enrollment and retraining
SDK Installing the TypeScript, Rust, Go, and Python SDKs, scoring and live detection, reference data caching, API
How it works Challenges and features, ranking, confidence calibration, the tokenizer probe
Deployment Cloudflare Pages, GitHub Pages, Vercel, a self-deployed Worker proxy
Reference Data files and change log, proxy API
Development Project structure, design spec, packaging and release

Acknowledgements

Thanks to xqy2006/ModelTrace for the algorithmic ideas and part of the original data.

License

MIT

Explore related projects