QVAC Logo

getModelByName( )

Retrieves a model constant from the built-in registry by its human-readable name.

function getModelByName(name: string): RegistryItem | undefined;

Parameters

NameTypeRequired?Description
namestringThe human-readable model name (e.g., "Llama 3.2 3B Q4")

Returns

RegistryItem | undefined — The matching model constant, or undefined if not found.

RegistryItem

FieldTypeDescription
namestringHuman-readable model name
registryPathstringRegistry path
registrySourcestringRegistry source
blobCoreKeystringHyperdrive blob core key
blobBlockOffsetnumberBlob block offset
blobBlockLengthnumberBlob block length
blobByteOffsetnumberBlob byte offset
modelIdstringUnique model identifier
addon"llm" | "whisper" | "embeddings" | "nmt" | "vad" | "tts" | "ocr" | "other"Model addon type
expectedSizenumberExpected file size in bytes
sha256ChecksumstringSHA-256 checksum
enginestringInference engine
quantizationstringQuantization level
paramsstringModel parameter count

Example

import { getModelByName } from "@qvac/sdk";

const model = getModelByName("Llama 3.2 3B Q4");
if (model) {
  console.log(model.modelId, model.expectedSize);
}

On this page