[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-huggingface-transformers-js":3,"mdc-eolns1-key":38,"related-org-huggingface-transformers-js":10223,"related-repo-huggingface-transformers-js":10398},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":36,"mdContent":37},"transformers-js","run machine learning models in JavaScript","Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript\u002FTypeScript. Supports NLP (text classification, translation, summarization), computer vision (image classification, object detection), audio (speech recognition, audio classification), and multimodal tasks. Works in browsers and server-side runtimes (Node.js, Bun, Deno) with WebGPU\u002FWASM using pre-trained models from Hugging Face Hub.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"huggingface","Hugging Face","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fhuggingface.png",[12,15,18,21,24],{"name":9,"slug":13,"type":14},"hugging-face","tag",{"name":16,"slug":17,"type":14},"LLM","llm",{"name":19,"slug":20,"type":14},"TypeScript","typescript",{"name":22,"slug":23,"type":14},"JavaScript","javascript",{"name":25,"slug":26,"type":14},"Computer Vision","computer-vision",10861,"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fskills","2026-04-06T18:25:35.268779","Apache-2.0",721,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":35},[],"Give your agents the power of the Hugging Face ecosystem","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Ftransformers-js","---\nname: transformers-js\ndescription: Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript\u002FTypeScript. Supports NLP (text classification, translation, summarization), computer vision (image classification, object detection), audio (speech recognition, audio classification), and multimodal tasks. Works in browsers and server-side runtimes (Node.js, Bun, Deno) with WebGPU\u002FWASM using pre-trained models from Hugging Face Hub.\nlicense: Apache-2.0\nmetadata:\n  author: huggingface\n  version: \"4.x\"\n  category: machine-learning\n  repository: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js\ncompatibility: Requires Node.js 18+ (or compatible Bun\u002FDeno runtime) or modern browser with ES modules support. WebGPU requires runtime and hardware support; WASM is the broad fallback. Internet access is needed for downloading models from Hugging Face Hub (optional if using local models).\n---\n\n# Transformers.js - Machine Learning for JavaScript\n\nTransformers.js enables running state-of-the-art machine learning models directly in JavaScript across browsers and server-side runtimes (Node.js, Bun, Deno), with no Python server required.\n\n## When to Use This Skill\n\nUse this skill when you need to:\n- Run ML models for text analysis, generation, or translation in JavaScript\n- Perform image classification, object detection, or segmentation\n- Implement speech recognition or audio processing\n- Build multimodal AI applications (text-to-image, image-to-text, etc.)\n- Run models client-side in the browser without a backend\n\n## Installation\n\n### NPM Installation\n```bash\nnpm install @huggingface\u002Ftransformers\n```\n\n### Browser Usage (CDN)\n```javascript\n\u003Cscript type=\"module\">\n  import { pipeline } from 'https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@huggingface\u002Ftransformers';\n\u003C\u002Fscript>\n```\n\n## Core Concepts\n\n### 1. Pipeline API\nThe pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing:\n\n```javascript\nimport { pipeline } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Create a pipeline for a specific task\nconst pipe = await pipeline('sentiment-analysis');\n\n\u002F\u002F Use the pipeline\nconst result = await pipe('I love transformers!');\n\u002F\u002F Output: [{ label: 'POSITIVE', score: 0.999817686 }]\n\n\u002F\u002F IMPORTANT: Always dispose when done to free memory\nawait pipe.dispose();\n```\n\n**⚠️ Memory Management:** All pipelines must be disposed with `pipe.dispose()` when finished to prevent memory leaks. See examples in [Code Examples](.\u002Freferences\u002FEXAMPLES.md) for cleanup patterns across different environments.\n\n### 2. Model Selection\nYou can specify a custom model as the second argument:\n\n```javascript\nconst pipe = await pipeline(\n  'sentiment-analysis',\n  'Xenova\u002Fbert-base-multilingual-uncased-sentiment'\n);\n```\n\n**Finding Models:**\n\nBrowse available Transformers.js models on Hugging Face Hub:\n- **All models**: https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js&sort=trending\n- **By task**: Add `pipeline_tag` parameter\n  - Text generation: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending\n  - Image classification: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-classification&library=transformers.js&sort=trending\n  - Speech recognition: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=automatic-speech-recognition&library=transformers.js&sort=trending\n\n**Tip:** Filter by task type, sort by trending\u002Fdownloads, and check model cards for performance metrics and usage examples.\n\n### 3. Device Selection\nChoose where to run the model:\n\n```javascript\n\u002F\u002F Run on CPU (default for WASM)\nconst pipe = await pipeline('sentiment-analysis', 'model-id');\n\n\u002F\u002F Run on GPU (WebGPU)\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  device: 'webgpu',\n});\n```\n\n### 4. Quantization Options\nControl model precision vs. performance:\n\n```javascript\n\u002F\u002F Use quantized model (faster, smaller)\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  dtype: 'q4',  \u002F\u002F Options: 'fp32', 'fp16', 'q8', 'q4'\n});\n```\n\n## Supported Tasks\n\n**Note:** All examples below show basic usage.\n\n### Natural Language Processing\n\n#### Text Classification\n```javascript\nconst classifier = await pipeline('text-classification');\nconst result = await classifier('This movie was amazing!');\n```\n\n#### Named Entity Recognition (NER)\n```javascript\nconst ner = await pipeline('token-classification');\nconst entities = await ner('My name is John and I live in New York.');\n```\n\n#### Question Answering\n```javascript\nconst qa = await pipeline('question-answering');\nconst answer = await qa({\n  question: 'What is the capital of France?',\n  context: 'Paris is the capital and largest city of France.'\n});\n```\n\n#### Text Generation\n```javascript\nconst generator = await pipeline('text-generation', 'onnx-community\u002Fgemma-3-270m-it-ONNX');\nconst text = await generator('Once upon a time', {\n  max_new_tokens: 100,\n  temperature: 0.7\n});\n```\n\n**For streaming and chat:** See **[Text Generation Guide](.\u002Freferences\u002FTEXT_GENERATION.md)** for:\n- Streaming token-by-token output with `TextStreamer`\n- Chat\u002Fconversation format with system\u002Fuser\u002Fassistant roles\n- Generation parameters (temperature, top_k, top_p)\n- Browser and Node.js examples\n- React components and API endpoints\n\n#### Translation\n```javascript\nconst translator = await pipeline('translation', 'Xenova\u002Fnllb-200-distilled-600M');\nconst output = await translator('Hello, how are you?', {\n  src_lang: 'eng_Latn',\n  tgt_lang: 'fra_Latn'\n});\n```\n\n#### Summarization\n```javascript\nconst summarizer = await pipeline('summarization');\nconst summary = await summarizer(longText, {\n  max_length: 100,\n  min_length: 30\n});\n```\n\n#### Zero-Shot Classification\n```javascript\nconst classifier = await pipeline('zero-shot-classification');\nconst result = await classifier('This is a story about sports.', ['politics', 'sports', 'technology']);\n```\n\n### Computer Vision\n\n#### Image Classification\n```javascript\nconst classifier = await pipeline('image-classification');\nconst result = await classifier('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n\u002F\u002F Or with local file\nconst result = await classifier(imageUrl);\n```\n\n#### Object Detection\n```javascript\nconst detector = await pipeline('object-detection');\nconst objects = await detector('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n\u002F\u002F Returns: [{ label: 'person', score: 0.95, box: { xmin, ymin, xmax, ymax } }, ...]\n```\n\n#### Image Segmentation\n```javascript\nconst segmenter = await pipeline('image-segmentation');\nconst segments = await segmenter('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n```\n\n#### Depth Estimation\n```javascript\nconst depthEstimator = await pipeline('depth-estimation');\nconst depth = await depthEstimator('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n```\n\n#### Zero-Shot Image Classification\n```javascript\nconst classifier = await pipeline('zero-shot-image-classification');\nconst result = await classifier('image.jpg', ['cat', 'dog', 'bird']);\n```\n\n### Audio Processing\n\n#### Automatic Speech Recognition\n```javascript\nconst transcriber = await pipeline('automatic-speech-recognition');\nconst result = await transcriber('audio.wav');\n\u002F\u002F Returns: { text: 'transcribed text here' }\n```\n\n#### Audio Classification\n```javascript\nconst classifier = await pipeline('audio-classification');\nconst result = await classifier('audio.wav');\n```\n\n#### Text-to-Speech\n```javascript\nconst synthesizer = await pipeline('text-to-speech', 'Xenova\u002Fspeecht5_tts');\nconst audio = await synthesizer('Hello, this is a test.', {\n  speaker_embeddings: speakerEmbeddings\n});\n```\n\n### Multimodal\n\n#### Image-to-Text (Image Captioning)\n```javascript\nconst captioner = await pipeline('image-to-text');\nconst caption = await captioner('image.jpg');\n```\n\n#### Document Question Answering\n```javascript\nconst docQA = await pipeline('document-question-answering');\nconst answer = await docQA('document-image.jpg', 'What is the total amount?');\n```\n\n#### Zero-Shot Object Detection\n```javascript\nconst detector = await pipeline('zero-shot-object-detection');\nconst objects = await detector('image.jpg', ['person', 'car', 'tree']);\n```\n\n### Feature Extraction (Embeddings)\n\n```javascript\nconst extractor = await pipeline('feature-extraction');\nconst embeddings = await extractor('This is a sentence to embed.');\n\u002F\u002F Returns: tensor of shape [1, sequence_length, hidden_size]\n\n\u002F\u002F For sentence embeddings (mean pooling)\nconst extractor = await pipeline('feature-extraction', 'onnx-community\u002Fall-MiniLM-L6-v2-ONNX');\nconst embeddings = await extractor('Text to embed', { pooling: 'mean', normalize: true });\n```\n\n## Finding and Choosing Models\n\n### Browsing the Hugging Face Hub\n\nDiscover compatible Transformers.js models on Hugging Face Hub:\n\n**Base URL (all models):**\n```\nhttps:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js&sort=trending\n```\n\n**Filter by task** using the `pipeline_tag` parameter:\n\n| Task | URL |\n|------|-----|\n| **Text Generation** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending |\n| **Text Classification** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-classification&library=transformers.js&sort=trending |\n| **Translation** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=translation&library=transformers.js&sort=trending |\n| **Summarization** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=summarization&library=transformers.js&sort=trending |\n| **Question Answering** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=question-answering&library=transformers.js&sort=trending |\n| **Image Classification** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-classification&library=transformers.js&sort=trending |\n| **Object Detection** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=object-detection&library=transformers.js&sort=trending |\n| **Image Segmentation** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-segmentation&library=transformers.js&sort=trending |\n| **Speech Recognition** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=automatic-speech-recognition&library=transformers.js&sort=trending |\n| **Audio Classification** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=audio-classification&library=transformers.js&sort=trending |\n| **Image-to-Text** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-to-text&library=transformers.js&sort=trending |\n| **Feature Extraction** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=feature-extraction&library=transformers.js&sort=trending |\n| **Zero-Shot Classification** | https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=zero-shot-classification&library=transformers.js&sort=trending |\n\n**Sort options:**\n- `&sort=trending` - Most popular recently\n- `&sort=downloads` - Most downloaded overall\n- `&sort=likes` - Most liked by community\n- `&sort=modified` - Recently updated\n\n### Choosing the Right Model\n\nConsider these factors when selecting a model:\n\n**1. Model Size**\n- **Small (\u003C 100MB)**: Fast, suitable for browsers, limited accuracy\n- **Medium (100MB - 500MB)**: Balanced performance, good for most use cases\n- **Large (> 500MB)**: High accuracy, slower, better for Node.js or powerful devices\n\n**2. Quantization**\nModels are often available in different quantization levels:\n- `fp32` - Full precision (largest, most accurate)\n- `fp16` - Half precision (smaller, still accurate)\n- `q8` - 8-bit quantized (much smaller, slight accuracy loss)\n- `q4` - 4-bit quantized (smallest, noticeable accuracy loss)\n\n**3. Task Compatibility**\nCheck the model card for:\n- Supported tasks (some models support multiple tasks)\n- Input\u002Foutput formats\n- Language support (multilingual vs. English-only)\n- License restrictions\n\n**4. Performance Metrics**\nModel cards typically show:\n- Accuracy scores\n- Benchmark results\n- Inference speed\n- Memory requirements\n\n### Example: Finding a Text Generation Model\n\n```javascript\n\u002F\u002F 1. Visit: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending\n\n\u002F\u002F 2. Browse and select a model (e.g., onnx-community\u002Fgemma-3-270m-it-ONNX)\n\n\u002F\u002F 3. Check model card for:\n\u002F\u002F    - Model size: ~270M parameters\n\u002F\u002F    - Quantization: q4 available\n\u002F\u002F    - Language: English\n\u002F\u002F    - Use case: Instruction-following chat\n\n\u002F\u002F 4. Use the model:\nimport { pipeline } from '@huggingface\u002Ftransformers';\n\nconst generator = await pipeline(\n  'text-generation',\n  'onnx-community\u002Fgemma-3-270m-it-ONNX',\n  { dtype: 'q4' } \u002F\u002F Use quantized version for faster inference\n);\n\nconst output = await generator('Explain quantum computing in simple terms.', {\n  max_new_tokens: 100\n});\n\nawait generator.dispose();\n```\n\n### Tips for Model Selection\n\n1. **Start Small**: Test with a smaller model first, then upgrade if needed\n2. **Check ONNX Support**: Ensure the model has ONNX files (look for `onnx` folder in model repo)\n3. **Read Model Cards**: Model cards contain usage examples, limitations, and benchmarks\n4. **Test Locally**: Benchmark inference speed and memory usage in your environment\n5. **Filter by Library**: Use `library=transformers.js` to find compatible models: https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js\n6. **Version Pin**: Use specific git commits in production for stability:\n   ```javascript\n   const pipe = await pipeline('task', 'model-id', { revision: 'abc123' });\n   ```\n\n## Advanced Configuration\n\n### Environment Configuration (`env`)\n\nThe `env` object provides comprehensive control over Transformers.js execution, caching, and model loading.\n\n**Quick Overview:**\n\n```javascript\nimport { env, LogLevel } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F View version\nconsole.log(env.version); \u002F\u002F e.g., '4.x'\n\n\u002F\u002F Common settings\nenv.allowRemoteModels = true;  \u002F\u002F Load from Hugging Face Hub\nenv.allowLocalModels = false;  \u002F\u002F Load from file system\nenv.localModelPath = '\u002Fmodels\u002F'; \u002F\u002F Local model directory\nenv.useFSCache = true;         \u002F\u002F Cache models on disk (Node.js)\nenv.useBrowserCache = true;    \u002F\u002F Cache models in browser\nenv.cacheDir = '.\u002F.cache';     \u002F\u002F Cache directory location\n\u002F\u002F Optional: override logging level (default is LogLevel.WARNING)\nenv.logLevel = LogLevel.INFO;\n\n\u002F\u002F Optional: custom fetch for auth headers, retries, abort signals, etc.\nenv.fetch = (url, options) =>\n  fetch(url, {\n    ...options,\n    headers: {\n      ...options?.headers,\n      Authorization: `Bearer ${HF_TOKEN}`,\n    },\n  });\n```\n\n**Configuration Patterns:**\n\n```javascript\n\u002F\u002F Development: Fast iteration with remote models\nenv.allowRemoteModels = true;\nenv.useFSCache = true;\n\n\u002F\u002F Production: Local models only\nenv.allowRemoteModels = false;\nenv.allowLocalModels = true;\nenv.localModelPath = '\u002Fapp\u002Fmodels\u002F';\n\n\u002F\u002F Custom CDN\nenv.remoteHost = 'https:\u002F\u002Fcdn.example.com\u002Fmodels';\n\n\u002F\u002F Disable caching (testing)\nenv.useFSCache = false;\nenv.useBrowserCache = false;\n```\n\nFor complete documentation on all configuration options, caching strategies, cache management, pre-downloading models, and more, see:\n\n**→ [Configuration Reference](.\u002Freferences\u002FCONFIGURATION.md)**\n\n### ModelRegistry (v4)\n\n`ModelRegistry` gives you visibility and control over model assets before loading a pipeline. Use it to estimate download size, check cache status, inspect available dtypes, and clear cached artifacts for a specific task\u002Fmodel\u002Foptions tuple.\n\n```javascript\nimport { ModelRegistry } from '@huggingface\u002Ftransformers';\n\nconst task = 'feature-extraction';\nconst modelId = 'onnx-community\u002Fall-MiniLM-L6-v2-ONNX';\nconst modelOptions = { dtype: 'fp32' };\n\n\u002F\u002F List required files for this pipeline\nconst files = await ModelRegistry.get_pipeline_files(task, modelId, modelOptions);\n\n\u002F\u002F Check if assets are already cached\nconst cached = await ModelRegistry.is_pipeline_cached(task, modelId, modelOptions);\n\n\u002F\u002F Inspect precision formats available for this model\nconst dtypes = await ModelRegistry.get_available_dtypes(modelId);\n\nconsole.log({ files: files.length, cached, dtypes });\n```\n\nFor production patterns and full API coverage, see **[ModelRegistry Reference](.\u002Freferences\u002FMODEL_REGISTRY.md)**.\n\n### Standalone Tokenization (`@huggingface\u002Ftokenizers`)\n\nFor tokenization-only workflows, use `@huggingface\u002Ftokenizers`. It is a separate lightweight package useful when you need fast tokenization\u002Fencoding without loading full model inference pipelines.\n\n```bash\nnpm install @huggingface\u002Ftokenizers\n```\n\n```javascript\nimport { Tokenizer } from '@huggingface\u002Ftokenizers';\n```\n\n### Working with Tensors\n\n```javascript\nimport { AutoTokenizer, AutoModel } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Load tokenizer and model separately for more control\nconst tokenizer = await AutoTokenizer.from_pretrained('bert-base-uncased');\nconst model = await AutoModel.from_pretrained('bert-base-uncased');\n\n\u002F\u002F Tokenize input\nconst inputs = await tokenizer('Hello world!');\n\n\u002F\u002F Run model\nconst outputs = await model(inputs);\n```\n\n### Batch Processing\n\n```javascript\nconst classifier = await pipeline('sentiment-analysis');\n\n\u002F\u002F Process multiple texts\nconst results = await classifier([\n  'I love this!',\n  'This is terrible.',\n  'It was okay.'\n]);\n```\n\n## Runtime-Specific Considerations\n\n### WebGPU Usage\nWebGPU provides GPU acceleration in browsers and server-side runtimes (when supported):\n\n```javascript\nconst pipe = await pipeline('text-generation', 'onnx-community\u002Fgemma-3-270m-it-ONNX', {\n  device: 'webgpu',\n  dtype: 'fp32'\n});\n```\n\n**Note**: Use `webgpu` when available and fall back to WASM\u002FCPU when not supported in the current runtime.\n\n### WASM Performance\nWASM is the most compatible execution backend across runtimes:\n\n```javascript\n\u002F\u002F Optimized for browsers with quantization\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  dtype: 'q8'  \u002F\u002F or 'q4' for even smaller size\n});\n```\n\n### Progress Tracking & Loading Indicators\n\nModels can be large (ranging from a few MB to several GB) and consist of multiple files. Track download progress by passing a callback to the `pipeline()` function:\n\n```javascript\nimport { pipeline } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Track progress for each file\nconst fileProgress = {};\n\nfunction onProgress(info) {\n  if (info.status === 'progress_total') {\n    console.log(`Total: ${info.progress.toFixed(1)}%`);\n    return;\n  }\n\n  console.log(`${info.status}: ${info.file ?? ''}`);\n  \n  if (info.status === 'progress') {\n    fileProgress[info.file] = info.progress;\n    console.log(`${info.file}: ${info.progress.toFixed(1)}%`);\n  }\n  \n  if (info.status === 'done') {\n    console.log(`✓ ${info.file} complete`);\n  }\n}\n\n\u002F\u002F Pass callback to pipeline\nconst classifier = await pipeline('sentiment-analysis', null, {\n  progress_callback: onProgress\n});\n```\n\n**Progress Info Properties:**\n\n```typescript\ninterface ProgressInfo {\n  status: 'initiate' | 'download' | 'progress' | 'progress_total' | 'done' | 'ready';\n  name: string;      \u002F\u002F Model id or path\n  file?: string;     \u002F\u002F File being processed (per-file events)\n  progress?: number; \u002F\u002F Percentage (0-100, for 'progress' and 'progress_total')\n  loaded?: number;   \u002F\u002F Bytes downloaded (only for 'progress' status)\n  total?: number;    \u002F\u002F Total bytes (only for 'progress' status)\n}\n```\n\nFor complete examples including browser UIs, React components, CLI progress bars, and retry logic, see:\n\n**→ [Pipeline Options - Progress Callback](.\u002Freferences\u002FPIPELINE_OPTIONS.md#progress-callback)**\n\n## Error Handling\n\n```javascript\ntry {\n  const pipe = await pipeline('sentiment-analysis', 'model-id');\n  const result = await pipe('text to analyze');\n} catch (error) {\n  if (error.message.includes('fetch')) {\n    console.error('Model download failed. Check internet connection.');\n  } else if (error.message.includes('ONNX')) {\n    console.error('Model execution failed. Check model compatibility.');\n  } else {\n    console.error('Unknown error:', error);\n  }\n}\n```\n\n## Performance Tips\n\n1. **Reuse Pipelines**: Create pipeline once, reuse for multiple inferences\n2. **Use Quantization**: Start with `q8` or `q4` for faster inference\n3. **Batch Processing**: Process multiple inputs together when possible\n4. **Cache Models**: Models are cached automatically (see **[Caching Reference](.\u002Freferences\u002FCACHE.md)** for details on browser Cache API, Node.js filesystem cache, and custom implementations)\n5. **WebGPU for Large Models**: Use WebGPU for models that benefit from GPU acceleration\n6. **Prune Context**: For text generation, limit `max_new_tokens` to avoid memory issues\n7. **Clean Up Resources**: Call `pipe.dispose()` when done to free memory\n\n## Memory Management\n\n**IMPORTANT:** Always call `pipe.dispose()` when finished to prevent memory leaks.\n\n```javascript\nconst pipe = await pipeline('sentiment-analysis');\nconst result = await pipe('Great product!');\nawait pipe.dispose();  \u002F\u002F ✓ Free memory (100MB - several GB per model)\n```\n\n**When to dispose:**\n- Application shutdown or component unmount\n- Before loading a different model\n- After batch processing in long-running apps\n\nModels consume significant memory and hold GPU\u002FCPU resources. Disposal is critical for browser memory limits and server stability.\n\nFor detailed patterns (React cleanup, servers, browser), see **[Code Examples](.\u002Freferences\u002FEXAMPLES.md)**\n\n## Troubleshooting\n\n### Model Not Found\n- Verify model exists on Hugging Face Hub\n- Check model name spelling\n- Ensure model has ONNX files (look for `onnx` folder in model repo)\n\n### Memory Issues\n- Use smaller models or quantized versions (`dtype: 'q4'`)\n- Reduce batch size\n- Limit sequence length with `max_length`\n\n### WebGPU Errors\n- Check browser compatibility (Chrome 113+, Edge 113+)\n- Try `dtype: 'fp16'` if `fp32` fails\n- Fall back to WASM if WebGPU unavailable\n\n## Reference Documentation\n\n### This Skill\n- **[Pipeline Options](.\u002Freferences\u002FPIPELINE_OPTIONS.md)** - Configure `pipeline()` with `progress_callback`, `device`, `dtype`, etc.\n- **[Configuration Reference](.\u002Freferences\u002FCONFIGURATION.md)** - Global `env` configuration for caching and model loading\n- **[ModelRegistry Reference](.\u002Freferences\u002FMODEL_REGISTRY.md)** - Inspect files, cache status, dtypes, and clear cache before loading pipelines\n- **[Caching Reference](.\u002Freferences\u002FCACHE.md)** - Browser Cache API, Node.js filesystem cache, and custom cache implementations\n- **[Text Generation Guide](.\u002Freferences\u002FTEXT_GENERATION.md)** - Streaming, chat format, and generation parameters\n- **[Model Architectures](.\u002Freferences\u002FMODEL_ARCHITECTURES.md)** - Supported models and selection tips\n- **[Code Examples](.\u002Freferences\u002FEXAMPLES.md)** - Real-world implementations for different runtimes\n\n### Official Transformers.js\n- Official docs: https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js\n- API reference: https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js\u002Fapi\u002Fpipelines\n- Model hub: https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js\n- GitHub: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js\n- Examples: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js-examples\n\n## Best Practices\n\n1. **Always Dispose Pipelines**: Call `pipe.dispose()` when done - critical for preventing memory leaks\n2. **Start with Pipelines**: Use the pipeline API unless you need fine-grained control\n3. **Test Locally First**: Test models with small inputs before deploying\n4. **Monitor Model Sizes**: Be aware of model download sizes for web applications\n5. **Handle Loading States**: Show progress indicators for better UX\n6. **Version Pin**: Pin specific model versions for production stability\n7. **Error Boundaries**: Always wrap pipeline calls in try-catch blocks\n8. **Progressive Enhancement**: Provide fallbacks for unsupported browsers\n9. **Reuse Models**: Load once, use many times - don't recreate pipelines unnecessarily\n10. **Graceful Shutdown**: Dispose models on SIGTERM\u002FSIGINT in servers\n\n## Quick Reference: Task IDs\n\n| Task | Task ID |\n|------|---------|\n| Text classification | `text-classification` or `sentiment-analysis` |\n| Token classification | `token-classification` or `ner` |\n| Question answering | `question-answering` |\n| Fill mask | `fill-mask` |\n| Summarization | `summarization` |\n| Translation | `translation` |\n| Text generation | `text-generation` |\n| Text-to-text generation | `text2text-generation` |\n| Zero-shot classification | `zero-shot-classification` |\n| Image classification | `image-classification` |\n| Image segmentation | `image-segmentation` |\n| Object detection | `object-detection` |\n| Depth estimation | `depth-estimation` |\n| Image-to-image | `image-to-image` |\n| Zero-shot image classification | `zero-shot-image-classification` |\n| Zero-shot object detection | `zero-shot-object-detection` |\n| Automatic speech recognition | `automatic-speech-recognition` |\n| Audio classification | `audio-classification` |\n| Text-to-speech | `text-to-speech` or `text-to-audio` |\n| Image-to-text | `image-to-text` |\n| Document question answering | `document-question-answering` |\n| Feature extraction | `feature-extraction` |\n| Sentence similarity | `sentence-similarity` |\n\n---\n\nThis skill enables you to integrate state-of-the-art machine learning capabilities directly into JavaScript applications without requiring separate ML servers or Python environments.\n",{"data":39,"body":45},{"name":4,"description":6,"license":30,"metadata":40,"compatibility":44},{"author":8,"version":41,"category":42,"repository":43},"4.x","machine-learning","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js","Requires Node.js 18+ (or compatible Bun\u002FDeno runtime) or modern browser with ES modules support. WebGPU requires runtime and hardware support; WASM is the broad fallback. Internet access is needed for downloading models from Hugging Face Hub (optional if using local models).",{"type":46,"children":47},"root",[48,57,63,70,75,105,111,118,153,159,259,265,271,276,531,559,565,570,654,662,667,741,751,757,762,966,972,977,1104,1110,1120,1126,1133,1237,1243,1349,1355,1513,1519,1695,1716,1750,1756,1947,1953,2098,2104,2263,2267,2273,2415,2421,2533,2539,2643,2649,2753,2759,2916,2922,2928,3040,3046,3147,3153,3307,3313,3319,3424,3430,3551,3557,3713,3719,4013,4019,4025,4030,4038,4048,4065,4340,4348,4395,4401,4406,4414,4447,4457,4503,4513,4536,4546,4569,4575,4960,4966,5157,5163,5176,5188,5196,5795,5803,6098,6103,6117,6123,6134,6582,6597,6610,6622,6645,6692,6698,6997,7003,7168,7174,7180,7185,7320,7336,7342,7347,7468,7474,7487,8305,8313,8585,8590,8603,8609,9045,9051,9163,9169,9186,9320,9328,9346,9351,9363,9369,9375,9399,9405,9436,9442,9475,9481,9487,9615,9621,9677,9683,9791,9797,10208,10212,10217],{"type":49,"tag":50,"props":51,"children":53},"element","h1",{"id":52},"transformersjs-machine-learning-for-javascript",[54],{"type":55,"value":56},"text","Transformers.js - Machine Learning for JavaScript",{"type":49,"tag":58,"props":59,"children":60},"p",{},[61],{"type":55,"value":62},"Transformers.js enables running state-of-the-art machine learning models directly in JavaScript across browsers and server-side runtimes (Node.js, Bun, Deno), with no Python server required.",{"type":49,"tag":64,"props":65,"children":67},"h2",{"id":66},"when-to-use-this-skill",[68],{"type":55,"value":69},"When to Use This Skill",{"type":49,"tag":58,"props":71,"children":72},{},[73],{"type":55,"value":74},"Use this skill when you need to:",{"type":49,"tag":76,"props":77,"children":78},"ul",{},[79,85,90,95,100],{"type":49,"tag":80,"props":81,"children":82},"li",{},[83],{"type":55,"value":84},"Run ML models for text analysis, generation, or translation in JavaScript",{"type":49,"tag":80,"props":86,"children":87},{},[88],{"type":55,"value":89},"Perform image classification, object detection, or segmentation",{"type":49,"tag":80,"props":91,"children":92},{},[93],{"type":55,"value":94},"Implement speech recognition or audio processing",{"type":49,"tag":80,"props":96,"children":97},{},[98],{"type":55,"value":99},"Build multimodal AI applications (text-to-image, image-to-text, etc.)",{"type":49,"tag":80,"props":101,"children":102},{},[103],{"type":55,"value":104},"Run models client-side in the browser without a backend",{"type":49,"tag":64,"props":106,"children":108},{"id":107},"installation",[109],{"type":55,"value":110},"Installation",{"type":49,"tag":112,"props":113,"children":115},"h3",{"id":114},"npm-installation",[116],{"type":55,"value":117},"NPM Installation",{"type":49,"tag":119,"props":120,"children":125},"pre",{"className":121,"code":122,"language":123,"meta":124,"style":124},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @huggingface\u002Ftransformers\n","bash","",[126],{"type":49,"tag":127,"props":128,"children":129},"code",{"__ignoreMap":124},[130],{"type":49,"tag":131,"props":132,"children":135},"span",{"class":133,"line":134},"line",1,[136,142,148],{"type":49,"tag":131,"props":137,"children":139},{"style":138},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[140],{"type":55,"value":141},"npm",{"type":49,"tag":131,"props":143,"children":145},{"style":144},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[146],{"type":55,"value":147}," install",{"type":49,"tag":131,"props":149,"children":150},{"style":144},[151],{"type":55,"value":152}," @huggingface\u002Ftransformers\n",{"type":49,"tag":112,"props":154,"children":156},{"id":155},"browser-usage-cdn",[157],{"type":55,"value":158},"Browser Usage (CDN)",{"type":49,"tag":119,"props":160,"children":163},{"className":161,"code":162,"language":23,"meta":124,"style":124},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript type=\"module\">\n  import { pipeline } from 'https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@huggingface\u002Ftransformers';\n\u003C\u002Fscript>\n",[164],{"type":49,"tag":127,"props":165,"children":166},{"__ignoreMap":124},[167,212,242],{"type":49,"tag":131,"props":168,"children":169},{"class":133,"line":134},[170,176,182,188,193,198,203,207],{"type":49,"tag":131,"props":171,"children":173},{"style":172},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[174],{"type":55,"value":175},"\u003C",{"type":49,"tag":131,"props":177,"children":179},{"style":178},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[180],{"type":55,"value":181},"script",{"type":49,"tag":131,"props":183,"children":185},{"style":184},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[186],{"type":55,"value":187}," type",{"type":49,"tag":131,"props":189,"children":190},{"style":172},[191],{"type":55,"value":192},"=",{"type":49,"tag":131,"props":194,"children":195},{"style":172},[196],{"type":55,"value":197},"\"",{"type":49,"tag":131,"props":199,"children":200},{"style":144},[201],{"type":55,"value":202},"module",{"type":49,"tag":131,"props":204,"children":205},{"style":172},[206],{"type":55,"value":197},{"type":49,"tag":131,"props":208,"children":209},{"style":172},[210],{"type":55,"value":211},">\n",{"type":49,"tag":131,"props":213,"children":215},{"class":133,"line":214},2,[216,222,227,232,237],{"type":49,"tag":131,"props":217,"children":219},{"style":218},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[220],{"type":55,"value":221},"  import ",{"type":49,"tag":131,"props":223,"children":224},{"style":172},[225],{"type":55,"value":226},"{",{"type":49,"tag":131,"props":228,"children":229},{"style":218},[230],{"type":55,"value":231}," pipeline ",{"type":49,"tag":131,"props":233,"children":234},{"style":172},[235],{"type":55,"value":236},"}",{"type":49,"tag":131,"props":238,"children":239},{"style":218},[240],{"type":55,"value":241}," from 'https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@huggingface\u002Ftransformers';\n",{"type":49,"tag":131,"props":243,"children":245},{"class":133,"line":244},3,[246,251,255],{"type":49,"tag":131,"props":247,"children":248},{"style":172},[249],{"type":55,"value":250},"\u003C\u002F",{"type":49,"tag":131,"props":252,"children":253},{"style":178},[254],{"type":55,"value":181},{"type":49,"tag":131,"props":256,"children":257},{"style":172},[258],{"type":55,"value":211},{"type":49,"tag":64,"props":260,"children":262},{"id":261},"core-concepts",[263],{"type":55,"value":264},"Core Concepts",{"type":49,"tag":112,"props":266,"children":268},{"id":267},"_1-pipeline-api",[269],{"type":55,"value":270},"1. Pipeline API",{"type":49,"tag":58,"props":272,"children":273},{},[274],{"type":55,"value":275},"The pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing:",{"type":49,"tag":119,"props":277,"children":279},{"className":161,"code":278,"language":23,"meta":124,"style":124},"import { pipeline } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Create a pipeline for a specific task\nconst pipe = await pipeline('sentiment-analysis');\n\n\u002F\u002F Use the pipeline\nconst result = await pipe('I love transformers!');\n\u002F\u002F Output: [{ label: 'POSITIVE', score: 0.999817686 }]\n\n\u002F\u002F IMPORTANT: Always dispose when done to free memory\nawait pipe.dispose();\n",[280],{"type":49,"tag":127,"props":281,"children":282},{"__ignoreMap":124},[283,332,341,350,405,413,422,473,482,490,499],{"type":49,"tag":131,"props":284,"children":285},{"class":133,"line":134},[286,292,297,302,307,312,317,322,327],{"type":49,"tag":131,"props":287,"children":289},{"style":288},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[290],{"type":55,"value":291},"import",{"type":49,"tag":131,"props":293,"children":294},{"style":172},[295],{"type":55,"value":296}," {",{"type":49,"tag":131,"props":298,"children":299},{"style":218},[300],{"type":55,"value":301}," pipeline",{"type":49,"tag":131,"props":303,"children":304},{"style":172},[305],{"type":55,"value":306}," }",{"type":49,"tag":131,"props":308,"children":309},{"style":288},[310],{"type":55,"value":311}," from",{"type":49,"tag":131,"props":313,"children":314},{"style":172},[315],{"type":55,"value":316}," '",{"type":49,"tag":131,"props":318,"children":319},{"style":144},[320],{"type":55,"value":321},"@huggingface\u002Ftransformers",{"type":49,"tag":131,"props":323,"children":324},{"style":172},[325],{"type":55,"value":326},"'",{"type":49,"tag":131,"props":328,"children":329},{"style":172},[330],{"type":55,"value":331},";\n",{"type":49,"tag":131,"props":333,"children":334},{"class":133,"line":214},[335],{"type":49,"tag":131,"props":336,"children":338},{"emptyLinePlaceholder":337},true,[339],{"type":55,"value":340},"\n",{"type":49,"tag":131,"props":342,"children":343},{"class":133,"line":244},[344],{"type":49,"tag":131,"props":345,"children":347},{"style":346},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[348],{"type":55,"value":349},"\u002F\u002F Create a pipeline for a specific task\n",{"type":49,"tag":131,"props":351,"children":353},{"class":133,"line":352},4,[354,359,364,368,373,378,383,387,392,396,401],{"type":49,"tag":131,"props":355,"children":356},{"style":184},[357],{"type":55,"value":358},"const",{"type":49,"tag":131,"props":360,"children":361},{"style":218},[362],{"type":55,"value":363}," pipe ",{"type":49,"tag":131,"props":365,"children":366},{"style":172},[367],{"type":55,"value":192},{"type":49,"tag":131,"props":369,"children":370},{"style":288},[371],{"type":55,"value":372}," await",{"type":49,"tag":131,"props":374,"children":376},{"style":375},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[377],{"type":55,"value":301},{"type":49,"tag":131,"props":379,"children":380},{"style":218},[381],{"type":55,"value":382},"(",{"type":49,"tag":131,"props":384,"children":385},{"style":172},[386],{"type":55,"value":326},{"type":49,"tag":131,"props":388,"children":389},{"style":144},[390],{"type":55,"value":391},"sentiment-analysis",{"type":49,"tag":131,"props":393,"children":394},{"style":172},[395],{"type":55,"value":326},{"type":49,"tag":131,"props":397,"children":398},{"style":218},[399],{"type":55,"value":400},")",{"type":49,"tag":131,"props":402,"children":403},{"style":172},[404],{"type":55,"value":331},{"type":49,"tag":131,"props":406,"children":408},{"class":133,"line":407},5,[409],{"type":49,"tag":131,"props":410,"children":411},{"emptyLinePlaceholder":337},[412],{"type":55,"value":340},{"type":49,"tag":131,"props":414,"children":416},{"class":133,"line":415},6,[417],{"type":49,"tag":131,"props":418,"children":419},{"style":346},[420],{"type":55,"value":421},"\u002F\u002F Use the pipeline\n",{"type":49,"tag":131,"props":423,"children":425},{"class":133,"line":424},7,[426,430,435,439,443,448,452,456,461,465,469],{"type":49,"tag":131,"props":427,"children":428},{"style":184},[429],{"type":55,"value":358},{"type":49,"tag":131,"props":431,"children":432},{"style":218},[433],{"type":55,"value":434}," result ",{"type":49,"tag":131,"props":436,"children":437},{"style":172},[438],{"type":55,"value":192},{"type":49,"tag":131,"props":440,"children":441},{"style":288},[442],{"type":55,"value":372},{"type":49,"tag":131,"props":444,"children":445},{"style":375},[446],{"type":55,"value":447}," pipe",{"type":49,"tag":131,"props":449,"children":450},{"style":218},[451],{"type":55,"value":382},{"type":49,"tag":131,"props":453,"children":454},{"style":172},[455],{"type":55,"value":326},{"type":49,"tag":131,"props":457,"children":458},{"style":144},[459],{"type":55,"value":460},"I love transformers!",{"type":49,"tag":131,"props":462,"children":463},{"style":172},[464],{"type":55,"value":326},{"type":49,"tag":131,"props":466,"children":467},{"style":218},[468],{"type":55,"value":400},{"type":49,"tag":131,"props":470,"children":471},{"style":172},[472],{"type":55,"value":331},{"type":49,"tag":131,"props":474,"children":476},{"class":133,"line":475},8,[477],{"type":49,"tag":131,"props":478,"children":479},{"style":346},[480],{"type":55,"value":481},"\u002F\u002F Output: [{ label: 'POSITIVE', score: 0.999817686 }]\n",{"type":49,"tag":131,"props":483,"children":485},{"class":133,"line":484},9,[486],{"type":49,"tag":131,"props":487,"children":488},{"emptyLinePlaceholder":337},[489],{"type":55,"value":340},{"type":49,"tag":131,"props":491,"children":493},{"class":133,"line":492},10,[494],{"type":49,"tag":131,"props":495,"children":496},{"style":346},[497],{"type":55,"value":498},"\u002F\u002F IMPORTANT: Always dispose when done to free memory\n",{"type":49,"tag":131,"props":500,"children":502},{"class":133,"line":501},11,[503,508,512,517,522,527],{"type":49,"tag":131,"props":504,"children":505},{"style":288},[506],{"type":55,"value":507},"await",{"type":49,"tag":131,"props":509,"children":510},{"style":218},[511],{"type":55,"value":447},{"type":49,"tag":131,"props":513,"children":514},{"style":172},[515],{"type":55,"value":516},".",{"type":49,"tag":131,"props":518,"children":519},{"style":375},[520],{"type":55,"value":521},"dispose",{"type":49,"tag":131,"props":523,"children":524},{"style":218},[525],{"type":55,"value":526},"()",{"type":49,"tag":131,"props":528,"children":529},{"style":172},[530],{"type":55,"value":331},{"type":49,"tag":58,"props":532,"children":533},{},[534,540,542,548,550,557],{"type":49,"tag":535,"props":536,"children":537},"strong",{},[538],{"type":55,"value":539},"⚠️ Memory Management:",{"type":55,"value":541}," All pipelines must be disposed with ",{"type":49,"tag":127,"props":543,"children":545},{"className":544},[],[546],{"type":55,"value":547},"pipe.dispose()",{"type":55,"value":549}," when finished to prevent memory leaks. See examples in ",{"type":49,"tag":551,"props":552,"children":554},"a",{"href":553},".\u002Freferences\u002FEXAMPLES.md",[555],{"type":55,"value":556},"Code Examples",{"type":55,"value":558}," for cleanup patterns across different environments.",{"type":49,"tag":112,"props":560,"children":562},{"id":561},"_2-model-selection",[563],{"type":55,"value":564},"2. Model Selection",{"type":49,"tag":58,"props":566,"children":567},{},[568],{"type":55,"value":569},"You can specify a custom model as the second argument:",{"type":49,"tag":119,"props":571,"children":573},{"className":161,"code":572,"language":23,"meta":124,"style":124},"const pipe = await pipeline(\n  'sentiment-analysis',\n  'Xenova\u002Fbert-base-multilingual-uncased-sentiment'\n);\n",[574],{"type":49,"tag":127,"props":575,"children":576},{"__ignoreMap":124},[577,605,626,643],{"type":49,"tag":131,"props":578,"children":579},{"class":133,"line":134},[580,584,588,592,596,600],{"type":49,"tag":131,"props":581,"children":582},{"style":184},[583],{"type":55,"value":358},{"type":49,"tag":131,"props":585,"children":586},{"style":218},[587],{"type":55,"value":363},{"type":49,"tag":131,"props":589,"children":590},{"style":172},[591],{"type":55,"value":192},{"type":49,"tag":131,"props":593,"children":594},{"style":288},[595],{"type":55,"value":372},{"type":49,"tag":131,"props":597,"children":598},{"style":375},[599],{"type":55,"value":301},{"type":49,"tag":131,"props":601,"children":602},{"style":218},[603],{"type":55,"value":604},"(\n",{"type":49,"tag":131,"props":606,"children":607},{"class":133,"line":214},[608,613,617,621],{"type":49,"tag":131,"props":609,"children":610},{"style":172},[611],{"type":55,"value":612},"  '",{"type":49,"tag":131,"props":614,"children":615},{"style":144},[616],{"type":55,"value":391},{"type":49,"tag":131,"props":618,"children":619},{"style":172},[620],{"type":55,"value":326},{"type":49,"tag":131,"props":622,"children":623},{"style":172},[624],{"type":55,"value":625},",\n",{"type":49,"tag":131,"props":627,"children":628},{"class":133,"line":244},[629,633,638],{"type":49,"tag":131,"props":630,"children":631},{"style":172},[632],{"type":55,"value":612},{"type":49,"tag":131,"props":634,"children":635},{"style":144},[636],{"type":55,"value":637},"Xenova\u002Fbert-base-multilingual-uncased-sentiment",{"type":49,"tag":131,"props":639,"children":640},{"style":172},[641],{"type":55,"value":642},"'\n",{"type":49,"tag":131,"props":644,"children":645},{"class":133,"line":352},[646,650],{"type":49,"tag":131,"props":647,"children":648},{"style":218},[649],{"type":55,"value":400},{"type":49,"tag":131,"props":651,"children":652},{"style":172},[653],{"type":55,"value":331},{"type":49,"tag":58,"props":655,"children":656},{},[657],{"type":49,"tag":535,"props":658,"children":659},{},[660],{"type":55,"value":661},"Finding Models:",{"type":49,"tag":58,"props":663,"children":664},{},[665],{"type":55,"value":666},"Browse available Transformers.js models on Hugging Face Hub:",{"type":49,"tag":76,"props":668,"children":669},{},[670,687],{"type":49,"tag":80,"props":671,"children":672},{},[673,678,680],{"type":49,"tag":535,"props":674,"children":675},{},[676],{"type":55,"value":677},"All models",{"type":55,"value":679},": ",{"type":49,"tag":551,"props":681,"children":685},{"href":682,"rel":683},"https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js&sort=trending",[684],"nofollow",[686],{"type":55,"value":682},{"type":49,"tag":80,"props":688,"children":689},{},[690,695,697,703,705],{"type":49,"tag":535,"props":691,"children":692},{},[693],{"type":55,"value":694},"By task",{"type":55,"value":696},": Add ",{"type":49,"tag":127,"props":698,"children":700},{"className":699},[],[701],{"type":55,"value":702},"pipeline_tag",{"type":55,"value":704}," parameter\n",{"type":49,"tag":76,"props":706,"children":707},{},[708,719,730],{"type":49,"tag":80,"props":709,"children":710},{},[711,713],{"type":55,"value":712},"Text generation: ",{"type":49,"tag":551,"props":714,"children":717},{"href":715,"rel":716},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending",[684],[718],{"type":55,"value":715},{"type":49,"tag":80,"props":720,"children":721},{},[722,724],{"type":55,"value":723},"Image classification: ",{"type":49,"tag":551,"props":725,"children":728},{"href":726,"rel":727},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-classification&library=transformers.js&sort=trending",[684],[729],{"type":55,"value":726},{"type":49,"tag":80,"props":731,"children":732},{},[733,735],{"type":55,"value":734},"Speech recognition: ",{"type":49,"tag":551,"props":736,"children":739},{"href":737,"rel":738},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=automatic-speech-recognition&library=transformers.js&sort=trending",[684],[740],{"type":55,"value":737},{"type":49,"tag":58,"props":742,"children":743},{},[744,749],{"type":49,"tag":535,"props":745,"children":746},{},[747],{"type":55,"value":748},"Tip:",{"type":55,"value":750}," Filter by task type, sort by trending\u002Fdownloads, and check model cards for performance metrics and usage examples.",{"type":49,"tag":112,"props":752,"children":754},{"id":753},"_3-device-selection",[755],{"type":55,"value":756},"3. Device Selection",{"type":49,"tag":58,"props":758,"children":759},{},[760],{"type":55,"value":761},"Choose where to run the model:",{"type":49,"tag":119,"props":763,"children":765},{"className":161,"code":764,"language":23,"meta":124,"style":124},"\u002F\u002F Run on CPU (default for WASM)\nconst pipe = await pipeline('sentiment-analysis', 'model-id');\n\n\u002F\u002F Run on GPU (WebGPU)\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  device: 'webgpu',\n});\n",[766],{"type":49,"tag":127,"props":767,"children":768},{"__ignoreMap":124},[769,777,842,849,857,921,951],{"type":49,"tag":131,"props":770,"children":771},{"class":133,"line":134},[772],{"type":49,"tag":131,"props":773,"children":774},{"style":346},[775],{"type":55,"value":776},"\u002F\u002F Run on CPU (default for WASM)\n",{"type":49,"tag":131,"props":778,"children":779},{"class":133,"line":214},[780,784,788,792,796,800,804,808,812,816,821,825,830,834,838],{"type":49,"tag":131,"props":781,"children":782},{"style":184},[783],{"type":55,"value":358},{"type":49,"tag":131,"props":785,"children":786},{"style":218},[787],{"type":55,"value":363},{"type":49,"tag":131,"props":789,"children":790},{"style":172},[791],{"type":55,"value":192},{"type":49,"tag":131,"props":793,"children":794},{"style":288},[795],{"type":55,"value":372},{"type":49,"tag":131,"props":797,"children":798},{"style":375},[799],{"type":55,"value":301},{"type":49,"tag":131,"props":801,"children":802},{"style":218},[803],{"type":55,"value":382},{"type":49,"tag":131,"props":805,"children":806},{"style":172},[807],{"type":55,"value":326},{"type":49,"tag":131,"props":809,"children":810},{"style":144},[811],{"type":55,"value":391},{"type":49,"tag":131,"props":813,"children":814},{"style":172},[815],{"type":55,"value":326},{"type":49,"tag":131,"props":817,"children":818},{"style":172},[819],{"type":55,"value":820},",",{"type":49,"tag":131,"props":822,"children":823},{"style":172},[824],{"type":55,"value":316},{"type":49,"tag":131,"props":826,"children":827},{"style":144},[828],{"type":55,"value":829},"model-id",{"type":49,"tag":131,"props":831,"children":832},{"style":172},[833],{"type":55,"value":326},{"type":49,"tag":131,"props":835,"children":836},{"style":218},[837],{"type":55,"value":400},{"type":49,"tag":131,"props":839,"children":840},{"style":172},[841],{"type":55,"value":331},{"type":49,"tag":131,"props":843,"children":844},{"class":133,"line":244},[845],{"type":49,"tag":131,"props":846,"children":847},{"emptyLinePlaceholder":337},[848],{"type":55,"value":340},{"type":49,"tag":131,"props":850,"children":851},{"class":133,"line":352},[852],{"type":49,"tag":131,"props":853,"children":854},{"style":346},[855],{"type":55,"value":856},"\u002F\u002F Run on GPU (WebGPU)\n",{"type":49,"tag":131,"props":858,"children":859},{"class":133,"line":407},[860,864,868,872,876,880,884,888,892,896,900,904,908,912,916],{"type":49,"tag":131,"props":861,"children":862},{"style":184},[863],{"type":55,"value":358},{"type":49,"tag":131,"props":865,"children":866},{"style":218},[867],{"type":55,"value":363},{"type":49,"tag":131,"props":869,"children":870},{"style":172},[871],{"type":55,"value":192},{"type":49,"tag":131,"props":873,"children":874},{"style":288},[875],{"type":55,"value":372},{"type":49,"tag":131,"props":877,"children":878},{"style":375},[879],{"type":55,"value":301},{"type":49,"tag":131,"props":881,"children":882},{"style":218},[883],{"type":55,"value":382},{"type":49,"tag":131,"props":885,"children":886},{"style":172},[887],{"type":55,"value":326},{"type":49,"tag":131,"props":889,"children":890},{"style":144},[891],{"type":55,"value":391},{"type":49,"tag":131,"props":893,"children":894},{"style":172},[895],{"type":55,"value":326},{"type":49,"tag":131,"props":897,"children":898},{"style":172},[899],{"type":55,"value":820},{"type":49,"tag":131,"props":901,"children":902},{"style":172},[903],{"type":55,"value":316},{"type":49,"tag":131,"props":905,"children":906},{"style":144},[907],{"type":55,"value":829},{"type":49,"tag":131,"props":909,"children":910},{"style":172},[911],{"type":55,"value":326},{"type":49,"tag":131,"props":913,"children":914},{"style":172},[915],{"type":55,"value":820},{"type":49,"tag":131,"props":917,"children":918},{"style":172},[919],{"type":55,"value":920}," {\n",{"type":49,"tag":131,"props":922,"children":923},{"class":133,"line":415},[924,929,934,938,943,947],{"type":49,"tag":131,"props":925,"children":926},{"style":178},[927],{"type":55,"value":928},"  device",{"type":49,"tag":131,"props":930,"children":931},{"style":172},[932],{"type":55,"value":933},":",{"type":49,"tag":131,"props":935,"children":936},{"style":172},[937],{"type":55,"value":316},{"type":49,"tag":131,"props":939,"children":940},{"style":144},[941],{"type":55,"value":942},"webgpu",{"type":49,"tag":131,"props":944,"children":945},{"style":172},[946],{"type":55,"value":326},{"type":49,"tag":131,"props":948,"children":949},{"style":172},[950],{"type":55,"value":625},{"type":49,"tag":131,"props":952,"children":953},{"class":133,"line":424},[954,958,962],{"type":49,"tag":131,"props":955,"children":956},{"style":172},[957],{"type":55,"value":236},{"type":49,"tag":131,"props":959,"children":960},{"style":218},[961],{"type":55,"value":400},{"type":49,"tag":131,"props":963,"children":964},{"style":172},[965],{"type":55,"value":331},{"type":49,"tag":112,"props":967,"children":969},{"id":968},"_4-quantization-options",[970],{"type":55,"value":971},"4. Quantization Options",{"type":49,"tag":58,"props":973,"children":974},{},[975],{"type":55,"value":976},"Control model precision vs. performance:",{"type":49,"tag":119,"props":978,"children":980},{"className":161,"code":979,"language":23,"meta":124,"style":124},"\u002F\u002F Use quantized model (faster, smaller)\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  dtype: 'q4',  \u002F\u002F Options: 'fp32', 'fp16', 'q8', 'q4'\n});\n",[981],{"type":49,"tag":127,"props":982,"children":983},{"__ignoreMap":124},[984,992,1055,1089],{"type":49,"tag":131,"props":985,"children":986},{"class":133,"line":134},[987],{"type":49,"tag":131,"props":988,"children":989},{"style":346},[990],{"type":55,"value":991},"\u002F\u002F Use quantized model (faster, smaller)\n",{"type":49,"tag":131,"props":993,"children":994},{"class":133,"line":214},[995,999,1003,1007,1011,1015,1019,1023,1027,1031,1035,1039,1043,1047,1051],{"type":49,"tag":131,"props":996,"children":997},{"style":184},[998],{"type":55,"value":358},{"type":49,"tag":131,"props":1000,"children":1001},{"style":218},[1002],{"type":55,"value":363},{"type":49,"tag":131,"props":1004,"children":1005},{"style":172},[1006],{"type":55,"value":192},{"type":49,"tag":131,"props":1008,"children":1009},{"style":288},[1010],{"type":55,"value":372},{"type":49,"tag":131,"props":1012,"children":1013},{"style":375},[1014],{"type":55,"value":301},{"type":49,"tag":131,"props":1016,"children":1017},{"style":218},[1018],{"type":55,"value":382},{"type":49,"tag":131,"props":1020,"children":1021},{"style":172},[1022],{"type":55,"value":326},{"type":49,"tag":131,"props":1024,"children":1025},{"style":144},[1026],{"type":55,"value":391},{"type":49,"tag":131,"props":1028,"children":1029},{"style":172},[1030],{"type":55,"value":326},{"type":49,"tag":131,"props":1032,"children":1033},{"style":172},[1034],{"type":55,"value":820},{"type":49,"tag":131,"props":1036,"children":1037},{"style":172},[1038],{"type":55,"value":316},{"type":49,"tag":131,"props":1040,"children":1041},{"style":144},[1042],{"type":55,"value":829},{"type":49,"tag":131,"props":1044,"children":1045},{"style":172},[1046],{"type":55,"value":326},{"type":49,"tag":131,"props":1048,"children":1049},{"style":172},[1050],{"type":55,"value":820},{"type":49,"tag":131,"props":1052,"children":1053},{"style":172},[1054],{"type":55,"value":920},{"type":49,"tag":131,"props":1056,"children":1057},{"class":133,"line":244},[1058,1063,1067,1071,1076,1080,1084],{"type":49,"tag":131,"props":1059,"children":1060},{"style":178},[1061],{"type":55,"value":1062},"  dtype",{"type":49,"tag":131,"props":1064,"children":1065},{"style":172},[1066],{"type":55,"value":933},{"type":49,"tag":131,"props":1068,"children":1069},{"style":172},[1070],{"type":55,"value":316},{"type":49,"tag":131,"props":1072,"children":1073},{"style":144},[1074],{"type":55,"value":1075},"q4",{"type":49,"tag":131,"props":1077,"children":1078},{"style":172},[1079],{"type":55,"value":326},{"type":49,"tag":131,"props":1081,"children":1082},{"style":172},[1083],{"type":55,"value":820},{"type":49,"tag":131,"props":1085,"children":1086},{"style":346},[1087],{"type":55,"value":1088},"  \u002F\u002F Options: 'fp32', 'fp16', 'q8', 'q4'\n",{"type":49,"tag":131,"props":1090,"children":1091},{"class":133,"line":352},[1092,1096,1100],{"type":49,"tag":131,"props":1093,"children":1094},{"style":172},[1095],{"type":55,"value":236},{"type":49,"tag":131,"props":1097,"children":1098},{"style":218},[1099],{"type":55,"value":400},{"type":49,"tag":131,"props":1101,"children":1102},{"style":172},[1103],{"type":55,"value":331},{"type":49,"tag":64,"props":1105,"children":1107},{"id":1106},"supported-tasks",[1108],{"type":55,"value":1109},"Supported Tasks",{"type":49,"tag":58,"props":1111,"children":1112},{},[1113,1118],{"type":49,"tag":535,"props":1114,"children":1115},{},[1116],{"type":55,"value":1117},"Note:",{"type":55,"value":1119}," All examples below show basic usage.",{"type":49,"tag":112,"props":1121,"children":1123},{"id":1122},"natural-language-processing",[1124],{"type":55,"value":1125},"Natural Language Processing",{"type":49,"tag":1127,"props":1128,"children":1130},"h4",{"id":1129},"text-classification",[1131],{"type":55,"value":1132},"Text Classification",{"type":49,"tag":119,"props":1134,"children":1136},{"className":161,"code":1135,"language":23,"meta":124,"style":124},"const classifier = await pipeline('text-classification');\nconst result = await classifier('This movie was amazing!');\n",[1137],{"type":49,"tag":127,"props":1138,"children":1139},{"__ignoreMap":124},[1140,1188],{"type":49,"tag":131,"props":1141,"children":1142},{"class":133,"line":134},[1143,1147,1152,1156,1160,1164,1168,1172,1176,1180,1184],{"type":49,"tag":131,"props":1144,"children":1145},{"style":184},[1146],{"type":55,"value":358},{"type":49,"tag":131,"props":1148,"children":1149},{"style":218},[1150],{"type":55,"value":1151}," classifier ",{"type":49,"tag":131,"props":1153,"children":1154},{"style":172},[1155],{"type":55,"value":192},{"type":49,"tag":131,"props":1157,"children":1158},{"style":288},[1159],{"type":55,"value":372},{"type":49,"tag":131,"props":1161,"children":1162},{"style":375},[1163],{"type":55,"value":301},{"type":49,"tag":131,"props":1165,"children":1166},{"style":218},[1167],{"type":55,"value":382},{"type":49,"tag":131,"props":1169,"children":1170},{"style":172},[1171],{"type":55,"value":326},{"type":49,"tag":131,"props":1173,"children":1174},{"style":144},[1175],{"type":55,"value":1129},{"type":49,"tag":131,"props":1177,"children":1178},{"style":172},[1179],{"type":55,"value":326},{"type":49,"tag":131,"props":1181,"children":1182},{"style":218},[1183],{"type":55,"value":400},{"type":49,"tag":131,"props":1185,"children":1186},{"style":172},[1187],{"type":55,"value":331},{"type":49,"tag":131,"props":1189,"children":1190},{"class":133,"line":214},[1191,1195,1199,1203,1207,1212,1216,1220,1225,1229,1233],{"type":49,"tag":131,"props":1192,"children":1193},{"style":184},[1194],{"type":55,"value":358},{"type":49,"tag":131,"props":1196,"children":1197},{"style":218},[1198],{"type":55,"value":434},{"type":49,"tag":131,"props":1200,"children":1201},{"style":172},[1202],{"type":55,"value":192},{"type":49,"tag":131,"props":1204,"children":1205},{"style":288},[1206],{"type":55,"value":372},{"type":49,"tag":131,"props":1208,"children":1209},{"style":375},[1210],{"type":55,"value":1211}," classifier",{"type":49,"tag":131,"props":1213,"children":1214},{"style":218},[1215],{"type":55,"value":382},{"type":49,"tag":131,"props":1217,"children":1218},{"style":172},[1219],{"type":55,"value":326},{"type":49,"tag":131,"props":1221,"children":1222},{"style":144},[1223],{"type":55,"value":1224},"This movie was amazing!",{"type":49,"tag":131,"props":1226,"children":1227},{"style":172},[1228],{"type":55,"value":326},{"type":49,"tag":131,"props":1230,"children":1231},{"style":218},[1232],{"type":55,"value":400},{"type":49,"tag":131,"props":1234,"children":1235},{"style":172},[1236],{"type":55,"value":331},{"type":49,"tag":1127,"props":1238,"children":1240},{"id":1239},"named-entity-recognition-ner",[1241],{"type":55,"value":1242},"Named Entity Recognition (NER)",{"type":49,"tag":119,"props":1244,"children":1246},{"className":161,"code":1245,"language":23,"meta":124,"style":124},"const ner = await pipeline('token-classification');\nconst entities = await ner('My name is John and I live in New York.');\n",[1247],{"type":49,"tag":127,"props":1248,"children":1249},{"__ignoreMap":124},[1250,1299],{"type":49,"tag":131,"props":1251,"children":1252},{"class":133,"line":134},[1253,1257,1262,1266,1270,1274,1278,1282,1287,1291,1295],{"type":49,"tag":131,"props":1254,"children":1255},{"style":184},[1256],{"type":55,"value":358},{"type":49,"tag":131,"props":1258,"children":1259},{"style":218},[1260],{"type":55,"value":1261}," ner ",{"type":49,"tag":131,"props":1263,"children":1264},{"style":172},[1265],{"type":55,"value":192},{"type":49,"tag":131,"props":1267,"children":1268},{"style":288},[1269],{"type":55,"value":372},{"type":49,"tag":131,"props":1271,"children":1272},{"style":375},[1273],{"type":55,"value":301},{"type":49,"tag":131,"props":1275,"children":1276},{"style":218},[1277],{"type":55,"value":382},{"type":49,"tag":131,"props":1279,"children":1280},{"style":172},[1281],{"type":55,"value":326},{"type":49,"tag":131,"props":1283,"children":1284},{"style":144},[1285],{"type":55,"value":1286},"token-classification",{"type":49,"tag":131,"props":1288,"children":1289},{"style":172},[1290],{"type":55,"value":326},{"type":49,"tag":131,"props":1292,"children":1293},{"style":218},[1294],{"type":55,"value":400},{"type":49,"tag":131,"props":1296,"children":1297},{"style":172},[1298],{"type":55,"value":331},{"type":49,"tag":131,"props":1300,"children":1301},{"class":133,"line":214},[1302,1306,1311,1315,1319,1324,1328,1332,1337,1341,1345],{"type":49,"tag":131,"props":1303,"children":1304},{"style":184},[1305],{"type":55,"value":358},{"type":49,"tag":131,"props":1307,"children":1308},{"style":218},[1309],{"type":55,"value":1310}," entities ",{"type":49,"tag":131,"props":1312,"children":1313},{"style":172},[1314],{"type":55,"value":192},{"type":49,"tag":131,"props":1316,"children":1317},{"style":288},[1318],{"type":55,"value":372},{"type":49,"tag":131,"props":1320,"children":1321},{"style":375},[1322],{"type":55,"value":1323}," ner",{"type":49,"tag":131,"props":1325,"children":1326},{"style":218},[1327],{"type":55,"value":382},{"type":49,"tag":131,"props":1329,"children":1330},{"style":172},[1331],{"type":55,"value":326},{"type":49,"tag":131,"props":1333,"children":1334},{"style":144},[1335],{"type":55,"value":1336},"My name is John and I live in New York.",{"type":49,"tag":131,"props":1338,"children":1339},{"style":172},[1340],{"type":55,"value":326},{"type":49,"tag":131,"props":1342,"children":1343},{"style":218},[1344],{"type":55,"value":400},{"type":49,"tag":131,"props":1346,"children":1347},{"style":172},[1348],{"type":55,"value":331},{"type":49,"tag":1127,"props":1350,"children":1352},{"id":1351},"question-answering",[1353],{"type":55,"value":1354},"Question Answering",{"type":49,"tag":119,"props":1356,"children":1358},{"className":161,"code":1357,"language":23,"meta":124,"style":124},"const qa = await pipeline('question-answering');\nconst answer = await qa({\n  question: 'What is the capital of France?',\n  context: 'Paris is the capital and largest city of France.'\n});\n",[1359],{"type":49,"tag":127,"props":1360,"children":1361},{"__ignoreMap":124},[1362,1410,1444,1473,1498],{"type":49,"tag":131,"props":1363,"children":1364},{"class":133,"line":134},[1365,1369,1374,1378,1382,1386,1390,1394,1398,1402,1406],{"type":49,"tag":131,"props":1366,"children":1367},{"style":184},[1368],{"type":55,"value":358},{"type":49,"tag":131,"props":1370,"children":1371},{"style":218},[1372],{"type":55,"value":1373}," qa ",{"type":49,"tag":131,"props":1375,"children":1376},{"style":172},[1377],{"type":55,"value":192},{"type":49,"tag":131,"props":1379,"children":1380},{"style":288},[1381],{"type":55,"value":372},{"type":49,"tag":131,"props":1383,"children":1384},{"style":375},[1385],{"type":55,"value":301},{"type":49,"tag":131,"props":1387,"children":1388},{"style":218},[1389],{"type":55,"value":382},{"type":49,"tag":131,"props":1391,"children":1392},{"style":172},[1393],{"type":55,"value":326},{"type":49,"tag":131,"props":1395,"children":1396},{"style":144},[1397],{"type":55,"value":1351},{"type":49,"tag":131,"props":1399,"children":1400},{"style":172},[1401],{"type":55,"value":326},{"type":49,"tag":131,"props":1403,"children":1404},{"style":218},[1405],{"type":55,"value":400},{"type":49,"tag":131,"props":1407,"children":1408},{"style":172},[1409],{"type":55,"value":331},{"type":49,"tag":131,"props":1411,"children":1412},{"class":133,"line":214},[1413,1417,1422,1426,1430,1435,1439],{"type":49,"tag":131,"props":1414,"children":1415},{"style":184},[1416],{"type":55,"value":358},{"type":49,"tag":131,"props":1418,"children":1419},{"style":218},[1420],{"type":55,"value":1421}," answer ",{"type":49,"tag":131,"props":1423,"children":1424},{"style":172},[1425],{"type":55,"value":192},{"type":49,"tag":131,"props":1427,"children":1428},{"style":288},[1429],{"type":55,"value":372},{"type":49,"tag":131,"props":1431,"children":1432},{"style":375},[1433],{"type":55,"value":1434}," qa",{"type":49,"tag":131,"props":1436,"children":1437},{"style":218},[1438],{"type":55,"value":382},{"type":49,"tag":131,"props":1440,"children":1441},{"style":172},[1442],{"type":55,"value":1443},"{\n",{"type":49,"tag":131,"props":1445,"children":1446},{"class":133,"line":244},[1447,1452,1456,1460,1465,1469],{"type":49,"tag":131,"props":1448,"children":1449},{"style":178},[1450],{"type":55,"value":1451},"  question",{"type":49,"tag":131,"props":1453,"children":1454},{"style":172},[1455],{"type":55,"value":933},{"type":49,"tag":131,"props":1457,"children":1458},{"style":172},[1459],{"type":55,"value":316},{"type":49,"tag":131,"props":1461,"children":1462},{"style":144},[1463],{"type":55,"value":1464},"What is the capital of France?",{"type":49,"tag":131,"props":1466,"children":1467},{"style":172},[1468],{"type":55,"value":326},{"type":49,"tag":131,"props":1470,"children":1471},{"style":172},[1472],{"type":55,"value":625},{"type":49,"tag":131,"props":1474,"children":1475},{"class":133,"line":352},[1476,1481,1485,1489,1494],{"type":49,"tag":131,"props":1477,"children":1478},{"style":178},[1479],{"type":55,"value":1480},"  context",{"type":49,"tag":131,"props":1482,"children":1483},{"style":172},[1484],{"type":55,"value":933},{"type":49,"tag":131,"props":1486,"children":1487},{"style":172},[1488],{"type":55,"value":316},{"type":49,"tag":131,"props":1490,"children":1491},{"style":144},[1492],{"type":55,"value":1493},"Paris is the capital and largest city of France.",{"type":49,"tag":131,"props":1495,"children":1496},{"style":172},[1497],{"type":55,"value":642},{"type":49,"tag":131,"props":1499,"children":1500},{"class":133,"line":407},[1501,1505,1509],{"type":49,"tag":131,"props":1502,"children":1503},{"style":172},[1504],{"type":55,"value":236},{"type":49,"tag":131,"props":1506,"children":1507},{"style":218},[1508],{"type":55,"value":400},{"type":49,"tag":131,"props":1510,"children":1511},{"style":172},[1512],{"type":55,"value":331},{"type":49,"tag":1127,"props":1514,"children":1516},{"id":1515},"text-generation",[1517],{"type":55,"value":1518},"Text Generation",{"type":49,"tag":119,"props":1520,"children":1522},{"className":161,"code":1521,"language":23,"meta":124,"style":124},"const generator = await pipeline('text-generation', 'onnx-community\u002Fgemma-3-270m-it-ONNX');\nconst text = await generator('Once upon a time', {\n  max_new_tokens: 100,\n  temperature: 0.7\n});\n",[1523],{"type":49,"tag":127,"props":1524,"children":1525},{"__ignoreMap":124},[1526,1591,1641,1663,1680],{"type":49,"tag":131,"props":1527,"children":1528},{"class":133,"line":134},[1529,1533,1538,1542,1546,1550,1554,1558,1562,1566,1570,1574,1579,1583,1587],{"type":49,"tag":131,"props":1530,"children":1531},{"style":184},[1532],{"type":55,"value":358},{"type":49,"tag":131,"props":1534,"children":1535},{"style":218},[1536],{"type":55,"value":1537}," generator ",{"type":49,"tag":131,"props":1539,"children":1540},{"style":172},[1541],{"type":55,"value":192},{"type":49,"tag":131,"props":1543,"children":1544},{"style":288},[1545],{"type":55,"value":372},{"type":49,"tag":131,"props":1547,"children":1548},{"style":375},[1549],{"type":55,"value":301},{"type":49,"tag":131,"props":1551,"children":1552},{"style":218},[1553],{"type":55,"value":382},{"type":49,"tag":131,"props":1555,"children":1556},{"style":172},[1557],{"type":55,"value":326},{"type":49,"tag":131,"props":1559,"children":1560},{"style":144},[1561],{"type":55,"value":1515},{"type":49,"tag":131,"props":1563,"children":1564},{"style":172},[1565],{"type":55,"value":326},{"type":49,"tag":131,"props":1567,"children":1568},{"style":172},[1569],{"type":55,"value":820},{"type":49,"tag":131,"props":1571,"children":1572},{"style":172},[1573],{"type":55,"value":316},{"type":49,"tag":131,"props":1575,"children":1576},{"style":144},[1577],{"type":55,"value":1578},"onnx-community\u002Fgemma-3-270m-it-ONNX",{"type":49,"tag":131,"props":1580,"children":1581},{"style":172},[1582],{"type":55,"value":326},{"type":49,"tag":131,"props":1584,"children":1585},{"style":218},[1586],{"type":55,"value":400},{"type":49,"tag":131,"props":1588,"children":1589},{"style":172},[1590],{"type":55,"value":331},{"type":49,"tag":131,"props":1592,"children":1593},{"class":133,"line":214},[1594,1598,1603,1607,1611,1616,1620,1624,1629,1633,1637],{"type":49,"tag":131,"props":1595,"children":1596},{"style":184},[1597],{"type":55,"value":358},{"type":49,"tag":131,"props":1599,"children":1600},{"style":218},[1601],{"type":55,"value":1602}," text ",{"type":49,"tag":131,"props":1604,"children":1605},{"style":172},[1606],{"type":55,"value":192},{"type":49,"tag":131,"props":1608,"children":1609},{"style":288},[1610],{"type":55,"value":372},{"type":49,"tag":131,"props":1612,"children":1613},{"style":375},[1614],{"type":55,"value":1615}," generator",{"type":49,"tag":131,"props":1617,"children":1618},{"style":218},[1619],{"type":55,"value":382},{"type":49,"tag":131,"props":1621,"children":1622},{"style":172},[1623],{"type":55,"value":326},{"type":49,"tag":131,"props":1625,"children":1626},{"style":144},[1627],{"type":55,"value":1628},"Once upon a time",{"type":49,"tag":131,"props":1630,"children":1631},{"style":172},[1632],{"type":55,"value":326},{"type":49,"tag":131,"props":1634,"children":1635},{"style":172},[1636],{"type":55,"value":820},{"type":49,"tag":131,"props":1638,"children":1639},{"style":172},[1640],{"type":55,"value":920},{"type":49,"tag":131,"props":1642,"children":1643},{"class":133,"line":244},[1644,1649,1653,1659],{"type":49,"tag":131,"props":1645,"children":1646},{"style":178},[1647],{"type":55,"value":1648},"  max_new_tokens",{"type":49,"tag":131,"props":1650,"children":1651},{"style":172},[1652],{"type":55,"value":933},{"type":49,"tag":131,"props":1654,"children":1656},{"style":1655},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1657],{"type":55,"value":1658}," 100",{"type":49,"tag":131,"props":1660,"children":1661},{"style":172},[1662],{"type":55,"value":625},{"type":49,"tag":131,"props":1664,"children":1665},{"class":133,"line":352},[1666,1671,1675],{"type":49,"tag":131,"props":1667,"children":1668},{"style":178},[1669],{"type":55,"value":1670},"  temperature",{"type":49,"tag":131,"props":1672,"children":1673},{"style":172},[1674],{"type":55,"value":933},{"type":49,"tag":131,"props":1676,"children":1677},{"style":1655},[1678],{"type":55,"value":1679}," 0.7\n",{"type":49,"tag":131,"props":1681,"children":1682},{"class":133,"line":407},[1683,1687,1691],{"type":49,"tag":131,"props":1684,"children":1685},{"style":172},[1686],{"type":55,"value":236},{"type":49,"tag":131,"props":1688,"children":1689},{"style":218},[1690],{"type":55,"value":400},{"type":49,"tag":131,"props":1692,"children":1693},{"style":172},[1694],{"type":55,"value":331},{"type":49,"tag":58,"props":1696,"children":1697},{},[1698,1703,1705,1714],{"type":49,"tag":535,"props":1699,"children":1700},{},[1701],{"type":55,"value":1702},"For streaming and chat:",{"type":55,"value":1704}," See ",{"type":49,"tag":535,"props":1706,"children":1707},{},[1708],{"type":49,"tag":551,"props":1709,"children":1711},{"href":1710},".\u002Freferences\u002FTEXT_GENERATION.md",[1712],{"type":55,"value":1713},"Text Generation Guide",{"type":55,"value":1715}," for:",{"type":49,"tag":76,"props":1717,"children":1718},{},[1719,1730,1735,1740,1745],{"type":49,"tag":80,"props":1720,"children":1721},{},[1722,1724],{"type":55,"value":1723},"Streaming token-by-token output with ",{"type":49,"tag":127,"props":1725,"children":1727},{"className":1726},[],[1728],{"type":55,"value":1729},"TextStreamer",{"type":49,"tag":80,"props":1731,"children":1732},{},[1733],{"type":55,"value":1734},"Chat\u002Fconversation format with system\u002Fuser\u002Fassistant roles",{"type":49,"tag":80,"props":1736,"children":1737},{},[1738],{"type":55,"value":1739},"Generation parameters (temperature, top_k, top_p)",{"type":49,"tag":80,"props":1741,"children":1742},{},[1743],{"type":55,"value":1744},"Browser and Node.js examples",{"type":49,"tag":80,"props":1746,"children":1747},{},[1748],{"type":55,"value":1749},"React components and API endpoints",{"type":49,"tag":1127,"props":1751,"children":1753},{"id":1752},"translation",[1754],{"type":55,"value":1755},"Translation",{"type":49,"tag":119,"props":1757,"children":1759},{"className":161,"code":1758,"language":23,"meta":124,"style":124},"const translator = await pipeline('translation', 'Xenova\u002Fnllb-200-distilled-600M');\nconst output = await translator('Hello, how are you?', {\n  src_lang: 'eng_Latn',\n  tgt_lang: 'fra_Latn'\n});\n",[1760],{"type":49,"tag":127,"props":1761,"children":1762},{"__ignoreMap":124},[1763,1828,1878,1907,1932],{"type":49,"tag":131,"props":1764,"children":1765},{"class":133,"line":134},[1766,1770,1775,1779,1783,1787,1791,1795,1799,1803,1807,1811,1816,1820,1824],{"type":49,"tag":131,"props":1767,"children":1768},{"style":184},[1769],{"type":55,"value":358},{"type":49,"tag":131,"props":1771,"children":1772},{"style":218},[1773],{"type":55,"value":1774}," translator ",{"type":49,"tag":131,"props":1776,"children":1777},{"style":172},[1778],{"type":55,"value":192},{"type":49,"tag":131,"props":1780,"children":1781},{"style":288},[1782],{"type":55,"value":372},{"type":49,"tag":131,"props":1784,"children":1785},{"style":375},[1786],{"type":55,"value":301},{"type":49,"tag":131,"props":1788,"children":1789},{"style":218},[1790],{"type":55,"value":382},{"type":49,"tag":131,"props":1792,"children":1793},{"style":172},[1794],{"type":55,"value":326},{"type":49,"tag":131,"props":1796,"children":1797},{"style":144},[1798],{"type":55,"value":1752},{"type":49,"tag":131,"props":1800,"children":1801},{"style":172},[1802],{"type":55,"value":326},{"type":49,"tag":131,"props":1804,"children":1805},{"style":172},[1806],{"type":55,"value":820},{"type":49,"tag":131,"props":1808,"children":1809},{"style":172},[1810],{"type":55,"value":316},{"type":49,"tag":131,"props":1812,"children":1813},{"style":144},[1814],{"type":55,"value":1815},"Xenova\u002Fnllb-200-distilled-600M",{"type":49,"tag":131,"props":1817,"children":1818},{"style":172},[1819],{"type":55,"value":326},{"type":49,"tag":131,"props":1821,"children":1822},{"style":218},[1823],{"type":55,"value":400},{"type":49,"tag":131,"props":1825,"children":1826},{"style":172},[1827],{"type":55,"value":331},{"type":49,"tag":131,"props":1829,"children":1830},{"class":133,"line":214},[1831,1835,1840,1844,1848,1853,1857,1861,1866,1870,1874],{"type":49,"tag":131,"props":1832,"children":1833},{"style":184},[1834],{"type":55,"value":358},{"type":49,"tag":131,"props":1836,"children":1837},{"style":218},[1838],{"type":55,"value":1839}," output ",{"type":49,"tag":131,"props":1841,"children":1842},{"style":172},[1843],{"type":55,"value":192},{"type":49,"tag":131,"props":1845,"children":1846},{"style":288},[1847],{"type":55,"value":372},{"type":49,"tag":131,"props":1849,"children":1850},{"style":375},[1851],{"type":55,"value":1852}," translator",{"type":49,"tag":131,"props":1854,"children":1855},{"style":218},[1856],{"type":55,"value":382},{"type":49,"tag":131,"props":1858,"children":1859},{"style":172},[1860],{"type":55,"value":326},{"type":49,"tag":131,"props":1862,"children":1863},{"style":144},[1864],{"type":55,"value":1865},"Hello, how are you?",{"type":49,"tag":131,"props":1867,"children":1868},{"style":172},[1869],{"type":55,"value":326},{"type":49,"tag":131,"props":1871,"children":1872},{"style":172},[1873],{"type":55,"value":820},{"type":49,"tag":131,"props":1875,"children":1876},{"style":172},[1877],{"type":55,"value":920},{"type":49,"tag":131,"props":1879,"children":1880},{"class":133,"line":244},[1881,1886,1890,1894,1899,1903],{"type":49,"tag":131,"props":1882,"children":1883},{"style":178},[1884],{"type":55,"value":1885},"  src_lang",{"type":49,"tag":131,"props":1887,"children":1888},{"style":172},[1889],{"type":55,"value":933},{"type":49,"tag":131,"props":1891,"children":1892},{"style":172},[1893],{"type":55,"value":316},{"type":49,"tag":131,"props":1895,"children":1896},{"style":144},[1897],{"type":55,"value":1898},"eng_Latn",{"type":49,"tag":131,"props":1900,"children":1901},{"style":172},[1902],{"type":55,"value":326},{"type":49,"tag":131,"props":1904,"children":1905},{"style":172},[1906],{"type":55,"value":625},{"type":49,"tag":131,"props":1908,"children":1909},{"class":133,"line":352},[1910,1915,1919,1923,1928],{"type":49,"tag":131,"props":1911,"children":1912},{"style":178},[1913],{"type":55,"value":1914},"  tgt_lang",{"type":49,"tag":131,"props":1916,"children":1917},{"style":172},[1918],{"type":55,"value":933},{"type":49,"tag":131,"props":1920,"children":1921},{"style":172},[1922],{"type":55,"value":316},{"type":49,"tag":131,"props":1924,"children":1925},{"style":144},[1926],{"type":55,"value":1927},"fra_Latn",{"type":49,"tag":131,"props":1929,"children":1930},{"style":172},[1931],{"type":55,"value":642},{"type":49,"tag":131,"props":1933,"children":1934},{"class":133,"line":407},[1935,1939,1943],{"type":49,"tag":131,"props":1936,"children":1937},{"style":172},[1938],{"type":55,"value":236},{"type":49,"tag":131,"props":1940,"children":1941},{"style":218},[1942],{"type":55,"value":400},{"type":49,"tag":131,"props":1944,"children":1945},{"style":172},[1946],{"type":55,"value":331},{"type":49,"tag":1127,"props":1948,"children":1950},{"id":1949},"summarization",[1951],{"type":55,"value":1952},"Summarization",{"type":49,"tag":119,"props":1954,"children":1956},{"className":161,"code":1955,"language":23,"meta":124,"style":124},"const summarizer = await pipeline('summarization');\nconst summary = await summarizer(longText, {\n  max_length: 100,\n  min_length: 30\n});\n",[1957],{"type":49,"tag":127,"props":1958,"children":1959},{"__ignoreMap":124},[1960,2008,2046,2066,2083],{"type":49,"tag":131,"props":1961,"children":1962},{"class":133,"line":134},[1963,1967,1972,1976,1980,1984,1988,1992,1996,2000,2004],{"type":49,"tag":131,"props":1964,"children":1965},{"style":184},[1966],{"type":55,"value":358},{"type":49,"tag":131,"props":1968,"children":1969},{"style":218},[1970],{"type":55,"value":1971}," summarizer ",{"type":49,"tag":131,"props":1973,"children":1974},{"style":172},[1975],{"type":55,"value":192},{"type":49,"tag":131,"props":1977,"children":1978},{"style":288},[1979],{"type":55,"value":372},{"type":49,"tag":131,"props":1981,"children":1982},{"style":375},[1983],{"type":55,"value":301},{"type":49,"tag":131,"props":1985,"children":1986},{"style":218},[1987],{"type":55,"value":382},{"type":49,"tag":131,"props":1989,"children":1990},{"style":172},[1991],{"type":55,"value":326},{"type":49,"tag":131,"props":1993,"children":1994},{"style":144},[1995],{"type":55,"value":1949},{"type":49,"tag":131,"props":1997,"children":1998},{"style":172},[1999],{"type":55,"value":326},{"type":49,"tag":131,"props":2001,"children":2002},{"style":218},[2003],{"type":55,"value":400},{"type":49,"tag":131,"props":2005,"children":2006},{"style":172},[2007],{"type":55,"value":331},{"type":49,"tag":131,"props":2009,"children":2010},{"class":133,"line":214},[2011,2015,2020,2024,2028,2033,2038,2042],{"type":49,"tag":131,"props":2012,"children":2013},{"style":184},[2014],{"type":55,"value":358},{"type":49,"tag":131,"props":2016,"children":2017},{"style":218},[2018],{"type":55,"value":2019}," summary ",{"type":49,"tag":131,"props":2021,"children":2022},{"style":172},[2023],{"type":55,"value":192},{"type":49,"tag":131,"props":2025,"children":2026},{"style":288},[2027],{"type":55,"value":372},{"type":49,"tag":131,"props":2029,"children":2030},{"style":375},[2031],{"type":55,"value":2032}," summarizer",{"type":49,"tag":131,"props":2034,"children":2035},{"style":218},[2036],{"type":55,"value":2037},"(longText",{"type":49,"tag":131,"props":2039,"children":2040},{"style":172},[2041],{"type":55,"value":820},{"type":49,"tag":131,"props":2043,"children":2044},{"style":172},[2045],{"type":55,"value":920},{"type":49,"tag":131,"props":2047,"children":2048},{"class":133,"line":244},[2049,2054,2058,2062],{"type":49,"tag":131,"props":2050,"children":2051},{"style":178},[2052],{"type":55,"value":2053},"  max_length",{"type":49,"tag":131,"props":2055,"children":2056},{"style":172},[2057],{"type":55,"value":933},{"type":49,"tag":131,"props":2059,"children":2060},{"style":1655},[2061],{"type":55,"value":1658},{"type":49,"tag":131,"props":2063,"children":2064},{"style":172},[2065],{"type":55,"value":625},{"type":49,"tag":131,"props":2067,"children":2068},{"class":133,"line":352},[2069,2074,2078],{"type":49,"tag":131,"props":2070,"children":2071},{"style":178},[2072],{"type":55,"value":2073},"  min_length",{"type":49,"tag":131,"props":2075,"children":2076},{"style":172},[2077],{"type":55,"value":933},{"type":49,"tag":131,"props":2079,"children":2080},{"style":1655},[2081],{"type":55,"value":2082}," 30\n",{"type":49,"tag":131,"props":2084,"children":2085},{"class":133,"line":407},[2086,2090,2094],{"type":49,"tag":131,"props":2087,"children":2088},{"style":172},[2089],{"type":55,"value":236},{"type":49,"tag":131,"props":2091,"children":2092},{"style":218},[2093],{"type":55,"value":400},{"type":49,"tag":131,"props":2095,"children":2096},{"style":172},[2097],{"type":55,"value":331},{"type":49,"tag":1127,"props":2099,"children":2101},{"id":2100},"zero-shot-classification",[2102],{"type":55,"value":2103},"Zero-Shot Classification",{"type":49,"tag":119,"props":2105,"children":2107},{"className":161,"code":2106,"language":23,"meta":124,"style":124},"const classifier = await pipeline('zero-shot-classification');\nconst result = await classifier('This is a story about sports.', ['politics', 'sports', 'technology']);\n",[2108],{"type":49,"tag":127,"props":2109,"children":2110},{"__ignoreMap":124},[2111,2158],{"type":49,"tag":131,"props":2112,"children":2113},{"class":133,"line":134},[2114,2118,2122,2126,2130,2134,2138,2142,2146,2150,2154],{"type":49,"tag":131,"props":2115,"children":2116},{"style":184},[2117],{"type":55,"value":358},{"type":49,"tag":131,"props":2119,"children":2120},{"style":218},[2121],{"type":55,"value":1151},{"type":49,"tag":131,"props":2123,"children":2124},{"style":172},[2125],{"type":55,"value":192},{"type":49,"tag":131,"props":2127,"children":2128},{"style":288},[2129],{"type":55,"value":372},{"type":49,"tag":131,"props":2131,"children":2132},{"style":375},[2133],{"type":55,"value":301},{"type":49,"tag":131,"props":2135,"children":2136},{"style":218},[2137],{"type":55,"value":382},{"type":49,"tag":131,"props":2139,"children":2140},{"style":172},[2141],{"type":55,"value":326},{"type":49,"tag":131,"props":2143,"children":2144},{"style":144},[2145],{"type":55,"value":2100},{"type":49,"tag":131,"props":2147,"children":2148},{"style":172},[2149],{"type":55,"value":326},{"type":49,"tag":131,"props":2151,"children":2152},{"style":218},[2153],{"type":55,"value":400},{"type":49,"tag":131,"props":2155,"children":2156},{"style":172},[2157],{"type":55,"value":331},{"type":49,"tag":131,"props":2159,"children":2160},{"class":133,"line":214},[2161,2165,2169,2173,2177,2181,2185,2189,2194,2198,2202,2207,2211,2216,2220,2224,2228,2233,2237,2241,2245,2250,2254,2259],{"type":49,"tag":131,"props":2162,"children":2163},{"style":184},[2164],{"type":55,"value":358},{"type":49,"tag":131,"props":2166,"children":2167},{"style":218},[2168],{"type":55,"value":434},{"type":49,"tag":131,"props":2170,"children":2171},{"style":172},[2172],{"type":55,"value":192},{"type":49,"tag":131,"props":2174,"children":2175},{"style":288},[2176],{"type":55,"value":372},{"type":49,"tag":131,"props":2178,"children":2179},{"style":375},[2180],{"type":55,"value":1211},{"type":49,"tag":131,"props":2182,"children":2183},{"style":218},[2184],{"type":55,"value":382},{"type":49,"tag":131,"props":2186,"children":2187},{"style":172},[2188],{"type":55,"value":326},{"type":49,"tag":131,"props":2190,"children":2191},{"style":144},[2192],{"type":55,"value":2193},"This is a story about sports.",{"type":49,"tag":131,"props":2195,"children":2196},{"style":172},[2197],{"type":55,"value":326},{"type":49,"tag":131,"props":2199,"children":2200},{"style":172},[2201],{"type":55,"value":820},{"type":49,"tag":131,"props":2203,"children":2204},{"style":218},[2205],{"type":55,"value":2206}," [",{"type":49,"tag":131,"props":2208,"children":2209},{"style":172},[2210],{"type":55,"value":326},{"type":49,"tag":131,"props":2212,"children":2213},{"style":144},[2214],{"type":55,"value":2215},"politics",{"type":49,"tag":131,"props":2217,"children":2218},{"style":172},[2219],{"type":55,"value":326},{"type":49,"tag":131,"props":2221,"children":2222},{"style":172},[2223],{"type":55,"value":820},{"type":49,"tag":131,"props":2225,"children":2226},{"style":172},[2227],{"type":55,"value":316},{"type":49,"tag":131,"props":2229,"children":2230},{"style":144},[2231],{"type":55,"value":2232},"sports",{"type":49,"tag":131,"props":2234,"children":2235},{"style":172},[2236],{"type":55,"value":326},{"type":49,"tag":131,"props":2238,"children":2239},{"style":172},[2240],{"type":55,"value":820},{"type":49,"tag":131,"props":2242,"children":2243},{"style":172},[2244],{"type":55,"value":316},{"type":49,"tag":131,"props":2246,"children":2247},{"style":144},[2248],{"type":55,"value":2249},"technology",{"type":49,"tag":131,"props":2251,"children":2252},{"style":172},[2253],{"type":55,"value":326},{"type":49,"tag":131,"props":2255,"children":2256},{"style":218},[2257],{"type":55,"value":2258},"])",{"type":49,"tag":131,"props":2260,"children":2261},{"style":172},[2262],{"type":55,"value":331},{"type":49,"tag":112,"props":2264,"children":2265},{"id":26},[2266],{"type":55,"value":25},{"type":49,"tag":1127,"props":2268,"children":2270},{"id":2269},"image-classification",[2271],{"type":55,"value":2272},"Image Classification",{"type":49,"tag":119,"props":2274,"children":2276},{"className":161,"code":2275,"language":23,"meta":124,"style":124},"const classifier = await pipeline('image-classification');\nconst result = await classifier('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n\u002F\u002F Or with local file\nconst result = await classifier(imageUrl);\n",[2277],{"type":49,"tag":127,"props":2278,"children":2279},{"__ignoreMap":124},[2280,2327,2375,2383],{"type":49,"tag":131,"props":2281,"children":2282},{"class":133,"line":134},[2283,2287,2291,2295,2299,2303,2307,2311,2315,2319,2323],{"type":49,"tag":131,"props":2284,"children":2285},{"style":184},[2286],{"type":55,"value":358},{"type":49,"tag":131,"props":2288,"children":2289},{"style":218},[2290],{"type":55,"value":1151},{"type":49,"tag":131,"props":2292,"children":2293},{"style":172},[2294],{"type":55,"value":192},{"type":49,"tag":131,"props":2296,"children":2297},{"style":288},[2298],{"type":55,"value":372},{"type":49,"tag":131,"props":2300,"children":2301},{"style":375},[2302],{"type":55,"value":301},{"type":49,"tag":131,"props":2304,"children":2305},{"style":218},[2306],{"type":55,"value":382},{"type":49,"tag":131,"props":2308,"children":2309},{"style":172},[2310],{"type":55,"value":326},{"type":49,"tag":131,"props":2312,"children":2313},{"style":144},[2314],{"type":55,"value":2269},{"type":49,"tag":131,"props":2316,"children":2317},{"style":172},[2318],{"type":55,"value":326},{"type":49,"tag":131,"props":2320,"children":2321},{"style":218},[2322],{"type":55,"value":400},{"type":49,"tag":131,"props":2324,"children":2325},{"style":172},[2326],{"type":55,"value":331},{"type":49,"tag":131,"props":2328,"children":2329},{"class":133,"line":214},[2330,2334,2338,2342,2346,2350,2354,2358,2363,2367,2371],{"type":49,"tag":131,"props":2331,"children":2332},{"style":184},[2333],{"type":55,"value":358},{"type":49,"tag":131,"props":2335,"children":2336},{"style":218},[2337],{"type":55,"value":434},{"type":49,"tag":131,"props":2339,"children":2340},{"style":172},[2341],{"type":55,"value":192},{"type":49,"tag":131,"props":2343,"children":2344},{"style":288},[2345],{"type":55,"value":372},{"type":49,"tag":131,"props":2347,"children":2348},{"style":375},[2349],{"type":55,"value":1211},{"type":49,"tag":131,"props":2351,"children":2352},{"style":218},[2353],{"type":55,"value":382},{"type":49,"tag":131,"props":2355,"children":2356},{"style":172},[2357],{"type":55,"value":326},{"type":49,"tag":131,"props":2359,"children":2360},{"style":144},[2361],{"type":55,"value":2362},"https:\u002F\u002Fexample.com\u002Fimage.jpg",{"type":49,"tag":131,"props":2364,"children":2365},{"style":172},[2366],{"type":55,"value":326},{"type":49,"tag":131,"props":2368,"children":2369},{"style":218},[2370],{"type":55,"value":400},{"type":49,"tag":131,"props":2372,"children":2373},{"style":172},[2374],{"type":55,"value":331},{"type":49,"tag":131,"props":2376,"children":2377},{"class":133,"line":244},[2378],{"type":49,"tag":131,"props":2379,"children":2380},{"style":346},[2381],{"type":55,"value":2382},"\u002F\u002F Or with local file\n",{"type":49,"tag":131,"props":2384,"children":2385},{"class":133,"line":352},[2386,2390,2394,2398,2402,2406,2411],{"type":49,"tag":131,"props":2387,"children":2388},{"style":184},[2389],{"type":55,"value":358},{"type":49,"tag":131,"props":2391,"children":2392},{"style":218},[2393],{"type":55,"value":434},{"type":49,"tag":131,"props":2395,"children":2396},{"style":172},[2397],{"type":55,"value":192},{"type":49,"tag":131,"props":2399,"children":2400},{"style":288},[2401],{"type":55,"value":372},{"type":49,"tag":131,"props":2403,"children":2404},{"style":375},[2405],{"type":55,"value":1211},{"type":49,"tag":131,"props":2407,"children":2408},{"style":218},[2409],{"type":55,"value":2410},"(imageUrl)",{"type":49,"tag":131,"props":2412,"children":2413},{"style":172},[2414],{"type":55,"value":331},{"type":49,"tag":1127,"props":2416,"children":2418},{"id":2417},"object-detection",[2419],{"type":55,"value":2420},"Object Detection",{"type":49,"tag":119,"props":2422,"children":2424},{"className":161,"code":2423,"language":23,"meta":124,"style":124},"const detector = await pipeline('object-detection');\nconst objects = await detector('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n\u002F\u002F Returns: [{ label: 'person', score: 0.95, box: { xmin, ymin, xmax, ymax } }, ...]\n",[2425],{"type":49,"tag":127,"props":2426,"children":2427},{"__ignoreMap":124},[2428,2476,2525],{"type":49,"tag":131,"props":2429,"children":2430},{"class":133,"line":134},[2431,2435,2440,2444,2448,2452,2456,2460,2464,2468,2472],{"type":49,"tag":131,"props":2432,"children":2433},{"style":184},[2434],{"type":55,"value":358},{"type":49,"tag":131,"props":2436,"children":2437},{"style":218},[2438],{"type":55,"value":2439}," detector ",{"type":49,"tag":131,"props":2441,"children":2442},{"style":172},[2443],{"type":55,"value":192},{"type":49,"tag":131,"props":2445,"children":2446},{"style":288},[2447],{"type":55,"value":372},{"type":49,"tag":131,"props":2449,"children":2450},{"style":375},[2451],{"type":55,"value":301},{"type":49,"tag":131,"props":2453,"children":2454},{"style":218},[2455],{"type":55,"value":382},{"type":49,"tag":131,"props":2457,"children":2458},{"style":172},[2459],{"type":55,"value":326},{"type":49,"tag":131,"props":2461,"children":2462},{"style":144},[2463],{"type":55,"value":2417},{"type":49,"tag":131,"props":2465,"children":2466},{"style":172},[2467],{"type":55,"value":326},{"type":49,"tag":131,"props":2469,"children":2470},{"style":218},[2471],{"type":55,"value":400},{"type":49,"tag":131,"props":2473,"children":2474},{"style":172},[2475],{"type":55,"value":331},{"type":49,"tag":131,"props":2477,"children":2478},{"class":133,"line":214},[2479,2483,2488,2492,2496,2501,2505,2509,2513,2517,2521],{"type":49,"tag":131,"props":2480,"children":2481},{"style":184},[2482],{"type":55,"value":358},{"type":49,"tag":131,"props":2484,"children":2485},{"style":218},[2486],{"type":55,"value":2487}," objects ",{"type":49,"tag":131,"props":2489,"children":2490},{"style":172},[2491],{"type":55,"value":192},{"type":49,"tag":131,"props":2493,"children":2494},{"style":288},[2495],{"type":55,"value":372},{"type":49,"tag":131,"props":2497,"children":2498},{"style":375},[2499],{"type":55,"value":2500}," detector",{"type":49,"tag":131,"props":2502,"children":2503},{"style":218},[2504],{"type":55,"value":382},{"type":49,"tag":131,"props":2506,"children":2507},{"style":172},[2508],{"type":55,"value":326},{"type":49,"tag":131,"props":2510,"children":2511},{"style":144},[2512],{"type":55,"value":2362},{"type":49,"tag":131,"props":2514,"children":2515},{"style":172},[2516],{"type":55,"value":326},{"type":49,"tag":131,"props":2518,"children":2519},{"style":218},[2520],{"type":55,"value":400},{"type":49,"tag":131,"props":2522,"children":2523},{"style":172},[2524],{"type":55,"value":331},{"type":49,"tag":131,"props":2526,"children":2527},{"class":133,"line":244},[2528],{"type":49,"tag":131,"props":2529,"children":2530},{"style":346},[2531],{"type":55,"value":2532},"\u002F\u002F Returns: [{ label: 'person', score: 0.95, box: { xmin, ymin, xmax, ymax } }, ...]\n",{"type":49,"tag":1127,"props":2534,"children":2536},{"id":2535},"image-segmentation",[2537],{"type":55,"value":2538},"Image Segmentation",{"type":49,"tag":119,"props":2540,"children":2542},{"className":161,"code":2541,"language":23,"meta":124,"style":124},"const segmenter = await pipeline('image-segmentation');\nconst segments = await segmenter('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n",[2543],{"type":49,"tag":127,"props":2544,"children":2545},{"__ignoreMap":124},[2546,2594],{"type":49,"tag":131,"props":2547,"children":2548},{"class":133,"line":134},[2549,2553,2558,2562,2566,2570,2574,2578,2582,2586,2590],{"type":49,"tag":131,"props":2550,"children":2551},{"style":184},[2552],{"type":55,"value":358},{"type":49,"tag":131,"props":2554,"children":2555},{"style":218},[2556],{"type":55,"value":2557}," segmenter ",{"type":49,"tag":131,"props":2559,"children":2560},{"style":172},[2561],{"type":55,"value":192},{"type":49,"tag":131,"props":2563,"children":2564},{"style":288},[2565],{"type":55,"value":372},{"type":49,"tag":131,"props":2567,"children":2568},{"style":375},[2569],{"type":55,"value":301},{"type":49,"tag":131,"props":2571,"children":2572},{"style":218},[2573],{"type":55,"value":382},{"type":49,"tag":131,"props":2575,"children":2576},{"style":172},[2577],{"type":55,"value":326},{"type":49,"tag":131,"props":2579,"children":2580},{"style":144},[2581],{"type":55,"value":2535},{"type":49,"tag":131,"props":2583,"children":2584},{"style":172},[2585],{"type":55,"value":326},{"type":49,"tag":131,"props":2587,"children":2588},{"style":218},[2589],{"type":55,"value":400},{"type":49,"tag":131,"props":2591,"children":2592},{"style":172},[2593],{"type":55,"value":331},{"type":49,"tag":131,"props":2595,"children":2596},{"class":133,"line":214},[2597,2601,2606,2610,2614,2619,2623,2627,2631,2635,2639],{"type":49,"tag":131,"props":2598,"children":2599},{"style":184},[2600],{"type":55,"value":358},{"type":49,"tag":131,"props":2602,"children":2603},{"style":218},[2604],{"type":55,"value":2605}," segments ",{"type":49,"tag":131,"props":2607,"children":2608},{"style":172},[2609],{"type":55,"value":192},{"type":49,"tag":131,"props":2611,"children":2612},{"style":288},[2613],{"type":55,"value":372},{"type":49,"tag":131,"props":2615,"children":2616},{"style":375},[2617],{"type":55,"value":2618}," segmenter",{"type":49,"tag":131,"props":2620,"children":2621},{"style":218},[2622],{"type":55,"value":382},{"type":49,"tag":131,"props":2624,"children":2625},{"style":172},[2626],{"type":55,"value":326},{"type":49,"tag":131,"props":2628,"children":2629},{"style":144},[2630],{"type":55,"value":2362},{"type":49,"tag":131,"props":2632,"children":2633},{"style":172},[2634],{"type":55,"value":326},{"type":49,"tag":131,"props":2636,"children":2637},{"style":218},[2638],{"type":55,"value":400},{"type":49,"tag":131,"props":2640,"children":2641},{"style":172},[2642],{"type":55,"value":331},{"type":49,"tag":1127,"props":2644,"children":2646},{"id":2645},"depth-estimation",[2647],{"type":55,"value":2648},"Depth Estimation",{"type":49,"tag":119,"props":2650,"children":2652},{"className":161,"code":2651,"language":23,"meta":124,"style":124},"const depthEstimator = await pipeline('depth-estimation');\nconst depth = await depthEstimator('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n",[2653],{"type":49,"tag":127,"props":2654,"children":2655},{"__ignoreMap":124},[2656,2704],{"type":49,"tag":131,"props":2657,"children":2658},{"class":133,"line":134},[2659,2663,2668,2672,2676,2680,2684,2688,2692,2696,2700],{"type":49,"tag":131,"props":2660,"children":2661},{"style":184},[2662],{"type":55,"value":358},{"type":49,"tag":131,"props":2664,"children":2665},{"style":218},[2666],{"type":55,"value":2667}," depthEstimator ",{"type":49,"tag":131,"props":2669,"children":2670},{"style":172},[2671],{"type":55,"value":192},{"type":49,"tag":131,"props":2673,"children":2674},{"style":288},[2675],{"type":55,"value":372},{"type":49,"tag":131,"props":2677,"children":2678},{"style":375},[2679],{"type":55,"value":301},{"type":49,"tag":131,"props":2681,"children":2682},{"style":218},[2683],{"type":55,"value":382},{"type":49,"tag":131,"props":2685,"children":2686},{"style":172},[2687],{"type":55,"value":326},{"type":49,"tag":131,"props":2689,"children":2690},{"style":144},[2691],{"type":55,"value":2645},{"type":49,"tag":131,"props":2693,"children":2694},{"style":172},[2695],{"type":55,"value":326},{"type":49,"tag":131,"props":2697,"children":2698},{"style":218},[2699],{"type":55,"value":400},{"type":49,"tag":131,"props":2701,"children":2702},{"style":172},[2703],{"type":55,"value":331},{"type":49,"tag":131,"props":2705,"children":2706},{"class":133,"line":214},[2707,2711,2716,2720,2724,2729,2733,2737,2741,2745,2749],{"type":49,"tag":131,"props":2708,"children":2709},{"style":184},[2710],{"type":55,"value":358},{"type":49,"tag":131,"props":2712,"children":2713},{"style":218},[2714],{"type":55,"value":2715}," depth ",{"type":49,"tag":131,"props":2717,"children":2718},{"style":172},[2719],{"type":55,"value":192},{"type":49,"tag":131,"props":2721,"children":2722},{"style":288},[2723],{"type":55,"value":372},{"type":49,"tag":131,"props":2725,"children":2726},{"style":375},[2727],{"type":55,"value":2728}," depthEstimator",{"type":49,"tag":131,"props":2730,"children":2731},{"style":218},[2732],{"type":55,"value":382},{"type":49,"tag":131,"props":2734,"children":2735},{"style":172},[2736],{"type":55,"value":326},{"type":49,"tag":131,"props":2738,"children":2739},{"style":144},[2740],{"type":55,"value":2362},{"type":49,"tag":131,"props":2742,"children":2743},{"style":172},[2744],{"type":55,"value":326},{"type":49,"tag":131,"props":2746,"children":2747},{"style":218},[2748],{"type":55,"value":400},{"type":49,"tag":131,"props":2750,"children":2751},{"style":172},[2752],{"type":55,"value":331},{"type":49,"tag":1127,"props":2754,"children":2756},{"id":2755},"zero-shot-image-classification",[2757],{"type":55,"value":2758},"Zero-Shot Image Classification",{"type":49,"tag":119,"props":2760,"children":2762},{"className":161,"code":2761,"language":23,"meta":124,"style":124},"const classifier = await pipeline('zero-shot-image-classification');\nconst result = await classifier('image.jpg', ['cat', 'dog', 'bird']);\n",[2763],{"type":49,"tag":127,"props":2764,"children":2765},{"__ignoreMap":124},[2766,2813],{"type":49,"tag":131,"props":2767,"children":2768},{"class":133,"line":134},[2769,2773,2777,2781,2785,2789,2793,2797,2801,2805,2809],{"type":49,"tag":131,"props":2770,"children":2771},{"style":184},[2772],{"type":55,"value":358},{"type":49,"tag":131,"props":2774,"children":2775},{"style":218},[2776],{"type":55,"value":1151},{"type":49,"tag":131,"props":2778,"children":2779},{"style":172},[2780],{"type":55,"value":192},{"type":49,"tag":131,"props":2782,"children":2783},{"style":288},[2784],{"type":55,"value":372},{"type":49,"tag":131,"props":2786,"children":2787},{"style":375},[2788],{"type":55,"value":301},{"type":49,"tag":131,"props":2790,"children":2791},{"style":218},[2792],{"type":55,"value":382},{"type":49,"tag":131,"props":2794,"children":2795},{"style":172},[2796],{"type":55,"value":326},{"type":49,"tag":131,"props":2798,"children":2799},{"style":144},[2800],{"type":55,"value":2755},{"type":49,"tag":131,"props":2802,"children":2803},{"style":172},[2804],{"type":55,"value":326},{"type":49,"tag":131,"props":2806,"children":2807},{"style":218},[2808],{"type":55,"value":400},{"type":49,"tag":131,"props":2810,"children":2811},{"style":172},[2812],{"type":55,"value":331},{"type":49,"tag":131,"props":2814,"children":2815},{"class":133,"line":214},[2816,2820,2824,2828,2832,2836,2840,2844,2849,2853,2857,2861,2865,2870,2874,2878,2882,2887,2891,2895,2899,2904,2908,2912],{"type":49,"tag":131,"props":2817,"children":2818},{"style":184},[2819],{"type":55,"value":358},{"type":49,"tag":131,"props":2821,"children":2822},{"style":218},[2823],{"type":55,"value":434},{"type":49,"tag":131,"props":2825,"children":2826},{"style":172},[2827],{"type":55,"value":192},{"type":49,"tag":131,"props":2829,"children":2830},{"style":288},[2831],{"type":55,"value":372},{"type":49,"tag":131,"props":2833,"children":2834},{"style":375},[2835],{"type":55,"value":1211},{"type":49,"tag":131,"props":2837,"children":2838},{"style":218},[2839],{"type":55,"value":382},{"type":49,"tag":131,"props":2841,"children":2842},{"style":172},[2843],{"type":55,"value":326},{"type":49,"tag":131,"props":2845,"children":2846},{"style":144},[2847],{"type":55,"value":2848},"image.jpg",{"type":49,"tag":131,"props":2850,"children":2851},{"style":172},[2852],{"type":55,"value":326},{"type":49,"tag":131,"props":2854,"children":2855},{"style":172},[2856],{"type":55,"value":820},{"type":49,"tag":131,"props":2858,"children":2859},{"style":218},[2860],{"type":55,"value":2206},{"type":49,"tag":131,"props":2862,"children":2863},{"style":172},[2864],{"type":55,"value":326},{"type":49,"tag":131,"props":2866,"children":2867},{"style":144},[2868],{"type":55,"value":2869},"cat",{"type":49,"tag":131,"props":2871,"children":2872},{"style":172},[2873],{"type":55,"value":326},{"type":49,"tag":131,"props":2875,"children":2876},{"style":172},[2877],{"type":55,"value":820},{"type":49,"tag":131,"props":2879,"children":2880},{"style":172},[2881],{"type":55,"value":316},{"type":49,"tag":131,"props":2883,"children":2884},{"style":144},[2885],{"type":55,"value":2886},"dog",{"type":49,"tag":131,"props":2888,"children":2889},{"style":172},[2890],{"type":55,"value":326},{"type":49,"tag":131,"props":2892,"children":2893},{"style":172},[2894],{"type":55,"value":820},{"type":49,"tag":131,"props":2896,"children":2897},{"style":172},[2898],{"type":55,"value":316},{"type":49,"tag":131,"props":2900,"children":2901},{"style":144},[2902],{"type":55,"value":2903},"bird",{"type":49,"tag":131,"props":2905,"children":2906},{"style":172},[2907],{"type":55,"value":326},{"type":49,"tag":131,"props":2909,"children":2910},{"style":218},[2911],{"type":55,"value":2258},{"type":49,"tag":131,"props":2913,"children":2914},{"style":172},[2915],{"type":55,"value":331},{"type":49,"tag":112,"props":2917,"children":2919},{"id":2918},"audio-processing",[2920],{"type":55,"value":2921},"Audio Processing",{"type":49,"tag":1127,"props":2923,"children":2925},{"id":2924},"automatic-speech-recognition",[2926],{"type":55,"value":2927},"Automatic Speech Recognition",{"type":49,"tag":119,"props":2929,"children":2931},{"className":161,"code":2930,"language":23,"meta":124,"style":124},"const transcriber = await pipeline('automatic-speech-recognition');\nconst result = await transcriber('audio.wav');\n\u002F\u002F Returns: { text: 'transcribed text here' }\n",[2932],{"type":49,"tag":127,"props":2933,"children":2934},{"__ignoreMap":124},[2935,2983,3032],{"type":49,"tag":131,"props":2936,"children":2937},{"class":133,"line":134},[2938,2942,2947,2951,2955,2959,2963,2967,2971,2975,2979],{"type":49,"tag":131,"props":2939,"children":2940},{"style":184},[2941],{"type":55,"value":358},{"type":49,"tag":131,"props":2943,"children":2944},{"style":218},[2945],{"type":55,"value":2946}," transcriber ",{"type":49,"tag":131,"props":2948,"children":2949},{"style":172},[2950],{"type":55,"value":192},{"type":49,"tag":131,"props":2952,"children":2953},{"style":288},[2954],{"type":55,"value":372},{"type":49,"tag":131,"props":2956,"children":2957},{"style":375},[2958],{"type":55,"value":301},{"type":49,"tag":131,"props":2960,"children":2961},{"style":218},[2962],{"type":55,"value":382},{"type":49,"tag":131,"props":2964,"children":2965},{"style":172},[2966],{"type":55,"value":326},{"type":49,"tag":131,"props":2968,"children":2969},{"style":144},[2970],{"type":55,"value":2924},{"type":49,"tag":131,"props":2972,"children":2973},{"style":172},[2974],{"type":55,"value":326},{"type":49,"tag":131,"props":2976,"children":2977},{"style":218},[2978],{"type":55,"value":400},{"type":49,"tag":131,"props":2980,"children":2981},{"style":172},[2982],{"type":55,"value":331},{"type":49,"tag":131,"props":2984,"children":2985},{"class":133,"line":214},[2986,2990,2994,2998,3002,3007,3011,3015,3020,3024,3028],{"type":49,"tag":131,"props":2987,"children":2988},{"style":184},[2989],{"type":55,"value":358},{"type":49,"tag":131,"props":2991,"children":2992},{"style":218},[2993],{"type":55,"value":434},{"type":49,"tag":131,"props":2995,"children":2996},{"style":172},[2997],{"type":55,"value":192},{"type":49,"tag":131,"props":2999,"children":3000},{"style":288},[3001],{"type":55,"value":372},{"type":49,"tag":131,"props":3003,"children":3004},{"style":375},[3005],{"type":55,"value":3006}," transcriber",{"type":49,"tag":131,"props":3008,"children":3009},{"style":218},[3010],{"type":55,"value":382},{"type":49,"tag":131,"props":3012,"children":3013},{"style":172},[3014],{"type":55,"value":326},{"type":49,"tag":131,"props":3016,"children":3017},{"style":144},[3018],{"type":55,"value":3019},"audio.wav",{"type":49,"tag":131,"props":3021,"children":3022},{"style":172},[3023],{"type":55,"value":326},{"type":49,"tag":131,"props":3025,"children":3026},{"style":218},[3027],{"type":55,"value":400},{"type":49,"tag":131,"props":3029,"children":3030},{"style":172},[3031],{"type":55,"value":331},{"type":49,"tag":131,"props":3033,"children":3034},{"class":133,"line":244},[3035],{"type":49,"tag":131,"props":3036,"children":3037},{"style":346},[3038],{"type":55,"value":3039},"\u002F\u002F Returns: { text: 'transcribed text here' }\n",{"type":49,"tag":1127,"props":3041,"children":3043},{"id":3042},"audio-classification",[3044],{"type":55,"value":3045},"Audio Classification",{"type":49,"tag":119,"props":3047,"children":3049},{"className":161,"code":3048,"language":23,"meta":124,"style":124},"const classifier = await pipeline('audio-classification');\nconst result = await classifier('audio.wav');\n",[3050],{"type":49,"tag":127,"props":3051,"children":3052},{"__ignoreMap":124},[3053,3100],{"type":49,"tag":131,"props":3054,"children":3055},{"class":133,"line":134},[3056,3060,3064,3068,3072,3076,3080,3084,3088,3092,3096],{"type":49,"tag":131,"props":3057,"children":3058},{"style":184},[3059],{"type":55,"value":358},{"type":49,"tag":131,"props":3061,"children":3062},{"style":218},[3063],{"type":55,"value":1151},{"type":49,"tag":131,"props":3065,"children":3066},{"style":172},[3067],{"type":55,"value":192},{"type":49,"tag":131,"props":3069,"children":3070},{"style":288},[3071],{"type":55,"value":372},{"type":49,"tag":131,"props":3073,"children":3074},{"style":375},[3075],{"type":55,"value":301},{"type":49,"tag":131,"props":3077,"children":3078},{"style":218},[3079],{"type":55,"value":382},{"type":49,"tag":131,"props":3081,"children":3082},{"style":172},[3083],{"type":55,"value":326},{"type":49,"tag":131,"props":3085,"children":3086},{"style":144},[3087],{"type":55,"value":3042},{"type":49,"tag":131,"props":3089,"children":3090},{"style":172},[3091],{"type":55,"value":326},{"type":49,"tag":131,"props":3093,"children":3094},{"style":218},[3095],{"type":55,"value":400},{"type":49,"tag":131,"props":3097,"children":3098},{"style":172},[3099],{"type":55,"value":331},{"type":49,"tag":131,"props":3101,"children":3102},{"class":133,"line":214},[3103,3107,3111,3115,3119,3123,3127,3131,3135,3139,3143],{"type":49,"tag":131,"props":3104,"children":3105},{"style":184},[3106],{"type":55,"value":358},{"type":49,"tag":131,"props":3108,"children":3109},{"style":218},[3110],{"type":55,"value":434},{"type":49,"tag":131,"props":3112,"children":3113},{"style":172},[3114],{"type":55,"value":192},{"type":49,"tag":131,"props":3116,"children":3117},{"style":288},[3118],{"type":55,"value":372},{"type":49,"tag":131,"props":3120,"children":3121},{"style":375},[3122],{"type":55,"value":1211},{"type":49,"tag":131,"props":3124,"children":3125},{"style":218},[3126],{"type":55,"value":382},{"type":49,"tag":131,"props":3128,"children":3129},{"style":172},[3130],{"type":55,"value":326},{"type":49,"tag":131,"props":3132,"children":3133},{"style":144},[3134],{"type":55,"value":3019},{"type":49,"tag":131,"props":3136,"children":3137},{"style":172},[3138],{"type":55,"value":326},{"type":49,"tag":131,"props":3140,"children":3141},{"style":218},[3142],{"type":55,"value":400},{"type":49,"tag":131,"props":3144,"children":3145},{"style":172},[3146],{"type":55,"value":331},{"type":49,"tag":1127,"props":3148,"children":3150},{"id":3149},"text-to-speech",[3151],{"type":55,"value":3152},"Text-to-Speech",{"type":49,"tag":119,"props":3154,"children":3156},{"className":161,"code":3155,"language":23,"meta":124,"style":124},"const synthesizer = await pipeline('text-to-speech', 'Xenova\u002Fspeecht5_tts');\nconst audio = await synthesizer('Hello, this is a test.', {\n  speaker_embeddings: speakerEmbeddings\n});\n",[3157],{"type":49,"tag":127,"props":3158,"children":3159},{"__ignoreMap":124},[3160,3225,3275,3292],{"type":49,"tag":131,"props":3161,"children":3162},{"class":133,"line":134},[3163,3167,3172,3176,3180,3184,3188,3192,3196,3200,3204,3208,3213,3217,3221],{"type":49,"tag":131,"props":3164,"children":3165},{"style":184},[3166],{"type":55,"value":358},{"type":49,"tag":131,"props":3168,"children":3169},{"style":218},[3170],{"type":55,"value":3171}," synthesizer ",{"type":49,"tag":131,"props":3173,"children":3174},{"style":172},[3175],{"type":55,"value":192},{"type":49,"tag":131,"props":3177,"children":3178},{"style":288},[3179],{"type":55,"value":372},{"type":49,"tag":131,"props":3181,"children":3182},{"style":375},[3183],{"type":55,"value":301},{"type":49,"tag":131,"props":3185,"children":3186},{"style":218},[3187],{"type":55,"value":382},{"type":49,"tag":131,"props":3189,"children":3190},{"style":172},[3191],{"type":55,"value":326},{"type":49,"tag":131,"props":3193,"children":3194},{"style":144},[3195],{"type":55,"value":3149},{"type":49,"tag":131,"props":3197,"children":3198},{"style":172},[3199],{"type":55,"value":326},{"type":49,"tag":131,"props":3201,"children":3202},{"style":172},[3203],{"type":55,"value":820},{"type":49,"tag":131,"props":3205,"children":3206},{"style":172},[3207],{"type":55,"value":316},{"type":49,"tag":131,"props":3209,"children":3210},{"style":144},[3211],{"type":55,"value":3212},"Xenova\u002Fspeecht5_tts",{"type":49,"tag":131,"props":3214,"children":3215},{"style":172},[3216],{"type":55,"value":326},{"type":49,"tag":131,"props":3218,"children":3219},{"style":218},[3220],{"type":55,"value":400},{"type":49,"tag":131,"props":3222,"children":3223},{"style":172},[3224],{"type":55,"value":331},{"type":49,"tag":131,"props":3226,"children":3227},{"class":133,"line":214},[3228,3232,3237,3241,3245,3250,3254,3258,3263,3267,3271],{"type":49,"tag":131,"props":3229,"children":3230},{"style":184},[3231],{"type":55,"value":358},{"type":49,"tag":131,"props":3233,"children":3234},{"style":218},[3235],{"type":55,"value":3236}," audio ",{"type":49,"tag":131,"props":3238,"children":3239},{"style":172},[3240],{"type":55,"value":192},{"type":49,"tag":131,"props":3242,"children":3243},{"style":288},[3244],{"type":55,"value":372},{"type":49,"tag":131,"props":3246,"children":3247},{"style":375},[3248],{"type":55,"value":3249}," synthesizer",{"type":49,"tag":131,"props":3251,"children":3252},{"style":218},[3253],{"type":55,"value":382},{"type":49,"tag":131,"props":3255,"children":3256},{"style":172},[3257],{"type":55,"value":326},{"type":49,"tag":131,"props":3259,"children":3260},{"style":144},[3261],{"type":55,"value":3262},"Hello, this is a test.",{"type":49,"tag":131,"props":3264,"children":3265},{"style":172},[3266],{"type":55,"value":326},{"type":49,"tag":131,"props":3268,"children":3269},{"style":172},[3270],{"type":55,"value":820},{"type":49,"tag":131,"props":3272,"children":3273},{"style":172},[3274],{"type":55,"value":920},{"type":49,"tag":131,"props":3276,"children":3277},{"class":133,"line":244},[3278,3283,3287],{"type":49,"tag":131,"props":3279,"children":3280},{"style":178},[3281],{"type":55,"value":3282},"  speaker_embeddings",{"type":49,"tag":131,"props":3284,"children":3285},{"style":172},[3286],{"type":55,"value":933},{"type":49,"tag":131,"props":3288,"children":3289},{"style":218},[3290],{"type":55,"value":3291}," speakerEmbeddings\n",{"type":49,"tag":131,"props":3293,"children":3294},{"class":133,"line":352},[3295,3299,3303],{"type":49,"tag":131,"props":3296,"children":3297},{"style":172},[3298],{"type":55,"value":236},{"type":49,"tag":131,"props":3300,"children":3301},{"style":218},[3302],{"type":55,"value":400},{"type":49,"tag":131,"props":3304,"children":3305},{"style":172},[3306],{"type":55,"value":331},{"type":49,"tag":112,"props":3308,"children":3310},{"id":3309},"multimodal",[3311],{"type":55,"value":3312},"Multimodal",{"type":49,"tag":1127,"props":3314,"children":3316},{"id":3315},"image-to-text-image-captioning",[3317],{"type":55,"value":3318},"Image-to-Text (Image Captioning)",{"type":49,"tag":119,"props":3320,"children":3322},{"className":161,"code":3321,"language":23,"meta":124,"style":124},"const captioner = await pipeline('image-to-text');\nconst caption = await captioner('image.jpg');\n",[3323],{"type":49,"tag":127,"props":3324,"children":3325},{"__ignoreMap":124},[3326,3375],{"type":49,"tag":131,"props":3327,"children":3328},{"class":133,"line":134},[3329,3333,3338,3342,3346,3350,3354,3358,3363,3367,3371],{"type":49,"tag":131,"props":3330,"children":3331},{"style":184},[3332],{"type":55,"value":358},{"type":49,"tag":131,"props":3334,"children":3335},{"style":218},[3336],{"type":55,"value":3337}," captioner ",{"type":49,"tag":131,"props":3339,"children":3340},{"style":172},[3341],{"type":55,"value":192},{"type":49,"tag":131,"props":3343,"children":3344},{"style":288},[3345],{"type":55,"value":372},{"type":49,"tag":131,"props":3347,"children":3348},{"style":375},[3349],{"type":55,"value":301},{"type":49,"tag":131,"props":3351,"children":3352},{"style":218},[3353],{"type":55,"value":382},{"type":49,"tag":131,"props":3355,"children":3356},{"style":172},[3357],{"type":55,"value":326},{"type":49,"tag":131,"props":3359,"children":3360},{"style":144},[3361],{"type":55,"value":3362},"image-to-text",{"type":49,"tag":131,"props":3364,"children":3365},{"style":172},[3366],{"type":55,"value":326},{"type":49,"tag":131,"props":3368,"children":3369},{"style":218},[3370],{"type":55,"value":400},{"type":49,"tag":131,"props":3372,"children":3373},{"style":172},[3374],{"type":55,"value":331},{"type":49,"tag":131,"props":3376,"children":3377},{"class":133,"line":214},[3378,3382,3387,3391,3395,3400,3404,3408,3412,3416,3420],{"type":49,"tag":131,"props":3379,"children":3380},{"style":184},[3381],{"type":55,"value":358},{"type":49,"tag":131,"props":3383,"children":3384},{"style":218},[3385],{"type":55,"value":3386}," caption ",{"type":49,"tag":131,"props":3388,"children":3389},{"style":172},[3390],{"type":55,"value":192},{"type":49,"tag":131,"props":3392,"children":3393},{"style":288},[3394],{"type":55,"value":372},{"type":49,"tag":131,"props":3396,"children":3397},{"style":375},[3398],{"type":55,"value":3399}," captioner",{"type":49,"tag":131,"props":3401,"children":3402},{"style":218},[3403],{"type":55,"value":382},{"type":49,"tag":131,"props":3405,"children":3406},{"style":172},[3407],{"type":55,"value":326},{"type":49,"tag":131,"props":3409,"children":3410},{"style":144},[3411],{"type":55,"value":2848},{"type":49,"tag":131,"props":3413,"children":3414},{"style":172},[3415],{"type":55,"value":326},{"type":49,"tag":131,"props":3417,"children":3418},{"style":218},[3419],{"type":55,"value":400},{"type":49,"tag":131,"props":3421,"children":3422},{"style":172},[3423],{"type":55,"value":331},{"type":49,"tag":1127,"props":3425,"children":3427},{"id":3426},"document-question-answering",[3428],{"type":55,"value":3429},"Document Question Answering",{"type":49,"tag":119,"props":3431,"children":3433},{"className":161,"code":3432,"language":23,"meta":124,"style":124},"const docQA = await pipeline('document-question-answering');\nconst answer = await docQA('document-image.jpg', 'What is the total amount?');\n",[3434],{"type":49,"tag":127,"props":3435,"children":3436},{"__ignoreMap":124},[3437,3485],{"type":49,"tag":131,"props":3438,"children":3439},{"class":133,"line":134},[3440,3444,3449,3453,3457,3461,3465,3469,3473,3477,3481],{"type":49,"tag":131,"props":3441,"children":3442},{"style":184},[3443],{"type":55,"value":358},{"type":49,"tag":131,"props":3445,"children":3446},{"style":218},[3447],{"type":55,"value":3448}," docQA ",{"type":49,"tag":131,"props":3450,"children":3451},{"style":172},[3452],{"type":55,"value":192},{"type":49,"tag":131,"props":3454,"children":3455},{"style":288},[3456],{"type":55,"value":372},{"type":49,"tag":131,"props":3458,"children":3459},{"style":375},[3460],{"type":55,"value":301},{"type":49,"tag":131,"props":3462,"children":3463},{"style":218},[3464],{"type":55,"value":382},{"type":49,"tag":131,"props":3466,"children":3467},{"style":172},[3468],{"type":55,"value":326},{"type":49,"tag":131,"props":3470,"children":3471},{"style":144},[3472],{"type":55,"value":3426},{"type":49,"tag":131,"props":3474,"children":3475},{"style":172},[3476],{"type":55,"value":326},{"type":49,"tag":131,"props":3478,"children":3479},{"style":218},[3480],{"type":55,"value":400},{"type":49,"tag":131,"props":3482,"children":3483},{"style":172},[3484],{"type":55,"value":331},{"type":49,"tag":131,"props":3486,"children":3487},{"class":133,"line":214},[3488,3492,3496,3500,3504,3509,3513,3517,3522,3526,3530,3534,3539,3543,3547],{"type":49,"tag":131,"props":3489,"children":3490},{"style":184},[3491],{"type":55,"value":358},{"type":49,"tag":131,"props":3493,"children":3494},{"style":218},[3495],{"type":55,"value":1421},{"type":49,"tag":131,"props":3497,"children":3498},{"style":172},[3499],{"type":55,"value":192},{"type":49,"tag":131,"props":3501,"children":3502},{"style":288},[3503],{"type":55,"value":372},{"type":49,"tag":131,"props":3505,"children":3506},{"style":375},[3507],{"type":55,"value":3508}," docQA",{"type":49,"tag":131,"props":3510,"children":3511},{"style":218},[3512],{"type":55,"value":382},{"type":49,"tag":131,"props":3514,"children":3515},{"style":172},[3516],{"type":55,"value":326},{"type":49,"tag":131,"props":3518,"children":3519},{"style":144},[3520],{"type":55,"value":3521},"document-image.jpg",{"type":49,"tag":131,"props":3523,"children":3524},{"style":172},[3525],{"type":55,"value":326},{"type":49,"tag":131,"props":3527,"children":3528},{"style":172},[3529],{"type":55,"value":820},{"type":49,"tag":131,"props":3531,"children":3532},{"style":172},[3533],{"type":55,"value":316},{"type":49,"tag":131,"props":3535,"children":3536},{"style":144},[3537],{"type":55,"value":3538},"What is the total amount?",{"type":49,"tag":131,"props":3540,"children":3541},{"style":172},[3542],{"type":55,"value":326},{"type":49,"tag":131,"props":3544,"children":3545},{"style":218},[3546],{"type":55,"value":400},{"type":49,"tag":131,"props":3548,"children":3549},{"style":172},[3550],{"type":55,"value":331},{"type":49,"tag":1127,"props":3552,"children":3554},{"id":3553},"zero-shot-object-detection",[3555],{"type":55,"value":3556},"Zero-Shot Object Detection",{"type":49,"tag":119,"props":3558,"children":3560},{"className":161,"code":3559,"language":23,"meta":124,"style":124},"const detector = await pipeline('zero-shot-object-detection');\nconst objects = await detector('image.jpg', ['person', 'car', 'tree']);\n",[3561],{"type":49,"tag":127,"props":3562,"children":3563},{"__ignoreMap":124},[3564,3611],{"type":49,"tag":131,"props":3565,"children":3566},{"class":133,"line":134},[3567,3571,3575,3579,3583,3587,3591,3595,3599,3603,3607],{"type":49,"tag":131,"props":3568,"children":3569},{"style":184},[3570],{"type":55,"value":358},{"type":49,"tag":131,"props":3572,"children":3573},{"style":218},[3574],{"type":55,"value":2439},{"type":49,"tag":131,"props":3576,"children":3577},{"style":172},[3578],{"type":55,"value":192},{"type":49,"tag":131,"props":3580,"children":3581},{"style":288},[3582],{"type":55,"value":372},{"type":49,"tag":131,"props":3584,"children":3585},{"style":375},[3586],{"type":55,"value":301},{"type":49,"tag":131,"props":3588,"children":3589},{"style":218},[3590],{"type":55,"value":382},{"type":49,"tag":131,"props":3592,"children":3593},{"style":172},[3594],{"type":55,"value":326},{"type":49,"tag":131,"props":3596,"children":3597},{"style":144},[3598],{"type":55,"value":3553},{"type":49,"tag":131,"props":3600,"children":3601},{"style":172},[3602],{"type":55,"value":326},{"type":49,"tag":131,"props":3604,"children":3605},{"style":218},[3606],{"type":55,"value":400},{"type":49,"tag":131,"props":3608,"children":3609},{"style":172},[3610],{"type":55,"value":331},{"type":49,"tag":131,"props":3612,"children":3613},{"class":133,"line":214},[3614,3618,3622,3626,3630,3634,3638,3642,3646,3650,3654,3658,3662,3667,3671,3675,3679,3684,3688,3692,3696,3701,3705,3709],{"type":49,"tag":131,"props":3615,"children":3616},{"style":184},[3617],{"type":55,"value":358},{"type":49,"tag":131,"props":3619,"children":3620},{"style":218},[3621],{"type":55,"value":2487},{"type":49,"tag":131,"props":3623,"children":3624},{"style":172},[3625],{"type":55,"value":192},{"type":49,"tag":131,"props":3627,"children":3628},{"style":288},[3629],{"type":55,"value":372},{"type":49,"tag":131,"props":3631,"children":3632},{"style":375},[3633],{"type":55,"value":2500},{"type":49,"tag":131,"props":3635,"children":3636},{"style":218},[3637],{"type":55,"value":382},{"type":49,"tag":131,"props":3639,"children":3640},{"style":172},[3641],{"type":55,"value":326},{"type":49,"tag":131,"props":3643,"children":3644},{"style":144},[3645],{"type":55,"value":2848},{"type":49,"tag":131,"props":3647,"children":3648},{"style":172},[3649],{"type":55,"value":326},{"type":49,"tag":131,"props":3651,"children":3652},{"style":172},[3653],{"type":55,"value":820},{"type":49,"tag":131,"props":3655,"children":3656},{"style":218},[3657],{"type":55,"value":2206},{"type":49,"tag":131,"props":3659,"children":3660},{"style":172},[3661],{"type":55,"value":326},{"type":49,"tag":131,"props":3663,"children":3664},{"style":144},[3665],{"type":55,"value":3666},"person",{"type":49,"tag":131,"props":3668,"children":3669},{"style":172},[3670],{"type":55,"value":326},{"type":49,"tag":131,"props":3672,"children":3673},{"style":172},[3674],{"type":55,"value":820},{"type":49,"tag":131,"props":3676,"children":3677},{"style":172},[3678],{"type":55,"value":316},{"type":49,"tag":131,"props":3680,"children":3681},{"style":144},[3682],{"type":55,"value":3683},"car",{"type":49,"tag":131,"props":3685,"children":3686},{"style":172},[3687],{"type":55,"value":326},{"type":49,"tag":131,"props":3689,"children":3690},{"style":172},[3691],{"type":55,"value":820},{"type":49,"tag":131,"props":3693,"children":3694},{"style":172},[3695],{"type":55,"value":316},{"type":49,"tag":131,"props":3697,"children":3698},{"style":144},[3699],{"type":55,"value":3700},"tree",{"type":49,"tag":131,"props":3702,"children":3703},{"style":172},[3704],{"type":55,"value":326},{"type":49,"tag":131,"props":3706,"children":3707},{"style":218},[3708],{"type":55,"value":2258},{"type":49,"tag":131,"props":3710,"children":3711},{"style":172},[3712],{"type":55,"value":331},{"type":49,"tag":112,"props":3714,"children":3716},{"id":3715},"feature-extraction-embeddings",[3717],{"type":55,"value":3718},"Feature Extraction (Embeddings)",{"type":49,"tag":119,"props":3720,"children":3722},{"className":161,"code":3721,"language":23,"meta":124,"style":124},"const extractor = await pipeline('feature-extraction');\nconst embeddings = await extractor('This is a sentence to embed.');\n\u002F\u002F Returns: tensor of shape [1, sequence_length, hidden_size]\n\n\u002F\u002F For sentence embeddings (mean pooling)\nconst extractor = await pipeline('feature-extraction', 'onnx-community\u002Fall-MiniLM-L6-v2-ONNX');\nconst embeddings = await extractor('Text to embed', { pooling: 'mean', normalize: true });\n",[3723],{"type":49,"tag":127,"props":3724,"children":3725},{"__ignoreMap":124},[3726,3775,3825,3833,3840,3848,3912],{"type":49,"tag":131,"props":3727,"children":3728},{"class":133,"line":134},[3729,3733,3738,3742,3746,3750,3754,3758,3763,3767,3771],{"type":49,"tag":131,"props":3730,"children":3731},{"style":184},[3732],{"type":55,"value":358},{"type":49,"tag":131,"props":3734,"children":3735},{"style":218},[3736],{"type":55,"value":3737}," extractor ",{"type":49,"tag":131,"props":3739,"children":3740},{"style":172},[3741],{"type":55,"value":192},{"type":49,"tag":131,"props":3743,"children":3744},{"style":288},[3745],{"type":55,"value":372},{"type":49,"tag":131,"props":3747,"children":3748},{"style":375},[3749],{"type":55,"value":301},{"type":49,"tag":131,"props":3751,"children":3752},{"style":218},[3753],{"type":55,"value":382},{"type":49,"tag":131,"props":3755,"children":3756},{"style":172},[3757],{"type":55,"value":326},{"type":49,"tag":131,"props":3759,"children":3760},{"style":144},[3761],{"type":55,"value":3762},"feature-extraction",{"type":49,"tag":131,"props":3764,"children":3765},{"style":172},[3766],{"type":55,"value":326},{"type":49,"tag":131,"props":3768,"children":3769},{"style":218},[3770],{"type":55,"value":400},{"type":49,"tag":131,"props":3772,"children":3773},{"style":172},[3774],{"type":55,"value":331},{"type":49,"tag":131,"props":3776,"children":3777},{"class":133,"line":214},[3778,3782,3787,3791,3795,3800,3804,3808,3813,3817,3821],{"type":49,"tag":131,"props":3779,"children":3780},{"style":184},[3781],{"type":55,"value":358},{"type":49,"tag":131,"props":3783,"children":3784},{"style":218},[3785],{"type":55,"value":3786}," embeddings ",{"type":49,"tag":131,"props":3788,"children":3789},{"style":172},[3790],{"type":55,"value":192},{"type":49,"tag":131,"props":3792,"children":3793},{"style":288},[3794],{"type":55,"value":372},{"type":49,"tag":131,"props":3796,"children":3797},{"style":375},[3798],{"type":55,"value":3799}," extractor",{"type":49,"tag":131,"props":3801,"children":3802},{"style":218},[3803],{"type":55,"value":382},{"type":49,"tag":131,"props":3805,"children":3806},{"style":172},[3807],{"type":55,"value":326},{"type":49,"tag":131,"props":3809,"children":3810},{"style":144},[3811],{"type":55,"value":3812},"This is a sentence to embed.",{"type":49,"tag":131,"props":3814,"children":3815},{"style":172},[3816],{"type":55,"value":326},{"type":49,"tag":131,"props":3818,"children":3819},{"style":218},[3820],{"type":55,"value":400},{"type":49,"tag":131,"props":3822,"children":3823},{"style":172},[3824],{"type":55,"value":331},{"type":49,"tag":131,"props":3826,"children":3827},{"class":133,"line":244},[3828],{"type":49,"tag":131,"props":3829,"children":3830},{"style":346},[3831],{"type":55,"value":3832},"\u002F\u002F Returns: tensor of shape [1, sequence_length, hidden_size]\n",{"type":49,"tag":131,"props":3834,"children":3835},{"class":133,"line":352},[3836],{"type":49,"tag":131,"props":3837,"children":3838},{"emptyLinePlaceholder":337},[3839],{"type":55,"value":340},{"type":49,"tag":131,"props":3841,"children":3842},{"class":133,"line":407},[3843],{"type":49,"tag":131,"props":3844,"children":3845},{"style":346},[3846],{"type":55,"value":3847},"\u002F\u002F For sentence embeddings (mean pooling)\n",{"type":49,"tag":131,"props":3849,"children":3850},{"class":133,"line":415},[3851,3855,3859,3863,3867,3871,3875,3879,3883,3887,3891,3895,3900,3904,3908],{"type":49,"tag":131,"props":3852,"children":3853},{"style":184},[3854],{"type":55,"value":358},{"type":49,"tag":131,"props":3856,"children":3857},{"style":218},[3858],{"type":55,"value":3737},{"type":49,"tag":131,"props":3860,"children":3861},{"style":172},[3862],{"type":55,"value":192},{"type":49,"tag":131,"props":3864,"children":3865},{"style":288},[3866],{"type":55,"value":372},{"type":49,"tag":131,"props":3868,"children":3869},{"style":375},[3870],{"type":55,"value":301},{"type":49,"tag":131,"props":3872,"children":3873},{"style":218},[3874],{"type":55,"value":382},{"type":49,"tag":131,"props":3876,"children":3877},{"style":172},[3878],{"type":55,"value":326},{"type":49,"tag":131,"props":3880,"children":3881},{"style":144},[3882],{"type":55,"value":3762},{"type":49,"tag":131,"props":3884,"children":3885},{"style":172},[3886],{"type":55,"value":326},{"type":49,"tag":131,"props":3888,"children":3889},{"style":172},[3890],{"type":55,"value":820},{"type":49,"tag":131,"props":3892,"children":3893},{"style":172},[3894],{"type":55,"value":316},{"type":49,"tag":131,"props":3896,"children":3897},{"style":144},[3898],{"type":55,"value":3899},"onnx-community\u002Fall-MiniLM-L6-v2-ONNX",{"type":49,"tag":131,"props":3901,"children":3902},{"style":172},[3903],{"type":55,"value":326},{"type":49,"tag":131,"props":3905,"children":3906},{"style":218},[3907],{"type":55,"value":400},{"type":49,"tag":131,"props":3909,"children":3910},{"style":172},[3911],{"type":55,"value":331},{"type":49,"tag":131,"props":3913,"children":3914},{"class":133,"line":424},[3915,3919,3923,3927,3931,3935,3939,3943,3948,3952,3956,3960,3965,3969,3973,3978,3982,3986,3991,3995,4001,4005,4009],{"type":49,"tag":131,"props":3916,"children":3917},{"style":184},[3918],{"type":55,"value":358},{"type":49,"tag":131,"props":3920,"children":3921},{"style":218},[3922],{"type":55,"value":3786},{"type":49,"tag":131,"props":3924,"children":3925},{"style":172},[3926],{"type":55,"value":192},{"type":49,"tag":131,"props":3928,"children":3929},{"style":288},[3930],{"type":55,"value":372},{"type":49,"tag":131,"props":3932,"children":3933},{"style":375},[3934],{"type":55,"value":3799},{"type":49,"tag":131,"props":3936,"children":3937},{"style":218},[3938],{"type":55,"value":382},{"type":49,"tag":131,"props":3940,"children":3941},{"style":172},[3942],{"type":55,"value":326},{"type":49,"tag":131,"props":3944,"children":3945},{"style":144},[3946],{"type":55,"value":3947},"Text to embed",{"type":49,"tag":131,"props":3949,"children":3950},{"style":172},[3951],{"type":55,"value":326},{"type":49,"tag":131,"props":3953,"children":3954},{"style":172},[3955],{"type":55,"value":820},{"type":49,"tag":131,"props":3957,"children":3958},{"style":172},[3959],{"type":55,"value":296},{"type":49,"tag":131,"props":3961,"children":3962},{"style":178},[3963],{"type":55,"value":3964}," pooling",{"type":49,"tag":131,"props":3966,"children":3967},{"style":172},[3968],{"type":55,"value":933},{"type":49,"tag":131,"props":3970,"children":3971},{"style":172},[3972],{"type":55,"value":316},{"type":49,"tag":131,"props":3974,"children":3975},{"style":144},[3976],{"type":55,"value":3977},"mean",{"type":49,"tag":131,"props":3979,"children":3980},{"style":172},[3981],{"type":55,"value":326},{"type":49,"tag":131,"props":3983,"children":3984},{"style":172},[3985],{"type":55,"value":820},{"type":49,"tag":131,"props":3987,"children":3988},{"style":178},[3989],{"type":55,"value":3990}," normalize",{"type":49,"tag":131,"props":3992,"children":3993},{"style":172},[3994],{"type":55,"value":933},{"type":49,"tag":131,"props":3996,"children":3998},{"style":3997},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[3999],{"type":55,"value":4000}," true",{"type":49,"tag":131,"props":4002,"children":4003},{"style":172},[4004],{"type":55,"value":306},{"type":49,"tag":131,"props":4006,"children":4007},{"style":218},[4008],{"type":55,"value":400},{"type":49,"tag":131,"props":4010,"children":4011},{"style":172},[4012],{"type":55,"value":331},{"type":49,"tag":64,"props":4014,"children":4016},{"id":4015},"finding-and-choosing-models",[4017],{"type":55,"value":4018},"Finding and Choosing Models",{"type":49,"tag":112,"props":4020,"children":4022},{"id":4021},"browsing-the-hugging-face-hub",[4023],{"type":55,"value":4024},"Browsing the Hugging Face Hub",{"type":49,"tag":58,"props":4026,"children":4027},{},[4028],{"type":55,"value":4029},"Discover compatible Transformers.js models on Hugging Face Hub:",{"type":49,"tag":58,"props":4031,"children":4032},{},[4033],{"type":49,"tag":535,"props":4034,"children":4035},{},[4036],{"type":55,"value":4037},"Base URL (all models):",{"type":49,"tag":119,"props":4039,"children":4043},{"className":4040,"code":4042,"language":55},[4041],"language-text","https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js&sort=trending\n",[4044],{"type":49,"tag":127,"props":4045,"children":4046},{"__ignoreMap":124},[4047],{"type":55,"value":4042},{"type":49,"tag":58,"props":4049,"children":4050},{},[4051,4056,4058,4063],{"type":49,"tag":535,"props":4052,"children":4053},{},[4054],{"type":55,"value":4055},"Filter by task",{"type":55,"value":4057}," using the ",{"type":49,"tag":127,"props":4059,"children":4061},{"className":4060},[],[4062],{"type":55,"value":702},{"type":55,"value":4064}," parameter:",{"type":49,"tag":4066,"props":4067,"children":4068},"table",{},[4069,4088],{"type":49,"tag":4070,"props":4071,"children":4072},"thead",{},[4073],{"type":49,"tag":4074,"props":4075,"children":4076},"tr",{},[4077,4083],{"type":49,"tag":4078,"props":4079,"children":4080},"th",{},[4081],{"type":55,"value":4082},"Task",{"type":49,"tag":4078,"props":4084,"children":4085},{},[4086],{"type":55,"value":4087},"URL",{"type":49,"tag":4089,"props":4090,"children":4091},"tbody",{},[4092,4111,4130,4149,4168,4187,4205,4224,4243,4262,4281,4301,4321],{"type":49,"tag":4074,"props":4093,"children":4094},{},[4095,4103],{"type":49,"tag":4096,"props":4097,"children":4098},"td",{},[4099],{"type":49,"tag":535,"props":4100,"children":4101},{},[4102],{"type":55,"value":1518},{"type":49,"tag":4096,"props":4104,"children":4105},{},[4106],{"type":49,"tag":551,"props":4107,"children":4109},{"href":715,"rel":4108},[684],[4110],{"type":55,"value":715},{"type":49,"tag":4074,"props":4112,"children":4113},{},[4114,4121],{"type":49,"tag":4096,"props":4115,"children":4116},{},[4117],{"type":49,"tag":535,"props":4118,"children":4119},{},[4120],{"type":55,"value":1132},{"type":49,"tag":4096,"props":4122,"children":4123},{},[4124],{"type":49,"tag":551,"props":4125,"children":4128},{"href":4126,"rel":4127},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-classification&library=transformers.js&sort=trending",[684],[4129],{"type":55,"value":4126},{"type":49,"tag":4074,"props":4131,"children":4132},{},[4133,4140],{"type":49,"tag":4096,"props":4134,"children":4135},{},[4136],{"type":49,"tag":535,"props":4137,"children":4138},{},[4139],{"type":55,"value":1755},{"type":49,"tag":4096,"props":4141,"children":4142},{},[4143],{"type":49,"tag":551,"props":4144,"children":4147},{"href":4145,"rel":4146},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=translation&library=transformers.js&sort=trending",[684],[4148],{"type":55,"value":4145},{"type":49,"tag":4074,"props":4150,"children":4151},{},[4152,4159],{"type":49,"tag":4096,"props":4153,"children":4154},{},[4155],{"type":49,"tag":535,"props":4156,"children":4157},{},[4158],{"type":55,"value":1952},{"type":49,"tag":4096,"props":4160,"children":4161},{},[4162],{"type":49,"tag":551,"props":4163,"children":4166},{"href":4164,"rel":4165},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=summarization&library=transformers.js&sort=trending",[684],[4167],{"type":55,"value":4164},{"type":49,"tag":4074,"props":4169,"children":4170},{},[4171,4178],{"type":49,"tag":4096,"props":4172,"children":4173},{},[4174],{"type":49,"tag":535,"props":4175,"children":4176},{},[4177],{"type":55,"value":1354},{"type":49,"tag":4096,"props":4179,"children":4180},{},[4181],{"type":49,"tag":551,"props":4182,"children":4185},{"href":4183,"rel":4184},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=question-answering&library=transformers.js&sort=trending",[684],[4186],{"type":55,"value":4183},{"type":49,"tag":4074,"props":4188,"children":4189},{},[4190,4197],{"type":49,"tag":4096,"props":4191,"children":4192},{},[4193],{"type":49,"tag":535,"props":4194,"children":4195},{},[4196],{"type":55,"value":2272},{"type":49,"tag":4096,"props":4198,"children":4199},{},[4200],{"type":49,"tag":551,"props":4201,"children":4203},{"href":726,"rel":4202},[684],[4204],{"type":55,"value":726},{"type":49,"tag":4074,"props":4206,"children":4207},{},[4208,4215],{"type":49,"tag":4096,"props":4209,"children":4210},{},[4211],{"type":49,"tag":535,"props":4212,"children":4213},{},[4214],{"type":55,"value":2420},{"type":49,"tag":4096,"props":4216,"children":4217},{},[4218],{"type":49,"tag":551,"props":4219,"children":4222},{"href":4220,"rel":4221},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=object-detection&library=transformers.js&sort=trending",[684],[4223],{"type":55,"value":4220},{"type":49,"tag":4074,"props":4225,"children":4226},{},[4227,4234],{"type":49,"tag":4096,"props":4228,"children":4229},{},[4230],{"type":49,"tag":535,"props":4231,"children":4232},{},[4233],{"type":55,"value":2538},{"type":49,"tag":4096,"props":4235,"children":4236},{},[4237],{"type":49,"tag":551,"props":4238,"children":4241},{"href":4239,"rel":4240},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-segmentation&library=transformers.js&sort=trending",[684],[4242],{"type":55,"value":4239},{"type":49,"tag":4074,"props":4244,"children":4245},{},[4246,4254],{"type":49,"tag":4096,"props":4247,"children":4248},{},[4249],{"type":49,"tag":535,"props":4250,"children":4251},{},[4252],{"type":55,"value":4253},"Speech Recognition",{"type":49,"tag":4096,"props":4255,"children":4256},{},[4257],{"type":49,"tag":551,"props":4258,"children":4260},{"href":737,"rel":4259},[684],[4261],{"type":55,"value":737},{"type":49,"tag":4074,"props":4263,"children":4264},{},[4265,4272],{"type":49,"tag":4096,"props":4266,"children":4267},{},[4268],{"type":49,"tag":535,"props":4269,"children":4270},{},[4271],{"type":55,"value":3045},{"type":49,"tag":4096,"props":4273,"children":4274},{},[4275],{"type":49,"tag":551,"props":4276,"children":4279},{"href":4277,"rel":4278},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=audio-classification&library=transformers.js&sort=trending",[684],[4280],{"type":55,"value":4277},{"type":49,"tag":4074,"props":4282,"children":4283},{},[4284,4292],{"type":49,"tag":4096,"props":4285,"children":4286},{},[4287],{"type":49,"tag":535,"props":4288,"children":4289},{},[4290],{"type":55,"value":4291},"Image-to-Text",{"type":49,"tag":4096,"props":4293,"children":4294},{},[4295],{"type":49,"tag":551,"props":4296,"children":4299},{"href":4297,"rel":4298},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-to-text&library=transformers.js&sort=trending",[684],[4300],{"type":55,"value":4297},{"type":49,"tag":4074,"props":4302,"children":4303},{},[4304,4312],{"type":49,"tag":4096,"props":4305,"children":4306},{},[4307],{"type":49,"tag":535,"props":4308,"children":4309},{},[4310],{"type":55,"value":4311},"Feature Extraction",{"type":49,"tag":4096,"props":4313,"children":4314},{},[4315],{"type":49,"tag":551,"props":4316,"children":4319},{"href":4317,"rel":4318},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=feature-extraction&library=transformers.js&sort=trending",[684],[4320],{"type":55,"value":4317},{"type":49,"tag":4074,"props":4322,"children":4323},{},[4324,4331],{"type":49,"tag":4096,"props":4325,"children":4326},{},[4327],{"type":49,"tag":535,"props":4328,"children":4329},{},[4330],{"type":55,"value":2103},{"type":49,"tag":4096,"props":4332,"children":4333},{},[4334],{"type":49,"tag":551,"props":4335,"children":4338},{"href":4336,"rel":4337},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=zero-shot-classification&library=transformers.js&sort=trending",[684],[4339],{"type":55,"value":4336},{"type":49,"tag":58,"props":4341,"children":4342},{},[4343],{"type":49,"tag":535,"props":4344,"children":4345},{},[4346],{"type":55,"value":4347},"Sort options:",{"type":49,"tag":76,"props":4349,"children":4350},{},[4351,4362,4373,4384],{"type":49,"tag":80,"props":4352,"children":4353},{},[4354,4360],{"type":49,"tag":127,"props":4355,"children":4357},{"className":4356},[],[4358],{"type":55,"value":4359},"&sort=trending",{"type":55,"value":4361}," - Most popular recently",{"type":49,"tag":80,"props":4363,"children":4364},{},[4365,4371],{"type":49,"tag":127,"props":4366,"children":4368},{"className":4367},[],[4369],{"type":55,"value":4370},"&sort=downloads",{"type":55,"value":4372}," - Most downloaded overall",{"type":49,"tag":80,"props":4374,"children":4375},{},[4376,4382],{"type":49,"tag":127,"props":4377,"children":4379},{"className":4378},[],[4380],{"type":55,"value":4381},"&sort=likes",{"type":55,"value":4383}," - Most liked by community",{"type":49,"tag":80,"props":4385,"children":4386},{},[4387,4393],{"type":49,"tag":127,"props":4388,"children":4390},{"className":4389},[],[4391],{"type":55,"value":4392},"&sort=modified",{"type":55,"value":4394}," - Recently updated",{"type":49,"tag":112,"props":4396,"children":4398},{"id":4397},"choosing-the-right-model",[4399],{"type":55,"value":4400},"Choosing the Right Model",{"type":49,"tag":58,"props":4402,"children":4403},{},[4404],{"type":55,"value":4405},"Consider these factors when selecting a model:",{"type":49,"tag":58,"props":4407,"children":4408},{},[4409],{"type":49,"tag":535,"props":4410,"children":4411},{},[4412],{"type":55,"value":4413},"1. Model Size",{"type":49,"tag":76,"props":4415,"children":4416},{},[4417,4427,4437],{"type":49,"tag":80,"props":4418,"children":4419},{},[4420,4425],{"type":49,"tag":535,"props":4421,"children":4422},{},[4423],{"type":55,"value":4424},"Small (\u003C 100MB)",{"type":55,"value":4426},": Fast, suitable for browsers, limited accuracy",{"type":49,"tag":80,"props":4428,"children":4429},{},[4430,4435],{"type":49,"tag":535,"props":4431,"children":4432},{},[4433],{"type":55,"value":4434},"Medium (100MB - 500MB)",{"type":55,"value":4436},": Balanced performance, good for most use cases",{"type":49,"tag":80,"props":4438,"children":4439},{},[4440,4445],{"type":49,"tag":535,"props":4441,"children":4442},{},[4443],{"type":55,"value":4444},"Large (> 500MB)",{"type":55,"value":4446},": High accuracy, slower, better for Node.js or powerful devices",{"type":49,"tag":58,"props":4448,"children":4449},{},[4450,4455],{"type":49,"tag":535,"props":4451,"children":4452},{},[4453],{"type":55,"value":4454},"2. Quantization",{"type":55,"value":4456},"\nModels are often available in different quantization levels:",{"type":49,"tag":76,"props":4458,"children":4459},{},[4460,4471,4482,4493],{"type":49,"tag":80,"props":4461,"children":4462},{},[4463,4469],{"type":49,"tag":127,"props":4464,"children":4466},{"className":4465},[],[4467],{"type":55,"value":4468},"fp32",{"type":55,"value":4470}," - Full precision (largest, most accurate)",{"type":49,"tag":80,"props":4472,"children":4473},{},[4474,4480],{"type":49,"tag":127,"props":4475,"children":4477},{"className":4476},[],[4478],{"type":55,"value":4479},"fp16",{"type":55,"value":4481}," - Half precision (smaller, still accurate)",{"type":49,"tag":80,"props":4483,"children":4484},{},[4485,4491],{"type":49,"tag":127,"props":4486,"children":4488},{"className":4487},[],[4489],{"type":55,"value":4490},"q8",{"type":55,"value":4492}," - 8-bit quantized (much smaller, slight accuracy loss)",{"type":49,"tag":80,"props":4494,"children":4495},{},[4496,4501],{"type":49,"tag":127,"props":4497,"children":4499},{"className":4498},[],[4500],{"type":55,"value":1075},{"type":55,"value":4502}," - 4-bit quantized (smallest, noticeable accuracy loss)",{"type":49,"tag":58,"props":4504,"children":4505},{},[4506,4511],{"type":49,"tag":535,"props":4507,"children":4508},{},[4509],{"type":55,"value":4510},"3. Task Compatibility",{"type":55,"value":4512},"\nCheck the model card for:",{"type":49,"tag":76,"props":4514,"children":4515},{},[4516,4521,4526,4531],{"type":49,"tag":80,"props":4517,"children":4518},{},[4519],{"type":55,"value":4520},"Supported tasks (some models support multiple tasks)",{"type":49,"tag":80,"props":4522,"children":4523},{},[4524],{"type":55,"value":4525},"Input\u002Foutput formats",{"type":49,"tag":80,"props":4527,"children":4528},{},[4529],{"type":55,"value":4530},"Language support (multilingual vs. English-only)",{"type":49,"tag":80,"props":4532,"children":4533},{},[4534],{"type":55,"value":4535},"License restrictions",{"type":49,"tag":58,"props":4537,"children":4538},{},[4539,4544],{"type":49,"tag":535,"props":4540,"children":4541},{},[4542],{"type":55,"value":4543},"4. Performance Metrics",{"type":55,"value":4545},"\nModel cards typically show:",{"type":49,"tag":76,"props":4547,"children":4548},{},[4549,4554,4559,4564],{"type":49,"tag":80,"props":4550,"children":4551},{},[4552],{"type":55,"value":4553},"Accuracy scores",{"type":49,"tag":80,"props":4555,"children":4556},{},[4557],{"type":55,"value":4558},"Benchmark results",{"type":49,"tag":80,"props":4560,"children":4561},{},[4562],{"type":55,"value":4563},"Inference speed",{"type":49,"tag":80,"props":4565,"children":4566},{},[4567],{"type":55,"value":4568},"Memory requirements",{"type":49,"tag":112,"props":4570,"children":4572},{"id":4571},"example-finding-a-text-generation-model",[4573],{"type":55,"value":4574},"Example: Finding a Text Generation Model",{"type":49,"tag":119,"props":4576,"children":4578},{"className":161,"code":4577,"language":23,"meta":124,"style":124},"\u002F\u002F 1. Visit: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending\n\n\u002F\u002F 2. Browse and select a model (e.g., onnx-community\u002Fgemma-3-270m-it-ONNX)\n\n\u002F\u002F 3. Check model card for:\n\u002F\u002F    - Model size: ~270M parameters\n\u002F\u002F    - Quantization: q4 available\n\u002F\u002F    - Language: English\n\u002F\u002F    - Use case: Instruction-following chat\n\n\u002F\u002F 4. Use the model:\nimport { pipeline } from '@huggingface\u002Ftransformers';\n\nconst generator = await pipeline(\n  'text-generation',\n  'onnx-community\u002Fgemma-3-270m-it-ONNX',\n  { dtype: 'q4' } \u002F\u002F Use quantized version for faster inference\n);\n\nconst output = await generator('Explain quantum computing in simple terms.', {\n  max_new_tokens: 100\n});\n\nawait generator.dispose();\n",[4579],{"type":49,"tag":127,"props":4580,"children":4581},{"__ignoreMap":124},[4582,4590,4597,4605,4612,4620,4628,4636,4644,4652,4659,4667,4707,4715,4743,4763,4783,4822,4834,4842,4891,4908,4924,4932],{"type":49,"tag":131,"props":4583,"children":4584},{"class":133,"line":134},[4585],{"type":49,"tag":131,"props":4586,"children":4587},{"style":346},[4588],{"type":55,"value":4589},"\u002F\u002F 1. Visit: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending\n",{"type":49,"tag":131,"props":4591,"children":4592},{"class":133,"line":214},[4593],{"type":49,"tag":131,"props":4594,"children":4595},{"emptyLinePlaceholder":337},[4596],{"type":55,"value":340},{"type":49,"tag":131,"props":4598,"children":4599},{"class":133,"line":244},[4600],{"type":49,"tag":131,"props":4601,"children":4602},{"style":346},[4603],{"type":55,"value":4604},"\u002F\u002F 2. Browse and select a model (e.g., onnx-community\u002Fgemma-3-270m-it-ONNX)\n",{"type":49,"tag":131,"props":4606,"children":4607},{"class":133,"line":352},[4608],{"type":49,"tag":131,"props":4609,"children":4610},{"emptyLinePlaceholder":337},[4611],{"type":55,"value":340},{"type":49,"tag":131,"props":4613,"children":4614},{"class":133,"line":407},[4615],{"type":49,"tag":131,"props":4616,"children":4617},{"style":346},[4618],{"type":55,"value":4619},"\u002F\u002F 3. Check model card for:\n",{"type":49,"tag":131,"props":4621,"children":4622},{"class":133,"line":415},[4623],{"type":49,"tag":131,"props":4624,"children":4625},{"style":346},[4626],{"type":55,"value":4627},"\u002F\u002F    - Model size: ~270M parameters\n",{"type":49,"tag":131,"props":4629,"children":4630},{"class":133,"line":424},[4631],{"type":49,"tag":131,"props":4632,"children":4633},{"style":346},[4634],{"type":55,"value":4635},"\u002F\u002F    - Quantization: q4 available\n",{"type":49,"tag":131,"props":4637,"children":4638},{"class":133,"line":475},[4639],{"type":49,"tag":131,"props":4640,"children":4641},{"style":346},[4642],{"type":55,"value":4643},"\u002F\u002F    - Language: English\n",{"type":49,"tag":131,"props":4645,"children":4646},{"class":133,"line":484},[4647],{"type":49,"tag":131,"props":4648,"children":4649},{"style":346},[4650],{"type":55,"value":4651},"\u002F\u002F    - Use case: Instruction-following chat\n",{"type":49,"tag":131,"props":4653,"children":4654},{"class":133,"line":492},[4655],{"type":49,"tag":131,"props":4656,"children":4657},{"emptyLinePlaceholder":337},[4658],{"type":55,"value":340},{"type":49,"tag":131,"props":4660,"children":4661},{"class":133,"line":501},[4662],{"type":49,"tag":131,"props":4663,"children":4664},{"style":346},[4665],{"type":55,"value":4666},"\u002F\u002F 4. Use the model:\n",{"type":49,"tag":131,"props":4668,"children":4670},{"class":133,"line":4669},12,[4671,4675,4679,4683,4687,4691,4695,4699,4703],{"type":49,"tag":131,"props":4672,"children":4673},{"style":288},[4674],{"type":55,"value":291},{"type":49,"tag":131,"props":4676,"children":4677},{"style":172},[4678],{"type":55,"value":296},{"type":49,"tag":131,"props":4680,"children":4681},{"style":218},[4682],{"type":55,"value":301},{"type":49,"tag":131,"props":4684,"children":4685},{"style":172},[4686],{"type":55,"value":306},{"type":49,"tag":131,"props":4688,"children":4689},{"style":288},[4690],{"type":55,"value":311},{"type":49,"tag":131,"props":4692,"children":4693},{"style":172},[4694],{"type":55,"value":316},{"type":49,"tag":131,"props":4696,"children":4697},{"style":144},[4698],{"type":55,"value":321},{"type":49,"tag":131,"props":4700,"children":4701},{"style":172},[4702],{"type":55,"value":326},{"type":49,"tag":131,"props":4704,"children":4705},{"style":172},[4706],{"type":55,"value":331},{"type":49,"tag":131,"props":4708,"children":4710},{"class":133,"line":4709},13,[4711],{"type":49,"tag":131,"props":4712,"children":4713},{"emptyLinePlaceholder":337},[4714],{"type":55,"value":340},{"type":49,"tag":131,"props":4716,"children":4718},{"class":133,"line":4717},14,[4719,4723,4727,4731,4735,4739],{"type":49,"tag":131,"props":4720,"children":4721},{"style":184},[4722],{"type":55,"value":358},{"type":49,"tag":131,"props":4724,"children":4725},{"style":218},[4726],{"type":55,"value":1537},{"type":49,"tag":131,"props":4728,"children":4729},{"style":172},[4730],{"type":55,"value":192},{"type":49,"tag":131,"props":4732,"children":4733},{"style":288},[4734],{"type":55,"value":372},{"type":49,"tag":131,"props":4736,"children":4737},{"style":375},[4738],{"type":55,"value":301},{"type":49,"tag":131,"props":4740,"children":4741},{"style":218},[4742],{"type":55,"value":604},{"type":49,"tag":131,"props":4744,"children":4746},{"class":133,"line":4745},15,[4747,4751,4755,4759],{"type":49,"tag":131,"props":4748,"children":4749},{"style":172},[4750],{"type":55,"value":612},{"type":49,"tag":131,"props":4752,"children":4753},{"style":144},[4754],{"type":55,"value":1515},{"type":49,"tag":131,"props":4756,"children":4757},{"style":172},[4758],{"type":55,"value":326},{"type":49,"tag":131,"props":4760,"children":4761},{"style":172},[4762],{"type":55,"value":625},{"type":49,"tag":131,"props":4764,"children":4766},{"class":133,"line":4765},16,[4767,4771,4775,4779],{"type":49,"tag":131,"props":4768,"children":4769},{"style":172},[4770],{"type":55,"value":612},{"type":49,"tag":131,"props":4772,"children":4773},{"style":144},[4774],{"type":55,"value":1578},{"type":49,"tag":131,"props":4776,"children":4777},{"style":172},[4778],{"type":55,"value":326},{"type":49,"tag":131,"props":4780,"children":4781},{"style":172},[4782],{"type":55,"value":625},{"type":49,"tag":131,"props":4784,"children":4786},{"class":133,"line":4785},17,[4787,4792,4797,4801,4805,4809,4813,4817],{"type":49,"tag":131,"props":4788,"children":4789},{"style":172},[4790],{"type":55,"value":4791},"  {",{"type":49,"tag":131,"props":4793,"children":4794},{"style":178},[4795],{"type":55,"value":4796}," dtype",{"type":49,"tag":131,"props":4798,"children":4799},{"style":172},[4800],{"type":55,"value":933},{"type":49,"tag":131,"props":4802,"children":4803},{"style":172},[4804],{"type":55,"value":316},{"type":49,"tag":131,"props":4806,"children":4807},{"style":144},[4808],{"type":55,"value":1075},{"type":49,"tag":131,"props":4810,"children":4811},{"style":172},[4812],{"type":55,"value":326},{"type":49,"tag":131,"props":4814,"children":4815},{"style":172},[4816],{"type":55,"value":306},{"type":49,"tag":131,"props":4818,"children":4819},{"style":346},[4820],{"type":55,"value":4821}," \u002F\u002F Use quantized version for faster inference\n",{"type":49,"tag":131,"props":4823,"children":4825},{"class":133,"line":4824},18,[4826,4830],{"type":49,"tag":131,"props":4827,"children":4828},{"style":218},[4829],{"type":55,"value":400},{"type":49,"tag":131,"props":4831,"children":4832},{"style":172},[4833],{"type":55,"value":331},{"type":49,"tag":131,"props":4835,"children":4837},{"class":133,"line":4836},19,[4838],{"type":49,"tag":131,"props":4839,"children":4840},{"emptyLinePlaceholder":337},[4841],{"type":55,"value":340},{"type":49,"tag":131,"props":4843,"children":4845},{"class":133,"line":4844},20,[4846,4850,4854,4858,4862,4866,4870,4874,4879,4883,4887],{"type":49,"tag":131,"props":4847,"children":4848},{"style":184},[4849],{"type":55,"value":358},{"type":49,"tag":131,"props":4851,"children":4852},{"style":218},[4853],{"type":55,"value":1839},{"type":49,"tag":131,"props":4855,"children":4856},{"style":172},[4857],{"type":55,"value":192},{"type":49,"tag":131,"props":4859,"children":4860},{"style":288},[4861],{"type":55,"value":372},{"type":49,"tag":131,"props":4863,"children":4864},{"style":375},[4865],{"type":55,"value":1615},{"type":49,"tag":131,"props":4867,"children":4868},{"style":218},[4869],{"type":55,"value":382},{"type":49,"tag":131,"props":4871,"children":4872},{"style":172},[4873],{"type":55,"value":326},{"type":49,"tag":131,"props":4875,"children":4876},{"style":144},[4877],{"type":55,"value":4878},"Explain quantum computing in simple terms.",{"type":49,"tag":131,"props":4880,"children":4881},{"style":172},[4882],{"type":55,"value":326},{"type":49,"tag":131,"props":4884,"children":4885},{"style":172},[4886],{"type":55,"value":820},{"type":49,"tag":131,"props":4888,"children":4889},{"style":172},[4890],{"type":55,"value":920},{"type":49,"tag":131,"props":4892,"children":4894},{"class":133,"line":4893},21,[4895,4899,4903],{"type":49,"tag":131,"props":4896,"children":4897},{"style":178},[4898],{"type":55,"value":1648},{"type":49,"tag":131,"props":4900,"children":4901},{"style":172},[4902],{"type":55,"value":933},{"type":49,"tag":131,"props":4904,"children":4905},{"style":1655},[4906],{"type":55,"value":4907}," 100\n",{"type":49,"tag":131,"props":4909,"children":4911},{"class":133,"line":4910},22,[4912,4916,4920],{"type":49,"tag":131,"props":4913,"children":4914},{"style":172},[4915],{"type":55,"value":236},{"type":49,"tag":131,"props":4917,"children":4918},{"style":218},[4919],{"type":55,"value":400},{"type":49,"tag":131,"props":4921,"children":4922},{"style":172},[4923],{"type":55,"value":331},{"type":49,"tag":131,"props":4925,"children":4927},{"class":133,"line":4926},23,[4928],{"type":49,"tag":131,"props":4929,"children":4930},{"emptyLinePlaceholder":337},[4931],{"type":55,"value":340},{"type":49,"tag":131,"props":4933,"children":4935},{"class":133,"line":4934},24,[4936,4940,4944,4948,4952,4956],{"type":49,"tag":131,"props":4937,"children":4938},{"style":288},[4939],{"type":55,"value":507},{"type":49,"tag":131,"props":4941,"children":4942},{"style":218},[4943],{"type":55,"value":1615},{"type":49,"tag":131,"props":4945,"children":4946},{"style":172},[4947],{"type":55,"value":516},{"type":49,"tag":131,"props":4949,"children":4950},{"style":375},[4951],{"type":55,"value":521},{"type":49,"tag":131,"props":4953,"children":4954},{"style":218},[4955],{"type":55,"value":526},{"type":49,"tag":131,"props":4957,"children":4958},{"style":172},[4959],{"type":55,"value":331},{"type":49,"tag":112,"props":4961,"children":4963},{"id":4962},"tips-for-model-selection",[4964],{"type":55,"value":4965},"Tips for Model Selection",{"type":49,"tag":4967,"props":4968,"children":4969},"ol",{},[4970,4980,4998,5008,5018,5042],{"type":49,"tag":80,"props":4971,"children":4972},{},[4973,4978],{"type":49,"tag":535,"props":4974,"children":4975},{},[4976],{"type":55,"value":4977},"Start Small",{"type":55,"value":4979},": Test with a smaller model first, then upgrade if needed",{"type":49,"tag":80,"props":4981,"children":4982},{},[4983,4988,4990,4996],{"type":49,"tag":535,"props":4984,"children":4985},{},[4986],{"type":55,"value":4987},"Check ONNX Support",{"type":55,"value":4989},": Ensure the model has ONNX files (look for ",{"type":49,"tag":127,"props":4991,"children":4993},{"className":4992},[],[4994],{"type":55,"value":4995},"onnx",{"type":55,"value":4997}," folder in model repo)",{"type":49,"tag":80,"props":4999,"children":5000},{},[5001,5006],{"type":49,"tag":535,"props":5002,"children":5003},{},[5004],{"type":55,"value":5005},"Read Model Cards",{"type":55,"value":5007},": Model cards contain usage examples, limitations, and benchmarks",{"type":49,"tag":80,"props":5009,"children":5010},{},[5011,5016],{"type":49,"tag":535,"props":5012,"children":5013},{},[5014],{"type":55,"value":5015},"Test Locally",{"type":55,"value":5017},": Benchmark inference speed and memory usage in your environment",{"type":49,"tag":80,"props":5019,"children":5020},{},[5021,5026,5028,5034,5036],{"type":49,"tag":535,"props":5022,"children":5023},{},[5024],{"type":55,"value":5025},"Filter by Library",{"type":55,"value":5027},": Use ",{"type":49,"tag":127,"props":5029,"children":5031},{"className":5030},[],[5032],{"type":55,"value":5033},"library=transformers.js",{"type":55,"value":5035}," to find compatible models: ",{"type":49,"tag":551,"props":5037,"children":5040},{"href":5038,"rel":5039},"https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js",[684],[5041],{"type":55,"value":5038},{"type":49,"tag":80,"props":5043,"children":5044},{},[5045,5050,5052],{"type":49,"tag":535,"props":5046,"children":5047},{},[5048],{"type":55,"value":5049},"Version Pin",{"type":55,"value":5051},": Use specific git commits in production for stability:\n",{"type":49,"tag":119,"props":5053,"children":5055},{"className":161,"code":5054,"language":23,"meta":124,"style":124},"const pipe = await pipeline('task', 'model-id', { revision: 'abc123' });\n",[5056],{"type":49,"tag":127,"props":5057,"children":5058},{"__ignoreMap":124},[5059],{"type":49,"tag":131,"props":5060,"children":5061},{"class":133,"line":134},[5062,5066,5070,5074,5078,5082,5086,5090,5095,5099,5103,5107,5111,5115,5119,5123,5128,5132,5136,5141,5145,5149,5153],{"type":49,"tag":131,"props":5063,"children":5064},{"style":184},[5065],{"type":55,"value":358},{"type":49,"tag":131,"props":5067,"children":5068},{"style":218},[5069],{"type":55,"value":363},{"type":49,"tag":131,"props":5071,"children":5072},{"style":172},[5073],{"type":55,"value":192},{"type":49,"tag":131,"props":5075,"children":5076},{"style":288},[5077],{"type":55,"value":372},{"type":49,"tag":131,"props":5079,"children":5080},{"style":375},[5081],{"type":55,"value":301},{"type":49,"tag":131,"props":5083,"children":5084},{"style":218},[5085],{"type":55,"value":382},{"type":49,"tag":131,"props":5087,"children":5088},{"style":172},[5089],{"type":55,"value":326},{"type":49,"tag":131,"props":5091,"children":5092},{"style":144},[5093],{"type":55,"value":5094},"task",{"type":49,"tag":131,"props":5096,"children":5097},{"style":172},[5098],{"type":55,"value":326},{"type":49,"tag":131,"props":5100,"children":5101},{"style":172},[5102],{"type":55,"value":820},{"type":49,"tag":131,"props":5104,"children":5105},{"style":172},[5106],{"type":55,"value":316},{"type":49,"tag":131,"props":5108,"children":5109},{"style":144},[5110],{"type":55,"value":829},{"type":49,"tag":131,"props":5112,"children":5113},{"style":172},[5114],{"type":55,"value":326},{"type":49,"tag":131,"props":5116,"children":5117},{"style":172},[5118],{"type":55,"value":820},{"type":49,"tag":131,"props":5120,"children":5121},{"style":172},[5122],{"type":55,"value":296},{"type":49,"tag":131,"props":5124,"children":5125},{"style":178},[5126],{"type":55,"value":5127}," revision",{"type":49,"tag":131,"props":5129,"children":5130},{"style":172},[5131],{"type":55,"value":933},{"type":49,"tag":131,"props":5133,"children":5134},{"style":172},[5135],{"type":55,"value":316},{"type":49,"tag":131,"props":5137,"children":5138},{"style":144},[5139],{"type":55,"value":5140},"abc123",{"type":49,"tag":131,"props":5142,"children":5143},{"style":172},[5144],{"type":55,"value":326},{"type":49,"tag":131,"props":5146,"children":5147},{"style":172},[5148],{"type":55,"value":306},{"type":49,"tag":131,"props":5150,"children":5151},{"style":218},[5152],{"type":55,"value":400},{"type":49,"tag":131,"props":5154,"children":5155},{"style":172},[5156],{"type":55,"value":331},{"type":49,"tag":64,"props":5158,"children":5160},{"id":5159},"advanced-configuration",[5161],{"type":55,"value":5162},"Advanced Configuration",{"type":49,"tag":112,"props":5164,"children":5166},{"id":5165},"environment-configuration-env",[5167,5169,5175],{"type":55,"value":5168},"Environment Configuration (",{"type":49,"tag":127,"props":5170,"children":5172},{"className":5171},[],[5173],{"type":55,"value":5174},"env",{"type":55,"value":400},{"type":49,"tag":58,"props":5177,"children":5178},{},[5179,5181,5186],{"type":55,"value":5180},"The ",{"type":49,"tag":127,"props":5182,"children":5184},{"className":5183},[],[5185],{"type":55,"value":5174},{"type":55,"value":5187}," object provides comprehensive control over Transformers.js execution, caching, and model loading.",{"type":49,"tag":58,"props":5189,"children":5190},{},[5191],{"type":49,"tag":535,"props":5192,"children":5193},{},[5194],{"type":55,"value":5195},"Quick Overview:",{"type":49,"tag":119,"props":5197,"children":5199},{"className":161,"code":5198,"language":23,"meta":124,"style":124},"import { env, LogLevel } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F View version\nconsole.log(env.version); \u002F\u002F e.g., '4.x'\n\n\u002F\u002F Common settings\nenv.allowRemoteModels = true;  \u002F\u002F Load from Hugging Face Hub\nenv.allowLocalModels = false;  \u002F\u002F Load from file system\nenv.localModelPath = '\u002Fmodels\u002F'; \u002F\u002F Local model directory\nenv.useFSCache = true;         \u002F\u002F Cache models on disk (Node.js)\nenv.useBrowserCache = true;    \u002F\u002F Cache models in browser\nenv.cacheDir = '.\u002F.cache';     \u002F\u002F Cache directory location\n\u002F\u002F Optional: override logging level (default is LogLevel.WARNING)\nenv.logLevel = LogLevel.INFO;\n\n\u002F\u002F Optional: custom fetch for auth headers, retries, abort signals, etc.\nenv.fetch = (url, options) =>\n  fetch(url, {\n    ...options,\n    headers: {\n      ...options?.headers,\n      Authorization: `Bearer ${HF_TOKEN}`,\n    },\n  });\n",[5200],{"type":49,"tag":127,"props":5201,"children":5202},{"__ignoreMap":124},[5203,5252,5259,5267,5308,5315,5323,5356,5390,5432,5465,5498,5540,5548,5585,5592,5600,5650,5671,5688,5704,5730,5771,5779],{"type":49,"tag":131,"props":5204,"children":5205},{"class":133,"line":134},[5206,5210,5214,5219,5223,5228,5232,5236,5240,5244,5248],{"type":49,"tag":131,"props":5207,"children":5208},{"style":288},[5209],{"type":55,"value":291},{"type":49,"tag":131,"props":5211,"children":5212},{"style":172},[5213],{"type":55,"value":296},{"type":49,"tag":131,"props":5215,"children":5216},{"style":218},[5217],{"type":55,"value":5218}," env",{"type":49,"tag":131,"props":5220,"children":5221},{"style":172},[5222],{"type":55,"value":820},{"type":49,"tag":131,"props":5224,"children":5225},{"style":218},[5226],{"type":55,"value":5227}," LogLevel",{"type":49,"tag":131,"props":5229,"children":5230},{"style":172},[5231],{"type":55,"value":306},{"type":49,"tag":131,"props":5233,"children":5234},{"style":288},[5235],{"type":55,"value":311},{"type":49,"tag":131,"props":5237,"children":5238},{"style":172},[5239],{"type":55,"value":316},{"type":49,"tag":131,"props":5241,"children":5242},{"style":144},[5243],{"type":55,"value":321},{"type":49,"tag":131,"props":5245,"children":5246},{"style":172},[5247],{"type":55,"value":326},{"type":49,"tag":131,"props":5249,"children":5250},{"style":172},[5251],{"type":55,"value":331},{"type":49,"tag":131,"props":5253,"children":5254},{"class":133,"line":214},[5255],{"type":49,"tag":131,"props":5256,"children":5257},{"emptyLinePlaceholder":337},[5258],{"type":55,"value":340},{"type":49,"tag":131,"props":5260,"children":5261},{"class":133,"line":244},[5262],{"type":49,"tag":131,"props":5263,"children":5264},{"style":346},[5265],{"type":55,"value":5266},"\u002F\u002F View version\n",{"type":49,"tag":131,"props":5268,"children":5269},{"class":133,"line":352},[5270,5275,5279,5284,5289,5293,5298,5303],{"type":49,"tag":131,"props":5271,"children":5272},{"style":218},[5273],{"type":55,"value":5274},"console",{"type":49,"tag":131,"props":5276,"children":5277},{"style":172},[5278],{"type":55,"value":516},{"type":49,"tag":131,"props":5280,"children":5281},{"style":375},[5282],{"type":55,"value":5283},"log",{"type":49,"tag":131,"props":5285,"children":5286},{"style":218},[5287],{"type":55,"value":5288},"(env",{"type":49,"tag":131,"props":5290,"children":5291},{"style":172},[5292],{"type":55,"value":516},{"type":49,"tag":131,"props":5294,"children":5295},{"style":218},[5296],{"type":55,"value":5297},"version)",{"type":49,"tag":131,"props":5299,"children":5300},{"style":172},[5301],{"type":55,"value":5302},";",{"type":49,"tag":131,"props":5304,"children":5305},{"style":346},[5306],{"type":55,"value":5307}," \u002F\u002F e.g., '4.x'\n",{"type":49,"tag":131,"props":5309,"children":5310},{"class":133,"line":407},[5311],{"type":49,"tag":131,"props":5312,"children":5313},{"emptyLinePlaceholder":337},[5314],{"type":55,"value":340},{"type":49,"tag":131,"props":5316,"children":5317},{"class":133,"line":415},[5318],{"type":49,"tag":131,"props":5319,"children":5320},{"style":346},[5321],{"type":55,"value":5322},"\u002F\u002F Common settings\n",{"type":49,"tag":131,"props":5324,"children":5325},{"class":133,"line":424},[5326,5330,5334,5339,5343,5347,5351],{"type":49,"tag":131,"props":5327,"children":5328},{"style":218},[5329],{"type":55,"value":5174},{"type":49,"tag":131,"props":5331,"children":5332},{"style":172},[5333],{"type":55,"value":516},{"type":49,"tag":131,"props":5335,"children":5336},{"style":218},[5337],{"type":55,"value":5338},"allowRemoteModels ",{"type":49,"tag":131,"props":5340,"children":5341},{"style":172},[5342],{"type":55,"value":192},{"type":49,"tag":131,"props":5344,"children":5345},{"style":3997},[5346],{"type":55,"value":4000},{"type":49,"tag":131,"props":5348,"children":5349},{"style":172},[5350],{"type":55,"value":5302},{"type":49,"tag":131,"props":5352,"children":5353},{"style":346},[5354],{"type":55,"value":5355},"  \u002F\u002F Load from Hugging Face Hub\n",{"type":49,"tag":131,"props":5357,"children":5358},{"class":133,"line":475},[5359,5363,5367,5372,5376,5381,5385],{"type":49,"tag":131,"props":5360,"children":5361},{"style":218},[5362],{"type":55,"value":5174},{"type":49,"tag":131,"props":5364,"children":5365},{"style":172},[5366],{"type":55,"value":516},{"type":49,"tag":131,"props":5368,"children":5369},{"style":218},[5370],{"type":55,"value":5371},"allowLocalModels ",{"type":49,"tag":131,"props":5373,"children":5374},{"style":172},[5375],{"type":55,"value":192},{"type":49,"tag":131,"props":5377,"children":5378},{"style":3997},[5379],{"type":55,"value":5380}," false",{"type":49,"tag":131,"props":5382,"children":5383},{"style":172},[5384],{"type":55,"value":5302},{"type":49,"tag":131,"props":5386,"children":5387},{"style":346},[5388],{"type":55,"value":5389},"  \u002F\u002F Load from file system\n",{"type":49,"tag":131,"props":5391,"children":5392},{"class":133,"line":484},[5393,5397,5401,5406,5410,5414,5419,5423,5427],{"type":49,"tag":131,"props":5394,"children":5395},{"style":218},[5396],{"type":55,"value":5174},{"type":49,"tag":131,"props":5398,"children":5399},{"style":172},[5400],{"type":55,"value":516},{"type":49,"tag":131,"props":5402,"children":5403},{"style":218},[5404],{"type":55,"value":5405},"localModelPath ",{"type":49,"tag":131,"props":5407,"children":5408},{"style":172},[5409],{"type":55,"value":192},{"type":49,"tag":131,"props":5411,"children":5412},{"style":172},[5413],{"type":55,"value":316},{"type":49,"tag":131,"props":5415,"children":5416},{"style":144},[5417],{"type":55,"value":5418},"\u002Fmodels\u002F",{"type":49,"tag":131,"props":5420,"children":5421},{"style":172},[5422],{"type":55,"value":326},{"type":49,"tag":131,"props":5424,"children":5425},{"style":172},[5426],{"type":55,"value":5302},{"type":49,"tag":131,"props":5428,"children":5429},{"style":346},[5430],{"type":55,"value":5431}," \u002F\u002F Local model directory\n",{"type":49,"tag":131,"props":5433,"children":5434},{"class":133,"line":492},[5435,5439,5443,5448,5452,5456,5460],{"type":49,"tag":131,"props":5436,"children":5437},{"style":218},[5438],{"type":55,"value":5174},{"type":49,"tag":131,"props":5440,"children":5441},{"style":172},[5442],{"type":55,"value":516},{"type":49,"tag":131,"props":5444,"children":5445},{"style":218},[5446],{"type":55,"value":5447},"useFSCache ",{"type":49,"tag":131,"props":5449,"children":5450},{"style":172},[5451],{"type":55,"value":192},{"type":49,"tag":131,"props":5453,"children":5454},{"style":3997},[5455],{"type":55,"value":4000},{"type":49,"tag":131,"props":5457,"children":5458},{"style":172},[5459],{"type":55,"value":5302},{"type":49,"tag":131,"props":5461,"children":5462},{"style":346},[5463],{"type":55,"value":5464},"         \u002F\u002F Cache models on disk (Node.js)\n",{"type":49,"tag":131,"props":5466,"children":5467},{"class":133,"line":501},[5468,5472,5476,5481,5485,5489,5493],{"type":49,"tag":131,"props":5469,"children":5470},{"style":218},[5471],{"type":55,"value":5174},{"type":49,"tag":131,"props":5473,"children":5474},{"style":172},[5475],{"type":55,"value":516},{"type":49,"tag":131,"props":5477,"children":5478},{"style":218},[5479],{"type":55,"value":5480},"useBrowserCache ",{"type":49,"tag":131,"props":5482,"children":5483},{"style":172},[5484],{"type":55,"value":192},{"type":49,"tag":131,"props":5486,"children":5487},{"style":3997},[5488],{"type":55,"value":4000},{"type":49,"tag":131,"props":5490,"children":5491},{"style":172},[5492],{"type":55,"value":5302},{"type":49,"tag":131,"props":5494,"children":5495},{"style":346},[5496],{"type":55,"value":5497},"    \u002F\u002F Cache models in browser\n",{"type":49,"tag":131,"props":5499,"children":5500},{"class":133,"line":4669},[5501,5505,5509,5514,5518,5522,5527,5531,5535],{"type":49,"tag":131,"props":5502,"children":5503},{"style":218},[5504],{"type":55,"value":5174},{"type":49,"tag":131,"props":5506,"children":5507},{"style":172},[5508],{"type":55,"value":516},{"type":49,"tag":131,"props":5510,"children":5511},{"style":218},[5512],{"type":55,"value":5513},"cacheDir ",{"type":49,"tag":131,"props":5515,"children":5516},{"style":172},[5517],{"type":55,"value":192},{"type":49,"tag":131,"props":5519,"children":5520},{"style":172},[5521],{"type":55,"value":316},{"type":49,"tag":131,"props":5523,"children":5524},{"style":144},[5525],{"type":55,"value":5526},".\u002F.cache",{"type":49,"tag":131,"props":5528,"children":5529},{"style":172},[5530],{"type":55,"value":326},{"type":49,"tag":131,"props":5532,"children":5533},{"style":172},[5534],{"type":55,"value":5302},{"type":49,"tag":131,"props":5536,"children":5537},{"style":346},[5538],{"type":55,"value":5539},"     \u002F\u002F Cache directory location\n",{"type":49,"tag":131,"props":5541,"children":5542},{"class":133,"line":4709},[5543],{"type":49,"tag":131,"props":5544,"children":5545},{"style":346},[5546],{"type":55,"value":5547},"\u002F\u002F Optional: override logging level (default is LogLevel.WARNING)\n",{"type":49,"tag":131,"props":5549,"children":5550},{"class":133,"line":4717},[5551,5555,5559,5564,5568,5572,5576,5581],{"type":49,"tag":131,"props":5552,"children":5553},{"style":218},[5554],{"type":55,"value":5174},{"type":49,"tag":131,"props":5556,"children":5557},{"style":172},[5558],{"type":55,"value":516},{"type":49,"tag":131,"props":5560,"children":5561},{"style":218},[5562],{"type":55,"value":5563},"logLevel ",{"type":49,"tag":131,"props":5565,"children":5566},{"style":172},[5567],{"type":55,"value":192},{"type":49,"tag":131,"props":5569,"children":5570},{"style":218},[5571],{"type":55,"value":5227},{"type":49,"tag":131,"props":5573,"children":5574},{"style":172},[5575],{"type":55,"value":516},{"type":49,"tag":131,"props":5577,"children":5578},{"style":218},[5579],{"type":55,"value":5580},"INFO",{"type":49,"tag":131,"props":5582,"children":5583},{"style":172},[5584],{"type":55,"value":331},{"type":49,"tag":131,"props":5586,"children":5587},{"class":133,"line":4745},[5588],{"type":49,"tag":131,"props":5589,"children":5590},{"emptyLinePlaceholder":337},[5591],{"type":55,"value":340},{"type":49,"tag":131,"props":5593,"children":5594},{"class":133,"line":4765},[5595],{"type":49,"tag":131,"props":5596,"children":5597},{"style":346},[5598],{"type":55,"value":5599},"\u002F\u002F Optional: custom fetch for auth headers, retries, abort signals, etc.\n",{"type":49,"tag":131,"props":5601,"children":5602},{"class":133,"line":4785},[5603,5607,5611,5616,5621,5626,5632,5636,5641,5645],{"type":49,"tag":131,"props":5604,"children":5605},{"style":218},[5606],{"type":55,"value":5174},{"type":49,"tag":131,"props":5608,"children":5609},{"style":172},[5610],{"type":55,"value":516},{"type":49,"tag":131,"props":5612,"children":5613},{"style":375},[5614],{"type":55,"value":5615},"fetch",{"type":49,"tag":131,"props":5617,"children":5618},{"style":172},[5619],{"type":55,"value":5620}," =",{"type":49,"tag":131,"props":5622,"children":5623},{"style":172},[5624],{"type":55,"value":5625}," (",{"type":49,"tag":131,"props":5627,"children":5629},{"style":5628},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[5630],{"type":55,"value":5631},"url",{"type":49,"tag":131,"props":5633,"children":5634},{"style":172},[5635],{"type":55,"value":820},{"type":49,"tag":131,"props":5637,"children":5638},{"style":5628},[5639],{"type":55,"value":5640}," options",{"type":49,"tag":131,"props":5642,"children":5643},{"style":172},[5644],{"type":55,"value":400},{"type":49,"tag":131,"props":5646,"children":5647},{"style":184},[5648],{"type":55,"value":5649}," =>\n",{"type":49,"tag":131,"props":5651,"children":5652},{"class":133,"line":4824},[5653,5658,5663,5667],{"type":49,"tag":131,"props":5654,"children":5655},{"style":375},[5656],{"type":55,"value":5657},"  fetch",{"type":49,"tag":131,"props":5659,"children":5660},{"style":218},[5661],{"type":55,"value":5662},"(url",{"type":49,"tag":131,"props":5664,"children":5665},{"style":172},[5666],{"type":55,"value":820},{"type":49,"tag":131,"props":5668,"children":5669},{"style":172},[5670],{"type":55,"value":920},{"type":49,"tag":131,"props":5672,"children":5673},{"class":133,"line":4836},[5674,5679,5684],{"type":49,"tag":131,"props":5675,"children":5676},{"style":172},[5677],{"type":55,"value":5678},"    ...",{"type":49,"tag":131,"props":5680,"children":5681},{"style":218},[5682],{"type":55,"value":5683},"options",{"type":49,"tag":131,"props":5685,"children":5686},{"style":172},[5687],{"type":55,"value":625},{"type":49,"tag":131,"props":5689,"children":5690},{"class":133,"line":4844},[5691,5696,5700],{"type":49,"tag":131,"props":5692,"children":5693},{"style":178},[5694],{"type":55,"value":5695},"    headers",{"type":49,"tag":131,"props":5697,"children":5698},{"style":172},[5699],{"type":55,"value":933},{"type":49,"tag":131,"props":5701,"children":5702},{"style":172},[5703],{"type":55,"value":920},{"type":49,"tag":131,"props":5705,"children":5706},{"class":133,"line":4893},[5707,5712,5716,5721,5726],{"type":49,"tag":131,"props":5708,"children":5709},{"style":172},[5710],{"type":55,"value":5711},"      ...",{"type":49,"tag":131,"props":5713,"children":5714},{"style":218},[5715],{"type":55,"value":5683},{"type":49,"tag":131,"props":5717,"children":5718},{"style":172},[5719],{"type":55,"value":5720},"?.",{"type":49,"tag":131,"props":5722,"children":5723},{"style":218},[5724],{"type":55,"value":5725},"headers",{"type":49,"tag":131,"props":5727,"children":5728},{"style":172},[5729],{"type":55,"value":625},{"type":49,"tag":131,"props":5731,"children":5732},{"class":133,"line":4910},[5733,5738,5742,5747,5752,5757,5762,5767],{"type":49,"tag":131,"props":5734,"children":5735},{"style":178},[5736],{"type":55,"value":5737},"      Authorization",{"type":49,"tag":131,"props":5739,"children":5740},{"style":172},[5741],{"type":55,"value":933},{"type":49,"tag":131,"props":5743,"children":5744},{"style":172},[5745],{"type":55,"value":5746}," `",{"type":49,"tag":131,"props":5748,"children":5749},{"style":144},[5750],{"type":55,"value":5751},"Bearer ",{"type":49,"tag":131,"props":5753,"children":5754},{"style":172},[5755],{"type":55,"value":5756},"${",{"type":49,"tag":131,"props":5758,"children":5759},{"style":218},[5760],{"type":55,"value":5761},"HF_TOKEN",{"type":49,"tag":131,"props":5763,"children":5764},{"style":172},[5765],{"type":55,"value":5766},"}`",{"type":49,"tag":131,"props":5768,"children":5769},{"style":172},[5770],{"type":55,"value":625},{"type":49,"tag":131,"props":5772,"children":5773},{"class":133,"line":4926},[5774],{"type":49,"tag":131,"props":5775,"children":5776},{"style":172},[5777],{"type":55,"value":5778},"    },\n",{"type":49,"tag":131,"props":5780,"children":5781},{"class":133,"line":4934},[5782,5787,5791],{"type":49,"tag":131,"props":5783,"children":5784},{"style":172},[5785],{"type":55,"value":5786},"  }",{"type":49,"tag":131,"props":5788,"children":5789},{"style":218},[5790],{"type":55,"value":400},{"type":49,"tag":131,"props":5792,"children":5793},{"style":172},[5794],{"type":55,"value":331},{"type":49,"tag":58,"props":5796,"children":5797},{},[5798],{"type":49,"tag":535,"props":5799,"children":5800},{},[5801],{"type":55,"value":5802},"Configuration Patterns:",{"type":49,"tag":119,"props":5804,"children":5806},{"className":161,"code":5805,"language":23,"meta":124,"style":124},"\u002F\u002F Development: Fast iteration with remote models\nenv.allowRemoteModels = true;\nenv.useFSCache = true;\n\n\u002F\u002F Production: Local models only\nenv.allowRemoteModels = false;\nenv.allowLocalModels = true;\nenv.localModelPath = '\u002Fapp\u002Fmodels\u002F';\n\n\u002F\u002F Custom CDN\nenv.remoteHost = 'https:\u002F\u002Fcdn.example.com\u002Fmodels';\n\n\u002F\u002F Disable caching (testing)\nenv.useFSCache = false;\nenv.useBrowserCache = false;\n",[5807],{"type":49,"tag":127,"props":5808,"children":5809},{"__ignoreMap":124},[5810,5818,5845,5872,5879,5887,5914,5941,5977,5984,5992,6029,6036,6044,6071],{"type":49,"tag":131,"props":5811,"children":5812},{"class":133,"line":134},[5813],{"type":49,"tag":131,"props":5814,"children":5815},{"style":346},[5816],{"type":55,"value":5817},"\u002F\u002F Development: Fast iteration with remote models\n",{"type":49,"tag":131,"props":5819,"children":5820},{"class":133,"line":214},[5821,5825,5829,5833,5837,5841],{"type":49,"tag":131,"props":5822,"children":5823},{"style":218},[5824],{"type":55,"value":5174},{"type":49,"tag":131,"props":5826,"children":5827},{"style":172},[5828],{"type":55,"value":516},{"type":49,"tag":131,"props":5830,"children":5831},{"style":218},[5832],{"type":55,"value":5338},{"type":49,"tag":131,"props":5834,"children":5835},{"style":172},[5836],{"type":55,"value":192},{"type":49,"tag":131,"props":5838,"children":5839},{"style":3997},[5840],{"type":55,"value":4000},{"type":49,"tag":131,"props":5842,"children":5843},{"style":172},[5844],{"type":55,"value":331},{"type":49,"tag":131,"props":5846,"children":5847},{"class":133,"line":244},[5848,5852,5856,5860,5864,5868],{"type":49,"tag":131,"props":5849,"children":5850},{"style":218},[5851],{"type":55,"value":5174},{"type":49,"tag":131,"props":5853,"children":5854},{"style":172},[5855],{"type":55,"value":516},{"type":49,"tag":131,"props":5857,"children":5858},{"style":218},[5859],{"type":55,"value":5447},{"type":49,"tag":131,"props":5861,"children":5862},{"style":172},[5863],{"type":55,"value":192},{"type":49,"tag":131,"props":5865,"children":5866},{"style":3997},[5867],{"type":55,"value":4000},{"type":49,"tag":131,"props":5869,"children":5870},{"style":172},[5871],{"type":55,"value":331},{"type":49,"tag":131,"props":5873,"children":5874},{"class":133,"line":352},[5875],{"type":49,"tag":131,"props":5876,"children":5877},{"emptyLinePlaceholder":337},[5878],{"type":55,"value":340},{"type":49,"tag":131,"props":5880,"children":5881},{"class":133,"line":407},[5882],{"type":49,"tag":131,"props":5883,"children":5884},{"style":346},[5885],{"type":55,"value":5886},"\u002F\u002F Production: Local models only\n",{"type":49,"tag":131,"props":5888,"children":5889},{"class":133,"line":415},[5890,5894,5898,5902,5906,5910],{"type":49,"tag":131,"props":5891,"children":5892},{"style":218},[5893],{"type":55,"value":5174},{"type":49,"tag":131,"props":5895,"children":5896},{"style":172},[5897],{"type":55,"value":516},{"type":49,"tag":131,"props":5899,"children":5900},{"style":218},[5901],{"type":55,"value":5338},{"type":49,"tag":131,"props":5903,"children":5904},{"style":172},[5905],{"type":55,"value":192},{"type":49,"tag":131,"props":5907,"children":5908},{"style":3997},[5909],{"type":55,"value":5380},{"type":49,"tag":131,"props":5911,"children":5912},{"style":172},[5913],{"type":55,"value":331},{"type":49,"tag":131,"props":5915,"children":5916},{"class":133,"line":424},[5917,5921,5925,5929,5933,5937],{"type":49,"tag":131,"props":5918,"children":5919},{"style":218},[5920],{"type":55,"value":5174},{"type":49,"tag":131,"props":5922,"children":5923},{"style":172},[5924],{"type":55,"value":516},{"type":49,"tag":131,"props":5926,"children":5927},{"style":218},[5928],{"type":55,"value":5371},{"type":49,"tag":131,"props":5930,"children":5931},{"style":172},[5932],{"type":55,"value":192},{"type":49,"tag":131,"props":5934,"children":5935},{"style":3997},[5936],{"type":55,"value":4000},{"type":49,"tag":131,"props":5938,"children":5939},{"style":172},[5940],{"type":55,"value":331},{"type":49,"tag":131,"props":5942,"children":5943},{"class":133,"line":475},[5944,5948,5952,5956,5960,5964,5969,5973],{"type":49,"tag":131,"props":5945,"children":5946},{"style":218},[5947],{"type":55,"value":5174},{"type":49,"tag":131,"props":5949,"children":5950},{"style":172},[5951],{"type":55,"value":516},{"type":49,"tag":131,"props":5953,"children":5954},{"style":218},[5955],{"type":55,"value":5405},{"type":49,"tag":131,"props":5957,"children":5958},{"style":172},[5959],{"type":55,"value":192},{"type":49,"tag":131,"props":5961,"children":5962},{"style":172},[5963],{"type":55,"value":316},{"type":49,"tag":131,"props":5965,"children":5966},{"style":144},[5967],{"type":55,"value":5968},"\u002Fapp\u002Fmodels\u002F",{"type":49,"tag":131,"props":5970,"children":5971},{"style":172},[5972],{"type":55,"value":326},{"type":49,"tag":131,"props":5974,"children":5975},{"style":172},[5976],{"type":55,"value":331},{"type":49,"tag":131,"props":5978,"children":5979},{"class":133,"line":484},[5980],{"type":49,"tag":131,"props":5981,"children":5982},{"emptyLinePlaceholder":337},[5983],{"type":55,"value":340},{"type":49,"tag":131,"props":5985,"children":5986},{"class":133,"line":492},[5987],{"type":49,"tag":131,"props":5988,"children":5989},{"style":346},[5990],{"type":55,"value":5991},"\u002F\u002F Custom CDN\n",{"type":49,"tag":131,"props":5993,"children":5994},{"class":133,"line":501},[5995,5999,6003,6008,6012,6016,6021,6025],{"type":49,"tag":131,"props":5996,"children":5997},{"style":218},[5998],{"type":55,"value":5174},{"type":49,"tag":131,"props":6000,"children":6001},{"style":172},[6002],{"type":55,"value":516},{"type":49,"tag":131,"props":6004,"children":6005},{"style":218},[6006],{"type":55,"value":6007},"remoteHost ",{"type":49,"tag":131,"props":6009,"children":6010},{"style":172},[6011],{"type":55,"value":192},{"type":49,"tag":131,"props":6013,"children":6014},{"style":172},[6015],{"type":55,"value":316},{"type":49,"tag":131,"props":6017,"children":6018},{"style":144},[6019],{"type":55,"value":6020},"https:\u002F\u002Fcdn.example.com\u002Fmodels",{"type":49,"tag":131,"props":6022,"children":6023},{"style":172},[6024],{"type":55,"value":326},{"type":49,"tag":131,"props":6026,"children":6027},{"style":172},[6028],{"type":55,"value":331},{"type":49,"tag":131,"props":6030,"children":6031},{"class":133,"line":4669},[6032],{"type":49,"tag":131,"props":6033,"children":6034},{"emptyLinePlaceholder":337},[6035],{"type":55,"value":340},{"type":49,"tag":131,"props":6037,"children":6038},{"class":133,"line":4709},[6039],{"type":49,"tag":131,"props":6040,"children":6041},{"style":346},[6042],{"type":55,"value":6043},"\u002F\u002F Disable caching (testing)\n",{"type":49,"tag":131,"props":6045,"children":6046},{"class":133,"line":4717},[6047,6051,6055,6059,6063,6067],{"type":49,"tag":131,"props":6048,"children":6049},{"style":218},[6050],{"type":55,"value":5174},{"type":49,"tag":131,"props":6052,"children":6053},{"style":172},[6054],{"type":55,"value":516},{"type":49,"tag":131,"props":6056,"children":6057},{"style":218},[6058],{"type":55,"value":5447},{"type":49,"tag":131,"props":6060,"children":6061},{"style":172},[6062],{"type":55,"value":192},{"type":49,"tag":131,"props":6064,"children":6065},{"style":3997},[6066],{"type":55,"value":5380},{"type":49,"tag":131,"props":6068,"children":6069},{"style":172},[6070],{"type":55,"value":331},{"type":49,"tag":131,"props":6072,"children":6073},{"class":133,"line":4745},[6074,6078,6082,6086,6090,6094],{"type":49,"tag":131,"props":6075,"children":6076},{"style":218},[6077],{"type":55,"value":5174},{"type":49,"tag":131,"props":6079,"children":6080},{"style":172},[6081],{"type":55,"value":516},{"type":49,"tag":131,"props":6083,"children":6084},{"style":218},[6085],{"type":55,"value":5480},{"type":49,"tag":131,"props":6087,"children":6088},{"style":172},[6089],{"type":55,"value":192},{"type":49,"tag":131,"props":6091,"children":6092},{"style":3997},[6093],{"type":55,"value":5380},{"type":49,"tag":131,"props":6095,"children":6096},{"style":172},[6097],{"type":55,"value":331},{"type":49,"tag":58,"props":6099,"children":6100},{},[6101],{"type":55,"value":6102},"For complete documentation on all configuration options, caching strategies, cache management, pre-downloading models, and more, see:",{"type":49,"tag":58,"props":6104,"children":6105},{},[6106],{"type":49,"tag":535,"props":6107,"children":6108},{},[6109,6111],{"type":55,"value":6110},"→ ",{"type":49,"tag":551,"props":6112,"children":6114},{"href":6113},".\u002Freferences\u002FCONFIGURATION.md",[6115],{"type":55,"value":6116},"Configuration Reference",{"type":49,"tag":112,"props":6118,"children":6120},{"id":6119},"modelregistry-v4",[6121],{"type":55,"value":6122},"ModelRegistry (v4)",{"type":49,"tag":58,"props":6124,"children":6125},{},[6126,6132],{"type":49,"tag":127,"props":6127,"children":6129},{"className":6128},[],[6130],{"type":55,"value":6131},"ModelRegistry",{"type":55,"value":6133}," gives you visibility and control over model assets before loading a pipeline. Use it to estimate download size, check cache status, inspect available dtypes, and clear cached artifacts for a specific task\u002Fmodel\u002Foptions tuple.",{"type":49,"tag":119,"props":6135,"children":6137},{"className":161,"code":6136,"language":23,"meta":124,"style":124},"import { ModelRegistry } from '@huggingface\u002Ftransformers';\n\nconst task = 'feature-extraction';\nconst modelId = 'onnx-community\u002Fall-MiniLM-L6-v2-ONNX';\nconst modelOptions = { dtype: 'fp32' };\n\n\u002F\u002F List required files for this pipeline\nconst files = await ModelRegistry.get_pipeline_files(task, modelId, modelOptions);\n\n\u002F\u002F Check if assets are already cached\nconst cached = await ModelRegistry.is_pipeline_cached(task, modelId, modelOptions);\n\n\u002F\u002F Inspect precision formats available for this model\nconst dtypes = await ModelRegistry.get_available_dtypes(modelId);\n\nconsole.log({ files: files.length, cached, dtypes });\n",[6138],{"type":49,"tag":127,"props":6139,"children":6140},{"__ignoreMap":124},[6141,6181,6188,6220,6252,6297,6304,6312,6372,6379,6387,6444,6451,6459,6501,6508],{"type":49,"tag":131,"props":6142,"children":6143},{"class":133,"line":134},[6144,6148,6152,6157,6161,6165,6169,6173,6177],{"type":49,"tag":131,"props":6145,"children":6146},{"style":288},[6147],{"type":55,"value":291},{"type":49,"tag":131,"props":6149,"children":6150},{"style":172},[6151],{"type":55,"value":296},{"type":49,"tag":131,"props":6153,"children":6154},{"style":218},[6155],{"type":55,"value":6156}," ModelRegistry",{"type":49,"tag":131,"props":6158,"children":6159},{"style":172},[6160],{"type":55,"value":306},{"type":49,"tag":131,"props":6162,"children":6163},{"style":288},[6164],{"type":55,"value":311},{"type":49,"tag":131,"props":6166,"children":6167},{"style":172},[6168],{"type":55,"value":316},{"type":49,"tag":131,"props":6170,"children":6171},{"style":144},[6172],{"type":55,"value":321},{"type":49,"tag":131,"props":6174,"children":6175},{"style":172},[6176],{"type":55,"value":326},{"type":49,"tag":131,"props":6178,"children":6179},{"style":172},[6180],{"type":55,"value":331},{"type":49,"tag":131,"props":6182,"children":6183},{"class":133,"line":214},[6184],{"type":49,"tag":131,"props":6185,"children":6186},{"emptyLinePlaceholder":337},[6187],{"type":55,"value":340},{"type":49,"tag":131,"props":6189,"children":6190},{"class":133,"line":244},[6191,6195,6200,6204,6208,6212,6216],{"type":49,"tag":131,"props":6192,"children":6193},{"style":184},[6194],{"type":55,"value":358},{"type":49,"tag":131,"props":6196,"children":6197},{"style":218},[6198],{"type":55,"value":6199}," task ",{"type":49,"tag":131,"props":6201,"children":6202},{"style":172},[6203],{"type":55,"value":192},{"type":49,"tag":131,"props":6205,"children":6206},{"style":172},[6207],{"type":55,"value":316},{"type":49,"tag":131,"props":6209,"children":6210},{"style":144},[6211],{"type":55,"value":3762},{"type":49,"tag":131,"props":6213,"children":6214},{"style":172},[6215],{"type":55,"value":326},{"type":49,"tag":131,"props":6217,"children":6218},{"style":172},[6219],{"type":55,"value":331},{"type":49,"tag":131,"props":6221,"children":6222},{"class":133,"line":352},[6223,6227,6232,6236,6240,6244,6248],{"type":49,"tag":131,"props":6224,"children":6225},{"style":184},[6226],{"type":55,"value":358},{"type":49,"tag":131,"props":6228,"children":6229},{"style":218},[6230],{"type":55,"value":6231}," modelId ",{"type":49,"tag":131,"props":6233,"children":6234},{"style":172},[6235],{"type":55,"value":192},{"type":49,"tag":131,"props":6237,"children":6238},{"style":172},[6239],{"type":55,"value":316},{"type":49,"tag":131,"props":6241,"children":6242},{"style":144},[6243],{"type":55,"value":3899},{"type":49,"tag":131,"props":6245,"children":6246},{"style":172},[6247],{"type":55,"value":326},{"type":49,"tag":131,"props":6249,"children":6250},{"style":172},[6251],{"type":55,"value":331},{"type":49,"tag":131,"props":6253,"children":6254},{"class":133,"line":407},[6255,6259,6264,6268,6272,6276,6280,6284,6288,6292],{"type":49,"tag":131,"props":6256,"children":6257},{"style":184},[6258],{"type":55,"value":358},{"type":49,"tag":131,"props":6260,"children":6261},{"style":218},[6262],{"type":55,"value":6263}," modelOptions ",{"type":49,"tag":131,"props":6265,"children":6266},{"style":172},[6267],{"type":55,"value":192},{"type":49,"tag":131,"props":6269,"children":6270},{"style":172},[6271],{"type":55,"value":296},{"type":49,"tag":131,"props":6273,"children":6274},{"style":178},[6275],{"type":55,"value":4796},{"type":49,"tag":131,"props":6277,"children":6278},{"style":172},[6279],{"type":55,"value":933},{"type":49,"tag":131,"props":6281,"children":6282},{"style":172},[6283],{"type":55,"value":316},{"type":49,"tag":131,"props":6285,"children":6286},{"style":144},[6287],{"type":55,"value":4468},{"type":49,"tag":131,"props":6289,"children":6290},{"style":172},[6291],{"type":55,"value":326},{"type":49,"tag":131,"props":6293,"children":6294},{"style":172},[6295],{"type":55,"value":6296}," };\n",{"type":49,"tag":131,"props":6298,"children":6299},{"class":133,"line":415},[6300],{"type":49,"tag":131,"props":6301,"children":6302},{"emptyLinePlaceholder":337},[6303],{"type":55,"value":340},{"type":49,"tag":131,"props":6305,"children":6306},{"class":133,"line":424},[6307],{"type":49,"tag":131,"props":6308,"children":6309},{"style":346},[6310],{"type":55,"value":6311},"\u002F\u002F List required files for this pipeline\n",{"type":49,"tag":131,"props":6313,"children":6314},{"class":133,"line":475},[6315,6319,6324,6328,6332,6336,6340,6345,6350,6354,6359,6363,6368],{"type":49,"tag":131,"props":6316,"children":6317},{"style":184},[6318],{"type":55,"value":358},{"type":49,"tag":131,"props":6320,"children":6321},{"style":218},[6322],{"type":55,"value":6323}," files ",{"type":49,"tag":131,"props":6325,"children":6326},{"style":172},[6327],{"type":55,"value":192},{"type":49,"tag":131,"props":6329,"children":6330},{"style":288},[6331],{"type":55,"value":372},{"type":49,"tag":131,"props":6333,"children":6334},{"style":218},[6335],{"type":55,"value":6156},{"type":49,"tag":131,"props":6337,"children":6338},{"style":172},[6339],{"type":55,"value":516},{"type":49,"tag":131,"props":6341,"children":6342},{"style":375},[6343],{"type":55,"value":6344},"get_pipeline_files",{"type":49,"tag":131,"props":6346,"children":6347},{"style":218},[6348],{"type":55,"value":6349},"(task",{"type":49,"tag":131,"props":6351,"children":6352},{"style":172},[6353],{"type":55,"value":820},{"type":49,"tag":131,"props":6355,"children":6356},{"style":218},[6357],{"type":55,"value":6358}," modelId",{"type":49,"tag":131,"props":6360,"children":6361},{"style":172},[6362],{"type":55,"value":820},{"type":49,"tag":131,"props":6364,"children":6365},{"style":218},[6366],{"type":55,"value":6367}," modelOptions)",{"type":49,"tag":131,"props":6369,"children":6370},{"style":172},[6371],{"type":55,"value":331},{"type":49,"tag":131,"props":6373,"children":6374},{"class":133,"line":484},[6375],{"type":49,"tag":131,"props":6376,"children":6377},{"emptyLinePlaceholder":337},[6378],{"type":55,"value":340},{"type":49,"tag":131,"props":6380,"children":6381},{"class":133,"line":492},[6382],{"type":49,"tag":131,"props":6383,"children":6384},{"style":346},[6385],{"type":55,"value":6386},"\u002F\u002F Check if assets are already cached\n",{"type":49,"tag":131,"props":6388,"children":6389},{"class":133,"line":501},[6390,6394,6399,6403,6407,6411,6415,6420,6424,6428,6432,6436,6440],{"type":49,"tag":131,"props":6391,"children":6392},{"style":184},[6393],{"type":55,"value":358},{"type":49,"tag":131,"props":6395,"children":6396},{"style":218},[6397],{"type":55,"value":6398}," cached ",{"type":49,"tag":131,"props":6400,"children":6401},{"style":172},[6402],{"type":55,"value":192},{"type":49,"tag":131,"props":6404,"children":6405},{"style":288},[6406],{"type":55,"value":372},{"type":49,"tag":131,"props":6408,"children":6409},{"style":218},[6410],{"type":55,"value":6156},{"type":49,"tag":131,"props":6412,"children":6413},{"style":172},[6414],{"type":55,"value":516},{"type":49,"tag":131,"props":6416,"children":6417},{"style":375},[6418],{"type":55,"value":6419},"is_pipeline_cached",{"type":49,"tag":131,"props":6421,"children":6422},{"style":218},[6423],{"type":55,"value":6349},{"type":49,"tag":131,"props":6425,"children":6426},{"style":172},[6427],{"type":55,"value":820},{"type":49,"tag":131,"props":6429,"children":6430},{"style":218},[6431],{"type":55,"value":6358},{"type":49,"tag":131,"props":6433,"children":6434},{"style":172},[6435],{"type":55,"value":820},{"type":49,"tag":131,"props":6437,"children":6438},{"style":218},[6439],{"type":55,"value":6367},{"type":49,"tag":131,"props":6441,"children":6442},{"style":172},[6443],{"type":55,"value":331},{"type":49,"tag":131,"props":6445,"children":6446},{"class":133,"line":4669},[6447],{"type":49,"tag":131,"props":6448,"children":6449},{"emptyLinePlaceholder":337},[6450],{"type":55,"value":340},{"type":49,"tag":131,"props":6452,"children":6453},{"class":133,"line":4709},[6454],{"type":49,"tag":131,"props":6455,"children":6456},{"style":346},[6457],{"type":55,"value":6458},"\u002F\u002F Inspect precision formats available for this model\n",{"type":49,"tag":131,"props":6460,"children":6461},{"class":133,"line":4717},[6462,6466,6471,6475,6479,6483,6487,6492,6497],{"type":49,"tag":131,"props":6463,"children":6464},{"style":184},[6465],{"type":55,"value":358},{"type":49,"tag":131,"props":6467,"children":6468},{"style":218},[6469],{"type":55,"value":6470}," dtypes ",{"type":49,"tag":131,"props":6472,"children":6473},{"style":172},[6474],{"type":55,"value":192},{"type":49,"tag":131,"props":6476,"children":6477},{"style":288},[6478],{"type":55,"value":372},{"type":49,"tag":131,"props":6480,"children":6481},{"style":218},[6482],{"type":55,"value":6156},{"type":49,"tag":131,"props":6484,"children":6485},{"style":172},[6486],{"type":55,"value":516},{"type":49,"tag":131,"props":6488,"children":6489},{"style":375},[6490],{"type":55,"value":6491},"get_available_dtypes",{"type":49,"tag":131,"props":6493,"children":6494},{"style":218},[6495],{"type":55,"value":6496},"(modelId)",{"type":49,"tag":131,"props":6498,"children":6499},{"style":172},[6500],{"type":55,"value":331},{"type":49,"tag":131,"props":6502,"children":6503},{"class":133,"line":4745},[6504],{"type":49,"tag":131,"props":6505,"children":6506},{"emptyLinePlaceholder":337},[6507],{"type":55,"value":340},{"type":49,"tag":131,"props":6509,"children":6510},{"class":133,"line":4765},[6511,6515,6519,6523,6527,6531,6536,6540,6544,6548,6553,6557,6562,6566,6570,6574,6578],{"type":49,"tag":131,"props":6512,"children":6513},{"style":218},[6514],{"type":55,"value":5274},{"type":49,"tag":131,"props":6516,"children":6517},{"style":172},[6518],{"type":55,"value":516},{"type":49,"tag":131,"props":6520,"children":6521},{"style":375},[6522],{"type":55,"value":5283},{"type":49,"tag":131,"props":6524,"children":6525},{"style":218},[6526],{"type":55,"value":382},{"type":49,"tag":131,"props":6528,"children":6529},{"style":172},[6530],{"type":55,"value":226},{"type":49,"tag":131,"props":6532,"children":6533},{"style":178},[6534],{"type":55,"value":6535}," files",{"type":49,"tag":131,"props":6537,"children":6538},{"style":172},[6539],{"type":55,"value":933},{"type":49,"tag":131,"props":6541,"children":6542},{"style":218},[6543],{"type":55,"value":6535},{"type":49,"tag":131,"props":6545,"children":6546},{"style":172},[6547],{"type":55,"value":516},{"type":49,"tag":131,"props":6549,"children":6550},{"style":218},[6551],{"type":55,"value":6552},"length",{"type":49,"tag":131,"props":6554,"children":6555},{"style":172},[6556],{"type":55,"value":820},{"type":49,"tag":131,"props":6558,"children":6559},{"style":218},[6560],{"type":55,"value":6561}," cached",{"type":49,"tag":131,"props":6563,"children":6564},{"style":172},[6565],{"type":55,"value":820},{"type":49,"tag":131,"props":6567,"children":6568},{"style":218},[6569],{"type":55,"value":6470},{"type":49,"tag":131,"props":6571,"children":6572},{"style":172},[6573],{"type":55,"value":236},{"type":49,"tag":131,"props":6575,"children":6576},{"style":218},[6577],{"type":55,"value":400},{"type":49,"tag":131,"props":6579,"children":6580},{"style":172},[6581],{"type":55,"value":331},{"type":49,"tag":58,"props":6583,"children":6584},{},[6585,6587,6596],{"type":55,"value":6586},"For production patterns and full API coverage, see ",{"type":49,"tag":535,"props":6588,"children":6589},{},[6590],{"type":49,"tag":551,"props":6591,"children":6593},{"href":6592},".\u002Freferences\u002FMODEL_REGISTRY.md",[6594],{"type":55,"value":6595},"ModelRegistry Reference",{"type":55,"value":516},{"type":49,"tag":112,"props":6598,"children":6600},{"id":6599},"standalone-tokenization-huggingfacetokenizers",[6601,6603,6609],{"type":55,"value":6602},"Standalone Tokenization (",{"type":49,"tag":127,"props":6604,"children":6606},{"className":6605},[],[6607],{"type":55,"value":6608},"@huggingface\u002Ftokenizers",{"type":55,"value":400},{"type":49,"tag":58,"props":6611,"children":6612},{},[6613,6615,6620],{"type":55,"value":6614},"For tokenization-only workflows, use ",{"type":49,"tag":127,"props":6616,"children":6618},{"className":6617},[],[6619],{"type":55,"value":6608},{"type":55,"value":6621},". It is a separate lightweight package useful when you need fast tokenization\u002Fencoding without loading full model inference pipelines.",{"type":49,"tag":119,"props":6623,"children":6625},{"className":121,"code":6624,"language":123,"meta":124,"style":124},"npm install @huggingface\u002Ftokenizers\n",[6626],{"type":49,"tag":127,"props":6627,"children":6628},{"__ignoreMap":124},[6629],{"type":49,"tag":131,"props":6630,"children":6631},{"class":133,"line":134},[6632,6636,6640],{"type":49,"tag":131,"props":6633,"children":6634},{"style":138},[6635],{"type":55,"value":141},{"type":49,"tag":131,"props":6637,"children":6638},{"style":144},[6639],{"type":55,"value":147},{"type":49,"tag":131,"props":6641,"children":6642},{"style":144},[6643],{"type":55,"value":6644}," @huggingface\u002Ftokenizers\n",{"type":49,"tag":119,"props":6646,"children":6648},{"className":161,"code":6647,"language":23,"meta":124,"style":124},"import { Tokenizer } from '@huggingface\u002Ftokenizers';\n",[6649],{"type":49,"tag":127,"props":6650,"children":6651},{"__ignoreMap":124},[6652],{"type":49,"tag":131,"props":6653,"children":6654},{"class":133,"line":134},[6655,6659,6663,6668,6672,6676,6680,6684,6688],{"type":49,"tag":131,"props":6656,"children":6657},{"style":288},[6658],{"type":55,"value":291},{"type":49,"tag":131,"props":6660,"children":6661},{"style":172},[6662],{"type":55,"value":296},{"type":49,"tag":131,"props":6664,"children":6665},{"style":218},[6666],{"type":55,"value":6667}," Tokenizer",{"type":49,"tag":131,"props":6669,"children":6670},{"style":172},[6671],{"type":55,"value":306},{"type":49,"tag":131,"props":6673,"children":6674},{"style":288},[6675],{"type":55,"value":311},{"type":49,"tag":131,"props":6677,"children":6678},{"style":172},[6679],{"type":55,"value":316},{"type":49,"tag":131,"props":6681,"children":6682},{"style":144},[6683],{"type":55,"value":6608},{"type":49,"tag":131,"props":6685,"children":6686},{"style":172},[6687],{"type":55,"value":326},{"type":49,"tag":131,"props":6689,"children":6690},{"style":172},[6691],{"type":55,"value":331},{"type":49,"tag":112,"props":6693,"children":6695},{"id":6694},"working-with-tensors",[6696],{"type":55,"value":6697},"Working with Tensors",{"type":49,"tag":119,"props":6699,"children":6701},{"className":161,"code":6700,"language":23,"meta":124,"style":124},"import { AutoTokenizer, AutoModel } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Load tokenizer and model separately for more control\nconst tokenizer = await AutoTokenizer.from_pretrained('bert-base-uncased');\nconst model = await AutoModel.from_pretrained('bert-base-uncased');\n\n\u002F\u002F Tokenize input\nconst inputs = await tokenizer('Hello world!');\n\n\u002F\u002F Run model\nconst outputs = await model(inputs);\n",[6702],{"type":49,"tag":127,"props":6703,"children":6704},{"__ignoreMap":124},[6705,6754,6761,6769,6827,6883,6890,6898,6948,6955,6963],{"type":49,"tag":131,"props":6706,"children":6707},{"class":133,"line":134},[6708,6712,6716,6721,6725,6730,6734,6738,6742,6746,6750],{"type":49,"tag":131,"props":6709,"children":6710},{"style":288},[6711],{"type":55,"value":291},{"type":49,"tag":131,"props":6713,"children":6714},{"style":172},[6715],{"type":55,"value":296},{"type":49,"tag":131,"props":6717,"children":6718},{"style":218},[6719],{"type":55,"value":6720}," AutoTokenizer",{"type":49,"tag":131,"props":6722,"children":6723},{"style":172},[6724],{"type":55,"value":820},{"type":49,"tag":131,"props":6726,"children":6727},{"style":218},[6728],{"type":55,"value":6729}," AutoModel",{"type":49,"tag":131,"props":6731,"children":6732},{"style":172},[6733],{"type":55,"value":306},{"type":49,"tag":131,"props":6735,"children":6736},{"style":288},[6737],{"type":55,"value":311},{"type":49,"tag":131,"props":6739,"children":6740},{"style":172},[6741],{"type":55,"value":316},{"type":49,"tag":131,"props":6743,"children":6744},{"style":144},[6745],{"type":55,"value":321},{"type":49,"tag":131,"props":6747,"children":6748},{"style":172},[6749],{"type":55,"value":326},{"type":49,"tag":131,"props":6751,"children":6752},{"style":172},[6753],{"type":55,"value":331},{"type":49,"tag":131,"props":6755,"children":6756},{"class":133,"line":214},[6757],{"type":49,"tag":131,"props":6758,"children":6759},{"emptyLinePlaceholder":337},[6760],{"type":55,"value":340},{"type":49,"tag":131,"props":6762,"children":6763},{"class":133,"line":244},[6764],{"type":49,"tag":131,"props":6765,"children":6766},{"style":346},[6767],{"type":55,"value":6768},"\u002F\u002F Load tokenizer and model separately for more control\n",{"type":49,"tag":131,"props":6770,"children":6771},{"class":133,"line":352},[6772,6776,6781,6785,6789,6793,6797,6802,6806,6810,6815,6819,6823],{"type":49,"tag":131,"props":6773,"children":6774},{"style":184},[6775],{"type":55,"value":358},{"type":49,"tag":131,"props":6777,"children":6778},{"style":218},[6779],{"type":55,"value":6780}," tokenizer ",{"type":49,"tag":131,"props":6782,"children":6783},{"style":172},[6784],{"type":55,"value":192},{"type":49,"tag":131,"props":6786,"children":6787},{"style":288},[6788],{"type":55,"value":372},{"type":49,"tag":131,"props":6790,"children":6791},{"style":218},[6792],{"type":55,"value":6720},{"type":49,"tag":131,"props":6794,"children":6795},{"style":172},[6796],{"type":55,"value":516},{"type":49,"tag":131,"props":6798,"children":6799},{"style":375},[6800],{"type":55,"value":6801},"from_pretrained",{"type":49,"tag":131,"props":6803,"children":6804},{"style":218},[6805],{"type":55,"value":382},{"type":49,"tag":131,"props":6807,"children":6808},{"style":172},[6809],{"type":55,"value":326},{"type":49,"tag":131,"props":6811,"children":6812},{"style":144},[6813],{"type":55,"value":6814},"bert-base-uncased",{"type":49,"tag":131,"props":6816,"children":6817},{"style":172},[6818],{"type":55,"value":326},{"type":49,"tag":131,"props":6820,"children":6821},{"style":218},[6822],{"type":55,"value":400},{"type":49,"tag":131,"props":6824,"children":6825},{"style":172},[6826],{"type":55,"value":331},{"type":49,"tag":131,"props":6828,"children":6829},{"class":133,"line":407},[6830,6834,6839,6843,6847,6851,6855,6859,6863,6867,6871,6875,6879],{"type":49,"tag":131,"props":6831,"children":6832},{"style":184},[6833],{"type":55,"value":358},{"type":49,"tag":131,"props":6835,"children":6836},{"style":218},[6837],{"type":55,"value":6838}," model ",{"type":49,"tag":131,"props":6840,"children":6841},{"style":172},[6842],{"type":55,"value":192},{"type":49,"tag":131,"props":6844,"children":6845},{"style":288},[6846],{"type":55,"value":372},{"type":49,"tag":131,"props":6848,"children":6849},{"style":218},[6850],{"type":55,"value":6729},{"type":49,"tag":131,"props":6852,"children":6853},{"style":172},[6854],{"type":55,"value":516},{"type":49,"tag":131,"props":6856,"children":6857},{"style":375},[6858],{"type":55,"value":6801},{"type":49,"tag":131,"props":6860,"children":6861},{"style":218},[6862],{"type":55,"value":382},{"type":49,"tag":131,"props":6864,"children":6865},{"style":172},[6866],{"type":55,"value":326},{"type":49,"tag":131,"props":6868,"children":6869},{"style":144},[6870],{"type":55,"value":6814},{"type":49,"tag":131,"props":6872,"children":6873},{"style":172},[6874],{"type":55,"value":326},{"type":49,"tag":131,"props":6876,"children":6877},{"style":218},[6878],{"type":55,"value":400},{"type":49,"tag":131,"props":6880,"children":6881},{"style":172},[6882],{"type":55,"value":331},{"type":49,"tag":131,"props":6884,"children":6885},{"class":133,"line":415},[6886],{"type":49,"tag":131,"props":6887,"children":6888},{"emptyLinePlaceholder":337},[6889],{"type":55,"value":340},{"type":49,"tag":131,"props":6891,"children":6892},{"class":133,"line":424},[6893],{"type":49,"tag":131,"props":6894,"children":6895},{"style":346},[6896],{"type":55,"value":6897},"\u002F\u002F Tokenize input\n",{"type":49,"tag":131,"props":6899,"children":6900},{"class":133,"line":475},[6901,6905,6910,6914,6918,6923,6927,6931,6936,6940,6944],{"type":49,"tag":131,"props":6902,"children":6903},{"style":184},[6904],{"type":55,"value":358},{"type":49,"tag":131,"props":6906,"children":6907},{"style":218},[6908],{"type":55,"value":6909}," inputs ",{"type":49,"tag":131,"props":6911,"children":6912},{"style":172},[6913],{"type":55,"value":192},{"type":49,"tag":131,"props":6915,"children":6916},{"style":288},[6917],{"type":55,"value":372},{"type":49,"tag":131,"props":6919,"children":6920},{"style":375},[6921],{"type":55,"value":6922}," tokenizer",{"type":49,"tag":131,"props":6924,"children":6925},{"style":218},[6926],{"type":55,"value":382},{"type":49,"tag":131,"props":6928,"children":6929},{"style":172},[6930],{"type":55,"value":326},{"type":49,"tag":131,"props":6932,"children":6933},{"style":144},[6934],{"type":55,"value":6935},"Hello world!",{"type":49,"tag":131,"props":6937,"children":6938},{"style":172},[6939],{"type":55,"value":326},{"type":49,"tag":131,"props":6941,"children":6942},{"style":218},[6943],{"type":55,"value":400},{"type":49,"tag":131,"props":6945,"children":6946},{"style":172},[6947],{"type":55,"value":331},{"type":49,"tag":131,"props":6949,"children":6950},{"class":133,"line":484},[6951],{"type":49,"tag":131,"props":6952,"children":6953},{"emptyLinePlaceholder":337},[6954],{"type":55,"value":340},{"type":49,"tag":131,"props":6956,"children":6957},{"class":133,"line":492},[6958],{"type":49,"tag":131,"props":6959,"children":6960},{"style":346},[6961],{"type":55,"value":6962},"\u002F\u002F Run model\n",{"type":49,"tag":131,"props":6964,"children":6965},{"class":133,"line":501},[6966,6970,6975,6979,6983,6988,6993],{"type":49,"tag":131,"props":6967,"children":6968},{"style":184},[6969],{"type":55,"value":358},{"type":49,"tag":131,"props":6971,"children":6972},{"style":218},[6973],{"type":55,"value":6974}," outputs ",{"type":49,"tag":131,"props":6976,"children":6977},{"style":172},[6978],{"type":55,"value":192},{"type":49,"tag":131,"props":6980,"children":6981},{"style":288},[6982],{"type":55,"value":372},{"type":49,"tag":131,"props":6984,"children":6985},{"style":375},[6986],{"type":55,"value":6987}," model",{"type":49,"tag":131,"props":6989,"children":6990},{"style":218},[6991],{"type":55,"value":6992},"(inputs)",{"type":49,"tag":131,"props":6994,"children":6995},{"style":172},[6996],{"type":55,"value":331},{"type":49,"tag":112,"props":6998,"children":7000},{"id":6999},"batch-processing",[7001],{"type":55,"value":7002},"Batch Processing",{"type":49,"tag":119,"props":7004,"children":7006},{"className":161,"code":7005,"language":23,"meta":124,"style":124},"const classifier = await pipeline('sentiment-analysis');\n\n\u002F\u002F Process multiple texts\nconst results = await classifier([\n  'I love this!',\n  'This is terrible.',\n  'It was okay.'\n]);\n",[7007],{"type":49,"tag":127,"props":7008,"children":7009},{"__ignoreMap":124},[7010,7057,7064,7072,7101,7121,7141,7157],{"type":49,"tag":131,"props":7011,"children":7012},{"class":133,"line":134},[7013,7017,7021,7025,7029,7033,7037,7041,7045,7049,7053],{"type":49,"tag":131,"props":7014,"children":7015},{"style":184},[7016],{"type":55,"value":358},{"type":49,"tag":131,"props":7018,"children":7019},{"style":218},[7020],{"type":55,"value":1151},{"type":49,"tag":131,"props":7022,"children":7023},{"style":172},[7024],{"type":55,"value":192},{"type":49,"tag":131,"props":7026,"children":7027},{"style":288},[7028],{"type":55,"value":372},{"type":49,"tag":131,"props":7030,"children":7031},{"style":375},[7032],{"type":55,"value":301},{"type":49,"tag":131,"props":7034,"children":7035},{"style":218},[7036],{"type":55,"value":382},{"type":49,"tag":131,"props":7038,"children":7039},{"style":172},[7040],{"type":55,"value":326},{"type":49,"tag":131,"props":7042,"children":7043},{"style":144},[7044],{"type":55,"value":391},{"type":49,"tag":131,"props":7046,"children":7047},{"style":172},[7048],{"type":55,"value":326},{"type":49,"tag":131,"props":7050,"children":7051},{"style":218},[7052],{"type":55,"value":400},{"type":49,"tag":131,"props":7054,"children":7055},{"style":172},[7056],{"type":55,"value":331},{"type":49,"tag":131,"props":7058,"children":7059},{"class":133,"line":214},[7060],{"type":49,"tag":131,"props":7061,"children":7062},{"emptyLinePlaceholder":337},[7063],{"type":55,"value":340},{"type":49,"tag":131,"props":7065,"children":7066},{"class":133,"line":244},[7067],{"type":49,"tag":131,"props":7068,"children":7069},{"style":346},[7070],{"type":55,"value":7071},"\u002F\u002F Process multiple texts\n",{"type":49,"tag":131,"props":7073,"children":7074},{"class":133,"line":352},[7075,7079,7084,7088,7092,7096],{"type":49,"tag":131,"props":7076,"children":7077},{"style":184},[7078],{"type":55,"value":358},{"type":49,"tag":131,"props":7080,"children":7081},{"style":218},[7082],{"type":55,"value":7083}," results ",{"type":49,"tag":131,"props":7085,"children":7086},{"style":172},[7087],{"type":55,"value":192},{"type":49,"tag":131,"props":7089,"children":7090},{"style":288},[7091],{"type":55,"value":372},{"type":49,"tag":131,"props":7093,"children":7094},{"style":375},[7095],{"type":55,"value":1211},{"type":49,"tag":131,"props":7097,"children":7098},{"style":218},[7099],{"type":55,"value":7100},"([\n",{"type":49,"tag":131,"props":7102,"children":7103},{"class":133,"line":407},[7104,7108,7113,7117],{"type":49,"tag":131,"props":7105,"children":7106},{"style":172},[7107],{"type":55,"value":612},{"type":49,"tag":131,"props":7109,"children":7110},{"style":144},[7111],{"type":55,"value":7112},"I love this!",{"type":49,"tag":131,"props":7114,"children":7115},{"style":172},[7116],{"type":55,"value":326},{"type":49,"tag":131,"props":7118,"children":7119},{"style":172},[7120],{"type":55,"value":625},{"type":49,"tag":131,"props":7122,"children":7123},{"class":133,"line":415},[7124,7128,7133,7137],{"type":49,"tag":131,"props":7125,"children":7126},{"style":172},[7127],{"type":55,"value":612},{"type":49,"tag":131,"props":7129,"children":7130},{"style":144},[7131],{"type":55,"value":7132},"This is terrible.",{"type":49,"tag":131,"props":7134,"children":7135},{"style":172},[7136],{"type":55,"value":326},{"type":49,"tag":131,"props":7138,"children":7139},{"style":172},[7140],{"type":55,"value":625},{"type":49,"tag":131,"props":7142,"children":7143},{"class":133,"line":424},[7144,7148,7153],{"type":49,"tag":131,"props":7145,"children":7146},{"style":172},[7147],{"type":55,"value":612},{"type":49,"tag":131,"props":7149,"children":7150},{"style":144},[7151],{"type":55,"value":7152},"It was okay.",{"type":49,"tag":131,"props":7154,"children":7155},{"style":172},[7156],{"type":55,"value":642},{"type":49,"tag":131,"props":7158,"children":7159},{"class":133,"line":475},[7160,7164],{"type":49,"tag":131,"props":7161,"children":7162},{"style":218},[7163],{"type":55,"value":2258},{"type":49,"tag":131,"props":7165,"children":7166},{"style":172},[7167],{"type":55,"value":331},{"type":49,"tag":64,"props":7169,"children":7171},{"id":7170},"runtime-specific-considerations",[7172],{"type":55,"value":7173},"Runtime-Specific Considerations",{"type":49,"tag":112,"props":7175,"children":7177},{"id":7176},"webgpu-usage",[7178],{"type":55,"value":7179},"WebGPU Usage",{"type":49,"tag":58,"props":7181,"children":7182},{},[7183],{"type":55,"value":7184},"WebGPU provides GPU acceleration in browsers and server-side runtimes (when supported):",{"type":49,"tag":119,"props":7186,"children":7188},{"className":161,"code":7187,"language":23,"meta":124,"style":124},"const pipe = await pipeline('text-generation', 'onnx-community\u002Fgemma-3-270m-it-ONNX', {\n  device: 'webgpu',\n  dtype: 'fp32'\n});\n",[7189],{"type":49,"tag":127,"props":7190,"children":7191},{"__ignoreMap":124},[7192,7255,7282,7305],{"type":49,"tag":131,"props":7193,"children":7194},{"class":133,"line":134},[7195,7199,7203,7207,7211,7215,7219,7223,7227,7231,7235,7239,7243,7247,7251],{"type":49,"tag":131,"props":7196,"children":7197},{"style":184},[7198],{"type":55,"value":358},{"type":49,"tag":131,"props":7200,"children":7201},{"style":218},[7202],{"type":55,"value":363},{"type":49,"tag":131,"props":7204,"children":7205},{"style":172},[7206],{"type":55,"value":192},{"type":49,"tag":131,"props":7208,"children":7209},{"style":288},[7210],{"type":55,"value":372},{"type":49,"tag":131,"props":7212,"children":7213},{"style":375},[7214],{"type":55,"value":301},{"type":49,"tag":131,"props":7216,"children":7217},{"style":218},[7218],{"type":55,"value":382},{"type":49,"tag":131,"props":7220,"children":7221},{"style":172},[7222],{"type":55,"value":326},{"type":49,"tag":131,"props":7224,"children":7225},{"style":144},[7226],{"type":55,"value":1515},{"type":49,"tag":131,"props":7228,"children":7229},{"style":172},[7230],{"type":55,"value":326},{"type":49,"tag":131,"props":7232,"children":7233},{"style":172},[7234],{"type":55,"value":820},{"type":49,"tag":131,"props":7236,"children":7237},{"style":172},[7238],{"type":55,"value":316},{"type":49,"tag":131,"props":7240,"children":7241},{"style":144},[7242],{"type":55,"value":1578},{"type":49,"tag":131,"props":7244,"children":7245},{"style":172},[7246],{"type":55,"value":326},{"type":49,"tag":131,"props":7248,"children":7249},{"style":172},[7250],{"type":55,"value":820},{"type":49,"tag":131,"props":7252,"children":7253},{"style":172},[7254],{"type":55,"value":920},{"type":49,"tag":131,"props":7256,"children":7257},{"class":133,"line":214},[7258,7262,7266,7270,7274,7278],{"type":49,"tag":131,"props":7259,"children":7260},{"style":178},[7261],{"type":55,"value":928},{"type":49,"tag":131,"props":7263,"children":7264},{"style":172},[7265],{"type":55,"value":933},{"type":49,"tag":131,"props":7267,"children":7268},{"style":172},[7269],{"type":55,"value":316},{"type":49,"tag":131,"props":7271,"children":7272},{"style":144},[7273],{"type":55,"value":942},{"type":49,"tag":131,"props":7275,"children":7276},{"style":172},[7277],{"type":55,"value":326},{"type":49,"tag":131,"props":7279,"children":7280},{"style":172},[7281],{"type":55,"value":625},{"type":49,"tag":131,"props":7283,"children":7284},{"class":133,"line":244},[7285,7289,7293,7297,7301],{"type":49,"tag":131,"props":7286,"children":7287},{"style":178},[7288],{"type":55,"value":1062},{"type":49,"tag":131,"props":7290,"children":7291},{"style":172},[7292],{"type":55,"value":933},{"type":49,"tag":131,"props":7294,"children":7295},{"style":172},[7296],{"type":55,"value":316},{"type":49,"tag":131,"props":7298,"children":7299},{"style":144},[7300],{"type":55,"value":4468},{"type":49,"tag":131,"props":7302,"children":7303},{"style":172},[7304],{"type":55,"value":642},{"type":49,"tag":131,"props":7306,"children":7307},{"class":133,"line":352},[7308,7312,7316],{"type":49,"tag":131,"props":7309,"children":7310},{"style":172},[7311],{"type":55,"value":236},{"type":49,"tag":131,"props":7313,"children":7314},{"style":218},[7315],{"type":55,"value":400},{"type":49,"tag":131,"props":7317,"children":7318},{"style":172},[7319],{"type":55,"value":331},{"type":49,"tag":58,"props":7321,"children":7322},{},[7323,7328,7329,7334],{"type":49,"tag":535,"props":7324,"children":7325},{},[7326],{"type":55,"value":7327},"Note",{"type":55,"value":5027},{"type":49,"tag":127,"props":7330,"children":7332},{"className":7331},[],[7333],{"type":55,"value":942},{"type":55,"value":7335}," when available and fall back to WASM\u002FCPU when not supported in the current runtime.",{"type":49,"tag":112,"props":7337,"children":7339},{"id":7338},"wasm-performance",[7340],{"type":55,"value":7341},"WASM Performance",{"type":49,"tag":58,"props":7343,"children":7344},{},[7345],{"type":55,"value":7346},"WASM is the most compatible execution backend across runtimes:",{"type":49,"tag":119,"props":7348,"children":7350},{"className":161,"code":7349,"language":23,"meta":124,"style":124},"\u002F\u002F Optimized for browsers with quantization\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  dtype: 'q8'  \u002F\u002F or 'q4' for even smaller size\n});\n",[7351],{"type":49,"tag":127,"props":7352,"children":7353},{"__ignoreMap":124},[7354,7362,7425,7453],{"type":49,"tag":131,"props":7355,"children":7356},{"class":133,"line":134},[7357],{"type":49,"tag":131,"props":7358,"children":7359},{"style":346},[7360],{"type":55,"value":7361},"\u002F\u002F Optimized for browsers with quantization\n",{"type":49,"tag":131,"props":7363,"children":7364},{"class":133,"line":214},[7365,7369,7373,7377,7381,7385,7389,7393,7397,7401,7405,7409,7413,7417,7421],{"type":49,"tag":131,"props":7366,"children":7367},{"style":184},[7368],{"type":55,"value":358},{"type":49,"tag":131,"props":7370,"children":7371},{"style":218},[7372],{"type":55,"value":363},{"type":49,"tag":131,"props":7374,"children":7375},{"style":172},[7376],{"type":55,"value":192},{"type":49,"tag":131,"props":7378,"children":7379},{"style":288},[7380],{"type":55,"value":372},{"type":49,"tag":131,"props":7382,"children":7383},{"style":375},[7384],{"type":55,"value":301},{"type":49,"tag":131,"props":7386,"children":7387},{"style":218},[7388],{"type":55,"value":382},{"type":49,"tag":131,"props":7390,"children":7391},{"style":172},[7392],{"type":55,"value":326},{"type":49,"tag":131,"props":7394,"children":7395},{"style":144},[7396],{"type":55,"value":391},{"type":49,"tag":131,"props":7398,"children":7399},{"style":172},[7400],{"type":55,"value":326},{"type":49,"tag":131,"props":7402,"children":7403},{"style":172},[7404],{"type":55,"value":820},{"type":49,"tag":131,"props":7406,"children":7407},{"style":172},[7408],{"type":55,"value":316},{"type":49,"tag":131,"props":7410,"children":7411},{"style":144},[7412],{"type":55,"value":829},{"type":49,"tag":131,"props":7414,"children":7415},{"style":172},[7416],{"type":55,"value":326},{"type":49,"tag":131,"props":7418,"children":7419},{"style":172},[7420],{"type":55,"value":820},{"type":49,"tag":131,"props":7422,"children":7423},{"style":172},[7424],{"type":55,"value":920},{"type":49,"tag":131,"props":7426,"children":7427},{"class":133,"line":244},[7428,7432,7436,7440,7444,7448],{"type":49,"tag":131,"props":7429,"children":7430},{"style":178},[7431],{"type":55,"value":1062},{"type":49,"tag":131,"props":7433,"children":7434},{"style":172},[7435],{"type":55,"value":933},{"type":49,"tag":131,"props":7437,"children":7438},{"style":172},[7439],{"type":55,"value":316},{"type":49,"tag":131,"props":7441,"children":7442},{"style":144},[7443],{"type":55,"value":4490},{"type":49,"tag":131,"props":7445,"children":7446},{"style":172},[7447],{"type":55,"value":326},{"type":49,"tag":131,"props":7449,"children":7450},{"style":346},[7451],{"type":55,"value":7452},"  \u002F\u002F or 'q4' for even smaller size\n",{"type":49,"tag":131,"props":7454,"children":7455},{"class":133,"line":352},[7456,7460,7464],{"type":49,"tag":131,"props":7457,"children":7458},{"style":172},[7459],{"type":55,"value":236},{"type":49,"tag":131,"props":7461,"children":7462},{"style":218},[7463],{"type":55,"value":400},{"type":49,"tag":131,"props":7465,"children":7466},{"style":172},[7467],{"type":55,"value":331},{"type":49,"tag":112,"props":7469,"children":7471},{"id":7470},"progress-tracking-loading-indicators",[7472],{"type":55,"value":7473},"Progress Tracking & Loading Indicators",{"type":49,"tag":58,"props":7475,"children":7476},{},[7477,7479,7485],{"type":55,"value":7478},"Models can be large (ranging from a few MB to several GB) and consist of multiple files. Track download progress by passing a callback to the ",{"type":49,"tag":127,"props":7480,"children":7482},{"className":7481},[],[7483],{"type":55,"value":7484},"pipeline()",{"type":55,"value":7486}," function:",{"type":49,"tag":119,"props":7488,"children":7490},{"className":161,"code":7489,"language":23,"meta":124,"style":124},"import { pipeline } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Track progress for each file\nconst fileProgress = {};\n\nfunction onProgress(info) {\n  if (info.status === 'progress_total') {\n    console.log(`Total: ${info.progress.toFixed(1)}%`);\n    return;\n  }\n\n  console.log(`${info.status}: ${info.file ?? ''}`);\n  \n  if (info.status === 'progress') {\n    fileProgress[info.file] = info.progress;\n    console.log(`${info.file}: ${info.progress.toFixed(1)}%`);\n  }\n  \n  if (info.status === 'done') {\n    console.log(`✓ ${info.file} complete`);\n  }\n}\n\n\u002F\u002F Pass callback to pipeline\nconst classifier = await pipeline('sentiment-analysis', null, {\n  progress_callback: onProgress\n});\n",[7491],{"type":49,"tag":127,"props":7492,"children":7493},{"__ignoreMap":124},[7494,7533,7540,7548,7569,7576,7606,7658,7748,7760,7768,7775,7855,7863,7910,7962,8061,8068,8075,8123,8188,8195,8203,8210,8218,8271,8289],{"type":49,"tag":131,"props":7495,"children":7496},{"class":133,"line":134},[7497,7501,7505,7509,7513,7517,7521,7525,7529],{"type":49,"tag":131,"props":7498,"children":7499},{"style":288},[7500],{"type":55,"value":291},{"type":49,"tag":131,"props":7502,"children":7503},{"style":172},[7504],{"type":55,"value":296},{"type":49,"tag":131,"props":7506,"children":7507},{"style":218},[7508],{"type":55,"value":301},{"type":49,"tag":131,"props":7510,"children":7511},{"style":172},[7512],{"type":55,"value":306},{"type":49,"tag":131,"props":7514,"children":7515},{"style":288},[7516],{"type":55,"value":311},{"type":49,"tag":131,"props":7518,"children":7519},{"style":172},[7520],{"type":55,"value":316},{"type":49,"tag":131,"props":7522,"children":7523},{"style":144},[7524],{"type":55,"value":321},{"type":49,"tag":131,"props":7526,"children":7527},{"style":172},[7528],{"type":55,"value":326},{"type":49,"tag":131,"props":7530,"children":7531},{"style":172},[7532],{"type":55,"value":331},{"type":49,"tag":131,"props":7534,"children":7535},{"class":133,"line":214},[7536],{"type":49,"tag":131,"props":7537,"children":7538},{"emptyLinePlaceholder":337},[7539],{"type":55,"value":340},{"type":49,"tag":131,"props":7541,"children":7542},{"class":133,"line":244},[7543],{"type":49,"tag":131,"props":7544,"children":7545},{"style":346},[7546],{"type":55,"value":7547},"\u002F\u002F Track progress for each file\n",{"type":49,"tag":131,"props":7549,"children":7550},{"class":133,"line":352},[7551,7555,7560,7564],{"type":49,"tag":131,"props":7552,"children":7553},{"style":184},[7554],{"type":55,"value":358},{"type":49,"tag":131,"props":7556,"children":7557},{"style":218},[7558],{"type":55,"value":7559}," fileProgress ",{"type":49,"tag":131,"props":7561,"children":7562},{"style":172},[7563],{"type":55,"value":192},{"type":49,"tag":131,"props":7565,"children":7566},{"style":172},[7567],{"type":55,"value":7568}," {};\n",{"type":49,"tag":131,"props":7570,"children":7571},{"class":133,"line":407},[7572],{"type":49,"tag":131,"props":7573,"children":7574},{"emptyLinePlaceholder":337},[7575],{"type":55,"value":340},{"type":49,"tag":131,"props":7577,"children":7578},{"class":133,"line":415},[7579,7584,7589,7593,7598,7602],{"type":49,"tag":131,"props":7580,"children":7581},{"style":184},[7582],{"type":55,"value":7583},"function",{"type":49,"tag":131,"props":7585,"children":7586},{"style":375},[7587],{"type":55,"value":7588}," onProgress",{"type":49,"tag":131,"props":7590,"children":7591},{"style":172},[7592],{"type":55,"value":382},{"type":49,"tag":131,"props":7594,"children":7595},{"style":5628},[7596],{"type":55,"value":7597},"info",{"type":49,"tag":131,"props":7599,"children":7600},{"style":172},[7601],{"type":55,"value":400},{"type":49,"tag":131,"props":7603,"children":7604},{"style":172},[7605],{"type":55,"value":920},{"type":49,"tag":131,"props":7607,"children":7608},{"class":133,"line":424},[7609,7614,7618,7622,7626,7631,7636,7640,7645,7649,7654],{"type":49,"tag":131,"props":7610,"children":7611},{"style":288},[7612],{"type":55,"value":7613},"  if",{"type":49,"tag":131,"props":7615,"children":7616},{"style":178},[7617],{"type":55,"value":5625},{"type":49,"tag":131,"props":7619,"children":7620},{"style":218},[7621],{"type":55,"value":7597},{"type":49,"tag":131,"props":7623,"children":7624},{"style":172},[7625],{"type":55,"value":516},{"type":49,"tag":131,"props":7627,"children":7628},{"style":218},[7629],{"type":55,"value":7630},"status",{"type":49,"tag":131,"props":7632,"children":7633},{"style":172},[7634],{"type":55,"value":7635}," ===",{"type":49,"tag":131,"props":7637,"children":7638},{"style":172},[7639],{"type":55,"value":316},{"type":49,"tag":131,"props":7641,"children":7642},{"style":144},[7643],{"type":55,"value":7644},"progress_total",{"type":49,"tag":131,"props":7646,"children":7647},{"style":172},[7648],{"type":55,"value":326},{"type":49,"tag":131,"props":7650,"children":7651},{"style":178},[7652],{"type":55,"value":7653},") ",{"type":49,"tag":131,"props":7655,"children":7656},{"style":172},[7657],{"type":55,"value":1443},{"type":49,"tag":131,"props":7659,"children":7660},{"class":133,"line":475},[7661,7666,7670,7674,7678,7683,7688,7692,7696,7700,7705,7709,7714,7718,7723,7727,7731,7736,7740,7744],{"type":49,"tag":131,"props":7662,"children":7663},{"style":218},[7664],{"type":55,"value":7665},"    console",{"type":49,"tag":131,"props":7667,"children":7668},{"style":172},[7669],{"type":55,"value":516},{"type":49,"tag":131,"props":7671,"children":7672},{"style":375},[7673],{"type":55,"value":5283},{"type":49,"tag":131,"props":7675,"children":7676},{"style":178},[7677],{"type":55,"value":382},{"type":49,"tag":131,"props":7679,"children":7680},{"style":172},[7681],{"type":55,"value":7682},"`",{"type":49,"tag":131,"props":7684,"children":7685},{"style":144},[7686],{"type":55,"value":7687},"Total: ",{"type":49,"tag":131,"props":7689,"children":7690},{"style":172},[7691],{"type":55,"value":5756},{"type":49,"tag":131,"props":7693,"children":7694},{"style":218},[7695],{"type":55,"value":7597},{"type":49,"tag":131,"props":7697,"children":7698},{"style":172},[7699],{"type":55,"value":516},{"type":49,"tag":131,"props":7701,"children":7702},{"style":218},[7703],{"type":55,"value":7704},"progress",{"type":49,"tag":131,"props":7706,"children":7707},{"style":172},[7708],{"type":55,"value":516},{"type":49,"tag":131,"props":7710,"children":7711},{"style":375},[7712],{"type":55,"value":7713},"toFixed",{"type":49,"tag":131,"props":7715,"children":7716},{"style":218},[7717],{"type":55,"value":382},{"type":49,"tag":131,"props":7719,"children":7720},{"style":1655},[7721],{"type":55,"value":7722},"1",{"type":49,"tag":131,"props":7724,"children":7725},{"style":218},[7726],{"type":55,"value":400},{"type":49,"tag":131,"props":7728,"children":7729},{"style":172},[7730],{"type":55,"value":236},{"type":49,"tag":131,"props":7732,"children":7733},{"style":144},[7734],{"type":55,"value":7735},"%",{"type":49,"tag":131,"props":7737,"children":7738},{"style":172},[7739],{"type":55,"value":7682},{"type":49,"tag":131,"props":7741,"children":7742},{"style":178},[7743],{"type":55,"value":400},{"type":49,"tag":131,"props":7745,"children":7746},{"style":172},[7747],{"type":55,"value":331},{"type":49,"tag":131,"props":7749,"children":7750},{"class":133,"line":484},[7751,7756],{"type":49,"tag":131,"props":7752,"children":7753},{"style":288},[7754],{"type":55,"value":7755},"    return",{"type":49,"tag":131,"props":7757,"children":7758},{"style":172},[7759],{"type":55,"value":331},{"type":49,"tag":131,"props":7761,"children":7762},{"class":133,"line":492},[7763],{"type":49,"tag":131,"props":7764,"children":7765},{"style":172},[7766],{"type":55,"value":7767},"  }\n",{"type":49,"tag":131,"props":7769,"children":7770},{"class":133,"line":501},[7771],{"type":49,"tag":131,"props":7772,"children":7773},{"emptyLinePlaceholder":337},[7774],{"type":55,"value":340},{"type":49,"tag":131,"props":7776,"children":7777},{"class":133,"line":4669},[7778,7783,7787,7791,7795,7800,7804,7808,7812,7816,7820,7824,7828,7832,7837,7842,7847,7851],{"type":49,"tag":131,"props":7779,"children":7780},{"style":218},[7781],{"type":55,"value":7782},"  console",{"type":49,"tag":131,"props":7784,"children":7785},{"style":172},[7786],{"type":55,"value":516},{"type":49,"tag":131,"props":7788,"children":7789},{"style":375},[7790],{"type":55,"value":5283},{"type":49,"tag":131,"props":7792,"children":7793},{"style":178},[7794],{"type":55,"value":382},{"type":49,"tag":131,"props":7796,"children":7797},{"style":172},[7798],{"type":55,"value":7799},"`${",{"type":49,"tag":131,"props":7801,"children":7802},{"style":218},[7803],{"type":55,"value":7597},{"type":49,"tag":131,"props":7805,"children":7806},{"style":172},[7807],{"type":55,"value":516},{"type":49,"tag":131,"props":7809,"children":7810},{"style":218},[7811],{"type":55,"value":7630},{"type":49,"tag":131,"props":7813,"children":7814},{"style":172},[7815],{"type":55,"value":236},{"type":49,"tag":131,"props":7817,"children":7818},{"style":144},[7819],{"type":55,"value":679},{"type":49,"tag":131,"props":7821,"children":7822},{"style":172},[7823],{"type":55,"value":5756},{"type":49,"tag":131,"props":7825,"children":7826},{"style":218},[7827],{"type":55,"value":7597},{"type":49,"tag":131,"props":7829,"children":7830},{"style":172},[7831],{"type":55,"value":516},{"type":49,"tag":131,"props":7833,"children":7834},{"style":218},[7835],{"type":55,"value":7836},"file ",{"type":49,"tag":131,"props":7838,"children":7839},{"style":172},[7840],{"type":55,"value":7841},"??",{"type":49,"tag":131,"props":7843,"children":7844},{"style":172},[7845],{"type":55,"value":7846}," ''}`",{"type":49,"tag":131,"props":7848,"children":7849},{"style":178},[7850],{"type":55,"value":400},{"type":49,"tag":131,"props":7852,"children":7853},{"style":172},[7854],{"type":55,"value":331},{"type":49,"tag":131,"props":7856,"children":7857},{"class":133,"line":4709},[7858],{"type":49,"tag":131,"props":7859,"children":7860},{"style":178},[7861],{"type":55,"value":7862},"  \n",{"type":49,"tag":131,"props":7864,"children":7865},{"class":133,"line":4717},[7866,7870,7874,7878,7882,7886,7890,7894,7898,7902,7906],{"type":49,"tag":131,"props":7867,"children":7868},{"style":288},[7869],{"type":55,"value":7613},{"type":49,"tag":131,"props":7871,"children":7872},{"style":178},[7873],{"type":55,"value":5625},{"type":49,"tag":131,"props":7875,"children":7876},{"style":218},[7877],{"type":55,"value":7597},{"type":49,"tag":131,"props":7879,"children":7880},{"style":172},[7881],{"type":55,"value":516},{"type":49,"tag":131,"props":7883,"children":7884},{"style":218},[7885],{"type":55,"value":7630},{"type":49,"tag":131,"props":7887,"children":7888},{"style":172},[7889],{"type":55,"value":7635},{"type":49,"tag":131,"props":7891,"children":7892},{"style":172},[7893],{"type":55,"value":316},{"type":49,"tag":131,"props":7895,"children":7896},{"style":144},[7897],{"type":55,"value":7704},{"type":49,"tag":131,"props":7899,"children":7900},{"style":172},[7901],{"type":55,"value":326},{"type":49,"tag":131,"props":7903,"children":7904},{"style":178},[7905],{"type":55,"value":7653},{"type":49,"tag":131,"props":7907,"children":7908},{"style":172},[7909],{"type":55,"value":1443},{"type":49,"tag":131,"props":7911,"children":7912},{"class":133,"line":4745},[7913,7918,7923,7927,7931,7936,7941,7945,7950,7954,7958],{"type":49,"tag":131,"props":7914,"children":7915},{"style":218},[7916],{"type":55,"value":7917},"    fileProgress",{"type":49,"tag":131,"props":7919,"children":7920},{"style":178},[7921],{"type":55,"value":7922},"[",{"type":49,"tag":131,"props":7924,"children":7925},{"style":218},[7926],{"type":55,"value":7597},{"type":49,"tag":131,"props":7928,"children":7929},{"style":172},[7930],{"type":55,"value":516},{"type":49,"tag":131,"props":7932,"children":7933},{"style":218},[7934],{"type":55,"value":7935},"file",{"type":49,"tag":131,"props":7937,"children":7938},{"style":178},[7939],{"type":55,"value":7940},"] ",{"type":49,"tag":131,"props":7942,"children":7943},{"style":172},[7944],{"type":55,"value":192},{"type":49,"tag":131,"props":7946,"children":7947},{"style":218},[7948],{"type":55,"value":7949}," info",{"type":49,"tag":131,"props":7951,"children":7952},{"style":172},[7953],{"type":55,"value":516},{"type":49,"tag":131,"props":7955,"children":7956},{"style":218},[7957],{"type":55,"value":7704},{"type":49,"tag":131,"props":7959,"children":7960},{"style":172},[7961],{"type":55,"value":331},{"type":49,"tag":131,"props":7963,"children":7964},{"class":133,"line":4765},[7965,7969,7973,7977,7981,7985,7989,7993,7997,8001,8005,8009,8013,8017,8021,8025,8029,8033,8037,8041,8045,8049,8053,8057],{"type":49,"tag":131,"props":7966,"children":7967},{"style":218},[7968],{"type":55,"value":7665},{"type":49,"tag":131,"props":7970,"children":7971},{"style":172},[7972],{"type":55,"value":516},{"type":49,"tag":131,"props":7974,"children":7975},{"style":375},[7976],{"type":55,"value":5283},{"type":49,"tag":131,"props":7978,"children":7979},{"style":178},[7980],{"type":55,"value":382},{"type":49,"tag":131,"props":7982,"children":7983},{"style":172},[7984],{"type":55,"value":7799},{"type":49,"tag":131,"props":7986,"children":7987},{"style":218},[7988],{"type":55,"value":7597},{"type":49,"tag":131,"props":7990,"children":7991},{"style":172},[7992],{"type":55,"value":516},{"type":49,"tag":131,"props":7994,"children":7995},{"style":218},[7996],{"type":55,"value":7935},{"type":49,"tag":131,"props":7998,"children":7999},{"style":172},[8000],{"type":55,"value":236},{"type":49,"tag":131,"props":8002,"children":8003},{"style":144},[8004],{"type":55,"value":679},{"type":49,"tag":131,"props":8006,"children":8007},{"style":172},[8008],{"type":55,"value":5756},{"type":49,"tag":131,"props":8010,"children":8011},{"style":218},[8012],{"type":55,"value":7597},{"type":49,"tag":131,"props":8014,"children":8015},{"style":172},[8016],{"type":55,"value":516},{"type":49,"tag":131,"props":8018,"children":8019},{"style":218},[8020],{"type":55,"value":7704},{"type":49,"tag":131,"props":8022,"children":8023},{"style":172},[8024],{"type":55,"value":516},{"type":49,"tag":131,"props":8026,"children":8027},{"style":375},[8028],{"type":55,"value":7713},{"type":49,"tag":131,"props":8030,"children":8031},{"style":218},[8032],{"type":55,"value":382},{"type":49,"tag":131,"props":8034,"children":8035},{"style":1655},[8036],{"type":55,"value":7722},{"type":49,"tag":131,"props":8038,"children":8039},{"style":218},[8040],{"type":55,"value":400},{"type":49,"tag":131,"props":8042,"children":8043},{"style":172},[8044],{"type":55,"value":236},{"type":49,"tag":131,"props":8046,"children":8047},{"style":144},[8048],{"type":55,"value":7735},{"type":49,"tag":131,"props":8050,"children":8051},{"style":172},[8052],{"type":55,"value":7682},{"type":49,"tag":131,"props":8054,"children":8055},{"style":178},[8056],{"type":55,"value":400},{"type":49,"tag":131,"props":8058,"children":8059},{"style":172},[8060],{"type":55,"value":331},{"type":49,"tag":131,"props":8062,"children":8063},{"class":133,"line":4785},[8064],{"type":49,"tag":131,"props":8065,"children":8066},{"style":172},[8067],{"type":55,"value":7767},{"type":49,"tag":131,"props":8069,"children":8070},{"class":133,"line":4824},[8071],{"type":49,"tag":131,"props":8072,"children":8073},{"style":178},[8074],{"type":55,"value":7862},{"type":49,"tag":131,"props":8076,"children":8077},{"class":133,"line":4836},[8078,8082,8086,8090,8094,8098,8102,8106,8111,8115,8119],{"type":49,"tag":131,"props":8079,"children":8080},{"style":288},[8081],{"type":55,"value":7613},{"type":49,"tag":131,"props":8083,"children":8084},{"style":178},[8085],{"type":55,"value":5625},{"type":49,"tag":131,"props":8087,"children":8088},{"style":218},[8089],{"type":55,"value":7597},{"type":49,"tag":131,"props":8091,"children":8092},{"style":172},[8093],{"type":55,"value":516},{"type":49,"tag":131,"props":8095,"children":8096},{"style":218},[8097],{"type":55,"value":7630},{"type":49,"tag":131,"props":8099,"children":8100},{"style":172},[8101],{"type":55,"value":7635},{"type":49,"tag":131,"props":8103,"children":8104},{"style":172},[8105],{"type":55,"value":316},{"type":49,"tag":131,"props":8107,"children":8108},{"style":144},[8109],{"type":55,"value":8110},"done",{"type":49,"tag":131,"props":8112,"children":8113},{"style":172},[8114],{"type":55,"value":326},{"type":49,"tag":131,"props":8116,"children":8117},{"style":178},[8118],{"type":55,"value":7653},{"type":49,"tag":131,"props":8120,"children":8121},{"style":172},[8122],{"type":55,"value":1443},{"type":49,"tag":131,"props":8124,"children":8125},{"class":133,"line":4844},[8126,8130,8134,8138,8142,8146,8151,8155,8159,8163,8167,8171,8176,8180,8184],{"type":49,"tag":131,"props":8127,"children":8128},{"style":218},[8129],{"type":55,"value":7665},{"type":49,"tag":131,"props":8131,"children":8132},{"style":172},[8133],{"type":55,"value":516},{"type":49,"tag":131,"props":8135,"children":8136},{"style":375},[8137],{"type":55,"value":5283},{"type":49,"tag":131,"props":8139,"children":8140},{"style":178},[8141],{"type":55,"value":382},{"type":49,"tag":131,"props":8143,"children":8144},{"style":172},[8145],{"type":55,"value":7682},{"type":49,"tag":131,"props":8147,"children":8148},{"style":144},[8149],{"type":55,"value":8150},"✓ ",{"type":49,"tag":131,"props":8152,"children":8153},{"style":172},[8154],{"type":55,"value":5756},{"type":49,"tag":131,"props":8156,"children":8157},{"style":218},[8158],{"type":55,"value":7597},{"type":49,"tag":131,"props":8160,"children":8161},{"style":172},[8162],{"type":55,"value":516},{"type":49,"tag":131,"props":8164,"children":8165},{"style":218},[8166],{"type":55,"value":7935},{"type":49,"tag":131,"props":8168,"children":8169},{"style":172},[8170],{"type":55,"value":236},{"type":49,"tag":131,"props":8172,"children":8173},{"style":144},[8174],{"type":55,"value":8175}," complete",{"type":49,"tag":131,"props":8177,"children":8178},{"style":172},[8179],{"type":55,"value":7682},{"type":49,"tag":131,"props":8181,"children":8182},{"style":178},[8183],{"type":55,"value":400},{"type":49,"tag":131,"props":8185,"children":8186},{"style":172},[8187],{"type":55,"value":331},{"type":49,"tag":131,"props":8189,"children":8190},{"class":133,"line":4893},[8191],{"type":49,"tag":131,"props":8192,"children":8193},{"style":172},[8194],{"type":55,"value":7767},{"type":49,"tag":131,"props":8196,"children":8197},{"class":133,"line":4910},[8198],{"type":49,"tag":131,"props":8199,"children":8200},{"style":172},[8201],{"type":55,"value":8202},"}\n",{"type":49,"tag":131,"props":8204,"children":8205},{"class":133,"line":4926},[8206],{"type":49,"tag":131,"props":8207,"children":8208},{"emptyLinePlaceholder":337},[8209],{"type":55,"value":340},{"type":49,"tag":131,"props":8211,"children":8212},{"class":133,"line":4934},[8213],{"type":49,"tag":131,"props":8214,"children":8215},{"style":346},[8216],{"type":55,"value":8217},"\u002F\u002F Pass callback to pipeline\n",{"type":49,"tag":131,"props":8219,"children":8221},{"class":133,"line":8220},25,[8222,8226,8230,8234,8238,8242,8246,8250,8254,8258,8262,8267],{"type":49,"tag":131,"props":8223,"children":8224},{"style":184},[8225],{"type":55,"value":358},{"type":49,"tag":131,"props":8227,"children":8228},{"style":218},[8229],{"type":55,"value":1151},{"type":49,"tag":131,"props":8231,"children":8232},{"style":172},[8233],{"type":55,"value":192},{"type":49,"tag":131,"props":8235,"children":8236},{"style":288},[8237],{"type":55,"value":372},{"type":49,"tag":131,"props":8239,"children":8240},{"style":375},[8241],{"type":55,"value":301},{"type":49,"tag":131,"props":8243,"children":8244},{"style":218},[8245],{"type":55,"value":382},{"type":49,"tag":131,"props":8247,"children":8248},{"style":172},[8249],{"type":55,"value":326},{"type":49,"tag":131,"props":8251,"children":8252},{"style":144},[8253],{"type":55,"value":391},{"type":49,"tag":131,"props":8255,"children":8256},{"style":172},[8257],{"type":55,"value":326},{"type":49,"tag":131,"props":8259,"children":8260},{"style":172},[8261],{"type":55,"value":820},{"type":49,"tag":131,"props":8263,"children":8264},{"style":172},[8265],{"type":55,"value":8266}," null,",{"type":49,"tag":131,"props":8268,"children":8269},{"style":172},[8270],{"type":55,"value":920},{"type":49,"tag":131,"props":8272,"children":8274},{"class":133,"line":8273},26,[8275,8280,8284],{"type":49,"tag":131,"props":8276,"children":8277},{"style":178},[8278],{"type":55,"value":8279},"  progress_callback",{"type":49,"tag":131,"props":8281,"children":8282},{"style":172},[8283],{"type":55,"value":933},{"type":49,"tag":131,"props":8285,"children":8286},{"style":218},[8287],{"type":55,"value":8288}," onProgress\n",{"type":49,"tag":131,"props":8290,"children":8292},{"class":133,"line":8291},27,[8293,8297,8301],{"type":49,"tag":131,"props":8294,"children":8295},{"style":172},[8296],{"type":55,"value":236},{"type":49,"tag":131,"props":8298,"children":8299},{"style":218},[8300],{"type":55,"value":400},{"type":49,"tag":131,"props":8302,"children":8303},{"style":172},[8304],{"type":55,"value":331},{"type":49,"tag":58,"props":8306,"children":8307},{},[8308],{"type":49,"tag":535,"props":8309,"children":8310},{},[8311],{"type":55,"value":8312},"Progress Info Properties:",{"type":49,"tag":119,"props":8314,"children":8317},{"className":8315,"code":8316,"language":20,"meta":124,"style":124},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","interface ProgressInfo {\n  status: 'initiate' | 'download' | 'progress' | 'progress_total' | 'done' | 'ready';\n  name: string;      \u002F\u002F Model id or path\n  file?: string;     \u002F\u002F File being processed (per-file events)\n  progress?: number; \u002F\u002F Percentage (0-100, for 'progress' and 'progress_total')\n  loaded?: number;   \u002F\u002F Bytes downloaded (only for 'progress' status)\n  total?: number;    \u002F\u002F Total bytes (only for 'progress' status)\n}\n",[8318],{"type":49,"tag":127,"props":8319,"children":8320},{"__ignoreMap":124},[8321,8338,8450,8476,8502,8528,8553,8578],{"type":49,"tag":131,"props":8322,"children":8323},{"class":133,"line":134},[8324,8329,8334],{"type":49,"tag":131,"props":8325,"children":8326},{"style":184},[8327],{"type":55,"value":8328},"interface",{"type":49,"tag":131,"props":8330,"children":8331},{"style":138},[8332],{"type":55,"value":8333}," ProgressInfo",{"type":49,"tag":131,"props":8335,"children":8336},{"style":172},[8337],{"type":55,"value":920},{"type":49,"tag":131,"props":8339,"children":8340},{"class":133,"line":214},[8341,8346,8350,8354,8359,8363,8368,8372,8377,8381,8385,8389,8393,8397,8401,8405,8409,8413,8417,8421,8425,8429,8433,8437,8442,8446],{"type":49,"tag":131,"props":8342,"children":8343},{"style":178},[8344],{"type":55,"value":8345},"  status",{"type":49,"tag":131,"props":8347,"children":8348},{"style":172},[8349],{"type":55,"value":933},{"type":49,"tag":131,"props":8351,"children":8352},{"style":172},[8353],{"type":55,"value":316},{"type":49,"tag":131,"props":8355,"children":8356},{"style":144},[8357],{"type":55,"value":8358},"initiate",{"type":49,"tag":131,"props":8360,"children":8361},{"style":172},[8362],{"type":55,"value":326},{"type":49,"tag":131,"props":8364,"children":8365},{"style":172},[8366],{"type":55,"value":8367}," |",{"type":49,"tag":131,"props":8369,"children":8370},{"style":172},[8371],{"type":55,"value":316},{"type":49,"tag":131,"props":8373,"children":8374},{"style":144},[8375],{"type":55,"value":8376},"download",{"type":49,"tag":131,"props":8378,"children":8379},{"style":172},[8380],{"type":55,"value":326},{"type":49,"tag":131,"props":8382,"children":8383},{"style":172},[8384],{"type":55,"value":8367},{"type":49,"tag":131,"props":8386,"children":8387},{"style":172},[8388],{"type":55,"value":316},{"type":49,"tag":131,"props":8390,"children":8391},{"style":144},[8392],{"type":55,"value":7704},{"type":49,"tag":131,"props":8394,"children":8395},{"style":172},[8396],{"type":55,"value":326},{"type":49,"tag":131,"props":8398,"children":8399},{"style":172},[8400],{"type":55,"value":8367},{"type":49,"tag":131,"props":8402,"children":8403},{"style":172},[8404],{"type":55,"value":316},{"type":49,"tag":131,"props":8406,"children":8407},{"style":144},[8408],{"type":55,"value":7644},{"type":49,"tag":131,"props":8410,"children":8411},{"style":172},[8412],{"type":55,"value":326},{"type":49,"tag":131,"props":8414,"children":8415},{"style":172},[8416],{"type":55,"value":8367},{"type":49,"tag":131,"props":8418,"children":8419},{"style":172},[8420],{"type":55,"value":316},{"type":49,"tag":131,"props":8422,"children":8423},{"style":144},[8424],{"type":55,"value":8110},{"type":49,"tag":131,"props":8426,"children":8427},{"style":172},[8428],{"type":55,"value":326},{"type":49,"tag":131,"props":8430,"children":8431},{"style":172},[8432],{"type":55,"value":8367},{"type":49,"tag":131,"props":8434,"children":8435},{"style":172},[8436],{"type":55,"value":316},{"type":49,"tag":131,"props":8438,"children":8439},{"style":144},[8440],{"type":55,"value":8441},"ready",{"type":49,"tag":131,"props":8443,"children":8444},{"style":172},[8445],{"type":55,"value":326},{"type":49,"tag":131,"props":8447,"children":8448},{"style":172},[8449],{"type":55,"value":331},{"type":49,"tag":131,"props":8451,"children":8452},{"class":133,"line":244},[8453,8458,8462,8467,8471],{"type":49,"tag":131,"props":8454,"children":8455},{"style":178},[8456],{"type":55,"value":8457},"  name",{"type":49,"tag":131,"props":8459,"children":8460},{"style":172},[8461],{"type":55,"value":933},{"type":49,"tag":131,"props":8463,"children":8464},{"style":138},[8465],{"type":55,"value":8466}," string",{"type":49,"tag":131,"props":8468,"children":8469},{"style":172},[8470],{"type":55,"value":5302},{"type":49,"tag":131,"props":8472,"children":8473},{"style":346},[8474],{"type":55,"value":8475},"      \u002F\u002F Model id or path\n",{"type":49,"tag":131,"props":8477,"children":8478},{"class":133,"line":352},[8479,8484,8489,8493,8497],{"type":49,"tag":131,"props":8480,"children":8481},{"style":178},[8482],{"type":55,"value":8483},"  file",{"type":49,"tag":131,"props":8485,"children":8486},{"style":172},[8487],{"type":55,"value":8488},"?:",{"type":49,"tag":131,"props":8490,"children":8491},{"style":138},[8492],{"type":55,"value":8466},{"type":49,"tag":131,"props":8494,"children":8495},{"style":172},[8496],{"type":55,"value":5302},{"type":49,"tag":131,"props":8498,"children":8499},{"style":346},[8500],{"type":55,"value":8501},"     \u002F\u002F File being processed (per-file events)\n",{"type":49,"tag":131,"props":8503,"children":8504},{"class":133,"line":407},[8505,8510,8514,8519,8523],{"type":49,"tag":131,"props":8506,"children":8507},{"style":178},[8508],{"type":55,"value":8509},"  progress",{"type":49,"tag":131,"props":8511,"children":8512},{"style":172},[8513],{"type":55,"value":8488},{"type":49,"tag":131,"props":8515,"children":8516},{"style":138},[8517],{"type":55,"value":8518}," number",{"type":49,"tag":131,"props":8520,"children":8521},{"style":172},[8522],{"type":55,"value":5302},{"type":49,"tag":131,"props":8524,"children":8525},{"style":346},[8526],{"type":55,"value":8527}," \u002F\u002F Percentage (0-100, for 'progress' and 'progress_total')\n",{"type":49,"tag":131,"props":8529,"children":8530},{"class":133,"line":415},[8531,8536,8540,8544,8548],{"type":49,"tag":131,"props":8532,"children":8533},{"style":178},[8534],{"type":55,"value":8535},"  loaded",{"type":49,"tag":131,"props":8537,"children":8538},{"style":172},[8539],{"type":55,"value":8488},{"type":49,"tag":131,"props":8541,"children":8542},{"style":138},[8543],{"type":55,"value":8518},{"type":49,"tag":131,"props":8545,"children":8546},{"style":172},[8547],{"type":55,"value":5302},{"type":49,"tag":131,"props":8549,"children":8550},{"style":346},[8551],{"type":55,"value":8552},"   \u002F\u002F Bytes downloaded (only for 'progress' status)\n",{"type":49,"tag":131,"props":8554,"children":8555},{"class":133,"line":424},[8556,8561,8565,8569,8573],{"type":49,"tag":131,"props":8557,"children":8558},{"style":178},[8559],{"type":55,"value":8560},"  total",{"type":49,"tag":131,"props":8562,"children":8563},{"style":172},[8564],{"type":55,"value":8488},{"type":49,"tag":131,"props":8566,"children":8567},{"style":138},[8568],{"type":55,"value":8518},{"type":49,"tag":131,"props":8570,"children":8571},{"style":172},[8572],{"type":55,"value":5302},{"type":49,"tag":131,"props":8574,"children":8575},{"style":346},[8576],{"type":55,"value":8577},"    \u002F\u002F Total bytes (only for 'progress' status)\n",{"type":49,"tag":131,"props":8579,"children":8580},{"class":133,"line":475},[8581],{"type":49,"tag":131,"props":8582,"children":8583},{"style":172},[8584],{"type":55,"value":8202},{"type":49,"tag":58,"props":8586,"children":8587},{},[8588],{"type":55,"value":8589},"For complete examples including browser UIs, React components, CLI progress bars, and retry logic, see:",{"type":49,"tag":58,"props":8591,"children":8592},{},[8593],{"type":49,"tag":535,"props":8594,"children":8595},{},[8596,8597],{"type":55,"value":6110},{"type":49,"tag":551,"props":8598,"children":8600},{"href":8599},".\u002Freferences\u002FPIPELINE_OPTIONS.md#progress-callback",[8601],{"type":55,"value":8602},"Pipeline Options - Progress Callback",{"type":49,"tag":64,"props":8604,"children":8606},{"id":8605},"error-handling",[8607],{"type":55,"value":8608},"Error Handling",{"type":49,"tag":119,"props":8610,"children":8612},{"className":161,"code":8611,"language":23,"meta":124,"style":124},"try {\n  const pipe = await pipeline('sentiment-analysis', 'model-id');\n  const result = await pipe('text to analyze');\n} catch (error) {\n  if (error.message.includes('fetch')) {\n    console.error('Model download failed. Check internet connection.');\n  } else if (error.message.includes('ONNX')) {\n    console.error('Model execution failed. Check model compatibility.');\n  } else {\n    console.error('Unknown error:', error);\n  }\n}\n",[8613],{"type":49,"tag":127,"props":8614,"children":8615},{"__ignoreMap":124},[8616,8628,8692,8741,8762,8821,8861,8927,8967,8982,9031,9038],{"type":49,"tag":131,"props":8617,"children":8618},{"class":133,"line":134},[8619,8624],{"type":49,"tag":131,"props":8620,"children":8621},{"style":288},[8622],{"type":55,"value":8623},"try",{"type":49,"tag":131,"props":8625,"children":8626},{"style":172},[8627],{"type":55,"value":920},{"type":49,"tag":131,"props":8629,"children":8630},{"class":133,"line":214},[8631,8636,8640,8644,8648,8652,8656,8660,8664,8668,8672,8676,8680,8684,8688],{"type":49,"tag":131,"props":8632,"children":8633},{"style":184},[8634],{"type":55,"value":8635},"  const",{"type":49,"tag":131,"props":8637,"children":8638},{"style":218},[8639],{"type":55,"value":447},{"type":49,"tag":131,"props":8641,"children":8642},{"style":172},[8643],{"type":55,"value":5620},{"type":49,"tag":131,"props":8645,"children":8646},{"style":288},[8647],{"type":55,"value":372},{"type":49,"tag":131,"props":8649,"children":8650},{"style":375},[8651],{"type":55,"value":301},{"type":49,"tag":131,"props":8653,"children":8654},{"style":178},[8655],{"type":55,"value":382},{"type":49,"tag":131,"props":8657,"children":8658},{"style":172},[8659],{"type":55,"value":326},{"type":49,"tag":131,"props":8661,"children":8662},{"style":144},[8663],{"type":55,"value":391},{"type":49,"tag":131,"props":8665,"children":8666},{"style":172},[8667],{"type":55,"value":326},{"type":49,"tag":131,"props":8669,"children":8670},{"style":172},[8671],{"type":55,"value":820},{"type":49,"tag":131,"props":8673,"children":8674},{"style":172},[8675],{"type":55,"value":316},{"type":49,"tag":131,"props":8677,"children":8678},{"style":144},[8679],{"type":55,"value":829},{"type":49,"tag":131,"props":8681,"children":8682},{"style":172},[8683],{"type":55,"value":326},{"type":49,"tag":131,"props":8685,"children":8686},{"style":178},[8687],{"type":55,"value":400},{"type":49,"tag":131,"props":8689,"children":8690},{"style":172},[8691],{"type":55,"value":331},{"type":49,"tag":131,"props":8693,"children":8694},{"class":133,"line":244},[8695,8699,8704,8708,8712,8716,8720,8724,8729,8733,8737],{"type":49,"tag":131,"props":8696,"children":8697},{"style":184},[8698],{"type":55,"value":8635},{"type":49,"tag":131,"props":8700,"children":8701},{"style":218},[8702],{"type":55,"value":8703}," result",{"type":49,"tag":131,"props":8705,"children":8706},{"style":172},[8707],{"type":55,"value":5620},{"type":49,"tag":131,"props":8709,"children":8710},{"style":288},[8711],{"type":55,"value":372},{"type":49,"tag":131,"props":8713,"children":8714},{"style":375},[8715],{"type":55,"value":447},{"type":49,"tag":131,"props":8717,"children":8718},{"style":178},[8719],{"type":55,"value":382},{"type":49,"tag":131,"props":8721,"children":8722},{"style":172},[8723],{"type":55,"value":326},{"type":49,"tag":131,"props":8725,"children":8726},{"style":144},[8727],{"type":55,"value":8728},"text to analyze",{"type":49,"tag":131,"props":8730,"children":8731},{"style":172},[8732],{"type":55,"value":326},{"type":49,"tag":131,"props":8734,"children":8735},{"style":178},[8736],{"type":55,"value":400},{"type":49,"tag":131,"props":8738,"children":8739},{"style":172},[8740],{"type":55,"value":331},{"type":49,"tag":131,"props":8742,"children":8743},{"class":133,"line":352},[8744,8748,8753,8758],{"type":49,"tag":131,"props":8745,"children":8746},{"style":172},[8747],{"type":55,"value":236},{"type":49,"tag":131,"props":8749,"children":8750},{"style":288},[8751],{"type":55,"value":8752}," catch",{"type":49,"tag":131,"props":8754,"children":8755},{"style":218},[8756],{"type":55,"value":8757}," (error) ",{"type":49,"tag":131,"props":8759,"children":8760},{"style":172},[8761],{"type":55,"value":1443},{"type":49,"tag":131,"props":8763,"children":8764},{"class":133,"line":407},[8765,8769,8773,8778,8782,8787,8791,8796,8800,8804,8808,8812,8817],{"type":49,"tag":131,"props":8766,"children":8767},{"style":288},[8768],{"type":55,"value":7613},{"type":49,"tag":131,"props":8770,"children":8771},{"style":178},[8772],{"type":55,"value":5625},{"type":49,"tag":131,"props":8774,"children":8775},{"style":218},[8776],{"type":55,"value":8777},"error",{"type":49,"tag":131,"props":8779,"children":8780},{"style":172},[8781],{"type":55,"value":516},{"type":49,"tag":131,"props":8783,"children":8784},{"style":218},[8785],{"type":55,"value":8786},"message",{"type":49,"tag":131,"props":8788,"children":8789},{"style":172},[8790],{"type":55,"value":516},{"type":49,"tag":131,"props":8792,"children":8793},{"style":375},[8794],{"type":55,"value":8795},"includes",{"type":49,"tag":131,"props":8797,"children":8798},{"style":178},[8799],{"type":55,"value":382},{"type":49,"tag":131,"props":8801,"children":8802},{"style":172},[8803],{"type":55,"value":326},{"type":49,"tag":131,"props":8805,"children":8806},{"style":144},[8807],{"type":55,"value":5615},{"type":49,"tag":131,"props":8809,"children":8810},{"style":172},[8811],{"type":55,"value":326},{"type":49,"tag":131,"props":8813,"children":8814},{"style":178},[8815],{"type":55,"value":8816},")) ",{"type":49,"tag":131,"props":8818,"children":8819},{"style":172},[8820],{"type":55,"value":1443},{"type":49,"tag":131,"props":8822,"children":8823},{"class":133,"line":415},[8824,8828,8832,8836,8840,8844,8849,8853,8857],{"type":49,"tag":131,"props":8825,"children":8826},{"style":218},[8827],{"type":55,"value":7665},{"type":49,"tag":131,"props":8829,"children":8830},{"style":172},[8831],{"type":55,"value":516},{"type":49,"tag":131,"props":8833,"children":8834},{"style":375},[8835],{"type":55,"value":8777},{"type":49,"tag":131,"props":8837,"children":8838},{"style":178},[8839],{"type":55,"value":382},{"type":49,"tag":131,"props":8841,"children":8842},{"style":172},[8843],{"type":55,"value":326},{"type":49,"tag":131,"props":8845,"children":8846},{"style":144},[8847],{"type":55,"value":8848},"Model download failed. Check internet connection.",{"type":49,"tag":131,"props":8850,"children":8851},{"style":172},[8852],{"type":55,"value":326},{"type":49,"tag":131,"props":8854,"children":8855},{"style":178},[8856],{"type":55,"value":400},{"type":49,"tag":131,"props":8858,"children":8859},{"style":172},[8860],{"type":55,"value":331},{"type":49,"tag":131,"props":8862,"children":8863},{"class":133,"line":424},[8864,8868,8873,8878,8882,8886,8890,8894,8898,8902,8906,8910,8915,8919,8923],{"type":49,"tag":131,"props":8865,"children":8866},{"style":172},[8867],{"type":55,"value":5786},{"type":49,"tag":131,"props":8869,"children":8870},{"style":288},[8871],{"type":55,"value":8872}," else",{"type":49,"tag":131,"props":8874,"children":8875},{"style":288},[8876],{"type":55,"value":8877}," if",{"type":49,"tag":131,"props":8879,"children":8880},{"style":178},[8881],{"type":55,"value":5625},{"type":49,"tag":131,"props":8883,"children":8884},{"style":218},[8885],{"type":55,"value":8777},{"type":49,"tag":131,"props":8887,"children":8888},{"style":172},[8889],{"type":55,"value":516},{"type":49,"tag":131,"props":8891,"children":8892},{"style":218},[8893],{"type":55,"value":8786},{"type":49,"tag":131,"props":8895,"children":8896},{"style":172},[8897],{"type":55,"value":516},{"type":49,"tag":131,"props":8899,"children":8900},{"style":375},[8901],{"type":55,"value":8795},{"type":49,"tag":131,"props":8903,"children":8904},{"style":178},[8905],{"type":55,"value":382},{"type":49,"tag":131,"props":8907,"children":8908},{"style":172},[8909],{"type":55,"value":326},{"type":49,"tag":131,"props":8911,"children":8912},{"style":144},[8913],{"type":55,"value":8914},"ONNX",{"type":49,"tag":131,"props":8916,"children":8917},{"style":172},[8918],{"type":55,"value":326},{"type":49,"tag":131,"props":8920,"children":8921},{"style":178},[8922],{"type":55,"value":8816},{"type":49,"tag":131,"props":8924,"children":8925},{"style":172},[8926],{"type":55,"value":1443},{"type":49,"tag":131,"props":8928,"children":8929},{"class":133,"line":475},[8930,8934,8938,8942,8946,8950,8955,8959,8963],{"type":49,"tag":131,"props":8931,"children":8932},{"style":218},[8933],{"type":55,"value":7665},{"type":49,"tag":131,"props":8935,"children":8936},{"style":172},[8937],{"type":55,"value":516},{"type":49,"tag":131,"props":8939,"children":8940},{"style":375},[8941],{"type":55,"value":8777},{"type":49,"tag":131,"props":8943,"children":8944},{"style":178},[8945],{"type":55,"value":382},{"type":49,"tag":131,"props":8947,"children":8948},{"style":172},[8949],{"type":55,"value":326},{"type":49,"tag":131,"props":8951,"children":8952},{"style":144},[8953],{"type":55,"value":8954},"Model execution failed. Check model compatibility.",{"type":49,"tag":131,"props":8956,"children":8957},{"style":172},[8958],{"type":55,"value":326},{"type":49,"tag":131,"props":8960,"children":8961},{"style":178},[8962],{"type":55,"value":400},{"type":49,"tag":131,"props":8964,"children":8965},{"style":172},[8966],{"type":55,"value":331},{"type":49,"tag":131,"props":8968,"children":8969},{"class":133,"line":484},[8970,8974,8978],{"type":49,"tag":131,"props":8971,"children":8972},{"style":172},[8973],{"type":55,"value":5786},{"type":49,"tag":131,"props":8975,"children":8976},{"style":288},[8977],{"type":55,"value":8872},{"type":49,"tag":131,"props":8979,"children":8980},{"style":172},[8981],{"type":55,"value":920},{"type":49,"tag":131,"props":8983,"children":8984},{"class":133,"line":492},[8985,8989,8993,8997,9001,9005,9010,9014,9018,9023,9027],{"type":49,"tag":131,"props":8986,"children":8987},{"style":218},[8988],{"type":55,"value":7665},{"type":49,"tag":131,"props":8990,"children":8991},{"style":172},[8992],{"type":55,"value":516},{"type":49,"tag":131,"props":8994,"children":8995},{"style":375},[8996],{"type":55,"value":8777},{"type":49,"tag":131,"props":8998,"children":8999},{"style":178},[9000],{"type":55,"value":382},{"type":49,"tag":131,"props":9002,"children":9003},{"style":172},[9004],{"type":55,"value":326},{"type":49,"tag":131,"props":9006,"children":9007},{"style":144},[9008],{"type":55,"value":9009},"Unknown error:",{"type":49,"tag":131,"props":9011,"children":9012},{"style":172},[9013],{"type":55,"value":326},{"type":49,"tag":131,"props":9015,"children":9016},{"style":172},[9017],{"type":55,"value":820},{"type":49,"tag":131,"props":9019,"children":9020},{"style":218},[9021],{"type":55,"value":9022}," error",{"type":49,"tag":131,"props":9024,"children":9025},{"style":178},[9026],{"type":55,"value":400},{"type":49,"tag":131,"props":9028,"children":9029},{"style":172},[9030],{"type":55,"value":331},{"type":49,"tag":131,"props":9032,"children":9033},{"class":133,"line":501},[9034],{"type":49,"tag":131,"props":9035,"children":9036},{"style":172},[9037],{"type":55,"value":7767},{"type":49,"tag":131,"props":9039,"children":9040},{"class":133,"line":4669},[9041],{"type":49,"tag":131,"props":9042,"children":9043},{"style":172},[9044],{"type":55,"value":8202},{"type":49,"tag":64,"props":9046,"children":9048},{"id":9047},"performance-tips",[9049],{"type":55,"value":9050},"Performance Tips",{"type":49,"tag":4967,"props":9052,"children":9053},{},[9054,9064,9088,9097,9118,9128,9146],{"type":49,"tag":80,"props":9055,"children":9056},{},[9057,9062],{"type":49,"tag":535,"props":9058,"children":9059},{},[9060],{"type":55,"value":9061},"Reuse Pipelines",{"type":55,"value":9063},": Create pipeline once, reuse for multiple inferences",{"type":49,"tag":80,"props":9065,"children":9066},{},[9067,9072,9074,9079,9081,9086],{"type":49,"tag":535,"props":9068,"children":9069},{},[9070],{"type":55,"value":9071},"Use Quantization",{"type":55,"value":9073},": Start with ",{"type":49,"tag":127,"props":9075,"children":9077},{"className":9076},[],[9078],{"type":55,"value":4490},{"type":55,"value":9080}," or ",{"type":49,"tag":127,"props":9082,"children":9084},{"className":9083},[],[9085],{"type":55,"value":1075},{"type":55,"value":9087}," for faster inference",{"type":49,"tag":80,"props":9089,"children":9090},{},[9091,9095],{"type":49,"tag":535,"props":9092,"children":9093},{},[9094],{"type":55,"value":7002},{"type":55,"value":9096},": Process multiple inputs together when possible",{"type":49,"tag":80,"props":9098,"children":9099},{},[9100,9105,9107,9116],{"type":49,"tag":535,"props":9101,"children":9102},{},[9103],{"type":55,"value":9104},"Cache Models",{"type":55,"value":9106},": Models are cached automatically (see ",{"type":49,"tag":535,"props":9108,"children":9109},{},[9110],{"type":49,"tag":551,"props":9111,"children":9113},{"href":9112},".\u002Freferences\u002FCACHE.md",[9114],{"type":55,"value":9115},"Caching Reference",{"type":55,"value":9117}," for details on browser Cache API, Node.js filesystem cache, and custom implementations)",{"type":49,"tag":80,"props":9119,"children":9120},{},[9121,9126],{"type":49,"tag":535,"props":9122,"children":9123},{},[9124],{"type":55,"value":9125},"WebGPU for Large Models",{"type":55,"value":9127},": Use WebGPU for models that benefit from GPU acceleration",{"type":49,"tag":80,"props":9129,"children":9130},{},[9131,9136,9138,9144],{"type":49,"tag":535,"props":9132,"children":9133},{},[9134],{"type":55,"value":9135},"Prune Context",{"type":55,"value":9137},": For text generation, limit ",{"type":49,"tag":127,"props":9139,"children":9141},{"className":9140},[],[9142],{"type":55,"value":9143},"max_new_tokens",{"type":55,"value":9145}," to avoid memory issues",{"type":49,"tag":80,"props":9147,"children":9148},{},[9149,9154,9156,9161],{"type":49,"tag":535,"props":9150,"children":9151},{},[9152],{"type":55,"value":9153},"Clean Up Resources",{"type":55,"value":9155},": Call ",{"type":49,"tag":127,"props":9157,"children":9159},{"className":9158},[],[9160],{"type":55,"value":547},{"type":55,"value":9162}," when done to free memory",{"type":49,"tag":64,"props":9164,"children":9166},{"id":9165},"memory-management",[9167],{"type":55,"value":9168},"Memory Management",{"type":49,"tag":58,"props":9170,"children":9171},{},[9172,9177,9179,9184],{"type":49,"tag":535,"props":9173,"children":9174},{},[9175],{"type":55,"value":9176},"IMPORTANT:",{"type":55,"value":9178}," Always call ",{"type":49,"tag":127,"props":9180,"children":9182},{"className":9181},[],[9183],{"type":55,"value":547},{"type":55,"value":9185}," when finished to prevent memory leaks.",{"type":49,"tag":119,"props":9187,"children":9189},{"className":161,"code":9188,"language":23,"meta":124,"style":124},"const pipe = await pipeline('sentiment-analysis');\nconst result = await pipe('Great product!');\nawait pipe.dispose();  \u002F\u002F ✓ Free memory (100MB - several GB per model)\n",[9190],{"type":49,"tag":127,"props":9191,"children":9192},{"__ignoreMap":124},[9193,9240,9288],{"type":49,"tag":131,"props":9194,"children":9195},{"class":133,"line":134},[9196,9200,9204,9208,9212,9216,9220,9224,9228,9232,9236],{"type":49,"tag":131,"props":9197,"children":9198},{"style":184},[9199],{"type":55,"value":358},{"type":49,"tag":131,"props":9201,"children":9202},{"style":218},[9203],{"type":55,"value":363},{"type":49,"tag":131,"props":9205,"children":9206},{"style":172},[9207],{"type":55,"value":192},{"type":49,"tag":131,"props":9209,"children":9210},{"style":288},[9211],{"type":55,"value":372},{"type":49,"tag":131,"props":9213,"children":9214},{"style":375},[9215],{"type":55,"value":301},{"type":49,"tag":131,"props":9217,"children":9218},{"style":218},[9219],{"type":55,"value":382},{"type":49,"tag":131,"props":9221,"children":9222},{"style":172},[9223],{"type":55,"value":326},{"type":49,"tag":131,"props":9225,"children":9226},{"style":144},[9227],{"type":55,"value":391},{"type":49,"tag":131,"props":9229,"children":9230},{"style":172},[9231],{"type":55,"value":326},{"type":49,"tag":131,"props":9233,"children":9234},{"style":218},[9235],{"type":55,"value":400},{"type":49,"tag":131,"props":9237,"children":9238},{"style":172},[9239],{"type":55,"value":331},{"type":49,"tag":131,"props":9241,"children":9242},{"class":133,"line":214},[9243,9247,9251,9255,9259,9263,9267,9271,9276,9280,9284],{"type":49,"tag":131,"props":9244,"children":9245},{"style":184},[9246],{"type":55,"value":358},{"type":49,"tag":131,"props":9248,"children":9249},{"style":218},[9250],{"type":55,"value":434},{"type":49,"tag":131,"props":9252,"children":9253},{"style":172},[9254],{"type":55,"value":192},{"type":49,"tag":131,"props":9256,"children":9257},{"style":288},[9258],{"type":55,"value":372},{"type":49,"tag":131,"props":9260,"children":9261},{"style":375},[9262],{"type":55,"value":447},{"type":49,"tag":131,"props":9264,"children":9265},{"style":218},[9266],{"type":55,"value":382},{"type":49,"tag":131,"props":9268,"children":9269},{"style":172},[9270],{"type":55,"value":326},{"type":49,"tag":131,"props":9272,"children":9273},{"style":144},[9274],{"type":55,"value":9275},"Great product!",{"type":49,"tag":131,"props":9277,"children":9278},{"style":172},[9279],{"type":55,"value":326},{"type":49,"tag":131,"props":9281,"children":9282},{"style":218},[9283],{"type":55,"value":400},{"type":49,"tag":131,"props":9285,"children":9286},{"style":172},[9287],{"type":55,"value":331},{"type":49,"tag":131,"props":9289,"children":9290},{"class":133,"line":244},[9291,9295,9299,9303,9307,9311,9315],{"type":49,"tag":131,"props":9292,"children":9293},{"style":288},[9294],{"type":55,"value":507},{"type":49,"tag":131,"props":9296,"children":9297},{"style":218},[9298],{"type":55,"value":447},{"type":49,"tag":131,"props":9300,"children":9301},{"style":172},[9302],{"type":55,"value":516},{"type":49,"tag":131,"props":9304,"children":9305},{"style":375},[9306],{"type":55,"value":521},{"type":49,"tag":131,"props":9308,"children":9309},{"style":218},[9310],{"type":55,"value":526},{"type":49,"tag":131,"props":9312,"children":9313},{"style":172},[9314],{"type":55,"value":5302},{"type":49,"tag":131,"props":9316,"children":9317},{"style":346},[9318],{"type":55,"value":9319},"  \u002F\u002F ✓ Free memory (100MB - several GB per model)\n",{"type":49,"tag":58,"props":9321,"children":9322},{},[9323],{"type":49,"tag":535,"props":9324,"children":9325},{},[9326],{"type":55,"value":9327},"When to dispose:",{"type":49,"tag":76,"props":9329,"children":9330},{},[9331,9336,9341],{"type":49,"tag":80,"props":9332,"children":9333},{},[9334],{"type":55,"value":9335},"Application shutdown or component unmount",{"type":49,"tag":80,"props":9337,"children":9338},{},[9339],{"type":55,"value":9340},"Before loading a different model",{"type":49,"tag":80,"props":9342,"children":9343},{},[9344],{"type":55,"value":9345},"After batch processing in long-running apps",{"type":49,"tag":58,"props":9347,"children":9348},{},[9349],{"type":55,"value":9350},"Models consume significant memory and hold GPU\u002FCPU resources. Disposal is critical for browser memory limits and server stability.",{"type":49,"tag":58,"props":9352,"children":9353},{},[9354,9356],{"type":55,"value":9355},"For detailed patterns (React cleanup, servers, browser), see ",{"type":49,"tag":535,"props":9357,"children":9358},{},[9359],{"type":49,"tag":551,"props":9360,"children":9361},{"href":553},[9362],{"type":55,"value":556},{"type":49,"tag":64,"props":9364,"children":9366},{"id":9365},"troubleshooting",[9367],{"type":55,"value":9368},"Troubleshooting",{"type":49,"tag":112,"props":9370,"children":9372},{"id":9371},"model-not-found",[9373],{"type":55,"value":9374},"Model Not Found",{"type":49,"tag":76,"props":9376,"children":9377},{},[9378,9383,9388],{"type":49,"tag":80,"props":9379,"children":9380},{},[9381],{"type":55,"value":9382},"Verify model exists on Hugging Face Hub",{"type":49,"tag":80,"props":9384,"children":9385},{},[9386],{"type":55,"value":9387},"Check model name spelling",{"type":49,"tag":80,"props":9389,"children":9390},{},[9391,9393,9398],{"type":55,"value":9392},"Ensure model has ONNX files (look for ",{"type":49,"tag":127,"props":9394,"children":9396},{"className":9395},[],[9397],{"type":55,"value":4995},{"type":55,"value":4997},{"type":49,"tag":112,"props":9400,"children":9402},{"id":9401},"memory-issues",[9403],{"type":55,"value":9404},"Memory Issues",{"type":49,"tag":76,"props":9406,"children":9407},{},[9408,9420,9425],{"type":49,"tag":80,"props":9409,"children":9410},{},[9411,9413,9419],{"type":55,"value":9412},"Use smaller models or quantized versions (",{"type":49,"tag":127,"props":9414,"children":9416},{"className":9415},[],[9417],{"type":55,"value":9418},"dtype: 'q4'",{"type":55,"value":400},{"type":49,"tag":80,"props":9421,"children":9422},{},[9423],{"type":55,"value":9424},"Reduce batch size",{"type":49,"tag":80,"props":9426,"children":9427},{},[9428,9430],{"type":55,"value":9429},"Limit sequence length with ",{"type":49,"tag":127,"props":9431,"children":9433},{"className":9432},[],[9434],{"type":55,"value":9435},"max_length",{"type":49,"tag":112,"props":9437,"children":9439},{"id":9438},"webgpu-errors",[9440],{"type":55,"value":9441},"WebGPU Errors",{"type":49,"tag":76,"props":9443,"children":9444},{},[9445,9450,9470],{"type":49,"tag":80,"props":9446,"children":9447},{},[9448],{"type":55,"value":9449},"Check browser compatibility (Chrome 113+, Edge 113+)",{"type":49,"tag":80,"props":9451,"children":9452},{},[9453,9455,9461,9463,9468],{"type":55,"value":9454},"Try ",{"type":49,"tag":127,"props":9456,"children":9458},{"className":9457},[],[9459],{"type":55,"value":9460},"dtype: 'fp16'",{"type":55,"value":9462}," if ",{"type":49,"tag":127,"props":9464,"children":9466},{"className":9465},[],[9467],{"type":55,"value":4468},{"type":55,"value":9469}," fails",{"type":49,"tag":80,"props":9471,"children":9472},{},[9473],{"type":55,"value":9474},"Fall back to WASM if WebGPU unavailable",{"type":49,"tag":64,"props":9476,"children":9478},{"id":9477},"reference-documentation",[9479],{"type":55,"value":9480},"Reference Documentation",{"type":49,"tag":112,"props":9482,"children":9484},{"id":9483},"this-skill",[9485],{"type":55,"value":9486},"This Skill",{"type":49,"tag":76,"props":9488,"children":9489},{},[9490,9534,9553,9565,9577,9589,9603],{"type":49,"tag":80,"props":9491,"children":9492},{},[9493,9502,9504,9509,9511,9517,9519,9525,9526,9532],{"type":49,"tag":535,"props":9494,"children":9495},{},[9496],{"type":49,"tag":551,"props":9497,"children":9499},{"href":9498},".\u002Freferences\u002FPIPELINE_OPTIONS.md",[9500],{"type":55,"value":9501},"Pipeline Options",{"type":55,"value":9503}," - Configure ",{"type":49,"tag":127,"props":9505,"children":9507},{"className":9506},[],[9508],{"type":55,"value":7484},{"type":55,"value":9510}," with ",{"type":49,"tag":127,"props":9512,"children":9514},{"className":9513},[],[9515],{"type":55,"value":9516},"progress_callback",{"type":55,"value":9518},", ",{"type":49,"tag":127,"props":9520,"children":9522},{"className":9521},[],[9523],{"type":55,"value":9524},"device",{"type":55,"value":9518},{"type":49,"tag":127,"props":9527,"children":9529},{"className":9528},[],[9530],{"type":55,"value":9531},"dtype",{"type":55,"value":9533},", etc.",{"type":49,"tag":80,"props":9535,"children":9536},{},[9537,9544,9546,9551],{"type":49,"tag":535,"props":9538,"children":9539},{},[9540],{"type":49,"tag":551,"props":9541,"children":9542},{"href":6113},[9543],{"type":55,"value":6116},{"type":55,"value":9545}," - Global ",{"type":49,"tag":127,"props":9547,"children":9549},{"className":9548},[],[9550],{"type":55,"value":5174},{"type":55,"value":9552}," configuration for caching and model loading",{"type":49,"tag":80,"props":9554,"children":9555},{},[9556,9563],{"type":49,"tag":535,"props":9557,"children":9558},{},[9559],{"type":49,"tag":551,"props":9560,"children":9561},{"href":6592},[9562],{"type":55,"value":6595},{"type":55,"value":9564}," - Inspect files, cache status, dtypes, and clear cache before loading pipelines",{"type":49,"tag":80,"props":9566,"children":9567},{},[9568,9575],{"type":49,"tag":535,"props":9569,"children":9570},{},[9571],{"type":49,"tag":551,"props":9572,"children":9573},{"href":9112},[9574],{"type":55,"value":9115},{"type":55,"value":9576}," - Browser Cache API, Node.js filesystem cache, and custom cache implementations",{"type":49,"tag":80,"props":9578,"children":9579},{},[9580,9587],{"type":49,"tag":535,"props":9581,"children":9582},{},[9583],{"type":49,"tag":551,"props":9584,"children":9585},{"href":1710},[9586],{"type":55,"value":1713},{"type":55,"value":9588}," - Streaming, chat format, and generation parameters",{"type":49,"tag":80,"props":9590,"children":9591},{},[9592,9601],{"type":49,"tag":535,"props":9593,"children":9594},{},[9595],{"type":49,"tag":551,"props":9596,"children":9598},{"href":9597},".\u002Freferences\u002FMODEL_ARCHITECTURES.md",[9599],{"type":55,"value":9600},"Model Architectures",{"type":55,"value":9602}," - Supported models and selection tips",{"type":49,"tag":80,"props":9604,"children":9605},{},[9606,9613],{"type":49,"tag":535,"props":9607,"children":9608},{},[9609],{"type":49,"tag":551,"props":9610,"children":9611},{"href":553},[9612],{"type":55,"value":556},{"type":55,"value":9614}," - Real-world implementations for different runtimes",{"type":49,"tag":112,"props":9616,"children":9618},{"id":9617},"official-transformersjs",[9619],{"type":55,"value":9620},"Official Transformers.js",{"type":49,"tag":76,"props":9622,"children":9623},{},[9624,9635,9646,9656,9666],{"type":49,"tag":80,"props":9625,"children":9626},{},[9627,9629],{"type":55,"value":9628},"Official docs: ",{"type":49,"tag":551,"props":9630,"children":9633},{"href":9631,"rel":9632},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js",[684],[9634],{"type":55,"value":9631},{"type":49,"tag":80,"props":9636,"children":9637},{},[9638,9640],{"type":55,"value":9639},"API reference: ",{"type":49,"tag":551,"props":9641,"children":9644},{"href":9642,"rel":9643},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js\u002Fapi\u002Fpipelines",[684],[9645],{"type":55,"value":9642},{"type":49,"tag":80,"props":9647,"children":9648},{},[9649,9651],{"type":55,"value":9650},"Model hub: ",{"type":49,"tag":551,"props":9652,"children":9654},{"href":5038,"rel":9653},[684],[9655],{"type":55,"value":5038},{"type":49,"tag":80,"props":9657,"children":9658},{},[9659,9661],{"type":55,"value":9660},"GitHub: ",{"type":49,"tag":551,"props":9662,"children":9664},{"href":43,"rel":9663},[684],[9665],{"type":55,"value":43},{"type":49,"tag":80,"props":9667,"children":9668},{},[9669,9671],{"type":55,"value":9670},"Examples: ",{"type":49,"tag":551,"props":9672,"children":9675},{"href":9673,"rel":9674},"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js-examples",[684],[9676],{"type":55,"value":9673},{"type":49,"tag":64,"props":9678,"children":9680},{"id":9679},"best-practices",[9681],{"type":55,"value":9682},"Best Practices",{"type":49,"tag":4967,"props":9684,"children":9685},{},[9686,9702,9712,9722,9732,9742,9751,9761,9771,9781],{"type":49,"tag":80,"props":9687,"children":9688},{},[9689,9694,9695,9700],{"type":49,"tag":535,"props":9690,"children":9691},{},[9692],{"type":55,"value":9693},"Always Dispose Pipelines",{"type":55,"value":9155},{"type":49,"tag":127,"props":9696,"children":9698},{"className":9697},[],[9699],{"type":55,"value":547},{"type":55,"value":9701}," when done - critical for preventing memory leaks",{"type":49,"tag":80,"props":9703,"children":9704},{},[9705,9710],{"type":49,"tag":535,"props":9706,"children":9707},{},[9708],{"type":55,"value":9709},"Start with Pipelines",{"type":55,"value":9711},": Use the pipeline API unless you need fine-grained control",{"type":49,"tag":80,"props":9713,"children":9714},{},[9715,9720],{"type":49,"tag":535,"props":9716,"children":9717},{},[9718],{"type":55,"value":9719},"Test Locally First",{"type":55,"value":9721},": Test models with small inputs before deploying",{"type":49,"tag":80,"props":9723,"children":9724},{},[9725,9730],{"type":49,"tag":535,"props":9726,"children":9727},{},[9728],{"type":55,"value":9729},"Monitor Model Sizes",{"type":55,"value":9731},": Be aware of model download sizes for web applications",{"type":49,"tag":80,"props":9733,"children":9734},{},[9735,9740],{"type":49,"tag":535,"props":9736,"children":9737},{},[9738],{"type":55,"value":9739},"Handle Loading States",{"type":55,"value":9741},": Show progress indicators for better UX",{"type":49,"tag":80,"props":9743,"children":9744},{},[9745,9749],{"type":49,"tag":535,"props":9746,"children":9747},{},[9748],{"type":55,"value":5049},{"type":55,"value":9750},": Pin specific model versions for production stability",{"type":49,"tag":80,"props":9752,"children":9753},{},[9754,9759],{"type":49,"tag":535,"props":9755,"children":9756},{},[9757],{"type":55,"value":9758},"Error Boundaries",{"type":55,"value":9760},": Always wrap pipeline calls in try-catch blocks",{"type":49,"tag":80,"props":9762,"children":9763},{},[9764,9769],{"type":49,"tag":535,"props":9765,"children":9766},{},[9767],{"type":55,"value":9768},"Progressive Enhancement",{"type":55,"value":9770},": Provide fallbacks for unsupported browsers",{"type":49,"tag":80,"props":9772,"children":9773},{},[9774,9779],{"type":49,"tag":535,"props":9775,"children":9776},{},[9777],{"type":55,"value":9778},"Reuse Models",{"type":55,"value":9780},": Load once, use many times - don't recreate pipelines unnecessarily",{"type":49,"tag":80,"props":9782,"children":9783},{},[9784,9789],{"type":49,"tag":535,"props":9785,"children":9786},{},[9787],{"type":55,"value":9788},"Graceful Shutdown",{"type":55,"value":9790},": Dispose models on SIGTERM\u002FSIGINT in servers",{"type":49,"tag":64,"props":9792,"children":9794},{"id":9793},"quick-reference-task-ids",[9795],{"type":55,"value":9796},"Quick Reference: Task IDs",{"type":49,"tag":4066,"props":9798,"children":9799},{},[9800,9815],{"type":49,"tag":4070,"props":9801,"children":9802},{},[9803],{"type":49,"tag":4074,"props":9804,"children":9805},{},[9806,9810],{"type":49,"tag":4078,"props":9807,"children":9808},{},[9809],{"type":55,"value":4082},{"type":49,"tag":4078,"props":9811,"children":9812},{},[9813],{"type":55,"value":9814},"Task ID",{"type":49,"tag":4089,"props":9816,"children":9817},{},[9818,9840,9863,9879,9896,9911,9926,9942,9959,9975,9991,10007,10023,10039,10056,10072,10088,10104,10120,10143,10159,10175,10191],{"type":49,"tag":4074,"props":9819,"children":9820},{},[9821,9826],{"type":49,"tag":4096,"props":9822,"children":9823},{},[9824],{"type":55,"value":9825},"Text classification",{"type":49,"tag":4096,"props":9827,"children":9828},{},[9829,9834,9835],{"type":49,"tag":127,"props":9830,"children":9832},{"className":9831},[],[9833],{"type":55,"value":1129},{"type":55,"value":9080},{"type":49,"tag":127,"props":9836,"children":9838},{"className":9837},[],[9839],{"type":55,"value":391},{"type":49,"tag":4074,"props":9841,"children":9842},{},[9843,9848],{"type":49,"tag":4096,"props":9844,"children":9845},{},[9846],{"type":55,"value":9847},"Token classification",{"type":49,"tag":4096,"props":9849,"children":9850},{},[9851,9856,9857],{"type":49,"tag":127,"props":9852,"children":9854},{"className":9853},[],[9855],{"type":55,"value":1286},{"type":55,"value":9080},{"type":49,"tag":127,"props":9858,"children":9860},{"className":9859},[],[9861],{"type":55,"value":9862},"ner",{"type":49,"tag":4074,"props":9864,"children":9865},{},[9866,9871],{"type":49,"tag":4096,"props":9867,"children":9868},{},[9869],{"type":55,"value":9870},"Question answering",{"type":49,"tag":4096,"props":9872,"children":9873},{},[9874],{"type":49,"tag":127,"props":9875,"children":9877},{"className":9876},[],[9878],{"type":55,"value":1351},{"type":49,"tag":4074,"props":9880,"children":9881},{},[9882,9887],{"type":49,"tag":4096,"props":9883,"children":9884},{},[9885],{"type":55,"value":9886},"Fill mask",{"type":49,"tag":4096,"props":9888,"children":9889},{},[9890],{"type":49,"tag":127,"props":9891,"children":9893},{"className":9892},[],[9894],{"type":55,"value":9895},"fill-mask",{"type":49,"tag":4074,"props":9897,"children":9898},{},[9899,9903],{"type":49,"tag":4096,"props":9900,"children":9901},{},[9902],{"type":55,"value":1952},{"type":49,"tag":4096,"props":9904,"children":9905},{},[9906],{"type":49,"tag":127,"props":9907,"children":9909},{"className":9908},[],[9910],{"type":55,"value":1949},{"type":49,"tag":4074,"props":9912,"children":9913},{},[9914,9918],{"type":49,"tag":4096,"props":9915,"children":9916},{},[9917],{"type":55,"value":1755},{"type":49,"tag":4096,"props":9919,"children":9920},{},[9921],{"type":49,"tag":127,"props":9922,"children":9924},{"className":9923},[],[9925],{"type":55,"value":1752},{"type":49,"tag":4074,"props":9927,"children":9928},{},[9929,9934],{"type":49,"tag":4096,"props":9930,"children":9931},{},[9932],{"type":55,"value":9933},"Text generation",{"type":49,"tag":4096,"props":9935,"children":9936},{},[9937],{"type":49,"tag":127,"props":9938,"children":9940},{"className":9939},[],[9941],{"type":55,"value":1515},{"type":49,"tag":4074,"props":9943,"children":9944},{},[9945,9950],{"type":49,"tag":4096,"props":9946,"children":9947},{},[9948],{"type":55,"value":9949},"Text-to-text generation",{"type":49,"tag":4096,"props":9951,"children":9952},{},[9953],{"type":49,"tag":127,"props":9954,"children":9956},{"className":9955},[],[9957],{"type":55,"value":9958},"text2text-generation",{"type":49,"tag":4074,"props":9960,"children":9961},{},[9962,9967],{"type":49,"tag":4096,"props":9963,"children":9964},{},[9965],{"type":55,"value":9966},"Zero-shot classification",{"type":49,"tag":4096,"props":9968,"children":9969},{},[9970],{"type":49,"tag":127,"props":9971,"children":9973},{"className":9972},[],[9974],{"type":55,"value":2100},{"type":49,"tag":4074,"props":9976,"children":9977},{},[9978,9983],{"type":49,"tag":4096,"props":9979,"children":9980},{},[9981],{"type":55,"value":9982},"Image classification",{"type":49,"tag":4096,"props":9984,"children":9985},{},[9986],{"type":49,"tag":127,"props":9987,"children":9989},{"className":9988},[],[9990],{"type":55,"value":2269},{"type":49,"tag":4074,"props":9992,"children":9993},{},[9994,9999],{"type":49,"tag":4096,"props":9995,"children":9996},{},[9997],{"type":55,"value":9998},"Image segmentation",{"type":49,"tag":4096,"props":10000,"children":10001},{},[10002],{"type":49,"tag":127,"props":10003,"children":10005},{"className":10004},[],[10006],{"type":55,"value":2535},{"type":49,"tag":4074,"props":10008,"children":10009},{},[10010,10015],{"type":49,"tag":4096,"props":10011,"children":10012},{},[10013],{"type":55,"value":10014},"Object detection",{"type":49,"tag":4096,"props":10016,"children":10017},{},[10018],{"type":49,"tag":127,"props":10019,"children":10021},{"className":10020},[],[10022],{"type":55,"value":2417},{"type":49,"tag":4074,"props":10024,"children":10025},{},[10026,10031],{"type":49,"tag":4096,"props":10027,"children":10028},{},[10029],{"type":55,"value":10030},"Depth estimation",{"type":49,"tag":4096,"props":10032,"children":10033},{},[10034],{"type":49,"tag":127,"props":10035,"children":10037},{"className":10036},[],[10038],{"type":55,"value":2645},{"type":49,"tag":4074,"props":10040,"children":10041},{},[10042,10047],{"type":49,"tag":4096,"props":10043,"children":10044},{},[10045],{"type":55,"value":10046},"Image-to-image",{"type":49,"tag":4096,"props":10048,"children":10049},{},[10050],{"type":49,"tag":127,"props":10051,"children":10053},{"className":10052},[],[10054],{"type":55,"value":10055},"image-to-image",{"type":49,"tag":4074,"props":10057,"children":10058},{},[10059,10064],{"type":49,"tag":4096,"props":10060,"children":10061},{},[10062],{"type":55,"value":10063},"Zero-shot image classification",{"type":49,"tag":4096,"props":10065,"children":10066},{},[10067],{"type":49,"tag":127,"props":10068,"children":10070},{"className":10069},[],[10071],{"type":55,"value":2755},{"type":49,"tag":4074,"props":10073,"children":10074},{},[10075,10080],{"type":49,"tag":4096,"props":10076,"children":10077},{},[10078],{"type":55,"value":10079},"Zero-shot object detection",{"type":49,"tag":4096,"props":10081,"children":10082},{},[10083],{"type":49,"tag":127,"props":10084,"children":10086},{"className":10085},[],[10087],{"type":55,"value":3553},{"type":49,"tag":4074,"props":10089,"children":10090},{},[10091,10096],{"type":49,"tag":4096,"props":10092,"children":10093},{},[10094],{"type":55,"value":10095},"Automatic speech recognition",{"type":49,"tag":4096,"props":10097,"children":10098},{},[10099],{"type":49,"tag":127,"props":10100,"children":10102},{"className":10101},[],[10103],{"type":55,"value":2924},{"type":49,"tag":4074,"props":10105,"children":10106},{},[10107,10112],{"type":49,"tag":4096,"props":10108,"children":10109},{},[10110],{"type":55,"value":10111},"Audio classification",{"type":49,"tag":4096,"props":10113,"children":10114},{},[10115],{"type":49,"tag":127,"props":10116,"children":10118},{"className":10117},[],[10119],{"type":55,"value":3042},{"type":49,"tag":4074,"props":10121,"children":10122},{},[10123,10128],{"type":49,"tag":4096,"props":10124,"children":10125},{},[10126],{"type":55,"value":10127},"Text-to-speech",{"type":49,"tag":4096,"props":10129,"children":10130},{},[10131,10136,10137],{"type":49,"tag":127,"props":10132,"children":10134},{"className":10133},[],[10135],{"type":55,"value":3149},{"type":55,"value":9080},{"type":49,"tag":127,"props":10138,"children":10140},{"className":10139},[],[10141],{"type":55,"value":10142},"text-to-audio",{"type":49,"tag":4074,"props":10144,"children":10145},{},[10146,10151],{"type":49,"tag":4096,"props":10147,"children":10148},{},[10149],{"type":55,"value":10150},"Image-to-text",{"type":49,"tag":4096,"props":10152,"children":10153},{},[10154],{"type":49,"tag":127,"props":10155,"children":10157},{"className":10156},[],[10158],{"type":55,"value":3362},{"type":49,"tag":4074,"props":10160,"children":10161},{},[10162,10167],{"type":49,"tag":4096,"props":10163,"children":10164},{},[10165],{"type":55,"value":10166},"Document question answering",{"type":49,"tag":4096,"props":10168,"children":10169},{},[10170],{"type":49,"tag":127,"props":10171,"children":10173},{"className":10172},[],[10174],{"type":55,"value":3426},{"type":49,"tag":4074,"props":10176,"children":10177},{},[10178,10183],{"type":49,"tag":4096,"props":10179,"children":10180},{},[10181],{"type":55,"value":10182},"Feature extraction",{"type":49,"tag":4096,"props":10184,"children":10185},{},[10186],{"type":49,"tag":127,"props":10187,"children":10189},{"className":10188},[],[10190],{"type":55,"value":3762},{"type":49,"tag":4074,"props":10192,"children":10193},{},[10194,10199],{"type":49,"tag":4096,"props":10195,"children":10196},{},[10197],{"type":55,"value":10198},"Sentence similarity",{"type":49,"tag":4096,"props":10200,"children":10201},{},[10202],{"type":49,"tag":127,"props":10203,"children":10205},{"className":10204},[],[10206],{"type":55,"value":10207},"sentence-similarity",{"type":49,"tag":10209,"props":10210,"children":10211},"hr",{},[],{"type":49,"tag":58,"props":10213,"children":10214},{},[10215],{"type":55,"value":10216},"This skill enables you to integrate state-of-the-art machine learning capabilities directly into JavaScript applications without requiring separate ML servers or Python environments.",{"type":49,"tag":10218,"props":10219,"children":10220},"style",{},[10221],{"type":55,"value":10222},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":10224,"total":10397},[10225,10245,10261,10276,10290,10303,10316,10331,10345,10355,10368,10382],{"slug":10226,"name":10226,"fn":10227,"description":10228,"org":10229,"tags":10230,"stars":10242,"repoUrl":10243,"updatedAt":10244},"train-sentence-transformers","train sentence-transformers models","Train or fine-tune sentence-transformers models across `SentenceTransformer` (bi-encoder; dense or static embedding model; for retrieval, similarity, clustering, classification, paraphrase mining, dedup, multimodal), `CrossEncoder` (reranker; pair scoring for two-stage retrieval \u002F pair classification), and `SparseEncoder` (SPLADE, sparse embedding model; for learned-sparse retrieval). Covers loss selection, hard-negative mining, evaluators, distillation, LoRA, Matryoshka, and Hugging Face Hub publishing. Use for any sentence-transformers training task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10231,10234,10235,10236,10239],{"name":10232,"slug":10233,"type":14},"Deep Learning","deep-learning",{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},{"name":10237,"slug":10238,"type":14},"Python","python",{"name":10240,"slug":10241,"type":14},"Search","search",18914,"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsentence-transformers","2026-05-08T05:09:16.820066",{"slug":10246,"name":10246,"fn":10247,"description":10248,"org":10249,"tags":10250,"stars":10258,"repoUrl":10259,"updatedAt":10260},"trl-training","train and fine-tune LLMs with TRL","Train and fine-tune transformer language models using TRL (Transformers Reinforcement Learning). Supports SFT, DPO, GRPO, KTO, RLOO and Reward Model training via CLI commands.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10251,10254,10255,10256,10257],{"name":10252,"slug":10253,"type":14},"AI Infrastructure","ai-infrastructure",{"name":10232,"slug":10233,"type":14},{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},{"name":10237,"slug":10238,"type":14},18850,"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftrl","2026-04-06T18:25:32.746828",{"slug":10262,"name":10262,"fn":10263,"description":10264,"org":10265,"tags":10266,"stars":27,"repoUrl":28,"updatedAt":10275},"hf-cli","manage Hugging Face Hub resources via CLI","Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. Use when: handling authentication; managing local cache; managing Hugging Face Buckets; running or scheduling jobs on Hugging Face infrastructure; managing Hugging Face repos; discussions and pull requests; browsing models, datasets and spaces; reading, searching, or browsing academic papers; managing collections; querying datasets; configuring spaces; setting up webhooks; or deploying and managing HF Inference Endpoints. Make sure to use this skill whenever the user mentions 'hf', 'huggingface', 'Hugging Face', 'huggingface-cli', or 'hugging face cli', or wants to do anything related to the Hugging Face ecosystem and to AI and ML in general. Also use for cloud storage needs like training checkpoints, data pipelines, or agent traces. Use even if the user doesn't explicitly ask for a CLI command. Replaces the deprecated `huggingface-cli`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10267,10270,10273,10274],{"name":10268,"slug":10269,"type":14},"CLI","cli",{"name":10271,"slug":10272,"type":14},"Datasets","datasets",{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},"2026-04-06T18:25:34.020855",{"slug":10277,"name":10277,"fn":10278,"description":10279,"org":10280,"tags":10281,"stars":27,"repoUrl":28,"updatedAt":10289},"hf-cloud-aws-context-discovery","discover local AWS environment context","Discover the user's local AWS context (active profile, region, account ID, caller identity) at the start of any AWS task. Use this skill before any other AWS work — deploying to SageMaker, creating resources, calling AWS APIs, or anything that touches an AWS account. Use it especially when the user has not specified a region or profile explicitly, when they say things like \"use my AWS account\", \"deploy to AWS\", \"use my profile\", or when about to make any AWS CLI or SDK call. Never guess the region or account ID — always use this skill to read it from the local configuration first.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10282,10285,10286],{"name":10283,"slug":10284,"type":14},"AWS","aws",{"name":10268,"slug":10269,"type":14},{"name":10287,"slug":10288,"type":14},"Configuration","configuration","2026-07-08T05:55:33.716099",{"slug":10291,"name":10291,"fn":10292,"description":10293,"org":10294,"tags":10295,"stars":27,"repoUrl":28,"updatedAt":10302},"hf-cloud-python-env-setup","set up Python environments for AWS","Set up an isolated Python environment for SageMaker \u002F AWS work, with the right Python version and current boto3. Use this skill whenever Python code will be executed for a SageMaker deployment, training job, or any AWS automation — including when about to run `pip install`, when about to invoke `boto3`, when creating or activating a virtualenv, or when the user asks to \"set up the environment\". Never use system Python and never `pip install` into it. Always isolate. This skill prevents the most common failure modes: wrong Python version, dependency conflicts, and stale SDKs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10296,10297,10298,10301],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10299,"slug":10300,"type":14},"Engineering","engineering",{"name":10237,"slug":10238,"type":14},"2026-07-08T05:55:32.505017",{"slug":10304,"name":10304,"fn":10305,"description":10306,"org":10307,"tags":10308,"stars":27,"repoUrl":28,"updatedAt":10315},"hf-cloud-sagemaker-deployment-planner","plan model deployments to Amazon SageMaker","Plan and coordinate the deployment of a model to Amazon SageMaker AI. Use this skill whenever the user wants to deploy, host, serve, or expose a model on SageMaker or AWS — including phrases like \"deploy a model\", \"host this LLM on AWS\", \"serve this embedding model\", \"deploy a reranker\", \"deploy a text-to-image \u002F diffusion model\", \"host this for async inference\", \"create an endpoint\", \"serve my fine-tuned model\", or any request that involves making a model available for inference on AWS. Use this even when the user is vague (e.g. \"I just want to get this running on AWS, you figure it out\"). Works for text-generation LLMs, embedding models, rerankers, classifiers, text-to-image \u002F diffusion models — picks the right serving stack and chooses between real-time and async inference. This is the entry-point skill for SageMaker deployment work — it asks clarifying questions, picks a deployment pathway, and coordinates the other deployment skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10309,10310,10311,10314],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10312,"slug":10313,"type":14},"Deployment","deployment",{"name":9,"slug":13,"type":14},"2026-07-08T05:55:37.387689",{"slug":10317,"name":10317,"fn":10318,"description":10319,"org":10320,"tags":10321,"stars":27,"repoUrl":28,"updatedAt":10330},"hf-cloud-sagemaker-iam-preflight","configure SageMaker IAM roles","Ensure a usable SageMaker execution role exists before deploying or training. Use this skill whenever about to create a SageMaker endpoint, model, training job, or any resource that requires an execution role. Use it especially when the user has not provided a role ARN explicitly, when scripts are about to call `iam:CreateRole`, or when an AccessDenied error mentions an IAM action. Never blindly call `iam:CreateRole` — always check for existing roles first. This skill prevents the most common SageMaker deployment failure: trying to create IAM resources from an SSO principal that has no IAM write permissions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10322,10323,10324,10327],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10325,"slug":10326,"type":14},"Permissions","permissions",{"name":10328,"slug":10329,"type":14},"Security","security","2026-07-08T05:55:34.948771",{"slug":10332,"name":10332,"fn":10333,"description":10334,"org":10335,"tags":10336,"stars":27,"repoUrl":28,"updatedAt":10344},"hf-cloud-sagemaker-production-defaults","create production-ready SageMaker endpoints","Create a SageMaker endpoint (real-time or async) with autoscaling, CloudWatch alarms, and tagging enabled by default. Use this skill whenever about to create a SageMaker endpoint, write deployment code that calls `create_endpoint`, or finalize a deployment after the image URI and IAM role are known. Provides deploy.py for real-time endpoints and deploy_async.py for async endpoints (with genuine scale-to-zero support). This is the last step in the SageMaker deployment workflow. Never generate a bare `create_endpoint` call without these defaults — endpoints without autoscaling or alarms are demos, not deployments.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10337,10338,10339,10340,10341],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10312,"slug":10313,"type":14},{"name":9,"slug":13,"type":14},{"name":10342,"slug":10343,"type":14},"Monitoring","monitoring","2026-07-08T05:55:38.664702",{"slug":10346,"name":10346,"fn":10347,"description":10348,"org":10349,"tags":10350,"stars":27,"repoUrl":28,"updatedAt":10354},"hf-cloud-serving-image-selection","select SageMaker serving containers","Pick the right serving container for a SageMaker model deployment and find its current image URI. Use this skill whenever about to deploy a model to a SageMaker endpoint and an image URI needs to be chosen — including when the user says \"deploy this LLM\", \"host this HuggingFace model\", \"serve this fine-tuned model\", \"deploy this embedding model\", \"host a reranker\", \"serve a sentence-transformers model\", or when about to hardcode any container URI in deployment code. HuggingFace-curated Deep Learning Containers are ALWAYS preferred: HuggingFace vLLM (LLMs and generative rerankers), HuggingFace vLLM-Omni (multimodal), TEI (embeddings\u002Fcross-encoder rerankers), HF Inference Toolkit (other transformers). Generic images (AWS vLLM, DJL-LMI, SGLang) are used only when no HuggingFace image is compatible — never merely because they carry a newer version. Never hardcode a container URI from memory and never default to TGI. Prevents stale-image failures and wrong-region URIs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10351,10352,10353],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10312,"slug":10313,"type":14},"2026-07-08T05:55:36.173465",{"slug":10356,"name":10356,"fn":10357,"description":10358,"org":10359,"tags":10360,"stars":27,"repoUrl":28,"updatedAt":10367},"hf-mcp","access Hugging Face Hub via MCP","Use Hugging Face Hub via MCP server tools. Search models, datasets, Spaces, papers. Get repo details, fetch documentation, run compute jobs, and use Gradio Spaces as AI tools. Available when connected to the HF MCP server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10361,10362,10363,10364],{"name":10271,"slug":10272,"type":14},{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},{"name":10365,"slug":10366,"type":14},"MCP","mcp","2026-04-06T18:25:50.364185",{"slug":10369,"name":10369,"fn":10370,"description":10371,"org":10372,"tags":10373,"stars":27,"repoUrl":28,"updatedAt":10381},"hf-mem","estimate memory for Hugging Face models","Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10374,10375,10376,10377,10378],{"name":10252,"slug":10253,"type":14},{"name":10268,"slug":10269,"type":14},{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},{"name":10379,"slug":10380,"type":14},"Performance","performance","2026-06-13T07:23:57.101435",{"slug":10383,"name":10383,"fn":10384,"description":10385,"org":10386,"tags":10387,"stars":27,"repoUrl":28,"updatedAt":10396},"huggingface-best","find and compare Hugging Face models","Use when the user asks about finding the best, top, or recommended model for a task, wants to know what AI model to use, or wants to compare models by benchmark scores. Triggers on: \"best model for X\", \"what model should I use for\", \"top models for [task]\", \"which model runs on my laptop\u002Fmachine\u002Fdevice\", \"recommend a model for\", \"what LLM should I use for\", \"compare models for\", \"what's state of the art for\", or any question about choosing an AI model for a specific use case. Always use this skill when the user wants model recommendations or comparisons, even if they don't explicitly mention HuggingFace or benchmarks.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10388,10391,10392,10393],{"name":10389,"slug":10390,"type":14},"Analytics","analytics",{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},{"name":10394,"slug":10395,"type":14},"Research","research","2026-04-24T05:09:45.870658",37,{"items":10399,"total":4934},[10400,10407,10413,10420,10427,10434,10442],{"slug":10262,"name":10262,"fn":10263,"description":10264,"org":10401,"tags":10402,"stars":27,"repoUrl":28,"updatedAt":10275},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10403,10404,10405,10406],{"name":10268,"slug":10269,"type":14},{"name":10271,"slug":10272,"type":14},{"name":9,"slug":13,"type":14},{"name":16,"slug":17,"type":14},{"slug":10277,"name":10277,"fn":10278,"description":10279,"org":10408,"tags":10409,"stars":27,"repoUrl":28,"updatedAt":10289},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10410,10411,10412],{"name":10283,"slug":10284,"type":14},{"name":10268,"slug":10269,"type":14},{"name":10287,"slug":10288,"type":14},{"slug":10291,"name":10291,"fn":10292,"description":10293,"org":10414,"tags":10415,"stars":27,"repoUrl":28,"updatedAt":10302},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10416,10417,10418,10419],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10299,"slug":10300,"type":14},{"name":10237,"slug":10238,"type":14},{"slug":10304,"name":10304,"fn":10305,"description":10306,"org":10421,"tags":10422,"stars":27,"repoUrl":28,"updatedAt":10315},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10423,10424,10425,10426],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10312,"slug":10313,"type":14},{"name":9,"slug":13,"type":14},{"slug":10317,"name":10317,"fn":10318,"description":10319,"org":10428,"tags":10429,"stars":27,"repoUrl":28,"updatedAt":10330},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10430,10431,10432,10433],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10325,"slug":10326,"type":14},{"name":10328,"slug":10329,"type":14},{"slug":10332,"name":10332,"fn":10333,"description":10334,"org":10435,"tags":10436,"stars":27,"repoUrl":28,"updatedAt":10344},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10437,10438,10439,10440,10441],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10312,"slug":10313,"type":14},{"name":9,"slug":13,"type":14},{"name":10342,"slug":10343,"type":14},{"slug":10346,"name":10346,"fn":10347,"description":10348,"org":10443,"tags":10444,"stars":27,"repoUrl":28,"updatedAt":10354},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10445,10446,10447],{"name":10252,"slug":10253,"type":14},{"name":10283,"slug":10284,"type":14},{"name":10312,"slug":10313,"type":14}]