DIM · Dagon Inference Marketplace

Model identity

A model identity names one exact deployment of a model: its family, revision, quantization and serving setup. Its SHA-256 hash, the model_identity_id, is the ID you route on. Two deployments that differ in any field have different IDs, so a seller cannot quietly swap an FP8 build for an INT4 one, or one revision for another, under the same name.

The fields

Every route in a seller's listing carries a model_identity object:

Field Meaning Example
family The model family, the name you would search for. llama-3.3-70b-instruct
revision The exact weights revision. 2024-12
quantization Numeric format of the served weights. fp8
serving.engine Inference engine. vllm
serving.engine_version Engine version. 0.6.3
serving.gpu Accelerator type. H100
serving.gpu_count Accelerators per replica. 2
serving.max_concurrency Most requests the route serves at once. 16

The values in the example column are illustrations, not a real listing.

How the ID is computed

model_identity_id = SHA256(jcs(model_identity)), where jcs is RFC 8785 JSON canonicalization: keys sorted, no whitespace, integers only. The ID is written as 64 lowercase hex characters. Because canonicalization fixes the byte layout, anyone who has the object can recompute the ID and get the same answer. The SDK does exactly that for every route it reads, and it rejects a listing whose stated ID does not match the object.

import { Buffer } from "node:buffer";
import { modelIdentityId } from "@im/protocol";

// Example values only.
const identity = {
  family: "llama-3.3-70b-instruct",
  revision: "2024-12",
  quantization: "fp8",
  serving: { engine: "vllm", engine_version: "0.6.3", gpu: "H100", gpu_count: 2, max_concurrency: 16 },
};
const id = Buffer.from(modelIdentityId(identity)).toString("hex");
console.log(id); // 64 hex characters; change any field and it changes

Why exact identity matters

Quantization, revision and serving setup change output quality, speed and price. A marketplace that routes by a loose name like "llama-70b" lets a cheaper build stand in for the one you tested. DIM's index filters by exact ID, and the SDK will not substitute an identity just because its family matches.

  • One identity per request. In the SDK, map each OpenAI model name you use to one exact ID with models: { "my-model": "<64-hex id>" }, or pass modelIdentityId per call. A name with no mapping that is not itself a 64-hex ID fails with no_route.
  • An explicit allowlist when builds are equivalent for you. Pass modelIdentityIds: [idA, idB] to one create call to accept either. It replaces the configured mapping for that call and cannot be combined with modelIdentityId.
  • Search by family, buy by ID. GET /v1/routes?family=… and the MCP tool list_routes with family help you discover identities. Pin the ID you choose.

What the identity does not prove

A seller signs its listing, so the identity is the seller's signed claim about what it serves. The signature proves who made the claim, not that the weights behind the endpoint match it. Independent probes measure behaviour such as speed and availability; see evidence levels for what each kind of evidence does and does not show.