Models

The models on the network

The judge and the market model: inputs, outputs, roots, step counts, windows and bonds.

Two models are registered on the network: judge, which answers a claim against a passage of evidence, and market, which reads the tone of a market headline or statement. This page gives what each one takes, what it answers, and every figure that identifies it.

judge

Reads a claim and a passage of evidence. Answers yes, no or unclear.

Source weightsgokulsrinivasagan/bert_uncased_L-2_H-256_A-4_mnli, Apache-2.0
ArchitectureBERT, 2 layers, width 256, 4 heads, trained on MNLI
Parameters9,591,811
Input[CLS] evidence [SEP] claim [SEP] in uncased WordPiece, at most 64 tokens
Output1 token: the label
Steps134,491
State pages1,414
Weight chunks64,512

The output token is the index of the label:

TokenLabel
0yes
1unclear
2no

The SDK exports the same list as JUDGE_LABELS.

Asking the judge takes a claim and its evidence:

TypeScript
const { receipt } = await laplace.ask('judge', {
  claim: 'The bridge opened in 1932.',
  evidence: 'The bridge opened to traffic in March 1932.',
})

When the two texts together pass 64 tokens, the longer one loses tokens from its end until both fit.

Roots

RootValue
Program53d73dad…8fc8be59
Weights3a9f1e68…6db86f93
Init86ecb892…4fbfce1d

Files

FileBytesSHA-256
Program4,337,7507de6faf6…b4ff8b30
Weights10,064,7243a90fef9…bdc1327d
Tokenizer (vocab.txt)231,50807eced37…992038a3

market

Reads a market headline or statement. Answers positive, neutral or negative.

Source weights9mark9/finbert-minilm-sentiment, MIT
ArchitectureMiniLM in the BERT layout, 12 layers, width 384, 12 heads
Parameters33,361,155
Input[CLS] text [SEP] in uncased WordPiece, at most 32 tokens
Output1 token: the label
Steps1,318,668
State pages1,063
Weight chunks133,596

The output token is the index of the label:

TokenLabel
0negative
1neutral
2positive

The SDK exports the same list as MARKET_LABELS. Every API shape that carries either model's output carries the label beside the token.

Asking the market model takes one text:

TypeScript
const { receipt } = await laplace.ask('market', {
  text: 'Nvidia beats revenue estimates and raises its outlook',
})

A text longer than 30 tokens keeps its first 30, between [CLS] and [SEP]. The headline above is twelve tokens, and the model answers 2, positive.

Roots

RootValue
Programca724dd2…91270cd4
Weights8e8edab1…217ff276
Init8f8dfa51…6914aa3e

Files

FileBytesSHA-256
Program42,222,837ecdbe7fc…aca4de3b
Weights34,903,3604d181dbe…ed568e84
Tokenizer (vocab.txt)231,50807eced37…992038a3

The tokenizer is the judge's file, byte for byte. The program file goes to a client that accepts gzip as 5,634,976 bytes.

Side by side

judgemarket
Steps134,4911,318,668
Turns to one step in a dispute67
Largest prove_step payload3,351 bytes3,511 bytes
Program, weights and tokenizer files14.6 MB77.4 MB
A full run in Node1.2 sabout 12 s

A full run is what an operator does to answer and what a watcher or a browser does to run it again. The turns are the most bisect moves a dispute takes to narrow the whole run to one step. The payload is what One step on chain carries when a dispute reaches its last step.

Window and bond

Each model's window and bond are set at registration and never change, and they are read from the network rather than from this page:

  • in the app, on /models/judge and /models/market,
  • over HTTP, as windowSeconds and bondLamports in GET /v1/models/:slug,
  • on chain, as window_secs and bond_lamports in the model's account at seeds ["model", slug].

The same places list the model's live offers, its operators and its recent receipts and disputes.

Fetching a model's files

Every file is served by its SHA-256 from the network's file store, and every client checks the bytes against the hash before it uses them.

FromWith
HTTPGET /v1/models/:slug/files returns the four files with their hashes, sizes and URLs; GET /v1/files/:hash returns one file's bytes, gzip-compressed when the request's Accept-Encoding names gzip.
TypeScriptlaplace.model(slug) fetches the files, checks each against its hash, loads them into the VM and checks the roots against the model's account.
CLIlaplace serve and laplace watch fetch the files of the models named in --models.

A file whose bytes do not hash to the hash it was fetched by is refused, and the SDK then checks the loaded program and weights against the roots in the model's account.