From 6b96375a407cd46ce787f5ea0a747c095e079cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20S=C5=82uszniak?= Date: Wed, 28 Oct 2026 18:40:06 +0100 Subject: [PATCH 1/2] docs: generate supported models list for llms.txt and docs Parse the models registry at docs build time into a Supported Models page and an llms.txt section, and add the latest version, backends and positioning to the llms.txt header. Refs #1581. --- docs/.gitignore | 1 + docs/docusaurus.config.js | 2 +- docs/package.json | 5 +- docs/scripts/build-version-docs.sh | 2 + docs/scripts/generate-supported-models.mjs | 70 ++++ docs/scripts/postbuild.mjs | 2 + docs/scripts/tasks/llms-txt-models.mjs | 92 ++++++ docs/scripts/tasks/model-registry.mjs | 309 ++++++++++++++++++ .../01-fundamentals/04-supported-models.md | 220 +++++++++++++ 9 files changed, 700 insertions(+), 3 deletions(-) create mode 100644 docs/scripts/generate-supported-models.mjs create mode 100644 docs/scripts/tasks/llms-txt-models.mjs create mode 100644 docs/scripts/tasks/model-registry.mjs create mode 100644 docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md diff --git a/docs/.gitignore b/docs/.gitignore index 958ae8b391..ca95c64f48 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -5,6 +5,7 @@ /build # Generated files +/docs/01-fundamentals/04-supported-models.md .docusaurus .cache-loader diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index aac31cab85..9a96a1ee69 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -88,7 +88,7 @@ const config = { llmsTxt: { siteTitle: 'React Native ExecuTorch', siteDescription: - "React Native ExecuTorch brings Meta's ExecuTorch AI framework into the React Native ecosystem, enabling developers to run AI models and LLMs locally, directly on mobile devices. It provides a declarative API for on-device inference, allowing you to use local AI models without relying on cloud infrastructure. Built on the ExecuTorch foundation - part of the PyTorch Edge ecosystem - it extends efficient on-device AI deployment to cross-platform mobile applications in React Native.", + "React Native ExecuTorch is Software Mansion's library for running AI models on-device in React Native, built on Meta's ExecuTorch (PyTorch Edge). One package covers LLMs and VLMs (streaming chat, tool calling, thinking mode, constrained sampling), speech (speech-to-text, text-to-speech, voice activity detection), computer vision, image generation and inpainting, and local RAG (text, image and ColBERT embeddings), fully offline on iOS and Android. Unlike bindings to a single runtime, which leave model export, tokenizers and pre/post-processing to the app, it ships a registry of pre-exported models with typed hooks for each task and per-device benchmarks, and still loads any custom ExecuTorch .pte.", autoSectionDepth: 3, autoSectionPosition: 1, enableDescriptions: true, diff --git a/docs/package.json b/docs/package.json index 5c6038a344..5edf6a4985 100644 --- a/docs/package.json +++ b/docs/package.json @@ -4,8 +4,9 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "docusaurus start", - "build": "docusaurus build && yarn prettier-api-reference && npm run postbuild", + "start": "yarn generate-models && docusaurus start", + "build": "yarn generate-models && docusaurus build && yarn prettier-api-reference && npm run postbuild", + "generate-models": "node scripts/generate-supported-models.mjs", "docs:version": "./scripts/build-version-docs.sh", "postbuild": "node scripts/postbuild.mjs", "prettier-api-reference": "npx prettier --write 'docs/06-api-reference/**/*.{md,mdx}'", diff --git a/docs/scripts/build-version-docs.sh b/docs/scripts/build-version-docs.sh index 4dea0f5d84..1c38e91368 100755 --- a/docs/scripts/build-version-docs.sh +++ b/docs/scripts/build-version-docs.sh @@ -7,6 +7,8 @@ if [ -z "$VERSION" ]; then exit 1 fi +# The Supported Models page is generated, so freeze the current registry's. +yarn generate-models yarn docusaurus docs:version $VERSION find versioned_docs/version-$VERSION -type f \( -name "*.md" -o -name "*.mdx" \) \ diff --git a/docs/scripts/generate-supported-models.mjs b/docs/scripts/generate-supported-models.mjs new file mode 100644 index 0000000000..71180b7458 --- /dev/null +++ b/docs/scripts/generate-supported-models.mjs @@ -0,0 +1,70 @@ +import { writeFileSync } from 'fs'; +import { join, dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { BACKEND_LABELS, readModelRegistry } from './tasks/model-registry.mjs'; + +// Writes the Supported Models page from the `models` registry, so the list +// moves with the library instead of being kept by hand. The page is generated +// on every build and is not committed; `yarn docs:version` freezes a copy of it +// into the versioned docs. + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const OUT_PATH = join(__dirname, '..', 'docs', '01-fundamentals', '04-supported-models.md'); + +const FRONT_MATTER = `--- +title: Supported Models +slug: /fundamentals/supported-models +description: 'Every pre-exported model in the React Native ExecuTorch registry, by task: LLMs and VLMs, speech, computer vision, embeddings and retrieval, with backends and precisions.' +keywords: + [ + react native executorch, + supported models, + on-device llm, + whisper, + yolo, + depth anything, + colbert, + xnnpack, + core ml, + mlx, + vulkan, + ] +---`; + +function cell(text) { + return text.replaceAll('|', '\\|'); +} + +function render(tasks) { + const lines = [ + FRONT_MATTER, + '', + '# Supported Models', + '', + 'Every model below ships pre-exported in the [`models`](./02-downloading-models.md) registry and downloads on first use. Backends: XNNPACK (CPU, iOS and Android), Core ML and MLX (iOS), Vulkan (Android GPU); `DEFAULT` picks the fastest one the device can run. Any other ExecuTorch `.pte` can be loaded too, see [Exporting Custom Models](../03-core-and-advanced/07-exporting-custom-models.md).', + '', + ]; + for (const task of tasks) { + lines.push(`## ${task.title}`, ''); + lines.push( + `[Guide](../${task.doc}) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#${task.bench})`, + '' + ); + if (task.note) lines.push(task.note, ''); + lines.push('| Model | Description | Backends | Precisions |', '| :-- | :-- | :-- | :-- |'); + for (const model of task.models) { + let description = model.description; + if (model.modalities.length > 0) + description += ` Inputs: text, ${model.modalities.join(', ')}.`; + if (model.variants.length > 0) description += ` Variants: ${model.variants.join(', ')}.`; + lines.push( + `| \`${model.path}\` | ${cell(description)} | ${model.backends.map((b) => BACKEND_LABELS[b]).join(', ')} | ${model.precisions.join(', ')} |` + ); + } + lines.push(''); + } + return lines.join('\n'); +} + +writeFileSync(OUT_PATH, render(readModelRegistry()), 'utf8'); +console.log(`Generated ${OUT_PATH}`); diff --git a/docs/scripts/postbuild.mjs b/docs/scripts/postbuild.mjs index ea1eb8aeb2..f5219215a3 100644 --- a/docs/scripts/postbuild.mjs +++ b/docs/scripts/postbuild.mjs @@ -1,6 +1,7 @@ import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; import { fixLLMsTxtDuplicatedPaths } from './tasks/fix-llms-txt.mjs'; +import { addModelsToLLMsTxt } from './tasks/llms-txt-models.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); @@ -9,6 +10,7 @@ const BUILD_DIR = join(__dirname, '..', 'build'); async function postbuild() { try { fixLLMsTxtDuplicatedPaths(BUILD_DIR); + addModelsToLLMsTxt(BUILD_DIR); console.log('All post-build tasks completed successfully.\n'); } catch (error) { console.error('\nPost-build script failed:', error); diff --git a/docs/scripts/tasks/llms-txt-models.mjs b/docs/scripts/tasks/llms-txt-models.mjs new file mode 100644 index 0000000000..fc9d1742dc --- /dev/null +++ b/docs/scripts/tasks/llms-txt-models.mjs @@ -0,0 +1,92 @@ +import { existsSync, readFileSync, writeFileSync } from 'fs'; +import { join, dirname } from 'path'; +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; +import { + BACKEND_LABELS, + BACKEND_PLATFORMS, + readModelRegistry, + readDocSlug, + byPrecision, +} from './model-registry.mjs'; + +export { addModelsToLLMsTxt }; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const config = createRequire(import.meta.url)(join(__dirname, '..', '..', 'docusaurus.config.js')); +const DOCS_URL = `${config.url}${config.baseUrl}docs`; + +// The plugin writes llms.txt from the docs pages alone, so assistants reading +// it learn neither which release is current nor which models ship. This adds +// both, ahead of the page index: a summary at the top of the header quote and +// a list of every registry model. +function addModelsToLLMsTxt(buildDir) { + console.log('Adding the model registry to llms.txt...'); + const filePath = join(buildDir, 'llms.txt'); + if (!existsSync(filePath)) { + console.warn('File llms.txt not found'); + return; + } + + const tasks = readModelRegistry(); + const lines = readFileSync(filePath, 'utf8').split('\n'); + if (lines.includes('## Supported Models')) { + console.info('llms.txt already lists the models'); + return; + } + + const quote = lines.findIndex((line) => line.startsWith('>')); + const firstSection = lines.findIndex((line) => line.startsWith('## ')); + if (quote === -1 || firstSection === -1) { + throw new Error('llms.txt has no header quote or no sections to insert the models before'); + } + + lines.splice(firstSection, 0, ...renderModels(tasks), ''); + lines.splice(quote, 0, ...renderSummary(tasks), '>'); + + writeFileSync(filePath, lines.join('\n'), 'utf8'); + console.log('Added the model registry to llms.txt'); +} + +function renderSummary(tasks) { + const lastVersion = config.presets[0][1].docs.lastVersion; + const models = tasks.flatMap((task) => task.models); + const backends = [...new Set(models.flatMap((m) => m.backends))]; + const backendText = Object.keys(BACKEND_LABELS) + .filter((b) => backends.includes(b)) + .map((b) => `${BACKEND_LABELS[b]} (${BACKEND_PLATFORMS[b]})`) + .join(', '); + const precisions = [...new Set(models.flatMap((m) => m.precisions))].sort(byPrecision); + const today = new Date().toISOString().slice(0, 10); + + return [ + `> Latest stable release: v${lastVersion} (npm \`react-native-executorch\`); this file was generated ${today}.`, + `> ${models.length} pre-exported models across ${tasks.length} tasks, listed under "Supported Models" below.`, + `> Backends: ${backendText}. Precisions: ${precisions.join(', ')}.`, + ]; +} + +function renderModels(tasks) { + const lines = [ + '## Supported Models', + '', + `Generated from the library's \`models\` registry. Full table: [Supported Models](${DOCS_URL}${readDocSlug('01-fundamentals/04-supported-models.md')}). Any other ExecuTorch \`.pte\` can be loaded too.`, + '', + ]; + for (const task of tasks) { + lines.push( + `### ${task.title} ([guide](${DOCS_URL}${readDocSlug(task.doc)}), [benchmarks](${DOCS_URL}/benchmarks#${task.bench}))`, + '' + ); + if (task.note) lines.push(task.note, ''); + for (const model of task.models) { + const parts = [model.description]; + if (model.modalities.length > 0) parts.push(`Inputs: text, ${model.modalities.join(', ')}.`); + if (model.variants.length > 0) parts.push(`Variants: ${model.variants.join(', ')}.`); + parts.push(`Backends: ${model.backends.map((b) => BACKEND_LABELS[b]).join(', ')}.`); + lines.push(`- \`${model.path}\`: ${parts.join(' ')}`); + } + lines.push(''); + } + return lines.slice(0, -1); +} diff --git a/docs/scripts/tasks/model-registry.mjs b/docs/scripts/tasks/model-registry.mjs new file mode 100644 index 0000000000..6c5d5694e3 --- /dev/null +++ b/docs/scripts/tasks/model-registry.mjs @@ -0,0 +1,309 @@ +import { readFileSync } from 'fs'; +import { join, dirname } from 'path'; +import { fileURLToPath } from 'url'; +import ts from 'typescript'; + +export { TASKS, BACKEND_LABELS, BACKEND_PLATFORMS, readModelRegistry, readDocSlug, byPrecision }; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const DOCS_DIR = join(__dirname, '..', '..'); +const REGISTRY_PATH = join( + DOCS_DIR, + '..', + 'packages', + 'react-native-executorch', + 'src', + 'models.ts' +); + +// Every registry category, in the order the docs present them. `doc` is the +// task's page under docs/docs and `bench` the heading anchor of its chart on +// the benchmarks page. A category the registry gains without an entry here +// fails the build, so the generated lists cannot silently drop a task. +const TASKS = { + llm: { + title: 'LLMs & VLMs', + doc: '02-extensions/natural-language/02-llm-chat-and-generation.md', + bench: 'llm-chat--text-generation', + note: 'Chat sessions stream tokens and support tool calling, a thinking-mode switch, Jinja chat templates, constrained sampling and image/audio inputs on multimodal models.', + }, + textEmbeddings: { + title: 'Text Embeddings', + doc: '02-extensions/natural-language/03-text-embeddings.md', + bench: 'text-embeddings', + }, + colbertEmbeddings: { + title: 'ColBERT Retrieval', + doc: '02-extensions/natural-language/06-colbert-retrieval.md', + bench: 'colbert-embeddings', + }, + privacyFilter: { + title: 'Privacy Filter (PII detection)', + doc: '02-extensions/natural-language/04-privacy-filter.md', + bench: 'privacy-filter', + }, + tokenizer: { skip: true }, + speechToText: { + title: 'Speech to Text', + doc: '02-extensions/speech/03-speech-to-text.md', + bench: 'speech-to-text', + }, + textToSpeech: { + title: 'Text to Speech', + doc: '02-extensions/speech/02-text-to-speech.md', + bench: 'text-to-speech', + }, + voiceActivityDetection: { + title: 'Voice Activity Detection', + doc: '02-extensions/speech/04-voice-activity-detection.md', + bench: 'voice-activity-detection', + }, + classification: { + title: 'Image Classification', + doc: '02-extensions/computer-vision/02-image-classification.md', + bench: 'image-classification', + }, + objectDetection: { + title: 'Object Detection', + doc: '02-extensions/computer-vision/03-object-detection.md', + bench: 'object-detection', + }, + instanceSegmentation: { + title: 'Instance Segmentation', + doc: '02-extensions/computer-vision/07-instance-segmentation.md', + bench: 'instance-segmentation', + }, + semanticSegmentation: { + title: 'Semantic Segmentation', + doc: '02-extensions/computer-vision/06-semantic-segmentation.md', + bench: 'semantic-segmentation', + }, + keypointDetection: { + title: 'Pose & Keypoints', + doc: '02-extensions/computer-vision/04-pose-and-keypoints.md', + bench: 'pose--keypoints', + }, + depthEstimation: { + title: 'Depth Estimation', + doc: '02-extensions/computer-vision/12-depth-estimation.md', + bench: 'depth-estimation', + }, + ocr: { + title: 'OCR', + doc: '02-extensions/computer-vision/05-optical-character-recognition.md', + bench: 'ocr', + }, + imageEmbeddings: { + title: 'Image Embeddings', + doc: '02-extensions/computer-vision/09-image-embeddings.md', + bench: 'image-embeddings', + }, + inpainting: { + title: 'Image Inpainting', + doc: '02-extensions/computer-vision/11-image-inpainting.md', + bench: 'image-inpainting', + }, + textToImage: { + title: 'Text to Image', + doc: '02-extensions/computer-vision/10-text-to-image.md', + bench: 'text-to-image', + }, + styleTransfer: { + title: 'Style Transfer', + doc: '02-extensions/computer-vision/08-style-transfer.md', + bench: 'style-transfer', + }, +}; + +const BACKEND_LABELS = { + xnnpack: 'XNNPACK', + coreml: 'Core ML', + mlx: 'MLX', + vulkan: 'Vulkan', +}; + +const BACKEND_PLATFORMS = { + xnnpack: 'CPU, iOS and Android', + coreml: 'iOS', + mlx: 'iOS', + vulkan: 'Android GPU', +}; + +const PRECISION_ORDER = ['fp32', 'fp16', 'bf16', 'int8', '8da8w', '8da4w', 'int4', 'spinquant']; + +/** + * Reads the `models` registry statically, without running it: the registry + * imports react-native, so the build walks its syntax tree instead. + * @returns {{ key: string, title: string, doc: string, bench: string, note?: string, + * models: { path: string, description: string, backends: string[], precisions: string[], + * variants: string[], modalities: string[] }[] }[]} One entry per task, in docs order. + */ +function readModelRegistry() { + const source = readFileSync(REGISTRY_PATH, 'utf8'); + const file = ts.createSourceFile(REGISTRY_PATH, source, ts.ScriptTarget.Latest, true); + + const constants = new Map(); + let registry; + file.forEachChild((node) => { + if (!ts.isVariableStatement(node)) return; + for (const decl of node.declarationList.declarations) { + if (!ts.isIdentifier(decl.name) || !decl.initializer) continue; + constants.set(decl.name.text, decl.initializer); + if (decl.name.text === 'models') registry = decl.initializer; + } + }); + if (!registry || !ts.isObjectLiteralExpression(registry)) { + throw new Error(`No \`export const models = {...}\` found in ${REGISTRY_PATH}`); + } + + const categories = new Map(); + for (const prop of registry.properties) { + if (!ts.isPropertyAssignment(prop)) continue; + const key = prop.name.getText(file); + if (!(key in TASKS)) { + throw new Error( + `Registry category \`models.${key}\` has no entry in TASKS (docs/scripts/tasks/model-registry.mjs).` + ); + } + if (TASKS[key].skip) continue; + const models = []; + for (const entry of prop.initializer.properties ?? []) { + if (!ts.isPropertyAssignment(entry)) continue; + const name = entry.name.getText(file); + const leaves = []; + collectLeaves(entry.initializer, [], leaves, file); + if (leaves.length === 0) continue; + const variants = leaves.flatMap((leaf) => leaf.variants); + models.push({ + path: `models.${key}.${name}`, + description: firstSentence(jsDocOf(entry, file)), + backends: unique(variants.map((v) => v.backend)).sort(byBackend), + precisions: unique(variants.map((v) => v.precision).filter(Boolean)).sort(byPrecision), + variants: summarizeLeafPaths(leaves.map((leaf) => leaf.path)), + modalities: unique(variants.flatMap((v) => modalitiesOf(v.config, constants))), + }); + } + categories.set(key, models); + } + + return Object.entries(TASKS) + .filter(([key, task]) => !task.skip && categories.has(key)) + .map(([key, task]) => ({ key, ...task, models: categories.get(key) })); +} + +/** + * Walks a registry branch down to its `variants({...})` groups. + * @param {ts.Expression} node A registry branch. + * @param {string[]} path The keys leading to `node`, below the model entry. + * @param {{ path: string[], variants: object[] }[]} out The groups found so far. + * @param {ts.SourceFile} file The registry source. + */ +function collectLeaves(node, path, out, file) { + if (ts.isCallExpression(node) && node.expression.getText(file) === 'variants') { + const [map] = node.arguments; + const variants = []; + for (const prop of map.properties) { + if (!ts.isPropertyAssignment(prop)) continue; + // Deprecated variants are on their way out, so they do not count + // towards what a model supports. + const init = prop.initializer; + if (ts.isCallExpression(init) && init.expression.getText(file) === 'deprecated') continue; + const config = init.getText(file); + const [backend, ...rest] = prop.name.getText(file).toLowerCase().split('_'); + // OCR keys name only the backend; the precision is in the constant's name. + const precision = rest.length > 0 ? rest.join('_') : config.toLowerCase().split('_').pop(); + variants.push({ backend, precision, config }); + } + if (variants.length > 0) out.push({ path, variants }); + return; + } + const map = + ts.isCallExpression(node) && node.expression.getText(file) === 'family' + ? node.arguments[0] + : node; + if (!ts.isObjectLiteralExpression(map)) return; + for (const prop of map.properties) { + if (!ts.isPropertyAssignment(prop)) continue; + collectLeaves(prop.initializer, [...path, prop.name.getText(file)], out, file); + } +} + +/** + * Collapses sub-group paths into one readable list, e.g. NANO, SMALL (each + * SIZE_384, SIZE_640) rather than every combination. + * @param {string[][]} paths The sub-group path of each `variants` group. + * @returns {string[]} The sub-group names to show; empty for a single group. + */ +function summarizeLeafPaths(paths) { + if (paths.length <= 1) return []; + const heads = unique(paths.map((p) => p[0])); + const tails = heads.map((head) => + paths + .filter((p) => p[0] === head) + .map((p) => p.slice(1).join('.')) + .join(', ') + ); + if (paths.every((p) => p.length === 2) && unique(tails).length === 1) { + return [`${heads.join(', ')} (each ${tails[0]})`]; + } + return paths.map((p) => p.join('.')); +} + +function modalitiesOf(configName, constants) { + const config = constants.get(configName); + if (!config || !ts.isObjectLiteralExpression(config)) return []; + const prop = config.properties.find( + (p) => ts.isPropertyAssignment(p) && p.name.getText() === 'modalities' + ); + if (!prop || !ts.isArrayLiteralExpression(prop.initializer)) return []; + return prop.initializer.elements.filter(ts.isStringLiteral).map((e) => e.text); +} + +function jsDocOf(node, file) { + const ranges = ts.getLeadingCommentRanges(file.getFullText(), node.getFullStart()) ?? []; + const doc = ranges + .map((r) => file.getFullText().slice(r.pos, r.end)) + .filter((c) => c.startsWith('/**')) + .pop(); + if (!doc) return ''; + return doc + .replace(/^\/\*\*|\*\/$/g, '') + .split('\n') + .map((line) => line.replace(/^\s*\*\s?/, '')) + .filter((line) => !line.startsWith('@')) + .join(' ') + .replace(/\{@link\s+([^}\s]+)[^}]*\}/g, '`$1`') + .replace(/\s+/g, ' ') + .trim(); +} + +function firstSentence(text) { + const match = text.match(/^.*?[.!?](?=\s+[A-Z(`]|$)/); + return (match ? match[0] : text).trim(); +} + +function unique(values) { + return [...new Set(values)]; +} + +function byPrecision(a, b) { + const rank = (p) => + PRECISION_ORDER.includes(p) ? PRECISION_ORDER.indexOf(p) : PRECISION_ORDER.length; + return rank(a) - rank(b); +} + +function byBackend(a, b) { + const order = Object.keys(BACKEND_LABELS); + return order.indexOf(a) - order.indexOf(b); +} + +/** + * @param {string} docPath A page under docs/docs. + * @returns {string} The page's `slug` front matter. + */ +function readDocSlug(docPath) { + const content = readFileSync(join(DOCS_DIR, 'docs', docPath), 'utf8'); + const slug = content.match(/^slug:\s*(\S+)\s*$/m); + if (!slug) throw new Error(`docs/${docPath} has no slug`); + return slug[1]; +} diff --git a/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md b/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md new file mode 100644 index 0000000000..baa0cc072f --- /dev/null +++ b/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md @@ -0,0 +1,220 @@ +--- +title: Supported Models +slug: /fundamentals/supported-models +description: 'Every pre-exported model in the React Native ExecuTorch registry, by task: LLMs and VLMs, speech, computer vision, embeddings and retrieval, with backends and precisions.' +keywords: + [ + react native executorch, + supported models, + on-device llm, + whisper, + yolo, + depth anything, + colbert, + xnnpack, + core ml, + mlx, + vulkan, + ] +--- + +# Supported Models + +Every model below ships pre-exported in the [`models`](./02-downloading-models.md) registry and downloads on first use. Backends: XNNPACK (CPU, iOS and Android), Core ML and MLX (iOS), Vulkan (Android GPU); `DEFAULT` picks the fastest one the device can run. Any other ExecuTorch `.pte` can be loaded too, see [Exporting Custom Models](../03-core-and-advanced/07-exporting-custom-models.md). + +## LLMs & VLMs + +[Guide](../02-extensions/natural-language/02-llm-chat-and-generation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#llm-chat--text-generation) + +Chat sessions stream tokens and support tool calling, a thinking-mode switch, Jinja chat templates, constrained sampling and image/audio inputs on multimodal models. + +| Model | Description | Backends | Precisions | +| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------ | :------------------- | :---------------- | +| `models.llm.MINICPM5_2B` | OpenBMB MiniCPM5 2B chat model with an 8K context window. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.LFM2_5_1_2B` | Liquid AI LFM 2.5 1.2B general-purpose hybrid language model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.LFM2_5_2_6B` | Liquid AI LFM 2.5 2.6B hybrid language model post-trained for instruction following and agentic workloads. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.LFM2_5_350M` | Liquid AI LFM 2.5 350M ultra-compact hybrid language model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.LFM2_5_VL_450M` | Liquid AI LFM 2.5 VL 450M lightweight multimodal vision-language model. Inputs: text, image. | XNNPACK, MLX, Vulkan | 8da4w, int4 | +| `models.llm.LFM2_5_VL_1_6B` | Liquid AI LFM 2.5 VL 1.6B high-capacity vision-language model. Inputs: text, image. | XNNPACK, MLX, Vulkan | int8, 8da4w, int4 | +| `models.llm.BIELIK_V3_1_5B` | Bielik v3 1.5B bilingual Polish & English language model, developed by SpeakLeash. | XNNPACK | 8da4w | +| `models.llm.LLAMA3_2_1B` | Meta Llama 3.2 1B lightweight instruction-tuned multilingual model. | XNNPACK, MLX | int4, spinquant | +| `models.llm.LLAMA3_2_3B` | Meta Llama 3.2 3B instruction-tuned multilingual language model. | XNNPACK, MLX | int4, spinquant | +| `models.llm.SMOLLM2_135M` | Hugging Face SmolLM2 135M ultra-compact language model. | XNNPACK, MLX | int8, 8da8w | +| `models.llm.SMOLLM2_360M` | Hugging Face SmolLM2 360M compact instruction-tuned model. | XNNPACK, MLX | int8, 8da8w | +| `models.llm.SMOLLM2_1_7B` | Hugging Face SmolLM2 1.7B language model trained on curated educational, synthetic, and web data. | XNNPACK, MLX | int8, 8da8w | +| `models.llm.HAMMER2_1_0_5B` | Hammer 2.1 0.5B specialized function-calling model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.HAMMER2_1_1_5B` | Hammer 2.1 1.5B function-calling language model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.HAMMER2_1_3B` | Hammer 2.1 3B high-capacity function-calling model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.PHI4_MINI` | Microsoft Phi-4 Mini 3.8B high-density reasoning model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.QWEN2_5_0_5B` | Alibaba Qwen 2.5 0.5B ultra-lightweight multilingual model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.QWEN2_5_1_5B` | Alibaba Qwen 2.5 1.5B multilingual instruction model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.QWEN2_5_3B` | Alibaba Qwen 2.5 3B high-capability multilingual model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.QWEN3_0_6B` | Alibaba Qwen 3 0.6B next-generation compact language model. | XNNPACK, MLX | int8, 8da4w | +| `models.llm.QWEN3_1_7B` | Alibaba Qwen 3 1.7B next-generation multilingual language model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.QWEN3_4B` | Alibaba Qwen 3 4B high-capacity generative model. | XNNPACK, MLX | 8da4w, int4 | +| `models.llm.GEMMA4_E2B` | Google Gemma 4 E2B generative language model. | XNNPACK, MLX, Vulkan | 8da4w, int4 | +| `models.llm.GEMMA4_OMNI_E2B` | Google Gemma 4 E2B multimodal (omni) language model supporting text, image, and audio inputs. Inputs: text, image, audio. | XNNPACK, MLX, Vulkan | 8da4w, int4 | + +## Text Embeddings + +[Guide](../02-extensions/natural-language/03-text-embeddings.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#text-embeddings) + +| Model | Description | Backends | Precisions | +| :------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | :---------------- | +| `models.textEmbeddings.ALL_MINILM_L6_V2` | Compact 384-dimensional sentence transformer mapping text to a dense vector space. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.textEmbeddings.ALL_MPNET_BASE_V2` | High-quality 768-dimensional sentence transformer model based on MPNet. | XNNPACK, Vulkan | fp16, int8, 8da4w | +| `models.textEmbeddings.MULTI_QA_MINILM_L6_COS_V1` | 384-dimensional sentence transformer fine-tuned specifically for semantic QA matching using cosine similarity. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.textEmbeddings.MULTI_QA_MPNET_BASE_DOT_V1` | 768-dimensional sentence transformer fine-tuned specifically for question-answering matching using dot product distance. | XNNPACK, Vulkan | fp16, int8, 8da4w | +| `models.textEmbeddings.PARAPHRASE_MULTILINGUAL_MINILM_L12_V2` | 384-dimensional sentence transformer supporting 50+ languages for cross-lingual semantic similarity. | XNNPACK, Core ML, Vulkan | fp16, int8, 8da4w | +| `models.textEmbeddings.DISTILUSE_BASE_MULTILINGUAL_CASED_V2` | Multilingual sentence transformer supporting 50+ languages, based on distilled Universal Sentence Encoder (512-dim output). | XNNPACK, Core ML, MLX, Vulkan | fp16, int8, 8da4w | +| `models.textEmbeddings.CLIP_VIT_BASE_PATCH32_TEXT` | CLIP text encoder (ViT-B/32) mapping text queries into a 512-dimensional joint text-image embedding space. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.textEmbeddings.LFM2_5_EMBEDDING_350M` | Liquid AI LFM 2.5 350M parameter embedding model for asymmetric search and retrieval tasks. | XNNPACK, MLX | 8da4w, int4 | + +## ColBERT Retrieval + +[Guide](../02-extensions/natural-language/06-colbert-retrieval.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#colbert-embeddings) + +| Model | Description | Backends | Precisions | +| :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :---------- | +| `models.colbertEmbeddings.LFM2_5_COLBERT_350M` | Liquid AI LFM 2.5 350M ColBERT model: 128-dimensional token vectors, multilingual (11 languages), 32-token queries and documents of up to 512 tokens. | XNNPACK, MLX | 8da4w, int4 | + +## Privacy Filter (PII detection) + +[Guide](../02-extensions/natural-language/04-privacy-filter.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#privacy-filter) + +| Model | Description | Backends | Precisions | +| :------------------------------ | :-------------------------------------------------------------------------------------------- | :----------- | :---------- | +| `models.privacyFilter.OPENAI` | OpenAI-style detector covering 8 common PII types (name, email, phone, address, and similar). | XNNPACK, MLX | 8da4w, int4 | +| `models.privacyFilter.NEMOTRON` | Nemotron-based detector covering 55 fine-grained PII types. | XNNPACK, MLX | int8, 8da4w | + +## Speech to Text + +[Guide](../02-extensions/speech/03-speech-to-text.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#speech-to-text) + +| Model | Description | Backends | Precisions | +| :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | :--------------- | +| `models.speechToText.WHISPER` | OpenAI Whisper automatic speech recognition model family with integrated Voice Activity Detection. Variants: TINY, BASE, SMALL, EN.TINY, EN.BASE, EN.SMALL. | XNNPACK, Core ML, MLX, Vulkan | fp16, bf16, int8 | + +## Text to Speech + +[Guide](../02-extensions/speech/02-text-to-speech.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#text-to-speech) + +| Model | Description | Backends | Precisions | +| :------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :------------------- | :--------------- | +| `models.textToSpeech.SUPERTONIC` | Supertonic 3 multilingual flow-matching Text-to-Speech model. | XNNPACK, MLX, Vulkan | fp32, fp16, int8 | +| `models.textToSpeech.KOKORO` | Kokoro — a lightweight phoneme-driven Text-to-Speech model. Variants: EN_US, EN_GB, ES, FR, IT, PT, HI, PL, DE, ZH. | XNNPACK, Core ML | fp32 | + +## Voice Activity Detection + +[Guide](../02-extensions/speech/04-voice-activity-detection.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#voice-activity-detection) + +| Model | Description | Backends | Precisions | +| :--------------------------------------- | :--------------------------------------------------------------------------- | :------- | :--------- | +| `models.voiceActivityDetection.FSMN_VAD` | Feedforward Sequential Memory Network (FSMN) Voice Activity Detection model. | XNNPACK | fp32 | + +## Image Classification + +[Guide](../02-extensions/computer-vision/02-image-classification.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#image-classification) + +| Model | Description | Backends | Precisions | +| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :--------------- | :--------- | +| `models.classification.EFFICIENTNET_V2_S` | EfficientNetV2-S image classification model pre-trained on ImageNet-1k (1000 categories, see `IMAGENET1K_LABELS`). | XNNPACK, Core ML | fp16, int8 | + +## Object Detection + +[Guide](../02-extensions/computer-vision/03-object-detection.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#object-detection) + +| Model | Description | Backends | Precisions | +| :----------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | +| `models.objectDetection.SSDLITE320_MOBILENET_V3_LARGE` | SSDLite object detector with MobileNetV3-Large backbone trained on COCO (see `COCO_CLASSES`) at 320x320 resolution. | XNNPACK, Core ML | fp32, fp16 | +| `models.objectDetection.RFDETR_NANO` | RF-DETR (Roboflow Detection Transformer) Nano variant trained on COCO (see `COCO_CLASSES`). | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.objectDetection.YOLO26` | Ultralytics YOLO26 real-time object detection models trained on COCO (80 classes, see `COCO_CLASSES_YOLO`). Variants: NANO, SMALL, MEDIUM, LARGE, XLARGE (each SIZE_384, SIZE_512, SIZE_640). | XNNPACK, Core ML, Vulkan | fp16, int8 | + +## Instance Segmentation + +[Guide](../02-extensions/computer-vision/07-instance-segmentation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#instance-segmentation) + +| Model | Description | Backends | Precisions | +| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | +| `models.instanceSegmentation.FASTSAM` | Fast Segment Anything Model (FastSAM) for promptable or global object instance mask segmentation. Variants: S, X. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.instanceSegmentation.RFDETR_NANO` | RF-DETR (Roboflow Detection Transformer) Nano instance segmentation model predicting COCO class masks and bounding boxes (see `COCO_CLASSES`). | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.instanceSegmentation.YOLO26` | YOLO26 instance segmentation models predicting COCO class instance masks and bounding boxes (see `COCO_CLASSES_YOLO`). Variants: NANO, SMALL, MEDIUM, LARGE, XLARGE (each SIZE_384, SIZE_512, SIZE_640). | XNNPACK, Core ML, Vulkan | fp16, int8 | + +## Semantic Segmentation + +[Guide](../02-extensions/computer-vision/06-semantic-segmentation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#semantic-segmentation) + +| Model | Description | Backends | Precisions | +| :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------- | :--------- | +| `models.semanticSegmentation.SELFIE_SEGMENTATION` | Lightweight portrait selfie segmentation model for real-time person vs background separation. | XNNPACK, Core ML | fp32, fp16 | +| `models.semanticSegmentation.SELFIE_SEGMENTATION_LANDSCAPE` | MediaPipe Selfie Segmentation, landscape orientation. | XNNPACK, Core ML | fp32, fp16 | +| `models.semanticSegmentation.LRASPP_MOBILENET_V3_LARGE` | Lite R-ASPP semantic segmentation model with MobileNetV3-Large backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| `models.semanticSegmentation.DEEPLAB_V3_RESNET50` | DeepLabV3 semantic segmentation model with ResNet-50 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| `models.semanticSegmentation.DEEPLAB_V3_RESNET101` | DeepLabV3 semantic segmentation model with ResNet-101 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| `models.semanticSegmentation.DEEPLAB_V3_MOBILENET_V3_LARGE` | DeepLabV3 semantic segmentation model with MobileNetV3-Large backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| `models.semanticSegmentation.FCN_RESNET50` | Fully Convolutional Network (FCN) semantic segmentation model with ResNet-50 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| `models.semanticSegmentation.FCN_RESNET101` | Fully Convolutional Network (FCN) semantic segmentation model with ResNet-101 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | + +## Pose & Keypoints + +[Guide](../02-extensions/computer-vision/04-pose-and-keypoints.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#pose--keypoints) + +| Model | Description | Backends | Precisions | +| :----------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | +| `models.keypointDetection.BLAZEFACE` | MediaPipe BlazeFace lightweight face detection and 6-point facial landmark locator (eyes, nose, mouth, ears, see `BLAZEFACE_LANDMARKS`). | XNNPACK, Vulkan | fp32, fp16 | +| `models.keypointDetection.FACEMESH` | MediaPipe Face Mesh: a dense 468-point 3-D mesh (see `FACEMESH_LANDMARKS`) and a face-presence score, regressed from a 192x192 crop of one face. | XNNPACK, Core ML | fp32, fp16 | +| `models.keypointDetection.YOLO26_POSE` | YOLO26 human pose estimation model predicting 17 COCO body keypoints (see `COCO_LANDMARKS`). Variants: SIZE_384, SIZE_512, SIZE_640. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.keypointDetection.RFDETR_KEYPOINT` | RF-DETR (Roboflow Detection Transformer) pose keypoint detector predicting 17 COCO body keypoints (see `COCO_LANDMARKS`). | XNNPACK, Core ML, Vulkan | fp16, int8 | + +## Depth Estimation + +[Guide](../02-extensions/computer-vision/12-depth-estimation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#depth-estimation) + +| Model | Description | Backends | Precisions | +| :----------------------------------------------- | :------------------------------------------------------------------------- | :----------------------- | :--------------- | +| `models.depthEstimation.DEPTH_ANYTHING_V2_SMALL` | Depth Anything V2 Small with a ViT-S/14 backbone. | XNNPACK, Core ML, Vulkan | fp32, fp16, int8 | +| `models.depthEstimation.DEPTH_ANYTHING_V3_SMALL` | Depth Anything 3 Small, exported for single-image relative depth. | XNNPACK, Core ML, Vulkan | fp32, fp16, int8 | +| `models.depthEstimation.ZIPDEPTH_BASE` | ZipDepth Base NPU with a 384 × 384 input for low-latency depth estimation. | XNNPACK, Core ML, Vulkan | fp32, fp16 | + +## OCR + +[Guide](../02-extensions/computer-vision/05-optical-character-recognition.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#ocr) + +| Model | Description | Backends | Precisions | +| :------------------ | :------------------------------------------------------------------------------------- | :----------------------- | :--------- | +| `models.ocr.PADDLE` | PP-OCRv6 small — DBNet detector plus an SVTR recognizer, one model for every language. | XNNPACK, Core ML, Vulkan | fp16, int8 | + +## Image Embeddings + +[Guide](../02-extensions/computer-vision/09-image-embeddings.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#image-embeddings) + +| Model | Description | Backends | Precisions | +| :--------------------------------------------- | :-------------------------------------------------------------------------------------------- | :---------------------------- | :--------- | +| `models.imageEmbeddings.CLIP_VIT_BASE_PATCH32` | CLIP vision encoder (ViT-B/32) mapping images into a 512-dimensional shared text-image space. | XNNPACK, Core ML, MLX, Vulkan | fp16, int8 | + +## Image Inpainting + +[Guide](../02-extensions/computer-vision/11-image-inpainting.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#image-inpainting) + +| Model | Description | Backends | Precisions | +| :------------------------ | :--------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | +| `models.inpainting.MIGAN` | MI-GAN, a mobile inpainting GAN trained on Places2 (scenes) and FFHQ (faces). Variants: SIZE_512, SIZE_256, FACES_256. | XNNPACK, Core ML, Vulkan | fp16 | + +## Text to Image + +[Guide](../02-extensions/computer-vision/10-text-to-image.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#text-to-image) + +| Model | Description | Backends | Precisions | +| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------ | :----------------------- | :--------- | +| `models.textToImage.SDXS_512_DREAMSHAPER` | Ultra-fast SDXS (Stable Diffusion eXtreme Speed) 512x512 text-to-image generation model based on DreamShaper. | XNNPACK, Core ML, Vulkan | fp16, int8 | + +## Style Transfer + +[Guide](../02-extensions/computer-vision/08-style-transfer.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#style-transfer) + +| Model | Description | Backends | Precisions | +| :----------------------------------- | :-------------------------------------------------------------------------------------------- | :----------------------- | :--------- | +| `models.styleTransfer.CANDY` | Fast neural style transfer model generating a vibrant, artistic "Candy" style effect. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.styleTransfer.MOSAIC` | Fast neural style transfer model applying a classic tile mosaic artistic pattern. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.styleTransfer.RAIN_PRINCESS` | Fast neural style transfer model applying a painterly "Rain Princess" oil painting aesthetic. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| `models.styleTransfer.UDNIE` | Fast neural style transfer model applying Francis Picabia's "Udnie" abstract art style. | XNNPACK, Core ML, Vulkan | fp16, int8 | From f43cb77cdca922a7c849b7dbe41ea8264398adfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20S=C5=82uszniak?= Date: Thu, 29 Oct 2026 11:53:59 +0100 Subject: [PATCH 2/2] docs: date each supported model from the release tags Walk release tags in date order to find the first release that shipped each registry entry, with a fixed alias table for the pre-0.10 constant names. Docs CI checks out full history (blobless) so the column is never dropped. --- .github/workflows/docs-build-check.yml | 5 + .github/workflows/publish_docs.yml | 5 + docs/scripts/generate-supported-models.mjs | 14 +- docs/scripts/tasks/llms-txt-models.mjs | 17 +- docs/scripts/tasks/model-history.mjs | 133 +++++++++++ docs/scripts/tasks/model-registry.mjs | 52 +++-- .../01-fundamentals/04-supported-models.md | 210 +++++++++--------- 7 files changed, 303 insertions(+), 133 deletions(-) create mode 100644 docs/scripts/tasks/model-history.mjs diff --git a/.github/workflows/docs-build-check.yml b/.github/workflows/docs-build-check.yml index d7d3119ca7..eaddaa90ec 100644 --- a/.github/workflows/docs-build-check.yml +++ b/.github/workflows/docs-build-check.yml @@ -39,6 +39,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v6 + with: + # The Supported Models page dates each model from the release tags; + # blobs are fetched only for the files it reads. + fetch-depth: 0 + filter: blob:none - name: Use Node.js 24 uses: actions/setup-node@v6 with: diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index 21680a4126..243408969a 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -20,6 +20,11 @@ jobs: steps: - name: Check out uses: actions/checkout@v6 + with: + # The Supported Models page dates each model from the release tags; + # blobs are fetched only for the files it reads. + fetch-depth: 0 + filter: blob:none - name: Generate docs run: >- diff --git a/docs/scripts/generate-supported-models.mjs b/docs/scripts/generate-supported-models.mjs index 71180b7458..7558b74b38 100644 --- a/docs/scripts/generate-supported-models.mjs +++ b/docs/scripts/generate-supported-models.mjs @@ -2,6 +2,7 @@ import { writeFileSync } from 'fs'; import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; import { BACKEND_LABELS, readModelRegistry } from './tasks/model-registry.mjs'; +import { readAddedIn } from './tasks/model-history.mjs'; // Writes the Supported Models page from the `models` registry, so the list // moves with the library instead of being kept by hand. The page is generated @@ -35,7 +36,7 @@ function cell(text) { return text.replaceAll('|', '\\|'); } -function render(tasks) { +function render(tasks, addedIn) { const lines = [ FRONT_MATTER, '', @@ -51,14 +52,17 @@ function render(tasks) { '' ); if (task.note) lines.push(task.note, ''); - lines.push('| Model | Description | Backends | Precisions |', '| :-- | :-- | :-- | :-- |'); + lines.push( + `| Model | Description | Backends | Precisions |${addedIn ? ' Added in |' : ''}`, + `| :-- | :-- | :-- | :-- |${addedIn ? ' :-- |' : ''}` + ); for (const model of task.models) { let description = model.description; if (model.modalities.length > 0) description += ` Inputs: text, ${model.modalities.join(', ')}.`; if (model.variants.length > 0) description += ` Variants: ${model.variants.join(', ')}.`; lines.push( - `| \`${model.path}\` | ${cell(description)} | ${model.backends.map((b) => BACKEND_LABELS[b]).join(', ')} | ${model.precisions.join(', ')} |` + `| \`${model.path}\` | ${cell(description)} | ${model.backends.map((b) => BACKEND_LABELS[b]).join(', ')} | ${model.precisions.join(', ')} |${addedIn ? ` ${addedIn.get(model.path) ?? 'next'} |` : ''}` ); } lines.push(''); @@ -66,5 +70,7 @@ function render(tasks) { return lines.join('\n'); } -writeFileSync(OUT_PATH, render(readModelRegistry()), 'utf8'); +const tasks = readModelRegistry(); +const addedIn = readAddedIn(tasks.flatMap((task) => task.models.map((model) => model.path))); +writeFileSync(OUT_PATH, render(tasks, addedIn), 'utf8'); console.log(`Generated ${OUT_PATH}`); diff --git a/docs/scripts/tasks/llms-txt-models.mjs b/docs/scripts/tasks/llms-txt-models.mjs index fc9d1742dc..07997b271c 100644 --- a/docs/scripts/tasks/llms-txt-models.mjs +++ b/docs/scripts/tasks/llms-txt-models.mjs @@ -9,6 +9,7 @@ import { readDocSlug, byPrecision, } from './model-registry.mjs'; +import { readAddedIn } from './model-history.mjs'; export { addModelsToLLMsTxt }; @@ -41,14 +42,15 @@ function addModelsToLLMsTxt(buildDir) { throw new Error('llms.txt has no header quote or no sections to insert the models before'); } - lines.splice(firstSection, 0, ...renderModels(tasks), ''); - lines.splice(quote, 0, ...renderSummary(tasks), '>'); + const addedIn = readAddedIn(tasks.flatMap((task) => task.models.map((model) => model.path))); + lines.splice(firstSection, 0, ...renderModels(tasks, addedIn), ''); + lines.splice(quote, 0, ...renderSummary(tasks, addedIn), '>'); writeFileSync(filePath, lines.join('\n'), 'utf8'); console.log('Added the model registry to llms.txt'); } -function renderSummary(tasks) { +function renderSummary(tasks, addedIn) { const lastVersion = config.presets[0][1].docs.lastVersion; const models = tasks.flatMap((task) => task.models); const backends = [...new Set(models.flatMap((m) => m.backends))]; @@ -59,14 +61,20 @@ function renderSummary(tasks) { const precisions = [...new Set(models.flatMap((m) => m.precisions))].sort(byPrecision); const today = new Date().toISOString().slice(0, 10); + const latestMinor = `v${lastVersion.replace(/\.x$/, '.')}`; + const added = addedIn + ? models.filter((m) => addedIn.get(m.path)?.startsWith(latestMinor)).map((m) => `\`${m.path}\``) + : []; + return [ `> Latest stable release: v${lastVersion} (npm \`react-native-executorch\`); this file was generated ${today}.`, `> ${models.length} pre-exported models across ${tasks.length} tasks, listed under "Supported Models" below.`, `> Backends: ${backendText}. Precisions: ${precisions.join(', ')}.`, + ...(added.length > 0 ? [`> New in v${lastVersion}: ${added.join(', ')}.`] : []), ]; } -function renderModels(tasks) { +function renderModels(tasks, addedIn) { const lines = [ '## Supported Models', '', @@ -84,6 +92,7 @@ function renderModels(tasks) { if (model.modalities.length > 0) parts.push(`Inputs: text, ${model.modalities.join(', ')}.`); if (model.variants.length > 0) parts.push(`Variants: ${model.variants.join(', ')}.`); parts.push(`Backends: ${model.backends.map((b) => BACKEND_LABELS[b]).join(', ')}.`); + if (addedIn) parts.push(`Added in ${addedIn.get(model.path) ?? 'the next release'}.`); lines.push(`- \`${model.path}\`: ${parts.join(' ')}`); } lines.push(''); diff --git a/docs/scripts/tasks/model-history.mjs b/docs/scripts/tasks/model-history.mjs new file mode 100644 index 0000000000..aadd672763 --- /dev/null +++ b/docs/scripts/tasks/model-history.mjs @@ -0,0 +1,133 @@ +import { execFileSync } from 'child_process'; +import { join, dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { REGISTRY_REPO_PATH, parseRegistry } from './model-registry.mjs'; + +export { readAddedIn }; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const REPO_DIR = join(__dirname, '..', '..', '..'); + +// Before v0.10.0 models were flat constants spread over src/constants (and +// src/modelUrls.ts in v0.1). A constant whose name equals the registry entry's +// key matches by itself; these are the ones renamed by the v0.10 registry. Only +// the same model counts: EasyOCR is not PaddleOCR, and BK-SDM is not SDXS. +const LEGACY_NAMES = { + 'models.llm.SMOLLM2_135M': ['SMOLLM2_1_135M'], + 'models.llm.SMOLLM2_360M': ['SMOLLM2_1_360M'], + 'models.llm.SMOLLM2_1_7B': ['SMOLLM2_1_1_7B'], + 'models.llm.PHI4_MINI': ['PHI_4_MINI_4B'], + 'models.llm.LFM2_5_1_2B': ['LFM2_5_1_2B_INSTRUCT'], + 'models.llm.LFM2_5_VL_450M': ['LFM2_5_VL_450M_QUANTIZED'], + 'models.llm.LFM2_5_VL_1_6B': ['LFM2_5_VL_1_6B_QUANTIZED'], + 'models.llm.BIELIK_V3_1_5B': ['BIELIK_V3_0_1_5B'], + 'models.llm.GEMMA4_OMNI_E2B': ['GEMMA4_E2B_MM'], + 'models.textEmbeddings.CLIP_VIT_BASE_PATCH32_TEXT': ['CLIP_VIT_BASE_PATCH_32_TEXT_ENCODER'], + 'models.textEmbeddings.DISTILUSE_BASE_MULTILINGUAL_CASED_V2': [ + 'DISTILUSE_BASE_MULTILINGUAL_CASED_V2_8DA4W', + ], + 'models.textEmbeddings.PARAPHRASE_MULTILINGUAL_MINILM_L12_V2': [ + 'PARAPHRASE_MULTILINGUAL_MINILM_L12_V2_QUANTIZED', + ], + 'models.imageEmbeddings.CLIP_VIT_BASE_PATCH32': ['CLIP_VIT_BASE_PATCH32_IMAGE'], + 'models.privacyFilter.OPENAI': ['PRIVACY_FILTER_OPENAI'], + 'models.privacyFilter.NEMOTRON': ['PRIVACY_FILTER_NEMOTRON'], + 'models.speechToText.WHISPER': ['WHISPER_TINY_ENCODER', 'WHISPER_TINY', 'WHISPER_TINY_EN'], + 'models.textToSpeech.KOKORO': ['KOKORO_SMALL', 'KOKORO_MEDIUM'], + 'models.objectDetection.SSDLITE320_MOBILENET_V3_LARGE': ['SSDLITE_320_MOBILENET_V3_LARGE'], + 'models.objectDetection.RFDETR_NANO': ['RF_DETR_NANO'], + 'models.objectDetection.YOLO26': ['YOLO26N', 'YOLO26S', 'YOLO26M', 'YOLO26L', 'YOLO26X'], + 'models.instanceSegmentation.RFDETR_NANO': ['RF_DETR_NANO_SEG'], + 'models.instanceSegmentation.FASTSAM': ['FASTSAM_S', 'FASTSAM_X'], + 'models.instanceSegmentation.YOLO26': [ + 'YOLO26N_SEG', + 'YOLO26S_SEG', + 'YOLO26M_SEG', + 'YOLO26L_SEG', + 'YOLO26X_SEG', + ], + 'models.keypointDetection.YOLO26_POSE': ['YOLO26N_POSE'], + 'models.keypointDetection.RFDETR_KEYPOINT': ['RF_DETR_KEYPOINT_PREVIEW'], + 'models.styleTransfer.CANDY': ['STYLE_TRANSFER_CANDY'], + 'models.styleTransfer.MOSAIC': ['STYLE_TRANSFER_MOSAIC'], + 'models.styleTransfer.RAIN_PRINCESS': ['STYLE_TRANSFER_RAIN_PRINCESS'], + 'models.styleTransfer.UDNIE': ['STYLE_TRANSFER_UDNIE'], +}; + +const LEGACY_FILE = /(^|\/)src\/(modelUrls\.ts|constants\/.+\.ts)$/; + +function git(...args) { + return execFileSync('git', ['-C', REPO_DIR, ...args], { + encoding: 'utf8', + maxBuffer: 256 * 1024 * 1024, + }); +} + +/** + * Finds the first release that shipped each model, from the release tags. + * Releases are walked in tag-date order, since patch releases of an older + * line (v0.3.4) went out after newer minors (v0.4.1). + * @param {string[]} paths The registry entries to date, e.g. `models.llm.QWEN3_4B`. + * @returns {Map | null} The release tag of each entry that has + * been released, or null outside CI when the checkout has no release tags. + */ +function readAddedIn(paths) { + let tags; + try { + tags = git('for-each-ref', '--sort=creatordate', '--format=%(refname:short)', 'refs/tags/v*') + .split('\n') + .filter((tag) => /^v\d+\.\d+\.\d+$/.test(tag)); + } catch { + tags = []; + } + if (tags.length === 0) { + // A shallow CI checkout would otherwise publish the page without the column. + if (process.env.CI) { + throw new Error('No release tags to date the models; check out with `fetch-depth: 0`.'); + } + console.warn('No release tags found, leaving out when each model was added'); + return null; + } + + const blobs = new Map(); + const show = (id) => { + if (!blobs.has(id)) blobs.set(id, git('cat-file', 'blob', id)); + return blobs.get(id); + }; + + const addedIn = new Map(); + for (const tag of tags) { + const pending = paths.filter((path) => !addedIn.has(path)); + if (pending.length === 0) break; + + const files = git('ls-tree', '-r', tag) + .split('\n') + .filter(Boolean) + .map((line) => { + const [meta, file] = line.split('\t'); + return { id: meta.split(' ')[2], file }; + }); + + const registry = files.find((f) => f.file === REGISTRY_REPO_PATH); + if (registry) { + const shipped = new Set( + [...parseRegistry(show(registry.id)).values()].flat().map((model) => model.path) + ); + for (const path of pending) if (shipped.has(path)) addedIn.set(path, tag); + continue; + } + + const names = new Set(); + for (const f of files) { + if (!LEGACY_FILE.test(f.file) || f.file.includes('/legacy/')) continue; + for (const match of show(f.id).matchAll(/^export const ([A-Z0-9_]+)/gm)) { + names.add(match[1].replace(/_URL$/, '')); + } + } + for (const path of pending) { + const candidates = [path.split('.').pop(), ...(LEGACY_NAMES[path] ?? [])]; + if (candidates.some((name) => names.has(name))) addedIn.set(path, tag); + } + } + return addedIn; +} diff --git a/docs/scripts/tasks/model-registry.mjs b/docs/scripts/tasks/model-registry.mjs index 6c5d5694e3..0a5184a147 100644 --- a/docs/scripts/tasks/model-registry.mjs +++ b/docs/scripts/tasks/model-registry.mjs @@ -3,18 +3,21 @@ import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; import ts from 'typescript'; -export { TASKS, BACKEND_LABELS, BACKEND_PLATFORMS, readModelRegistry, readDocSlug, byPrecision }; +export { + TASKS, + BACKEND_LABELS, + BACKEND_PLATFORMS, + REGISTRY_REPO_PATH, + readModelRegistry, + parseRegistry, + readDocSlug, + byPrecision, +}; const __dirname = dirname(fileURLToPath(import.meta.url)); const DOCS_DIR = join(__dirname, '..', '..'); -const REGISTRY_PATH = join( - DOCS_DIR, - '..', - 'packages', - 'react-native-executorch', - 'src', - 'models.ts' -); +const REGISTRY_REPO_PATH = 'packages/react-native-executorch/src/models.ts'; +const REGISTRY_PATH = join(DOCS_DIR, '..', REGISTRY_REPO_PATH); // Every registry category, in the order the docs present them. `doc` is the // task's page under docs/docs and `bench` the heading anchor of its chart on @@ -139,7 +142,25 @@ const PRECISION_ORDER = ['fp32', 'fp16', 'bf16', 'int8', '8da8w', '8da4w', 'int4 * variants: string[], modalities: string[] }[] }[]} One entry per task, in docs order. */ function readModelRegistry() { - const source = readFileSync(REGISTRY_PATH, 'utf8'); + const categories = parseRegistry(readFileSync(REGISTRY_PATH, 'utf8')); + for (const key of categories.keys()) { + if (!(key in TASKS)) { + throw new Error( + `Registry category \`models.${key}\` has no entry in TASKS (docs/scripts/tasks/model-registry.mjs).` + ); + } + } + return Object.entries(TASKS) + .filter(([key, task]) => !task.skip && categories.has(key)) + .map(([key, task]) => ({ key, ...task, models: categories.get(key) })); +} + +/** + * Parses a `models.ts` source, current or from an earlier release. + * @param {string} source The file's contents. + * @returns {Map} The models of each registry category. + */ +function parseRegistry(source) { const file = ts.createSourceFile(REGISTRY_PATH, source, ts.ScriptTarget.Latest, true); const constants = new Map(); @@ -160,12 +181,6 @@ function readModelRegistry() { for (const prop of registry.properties) { if (!ts.isPropertyAssignment(prop)) continue; const key = prop.name.getText(file); - if (!(key in TASKS)) { - throw new Error( - `Registry category \`models.${key}\` has no entry in TASKS (docs/scripts/tasks/model-registry.mjs).` - ); - } - if (TASKS[key].skip) continue; const models = []; for (const entry of prop.initializer.properties ?? []) { if (!ts.isPropertyAssignment(entry)) continue; @@ -185,10 +200,7 @@ function readModelRegistry() { } categories.set(key, models); } - - return Object.entries(TASKS) - .filter(([key, task]) => !task.skip && categories.has(key)) - .map(([key, task]) => ({ key, ...task, models: categories.get(key) })); + return categories; } /** diff --git a/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md b/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md index baa0cc072f..e7ff71ee77 100644 --- a/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md +++ b/docs/versioned_docs/version-0.11.x/01-fundamentals/04-supported-models.md @@ -28,193 +28,193 @@ Every model below ships pre-exported in the [`models`](./02-downloading-models.m Chat sessions stream tokens and support tool calling, a thinking-mode switch, Jinja chat templates, constrained sampling and image/audio inputs on multimodal models. -| Model | Description | Backends | Precisions | -| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------ | :------------------- | :---------------- | -| `models.llm.MINICPM5_2B` | OpenBMB MiniCPM5 2B chat model with an 8K context window. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.LFM2_5_1_2B` | Liquid AI LFM 2.5 1.2B general-purpose hybrid language model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.LFM2_5_2_6B` | Liquid AI LFM 2.5 2.6B hybrid language model post-trained for instruction following and agentic workloads. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.LFM2_5_350M` | Liquid AI LFM 2.5 350M ultra-compact hybrid language model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.LFM2_5_VL_450M` | Liquid AI LFM 2.5 VL 450M lightweight multimodal vision-language model. Inputs: text, image. | XNNPACK, MLX, Vulkan | 8da4w, int4 | -| `models.llm.LFM2_5_VL_1_6B` | Liquid AI LFM 2.5 VL 1.6B high-capacity vision-language model. Inputs: text, image. | XNNPACK, MLX, Vulkan | int8, 8da4w, int4 | -| `models.llm.BIELIK_V3_1_5B` | Bielik v3 1.5B bilingual Polish & English language model, developed by SpeakLeash. | XNNPACK | 8da4w | -| `models.llm.LLAMA3_2_1B` | Meta Llama 3.2 1B lightweight instruction-tuned multilingual model. | XNNPACK, MLX | int4, spinquant | -| `models.llm.LLAMA3_2_3B` | Meta Llama 3.2 3B instruction-tuned multilingual language model. | XNNPACK, MLX | int4, spinquant | -| `models.llm.SMOLLM2_135M` | Hugging Face SmolLM2 135M ultra-compact language model. | XNNPACK, MLX | int8, 8da8w | -| `models.llm.SMOLLM2_360M` | Hugging Face SmolLM2 360M compact instruction-tuned model. | XNNPACK, MLX | int8, 8da8w | -| `models.llm.SMOLLM2_1_7B` | Hugging Face SmolLM2 1.7B language model trained on curated educational, synthetic, and web data. | XNNPACK, MLX | int8, 8da8w | -| `models.llm.HAMMER2_1_0_5B` | Hammer 2.1 0.5B specialized function-calling model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.HAMMER2_1_1_5B` | Hammer 2.1 1.5B function-calling language model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.HAMMER2_1_3B` | Hammer 2.1 3B high-capacity function-calling model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.PHI4_MINI` | Microsoft Phi-4 Mini 3.8B high-density reasoning model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.QWEN2_5_0_5B` | Alibaba Qwen 2.5 0.5B ultra-lightweight multilingual model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.QWEN2_5_1_5B` | Alibaba Qwen 2.5 1.5B multilingual instruction model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.QWEN2_5_3B` | Alibaba Qwen 2.5 3B high-capability multilingual model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.QWEN3_0_6B` | Alibaba Qwen 3 0.6B next-generation compact language model. | XNNPACK, MLX | int8, 8da4w | -| `models.llm.QWEN3_1_7B` | Alibaba Qwen 3 1.7B next-generation multilingual language model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.QWEN3_4B` | Alibaba Qwen 3 4B high-capacity generative model. | XNNPACK, MLX | 8da4w, int4 | -| `models.llm.GEMMA4_E2B` | Google Gemma 4 E2B generative language model. | XNNPACK, MLX, Vulkan | 8da4w, int4 | -| `models.llm.GEMMA4_OMNI_E2B` | Google Gemma 4 E2B multimodal (omni) language model supporting text, image, and audio inputs. Inputs: text, image, audio. | XNNPACK, MLX, Vulkan | 8da4w, int4 | +| Model | Description | Backends | Precisions | Added in | +| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------ | :------------------- | :---------------- | :------- | +| `models.llm.MINICPM5_2B` | OpenBMB MiniCPM5 2B chat model with an 8K context window. | XNNPACK, MLX | 8da4w, int4 | v0.11.0 | +| `models.llm.LFM2_5_1_2B` | Liquid AI LFM 2.5 1.2B general-purpose hybrid language model. | XNNPACK, MLX | 8da4w, int4 | v0.8.0 | +| `models.llm.LFM2_5_2_6B` | Liquid AI LFM 2.5 2.6B hybrid language model post-trained for instruction following and agentic workloads. | XNNPACK, MLX | 8da4w, int4 | v0.11.0 | +| `models.llm.LFM2_5_350M` | Liquid AI LFM 2.5 350M ultra-compact hybrid language model. | XNNPACK, MLX | 8da4w, int4 | v0.8.1 | +| `models.llm.LFM2_5_VL_450M` | Liquid AI LFM 2.5 VL 450M lightweight multimodal vision-language model. Inputs: text, image. | XNNPACK, MLX, Vulkan | 8da4w, int4 | v0.8.4 | +| `models.llm.LFM2_5_VL_1_6B` | Liquid AI LFM 2.5 VL 1.6B high-capacity vision-language model. Inputs: text, image. | XNNPACK, MLX, Vulkan | int8, 8da4w, int4 | v0.8.4 | +| `models.llm.BIELIK_V3_1_5B` | Bielik v3 1.5B bilingual Polish & English language model, developed by SpeakLeash. | XNNPACK | 8da4w | v0.9.0 | +| `models.llm.LLAMA3_2_1B` | Meta Llama 3.2 1B lightweight instruction-tuned multilingual model. | XNNPACK, MLX | int4, spinquant | v0.1.0 | +| `models.llm.LLAMA3_2_3B` | Meta Llama 3.2 3B instruction-tuned multilingual language model. | XNNPACK, MLX | int4, spinquant | v0.1.0 | +| `models.llm.SMOLLM2_135M` | Hugging Face SmolLM2 135M ultra-compact language model. | XNNPACK, MLX | int8, 8da8w | v0.4.1 | +| `models.llm.SMOLLM2_360M` | Hugging Face SmolLM2 360M compact instruction-tuned model. | XNNPACK, MLX | int8, 8da8w | v0.4.1 | +| `models.llm.SMOLLM2_1_7B` | Hugging Face SmolLM2 1.7B language model trained on curated educational, synthetic, and web data. | XNNPACK, MLX | int8, 8da8w | v0.4.1 | +| `models.llm.HAMMER2_1_0_5B` | Hammer 2.1 0.5B specialized function-calling model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.HAMMER2_1_1_5B` | Hammer 2.1 1.5B function-calling language model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.HAMMER2_1_3B` | Hammer 2.1 3B high-capacity function-calling model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.PHI4_MINI` | Microsoft Phi-4 Mini 3.8B high-density reasoning model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.QWEN2_5_0_5B` | Alibaba Qwen 2.5 0.5B ultra-lightweight multilingual model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.QWEN2_5_1_5B` | Alibaba Qwen 2.5 1.5B multilingual instruction model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.QWEN2_5_3B` | Alibaba Qwen 2.5 3B high-capability multilingual model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.QWEN3_0_6B` | Alibaba Qwen 3 0.6B next-generation compact language model. | XNNPACK, MLX | int8, 8da4w | v0.4.1 | +| `models.llm.QWEN3_1_7B` | Alibaba Qwen 3 1.7B next-generation multilingual language model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.QWEN3_4B` | Alibaba Qwen 3 4B high-capacity generative model. | XNNPACK, MLX | 8da4w, int4 | v0.4.1 | +| `models.llm.GEMMA4_E2B` | Google Gemma 4 E2B generative language model. | XNNPACK, MLX, Vulkan | 8da4w, int4 | v0.9.1 | +| `models.llm.GEMMA4_OMNI_E2B` | Google Gemma 4 E2B multimodal (omni) language model supporting text, image, and audio inputs. Inputs: text, image, audio. | XNNPACK, MLX, Vulkan | 8da4w, int4 | v0.9.1 | ## Text Embeddings [Guide](../02-extensions/natural-language/03-text-embeddings.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#text-embeddings) -| Model | Description | Backends | Precisions | -| :------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | :---------------- | -| `models.textEmbeddings.ALL_MINILM_L6_V2` | Compact 384-dimensional sentence transformer mapping text to a dense vector space. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.textEmbeddings.ALL_MPNET_BASE_V2` | High-quality 768-dimensional sentence transformer model based on MPNet. | XNNPACK, Vulkan | fp16, int8, 8da4w | -| `models.textEmbeddings.MULTI_QA_MINILM_L6_COS_V1` | 384-dimensional sentence transformer fine-tuned specifically for semantic QA matching using cosine similarity. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.textEmbeddings.MULTI_QA_MPNET_BASE_DOT_V1` | 768-dimensional sentence transformer fine-tuned specifically for question-answering matching using dot product distance. | XNNPACK, Vulkan | fp16, int8, 8da4w | -| `models.textEmbeddings.PARAPHRASE_MULTILINGUAL_MINILM_L12_V2` | 384-dimensional sentence transformer supporting 50+ languages for cross-lingual semantic similarity. | XNNPACK, Core ML, Vulkan | fp16, int8, 8da4w | -| `models.textEmbeddings.DISTILUSE_BASE_MULTILINGUAL_CASED_V2` | Multilingual sentence transformer supporting 50+ languages, based on distilled Universal Sentence Encoder (512-dim output). | XNNPACK, Core ML, MLX, Vulkan | fp16, int8, 8da4w | -| `models.textEmbeddings.CLIP_VIT_BASE_PATCH32_TEXT` | CLIP text encoder (ViT-B/32) mapping text queries into a 512-dimensional joint text-image embedding space. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.textEmbeddings.LFM2_5_EMBEDDING_350M` | Liquid AI LFM 2.5 350M parameter embedding model for asymmetric search and retrieval tasks. | XNNPACK, MLX | 8da4w, int4 | +| Model | Description | Backends | Precisions | Added in | +| :------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | :---------------- | :------- | +| `models.textEmbeddings.ALL_MINILM_L6_V2` | Compact 384-dimensional sentence transformer mapping text to a dense vector space. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.4.1 | +| `models.textEmbeddings.ALL_MPNET_BASE_V2` | High-quality 768-dimensional sentence transformer model based on MPNet. | XNNPACK, Vulkan | fp16, int8, 8da4w | v0.4.1 | +| `models.textEmbeddings.MULTI_QA_MINILM_L6_COS_V1` | 384-dimensional sentence transformer fine-tuned specifically for semantic QA matching using cosine similarity. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.4.1 | +| `models.textEmbeddings.MULTI_QA_MPNET_BASE_DOT_V1` | 768-dimensional sentence transformer fine-tuned specifically for question-answering matching using dot product distance. | XNNPACK, Vulkan | fp16, int8, 8da4w | v0.4.1 | +| `models.textEmbeddings.PARAPHRASE_MULTILINGUAL_MINILM_L12_V2` | 384-dimensional sentence transformer supporting 50+ languages for cross-lingual semantic similarity. | XNNPACK, Core ML, Vulkan | fp16, int8, 8da4w | v0.9.0 | +| `models.textEmbeddings.DISTILUSE_BASE_MULTILINGUAL_CASED_V2` | Multilingual sentence transformer supporting 50+ languages, based on distilled Universal Sentence Encoder (512-dim output). | XNNPACK, Core ML, MLX, Vulkan | fp16, int8, 8da4w | v0.9.0 | +| `models.textEmbeddings.CLIP_VIT_BASE_PATCH32_TEXT` | CLIP text encoder (ViT-B/32) mapping text queries into a 512-dimensional joint text-image embedding space. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.3.4 | +| `models.textEmbeddings.LFM2_5_EMBEDDING_350M` | Liquid AI LFM 2.5 350M parameter embedding model for asymmetric search and retrieval tasks. | XNNPACK, MLX | 8da4w, int4 | v0.10.0 | ## ColBERT Retrieval [Guide](../02-extensions/natural-language/06-colbert-retrieval.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#colbert-embeddings) -| Model | Description | Backends | Precisions | -| :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :---------- | -| `models.colbertEmbeddings.LFM2_5_COLBERT_350M` | Liquid AI LFM 2.5 350M ColBERT model: 128-dimensional token vectors, multilingual (11 languages), 32-token queries and documents of up to 512 tokens. | XNNPACK, MLX | 8da4w, int4 | +| Model | Description | Backends | Precisions | Added in | +| :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :---------- | :------- | +| `models.colbertEmbeddings.LFM2_5_COLBERT_350M` | Liquid AI LFM 2.5 350M ColBERT model: 128-dimensional token vectors, multilingual (11 languages), 32-token queries and documents of up to 512 tokens. | XNNPACK, MLX | 8da4w, int4 | v0.11.0 | ## Privacy Filter (PII detection) [Guide](../02-extensions/natural-language/04-privacy-filter.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#privacy-filter) -| Model | Description | Backends | Precisions | -| :------------------------------ | :-------------------------------------------------------------------------------------------- | :----------- | :---------- | -| `models.privacyFilter.OPENAI` | OpenAI-style detector covering 8 common PII types (name, email, phone, address, and similar). | XNNPACK, MLX | 8da4w, int4 | -| `models.privacyFilter.NEMOTRON` | Nemotron-based detector covering 55 fine-grained PII types. | XNNPACK, MLX | int8, 8da4w | +| Model | Description | Backends | Precisions | Added in | +| :------------------------------ | :-------------------------------------------------------------------------------------------- | :----------- | :---------- | :------- | +| `models.privacyFilter.OPENAI` | OpenAI-style detector covering 8 common PII types (name, email, phone, address, and similar). | XNNPACK, MLX | 8da4w, int4 | v0.9.0 | +| `models.privacyFilter.NEMOTRON` | Nemotron-based detector covering 55 fine-grained PII types. | XNNPACK, MLX | int8, 8da4w | v0.9.0 | ## Speech to Text [Guide](../02-extensions/speech/03-speech-to-text.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#speech-to-text) -| Model | Description | Backends | Precisions | -| :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | :--------------- | -| `models.speechToText.WHISPER` | OpenAI Whisper automatic speech recognition model family with integrated Voice Activity Detection. Variants: TINY, BASE, SMALL, EN.TINY, EN.BASE, EN.SMALL. | XNNPACK, Core ML, MLX, Vulkan | fp16, bf16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- | :--------------- | :------- | +| `models.speechToText.WHISPER` | OpenAI Whisper automatic speech recognition model family with integrated Voice Activity Detection. Variants: TINY, BASE, SMALL, EN.TINY, EN.BASE, EN.SMALL. | XNNPACK, Core ML, MLX, Vulkan | fp16, bf16, int8 | v0.3.0 | ## Text to Speech [Guide](../02-extensions/speech/02-text-to-speech.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#text-to-speech) -| Model | Description | Backends | Precisions | -| :------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :------------------- | :--------------- | -| `models.textToSpeech.SUPERTONIC` | Supertonic 3 multilingual flow-matching Text-to-Speech model. | XNNPACK, MLX, Vulkan | fp32, fp16, int8 | -| `models.textToSpeech.KOKORO` | Kokoro — a lightweight phoneme-driven Text-to-Speech model. Variants: EN_US, EN_GB, ES, FR, IT, PT, HI, PL, DE, ZH. | XNNPACK, Core ML | fp32 | +| Model | Description | Backends | Precisions | Added in | +| :------------------------------- | :------------------------------------------------------------------------------------------------------------------ | :------------------- | :--------------- | :------- | +| `models.textToSpeech.SUPERTONIC` | Supertonic 3 multilingual flow-matching Text-to-Speech model. | XNNPACK, MLX, Vulkan | fp32, fp16, int8 | v0.10.0 | +| `models.textToSpeech.KOKORO` | Kokoro — a lightweight phoneme-driven Text-to-Speech model. Variants: EN_US, EN_GB, ES, FR, IT, PT, HI, PL, DE, ZH. | XNNPACK, Core ML | fp32 | v0.7.0 | ## Voice Activity Detection [Guide](../02-extensions/speech/04-voice-activity-detection.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#voice-activity-detection) -| Model | Description | Backends | Precisions | -| :--------------------------------------- | :--------------------------------------------------------------------------- | :------- | :--------- | -| `models.voiceActivityDetection.FSMN_VAD` | Feedforward Sequential Memory Network (FSMN) Voice Activity Detection model. | XNNPACK | fp32 | +| Model | Description | Backends | Precisions | Added in | +| :--------------------------------------- | :--------------------------------------------------------------------------- | :------- | :--------- | :------- | +| `models.voiceActivityDetection.FSMN_VAD` | Feedforward Sequential Memory Network (FSMN) Voice Activity Detection model. | XNNPACK | fp32 | v0.6.0 | ## Image Classification [Guide](../02-extensions/computer-vision/02-image-classification.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#image-classification) -| Model | Description | Backends | Precisions | -| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :--------------- | :--------- | -| `models.classification.EFFICIENTNET_V2_S` | EfficientNetV2-S image classification model pre-trained on ImageNet-1k (1000 categories, see `IMAGENET1K_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :--------------- | :--------- | :------- | +| `models.classification.EFFICIENTNET_V2_S` | EfficientNetV2-S image classification model pre-trained on ImageNet-1k (1000 categories, see `IMAGENET1K_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.2.0 | ## Object Detection [Guide](../02-extensions/computer-vision/03-object-detection.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#object-detection) -| Model | Description | Backends | Precisions | -| :----------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | -| `models.objectDetection.SSDLITE320_MOBILENET_V3_LARGE` | SSDLite object detector with MobileNetV3-Large backbone trained on COCO (see `COCO_CLASSES`) at 320x320 resolution. | XNNPACK, Core ML | fp32, fp16 | -| `models.objectDetection.RFDETR_NANO` | RF-DETR (Roboflow Detection Transformer) Nano variant trained on COCO (see `COCO_CLASSES`). | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.objectDetection.YOLO26` | Ultralytics YOLO26 real-time object detection models trained on COCO (80 classes, see `COCO_CLASSES_YOLO`). Variants: NANO, SMALL, MEDIUM, LARGE, XLARGE (each SIZE_384, SIZE_512, SIZE_640). | XNNPACK, Core ML, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :----------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | :------- | +| `models.objectDetection.SSDLITE320_MOBILENET_V3_LARGE` | SSDLite object detector with MobileNetV3-Large backbone trained on COCO (see `COCO_CLASSES`) at 320x320 resolution. | XNNPACK, Core ML | fp32, fp16 | v0.2.0 | +| `models.objectDetection.RFDETR_NANO` | RF-DETR (Roboflow Detection Transformer) Nano variant trained on COCO (see `COCO_CLASSES`). | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.8.0 | +| `models.objectDetection.YOLO26` | Ultralytics YOLO26 real-time object detection models trained on COCO (80 classes, see `COCO_CLASSES_YOLO`). Variants: NANO, SMALL, MEDIUM, LARGE, XLARGE (each SIZE_384, SIZE_512, SIZE_640). | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.8.0 | ## Instance Segmentation [Guide](../02-extensions/computer-vision/07-instance-segmentation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#instance-segmentation) -| Model | Description | Backends | Precisions | -| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | -| `models.instanceSegmentation.FASTSAM` | Fast Segment Anything Model (FastSAM) for promptable or global object instance mask segmentation. Variants: S, X. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.instanceSegmentation.RFDETR_NANO` | RF-DETR (Roboflow Detection Transformer) Nano instance segmentation model predicting COCO class masks and bounding boxes (see `COCO_CLASSES`). | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.instanceSegmentation.YOLO26` | YOLO26 instance segmentation models predicting COCO class instance masks and bounding boxes (see `COCO_CLASSES_YOLO`). Variants: NANO, SMALL, MEDIUM, LARGE, XLARGE (each SIZE_384, SIZE_512, SIZE_640). | XNNPACK, Core ML, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | :------- | +| `models.instanceSegmentation.FASTSAM` | Fast Segment Anything Model (FastSAM) for promptable or global object instance mask segmentation. Variants: S, X. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.9.0 | +| `models.instanceSegmentation.RFDETR_NANO` | RF-DETR (Roboflow Detection Transformer) Nano instance segmentation model predicting COCO class masks and bounding boxes (see `COCO_CLASSES`). | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.8.0 | +| `models.instanceSegmentation.YOLO26` | YOLO26 instance segmentation models predicting COCO class instance masks and bounding boxes (see `COCO_CLASSES_YOLO`). Variants: NANO, SMALL, MEDIUM, LARGE, XLARGE (each SIZE_384, SIZE_512, SIZE_640). | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.8.0 | ## Semantic Segmentation [Guide](../02-extensions/computer-vision/06-semantic-segmentation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#semantic-segmentation) -| Model | Description | Backends | Precisions | -| :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------- | :--------- | -| `models.semanticSegmentation.SELFIE_SEGMENTATION` | Lightweight portrait selfie segmentation model for real-time person vs background separation. | XNNPACK, Core ML | fp32, fp16 | -| `models.semanticSegmentation.SELFIE_SEGMENTATION_LANDSCAPE` | MediaPipe Selfie Segmentation, landscape orientation. | XNNPACK, Core ML | fp32, fp16 | -| `models.semanticSegmentation.LRASPP_MOBILENET_V3_LARGE` | Lite R-ASPP semantic segmentation model with MobileNetV3-Large backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | -| `models.semanticSegmentation.DEEPLAB_V3_RESNET50` | DeepLabV3 semantic segmentation model with ResNet-50 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | -| `models.semanticSegmentation.DEEPLAB_V3_RESNET101` | DeepLabV3 semantic segmentation model with ResNet-101 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | -| `models.semanticSegmentation.DEEPLAB_V3_MOBILENET_V3_LARGE` | DeepLabV3 semantic segmentation model with MobileNetV3-Large backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | -| `models.semanticSegmentation.FCN_RESNET50` | Fully Convolutional Network (FCN) semantic segmentation model with ResNet-50 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | -| `models.semanticSegmentation.FCN_RESNET101` | Fully Convolutional Network (FCN) semantic segmentation model with ResNet-101 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------- | :--------- | :------- | +| `models.semanticSegmentation.SELFIE_SEGMENTATION` | Lightweight portrait selfie segmentation model for real-time person vs background separation. | XNNPACK, Core ML | fp32, fp16 | v0.8.0 | +| `models.semanticSegmentation.SELFIE_SEGMENTATION_LANDSCAPE` | MediaPipe Selfie Segmentation, landscape orientation. | XNNPACK, Core ML | fp32, fp16 | v0.10.0 | +| `models.semanticSegmentation.LRASPP_MOBILENET_V3_LARGE` | Lite R-ASPP semantic segmentation model with MobileNetV3-Large backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.8.0 | +| `models.semanticSegmentation.DEEPLAB_V3_RESNET50` | DeepLabV3 semantic segmentation model with ResNet-50 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.4.1 | +| `models.semanticSegmentation.DEEPLAB_V3_RESNET101` | DeepLabV3 semantic segmentation model with ResNet-101 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.8.0 | +| `models.semanticSegmentation.DEEPLAB_V3_MOBILENET_V3_LARGE` | DeepLabV3 semantic segmentation model with MobileNetV3-Large backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.8.0 | +| `models.semanticSegmentation.FCN_RESNET50` | Fully Convolutional Network (FCN) semantic segmentation model with ResNet-50 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.8.0 | +| `models.semanticSegmentation.FCN_RESNET101` | Fully Convolutional Network (FCN) semantic segmentation model with ResNet-101 backbone (21 classes, see `PASCAL_VOC_LABELS`). | XNNPACK, Core ML | fp16, int8 | v0.8.0 | ## Pose & Keypoints [Guide](../02-extensions/computer-vision/04-pose-and-keypoints.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#pose--keypoints) -| Model | Description | Backends | Precisions | -| :----------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | -| `models.keypointDetection.BLAZEFACE` | MediaPipe BlazeFace lightweight face detection and 6-point facial landmark locator (eyes, nose, mouth, ears, see `BLAZEFACE_LANDMARKS`). | XNNPACK, Vulkan | fp32, fp16 | -| `models.keypointDetection.FACEMESH` | MediaPipe Face Mesh: a dense 468-point 3-D mesh (see `FACEMESH_LANDMARKS`) and a face-presence score, regressed from a 192x192 crop of one face. | XNNPACK, Core ML | fp32, fp16 | -| `models.keypointDetection.YOLO26_POSE` | YOLO26 human pose estimation model predicting 17 COCO body keypoints (see `COCO_LANDMARKS`). Variants: SIZE_384, SIZE_512, SIZE_640. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.keypointDetection.RFDETR_KEYPOINT` | RF-DETR (Roboflow Detection Transformer) pose keypoint detector predicting 17 COCO body keypoints (see `COCO_LANDMARKS`). | XNNPACK, Core ML, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :----------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | :------- | +| `models.keypointDetection.BLAZEFACE` | MediaPipe BlazeFace lightweight face detection and 6-point facial landmark locator (eyes, nose, mouth, ears, see `BLAZEFACE_LANDMARKS`). | XNNPACK, Vulkan | fp32, fp16 | v0.10.0 | +| `models.keypointDetection.FACEMESH` | MediaPipe Face Mesh: a dense 468-point 3-D mesh (see `FACEMESH_LANDMARKS`) and a face-presence score, regressed from a 192x192 crop of one face. | XNNPACK, Core ML | fp32, fp16 | v0.11.0 | +| `models.keypointDetection.YOLO26_POSE` | YOLO26 human pose estimation model predicting 17 COCO body keypoints (see `COCO_LANDMARKS`). Variants: SIZE_384, SIZE_512, SIZE_640. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.9.0 | +| `models.keypointDetection.RFDETR_KEYPOINT` | RF-DETR (Roboflow Detection Transformer) pose keypoint detector predicting 17 COCO body keypoints (see `COCO_LANDMARKS`). | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.9.2 | ## Depth Estimation [Guide](../02-extensions/computer-vision/12-depth-estimation.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#depth-estimation) -| Model | Description | Backends | Precisions | -| :----------------------------------------------- | :------------------------------------------------------------------------- | :----------------------- | :--------------- | -| `models.depthEstimation.DEPTH_ANYTHING_V2_SMALL` | Depth Anything V2 Small with a ViT-S/14 backbone. | XNNPACK, Core ML, Vulkan | fp32, fp16, int8 | -| `models.depthEstimation.DEPTH_ANYTHING_V3_SMALL` | Depth Anything 3 Small, exported for single-image relative depth. | XNNPACK, Core ML, Vulkan | fp32, fp16, int8 | -| `models.depthEstimation.ZIPDEPTH_BASE` | ZipDepth Base NPU with a 384 × 384 input for low-latency depth estimation. | XNNPACK, Core ML, Vulkan | fp32, fp16 | +| Model | Description | Backends | Precisions | Added in | +| :----------------------------------------------- | :------------------------------------------------------------------------- | :----------------------- | :--------------- | :------- | +| `models.depthEstimation.DEPTH_ANYTHING_V2_SMALL` | Depth Anything V2 Small with a ViT-S/14 backbone. | XNNPACK, Core ML, Vulkan | fp32, fp16, int8 | v0.11.0 | +| `models.depthEstimation.DEPTH_ANYTHING_V3_SMALL` | Depth Anything 3 Small, exported for single-image relative depth. | XNNPACK, Core ML, Vulkan | fp32, fp16, int8 | v0.11.0 | +| `models.depthEstimation.ZIPDEPTH_BASE` | ZipDepth Base NPU with a 384 × 384 input for low-latency depth estimation. | XNNPACK, Core ML, Vulkan | fp32, fp16 | v0.11.0 | ## OCR [Guide](../02-extensions/computer-vision/05-optical-character-recognition.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#ocr) -| Model | Description | Backends | Precisions | -| :------------------ | :------------------------------------------------------------------------------------- | :----------------------- | :--------- | -| `models.ocr.PADDLE` | PP-OCRv6 small — DBNet detector plus an SVTR recognizer, one model for every language. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :------------------ | :------------------------------------------------------------------------------------- | :----------------------- | :--------- | :------- | +| `models.ocr.PADDLE` | PP-OCRv6 small — DBNet detector plus an SVTR recognizer, one model for every language. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.10.0 | ## Image Embeddings [Guide](../02-extensions/computer-vision/09-image-embeddings.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#image-embeddings) -| Model | Description | Backends | Precisions | -| :--------------------------------------------- | :-------------------------------------------------------------------------------------------- | :---------------------------- | :--------- | -| `models.imageEmbeddings.CLIP_VIT_BASE_PATCH32` | CLIP vision encoder (ViT-B/32) mapping images into a 512-dimensional shared text-image space. | XNNPACK, Core ML, MLX, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :--------------------------------------------- | :-------------------------------------------------------------------------------------------- | :---------------------------- | :--------- | :------- | +| `models.imageEmbeddings.CLIP_VIT_BASE_PATCH32` | CLIP vision encoder (ViT-B/32) mapping images into a 512-dimensional shared text-image space. | XNNPACK, Core ML, MLX, Vulkan | fp16, int8 | v0.5.0 | ## Image Inpainting [Guide](../02-extensions/computer-vision/11-image-inpainting.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#image-inpainting) -| Model | Description | Backends | Precisions | -| :------------------------ | :--------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | -| `models.inpainting.MIGAN` | MI-GAN, a mobile inpainting GAN trained on Places2 (scenes) and FFHQ (faces). Variants: SIZE_512, SIZE_256, FACES_256. | XNNPACK, Core ML, Vulkan | fp16 | +| Model | Description | Backends | Precisions | Added in | +| :------------------------ | :--------------------------------------------------------------------------------------------------------------------- | :----------------------- | :--------- | :------- | +| `models.inpainting.MIGAN` | MI-GAN, a mobile inpainting GAN trained on Places2 (scenes) and FFHQ (faces). Variants: SIZE_512, SIZE_256, FACES_256. | XNNPACK, Core ML, Vulkan | fp16 | v0.11.0 | ## Text to Image [Guide](../02-extensions/computer-vision/10-text-to-image.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#text-to-image) -| Model | Description | Backends | Precisions | -| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------ | :----------------------- | :--------- | -| `models.textToImage.SDXS_512_DREAMSHAPER` | Ultra-fast SDXS (Stable Diffusion eXtreme Speed) 512x512 text-to-image generation model based on DreamShaper. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------ | :----------------------- | :--------- | :------- | +| `models.textToImage.SDXS_512_DREAMSHAPER` | Ultra-fast SDXS (Stable Diffusion eXtreme Speed) 512x512 text-to-image generation model based on DreamShaper. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.10.0 | ## Style Transfer [Guide](../02-extensions/computer-vision/08-style-transfer.md) · [Benchmarks](../04-benchmarks/01-benchmarks.mdx#style-transfer) -| Model | Description | Backends | Precisions | -| :----------------------------------- | :-------------------------------------------------------------------------------------------- | :----------------------- | :--------- | -| `models.styleTransfer.CANDY` | Fast neural style transfer model generating a vibrant, artistic "Candy" style effect. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.styleTransfer.MOSAIC` | Fast neural style transfer model applying a classic tile mosaic artistic pattern. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.styleTransfer.RAIN_PRINCESS` | Fast neural style transfer model applying a painterly "Rain Princess" oil painting aesthetic. | XNNPACK, Core ML, Vulkan | fp16, int8 | -| `models.styleTransfer.UDNIE` | Fast neural style transfer model applying Francis Picabia's "Udnie" abstract art style. | XNNPACK, Core ML, Vulkan | fp16, int8 | +| Model | Description | Backends | Precisions | Added in | +| :----------------------------------- | :-------------------------------------------------------------------------------------------- | :----------------------- | :--------- | :------- | +| `models.styleTransfer.CANDY` | Fast neural style transfer model generating a vibrant, artistic "Candy" style effect. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.2.0 | +| `models.styleTransfer.MOSAIC` | Fast neural style transfer model applying a classic tile mosaic artistic pattern. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.2.0 | +| `models.styleTransfer.RAIN_PRINCESS` | Fast neural style transfer model applying a painterly "Rain Princess" oil painting aesthetic. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.2.0 | +| `models.styleTransfer.UDNIE` | Fast neural style transfer model applying Francis Picabia's "Udnie" abstract art style. | XNNPACK, Core ML, Vulkan | fp16, int8 | v0.2.0 |