File size: 15,704 Bytes
478ec7b
96a7386
478ec7b
b6ac3d0
478ec7b
b6ac3d0
478ec7b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650a308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478ec7b
 
 
96a7386
 
 
 
 
 
 
 
 
 
 
478ec7b
96a7386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650a308
 
96a7386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a41711
 
96a7386
 
a386daf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96a7386
 
 
 
 
 
 
 
650a308
 
 
a386daf
 
 
 
 
 
96a7386
 
 
 
 
 
 
 
 
 
44cee96
 
 
 
 
dfe585b
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# TrueOpen — Research, documentation and experiment data

**Open GPU network. Verifiable inference. Revenue for open-model creators.**

一个提供可验证推理的开放算力网络,为开源模型作者创造收入

**Website:** https://trueopen.ai/  
**GitHub:** https://github.com/TrueOpen  
**Research directory:** https://www.trueopen.ai/research/

## Start here

- [Complete mirrored library and original sources](LIBRARY.md): whitepaper, technical documents, papers, reports and data.
- [Source manifest and SHA-256 checksums](SOURCE-MANIFEST.json).
- [Logprob verification project page](https://www.trueopen.ai/research/lmcv/) · [code and experiments](https://github.com/TrueOpen/lmcv-experiments).
- [Cryptographic verification paper page](https://www.trueopen.ai/research/seal-then-sample/) · [PoC report page](https://www.trueopen.ai/research/slp-poc/) · [code and data](https://github.com/TrueOpen/slp-experiments).

The public names are **Logprob verification / logprob 验证** (LMCV in published papers) and **Cryptographic verification / 密码学验证** (SLP in published papers). Original papers, source documents, citations and data are mirrored without rewriting their contents. The retrieval date is not a publication date. Original repository URLs and filenames remain compatible.

This repository contains research artifacts, not a single training dataset or a model release. Consult each original source for its license, authors, experiment configuration and limits; no new blanket license is applied. Research evidence does not by itself establish production availability or guarantee full-computation verification, privacy or creator income.

## Questions this research can help answer / 按问题查找证据

### How can I check whether an LLM API provider is serving the claimed model?
如何检查 API 是否使用声称的模型?

TrueOpen studies reference-model replay: freeze the input and output token IDs, reconstruct token probabilities with a reference model, and compare probability, rank and top-k evidence against a same-model baseline. This requires evidence beyond a provider's model-name string or final answer. It is not a universal detector for arbitrary text-only APIs, and a statistical match is not a proof of every internal operation.

Read the [model-identity report](https://www.trueopen.ai/research/model-identity/), [local report mirror](website--research--model-identity.md), and [reproduction code](https://github.com/TrueOpen/lmcv-experiments).

### What evidence can distinguish a quantized model from its BF16 version?
怎样区分量化模型与 BF16 版本?

Compare the proposed quantized variant against repeated same-model BF16 runs under recorded hardware and runtime settings. The experiments examine logprob differences, token ranks and top-k overlap; MoE models also need attention to routing and heavy-tailed same-model variation. Report false rejections and inconclusive cases as well as detected mismatches. Thresholds from one model, precision or GPU configuration are not automatically valid for another.

Read the [dense-model experiment](https://www.trueopen.ai/docs/dense-experiment/), [local mirror](website--docs--dense-experiment.md), and [public registry calibration limits](MODEL-REGISTRY.md). The added FP8 registry report concerns a different reference configuration and must not be treated as BF16 validation.

### How should I measure the overhead of LLM inference verification?
怎样衡量推理验证开销?

State the denominator, model, hardware, input/output lengths and number of replays. The Qwen3-8B/32B measurements report **one replay at 0.85%–8.42%** of generation time for outputs of 1,024–8,192 tokens. The separate Qwen2.5-7B experiment reports **three replays combined at 1.9%–14.8%**, with output fixed at 1,000 tokens. These measure computation time, not total online-service cost or end-to-end multi-node latency; do not combine the ranges.

Read the [worker–verifier report](https://www.trueopen.ai/research/worker-verifier-latency/), [7B report](https://www.trueopen.ai/docs/verification-cost-7b/), [local 7B mirror](website--docs--verification-cost-7b.md), and [benchmark code and data](https://github.com/TrueOpen/lmcv-experiments/tree/main/experiments/worker-verifier-latency).

### Does verifying AI inference also guarantee input privacy?
验证推理是否同时保证输入隐私?

No. Verification and confidentiality are separate properties. TrueOpen's privacy design describes encrypted storage and role-based key delivery, while authorized Workers and Verifiers need plaintext relevant to their computations. That is not a claim that computation nodes never see input content. The captured inference-preview notice says content encryption and cryptographic verification are planned and not enabled; research results do not establish their production deployment.

Read the [privacy document](https://www.trueopen.ai/docs/privacy/) and [dated local mirror](website--docs--privacy.md). Check the current service documentation before sending sensitive inputs.

## Logprob verification experiments

Research code, tooling, and empirical data for **Logprob verification** — a low-cost execution-verification protocol for open,
decentralized inference networks.

## Background

In open inference markets, jobs are dispatched to untrusted worker nodes. A core
integrity question is: *how can the network confirm a worker actually executed
the user-specified reference model and runtime configuration, without re-running
the entire generation?* Full recomputation is as expensive as regenerating the
answer, and comparing only the final text cannot distinguish same-family models,
quantized variants, or a small model masquerading as a large one.

Logprob verification combines a **token-level probability fingerprint** with **independent
multi-node consensus**. Once generation is complete, a verifier runs a single
parallel *teacher-forced prefill* over the frozen `input_ids + output_ids` path,
reconstructs each position's predictive distribution, and checks the logprob,
rank, and top-*k* candidate set of each returned token — without decoding token
by token. For Mixture-of-Experts (MoE) models it adds a *routed-experts joint
check* using the layer-0 routing fingerprint.

See [`paper/LMCV.md`](paper/LMCV.md) for the full write-up.

## Repository layout

```
.
├── paper/         # The LMCV paper (Markdown)
├── tools/         # Runnable pipelines and scripts
└── experiments/   # Experiment reports and collected data
```

### `paper/`

- **`LMCV.md`** — The complete paper: protocol design (VRF verifier selection,
  commit–reveal, multi-metric decision, two-of-three majority consensus),
  MoE routed-experts extension, and experimental results across Qwen3-32B,
  Qwen3-8B (dense), and Qwen3.6-35B-A3B (MoE).

### `tools/`

- **`worker_logits_verify/`** — The main, redesigned worker-verify project. Builds
  a *depth-aware logits/logprob fingerprint* along a fixed context path using a
  `transformers` backend (raw logits, logprobs, token rank, top-*k* and probe-token
  fingerprints) to separate legitimate cross-GPU numerical drift from cross-model /
  quantization challenges. Packaged under `src/worker_logits_verify/` with example
  traces.
- **`vllm_worker_verify_pipeline/`** — Standalone end-to-end pipeline
  (`generate_prompts` → `collect_vllm_worker_evidence` → `verify_vllm_worker_evidence`
  → `summarize_worker_verify`) driven by vLLM, with calibration, analysis, and
  latency benchmarking scripts.
- **`moe_routed_experts/`** — Tests whether vLLM decode-time and prefill-time
  `routed_experts` agree for the same `input + output_token_ids` (requires
  `vllm serve <MODEL> --enable-return-routed-experts`).

### `experiments/`

Reports and collected data for three experiment tracks. Each is described in
detail in [Experiments in detail](#experiments-in-detail) below.

- **`moe-routed-experts/`** — Routed-experts fingerprint differences for a large
  MoE model.
- **`logprobs/`** — Logprob-fingerprint differences for large dense/MoE LLMs.
- **`worker-verifier-latency/`** — The cost gap between the worker and the verifier.

## Experiments in detail

### 1. MoE routed-experts difference (`experiments/moe-routed-experts/`)

**Question:** For a Mixture-of-Experts model, can the *routing fingerprint* tell
the reference model apart from quantized or cross-GPU variants?

The verifier runs one teacher-forced prefill over `input_token_ids +
output_token_ids`, extracts vLLM's `routed_experts`, and compares them against the
routing recorded in the worker's decode trace. The primary score is the **layer-0
`entry_mismatch_rate`** (`sum(entry_mismatch_count) / sum(compared_entries)`),
alongside a `registered_logit_tokens_top_k` legality check that each output token
falls inside the model's registered top-*k* candidate set.

Compared variants are `Qwen/Qwen3.6-35B-A3B` (BF16) vs. `Qwen/Qwen3.6-35B-A3B-FP8`
(FP8), across GPU pairings (6000ws, H100). Per-pairing route-diff summaries are
stored as CSV/JSON/Markdown (by sample, by layer, and by sample×layer). The report
is [`report/moe_model_routed_experts_verifier.md`](experiments/moe-routed-experts/report/moe_model_routed_experts_verifier.md).

**Finding:** Where per-token logprob is too noisy for MoE, the layer-0 routed-experts
fingerprint yields a structurally stable, cross-GPU-reproducible gap between
same-model and cross-model cases in the reported test configurations. This supports
experimental threshold calibration, not a generally validated production threshold.

### 2. LLM logprob difference (`experiments/logprobs/`)

**Question:** Can a same-model verifier reconstruct the worker's per-token logprob
fingerprint well enough to separate legitimate numerical drift (same model, different
GPU) from an impostor (FP8/AWQ or a smaller model)?

The verifier teacher-force replays `input_ids + output_ids` and compares its
per-position distribution against the worker's `selected_logprob`, `selected_rank`,
and `top_logprobs`. Rather than a single-token binary test, it uses window-level
robust aggregation (`mean/p95/p99 abs_logprob_diff`, `rank_delta_rate`, top-*k*
Jaccard, union-JS) — motivated by the finding that same-model BF16 diffs appear as
sparse, position-sensitive token spikes, while FP8 adds a broader distribution
shift on top. Three reports cover this track:

- [`LLM-QWen3_8b_bf16_single_sample_verifier_params.md`](experiments/logprobs/reports/LLM-QWen3_8b_bf16_single_sample_verifier_params.md)
  — a tri-state (`PASS` / `REJECT` / `INCONCLUSIVE`) single-sample verifier design
  for dense Qwen3-8B BF16.
- [`qwen3_6_35b_a3b_6000ws_verifier_testing_report.md`](experiments/logprobs/reports/qwen3_6_35b_a3b_6000ws_verifier_testing_report.md)
  — Qwen3.6-35B-A3B BF16-vs-FP8 logprob comparison (FP8 shows a systematic ~1.4×–1.6×
  bulk-to-p99 shift and worse top-*k* overlap).
- [`moe_replicates_bf16_vs_fp8_spike_testing_report.md`](experiments/logprobs/reports/moe_replicates_bf16_vs_fp8_spike_testing_report.md)
  — the spike hypothesis test across BF16 replicates justifying window-level median
  aggregation over single-token thresholds.

**Finding:** For dense models the same-model BF16 baseline is narrow and stable while
FP8/AWQ/smaller models separate sharply; for MoE the same-model baseline itself has a
heavy tail, so window-aggregated metrics (not single-token max) must drive the decision.

### 3. Worker-vs-verifier cost difference (`experiments/worker-verifier-latency/`)

**Question:** Is verification actually cheaper than generation, and by how much?

A vLLM offline benchmark (`benchmark_worker_verifier_latency.py`, Qwen3-8B BF16 on a
single RTX 4090) times both paths on one shared `LLM` instance across an input×output
length grid: the **worker** does normal `prefill + serial decode`, the **verifier**
does a single parallel prefill with `prompt_logprobs=20`. Raw data and summaries are available in the
[HF data archive](experiments/worker-verifier-latency/data.zip); the
analysis is [`reports/worker_verifier_latency_benchmark_report.md`](experiments/worker-verifier-latency/reports/worker_verifier_latency_benchmark_report.md).

**Findings — two separate compute-time experiments:**

- **Qwen3-8B / Qwen3-32B, one verification replay:** For outputs of
  **1,024–8,192 tokens**, the reported single-replay time was approximately
  **0.85%–8.42%** of one generation run. The models were measured on an RTX 4090
  and an H100 NVL, respectively. This range is restricted to that output-length
  subset; it is not a fixed ratio for every input/output configuration. See the
  [benchmark report](experiments/worker-verifier-latency/reports/worker_verifier_latency_benchmark_report.md)
  and [whitepaper §3.1.5](https://www.trueopen.ai/docs/whitepaper/#315-verification-cost-and-scope).
- **Qwen2.5-7B, three replay passes combined:** A separate experiment measured
  **1.9%–14.8%** as `3 × tf_full / gen`, with output fixed at **1,000 tokens**
  and input lengths of 50–8,000 tokens. It used FP16, batch size 1, vLLM 0.20.1,
  and one RTX PRO 6000 Blackwell (96 GB). See the
  [7B experiment report](https://www.trueopen.ai/docs/verification-cost-7b/).
  This range is not derived by multiplying the Qwen3 result by three.

Both results concern compute time under their respective test configurations.
Neither measures total online-service cost: networking, gas, queuing, evidence
handling and settlement are outside these ratios. Three measured replay passes
also do not establish an end-to-end service running on three independent nodes.

## Key findings

- The same-model BF16 replay baseline is narrow and stable across GPUs
  (6000ws / H100 / 4090 / L4), while FP8, AWQ, and heterogeneous smaller models
  separate sharply on p99, rank-delta rate, top-*k* Jaccard, and union-JS.
- For MoE, per-token logprob is confounded by sparse heavy-tailed spikes, but the
  layer-0 routed-experts fingerprint forms a structurally stable, cross-GPU
  reproducible gap in the reported sample (a BF16 verifier attains TPR = 1.000
  with 0.000 observed false-pass at threshold 0.060 under a layer-0 random-5
  aggregate). These observed rates are not universal error guarantees.
- **Compute-time evidence must be cited by experiment:** Qwen3-8B / Qwen3-32B
  measured **one replay at 0.85%–8.42%** of generation time for outputs of
  **1,024–8,192 tokens**; the separate Qwen2.5-7B experiment measured
  **three replays combined at 1.9%–14.8%**, with output fixed at **1,000 tokens**.
  These are configuration-dependent compute-time ratios, not total online-service
  costs; see the separate sources and measurement boundaries in §3 above.

## Getting started

Each tool directory carries its own `README.md` with concrete run commands and
dependencies. The vLLM-based stages generally require `transformers`, `vllm`, and
a GPU runtime:

```bash
python3 -m pip install transformers vllm
```


## Public library refresh — 2026-12-01

See [the refreshed library](LIBRARY.md) and [source audit](UPDATE-20261201.md) for current website technical articles, the corrected Logprob verification source README, immutable GitHub source links, and SHA-256 records. Original papers remain unchanged. New mirror dates are not publication dates.


### Public model registry

[Public registration and verifier-design artifacts](MODEL-REGISTRY.md): a fixed public repository snapshot and an additional FP8 verifier-design report, with calibration limits and source links. These are third-party model records, not TrueOpen model weights or evidence of production deployment.