[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-transformers-js":3,"mdc--nywzej-key":39,"related-org-openai-transformers-js":9191,"related-repo-openai-transformers-js":9398},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":28,"repoUrl":29,"updatedAt":30,"license":31,"forks":32,"topics":33,"repo":34,"sourceUrl":37,"mdContent":38},"transformers-js","run machine learning models with Transformers.js","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 Node.js and browsers (with WebGPU\u002FWASM) using pre-trained models from Hugging Face Hub.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22,25],{"name":13,"slug":14,"type":15},"Hugging Face","hugging-face","tag",{"name":17,"slug":18,"type":15},"LLM","llm",{"name":20,"slug":21,"type":15},"TypeScript","typescript",{"name":23,"slug":24,"type":15},"JavaScript","javascript",{"name":26,"slug":27,"type":15},"Computer Vision","computer-vision",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-06T18:41:49.206123",null,465,[],{"repoUrl":29,"stars":28,"forks":32,"topics":35,"description":36},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fhugging-face\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 Node.js and browsers (with WebGPU\u002FWASM) using pre-trained models from Hugging Face Hub.\nmetadata:\n  author: huggingface\n  version: \"3.8.1\"\n  category: machine-learning\n  repository: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js\n---\n\n# Transformers.js - Machine Learning for JavaScript\n\nTransformers.js enables running state-of-the-art machine learning models directly in JavaScript, both in browsers and Node.js environments, with no 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 classifier.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 - experimental)\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. **Community Models**: Look for models by `Xenova` (Transformers.js maintainer) or `onnx-community`\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 } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F View version\nconsole.log(env.version); \u002F\u002F e.g., '3.8.1'\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```\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### 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## Browser-Specific Considerations\n\n### WebGPU Usage\nWebGPU provides GPU acceleration in browsers:\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**: WebGPU is experimental. Check browser compatibility and file issues if problems occur.\n\n### WASM Performance\nDefault browser execution uses WASM:\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  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' | 'done' | 'ready';\n  name: string;      \u002F\u002F Model id or path\n  file: string;      \u002F\u002F File being processed\n  progress?: number; \u002F\u002F Percentage (0-100, only for 'progress' status)\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- **[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\u002Ftree\u002Fmain\u002Fexamples\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":40,"body":46},{"name":4,"description":6,"metadata":41},{"author":42,"version":43,"category":44,"repository":45},"huggingface","3.8.1","machine-learning","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js",{"type":47,"children":48},"root",[49,58,64,71,76,106,112,119,154,160,260,266,272,277,533,561,567,572,656,664,669,743,753,759,764,968,974,979,1106,1112,1122,1128,1135,1238,1244,1350,1356,1514,1520,1696,1717,1751,1757,1948,1954,2099,2105,2264,2268,2274,2416,2422,2534,2540,2644,2650,2754,2760,2917,2923,2929,3041,3047,3148,3154,3308,3314,3320,3425,3431,3552,3558,3714,3720,4014,4020,4026,4031,4039,4049,4066,4341,4349,4396,4402,4407,4415,4448,4458,4504,4514,4537,4547,4570,4576,4961,4967,5158,5164,5177,5189,5197,5532,5540,5835,5840,5854,5860,6159,6165,6330,6336,6342,6347,6482,6492,6498,6503,6624,6630,6643,7297,7305,7561,7566,7579,7585,8024,8030,8142,8148,8165,8299,8307,8325,8330,8342,8348,8354,8378,8384,8415,8421,8454,8460,8466,8582,8588,8645,8651,8759,8765,9176,9180,9185],{"type":50,"tag":51,"props":52,"children":54},"element","h1",{"id":53},"transformersjs-machine-learning-for-javascript",[55],{"type":56,"value":57},"text","Transformers.js - Machine Learning for JavaScript",{"type":50,"tag":59,"props":60,"children":61},"p",{},[62],{"type":56,"value":63},"Transformers.js enables running state-of-the-art machine learning models directly in JavaScript, both in browsers and Node.js environments, with no server required.",{"type":50,"tag":65,"props":66,"children":68},"h2",{"id":67},"when-to-use-this-skill",[69],{"type":56,"value":70},"When to Use This Skill",{"type":50,"tag":59,"props":72,"children":73},{},[74],{"type":56,"value":75},"Use this skill when you need to:",{"type":50,"tag":77,"props":78,"children":79},"ul",{},[80,86,91,96,101],{"type":50,"tag":81,"props":82,"children":83},"li",{},[84],{"type":56,"value":85},"Run ML models for text analysis, generation, or translation in JavaScript",{"type":50,"tag":81,"props":87,"children":88},{},[89],{"type":56,"value":90},"Perform image classification, object detection, or segmentation",{"type":50,"tag":81,"props":92,"children":93},{},[94],{"type":56,"value":95},"Implement speech recognition or audio processing",{"type":50,"tag":81,"props":97,"children":98},{},[99],{"type":56,"value":100},"Build multimodal AI applications (text-to-image, image-to-text, etc.)",{"type":50,"tag":81,"props":102,"children":103},{},[104],{"type":56,"value":105},"Run models client-side in the browser without a backend",{"type":50,"tag":65,"props":107,"children":109},{"id":108},"installation",[110],{"type":56,"value":111},"Installation",{"type":50,"tag":113,"props":114,"children":116},"h3",{"id":115},"npm-installation",[117],{"type":56,"value":118},"NPM Installation",{"type":50,"tag":120,"props":121,"children":126},"pre",{"className":122,"code":123,"language":124,"meta":125,"style":125},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @huggingface\u002Ftransformers\n","bash","",[127],{"type":50,"tag":128,"props":129,"children":130},"code",{"__ignoreMap":125},[131],{"type":50,"tag":132,"props":133,"children":136},"span",{"class":134,"line":135},"line",1,[137,143,149],{"type":50,"tag":132,"props":138,"children":140},{"style":139},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[141],{"type":56,"value":142},"npm",{"type":50,"tag":132,"props":144,"children":146},{"style":145},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[147],{"type":56,"value":148}," install",{"type":50,"tag":132,"props":150,"children":151},{"style":145},[152],{"type":56,"value":153}," @huggingface\u002Ftransformers\n",{"type":50,"tag":113,"props":155,"children":157},{"id":156},"browser-usage-cdn",[158],{"type":56,"value":159},"Browser Usage (CDN)",{"type":50,"tag":120,"props":161,"children":164},{"className":162,"code":163,"language":24,"meta":125,"style":125},"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",[165],{"type":50,"tag":128,"props":166,"children":167},{"__ignoreMap":125},[168,213,243],{"type":50,"tag":132,"props":169,"children":170},{"class":134,"line":135},[171,177,183,189,194,199,204,208],{"type":50,"tag":132,"props":172,"children":174},{"style":173},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[175],{"type":56,"value":176},"\u003C",{"type":50,"tag":132,"props":178,"children":180},{"style":179},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[181],{"type":56,"value":182},"script",{"type":50,"tag":132,"props":184,"children":186},{"style":185},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[187],{"type":56,"value":188}," type",{"type":50,"tag":132,"props":190,"children":191},{"style":173},[192],{"type":56,"value":193},"=",{"type":50,"tag":132,"props":195,"children":196},{"style":173},[197],{"type":56,"value":198},"\"",{"type":50,"tag":132,"props":200,"children":201},{"style":145},[202],{"type":56,"value":203},"module",{"type":50,"tag":132,"props":205,"children":206},{"style":173},[207],{"type":56,"value":198},{"type":50,"tag":132,"props":209,"children":210},{"style":173},[211],{"type":56,"value":212},">\n",{"type":50,"tag":132,"props":214,"children":216},{"class":134,"line":215},2,[217,223,228,233,238],{"type":50,"tag":132,"props":218,"children":220},{"style":219},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[221],{"type":56,"value":222},"  import ",{"type":50,"tag":132,"props":224,"children":225},{"style":173},[226],{"type":56,"value":227},"{",{"type":50,"tag":132,"props":229,"children":230},{"style":219},[231],{"type":56,"value":232}," pipeline ",{"type":50,"tag":132,"props":234,"children":235},{"style":173},[236],{"type":56,"value":237},"}",{"type":50,"tag":132,"props":239,"children":240},{"style":219},[241],{"type":56,"value":242}," from 'https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@huggingface\u002Ftransformers';\n",{"type":50,"tag":132,"props":244,"children":246},{"class":134,"line":245},3,[247,252,256],{"type":50,"tag":132,"props":248,"children":249},{"style":173},[250],{"type":56,"value":251},"\u003C\u002F",{"type":50,"tag":132,"props":253,"children":254},{"style":179},[255],{"type":56,"value":182},{"type":50,"tag":132,"props":257,"children":258},{"style":173},[259],{"type":56,"value":212},{"type":50,"tag":65,"props":261,"children":263},{"id":262},"core-concepts",[264],{"type":56,"value":265},"Core Concepts",{"type":50,"tag":113,"props":267,"children":269},{"id":268},"_1-pipeline-api",[270],{"type":56,"value":271},"1. Pipeline API",{"type":50,"tag":59,"props":273,"children":274},{},[275],{"type":56,"value":276},"The pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing:",{"type":50,"tag":120,"props":278,"children":280},{"className":162,"code":279,"language":24,"meta":125,"style":125},"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 classifier.dispose();\n",[281],{"type":50,"tag":128,"props":282,"children":283},{"__ignoreMap":125},[284,333,342,351,406,414,423,474,483,491,500],{"type":50,"tag":132,"props":285,"children":286},{"class":134,"line":135},[287,293,298,303,308,313,318,323,328],{"type":50,"tag":132,"props":288,"children":290},{"style":289},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[291],{"type":56,"value":292},"import",{"type":50,"tag":132,"props":294,"children":295},{"style":173},[296],{"type":56,"value":297}," {",{"type":50,"tag":132,"props":299,"children":300},{"style":219},[301],{"type":56,"value":302}," pipeline",{"type":50,"tag":132,"props":304,"children":305},{"style":173},[306],{"type":56,"value":307}," }",{"type":50,"tag":132,"props":309,"children":310},{"style":289},[311],{"type":56,"value":312}," from",{"type":50,"tag":132,"props":314,"children":315},{"style":173},[316],{"type":56,"value":317}," '",{"type":50,"tag":132,"props":319,"children":320},{"style":145},[321],{"type":56,"value":322},"@huggingface\u002Ftransformers",{"type":50,"tag":132,"props":324,"children":325},{"style":173},[326],{"type":56,"value":327},"'",{"type":50,"tag":132,"props":329,"children":330},{"style":173},[331],{"type":56,"value":332},";\n",{"type":50,"tag":132,"props":334,"children":335},{"class":134,"line":215},[336],{"type":50,"tag":132,"props":337,"children":339},{"emptyLinePlaceholder":338},true,[340],{"type":56,"value":341},"\n",{"type":50,"tag":132,"props":343,"children":344},{"class":134,"line":245},[345],{"type":50,"tag":132,"props":346,"children":348},{"style":347},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[349],{"type":56,"value":350},"\u002F\u002F Create a pipeline for a specific task\n",{"type":50,"tag":132,"props":352,"children":354},{"class":134,"line":353},4,[355,360,365,369,374,379,384,388,393,397,402],{"type":50,"tag":132,"props":356,"children":357},{"style":185},[358],{"type":56,"value":359},"const",{"type":50,"tag":132,"props":361,"children":362},{"style":219},[363],{"type":56,"value":364}," pipe ",{"type":50,"tag":132,"props":366,"children":367},{"style":173},[368],{"type":56,"value":193},{"type":50,"tag":132,"props":370,"children":371},{"style":289},[372],{"type":56,"value":373}," await",{"type":50,"tag":132,"props":375,"children":377},{"style":376},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[378],{"type":56,"value":302},{"type":50,"tag":132,"props":380,"children":381},{"style":219},[382],{"type":56,"value":383},"(",{"type":50,"tag":132,"props":385,"children":386},{"style":173},[387],{"type":56,"value":327},{"type":50,"tag":132,"props":389,"children":390},{"style":145},[391],{"type":56,"value":392},"sentiment-analysis",{"type":50,"tag":132,"props":394,"children":395},{"style":173},[396],{"type":56,"value":327},{"type":50,"tag":132,"props":398,"children":399},{"style":219},[400],{"type":56,"value":401},")",{"type":50,"tag":132,"props":403,"children":404},{"style":173},[405],{"type":56,"value":332},{"type":50,"tag":132,"props":407,"children":409},{"class":134,"line":408},5,[410],{"type":50,"tag":132,"props":411,"children":412},{"emptyLinePlaceholder":338},[413],{"type":56,"value":341},{"type":50,"tag":132,"props":415,"children":417},{"class":134,"line":416},6,[418],{"type":50,"tag":132,"props":419,"children":420},{"style":347},[421],{"type":56,"value":422},"\u002F\u002F Use the pipeline\n",{"type":50,"tag":132,"props":424,"children":426},{"class":134,"line":425},7,[427,431,436,440,444,449,453,457,462,466,470],{"type":50,"tag":132,"props":428,"children":429},{"style":185},[430],{"type":56,"value":359},{"type":50,"tag":132,"props":432,"children":433},{"style":219},[434],{"type":56,"value":435}," result ",{"type":50,"tag":132,"props":437,"children":438},{"style":173},[439],{"type":56,"value":193},{"type":50,"tag":132,"props":441,"children":442},{"style":289},[443],{"type":56,"value":373},{"type":50,"tag":132,"props":445,"children":446},{"style":376},[447],{"type":56,"value":448}," pipe",{"type":50,"tag":132,"props":450,"children":451},{"style":219},[452],{"type":56,"value":383},{"type":50,"tag":132,"props":454,"children":455},{"style":173},[456],{"type":56,"value":327},{"type":50,"tag":132,"props":458,"children":459},{"style":145},[460],{"type":56,"value":461},"I love transformers!",{"type":50,"tag":132,"props":463,"children":464},{"style":173},[465],{"type":56,"value":327},{"type":50,"tag":132,"props":467,"children":468},{"style":219},[469],{"type":56,"value":401},{"type":50,"tag":132,"props":471,"children":472},{"style":173},[473],{"type":56,"value":332},{"type":50,"tag":132,"props":475,"children":477},{"class":134,"line":476},8,[478],{"type":50,"tag":132,"props":479,"children":480},{"style":347},[481],{"type":56,"value":482},"\u002F\u002F Output: [{ label: 'POSITIVE', score: 0.999817686 }]\n",{"type":50,"tag":132,"props":484,"children":486},{"class":134,"line":485},9,[487],{"type":50,"tag":132,"props":488,"children":489},{"emptyLinePlaceholder":338},[490],{"type":56,"value":341},{"type":50,"tag":132,"props":492,"children":494},{"class":134,"line":493},10,[495],{"type":50,"tag":132,"props":496,"children":497},{"style":347},[498],{"type":56,"value":499},"\u002F\u002F IMPORTANT: Always dispose when done to free memory\n",{"type":50,"tag":132,"props":501,"children":503},{"class":134,"line":502},11,[504,509,514,519,524,529],{"type":50,"tag":132,"props":505,"children":506},{"style":289},[507],{"type":56,"value":508},"await",{"type":50,"tag":132,"props":510,"children":511},{"style":219},[512],{"type":56,"value":513}," classifier",{"type":50,"tag":132,"props":515,"children":516},{"style":173},[517],{"type":56,"value":518},".",{"type":50,"tag":132,"props":520,"children":521},{"style":376},[522],{"type":56,"value":523},"dispose",{"type":50,"tag":132,"props":525,"children":526},{"style":219},[527],{"type":56,"value":528},"()",{"type":50,"tag":132,"props":530,"children":531},{"style":173},[532],{"type":56,"value":332},{"type":50,"tag":59,"props":534,"children":535},{},[536,542,544,550,552,559],{"type":50,"tag":537,"props":538,"children":539},"strong",{},[540],{"type":56,"value":541},"⚠️ Memory Management:",{"type":56,"value":543}," All pipelines must be disposed with ",{"type":50,"tag":128,"props":545,"children":547},{"className":546},[],[548],{"type":56,"value":549},"pipe.dispose()",{"type":56,"value":551}," when finished to prevent memory leaks. See examples in ",{"type":50,"tag":553,"props":554,"children":556},"a",{"href":555},".\u002Freferences\u002FEXAMPLES.md",[557],{"type":56,"value":558},"Code Examples",{"type":56,"value":560}," for cleanup patterns across different environments.",{"type":50,"tag":113,"props":562,"children":564},{"id":563},"_2-model-selection",[565],{"type":56,"value":566},"2. Model Selection",{"type":50,"tag":59,"props":568,"children":569},{},[570],{"type":56,"value":571},"You can specify a custom model as the second argument:",{"type":50,"tag":120,"props":573,"children":575},{"className":162,"code":574,"language":24,"meta":125,"style":125},"const pipe = await pipeline(\n  'sentiment-analysis',\n  'Xenova\u002Fbert-base-multilingual-uncased-sentiment'\n);\n",[576],{"type":50,"tag":128,"props":577,"children":578},{"__ignoreMap":125},[579,607,628,645],{"type":50,"tag":132,"props":580,"children":581},{"class":134,"line":135},[582,586,590,594,598,602],{"type":50,"tag":132,"props":583,"children":584},{"style":185},[585],{"type":56,"value":359},{"type":50,"tag":132,"props":587,"children":588},{"style":219},[589],{"type":56,"value":364},{"type":50,"tag":132,"props":591,"children":592},{"style":173},[593],{"type":56,"value":193},{"type":50,"tag":132,"props":595,"children":596},{"style":289},[597],{"type":56,"value":373},{"type":50,"tag":132,"props":599,"children":600},{"style":376},[601],{"type":56,"value":302},{"type":50,"tag":132,"props":603,"children":604},{"style":219},[605],{"type":56,"value":606},"(\n",{"type":50,"tag":132,"props":608,"children":609},{"class":134,"line":215},[610,615,619,623],{"type":50,"tag":132,"props":611,"children":612},{"style":173},[613],{"type":56,"value":614},"  '",{"type":50,"tag":132,"props":616,"children":617},{"style":145},[618],{"type":56,"value":392},{"type":50,"tag":132,"props":620,"children":621},{"style":173},[622],{"type":56,"value":327},{"type":50,"tag":132,"props":624,"children":625},{"style":173},[626],{"type":56,"value":627},",\n",{"type":50,"tag":132,"props":629,"children":630},{"class":134,"line":245},[631,635,640],{"type":50,"tag":132,"props":632,"children":633},{"style":173},[634],{"type":56,"value":614},{"type":50,"tag":132,"props":636,"children":637},{"style":145},[638],{"type":56,"value":639},"Xenova\u002Fbert-base-multilingual-uncased-sentiment",{"type":50,"tag":132,"props":641,"children":642},{"style":173},[643],{"type":56,"value":644},"'\n",{"type":50,"tag":132,"props":646,"children":647},{"class":134,"line":353},[648,652],{"type":50,"tag":132,"props":649,"children":650},{"style":219},[651],{"type":56,"value":401},{"type":50,"tag":132,"props":653,"children":654},{"style":173},[655],{"type":56,"value":332},{"type":50,"tag":59,"props":657,"children":658},{},[659],{"type":50,"tag":537,"props":660,"children":661},{},[662],{"type":56,"value":663},"Finding Models:",{"type":50,"tag":59,"props":665,"children":666},{},[667],{"type":56,"value":668},"Browse available Transformers.js models on Hugging Face Hub:",{"type":50,"tag":77,"props":670,"children":671},{},[672,689],{"type":50,"tag":81,"props":673,"children":674},{},[675,680,682],{"type":50,"tag":537,"props":676,"children":677},{},[678],{"type":56,"value":679},"All models",{"type":56,"value":681},": ",{"type":50,"tag":553,"props":683,"children":687},{"href":684,"rel":685},"https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js&sort=trending",[686],"nofollow",[688],{"type":56,"value":684},{"type":50,"tag":81,"props":690,"children":691},{},[692,697,699,705,707],{"type":50,"tag":537,"props":693,"children":694},{},[695],{"type":56,"value":696},"By task",{"type":56,"value":698},": Add ",{"type":50,"tag":128,"props":700,"children":702},{"className":701},[],[703],{"type":56,"value":704},"pipeline_tag",{"type":56,"value":706}," parameter\n",{"type":50,"tag":77,"props":708,"children":709},{},[710,721,732],{"type":50,"tag":81,"props":711,"children":712},{},[713,715],{"type":56,"value":714},"Text generation: ",{"type":50,"tag":553,"props":716,"children":719},{"href":717,"rel":718},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending",[686],[720],{"type":56,"value":717},{"type":50,"tag":81,"props":722,"children":723},{},[724,726],{"type":56,"value":725},"Image classification: ",{"type":50,"tag":553,"props":727,"children":730},{"href":728,"rel":729},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-classification&library=transformers.js&sort=trending",[686],[731],{"type":56,"value":728},{"type":50,"tag":81,"props":733,"children":734},{},[735,737],{"type":56,"value":736},"Speech recognition: ",{"type":50,"tag":553,"props":738,"children":741},{"href":739,"rel":740},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=automatic-speech-recognition&library=transformers.js&sort=trending",[686],[742],{"type":56,"value":739},{"type":50,"tag":59,"props":744,"children":745},{},[746,751],{"type":50,"tag":537,"props":747,"children":748},{},[749],{"type":56,"value":750},"Tip:",{"type":56,"value":752}," Filter by task type, sort by trending\u002Fdownloads, and check model cards for performance metrics and usage examples.",{"type":50,"tag":113,"props":754,"children":756},{"id":755},"_3-device-selection",[757],{"type":56,"value":758},"3. Device Selection",{"type":50,"tag":59,"props":760,"children":761},{},[762],{"type":56,"value":763},"Choose where to run the model:",{"type":50,"tag":120,"props":765,"children":767},{"className":162,"code":766,"language":24,"meta":125,"style":125},"\u002F\u002F Run on CPU (default for WASM)\nconst pipe = await pipeline('sentiment-analysis', 'model-id');\n\n\u002F\u002F Run on GPU (WebGPU - experimental)\nconst pipe = await pipeline('sentiment-analysis', 'model-id', {\n  device: 'webgpu',\n});\n",[768],{"type":50,"tag":128,"props":769,"children":770},{"__ignoreMap":125},[771,779,844,851,859,923,953],{"type":50,"tag":132,"props":772,"children":773},{"class":134,"line":135},[774],{"type":50,"tag":132,"props":775,"children":776},{"style":347},[777],{"type":56,"value":778},"\u002F\u002F Run on CPU (default for WASM)\n",{"type":50,"tag":132,"props":780,"children":781},{"class":134,"line":215},[782,786,790,794,798,802,806,810,814,818,823,827,832,836,840],{"type":50,"tag":132,"props":783,"children":784},{"style":185},[785],{"type":56,"value":359},{"type":50,"tag":132,"props":787,"children":788},{"style":219},[789],{"type":56,"value":364},{"type":50,"tag":132,"props":791,"children":792},{"style":173},[793],{"type":56,"value":193},{"type":50,"tag":132,"props":795,"children":796},{"style":289},[797],{"type":56,"value":373},{"type":50,"tag":132,"props":799,"children":800},{"style":376},[801],{"type":56,"value":302},{"type":50,"tag":132,"props":803,"children":804},{"style":219},[805],{"type":56,"value":383},{"type":50,"tag":132,"props":807,"children":808},{"style":173},[809],{"type":56,"value":327},{"type":50,"tag":132,"props":811,"children":812},{"style":145},[813],{"type":56,"value":392},{"type":50,"tag":132,"props":815,"children":816},{"style":173},[817],{"type":56,"value":327},{"type":50,"tag":132,"props":819,"children":820},{"style":173},[821],{"type":56,"value":822},",",{"type":50,"tag":132,"props":824,"children":825},{"style":173},[826],{"type":56,"value":317},{"type":50,"tag":132,"props":828,"children":829},{"style":145},[830],{"type":56,"value":831},"model-id",{"type":50,"tag":132,"props":833,"children":834},{"style":173},[835],{"type":56,"value":327},{"type":50,"tag":132,"props":837,"children":838},{"style":219},[839],{"type":56,"value":401},{"type":50,"tag":132,"props":841,"children":842},{"style":173},[843],{"type":56,"value":332},{"type":50,"tag":132,"props":845,"children":846},{"class":134,"line":245},[847],{"type":50,"tag":132,"props":848,"children":849},{"emptyLinePlaceholder":338},[850],{"type":56,"value":341},{"type":50,"tag":132,"props":852,"children":853},{"class":134,"line":353},[854],{"type":50,"tag":132,"props":855,"children":856},{"style":347},[857],{"type":56,"value":858},"\u002F\u002F Run on GPU (WebGPU - experimental)\n",{"type":50,"tag":132,"props":860,"children":861},{"class":134,"line":408},[862,866,870,874,878,882,886,890,894,898,902,906,910,914,918],{"type":50,"tag":132,"props":863,"children":864},{"style":185},[865],{"type":56,"value":359},{"type":50,"tag":132,"props":867,"children":868},{"style":219},[869],{"type":56,"value":364},{"type":50,"tag":132,"props":871,"children":872},{"style":173},[873],{"type":56,"value":193},{"type":50,"tag":132,"props":875,"children":876},{"style":289},[877],{"type":56,"value":373},{"type":50,"tag":132,"props":879,"children":880},{"style":376},[881],{"type":56,"value":302},{"type":50,"tag":132,"props":883,"children":884},{"style":219},[885],{"type":56,"value":383},{"type":50,"tag":132,"props":887,"children":888},{"style":173},[889],{"type":56,"value":327},{"type":50,"tag":132,"props":891,"children":892},{"style":145},[893],{"type":56,"value":392},{"type":50,"tag":132,"props":895,"children":896},{"style":173},[897],{"type":56,"value":327},{"type":50,"tag":132,"props":899,"children":900},{"style":173},[901],{"type":56,"value":822},{"type":50,"tag":132,"props":903,"children":904},{"style":173},[905],{"type":56,"value":317},{"type":50,"tag":132,"props":907,"children":908},{"style":145},[909],{"type":56,"value":831},{"type":50,"tag":132,"props":911,"children":912},{"style":173},[913],{"type":56,"value":327},{"type":50,"tag":132,"props":915,"children":916},{"style":173},[917],{"type":56,"value":822},{"type":50,"tag":132,"props":919,"children":920},{"style":173},[921],{"type":56,"value":922}," {\n",{"type":50,"tag":132,"props":924,"children":925},{"class":134,"line":416},[926,931,936,940,945,949],{"type":50,"tag":132,"props":927,"children":928},{"style":179},[929],{"type":56,"value":930},"  device",{"type":50,"tag":132,"props":932,"children":933},{"style":173},[934],{"type":56,"value":935},":",{"type":50,"tag":132,"props":937,"children":938},{"style":173},[939],{"type":56,"value":317},{"type":50,"tag":132,"props":941,"children":942},{"style":145},[943],{"type":56,"value":944},"webgpu",{"type":50,"tag":132,"props":946,"children":947},{"style":173},[948],{"type":56,"value":327},{"type":50,"tag":132,"props":950,"children":951},{"style":173},[952],{"type":56,"value":627},{"type":50,"tag":132,"props":954,"children":955},{"class":134,"line":425},[956,960,964],{"type":50,"tag":132,"props":957,"children":958},{"style":173},[959],{"type":56,"value":237},{"type":50,"tag":132,"props":961,"children":962},{"style":219},[963],{"type":56,"value":401},{"type":50,"tag":132,"props":965,"children":966},{"style":173},[967],{"type":56,"value":332},{"type":50,"tag":113,"props":969,"children":971},{"id":970},"_4-quantization-options",[972],{"type":56,"value":973},"4. Quantization Options",{"type":50,"tag":59,"props":975,"children":976},{},[977],{"type":56,"value":978},"Control model precision vs. performance:",{"type":50,"tag":120,"props":980,"children":982},{"className":162,"code":981,"language":24,"meta":125,"style":125},"\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",[983],{"type":50,"tag":128,"props":984,"children":985},{"__ignoreMap":125},[986,994,1057,1091],{"type":50,"tag":132,"props":987,"children":988},{"class":134,"line":135},[989],{"type":50,"tag":132,"props":990,"children":991},{"style":347},[992],{"type":56,"value":993},"\u002F\u002F Use quantized model (faster, smaller)\n",{"type":50,"tag":132,"props":995,"children":996},{"class":134,"line":215},[997,1001,1005,1009,1013,1017,1021,1025,1029,1033,1037,1041,1045,1049,1053],{"type":50,"tag":132,"props":998,"children":999},{"style":185},[1000],{"type":56,"value":359},{"type":50,"tag":132,"props":1002,"children":1003},{"style":219},[1004],{"type":56,"value":364},{"type":50,"tag":132,"props":1006,"children":1007},{"style":173},[1008],{"type":56,"value":193},{"type":50,"tag":132,"props":1010,"children":1011},{"style":289},[1012],{"type":56,"value":373},{"type":50,"tag":132,"props":1014,"children":1015},{"style":376},[1016],{"type":56,"value":302},{"type":50,"tag":132,"props":1018,"children":1019},{"style":219},[1020],{"type":56,"value":383},{"type":50,"tag":132,"props":1022,"children":1023},{"style":173},[1024],{"type":56,"value":327},{"type":50,"tag":132,"props":1026,"children":1027},{"style":145},[1028],{"type":56,"value":392},{"type":50,"tag":132,"props":1030,"children":1031},{"style":173},[1032],{"type":56,"value":327},{"type":50,"tag":132,"props":1034,"children":1035},{"style":173},[1036],{"type":56,"value":822},{"type":50,"tag":132,"props":1038,"children":1039},{"style":173},[1040],{"type":56,"value":317},{"type":50,"tag":132,"props":1042,"children":1043},{"style":145},[1044],{"type":56,"value":831},{"type":50,"tag":132,"props":1046,"children":1047},{"style":173},[1048],{"type":56,"value":327},{"type":50,"tag":132,"props":1050,"children":1051},{"style":173},[1052],{"type":56,"value":822},{"type":50,"tag":132,"props":1054,"children":1055},{"style":173},[1056],{"type":56,"value":922},{"type":50,"tag":132,"props":1058,"children":1059},{"class":134,"line":245},[1060,1065,1069,1073,1078,1082,1086],{"type":50,"tag":132,"props":1061,"children":1062},{"style":179},[1063],{"type":56,"value":1064},"  dtype",{"type":50,"tag":132,"props":1066,"children":1067},{"style":173},[1068],{"type":56,"value":935},{"type":50,"tag":132,"props":1070,"children":1071},{"style":173},[1072],{"type":56,"value":317},{"type":50,"tag":132,"props":1074,"children":1075},{"style":145},[1076],{"type":56,"value":1077},"q4",{"type":50,"tag":132,"props":1079,"children":1080},{"style":173},[1081],{"type":56,"value":327},{"type":50,"tag":132,"props":1083,"children":1084},{"style":173},[1085],{"type":56,"value":822},{"type":50,"tag":132,"props":1087,"children":1088},{"style":347},[1089],{"type":56,"value":1090},"  \u002F\u002F Options: 'fp32', 'fp16', 'q8', 'q4'\n",{"type":50,"tag":132,"props":1092,"children":1093},{"class":134,"line":353},[1094,1098,1102],{"type":50,"tag":132,"props":1095,"children":1096},{"style":173},[1097],{"type":56,"value":237},{"type":50,"tag":132,"props":1099,"children":1100},{"style":219},[1101],{"type":56,"value":401},{"type":50,"tag":132,"props":1103,"children":1104},{"style":173},[1105],{"type":56,"value":332},{"type":50,"tag":65,"props":1107,"children":1109},{"id":1108},"supported-tasks",[1110],{"type":56,"value":1111},"Supported Tasks",{"type":50,"tag":59,"props":1113,"children":1114},{},[1115,1120],{"type":50,"tag":537,"props":1116,"children":1117},{},[1118],{"type":56,"value":1119},"Note:",{"type":56,"value":1121}," All examples below show basic usage.",{"type":50,"tag":113,"props":1123,"children":1125},{"id":1124},"natural-language-processing",[1126],{"type":56,"value":1127},"Natural Language Processing",{"type":50,"tag":1129,"props":1130,"children":1132},"h4",{"id":1131},"text-classification",[1133],{"type":56,"value":1134},"Text Classification",{"type":50,"tag":120,"props":1136,"children":1138},{"className":162,"code":1137,"language":24,"meta":125,"style":125},"const classifier = await pipeline('text-classification');\nconst result = await classifier('This movie was amazing!');\n",[1139],{"type":50,"tag":128,"props":1140,"children":1141},{"__ignoreMap":125},[1142,1190],{"type":50,"tag":132,"props":1143,"children":1144},{"class":134,"line":135},[1145,1149,1154,1158,1162,1166,1170,1174,1178,1182,1186],{"type":50,"tag":132,"props":1146,"children":1147},{"style":185},[1148],{"type":56,"value":359},{"type":50,"tag":132,"props":1150,"children":1151},{"style":219},[1152],{"type":56,"value":1153}," classifier ",{"type":50,"tag":132,"props":1155,"children":1156},{"style":173},[1157],{"type":56,"value":193},{"type":50,"tag":132,"props":1159,"children":1160},{"style":289},[1161],{"type":56,"value":373},{"type":50,"tag":132,"props":1163,"children":1164},{"style":376},[1165],{"type":56,"value":302},{"type":50,"tag":132,"props":1167,"children":1168},{"style":219},[1169],{"type":56,"value":383},{"type":50,"tag":132,"props":1171,"children":1172},{"style":173},[1173],{"type":56,"value":327},{"type":50,"tag":132,"props":1175,"children":1176},{"style":145},[1177],{"type":56,"value":1131},{"type":50,"tag":132,"props":1179,"children":1180},{"style":173},[1181],{"type":56,"value":327},{"type":50,"tag":132,"props":1183,"children":1184},{"style":219},[1185],{"type":56,"value":401},{"type":50,"tag":132,"props":1187,"children":1188},{"style":173},[1189],{"type":56,"value":332},{"type":50,"tag":132,"props":1191,"children":1192},{"class":134,"line":215},[1193,1197,1201,1205,1209,1213,1217,1221,1226,1230,1234],{"type":50,"tag":132,"props":1194,"children":1195},{"style":185},[1196],{"type":56,"value":359},{"type":50,"tag":132,"props":1198,"children":1199},{"style":219},[1200],{"type":56,"value":435},{"type":50,"tag":132,"props":1202,"children":1203},{"style":173},[1204],{"type":56,"value":193},{"type":50,"tag":132,"props":1206,"children":1207},{"style":289},[1208],{"type":56,"value":373},{"type":50,"tag":132,"props":1210,"children":1211},{"style":376},[1212],{"type":56,"value":513},{"type":50,"tag":132,"props":1214,"children":1215},{"style":219},[1216],{"type":56,"value":383},{"type":50,"tag":132,"props":1218,"children":1219},{"style":173},[1220],{"type":56,"value":327},{"type":50,"tag":132,"props":1222,"children":1223},{"style":145},[1224],{"type":56,"value":1225},"This movie was amazing!",{"type":50,"tag":132,"props":1227,"children":1228},{"style":173},[1229],{"type":56,"value":327},{"type":50,"tag":132,"props":1231,"children":1232},{"style":219},[1233],{"type":56,"value":401},{"type":50,"tag":132,"props":1235,"children":1236},{"style":173},[1237],{"type":56,"value":332},{"type":50,"tag":1129,"props":1239,"children":1241},{"id":1240},"named-entity-recognition-ner",[1242],{"type":56,"value":1243},"Named Entity Recognition (NER)",{"type":50,"tag":120,"props":1245,"children":1247},{"className":162,"code":1246,"language":24,"meta":125,"style":125},"const ner = await pipeline('token-classification');\nconst entities = await ner('My name is John and I live in New York.');\n",[1248],{"type":50,"tag":128,"props":1249,"children":1250},{"__ignoreMap":125},[1251,1300],{"type":50,"tag":132,"props":1252,"children":1253},{"class":134,"line":135},[1254,1258,1263,1267,1271,1275,1279,1283,1288,1292,1296],{"type":50,"tag":132,"props":1255,"children":1256},{"style":185},[1257],{"type":56,"value":359},{"type":50,"tag":132,"props":1259,"children":1260},{"style":219},[1261],{"type":56,"value":1262}," ner ",{"type":50,"tag":132,"props":1264,"children":1265},{"style":173},[1266],{"type":56,"value":193},{"type":50,"tag":132,"props":1268,"children":1269},{"style":289},[1270],{"type":56,"value":373},{"type":50,"tag":132,"props":1272,"children":1273},{"style":376},[1274],{"type":56,"value":302},{"type":50,"tag":132,"props":1276,"children":1277},{"style":219},[1278],{"type":56,"value":383},{"type":50,"tag":132,"props":1280,"children":1281},{"style":173},[1282],{"type":56,"value":327},{"type":50,"tag":132,"props":1284,"children":1285},{"style":145},[1286],{"type":56,"value":1287},"token-classification",{"type":50,"tag":132,"props":1289,"children":1290},{"style":173},[1291],{"type":56,"value":327},{"type":50,"tag":132,"props":1293,"children":1294},{"style":219},[1295],{"type":56,"value":401},{"type":50,"tag":132,"props":1297,"children":1298},{"style":173},[1299],{"type":56,"value":332},{"type":50,"tag":132,"props":1301,"children":1302},{"class":134,"line":215},[1303,1307,1312,1316,1320,1325,1329,1333,1338,1342,1346],{"type":50,"tag":132,"props":1304,"children":1305},{"style":185},[1306],{"type":56,"value":359},{"type":50,"tag":132,"props":1308,"children":1309},{"style":219},[1310],{"type":56,"value":1311}," entities ",{"type":50,"tag":132,"props":1313,"children":1314},{"style":173},[1315],{"type":56,"value":193},{"type":50,"tag":132,"props":1317,"children":1318},{"style":289},[1319],{"type":56,"value":373},{"type":50,"tag":132,"props":1321,"children":1322},{"style":376},[1323],{"type":56,"value":1324}," ner",{"type":50,"tag":132,"props":1326,"children":1327},{"style":219},[1328],{"type":56,"value":383},{"type":50,"tag":132,"props":1330,"children":1331},{"style":173},[1332],{"type":56,"value":327},{"type":50,"tag":132,"props":1334,"children":1335},{"style":145},[1336],{"type":56,"value":1337},"My name is John and I live in New York.",{"type":50,"tag":132,"props":1339,"children":1340},{"style":173},[1341],{"type":56,"value":327},{"type":50,"tag":132,"props":1343,"children":1344},{"style":219},[1345],{"type":56,"value":401},{"type":50,"tag":132,"props":1347,"children":1348},{"style":173},[1349],{"type":56,"value":332},{"type":50,"tag":1129,"props":1351,"children":1353},{"id":1352},"question-answering",[1354],{"type":56,"value":1355},"Question Answering",{"type":50,"tag":120,"props":1357,"children":1359},{"className":162,"code":1358,"language":24,"meta":125,"style":125},"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",[1360],{"type":50,"tag":128,"props":1361,"children":1362},{"__ignoreMap":125},[1363,1411,1445,1474,1499],{"type":50,"tag":132,"props":1364,"children":1365},{"class":134,"line":135},[1366,1370,1375,1379,1383,1387,1391,1395,1399,1403,1407],{"type":50,"tag":132,"props":1367,"children":1368},{"style":185},[1369],{"type":56,"value":359},{"type":50,"tag":132,"props":1371,"children":1372},{"style":219},[1373],{"type":56,"value":1374}," qa ",{"type":50,"tag":132,"props":1376,"children":1377},{"style":173},[1378],{"type":56,"value":193},{"type":50,"tag":132,"props":1380,"children":1381},{"style":289},[1382],{"type":56,"value":373},{"type":50,"tag":132,"props":1384,"children":1385},{"style":376},[1386],{"type":56,"value":302},{"type":50,"tag":132,"props":1388,"children":1389},{"style":219},[1390],{"type":56,"value":383},{"type":50,"tag":132,"props":1392,"children":1393},{"style":173},[1394],{"type":56,"value":327},{"type":50,"tag":132,"props":1396,"children":1397},{"style":145},[1398],{"type":56,"value":1352},{"type":50,"tag":132,"props":1400,"children":1401},{"style":173},[1402],{"type":56,"value":327},{"type":50,"tag":132,"props":1404,"children":1405},{"style":219},[1406],{"type":56,"value":401},{"type":50,"tag":132,"props":1408,"children":1409},{"style":173},[1410],{"type":56,"value":332},{"type":50,"tag":132,"props":1412,"children":1413},{"class":134,"line":215},[1414,1418,1423,1427,1431,1436,1440],{"type":50,"tag":132,"props":1415,"children":1416},{"style":185},[1417],{"type":56,"value":359},{"type":50,"tag":132,"props":1419,"children":1420},{"style":219},[1421],{"type":56,"value":1422}," answer ",{"type":50,"tag":132,"props":1424,"children":1425},{"style":173},[1426],{"type":56,"value":193},{"type":50,"tag":132,"props":1428,"children":1429},{"style":289},[1430],{"type":56,"value":373},{"type":50,"tag":132,"props":1432,"children":1433},{"style":376},[1434],{"type":56,"value":1435}," qa",{"type":50,"tag":132,"props":1437,"children":1438},{"style":219},[1439],{"type":56,"value":383},{"type":50,"tag":132,"props":1441,"children":1442},{"style":173},[1443],{"type":56,"value":1444},"{\n",{"type":50,"tag":132,"props":1446,"children":1447},{"class":134,"line":245},[1448,1453,1457,1461,1466,1470],{"type":50,"tag":132,"props":1449,"children":1450},{"style":179},[1451],{"type":56,"value":1452},"  question",{"type":50,"tag":132,"props":1454,"children":1455},{"style":173},[1456],{"type":56,"value":935},{"type":50,"tag":132,"props":1458,"children":1459},{"style":173},[1460],{"type":56,"value":317},{"type":50,"tag":132,"props":1462,"children":1463},{"style":145},[1464],{"type":56,"value":1465},"What is the capital of France?",{"type":50,"tag":132,"props":1467,"children":1468},{"style":173},[1469],{"type":56,"value":327},{"type":50,"tag":132,"props":1471,"children":1472},{"style":173},[1473],{"type":56,"value":627},{"type":50,"tag":132,"props":1475,"children":1476},{"class":134,"line":353},[1477,1482,1486,1490,1495],{"type":50,"tag":132,"props":1478,"children":1479},{"style":179},[1480],{"type":56,"value":1481},"  context",{"type":50,"tag":132,"props":1483,"children":1484},{"style":173},[1485],{"type":56,"value":935},{"type":50,"tag":132,"props":1487,"children":1488},{"style":173},[1489],{"type":56,"value":317},{"type":50,"tag":132,"props":1491,"children":1492},{"style":145},[1493],{"type":56,"value":1494},"Paris is the capital and largest city of France.",{"type":50,"tag":132,"props":1496,"children":1497},{"style":173},[1498],{"type":56,"value":644},{"type":50,"tag":132,"props":1500,"children":1501},{"class":134,"line":408},[1502,1506,1510],{"type":50,"tag":132,"props":1503,"children":1504},{"style":173},[1505],{"type":56,"value":237},{"type":50,"tag":132,"props":1507,"children":1508},{"style":219},[1509],{"type":56,"value":401},{"type":50,"tag":132,"props":1511,"children":1512},{"style":173},[1513],{"type":56,"value":332},{"type":50,"tag":1129,"props":1515,"children":1517},{"id":1516},"text-generation",[1518],{"type":56,"value":1519},"Text Generation",{"type":50,"tag":120,"props":1521,"children":1523},{"className":162,"code":1522,"language":24,"meta":125,"style":125},"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",[1524],{"type":50,"tag":128,"props":1525,"children":1526},{"__ignoreMap":125},[1527,1592,1642,1664,1681],{"type":50,"tag":132,"props":1528,"children":1529},{"class":134,"line":135},[1530,1534,1539,1543,1547,1551,1555,1559,1563,1567,1571,1575,1580,1584,1588],{"type":50,"tag":132,"props":1531,"children":1532},{"style":185},[1533],{"type":56,"value":359},{"type":50,"tag":132,"props":1535,"children":1536},{"style":219},[1537],{"type":56,"value":1538}," generator ",{"type":50,"tag":132,"props":1540,"children":1541},{"style":173},[1542],{"type":56,"value":193},{"type":50,"tag":132,"props":1544,"children":1545},{"style":289},[1546],{"type":56,"value":373},{"type":50,"tag":132,"props":1548,"children":1549},{"style":376},[1550],{"type":56,"value":302},{"type":50,"tag":132,"props":1552,"children":1553},{"style":219},[1554],{"type":56,"value":383},{"type":50,"tag":132,"props":1556,"children":1557},{"style":173},[1558],{"type":56,"value":327},{"type":50,"tag":132,"props":1560,"children":1561},{"style":145},[1562],{"type":56,"value":1516},{"type":50,"tag":132,"props":1564,"children":1565},{"style":173},[1566],{"type":56,"value":327},{"type":50,"tag":132,"props":1568,"children":1569},{"style":173},[1570],{"type":56,"value":822},{"type":50,"tag":132,"props":1572,"children":1573},{"style":173},[1574],{"type":56,"value":317},{"type":50,"tag":132,"props":1576,"children":1577},{"style":145},[1578],{"type":56,"value":1579},"onnx-community\u002Fgemma-3-270m-it-ONNX",{"type":50,"tag":132,"props":1581,"children":1582},{"style":173},[1583],{"type":56,"value":327},{"type":50,"tag":132,"props":1585,"children":1586},{"style":219},[1587],{"type":56,"value":401},{"type":50,"tag":132,"props":1589,"children":1590},{"style":173},[1591],{"type":56,"value":332},{"type":50,"tag":132,"props":1593,"children":1594},{"class":134,"line":215},[1595,1599,1604,1608,1612,1617,1621,1625,1630,1634,1638],{"type":50,"tag":132,"props":1596,"children":1597},{"style":185},[1598],{"type":56,"value":359},{"type":50,"tag":132,"props":1600,"children":1601},{"style":219},[1602],{"type":56,"value":1603}," text ",{"type":50,"tag":132,"props":1605,"children":1606},{"style":173},[1607],{"type":56,"value":193},{"type":50,"tag":132,"props":1609,"children":1610},{"style":289},[1611],{"type":56,"value":373},{"type":50,"tag":132,"props":1613,"children":1614},{"style":376},[1615],{"type":56,"value":1616}," generator",{"type":50,"tag":132,"props":1618,"children":1619},{"style":219},[1620],{"type":56,"value":383},{"type":50,"tag":132,"props":1622,"children":1623},{"style":173},[1624],{"type":56,"value":327},{"type":50,"tag":132,"props":1626,"children":1627},{"style":145},[1628],{"type":56,"value":1629},"Once upon a time",{"type":50,"tag":132,"props":1631,"children":1632},{"style":173},[1633],{"type":56,"value":327},{"type":50,"tag":132,"props":1635,"children":1636},{"style":173},[1637],{"type":56,"value":822},{"type":50,"tag":132,"props":1639,"children":1640},{"style":173},[1641],{"type":56,"value":922},{"type":50,"tag":132,"props":1643,"children":1644},{"class":134,"line":245},[1645,1650,1654,1660],{"type":50,"tag":132,"props":1646,"children":1647},{"style":179},[1648],{"type":56,"value":1649},"  max_new_tokens",{"type":50,"tag":132,"props":1651,"children":1652},{"style":173},[1653],{"type":56,"value":935},{"type":50,"tag":132,"props":1655,"children":1657},{"style":1656},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1658],{"type":56,"value":1659}," 100",{"type":50,"tag":132,"props":1661,"children":1662},{"style":173},[1663],{"type":56,"value":627},{"type":50,"tag":132,"props":1665,"children":1666},{"class":134,"line":353},[1667,1672,1676],{"type":50,"tag":132,"props":1668,"children":1669},{"style":179},[1670],{"type":56,"value":1671},"  temperature",{"type":50,"tag":132,"props":1673,"children":1674},{"style":173},[1675],{"type":56,"value":935},{"type":50,"tag":132,"props":1677,"children":1678},{"style":1656},[1679],{"type":56,"value":1680}," 0.7\n",{"type":50,"tag":132,"props":1682,"children":1683},{"class":134,"line":408},[1684,1688,1692],{"type":50,"tag":132,"props":1685,"children":1686},{"style":173},[1687],{"type":56,"value":237},{"type":50,"tag":132,"props":1689,"children":1690},{"style":219},[1691],{"type":56,"value":401},{"type":50,"tag":132,"props":1693,"children":1694},{"style":173},[1695],{"type":56,"value":332},{"type":50,"tag":59,"props":1697,"children":1698},{},[1699,1704,1706,1715],{"type":50,"tag":537,"props":1700,"children":1701},{},[1702],{"type":56,"value":1703},"For streaming and chat:",{"type":56,"value":1705}," See ",{"type":50,"tag":537,"props":1707,"children":1708},{},[1709],{"type":50,"tag":553,"props":1710,"children":1712},{"href":1711},".\u002Freferences\u002FTEXT_GENERATION.md",[1713],{"type":56,"value":1714},"Text Generation Guide",{"type":56,"value":1716}," for:",{"type":50,"tag":77,"props":1718,"children":1719},{},[1720,1731,1736,1741,1746],{"type":50,"tag":81,"props":1721,"children":1722},{},[1723,1725],{"type":56,"value":1724},"Streaming token-by-token output with ",{"type":50,"tag":128,"props":1726,"children":1728},{"className":1727},[],[1729],{"type":56,"value":1730},"TextStreamer",{"type":50,"tag":81,"props":1732,"children":1733},{},[1734],{"type":56,"value":1735},"Chat\u002Fconversation format with system\u002Fuser\u002Fassistant roles",{"type":50,"tag":81,"props":1737,"children":1738},{},[1739],{"type":56,"value":1740},"Generation parameters (temperature, top_k, top_p)",{"type":50,"tag":81,"props":1742,"children":1743},{},[1744],{"type":56,"value":1745},"Browser and Node.js examples",{"type":50,"tag":81,"props":1747,"children":1748},{},[1749],{"type":56,"value":1750},"React components and API endpoints",{"type":50,"tag":1129,"props":1752,"children":1754},{"id":1753},"translation",[1755],{"type":56,"value":1756},"Translation",{"type":50,"tag":120,"props":1758,"children":1760},{"className":162,"code":1759,"language":24,"meta":125,"style":125},"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",[1761],{"type":50,"tag":128,"props":1762,"children":1763},{"__ignoreMap":125},[1764,1829,1879,1908,1933],{"type":50,"tag":132,"props":1765,"children":1766},{"class":134,"line":135},[1767,1771,1776,1780,1784,1788,1792,1796,1800,1804,1808,1812,1817,1821,1825],{"type":50,"tag":132,"props":1768,"children":1769},{"style":185},[1770],{"type":56,"value":359},{"type":50,"tag":132,"props":1772,"children":1773},{"style":219},[1774],{"type":56,"value":1775}," translator ",{"type":50,"tag":132,"props":1777,"children":1778},{"style":173},[1779],{"type":56,"value":193},{"type":50,"tag":132,"props":1781,"children":1782},{"style":289},[1783],{"type":56,"value":373},{"type":50,"tag":132,"props":1785,"children":1786},{"style":376},[1787],{"type":56,"value":302},{"type":50,"tag":132,"props":1789,"children":1790},{"style":219},[1791],{"type":56,"value":383},{"type":50,"tag":132,"props":1793,"children":1794},{"style":173},[1795],{"type":56,"value":327},{"type":50,"tag":132,"props":1797,"children":1798},{"style":145},[1799],{"type":56,"value":1753},{"type":50,"tag":132,"props":1801,"children":1802},{"style":173},[1803],{"type":56,"value":327},{"type":50,"tag":132,"props":1805,"children":1806},{"style":173},[1807],{"type":56,"value":822},{"type":50,"tag":132,"props":1809,"children":1810},{"style":173},[1811],{"type":56,"value":317},{"type":50,"tag":132,"props":1813,"children":1814},{"style":145},[1815],{"type":56,"value":1816},"Xenova\u002Fnllb-200-distilled-600M",{"type":50,"tag":132,"props":1818,"children":1819},{"style":173},[1820],{"type":56,"value":327},{"type":50,"tag":132,"props":1822,"children":1823},{"style":219},[1824],{"type":56,"value":401},{"type":50,"tag":132,"props":1826,"children":1827},{"style":173},[1828],{"type":56,"value":332},{"type":50,"tag":132,"props":1830,"children":1831},{"class":134,"line":215},[1832,1836,1841,1845,1849,1854,1858,1862,1867,1871,1875],{"type":50,"tag":132,"props":1833,"children":1834},{"style":185},[1835],{"type":56,"value":359},{"type":50,"tag":132,"props":1837,"children":1838},{"style":219},[1839],{"type":56,"value":1840}," output ",{"type":50,"tag":132,"props":1842,"children":1843},{"style":173},[1844],{"type":56,"value":193},{"type":50,"tag":132,"props":1846,"children":1847},{"style":289},[1848],{"type":56,"value":373},{"type":50,"tag":132,"props":1850,"children":1851},{"style":376},[1852],{"type":56,"value":1853}," translator",{"type":50,"tag":132,"props":1855,"children":1856},{"style":219},[1857],{"type":56,"value":383},{"type":50,"tag":132,"props":1859,"children":1860},{"style":173},[1861],{"type":56,"value":327},{"type":50,"tag":132,"props":1863,"children":1864},{"style":145},[1865],{"type":56,"value":1866},"Hello, how are you?",{"type":50,"tag":132,"props":1868,"children":1869},{"style":173},[1870],{"type":56,"value":327},{"type":50,"tag":132,"props":1872,"children":1873},{"style":173},[1874],{"type":56,"value":822},{"type":50,"tag":132,"props":1876,"children":1877},{"style":173},[1878],{"type":56,"value":922},{"type":50,"tag":132,"props":1880,"children":1881},{"class":134,"line":245},[1882,1887,1891,1895,1900,1904],{"type":50,"tag":132,"props":1883,"children":1884},{"style":179},[1885],{"type":56,"value":1886},"  src_lang",{"type":50,"tag":132,"props":1888,"children":1889},{"style":173},[1890],{"type":56,"value":935},{"type":50,"tag":132,"props":1892,"children":1893},{"style":173},[1894],{"type":56,"value":317},{"type":50,"tag":132,"props":1896,"children":1897},{"style":145},[1898],{"type":56,"value":1899},"eng_Latn",{"type":50,"tag":132,"props":1901,"children":1902},{"style":173},[1903],{"type":56,"value":327},{"type":50,"tag":132,"props":1905,"children":1906},{"style":173},[1907],{"type":56,"value":627},{"type":50,"tag":132,"props":1909,"children":1910},{"class":134,"line":353},[1911,1916,1920,1924,1929],{"type":50,"tag":132,"props":1912,"children":1913},{"style":179},[1914],{"type":56,"value":1915},"  tgt_lang",{"type":50,"tag":132,"props":1917,"children":1918},{"style":173},[1919],{"type":56,"value":935},{"type":50,"tag":132,"props":1921,"children":1922},{"style":173},[1923],{"type":56,"value":317},{"type":50,"tag":132,"props":1925,"children":1926},{"style":145},[1927],{"type":56,"value":1928},"fra_Latn",{"type":50,"tag":132,"props":1930,"children":1931},{"style":173},[1932],{"type":56,"value":644},{"type":50,"tag":132,"props":1934,"children":1935},{"class":134,"line":408},[1936,1940,1944],{"type":50,"tag":132,"props":1937,"children":1938},{"style":173},[1939],{"type":56,"value":237},{"type":50,"tag":132,"props":1941,"children":1942},{"style":219},[1943],{"type":56,"value":401},{"type":50,"tag":132,"props":1945,"children":1946},{"style":173},[1947],{"type":56,"value":332},{"type":50,"tag":1129,"props":1949,"children":1951},{"id":1950},"summarization",[1952],{"type":56,"value":1953},"Summarization",{"type":50,"tag":120,"props":1955,"children":1957},{"className":162,"code":1956,"language":24,"meta":125,"style":125},"const summarizer = await pipeline('summarization');\nconst summary = await summarizer(longText, {\n  max_length: 100,\n  min_length: 30\n});\n",[1958],{"type":50,"tag":128,"props":1959,"children":1960},{"__ignoreMap":125},[1961,2009,2047,2067,2084],{"type":50,"tag":132,"props":1962,"children":1963},{"class":134,"line":135},[1964,1968,1973,1977,1981,1985,1989,1993,1997,2001,2005],{"type":50,"tag":132,"props":1965,"children":1966},{"style":185},[1967],{"type":56,"value":359},{"type":50,"tag":132,"props":1969,"children":1970},{"style":219},[1971],{"type":56,"value":1972}," summarizer ",{"type":50,"tag":132,"props":1974,"children":1975},{"style":173},[1976],{"type":56,"value":193},{"type":50,"tag":132,"props":1978,"children":1979},{"style":289},[1980],{"type":56,"value":373},{"type":50,"tag":132,"props":1982,"children":1983},{"style":376},[1984],{"type":56,"value":302},{"type":50,"tag":132,"props":1986,"children":1987},{"style":219},[1988],{"type":56,"value":383},{"type":50,"tag":132,"props":1990,"children":1991},{"style":173},[1992],{"type":56,"value":327},{"type":50,"tag":132,"props":1994,"children":1995},{"style":145},[1996],{"type":56,"value":1950},{"type":50,"tag":132,"props":1998,"children":1999},{"style":173},[2000],{"type":56,"value":327},{"type":50,"tag":132,"props":2002,"children":2003},{"style":219},[2004],{"type":56,"value":401},{"type":50,"tag":132,"props":2006,"children":2007},{"style":173},[2008],{"type":56,"value":332},{"type":50,"tag":132,"props":2010,"children":2011},{"class":134,"line":215},[2012,2016,2021,2025,2029,2034,2039,2043],{"type":50,"tag":132,"props":2013,"children":2014},{"style":185},[2015],{"type":56,"value":359},{"type":50,"tag":132,"props":2017,"children":2018},{"style":219},[2019],{"type":56,"value":2020}," summary ",{"type":50,"tag":132,"props":2022,"children":2023},{"style":173},[2024],{"type":56,"value":193},{"type":50,"tag":132,"props":2026,"children":2027},{"style":289},[2028],{"type":56,"value":373},{"type":50,"tag":132,"props":2030,"children":2031},{"style":376},[2032],{"type":56,"value":2033}," summarizer",{"type":50,"tag":132,"props":2035,"children":2036},{"style":219},[2037],{"type":56,"value":2038},"(longText",{"type":50,"tag":132,"props":2040,"children":2041},{"style":173},[2042],{"type":56,"value":822},{"type":50,"tag":132,"props":2044,"children":2045},{"style":173},[2046],{"type":56,"value":922},{"type":50,"tag":132,"props":2048,"children":2049},{"class":134,"line":245},[2050,2055,2059,2063],{"type":50,"tag":132,"props":2051,"children":2052},{"style":179},[2053],{"type":56,"value":2054},"  max_length",{"type":50,"tag":132,"props":2056,"children":2057},{"style":173},[2058],{"type":56,"value":935},{"type":50,"tag":132,"props":2060,"children":2061},{"style":1656},[2062],{"type":56,"value":1659},{"type":50,"tag":132,"props":2064,"children":2065},{"style":173},[2066],{"type":56,"value":627},{"type":50,"tag":132,"props":2068,"children":2069},{"class":134,"line":353},[2070,2075,2079],{"type":50,"tag":132,"props":2071,"children":2072},{"style":179},[2073],{"type":56,"value":2074},"  min_length",{"type":50,"tag":132,"props":2076,"children":2077},{"style":173},[2078],{"type":56,"value":935},{"type":50,"tag":132,"props":2080,"children":2081},{"style":1656},[2082],{"type":56,"value":2083}," 30\n",{"type":50,"tag":132,"props":2085,"children":2086},{"class":134,"line":408},[2087,2091,2095],{"type":50,"tag":132,"props":2088,"children":2089},{"style":173},[2090],{"type":56,"value":237},{"type":50,"tag":132,"props":2092,"children":2093},{"style":219},[2094],{"type":56,"value":401},{"type":50,"tag":132,"props":2096,"children":2097},{"style":173},[2098],{"type":56,"value":332},{"type":50,"tag":1129,"props":2100,"children":2102},{"id":2101},"zero-shot-classification",[2103],{"type":56,"value":2104},"Zero-Shot Classification",{"type":50,"tag":120,"props":2106,"children":2108},{"className":162,"code":2107,"language":24,"meta":125,"style":125},"const classifier = await pipeline('zero-shot-classification');\nconst result = await classifier('This is a story about sports.', ['politics', 'sports', 'technology']);\n",[2109],{"type":50,"tag":128,"props":2110,"children":2111},{"__ignoreMap":125},[2112,2159],{"type":50,"tag":132,"props":2113,"children":2114},{"class":134,"line":135},[2115,2119,2123,2127,2131,2135,2139,2143,2147,2151,2155],{"type":50,"tag":132,"props":2116,"children":2117},{"style":185},[2118],{"type":56,"value":359},{"type":50,"tag":132,"props":2120,"children":2121},{"style":219},[2122],{"type":56,"value":1153},{"type":50,"tag":132,"props":2124,"children":2125},{"style":173},[2126],{"type":56,"value":193},{"type":50,"tag":132,"props":2128,"children":2129},{"style":289},[2130],{"type":56,"value":373},{"type":50,"tag":132,"props":2132,"children":2133},{"style":376},[2134],{"type":56,"value":302},{"type":50,"tag":132,"props":2136,"children":2137},{"style":219},[2138],{"type":56,"value":383},{"type":50,"tag":132,"props":2140,"children":2141},{"style":173},[2142],{"type":56,"value":327},{"type":50,"tag":132,"props":2144,"children":2145},{"style":145},[2146],{"type":56,"value":2101},{"type":50,"tag":132,"props":2148,"children":2149},{"style":173},[2150],{"type":56,"value":327},{"type":50,"tag":132,"props":2152,"children":2153},{"style":219},[2154],{"type":56,"value":401},{"type":50,"tag":132,"props":2156,"children":2157},{"style":173},[2158],{"type":56,"value":332},{"type":50,"tag":132,"props":2160,"children":2161},{"class":134,"line":215},[2162,2166,2170,2174,2178,2182,2186,2190,2195,2199,2203,2208,2212,2217,2221,2225,2229,2234,2238,2242,2246,2251,2255,2260],{"type":50,"tag":132,"props":2163,"children":2164},{"style":185},[2165],{"type":56,"value":359},{"type":50,"tag":132,"props":2167,"children":2168},{"style":219},[2169],{"type":56,"value":435},{"type":50,"tag":132,"props":2171,"children":2172},{"style":173},[2173],{"type":56,"value":193},{"type":50,"tag":132,"props":2175,"children":2176},{"style":289},[2177],{"type":56,"value":373},{"type":50,"tag":132,"props":2179,"children":2180},{"style":376},[2181],{"type":56,"value":513},{"type":50,"tag":132,"props":2183,"children":2184},{"style":219},[2185],{"type":56,"value":383},{"type":50,"tag":132,"props":2187,"children":2188},{"style":173},[2189],{"type":56,"value":327},{"type":50,"tag":132,"props":2191,"children":2192},{"style":145},[2193],{"type":56,"value":2194},"This is a story about sports.",{"type":50,"tag":132,"props":2196,"children":2197},{"style":173},[2198],{"type":56,"value":327},{"type":50,"tag":132,"props":2200,"children":2201},{"style":173},[2202],{"type":56,"value":822},{"type":50,"tag":132,"props":2204,"children":2205},{"style":219},[2206],{"type":56,"value":2207}," [",{"type":50,"tag":132,"props":2209,"children":2210},{"style":173},[2211],{"type":56,"value":327},{"type":50,"tag":132,"props":2213,"children":2214},{"style":145},[2215],{"type":56,"value":2216},"politics",{"type":50,"tag":132,"props":2218,"children":2219},{"style":173},[2220],{"type":56,"value":327},{"type":50,"tag":132,"props":2222,"children":2223},{"style":173},[2224],{"type":56,"value":822},{"type":50,"tag":132,"props":2226,"children":2227},{"style":173},[2228],{"type":56,"value":317},{"type":50,"tag":132,"props":2230,"children":2231},{"style":145},[2232],{"type":56,"value":2233},"sports",{"type":50,"tag":132,"props":2235,"children":2236},{"style":173},[2237],{"type":56,"value":327},{"type":50,"tag":132,"props":2239,"children":2240},{"style":173},[2241],{"type":56,"value":822},{"type":50,"tag":132,"props":2243,"children":2244},{"style":173},[2245],{"type":56,"value":317},{"type":50,"tag":132,"props":2247,"children":2248},{"style":145},[2249],{"type":56,"value":2250},"technology",{"type":50,"tag":132,"props":2252,"children":2253},{"style":173},[2254],{"type":56,"value":327},{"type":50,"tag":132,"props":2256,"children":2257},{"style":219},[2258],{"type":56,"value":2259},"])",{"type":50,"tag":132,"props":2261,"children":2262},{"style":173},[2263],{"type":56,"value":332},{"type":50,"tag":113,"props":2265,"children":2266},{"id":27},[2267],{"type":56,"value":26},{"type":50,"tag":1129,"props":2269,"children":2271},{"id":2270},"image-classification",[2272],{"type":56,"value":2273},"Image Classification",{"type":50,"tag":120,"props":2275,"children":2277},{"className":162,"code":2276,"language":24,"meta":125,"style":125},"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",[2278],{"type":50,"tag":128,"props":2279,"children":2280},{"__ignoreMap":125},[2281,2328,2376,2384],{"type":50,"tag":132,"props":2282,"children":2283},{"class":134,"line":135},[2284,2288,2292,2296,2300,2304,2308,2312,2316,2320,2324],{"type":50,"tag":132,"props":2285,"children":2286},{"style":185},[2287],{"type":56,"value":359},{"type":50,"tag":132,"props":2289,"children":2290},{"style":219},[2291],{"type":56,"value":1153},{"type":50,"tag":132,"props":2293,"children":2294},{"style":173},[2295],{"type":56,"value":193},{"type":50,"tag":132,"props":2297,"children":2298},{"style":289},[2299],{"type":56,"value":373},{"type":50,"tag":132,"props":2301,"children":2302},{"style":376},[2303],{"type":56,"value":302},{"type":50,"tag":132,"props":2305,"children":2306},{"style":219},[2307],{"type":56,"value":383},{"type":50,"tag":132,"props":2309,"children":2310},{"style":173},[2311],{"type":56,"value":327},{"type":50,"tag":132,"props":2313,"children":2314},{"style":145},[2315],{"type":56,"value":2270},{"type":50,"tag":132,"props":2317,"children":2318},{"style":173},[2319],{"type":56,"value":327},{"type":50,"tag":132,"props":2321,"children":2322},{"style":219},[2323],{"type":56,"value":401},{"type":50,"tag":132,"props":2325,"children":2326},{"style":173},[2327],{"type":56,"value":332},{"type":50,"tag":132,"props":2329,"children":2330},{"class":134,"line":215},[2331,2335,2339,2343,2347,2351,2355,2359,2364,2368,2372],{"type":50,"tag":132,"props":2332,"children":2333},{"style":185},[2334],{"type":56,"value":359},{"type":50,"tag":132,"props":2336,"children":2337},{"style":219},[2338],{"type":56,"value":435},{"type":50,"tag":132,"props":2340,"children":2341},{"style":173},[2342],{"type":56,"value":193},{"type":50,"tag":132,"props":2344,"children":2345},{"style":289},[2346],{"type":56,"value":373},{"type":50,"tag":132,"props":2348,"children":2349},{"style":376},[2350],{"type":56,"value":513},{"type":50,"tag":132,"props":2352,"children":2353},{"style":219},[2354],{"type":56,"value":383},{"type":50,"tag":132,"props":2356,"children":2357},{"style":173},[2358],{"type":56,"value":327},{"type":50,"tag":132,"props":2360,"children":2361},{"style":145},[2362],{"type":56,"value":2363},"https:\u002F\u002Fexample.com\u002Fimage.jpg",{"type":50,"tag":132,"props":2365,"children":2366},{"style":173},[2367],{"type":56,"value":327},{"type":50,"tag":132,"props":2369,"children":2370},{"style":219},[2371],{"type":56,"value":401},{"type":50,"tag":132,"props":2373,"children":2374},{"style":173},[2375],{"type":56,"value":332},{"type":50,"tag":132,"props":2377,"children":2378},{"class":134,"line":245},[2379],{"type":50,"tag":132,"props":2380,"children":2381},{"style":347},[2382],{"type":56,"value":2383},"\u002F\u002F Or with local file\n",{"type":50,"tag":132,"props":2385,"children":2386},{"class":134,"line":353},[2387,2391,2395,2399,2403,2407,2412],{"type":50,"tag":132,"props":2388,"children":2389},{"style":185},[2390],{"type":56,"value":359},{"type":50,"tag":132,"props":2392,"children":2393},{"style":219},[2394],{"type":56,"value":435},{"type":50,"tag":132,"props":2396,"children":2397},{"style":173},[2398],{"type":56,"value":193},{"type":50,"tag":132,"props":2400,"children":2401},{"style":289},[2402],{"type":56,"value":373},{"type":50,"tag":132,"props":2404,"children":2405},{"style":376},[2406],{"type":56,"value":513},{"type":50,"tag":132,"props":2408,"children":2409},{"style":219},[2410],{"type":56,"value":2411},"(imageUrl)",{"type":50,"tag":132,"props":2413,"children":2414},{"style":173},[2415],{"type":56,"value":332},{"type":50,"tag":1129,"props":2417,"children":2419},{"id":2418},"object-detection",[2420],{"type":56,"value":2421},"Object Detection",{"type":50,"tag":120,"props":2423,"children":2425},{"className":162,"code":2424,"language":24,"meta":125,"style":125},"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",[2426],{"type":50,"tag":128,"props":2427,"children":2428},{"__ignoreMap":125},[2429,2477,2526],{"type":50,"tag":132,"props":2430,"children":2431},{"class":134,"line":135},[2432,2436,2441,2445,2449,2453,2457,2461,2465,2469,2473],{"type":50,"tag":132,"props":2433,"children":2434},{"style":185},[2435],{"type":56,"value":359},{"type":50,"tag":132,"props":2437,"children":2438},{"style":219},[2439],{"type":56,"value":2440}," detector ",{"type":50,"tag":132,"props":2442,"children":2443},{"style":173},[2444],{"type":56,"value":193},{"type":50,"tag":132,"props":2446,"children":2447},{"style":289},[2448],{"type":56,"value":373},{"type":50,"tag":132,"props":2450,"children":2451},{"style":376},[2452],{"type":56,"value":302},{"type":50,"tag":132,"props":2454,"children":2455},{"style":219},[2456],{"type":56,"value":383},{"type":50,"tag":132,"props":2458,"children":2459},{"style":173},[2460],{"type":56,"value":327},{"type":50,"tag":132,"props":2462,"children":2463},{"style":145},[2464],{"type":56,"value":2418},{"type":50,"tag":132,"props":2466,"children":2467},{"style":173},[2468],{"type":56,"value":327},{"type":50,"tag":132,"props":2470,"children":2471},{"style":219},[2472],{"type":56,"value":401},{"type":50,"tag":132,"props":2474,"children":2475},{"style":173},[2476],{"type":56,"value":332},{"type":50,"tag":132,"props":2478,"children":2479},{"class":134,"line":215},[2480,2484,2489,2493,2497,2502,2506,2510,2514,2518,2522],{"type":50,"tag":132,"props":2481,"children":2482},{"style":185},[2483],{"type":56,"value":359},{"type":50,"tag":132,"props":2485,"children":2486},{"style":219},[2487],{"type":56,"value":2488}," objects ",{"type":50,"tag":132,"props":2490,"children":2491},{"style":173},[2492],{"type":56,"value":193},{"type":50,"tag":132,"props":2494,"children":2495},{"style":289},[2496],{"type":56,"value":373},{"type":50,"tag":132,"props":2498,"children":2499},{"style":376},[2500],{"type":56,"value":2501}," detector",{"type":50,"tag":132,"props":2503,"children":2504},{"style":219},[2505],{"type":56,"value":383},{"type":50,"tag":132,"props":2507,"children":2508},{"style":173},[2509],{"type":56,"value":327},{"type":50,"tag":132,"props":2511,"children":2512},{"style":145},[2513],{"type":56,"value":2363},{"type":50,"tag":132,"props":2515,"children":2516},{"style":173},[2517],{"type":56,"value":327},{"type":50,"tag":132,"props":2519,"children":2520},{"style":219},[2521],{"type":56,"value":401},{"type":50,"tag":132,"props":2523,"children":2524},{"style":173},[2525],{"type":56,"value":332},{"type":50,"tag":132,"props":2527,"children":2528},{"class":134,"line":245},[2529],{"type":50,"tag":132,"props":2530,"children":2531},{"style":347},[2532],{"type":56,"value":2533},"\u002F\u002F Returns: [{ label: 'person', score: 0.95, box: { xmin, ymin, xmax, ymax } }, ...]\n",{"type":50,"tag":1129,"props":2535,"children":2537},{"id":2536},"image-segmentation",[2538],{"type":56,"value":2539},"Image Segmentation",{"type":50,"tag":120,"props":2541,"children":2543},{"className":162,"code":2542,"language":24,"meta":125,"style":125},"const segmenter = await pipeline('image-segmentation');\nconst segments = await segmenter('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n",[2544],{"type":50,"tag":128,"props":2545,"children":2546},{"__ignoreMap":125},[2547,2595],{"type":50,"tag":132,"props":2548,"children":2549},{"class":134,"line":135},[2550,2554,2559,2563,2567,2571,2575,2579,2583,2587,2591],{"type":50,"tag":132,"props":2551,"children":2552},{"style":185},[2553],{"type":56,"value":359},{"type":50,"tag":132,"props":2555,"children":2556},{"style":219},[2557],{"type":56,"value":2558}," segmenter ",{"type":50,"tag":132,"props":2560,"children":2561},{"style":173},[2562],{"type":56,"value":193},{"type":50,"tag":132,"props":2564,"children":2565},{"style":289},[2566],{"type":56,"value":373},{"type":50,"tag":132,"props":2568,"children":2569},{"style":376},[2570],{"type":56,"value":302},{"type":50,"tag":132,"props":2572,"children":2573},{"style":219},[2574],{"type":56,"value":383},{"type":50,"tag":132,"props":2576,"children":2577},{"style":173},[2578],{"type":56,"value":327},{"type":50,"tag":132,"props":2580,"children":2581},{"style":145},[2582],{"type":56,"value":2536},{"type":50,"tag":132,"props":2584,"children":2585},{"style":173},[2586],{"type":56,"value":327},{"type":50,"tag":132,"props":2588,"children":2589},{"style":219},[2590],{"type":56,"value":401},{"type":50,"tag":132,"props":2592,"children":2593},{"style":173},[2594],{"type":56,"value":332},{"type":50,"tag":132,"props":2596,"children":2597},{"class":134,"line":215},[2598,2602,2607,2611,2615,2620,2624,2628,2632,2636,2640],{"type":50,"tag":132,"props":2599,"children":2600},{"style":185},[2601],{"type":56,"value":359},{"type":50,"tag":132,"props":2603,"children":2604},{"style":219},[2605],{"type":56,"value":2606}," segments ",{"type":50,"tag":132,"props":2608,"children":2609},{"style":173},[2610],{"type":56,"value":193},{"type":50,"tag":132,"props":2612,"children":2613},{"style":289},[2614],{"type":56,"value":373},{"type":50,"tag":132,"props":2616,"children":2617},{"style":376},[2618],{"type":56,"value":2619}," segmenter",{"type":50,"tag":132,"props":2621,"children":2622},{"style":219},[2623],{"type":56,"value":383},{"type":50,"tag":132,"props":2625,"children":2626},{"style":173},[2627],{"type":56,"value":327},{"type":50,"tag":132,"props":2629,"children":2630},{"style":145},[2631],{"type":56,"value":2363},{"type":50,"tag":132,"props":2633,"children":2634},{"style":173},[2635],{"type":56,"value":327},{"type":50,"tag":132,"props":2637,"children":2638},{"style":219},[2639],{"type":56,"value":401},{"type":50,"tag":132,"props":2641,"children":2642},{"style":173},[2643],{"type":56,"value":332},{"type":50,"tag":1129,"props":2645,"children":2647},{"id":2646},"depth-estimation",[2648],{"type":56,"value":2649},"Depth Estimation",{"type":50,"tag":120,"props":2651,"children":2653},{"className":162,"code":2652,"language":24,"meta":125,"style":125},"const depthEstimator = await pipeline('depth-estimation');\nconst depth = await depthEstimator('https:\u002F\u002Fexample.com\u002Fimage.jpg');\n",[2654],{"type":50,"tag":128,"props":2655,"children":2656},{"__ignoreMap":125},[2657,2705],{"type":50,"tag":132,"props":2658,"children":2659},{"class":134,"line":135},[2660,2664,2669,2673,2677,2681,2685,2689,2693,2697,2701],{"type":50,"tag":132,"props":2661,"children":2662},{"style":185},[2663],{"type":56,"value":359},{"type":50,"tag":132,"props":2665,"children":2666},{"style":219},[2667],{"type":56,"value":2668}," depthEstimator ",{"type":50,"tag":132,"props":2670,"children":2671},{"style":173},[2672],{"type":56,"value":193},{"type":50,"tag":132,"props":2674,"children":2675},{"style":289},[2676],{"type":56,"value":373},{"type":50,"tag":132,"props":2678,"children":2679},{"style":376},[2680],{"type":56,"value":302},{"type":50,"tag":132,"props":2682,"children":2683},{"style":219},[2684],{"type":56,"value":383},{"type":50,"tag":132,"props":2686,"children":2687},{"style":173},[2688],{"type":56,"value":327},{"type":50,"tag":132,"props":2690,"children":2691},{"style":145},[2692],{"type":56,"value":2646},{"type":50,"tag":132,"props":2694,"children":2695},{"style":173},[2696],{"type":56,"value":327},{"type":50,"tag":132,"props":2698,"children":2699},{"style":219},[2700],{"type":56,"value":401},{"type":50,"tag":132,"props":2702,"children":2703},{"style":173},[2704],{"type":56,"value":332},{"type":50,"tag":132,"props":2706,"children":2707},{"class":134,"line":215},[2708,2712,2717,2721,2725,2730,2734,2738,2742,2746,2750],{"type":50,"tag":132,"props":2709,"children":2710},{"style":185},[2711],{"type":56,"value":359},{"type":50,"tag":132,"props":2713,"children":2714},{"style":219},[2715],{"type":56,"value":2716}," depth ",{"type":50,"tag":132,"props":2718,"children":2719},{"style":173},[2720],{"type":56,"value":193},{"type":50,"tag":132,"props":2722,"children":2723},{"style":289},[2724],{"type":56,"value":373},{"type":50,"tag":132,"props":2726,"children":2727},{"style":376},[2728],{"type":56,"value":2729}," depthEstimator",{"type":50,"tag":132,"props":2731,"children":2732},{"style":219},[2733],{"type":56,"value":383},{"type":50,"tag":132,"props":2735,"children":2736},{"style":173},[2737],{"type":56,"value":327},{"type":50,"tag":132,"props":2739,"children":2740},{"style":145},[2741],{"type":56,"value":2363},{"type":50,"tag":132,"props":2743,"children":2744},{"style":173},[2745],{"type":56,"value":327},{"type":50,"tag":132,"props":2747,"children":2748},{"style":219},[2749],{"type":56,"value":401},{"type":50,"tag":132,"props":2751,"children":2752},{"style":173},[2753],{"type":56,"value":332},{"type":50,"tag":1129,"props":2755,"children":2757},{"id":2756},"zero-shot-image-classification",[2758],{"type":56,"value":2759},"Zero-Shot Image Classification",{"type":50,"tag":120,"props":2761,"children":2763},{"className":162,"code":2762,"language":24,"meta":125,"style":125},"const classifier = await pipeline('zero-shot-image-classification');\nconst result = await classifier('image.jpg', ['cat', 'dog', 'bird']);\n",[2764],{"type":50,"tag":128,"props":2765,"children":2766},{"__ignoreMap":125},[2767,2814],{"type":50,"tag":132,"props":2768,"children":2769},{"class":134,"line":135},[2770,2774,2778,2782,2786,2790,2794,2798,2802,2806,2810],{"type":50,"tag":132,"props":2771,"children":2772},{"style":185},[2773],{"type":56,"value":359},{"type":50,"tag":132,"props":2775,"children":2776},{"style":219},[2777],{"type":56,"value":1153},{"type":50,"tag":132,"props":2779,"children":2780},{"style":173},[2781],{"type":56,"value":193},{"type":50,"tag":132,"props":2783,"children":2784},{"style":289},[2785],{"type":56,"value":373},{"type":50,"tag":132,"props":2787,"children":2788},{"style":376},[2789],{"type":56,"value":302},{"type":50,"tag":132,"props":2791,"children":2792},{"style":219},[2793],{"type":56,"value":383},{"type":50,"tag":132,"props":2795,"children":2796},{"style":173},[2797],{"type":56,"value":327},{"type":50,"tag":132,"props":2799,"children":2800},{"style":145},[2801],{"type":56,"value":2756},{"type":50,"tag":132,"props":2803,"children":2804},{"style":173},[2805],{"type":56,"value":327},{"type":50,"tag":132,"props":2807,"children":2808},{"style":219},[2809],{"type":56,"value":401},{"type":50,"tag":132,"props":2811,"children":2812},{"style":173},[2813],{"type":56,"value":332},{"type":50,"tag":132,"props":2815,"children":2816},{"class":134,"line":215},[2817,2821,2825,2829,2833,2837,2841,2845,2850,2854,2858,2862,2866,2871,2875,2879,2883,2888,2892,2896,2900,2905,2909,2913],{"type":50,"tag":132,"props":2818,"children":2819},{"style":185},[2820],{"type":56,"value":359},{"type":50,"tag":132,"props":2822,"children":2823},{"style":219},[2824],{"type":56,"value":435},{"type":50,"tag":132,"props":2826,"children":2827},{"style":173},[2828],{"type":56,"value":193},{"type":50,"tag":132,"props":2830,"children":2831},{"style":289},[2832],{"type":56,"value":373},{"type":50,"tag":132,"props":2834,"children":2835},{"style":376},[2836],{"type":56,"value":513},{"type":50,"tag":132,"props":2838,"children":2839},{"style":219},[2840],{"type":56,"value":383},{"type":50,"tag":132,"props":2842,"children":2843},{"style":173},[2844],{"type":56,"value":327},{"type":50,"tag":132,"props":2846,"children":2847},{"style":145},[2848],{"type":56,"value":2849},"image.jpg",{"type":50,"tag":132,"props":2851,"children":2852},{"style":173},[2853],{"type":56,"value":327},{"type":50,"tag":132,"props":2855,"children":2856},{"style":173},[2857],{"type":56,"value":822},{"type":50,"tag":132,"props":2859,"children":2860},{"style":219},[2861],{"type":56,"value":2207},{"type":50,"tag":132,"props":2863,"children":2864},{"style":173},[2865],{"type":56,"value":327},{"type":50,"tag":132,"props":2867,"children":2868},{"style":145},[2869],{"type":56,"value":2870},"cat",{"type":50,"tag":132,"props":2872,"children":2873},{"style":173},[2874],{"type":56,"value":327},{"type":50,"tag":132,"props":2876,"children":2877},{"style":173},[2878],{"type":56,"value":822},{"type":50,"tag":132,"props":2880,"children":2881},{"style":173},[2882],{"type":56,"value":317},{"type":50,"tag":132,"props":2884,"children":2885},{"style":145},[2886],{"type":56,"value":2887},"dog",{"type":50,"tag":132,"props":2889,"children":2890},{"style":173},[2891],{"type":56,"value":327},{"type":50,"tag":132,"props":2893,"children":2894},{"style":173},[2895],{"type":56,"value":822},{"type":50,"tag":132,"props":2897,"children":2898},{"style":173},[2899],{"type":56,"value":317},{"type":50,"tag":132,"props":2901,"children":2902},{"style":145},[2903],{"type":56,"value":2904},"bird",{"type":50,"tag":132,"props":2906,"children":2907},{"style":173},[2908],{"type":56,"value":327},{"type":50,"tag":132,"props":2910,"children":2911},{"style":219},[2912],{"type":56,"value":2259},{"type":50,"tag":132,"props":2914,"children":2915},{"style":173},[2916],{"type":56,"value":332},{"type":50,"tag":113,"props":2918,"children":2920},{"id":2919},"audio-processing",[2921],{"type":56,"value":2922},"Audio Processing",{"type":50,"tag":1129,"props":2924,"children":2926},{"id":2925},"automatic-speech-recognition",[2927],{"type":56,"value":2928},"Automatic Speech Recognition",{"type":50,"tag":120,"props":2930,"children":2932},{"className":162,"code":2931,"language":24,"meta":125,"style":125},"const transcriber = await pipeline('automatic-speech-recognition');\nconst result = await transcriber('audio.wav');\n\u002F\u002F Returns: { text: 'transcribed text here' }\n",[2933],{"type":50,"tag":128,"props":2934,"children":2935},{"__ignoreMap":125},[2936,2984,3033],{"type":50,"tag":132,"props":2937,"children":2938},{"class":134,"line":135},[2939,2943,2948,2952,2956,2960,2964,2968,2972,2976,2980],{"type":50,"tag":132,"props":2940,"children":2941},{"style":185},[2942],{"type":56,"value":359},{"type":50,"tag":132,"props":2944,"children":2945},{"style":219},[2946],{"type":56,"value":2947}," transcriber ",{"type":50,"tag":132,"props":2949,"children":2950},{"style":173},[2951],{"type":56,"value":193},{"type":50,"tag":132,"props":2953,"children":2954},{"style":289},[2955],{"type":56,"value":373},{"type":50,"tag":132,"props":2957,"children":2958},{"style":376},[2959],{"type":56,"value":302},{"type":50,"tag":132,"props":2961,"children":2962},{"style":219},[2963],{"type":56,"value":383},{"type":50,"tag":132,"props":2965,"children":2966},{"style":173},[2967],{"type":56,"value":327},{"type":50,"tag":132,"props":2969,"children":2970},{"style":145},[2971],{"type":56,"value":2925},{"type":50,"tag":132,"props":2973,"children":2974},{"style":173},[2975],{"type":56,"value":327},{"type":50,"tag":132,"props":2977,"children":2978},{"style":219},[2979],{"type":56,"value":401},{"type":50,"tag":132,"props":2981,"children":2982},{"style":173},[2983],{"type":56,"value":332},{"type":50,"tag":132,"props":2985,"children":2986},{"class":134,"line":215},[2987,2991,2995,2999,3003,3008,3012,3016,3021,3025,3029],{"type":50,"tag":132,"props":2988,"children":2989},{"style":185},[2990],{"type":56,"value":359},{"type":50,"tag":132,"props":2992,"children":2993},{"style":219},[2994],{"type":56,"value":435},{"type":50,"tag":132,"props":2996,"children":2997},{"style":173},[2998],{"type":56,"value":193},{"type":50,"tag":132,"props":3000,"children":3001},{"style":289},[3002],{"type":56,"value":373},{"type":50,"tag":132,"props":3004,"children":3005},{"style":376},[3006],{"type":56,"value":3007}," transcriber",{"type":50,"tag":132,"props":3009,"children":3010},{"style":219},[3011],{"type":56,"value":383},{"type":50,"tag":132,"props":3013,"children":3014},{"style":173},[3015],{"type":56,"value":327},{"type":50,"tag":132,"props":3017,"children":3018},{"style":145},[3019],{"type":56,"value":3020},"audio.wav",{"type":50,"tag":132,"props":3022,"children":3023},{"style":173},[3024],{"type":56,"value":327},{"type":50,"tag":132,"props":3026,"children":3027},{"style":219},[3028],{"type":56,"value":401},{"type":50,"tag":132,"props":3030,"children":3031},{"style":173},[3032],{"type":56,"value":332},{"type":50,"tag":132,"props":3034,"children":3035},{"class":134,"line":245},[3036],{"type":50,"tag":132,"props":3037,"children":3038},{"style":347},[3039],{"type":56,"value":3040},"\u002F\u002F Returns: { text: 'transcribed text here' }\n",{"type":50,"tag":1129,"props":3042,"children":3044},{"id":3043},"audio-classification",[3045],{"type":56,"value":3046},"Audio Classification",{"type":50,"tag":120,"props":3048,"children":3050},{"className":162,"code":3049,"language":24,"meta":125,"style":125},"const classifier = await pipeline('audio-classification');\nconst result = await classifier('audio.wav');\n",[3051],{"type":50,"tag":128,"props":3052,"children":3053},{"__ignoreMap":125},[3054,3101],{"type":50,"tag":132,"props":3055,"children":3056},{"class":134,"line":135},[3057,3061,3065,3069,3073,3077,3081,3085,3089,3093,3097],{"type":50,"tag":132,"props":3058,"children":3059},{"style":185},[3060],{"type":56,"value":359},{"type":50,"tag":132,"props":3062,"children":3063},{"style":219},[3064],{"type":56,"value":1153},{"type":50,"tag":132,"props":3066,"children":3067},{"style":173},[3068],{"type":56,"value":193},{"type":50,"tag":132,"props":3070,"children":3071},{"style":289},[3072],{"type":56,"value":373},{"type":50,"tag":132,"props":3074,"children":3075},{"style":376},[3076],{"type":56,"value":302},{"type":50,"tag":132,"props":3078,"children":3079},{"style":219},[3080],{"type":56,"value":383},{"type":50,"tag":132,"props":3082,"children":3083},{"style":173},[3084],{"type":56,"value":327},{"type":50,"tag":132,"props":3086,"children":3087},{"style":145},[3088],{"type":56,"value":3043},{"type":50,"tag":132,"props":3090,"children":3091},{"style":173},[3092],{"type":56,"value":327},{"type":50,"tag":132,"props":3094,"children":3095},{"style":219},[3096],{"type":56,"value":401},{"type":50,"tag":132,"props":3098,"children":3099},{"style":173},[3100],{"type":56,"value":332},{"type":50,"tag":132,"props":3102,"children":3103},{"class":134,"line":215},[3104,3108,3112,3116,3120,3124,3128,3132,3136,3140,3144],{"type":50,"tag":132,"props":3105,"children":3106},{"style":185},[3107],{"type":56,"value":359},{"type":50,"tag":132,"props":3109,"children":3110},{"style":219},[3111],{"type":56,"value":435},{"type":50,"tag":132,"props":3113,"children":3114},{"style":173},[3115],{"type":56,"value":193},{"type":50,"tag":132,"props":3117,"children":3118},{"style":289},[3119],{"type":56,"value":373},{"type":50,"tag":132,"props":3121,"children":3122},{"style":376},[3123],{"type":56,"value":513},{"type":50,"tag":132,"props":3125,"children":3126},{"style":219},[3127],{"type":56,"value":383},{"type":50,"tag":132,"props":3129,"children":3130},{"style":173},[3131],{"type":56,"value":327},{"type":50,"tag":132,"props":3133,"children":3134},{"style":145},[3135],{"type":56,"value":3020},{"type":50,"tag":132,"props":3137,"children":3138},{"style":173},[3139],{"type":56,"value":327},{"type":50,"tag":132,"props":3141,"children":3142},{"style":219},[3143],{"type":56,"value":401},{"type":50,"tag":132,"props":3145,"children":3146},{"style":173},[3147],{"type":56,"value":332},{"type":50,"tag":1129,"props":3149,"children":3151},{"id":3150},"text-to-speech",[3152],{"type":56,"value":3153},"Text-to-Speech",{"type":50,"tag":120,"props":3155,"children":3157},{"className":162,"code":3156,"language":24,"meta":125,"style":125},"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",[3158],{"type":50,"tag":128,"props":3159,"children":3160},{"__ignoreMap":125},[3161,3226,3276,3293],{"type":50,"tag":132,"props":3162,"children":3163},{"class":134,"line":135},[3164,3168,3173,3177,3181,3185,3189,3193,3197,3201,3205,3209,3214,3218,3222],{"type":50,"tag":132,"props":3165,"children":3166},{"style":185},[3167],{"type":56,"value":359},{"type":50,"tag":132,"props":3169,"children":3170},{"style":219},[3171],{"type":56,"value":3172}," synthesizer ",{"type":50,"tag":132,"props":3174,"children":3175},{"style":173},[3176],{"type":56,"value":193},{"type":50,"tag":132,"props":3178,"children":3179},{"style":289},[3180],{"type":56,"value":373},{"type":50,"tag":132,"props":3182,"children":3183},{"style":376},[3184],{"type":56,"value":302},{"type":50,"tag":132,"props":3186,"children":3187},{"style":219},[3188],{"type":56,"value":383},{"type":50,"tag":132,"props":3190,"children":3191},{"style":173},[3192],{"type":56,"value":327},{"type":50,"tag":132,"props":3194,"children":3195},{"style":145},[3196],{"type":56,"value":3150},{"type":50,"tag":132,"props":3198,"children":3199},{"style":173},[3200],{"type":56,"value":327},{"type":50,"tag":132,"props":3202,"children":3203},{"style":173},[3204],{"type":56,"value":822},{"type":50,"tag":132,"props":3206,"children":3207},{"style":173},[3208],{"type":56,"value":317},{"type":50,"tag":132,"props":3210,"children":3211},{"style":145},[3212],{"type":56,"value":3213},"Xenova\u002Fspeecht5_tts",{"type":50,"tag":132,"props":3215,"children":3216},{"style":173},[3217],{"type":56,"value":327},{"type":50,"tag":132,"props":3219,"children":3220},{"style":219},[3221],{"type":56,"value":401},{"type":50,"tag":132,"props":3223,"children":3224},{"style":173},[3225],{"type":56,"value":332},{"type":50,"tag":132,"props":3227,"children":3228},{"class":134,"line":215},[3229,3233,3238,3242,3246,3251,3255,3259,3264,3268,3272],{"type":50,"tag":132,"props":3230,"children":3231},{"style":185},[3232],{"type":56,"value":359},{"type":50,"tag":132,"props":3234,"children":3235},{"style":219},[3236],{"type":56,"value":3237}," audio ",{"type":50,"tag":132,"props":3239,"children":3240},{"style":173},[3241],{"type":56,"value":193},{"type":50,"tag":132,"props":3243,"children":3244},{"style":289},[3245],{"type":56,"value":373},{"type":50,"tag":132,"props":3247,"children":3248},{"style":376},[3249],{"type":56,"value":3250}," synthesizer",{"type":50,"tag":132,"props":3252,"children":3253},{"style":219},[3254],{"type":56,"value":383},{"type":50,"tag":132,"props":3256,"children":3257},{"style":173},[3258],{"type":56,"value":327},{"type":50,"tag":132,"props":3260,"children":3261},{"style":145},[3262],{"type":56,"value":3263},"Hello, this is a test.",{"type":50,"tag":132,"props":3265,"children":3266},{"style":173},[3267],{"type":56,"value":327},{"type":50,"tag":132,"props":3269,"children":3270},{"style":173},[3271],{"type":56,"value":822},{"type":50,"tag":132,"props":3273,"children":3274},{"style":173},[3275],{"type":56,"value":922},{"type":50,"tag":132,"props":3277,"children":3278},{"class":134,"line":245},[3279,3284,3288],{"type":50,"tag":132,"props":3280,"children":3281},{"style":179},[3282],{"type":56,"value":3283},"  speaker_embeddings",{"type":50,"tag":132,"props":3285,"children":3286},{"style":173},[3287],{"type":56,"value":935},{"type":50,"tag":132,"props":3289,"children":3290},{"style":219},[3291],{"type":56,"value":3292}," speakerEmbeddings\n",{"type":50,"tag":132,"props":3294,"children":3295},{"class":134,"line":353},[3296,3300,3304],{"type":50,"tag":132,"props":3297,"children":3298},{"style":173},[3299],{"type":56,"value":237},{"type":50,"tag":132,"props":3301,"children":3302},{"style":219},[3303],{"type":56,"value":401},{"type":50,"tag":132,"props":3305,"children":3306},{"style":173},[3307],{"type":56,"value":332},{"type":50,"tag":113,"props":3309,"children":3311},{"id":3310},"multimodal",[3312],{"type":56,"value":3313},"Multimodal",{"type":50,"tag":1129,"props":3315,"children":3317},{"id":3316},"image-to-text-image-captioning",[3318],{"type":56,"value":3319},"Image-to-Text (Image Captioning)",{"type":50,"tag":120,"props":3321,"children":3323},{"className":162,"code":3322,"language":24,"meta":125,"style":125},"const captioner = await pipeline('image-to-text');\nconst caption = await captioner('image.jpg');\n",[3324],{"type":50,"tag":128,"props":3325,"children":3326},{"__ignoreMap":125},[3327,3376],{"type":50,"tag":132,"props":3328,"children":3329},{"class":134,"line":135},[3330,3334,3339,3343,3347,3351,3355,3359,3364,3368,3372],{"type":50,"tag":132,"props":3331,"children":3332},{"style":185},[3333],{"type":56,"value":359},{"type":50,"tag":132,"props":3335,"children":3336},{"style":219},[3337],{"type":56,"value":3338}," captioner ",{"type":50,"tag":132,"props":3340,"children":3341},{"style":173},[3342],{"type":56,"value":193},{"type":50,"tag":132,"props":3344,"children":3345},{"style":289},[3346],{"type":56,"value":373},{"type":50,"tag":132,"props":3348,"children":3349},{"style":376},[3350],{"type":56,"value":302},{"type":50,"tag":132,"props":3352,"children":3353},{"style":219},[3354],{"type":56,"value":383},{"type":50,"tag":132,"props":3356,"children":3357},{"style":173},[3358],{"type":56,"value":327},{"type":50,"tag":132,"props":3360,"children":3361},{"style":145},[3362],{"type":56,"value":3363},"image-to-text",{"type":50,"tag":132,"props":3365,"children":3366},{"style":173},[3367],{"type":56,"value":327},{"type":50,"tag":132,"props":3369,"children":3370},{"style":219},[3371],{"type":56,"value":401},{"type":50,"tag":132,"props":3373,"children":3374},{"style":173},[3375],{"type":56,"value":332},{"type":50,"tag":132,"props":3377,"children":3378},{"class":134,"line":215},[3379,3383,3388,3392,3396,3401,3405,3409,3413,3417,3421],{"type":50,"tag":132,"props":3380,"children":3381},{"style":185},[3382],{"type":56,"value":359},{"type":50,"tag":132,"props":3384,"children":3385},{"style":219},[3386],{"type":56,"value":3387}," caption ",{"type":50,"tag":132,"props":3389,"children":3390},{"style":173},[3391],{"type":56,"value":193},{"type":50,"tag":132,"props":3393,"children":3394},{"style":289},[3395],{"type":56,"value":373},{"type":50,"tag":132,"props":3397,"children":3398},{"style":376},[3399],{"type":56,"value":3400}," captioner",{"type":50,"tag":132,"props":3402,"children":3403},{"style":219},[3404],{"type":56,"value":383},{"type":50,"tag":132,"props":3406,"children":3407},{"style":173},[3408],{"type":56,"value":327},{"type":50,"tag":132,"props":3410,"children":3411},{"style":145},[3412],{"type":56,"value":2849},{"type":50,"tag":132,"props":3414,"children":3415},{"style":173},[3416],{"type":56,"value":327},{"type":50,"tag":132,"props":3418,"children":3419},{"style":219},[3420],{"type":56,"value":401},{"type":50,"tag":132,"props":3422,"children":3423},{"style":173},[3424],{"type":56,"value":332},{"type":50,"tag":1129,"props":3426,"children":3428},{"id":3427},"document-question-answering",[3429],{"type":56,"value":3430},"Document Question Answering",{"type":50,"tag":120,"props":3432,"children":3434},{"className":162,"code":3433,"language":24,"meta":125,"style":125},"const docQA = await pipeline('document-question-answering');\nconst answer = await docQA('document-image.jpg', 'What is the total amount?');\n",[3435],{"type":50,"tag":128,"props":3436,"children":3437},{"__ignoreMap":125},[3438,3486],{"type":50,"tag":132,"props":3439,"children":3440},{"class":134,"line":135},[3441,3445,3450,3454,3458,3462,3466,3470,3474,3478,3482],{"type":50,"tag":132,"props":3442,"children":3443},{"style":185},[3444],{"type":56,"value":359},{"type":50,"tag":132,"props":3446,"children":3447},{"style":219},[3448],{"type":56,"value":3449}," docQA ",{"type":50,"tag":132,"props":3451,"children":3452},{"style":173},[3453],{"type":56,"value":193},{"type":50,"tag":132,"props":3455,"children":3456},{"style":289},[3457],{"type":56,"value":373},{"type":50,"tag":132,"props":3459,"children":3460},{"style":376},[3461],{"type":56,"value":302},{"type":50,"tag":132,"props":3463,"children":3464},{"style":219},[3465],{"type":56,"value":383},{"type":50,"tag":132,"props":3467,"children":3468},{"style":173},[3469],{"type":56,"value":327},{"type":50,"tag":132,"props":3471,"children":3472},{"style":145},[3473],{"type":56,"value":3427},{"type":50,"tag":132,"props":3475,"children":3476},{"style":173},[3477],{"type":56,"value":327},{"type":50,"tag":132,"props":3479,"children":3480},{"style":219},[3481],{"type":56,"value":401},{"type":50,"tag":132,"props":3483,"children":3484},{"style":173},[3485],{"type":56,"value":332},{"type":50,"tag":132,"props":3487,"children":3488},{"class":134,"line":215},[3489,3493,3497,3501,3505,3510,3514,3518,3523,3527,3531,3535,3540,3544,3548],{"type":50,"tag":132,"props":3490,"children":3491},{"style":185},[3492],{"type":56,"value":359},{"type":50,"tag":132,"props":3494,"children":3495},{"style":219},[3496],{"type":56,"value":1422},{"type":50,"tag":132,"props":3498,"children":3499},{"style":173},[3500],{"type":56,"value":193},{"type":50,"tag":132,"props":3502,"children":3503},{"style":289},[3504],{"type":56,"value":373},{"type":50,"tag":132,"props":3506,"children":3507},{"style":376},[3508],{"type":56,"value":3509}," docQA",{"type":50,"tag":132,"props":3511,"children":3512},{"style":219},[3513],{"type":56,"value":383},{"type":50,"tag":132,"props":3515,"children":3516},{"style":173},[3517],{"type":56,"value":327},{"type":50,"tag":132,"props":3519,"children":3520},{"style":145},[3521],{"type":56,"value":3522},"document-image.jpg",{"type":50,"tag":132,"props":3524,"children":3525},{"style":173},[3526],{"type":56,"value":327},{"type":50,"tag":132,"props":3528,"children":3529},{"style":173},[3530],{"type":56,"value":822},{"type":50,"tag":132,"props":3532,"children":3533},{"style":173},[3534],{"type":56,"value":317},{"type":50,"tag":132,"props":3536,"children":3537},{"style":145},[3538],{"type":56,"value":3539},"What is the total amount?",{"type":50,"tag":132,"props":3541,"children":3542},{"style":173},[3543],{"type":56,"value":327},{"type":50,"tag":132,"props":3545,"children":3546},{"style":219},[3547],{"type":56,"value":401},{"type":50,"tag":132,"props":3549,"children":3550},{"style":173},[3551],{"type":56,"value":332},{"type":50,"tag":1129,"props":3553,"children":3555},{"id":3554},"zero-shot-object-detection",[3556],{"type":56,"value":3557},"Zero-Shot Object Detection",{"type":50,"tag":120,"props":3559,"children":3561},{"className":162,"code":3560,"language":24,"meta":125,"style":125},"const detector = await pipeline('zero-shot-object-detection');\nconst objects = await detector('image.jpg', ['person', 'car', 'tree']);\n",[3562],{"type":50,"tag":128,"props":3563,"children":3564},{"__ignoreMap":125},[3565,3612],{"type":50,"tag":132,"props":3566,"children":3567},{"class":134,"line":135},[3568,3572,3576,3580,3584,3588,3592,3596,3600,3604,3608],{"type":50,"tag":132,"props":3569,"children":3570},{"style":185},[3571],{"type":56,"value":359},{"type":50,"tag":132,"props":3573,"children":3574},{"style":219},[3575],{"type":56,"value":2440},{"type":50,"tag":132,"props":3577,"children":3578},{"style":173},[3579],{"type":56,"value":193},{"type":50,"tag":132,"props":3581,"children":3582},{"style":289},[3583],{"type":56,"value":373},{"type":50,"tag":132,"props":3585,"children":3586},{"style":376},[3587],{"type":56,"value":302},{"type":50,"tag":132,"props":3589,"children":3590},{"style":219},[3591],{"type":56,"value":383},{"type":50,"tag":132,"props":3593,"children":3594},{"style":173},[3595],{"type":56,"value":327},{"type":50,"tag":132,"props":3597,"children":3598},{"style":145},[3599],{"type":56,"value":3554},{"type":50,"tag":132,"props":3601,"children":3602},{"style":173},[3603],{"type":56,"value":327},{"type":50,"tag":132,"props":3605,"children":3606},{"style":219},[3607],{"type":56,"value":401},{"type":50,"tag":132,"props":3609,"children":3610},{"style":173},[3611],{"type":56,"value":332},{"type":50,"tag":132,"props":3613,"children":3614},{"class":134,"line":215},[3615,3619,3623,3627,3631,3635,3639,3643,3647,3651,3655,3659,3663,3668,3672,3676,3680,3685,3689,3693,3697,3702,3706,3710],{"type":50,"tag":132,"props":3616,"children":3617},{"style":185},[3618],{"type":56,"value":359},{"type":50,"tag":132,"props":3620,"children":3621},{"style":219},[3622],{"type":56,"value":2488},{"type":50,"tag":132,"props":3624,"children":3625},{"style":173},[3626],{"type":56,"value":193},{"type":50,"tag":132,"props":3628,"children":3629},{"style":289},[3630],{"type":56,"value":373},{"type":50,"tag":132,"props":3632,"children":3633},{"style":376},[3634],{"type":56,"value":2501},{"type":50,"tag":132,"props":3636,"children":3637},{"style":219},[3638],{"type":56,"value":383},{"type":50,"tag":132,"props":3640,"children":3641},{"style":173},[3642],{"type":56,"value":327},{"type":50,"tag":132,"props":3644,"children":3645},{"style":145},[3646],{"type":56,"value":2849},{"type":50,"tag":132,"props":3648,"children":3649},{"style":173},[3650],{"type":56,"value":327},{"type":50,"tag":132,"props":3652,"children":3653},{"style":173},[3654],{"type":56,"value":822},{"type":50,"tag":132,"props":3656,"children":3657},{"style":219},[3658],{"type":56,"value":2207},{"type":50,"tag":132,"props":3660,"children":3661},{"style":173},[3662],{"type":56,"value":327},{"type":50,"tag":132,"props":3664,"children":3665},{"style":145},[3666],{"type":56,"value":3667},"person",{"type":50,"tag":132,"props":3669,"children":3670},{"style":173},[3671],{"type":56,"value":327},{"type":50,"tag":132,"props":3673,"children":3674},{"style":173},[3675],{"type":56,"value":822},{"type":50,"tag":132,"props":3677,"children":3678},{"style":173},[3679],{"type":56,"value":317},{"type":50,"tag":132,"props":3681,"children":3682},{"style":145},[3683],{"type":56,"value":3684},"car",{"type":50,"tag":132,"props":3686,"children":3687},{"style":173},[3688],{"type":56,"value":327},{"type":50,"tag":132,"props":3690,"children":3691},{"style":173},[3692],{"type":56,"value":822},{"type":50,"tag":132,"props":3694,"children":3695},{"style":173},[3696],{"type":56,"value":317},{"type":50,"tag":132,"props":3698,"children":3699},{"style":145},[3700],{"type":56,"value":3701},"tree",{"type":50,"tag":132,"props":3703,"children":3704},{"style":173},[3705],{"type":56,"value":327},{"type":50,"tag":132,"props":3707,"children":3708},{"style":219},[3709],{"type":56,"value":2259},{"type":50,"tag":132,"props":3711,"children":3712},{"style":173},[3713],{"type":56,"value":332},{"type":50,"tag":113,"props":3715,"children":3717},{"id":3716},"feature-extraction-embeddings",[3718],{"type":56,"value":3719},"Feature Extraction (Embeddings)",{"type":50,"tag":120,"props":3721,"children":3723},{"className":162,"code":3722,"language":24,"meta":125,"style":125},"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",[3724],{"type":50,"tag":128,"props":3725,"children":3726},{"__ignoreMap":125},[3727,3776,3826,3834,3841,3849,3913],{"type":50,"tag":132,"props":3728,"children":3729},{"class":134,"line":135},[3730,3734,3739,3743,3747,3751,3755,3759,3764,3768,3772],{"type":50,"tag":132,"props":3731,"children":3732},{"style":185},[3733],{"type":56,"value":359},{"type":50,"tag":132,"props":3735,"children":3736},{"style":219},[3737],{"type":56,"value":3738}," extractor ",{"type":50,"tag":132,"props":3740,"children":3741},{"style":173},[3742],{"type":56,"value":193},{"type":50,"tag":132,"props":3744,"children":3745},{"style":289},[3746],{"type":56,"value":373},{"type":50,"tag":132,"props":3748,"children":3749},{"style":376},[3750],{"type":56,"value":302},{"type":50,"tag":132,"props":3752,"children":3753},{"style":219},[3754],{"type":56,"value":383},{"type":50,"tag":132,"props":3756,"children":3757},{"style":173},[3758],{"type":56,"value":327},{"type":50,"tag":132,"props":3760,"children":3761},{"style":145},[3762],{"type":56,"value":3763},"feature-extraction",{"type":50,"tag":132,"props":3765,"children":3766},{"style":173},[3767],{"type":56,"value":327},{"type":50,"tag":132,"props":3769,"children":3770},{"style":219},[3771],{"type":56,"value":401},{"type":50,"tag":132,"props":3773,"children":3774},{"style":173},[3775],{"type":56,"value":332},{"type":50,"tag":132,"props":3777,"children":3778},{"class":134,"line":215},[3779,3783,3788,3792,3796,3801,3805,3809,3814,3818,3822],{"type":50,"tag":132,"props":3780,"children":3781},{"style":185},[3782],{"type":56,"value":359},{"type":50,"tag":132,"props":3784,"children":3785},{"style":219},[3786],{"type":56,"value":3787}," embeddings ",{"type":50,"tag":132,"props":3789,"children":3790},{"style":173},[3791],{"type":56,"value":193},{"type":50,"tag":132,"props":3793,"children":3794},{"style":289},[3795],{"type":56,"value":373},{"type":50,"tag":132,"props":3797,"children":3798},{"style":376},[3799],{"type":56,"value":3800}," extractor",{"type":50,"tag":132,"props":3802,"children":3803},{"style":219},[3804],{"type":56,"value":383},{"type":50,"tag":132,"props":3806,"children":3807},{"style":173},[3808],{"type":56,"value":327},{"type":50,"tag":132,"props":3810,"children":3811},{"style":145},[3812],{"type":56,"value":3813},"This is a sentence to embed.",{"type":50,"tag":132,"props":3815,"children":3816},{"style":173},[3817],{"type":56,"value":327},{"type":50,"tag":132,"props":3819,"children":3820},{"style":219},[3821],{"type":56,"value":401},{"type":50,"tag":132,"props":3823,"children":3824},{"style":173},[3825],{"type":56,"value":332},{"type":50,"tag":132,"props":3827,"children":3828},{"class":134,"line":245},[3829],{"type":50,"tag":132,"props":3830,"children":3831},{"style":347},[3832],{"type":56,"value":3833},"\u002F\u002F Returns: tensor of shape [1, sequence_length, hidden_size]\n",{"type":50,"tag":132,"props":3835,"children":3836},{"class":134,"line":353},[3837],{"type":50,"tag":132,"props":3838,"children":3839},{"emptyLinePlaceholder":338},[3840],{"type":56,"value":341},{"type":50,"tag":132,"props":3842,"children":3843},{"class":134,"line":408},[3844],{"type":50,"tag":132,"props":3845,"children":3846},{"style":347},[3847],{"type":56,"value":3848},"\u002F\u002F For sentence embeddings (mean pooling)\n",{"type":50,"tag":132,"props":3850,"children":3851},{"class":134,"line":416},[3852,3856,3860,3864,3868,3872,3876,3880,3884,3888,3892,3896,3901,3905,3909],{"type":50,"tag":132,"props":3853,"children":3854},{"style":185},[3855],{"type":56,"value":359},{"type":50,"tag":132,"props":3857,"children":3858},{"style":219},[3859],{"type":56,"value":3738},{"type":50,"tag":132,"props":3861,"children":3862},{"style":173},[3863],{"type":56,"value":193},{"type":50,"tag":132,"props":3865,"children":3866},{"style":289},[3867],{"type":56,"value":373},{"type":50,"tag":132,"props":3869,"children":3870},{"style":376},[3871],{"type":56,"value":302},{"type":50,"tag":132,"props":3873,"children":3874},{"style":219},[3875],{"type":56,"value":383},{"type":50,"tag":132,"props":3877,"children":3878},{"style":173},[3879],{"type":56,"value":327},{"type":50,"tag":132,"props":3881,"children":3882},{"style":145},[3883],{"type":56,"value":3763},{"type":50,"tag":132,"props":3885,"children":3886},{"style":173},[3887],{"type":56,"value":327},{"type":50,"tag":132,"props":3889,"children":3890},{"style":173},[3891],{"type":56,"value":822},{"type":50,"tag":132,"props":3893,"children":3894},{"style":173},[3895],{"type":56,"value":317},{"type":50,"tag":132,"props":3897,"children":3898},{"style":145},[3899],{"type":56,"value":3900},"onnx-community\u002Fall-MiniLM-L6-v2-ONNX",{"type":50,"tag":132,"props":3902,"children":3903},{"style":173},[3904],{"type":56,"value":327},{"type":50,"tag":132,"props":3906,"children":3907},{"style":219},[3908],{"type":56,"value":401},{"type":50,"tag":132,"props":3910,"children":3911},{"style":173},[3912],{"type":56,"value":332},{"type":50,"tag":132,"props":3914,"children":3915},{"class":134,"line":425},[3916,3920,3924,3928,3932,3936,3940,3944,3949,3953,3957,3961,3966,3970,3974,3979,3983,3987,3992,3996,4002,4006,4010],{"type":50,"tag":132,"props":3917,"children":3918},{"style":185},[3919],{"type":56,"value":359},{"type":50,"tag":132,"props":3921,"children":3922},{"style":219},[3923],{"type":56,"value":3787},{"type":50,"tag":132,"props":3925,"children":3926},{"style":173},[3927],{"type":56,"value":193},{"type":50,"tag":132,"props":3929,"children":3930},{"style":289},[3931],{"type":56,"value":373},{"type":50,"tag":132,"props":3933,"children":3934},{"style":376},[3935],{"type":56,"value":3800},{"type":50,"tag":132,"props":3937,"children":3938},{"style":219},[3939],{"type":56,"value":383},{"type":50,"tag":132,"props":3941,"children":3942},{"style":173},[3943],{"type":56,"value":327},{"type":50,"tag":132,"props":3945,"children":3946},{"style":145},[3947],{"type":56,"value":3948},"Text to embed",{"type":50,"tag":132,"props":3950,"children":3951},{"style":173},[3952],{"type":56,"value":327},{"type":50,"tag":132,"props":3954,"children":3955},{"style":173},[3956],{"type":56,"value":822},{"type":50,"tag":132,"props":3958,"children":3959},{"style":173},[3960],{"type":56,"value":297},{"type":50,"tag":132,"props":3962,"children":3963},{"style":179},[3964],{"type":56,"value":3965}," pooling",{"type":50,"tag":132,"props":3967,"children":3968},{"style":173},[3969],{"type":56,"value":935},{"type":50,"tag":132,"props":3971,"children":3972},{"style":173},[3973],{"type":56,"value":317},{"type":50,"tag":132,"props":3975,"children":3976},{"style":145},[3977],{"type":56,"value":3978},"mean",{"type":50,"tag":132,"props":3980,"children":3981},{"style":173},[3982],{"type":56,"value":327},{"type":50,"tag":132,"props":3984,"children":3985},{"style":173},[3986],{"type":56,"value":822},{"type":50,"tag":132,"props":3988,"children":3989},{"style":179},[3990],{"type":56,"value":3991}," normalize",{"type":50,"tag":132,"props":3993,"children":3994},{"style":173},[3995],{"type":56,"value":935},{"type":50,"tag":132,"props":3997,"children":3999},{"style":3998},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4000],{"type":56,"value":4001}," true",{"type":50,"tag":132,"props":4003,"children":4004},{"style":173},[4005],{"type":56,"value":307},{"type":50,"tag":132,"props":4007,"children":4008},{"style":219},[4009],{"type":56,"value":401},{"type":50,"tag":132,"props":4011,"children":4012},{"style":173},[4013],{"type":56,"value":332},{"type":50,"tag":65,"props":4015,"children":4017},{"id":4016},"finding-and-choosing-models",[4018],{"type":56,"value":4019},"Finding and Choosing Models",{"type":50,"tag":113,"props":4021,"children":4023},{"id":4022},"browsing-the-hugging-face-hub",[4024],{"type":56,"value":4025},"Browsing the Hugging Face Hub",{"type":50,"tag":59,"props":4027,"children":4028},{},[4029],{"type":56,"value":4030},"Discover compatible Transformers.js models on Hugging Face Hub:",{"type":50,"tag":59,"props":4032,"children":4033},{},[4034],{"type":50,"tag":537,"props":4035,"children":4036},{},[4037],{"type":56,"value":4038},"Base URL (all models):",{"type":50,"tag":120,"props":4040,"children":4044},{"className":4041,"code":4043,"language":56},[4042],"language-text","https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js&sort=trending\n",[4045],{"type":50,"tag":128,"props":4046,"children":4047},{"__ignoreMap":125},[4048],{"type":56,"value":4043},{"type":50,"tag":59,"props":4050,"children":4051},{},[4052,4057,4059,4064],{"type":50,"tag":537,"props":4053,"children":4054},{},[4055],{"type":56,"value":4056},"Filter by task",{"type":56,"value":4058}," using the ",{"type":50,"tag":128,"props":4060,"children":4062},{"className":4061},[],[4063],{"type":56,"value":704},{"type":56,"value":4065}," parameter:",{"type":50,"tag":4067,"props":4068,"children":4069},"table",{},[4070,4089],{"type":50,"tag":4071,"props":4072,"children":4073},"thead",{},[4074],{"type":50,"tag":4075,"props":4076,"children":4077},"tr",{},[4078,4084],{"type":50,"tag":4079,"props":4080,"children":4081},"th",{},[4082],{"type":56,"value":4083},"Task",{"type":50,"tag":4079,"props":4085,"children":4086},{},[4087],{"type":56,"value":4088},"URL",{"type":50,"tag":4090,"props":4091,"children":4092},"tbody",{},[4093,4112,4131,4150,4169,4188,4206,4225,4244,4263,4282,4302,4322],{"type":50,"tag":4075,"props":4094,"children":4095},{},[4096,4104],{"type":50,"tag":4097,"props":4098,"children":4099},"td",{},[4100],{"type":50,"tag":537,"props":4101,"children":4102},{},[4103],{"type":56,"value":1519},{"type":50,"tag":4097,"props":4105,"children":4106},{},[4107],{"type":50,"tag":553,"props":4108,"children":4110},{"href":717,"rel":4109},[686],[4111],{"type":56,"value":717},{"type":50,"tag":4075,"props":4113,"children":4114},{},[4115,4122],{"type":50,"tag":4097,"props":4116,"children":4117},{},[4118],{"type":50,"tag":537,"props":4119,"children":4120},{},[4121],{"type":56,"value":1134},{"type":50,"tag":4097,"props":4123,"children":4124},{},[4125],{"type":50,"tag":553,"props":4126,"children":4129},{"href":4127,"rel":4128},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-classification&library=transformers.js&sort=trending",[686],[4130],{"type":56,"value":4127},{"type":50,"tag":4075,"props":4132,"children":4133},{},[4134,4141],{"type":50,"tag":4097,"props":4135,"children":4136},{},[4137],{"type":50,"tag":537,"props":4138,"children":4139},{},[4140],{"type":56,"value":1756},{"type":50,"tag":4097,"props":4142,"children":4143},{},[4144],{"type":50,"tag":553,"props":4145,"children":4148},{"href":4146,"rel":4147},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=translation&library=transformers.js&sort=trending",[686],[4149],{"type":56,"value":4146},{"type":50,"tag":4075,"props":4151,"children":4152},{},[4153,4160],{"type":50,"tag":4097,"props":4154,"children":4155},{},[4156],{"type":50,"tag":537,"props":4157,"children":4158},{},[4159],{"type":56,"value":1953},{"type":50,"tag":4097,"props":4161,"children":4162},{},[4163],{"type":50,"tag":553,"props":4164,"children":4167},{"href":4165,"rel":4166},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=summarization&library=transformers.js&sort=trending",[686],[4168],{"type":56,"value":4165},{"type":50,"tag":4075,"props":4170,"children":4171},{},[4172,4179],{"type":50,"tag":4097,"props":4173,"children":4174},{},[4175],{"type":50,"tag":537,"props":4176,"children":4177},{},[4178],{"type":56,"value":1355},{"type":50,"tag":4097,"props":4180,"children":4181},{},[4182],{"type":50,"tag":553,"props":4183,"children":4186},{"href":4184,"rel":4185},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=question-answering&library=transformers.js&sort=trending",[686],[4187],{"type":56,"value":4184},{"type":50,"tag":4075,"props":4189,"children":4190},{},[4191,4198],{"type":50,"tag":4097,"props":4192,"children":4193},{},[4194],{"type":50,"tag":537,"props":4195,"children":4196},{},[4197],{"type":56,"value":2273},{"type":50,"tag":4097,"props":4199,"children":4200},{},[4201],{"type":50,"tag":553,"props":4202,"children":4204},{"href":728,"rel":4203},[686],[4205],{"type":56,"value":728},{"type":50,"tag":4075,"props":4207,"children":4208},{},[4209,4216],{"type":50,"tag":4097,"props":4210,"children":4211},{},[4212],{"type":50,"tag":537,"props":4213,"children":4214},{},[4215],{"type":56,"value":2421},{"type":50,"tag":4097,"props":4217,"children":4218},{},[4219],{"type":50,"tag":553,"props":4220,"children":4223},{"href":4221,"rel":4222},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=object-detection&library=transformers.js&sort=trending",[686],[4224],{"type":56,"value":4221},{"type":50,"tag":4075,"props":4226,"children":4227},{},[4228,4235],{"type":50,"tag":4097,"props":4229,"children":4230},{},[4231],{"type":50,"tag":537,"props":4232,"children":4233},{},[4234],{"type":56,"value":2539},{"type":50,"tag":4097,"props":4236,"children":4237},{},[4238],{"type":50,"tag":553,"props":4239,"children":4242},{"href":4240,"rel":4241},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-segmentation&library=transformers.js&sort=trending",[686],[4243],{"type":56,"value":4240},{"type":50,"tag":4075,"props":4245,"children":4246},{},[4247,4255],{"type":50,"tag":4097,"props":4248,"children":4249},{},[4250],{"type":50,"tag":537,"props":4251,"children":4252},{},[4253],{"type":56,"value":4254},"Speech Recognition",{"type":50,"tag":4097,"props":4256,"children":4257},{},[4258],{"type":50,"tag":553,"props":4259,"children":4261},{"href":739,"rel":4260},[686],[4262],{"type":56,"value":739},{"type":50,"tag":4075,"props":4264,"children":4265},{},[4266,4273],{"type":50,"tag":4097,"props":4267,"children":4268},{},[4269],{"type":50,"tag":537,"props":4270,"children":4271},{},[4272],{"type":56,"value":3046},{"type":50,"tag":4097,"props":4274,"children":4275},{},[4276],{"type":50,"tag":553,"props":4277,"children":4280},{"href":4278,"rel":4279},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=audio-classification&library=transformers.js&sort=trending",[686],[4281],{"type":56,"value":4278},{"type":50,"tag":4075,"props":4283,"children":4284},{},[4285,4293],{"type":50,"tag":4097,"props":4286,"children":4287},{},[4288],{"type":50,"tag":537,"props":4289,"children":4290},{},[4291],{"type":56,"value":4292},"Image-to-Text",{"type":50,"tag":4097,"props":4294,"children":4295},{},[4296],{"type":50,"tag":553,"props":4297,"children":4300},{"href":4298,"rel":4299},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=image-to-text&library=transformers.js&sort=trending",[686],[4301],{"type":56,"value":4298},{"type":50,"tag":4075,"props":4303,"children":4304},{},[4305,4313],{"type":50,"tag":4097,"props":4306,"children":4307},{},[4308],{"type":50,"tag":537,"props":4309,"children":4310},{},[4311],{"type":56,"value":4312},"Feature Extraction",{"type":50,"tag":4097,"props":4314,"children":4315},{},[4316],{"type":50,"tag":553,"props":4317,"children":4320},{"href":4318,"rel":4319},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=feature-extraction&library=transformers.js&sort=trending",[686],[4321],{"type":56,"value":4318},{"type":50,"tag":4075,"props":4323,"children":4324},{},[4325,4332],{"type":50,"tag":4097,"props":4326,"children":4327},{},[4328],{"type":50,"tag":537,"props":4329,"children":4330},{},[4331],{"type":56,"value":2104},{"type":50,"tag":4097,"props":4333,"children":4334},{},[4335],{"type":50,"tag":553,"props":4336,"children":4339},{"href":4337,"rel":4338},"https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=zero-shot-classification&library=transformers.js&sort=trending",[686],[4340],{"type":56,"value":4337},{"type":50,"tag":59,"props":4342,"children":4343},{},[4344],{"type":50,"tag":537,"props":4345,"children":4346},{},[4347],{"type":56,"value":4348},"Sort options:",{"type":50,"tag":77,"props":4350,"children":4351},{},[4352,4363,4374,4385],{"type":50,"tag":81,"props":4353,"children":4354},{},[4355,4361],{"type":50,"tag":128,"props":4356,"children":4358},{"className":4357},[],[4359],{"type":56,"value":4360},"&sort=trending",{"type":56,"value":4362}," - Most popular recently",{"type":50,"tag":81,"props":4364,"children":4365},{},[4366,4372],{"type":50,"tag":128,"props":4367,"children":4369},{"className":4368},[],[4370],{"type":56,"value":4371},"&sort=downloads",{"type":56,"value":4373}," - Most downloaded overall",{"type":50,"tag":81,"props":4375,"children":4376},{},[4377,4383],{"type":50,"tag":128,"props":4378,"children":4380},{"className":4379},[],[4381],{"type":56,"value":4382},"&sort=likes",{"type":56,"value":4384}," - Most liked by community",{"type":50,"tag":81,"props":4386,"children":4387},{},[4388,4394],{"type":50,"tag":128,"props":4389,"children":4391},{"className":4390},[],[4392],{"type":56,"value":4393},"&sort=modified",{"type":56,"value":4395}," - Recently updated",{"type":50,"tag":113,"props":4397,"children":4399},{"id":4398},"choosing-the-right-model",[4400],{"type":56,"value":4401},"Choosing the Right Model",{"type":50,"tag":59,"props":4403,"children":4404},{},[4405],{"type":56,"value":4406},"Consider these factors when selecting a model:",{"type":50,"tag":59,"props":4408,"children":4409},{},[4410],{"type":50,"tag":537,"props":4411,"children":4412},{},[4413],{"type":56,"value":4414},"1. Model Size",{"type":50,"tag":77,"props":4416,"children":4417},{},[4418,4428,4438],{"type":50,"tag":81,"props":4419,"children":4420},{},[4421,4426],{"type":50,"tag":537,"props":4422,"children":4423},{},[4424],{"type":56,"value":4425},"Small (\u003C 100MB)",{"type":56,"value":4427},": Fast, suitable for browsers, limited accuracy",{"type":50,"tag":81,"props":4429,"children":4430},{},[4431,4436],{"type":50,"tag":537,"props":4432,"children":4433},{},[4434],{"type":56,"value":4435},"Medium (100MB - 500MB)",{"type":56,"value":4437},": Balanced performance, good for most use cases",{"type":50,"tag":81,"props":4439,"children":4440},{},[4441,4446],{"type":50,"tag":537,"props":4442,"children":4443},{},[4444],{"type":56,"value":4445},"Large (> 500MB)",{"type":56,"value":4447},": High accuracy, slower, better for Node.js or powerful devices",{"type":50,"tag":59,"props":4449,"children":4450},{},[4451,4456],{"type":50,"tag":537,"props":4452,"children":4453},{},[4454],{"type":56,"value":4455},"2. Quantization",{"type":56,"value":4457},"\nModels are often available in different quantization levels:",{"type":50,"tag":77,"props":4459,"children":4460},{},[4461,4472,4483,4494],{"type":50,"tag":81,"props":4462,"children":4463},{},[4464,4470],{"type":50,"tag":128,"props":4465,"children":4467},{"className":4466},[],[4468],{"type":56,"value":4469},"fp32",{"type":56,"value":4471}," - Full precision (largest, most accurate)",{"type":50,"tag":81,"props":4473,"children":4474},{},[4475,4481],{"type":50,"tag":128,"props":4476,"children":4478},{"className":4477},[],[4479],{"type":56,"value":4480},"fp16",{"type":56,"value":4482}," - Half precision (smaller, still accurate)",{"type":50,"tag":81,"props":4484,"children":4485},{},[4486,4492],{"type":50,"tag":128,"props":4487,"children":4489},{"className":4488},[],[4490],{"type":56,"value":4491},"q8",{"type":56,"value":4493}," - 8-bit quantized (much smaller, slight accuracy loss)",{"type":50,"tag":81,"props":4495,"children":4496},{},[4497,4502],{"type":50,"tag":128,"props":4498,"children":4500},{"className":4499},[],[4501],{"type":56,"value":1077},{"type":56,"value":4503}," - 4-bit quantized (smallest, noticeable accuracy loss)",{"type":50,"tag":59,"props":4505,"children":4506},{},[4507,4512],{"type":50,"tag":537,"props":4508,"children":4509},{},[4510],{"type":56,"value":4511},"3. Task Compatibility",{"type":56,"value":4513},"\nCheck the model card for:",{"type":50,"tag":77,"props":4515,"children":4516},{},[4517,4522,4527,4532],{"type":50,"tag":81,"props":4518,"children":4519},{},[4520],{"type":56,"value":4521},"Supported tasks (some models support multiple tasks)",{"type":50,"tag":81,"props":4523,"children":4524},{},[4525],{"type":56,"value":4526},"Input\u002Foutput formats",{"type":50,"tag":81,"props":4528,"children":4529},{},[4530],{"type":56,"value":4531},"Language support (multilingual vs. English-only)",{"type":50,"tag":81,"props":4533,"children":4534},{},[4535],{"type":56,"value":4536},"License restrictions",{"type":50,"tag":59,"props":4538,"children":4539},{},[4540,4545],{"type":50,"tag":537,"props":4541,"children":4542},{},[4543],{"type":56,"value":4544},"4. Performance Metrics",{"type":56,"value":4546},"\nModel cards typically show:",{"type":50,"tag":77,"props":4548,"children":4549},{},[4550,4555,4560,4565],{"type":50,"tag":81,"props":4551,"children":4552},{},[4553],{"type":56,"value":4554},"Accuracy scores",{"type":50,"tag":81,"props":4556,"children":4557},{},[4558],{"type":56,"value":4559},"Benchmark results",{"type":50,"tag":81,"props":4561,"children":4562},{},[4563],{"type":56,"value":4564},"Inference speed",{"type":50,"tag":81,"props":4566,"children":4567},{},[4568],{"type":56,"value":4569},"Memory requirements",{"type":50,"tag":113,"props":4571,"children":4573},{"id":4572},"example-finding-a-text-generation-model",[4574],{"type":56,"value":4575},"Example: Finding a Text Generation Model",{"type":50,"tag":120,"props":4577,"children":4579},{"className":162,"code":4578,"language":24,"meta":125,"style":125},"\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",[4580],{"type":50,"tag":128,"props":4581,"children":4582},{"__ignoreMap":125},[4583,4591,4598,4606,4613,4621,4629,4637,4645,4653,4660,4668,4708,4716,4744,4764,4784,4823,4835,4843,4892,4909,4925,4933],{"type":50,"tag":132,"props":4584,"children":4585},{"class":134,"line":135},[4586],{"type":50,"tag":132,"props":4587,"children":4588},{"style":347},[4589],{"type":56,"value":4590},"\u002F\u002F 1. Visit: https:\u002F\u002Fhuggingface.co\u002Fmodels?pipeline_tag=text-generation&library=transformers.js&sort=trending\n",{"type":50,"tag":132,"props":4592,"children":4593},{"class":134,"line":215},[4594],{"type":50,"tag":132,"props":4595,"children":4596},{"emptyLinePlaceholder":338},[4597],{"type":56,"value":341},{"type":50,"tag":132,"props":4599,"children":4600},{"class":134,"line":245},[4601],{"type":50,"tag":132,"props":4602,"children":4603},{"style":347},[4604],{"type":56,"value":4605},"\u002F\u002F 2. Browse and select a model (e.g., onnx-community\u002Fgemma-3-270m-it-ONNX)\n",{"type":50,"tag":132,"props":4607,"children":4608},{"class":134,"line":353},[4609],{"type":50,"tag":132,"props":4610,"children":4611},{"emptyLinePlaceholder":338},[4612],{"type":56,"value":341},{"type":50,"tag":132,"props":4614,"children":4615},{"class":134,"line":408},[4616],{"type":50,"tag":132,"props":4617,"children":4618},{"style":347},[4619],{"type":56,"value":4620},"\u002F\u002F 3. Check model card for:\n",{"type":50,"tag":132,"props":4622,"children":4623},{"class":134,"line":416},[4624],{"type":50,"tag":132,"props":4625,"children":4626},{"style":347},[4627],{"type":56,"value":4628},"\u002F\u002F    - Model size: ~270M parameters\n",{"type":50,"tag":132,"props":4630,"children":4631},{"class":134,"line":425},[4632],{"type":50,"tag":132,"props":4633,"children":4634},{"style":347},[4635],{"type":56,"value":4636},"\u002F\u002F    - Quantization: q4 available\n",{"type":50,"tag":132,"props":4638,"children":4639},{"class":134,"line":476},[4640],{"type":50,"tag":132,"props":4641,"children":4642},{"style":347},[4643],{"type":56,"value":4644},"\u002F\u002F    - Language: English\n",{"type":50,"tag":132,"props":4646,"children":4647},{"class":134,"line":485},[4648],{"type":50,"tag":132,"props":4649,"children":4650},{"style":347},[4651],{"type":56,"value":4652},"\u002F\u002F    - Use case: Instruction-following chat\n",{"type":50,"tag":132,"props":4654,"children":4655},{"class":134,"line":493},[4656],{"type":50,"tag":132,"props":4657,"children":4658},{"emptyLinePlaceholder":338},[4659],{"type":56,"value":341},{"type":50,"tag":132,"props":4661,"children":4662},{"class":134,"line":502},[4663],{"type":50,"tag":132,"props":4664,"children":4665},{"style":347},[4666],{"type":56,"value":4667},"\u002F\u002F 4. Use the model:\n",{"type":50,"tag":132,"props":4669,"children":4671},{"class":134,"line":4670},12,[4672,4676,4680,4684,4688,4692,4696,4700,4704],{"type":50,"tag":132,"props":4673,"children":4674},{"style":289},[4675],{"type":56,"value":292},{"type":50,"tag":132,"props":4677,"children":4678},{"style":173},[4679],{"type":56,"value":297},{"type":50,"tag":132,"props":4681,"children":4682},{"style":219},[4683],{"type":56,"value":302},{"type":50,"tag":132,"props":4685,"children":4686},{"style":173},[4687],{"type":56,"value":307},{"type":50,"tag":132,"props":4689,"children":4690},{"style":289},[4691],{"type":56,"value":312},{"type":50,"tag":132,"props":4693,"children":4694},{"style":173},[4695],{"type":56,"value":317},{"type":50,"tag":132,"props":4697,"children":4698},{"style":145},[4699],{"type":56,"value":322},{"type":50,"tag":132,"props":4701,"children":4702},{"style":173},[4703],{"type":56,"value":327},{"type":50,"tag":132,"props":4705,"children":4706},{"style":173},[4707],{"type":56,"value":332},{"type":50,"tag":132,"props":4709,"children":4711},{"class":134,"line":4710},13,[4712],{"type":50,"tag":132,"props":4713,"children":4714},{"emptyLinePlaceholder":338},[4715],{"type":56,"value":341},{"type":50,"tag":132,"props":4717,"children":4719},{"class":134,"line":4718},14,[4720,4724,4728,4732,4736,4740],{"type":50,"tag":132,"props":4721,"children":4722},{"style":185},[4723],{"type":56,"value":359},{"type":50,"tag":132,"props":4725,"children":4726},{"style":219},[4727],{"type":56,"value":1538},{"type":50,"tag":132,"props":4729,"children":4730},{"style":173},[4731],{"type":56,"value":193},{"type":50,"tag":132,"props":4733,"children":4734},{"style":289},[4735],{"type":56,"value":373},{"type":50,"tag":132,"props":4737,"children":4738},{"style":376},[4739],{"type":56,"value":302},{"type":50,"tag":132,"props":4741,"children":4742},{"style":219},[4743],{"type":56,"value":606},{"type":50,"tag":132,"props":4745,"children":4747},{"class":134,"line":4746},15,[4748,4752,4756,4760],{"type":50,"tag":132,"props":4749,"children":4750},{"style":173},[4751],{"type":56,"value":614},{"type":50,"tag":132,"props":4753,"children":4754},{"style":145},[4755],{"type":56,"value":1516},{"type":50,"tag":132,"props":4757,"children":4758},{"style":173},[4759],{"type":56,"value":327},{"type":50,"tag":132,"props":4761,"children":4762},{"style":173},[4763],{"type":56,"value":627},{"type":50,"tag":132,"props":4765,"children":4767},{"class":134,"line":4766},16,[4768,4772,4776,4780],{"type":50,"tag":132,"props":4769,"children":4770},{"style":173},[4771],{"type":56,"value":614},{"type":50,"tag":132,"props":4773,"children":4774},{"style":145},[4775],{"type":56,"value":1579},{"type":50,"tag":132,"props":4777,"children":4778},{"style":173},[4779],{"type":56,"value":327},{"type":50,"tag":132,"props":4781,"children":4782},{"style":173},[4783],{"type":56,"value":627},{"type":50,"tag":132,"props":4785,"children":4787},{"class":134,"line":4786},17,[4788,4793,4798,4802,4806,4810,4814,4818],{"type":50,"tag":132,"props":4789,"children":4790},{"style":173},[4791],{"type":56,"value":4792},"  {",{"type":50,"tag":132,"props":4794,"children":4795},{"style":179},[4796],{"type":56,"value":4797}," dtype",{"type":50,"tag":132,"props":4799,"children":4800},{"style":173},[4801],{"type":56,"value":935},{"type":50,"tag":132,"props":4803,"children":4804},{"style":173},[4805],{"type":56,"value":317},{"type":50,"tag":132,"props":4807,"children":4808},{"style":145},[4809],{"type":56,"value":1077},{"type":50,"tag":132,"props":4811,"children":4812},{"style":173},[4813],{"type":56,"value":327},{"type":50,"tag":132,"props":4815,"children":4816},{"style":173},[4817],{"type":56,"value":307},{"type":50,"tag":132,"props":4819,"children":4820},{"style":347},[4821],{"type":56,"value":4822}," \u002F\u002F Use quantized version for faster inference\n",{"type":50,"tag":132,"props":4824,"children":4826},{"class":134,"line":4825},18,[4827,4831],{"type":50,"tag":132,"props":4828,"children":4829},{"style":219},[4830],{"type":56,"value":401},{"type":50,"tag":132,"props":4832,"children":4833},{"style":173},[4834],{"type":56,"value":332},{"type":50,"tag":132,"props":4836,"children":4838},{"class":134,"line":4837},19,[4839],{"type":50,"tag":132,"props":4840,"children":4841},{"emptyLinePlaceholder":338},[4842],{"type":56,"value":341},{"type":50,"tag":132,"props":4844,"children":4846},{"class":134,"line":4845},20,[4847,4851,4855,4859,4863,4867,4871,4875,4880,4884,4888],{"type":50,"tag":132,"props":4848,"children":4849},{"style":185},[4850],{"type":56,"value":359},{"type":50,"tag":132,"props":4852,"children":4853},{"style":219},[4854],{"type":56,"value":1840},{"type":50,"tag":132,"props":4856,"children":4857},{"style":173},[4858],{"type":56,"value":193},{"type":50,"tag":132,"props":4860,"children":4861},{"style":289},[4862],{"type":56,"value":373},{"type":50,"tag":132,"props":4864,"children":4865},{"style":376},[4866],{"type":56,"value":1616},{"type":50,"tag":132,"props":4868,"children":4869},{"style":219},[4870],{"type":56,"value":383},{"type":50,"tag":132,"props":4872,"children":4873},{"style":173},[4874],{"type":56,"value":327},{"type":50,"tag":132,"props":4876,"children":4877},{"style":145},[4878],{"type":56,"value":4879},"Explain quantum computing in simple terms.",{"type":50,"tag":132,"props":4881,"children":4882},{"style":173},[4883],{"type":56,"value":327},{"type":50,"tag":132,"props":4885,"children":4886},{"style":173},[4887],{"type":56,"value":822},{"type":50,"tag":132,"props":4889,"children":4890},{"style":173},[4891],{"type":56,"value":922},{"type":50,"tag":132,"props":4893,"children":4895},{"class":134,"line":4894},21,[4896,4900,4904],{"type":50,"tag":132,"props":4897,"children":4898},{"style":179},[4899],{"type":56,"value":1649},{"type":50,"tag":132,"props":4901,"children":4902},{"style":173},[4903],{"type":56,"value":935},{"type":50,"tag":132,"props":4905,"children":4906},{"style":1656},[4907],{"type":56,"value":4908}," 100\n",{"type":50,"tag":132,"props":4910,"children":4912},{"class":134,"line":4911},22,[4913,4917,4921],{"type":50,"tag":132,"props":4914,"children":4915},{"style":173},[4916],{"type":56,"value":237},{"type":50,"tag":132,"props":4918,"children":4919},{"style":219},[4920],{"type":56,"value":401},{"type":50,"tag":132,"props":4922,"children":4923},{"style":173},[4924],{"type":56,"value":332},{"type":50,"tag":132,"props":4926,"children":4928},{"class":134,"line":4927},23,[4929],{"type":50,"tag":132,"props":4930,"children":4931},{"emptyLinePlaceholder":338},[4932],{"type":56,"value":341},{"type":50,"tag":132,"props":4934,"children":4936},{"class":134,"line":4935},24,[4937,4941,4945,4949,4953,4957],{"type":50,"tag":132,"props":4938,"children":4939},{"style":289},[4940],{"type":56,"value":508},{"type":50,"tag":132,"props":4942,"children":4943},{"style":219},[4944],{"type":56,"value":1616},{"type":50,"tag":132,"props":4946,"children":4947},{"style":173},[4948],{"type":56,"value":518},{"type":50,"tag":132,"props":4950,"children":4951},{"style":376},[4952],{"type":56,"value":523},{"type":50,"tag":132,"props":4954,"children":4955},{"style":219},[4956],{"type":56,"value":528},{"type":50,"tag":132,"props":4958,"children":4959},{"style":173},[4960],{"type":56,"value":332},{"type":50,"tag":113,"props":4962,"children":4964},{"id":4963},"tips-for-model-selection",[4965],{"type":56,"value":4966},"Tips for Model Selection",{"type":50,"tag":4968,"props":4969,"children":4970},"ol",{},[4971,4981,4999,5009,5019,5043],{"type":50,"tag":81,"props":4972,"children":4973},{},[4974,4979],{"type":50,"tag":537,"props":4975,"children":4976},{},[4977],{"type":56,"value":4978},"Start Small",{"type":56,"value":4980},": Test with a smaller model first, then upgrade if needed",{"type":50,"tag":81,"props":4982,"children":4983},{},[4984,4989,4991,4997],{"type":50,"tag":537,"props":4985,"children":4986},{},[4987],{"type":56,"value":4988},"Check ONNX Support",{"type":56,"value":4990},": Ensure the model has ONNX files (look for ",{"type":50,"tag":128,"props":4992,"children":4994},{"className":4993},[],[4995],{"type":56,"value":4996},"onnx",{"type":56,"value":4998}," folder in model repo)",{"type":50,"tag":81,"props":5000,"children":5001},{},[5002,5007],{"type":50,"tag":537,"props":5003,"children":5004},{},[5005],{"type":56,"value":5006},"Read Model Cards",{"type":56,"value":5008},": Model cards contain usage examples, limitations, and benchmarks",{"type":50,"tag":81,"props":5010,"children":5011},{},[5012,5017],{"type":50,"tag":537,"props":5013,"children":5014},{},[5015],{"type":56,"value":5016},"Test Locally",{"type":56,"value":5018},": Benchmark inference speed and memory usage in your environment",{"type":50,"tag":81,"props":5020,"children":5021},{},[5022,5027,5029,5035,5037],{"type":50,"tag":537,"props":5023,"children":5024},{},[5025],{"type":56,"value":5026},"Community Models",{"type":56,"value":5028},": Look for models by ",{"type":50,"tag":128,"props":5030,"children":5032},{"className":5031},[],[5033],{"type":56,"value":5034},"Xenova",{"type":56,"value":5036}," (Transformers.js maintainer) or ",{"type":50,"tag":128,"props":5038,"children":5040},{"className":5039},[],[5041],{"type":56,"value":5042},"onnx-community",{"type":50,"tag":81,"props":5044,"children":5045},{},[5046,5051,5053],{"type":50,"tag":537,"props":5047,"children":5048},{},[5049],{"type":56,"value":5050},"Version Pin",{"type":56,"value":5052},": Use specific git commits in production for stability:\n",{"type":50,"tag":120,"props":5054,"children":5056},{"className":162,"code":5055,"language":24,"meta":125,"style":125},"const pipe = await pipeline('task', 'model-id', { revision: 'abc123' });\n",[5057],{"type":50,"tag":128,"props":5058,"children":5059},{"__ignoreMap":125},[5060],{"type":50,"tag":132,"props":5061,"children":5062},{"class":134,"line":135},[5063,5067,5071,5075,5079,5083,5087,5091,5096,5100,5104,5108,5112,5116,5120,5124,5129,5133,5137,5142,5146,5150,5154],{"type":50,"tag":132,"props":5064,"children":5065},{"style":185},[5066],{"type":56,"value":359},{"type":50,"tag":132,"props":5068,"children":5069},{"style":219},[5070],{"type":56,"value":364},{"type":50,"tag":132,"props":5072,"children":5073},{"style":173},[5074],{"type":56,"value":193},{"type":50,"tag":132,"props":5076,"children":5077},{"style":289},[5078],{"type":56,"value":373},{"type":50,"tag":132,"props":5080,"children":5081},{"style":376},[5082],{"type":56,"value":302},{"type":50,"tag":132,"props":5084,"children":5085},{"style":219},[5086],{"type":56,"value":383},{"type":50,"tag":132,"props":5088,"children":5089},{"style":173},[5090],{"type":56,"value":327},{"type":50,"tag":132,"props":5092,"children":5093},{"style":145},[5094],{"type":56,"value":5095},"task",{"type":50,"tag":132,"props":5097,"children":5098},{"style":173},[5099],{"type":56,"value":327},{"type":50,"tag":132,"props":5101,"children":5102},{"style":173},[5103],{"type":56,"value":822},{"type":50,"tag":132,"props":5105,"children":5106},{"style":173},[5107],{"type":56,"value":317},{"type":50,"tag":132,"props":5109,"children":5110},{"style":145},[5111],{"type":56,"value":831},{"type":50,"tag":132,"props":5113,"children":5114},{"style":173},[5115],{"type":56,"value":327},{"type":50,"tag":132,"props":5117,"children":5118},{"style":173},[5119],{"type":56,"value":822},{"type":50,"tag":132,"props":5121,"children":5122},{"style":173},[5123],{"type":56,"value":297},{"type":50,"tag":132,"props":5125,"children":5126},{"style":179},[5127],{"type":56,"value":5128}," revision",{"type":50,"tag":132,"props":5130,"children":5131},{"style":173},[5132],{"type":56,"value":935},{"type":50,"tag":132,"props":5134,"children":5135},{"style":173},[5136],{"type":56,"value":317},{"type":50,"tag":132,"props":5138,"children":5139},{"style":145},[5140],{"type":56,"value":5141},"abc123",{"type":50,"tag":132,"props":5143,"children":5144},{"style":173},[5145],{"type":56,"value":327},{"type":50,"tag":132,"props":5147,"children":5148},{"style":173},[5149],{"type":56,"value":307},{"type":50,"tag":132,"props":5151,"children":5152},{"style":219},[5153],{"type":56,"value":401},{"type":50,"tag":132,"props":5155,"children":5156},{"style":173},[5157],{"type":56,"value":332},{"type":50,"tag":65,"props":5159,"children":5161},{"id":5160},"advanced-configuration",[5162],{"type":56,"value":5163},"Advanced Configuration",{"type":50,"tag":113,"props":5165,"children":5167},{"id":5166},"environment-configuration-env",[5168,5170,5176],{"type":56,"value":5169},"Environment Configuration (",{"type":50,"tag":128,"props":5171,"children":5173},{"className":5172},[],[5174],{"type":56,"value":5175},"env",{"type":56,"value":401},{"type":50,"tag":59,"props":5178,"children":5179},{},[5180,5182,5187],{"type":56,"value":5181},"The ",{"type":50,"tag":128,"props":5183,"children":5185},{"className":5184},[],[5186],{"type":56,"value":5175},{"type":56,"value":5188}," object provides comprehensive control over Transformers.js execution, caching, and model loading.",{"type":50,"tag":59,"props":5190,"children":5191},{},[5192],{"type":50,"tag":537,"props":5193,"children":5194},{},[5195],{"type":56,"value":5196},"Quick Overview:",{"type":50,"tag":120,"props":5198,"children":5200},{"className":162,"code":5199,"language":24,"meta":125,"style":125},"import { env } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F View version\nconsole.log(env.version); \u002F\u002F e.g., '3.8.1'\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",[5201],{"type":50,"tag":128,"props":5202,"children":5203},{"__ignoreMap":125},[5204,5244,5251,5259,5300,5307,5315,5348,5382,5424,5457,5490],{"type":50,"tag":132,"props":5205,"children":5206},{"class":134,"line":135},[5207,5211,5215,5220,5224,5228,5232,5236,5240],{"type":50,"tag":132,"props":5208,"children":5209},{"style":289},[5210],{"type":56,"value":292},{"type":50,"tag":132,"props":5212,"children":5213},{"style":173},[5214],{"type":56,"value":297},{"type":50,"tag":132,"props":5216,"children":5217},{"style":219},[5218],{"type":56,"value":5219}," env",{"type":50,"tag":132,"props":5221,"children":5222},{"style":173},[5223],{"type":56,"value":307},{"type":50,"tag":132,"props":5225,"children":5226},{"style":289},[5227],{"type":56,"value":312},{"type":50,"tag":132,"props":5229,"children":5230},{"style":173},[5231],{"type":56,"value":317},{"type":50,"tag":132,"props":5233,"children":5234},{"style":145},[5235],{"type":56,"value":322},{"type":50,"tag":132,"props":5237,"children":5238},{"style":173},[5239],{"type":56,"value":327},{"type":50,"tag":132,"props":5241,"children":5242},{"style":173},[5243],{"type":56,"value":332},{"type":50,"tag":132,"props":5245,"children":5246},{"class":134,"line":215},[5247],{"type":50,"tag":132,"props":5248,"children":5249},{"emptyLinePlaceholder":338},[5250],{"type":56,"value":341},{"type":50,"tag":132,"props":5252,"children":5253},{"class":134,"line":245},[5254],{"type":50,"tag":132,"props":5255,"children":5256},{"style":347},[5257],{"type":56,"value":5258},"\u002F\u002F View version\n",{"type":50,"tag":132,"props":5260,"children":5261},{"class":134,"line":353},[5262,5267,5271,5276,5281,5285,5290,5295],{"type":50,"tag":132,"props":5263,"children":5264},{"style":219},[5265],{"type":56,"value":5266},"console",{"type":50,"tag":132,"props":5268,"children":5269},{"style":173},[5270],{"type":56,"value":518},{"type":50,"tag":132,"props":5272,"children":5273},{"style":376},[5274],{"type":56,"value":5275},"log",{"type":50,"tag":132,"props":5277,"children":5278},{"style":219},[5279],{"type":56,"value":5280},"(env",{"type":50,"tag":132,"props":5282,"children":5283},{"style":173},[5284],{"type":56,"value":518},{"type":50,"tag":132,"props":5286,"children":5287},{"style":219},[5288],{"type":56,"value":5289},"version)",{"type":50,"tag":132,"props":5291,"children":5292},{"style":173},[5293],{"type":56,"value":5294},";",{"type":50,"tag":132,"props":5296,"children":5297},{"style":347},[5298],{"type":56,"value":5299}," \u002F\u002F e.g., '3.8.1'\n",{"type":50,"tag":132,"props":5301,"children":5302},{"class":134,"line":408},[5303],{"type":50,"tag":132,"props":5304,"children":5305},{"emptyLinePlaceholder":338},[5306],{"type":56,"value":341},{"type":50,"tag":132,"props":5308,"children":5309},{"class":134,"line":416},[5310],{"type":50,"tag":132,"props":5311,"children":5312},{"style":347},[5313],{"type":56,"value":5314},"\u002F\u002F Common settings\n",{"type":50,"tag":132,"props":5316,"children":5317},{"class":134,"line":425},[5318,5322,5326,5331,5335,5339,5343],{"type":50,"tag":132,"props":5319,"children":5320},{"style":219},[5321],{"type":56,"value":5175},{"type":50,"tag":132,"props":5323,"children":5324},{"style":173},[5325],{"type":56,"value":518},{"type":50,"tag":132,"props":5327,"children":5328},{"style":219},[5329],{"type":56,"value":5330},"allowRemoteModels ",{"type":50,"tag":132,"props":5332,"children":5333},{"style":173},[5334],{"type":56,"value":193},{"type":50,"tag":132,"props":5336,"children":5337},{"style":3998},[5338],{"type":56,"value":4001},{"type":50,"tag":132,"props":5340,"children":5341},{"style":173},[5342],{"type":56,"value":5294},{"type":50,"tag":132,"props":5344,"children":5345},{"style":347},[5346],{"type":56,"value":5347},"  \u002F\u002F Load from Hugging Face Hub\n",{"type":50,"tag":132,"props":5349,"children":5350},{"class":134,"line":476},[5351,5355,5359,5364,5368,5373,5377],{"type":50,"tag":132,"props":5352,"children":5353},{"style":219},[5354],{"type":56,"value":5175},{"type":50,"tag":132,"props":5356,"children":5357},{"style":173},[5358],{"type":56,"value":518},{"type":50,"tag":132,"props":5360,"children":5361},{"style":219},[5362],{"type":56,"value":5363},"allowLocalModels ",{"type":50,"tag":132,"props":5365,"children":5366},{"style":173},[5367],{"type":56,"value":193},{"type":50,"tag":132,"props":5369,"children":5370},{"style":3998},[5371],{"type":56,"value":5372}," false",{"type":50,"tag":132,"props":5374,"children":5375},{"style":173},[5376],{"type":56,"value":5294},{"type":50,"tag":132,"props":5378,"children":5379},{"style":347},[5380],{"type":56,"value":5381},"  \u002F\u002F Load from file system\n",{"type":50,"tag":132,"props":5383,"children":5384},{"class":134,"line":485},[5385,5389,5393,5398,5402,5406,5411,5415,5419],{"type":50,"tag":132,"props":5386,"children":5387},{"style":219},[5388],{"type":56,"value":5175},{"type":50,"tag":132,"props":5390,"children":5391},{"style":173},[5392],{"type":56,"value":518},{"type":50,"tag":132,"props":5394,"children":5395},{"style":219},[5396],{"type":56,"value":5397},"localModelPath ",{"type":50,"tag":132,"props":5399,"children":5400},{"style":173},[5401],{"type":56,"value":193},{"type":50,"tag":132,"props":5403,"children":5404},{"style":173},[5405],{"type":56,"value":317},{"type":50,"tag":132,"props":5407,"children":5408},{"style":145},[5409],{"type":56,"value":5410},"\u002Fmodels\u002F",{"type":50,"tag":132,"props":5412,"children":5413},{"style":173},[5414],{"type":56,"value":327},{"type":50,"tag":132,"props":5416,"children":5417},{"style":173},[5418],{"type":56,"value":5294},{"type":50,"tag":132,"props":5420,"children":5421},{"style":347},[5422],{"type":56,"value":5423}," \u002F\u002F Local model directory\n",{"type":50,"tag":132,"props":5425,"children":5426},{"class":134,"line":493},[5427,5431,5435,5440,5444,5448,5452],{"type":50,"tag":132,"props":5428,"children":5429},{"style":219},[5430],{"type":56,"value":5175},{"type":50,"tag":132,"props":5432,"children":5433},{"style":173},[5434],{"type":56,"value":518},{"type":50,"tag":132,"props":5436,"children":5437},{"style":219},[5438],{"type":56,"value":5439},"useFSCache ",{"type":50,"tag":132,"props":5441,"children":5442},{"style":173},[5443],{"type":56,"value":193},{"type":50,"tag":132,"props":5445,"children":5446},{"style":3998},[5447],{"type":56,"value":4001},{"type":50,"tag":132,"props":5449,"children":5450},{"style":173},[5451],{"type":56,"value":5294},{"type":50,"tag":132,"props":5453,"children":5454},{"style":347},[5455],{"type":56,"value":5456},"         \u002F\u002F Cache models on disk (Node.js)\n",{"type":50,"tag":132,"props":5458,"children":5459},{"class":134,"line":502},[5460,5464,5468,5473,5477,5481,5485],{"type":50,"tag":132,"props":5461,"children":5462},{"style":219},[5463],{"type":56,"value":5175},{"type":50,"tag":132,"props":5465,"children":5466},{"style":173},[5467],{"type":56,"value":518},{"type":50,"tag":132,"props":5469,"children":5470},{"style":219},[5471],{"type":56,"value":5472},"useBrowserCache ",{"type":50,"tag":132,"props":5474,"children":5475},{"style":173},[5476],{"type":56,"value":193},{"type":50,"tag":132,"props":5478,"children":5479},{"style":3998},[5480],{"type":56,"value":4001},{"type":50,"tag":132,"props":5482,"children":5483},{"style":173},[5484],{"type":56,"value":5294},{"type":50,"tag":132,"props":5486,"children":5487},{"style":347},[5488],{"type":56,"value":5489},"    \u002F\u002F Cache models in browser\n",{"type":50,"tag":132,"props":5491,"children":5492},{"class":134,"line":4670},[5493,5497,5501,5506,5510,5514,5519,5523,5527],{"type":50,"tag":132,"props":5494,"children":5495},{"style":219},[5496],{"type":56,"value":5175},{"type":50,"tag":132,"props":5498,"children":5499},{"style":173},[5500],{"type":56,"value":518},{"type":50,"tag":132,"props":5502,"children":5503},{"style":219},[5504],{"type":56,"value":5505},"cacheDir ",{"type":50,"tag":132,"props":5507,"children":5508},{"style":173},[5509],{"type":56,"value":193},{"type":50,"tag":132,"props":5511,"children":5512},{"style":173},[5513],{"type":56,"value":317},{"type":50,"tag":132,"props":5515,"children":5516},{"style":145},[5517],{"type":56,"value":5518},".\u002F.cache",{"type":50,"tag":132,"props":5520,"children":5521},{"style":173},[5522],{"type":56,"value":327},{"type":50,"tag":132,"props":5524,"children":5525},{"style":173},[5526],{"type":56,"value":5294},{"type":50,"tag":132,"props":5528,"children":5529},{"style":347},[5530],{"type":56,"value":5531},"     \u002F\u002F Cache directory location\n",{"type":50,"tag":59,"props":5533,"children":5534},{},[5535],{"type":50,"tag":537,"props":5536,"children":5537},{},[5538],{"type":56,"value":5539},"Configuration Patterns:",{"type":50,"tag":120,"props":5541,"children":5543},{"className":162,"code":5542,"language":24,"meta":125,"style":125},"\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",[5544],{"type":50,"tag":128,"props":5545,"children":5546},{"__ignoreMap":125},[5547,5555,5582,5609,5616,5624,5651,5678,5714,5721,5729,5766,5773,5781,5808],{"type":50,"tag":132,"props":5548,"children":5549},{"class":134,"line":135},[5550],{"type":50,"tag":132,"props":5551,"children":5552},{"style":347},[5553],{"type":56,"value":5554},"\u002F\u002F Development: Fast iteration with remote models\n",{"type":50,"tag":132,"props":5556,"children":5557},{"class":134,"line":215},[5558,5562,5566,5570,5574,5578],{"type":50,"tag":132,"props":5559,"children":5560},{"style":219},[5561],{"type":56,"value":5175},{"type":50,"tag":132,"props":5563,"children":5564},{"style":173},[5565],{"type":56,"value":518},{"type":50,"tag":132,"props":5567,"children":5568},{"style":219},[5569],{"type":56,"value":5330},{"type":50,"tag":132,"props":5571,"children":5572},{"style":173},[5573],{"type":56,"value":193},{"type":50,"tag":132,"props":5575,"children":5576},{"style":3998},[5577],{"type":56,"value":4001},{"type":50,"tag":132,"props":5579,"children":5580},{"style":173},[5581],{"type":56,"value":332},{"type":50,"tag":132,"props":5583,"children":5584},{"class":134,"line":245},[5585,5589,5593,5597,5601,5605],{"type":50,"tag":132,"props":5586,"children":5587},{"style":219},[5588],{"type":56,"value":5175},{"type":50,"tag":132,"props":5590,"children":5591},{"style":173},[5592],{"type":56,"value":518},{"type":50,"tag":132,"props":5594,"children":5595},{"style":219},[5596],{"type":56,"value":5439},{"type":50,"tag":132,"props":5598,"children":5599},{"style":173},[5600],{"type":56,"value":193},{"type":50,"tag":132,"props":5602,"children":5603},{"style":3998},[5604],{"type":56,"value":4001},{"type":50,"tag":132,"props":5606,"children":5607},{"style":173},[5608],{"type":56,"value":332},{"type":50,"tag":132,"props":5610,"children":5611},{"class":134,"line":353},[5612],{"type":50,"tag":132,"props":5613,"children":5614},{"emptyLinePlaceholder":338},[5615],{"type":56,"value":341},{"type":50,"tag":132,"props":5617,"children":5618},{"class":134,"line":408},[5619],{"type":50,"tag":132,"props":5620,"children":5621},{"style":347},[5622],{"type":56,"value":5623},"\u002F\u002F Production: Local models only\n",{"type":50,"tag":132,"props":5625,"children":5626},{"class":134,"line":416},[5627,5631,5635,5639,5643,5647],{"type":50,"tag":132,"props":5628,"children":5629},{"style":219},[5630],{"type":56,"value":5175},{"type":50,"tag":132,"props":5632,"children":5633},{"style":173},[5634],{"type":56,"value":518},{"type":50,"tag":132,"props":5636,"children":5637},{"style":219},[5638],{"type":56,"value":5330},{"type":50,"tag":132,"props":5640,"children":5641},{"style":173},[5642],{"type":56,"value":193},{"type":50,"tag":132,"props":5644,"children":5645},{"style":3998},[5646],{"type":56,"value":5372},{"type":50,"tag":132,"props":5648,"children":5649},{"style":173},[5650],{"type":56,"value":332},{"type":50,"tag":132,"props":5652,"children":5653},{"class":134,"line":425},[5654,5658,5662,5666,5670,5674],{"type":50,"tag":132,"props":5655,"children":5656},{"style":219},[5657],{"type":56,"value":5175},{"type":50,"tag":132,"props":5659,"children":5660},{"style":173},[5661],{"type":56,"value":518},{"type":50,"tag":132,"props":5663,"children":5664},{"style":219},[5665],{"type":56,"value":5363},{"type":50,"tag":132,"props":5667,"children":5668},{"style":173},[5669],{"type":56,"value":193},{"type":50,"tag":132,"props":5671,"children":5672},{"style":3998},[5673],{"type":56,"value":4001},{"type":50,"tag":132,"props":5675,"children":5676},{"style":173},[5677],{"type":56,"value":332},{"type":50,"tag":132,"props":5679,"children":5680},{"class":134,"line":476},[5681,5685,5689,5693,5697,5701,5706,5710],{"type":50,"tag":132,"props":5682,"children":5683},{"style":219},[5684],{"type":56,"value":5175},{"type":50,"tag":132,"props":5686,"children":5687},{"style":173},[5688],{"type":56,"value":518},{"type":50,"tag":132,"props":5690,"children":5691},{"style":219},[5692],{"type":56,"value":5397},{"type":50,"tag":132,"props":5694,"children":5695},{"style":173},[5696],{"type":56,"value":193},{"type":50,"tag":132,"props":5698,"children":5699},{"style":173},[5700],{"type":56,"value":317},{"type":50,"tag":132,"props":5702,"children":5703},{"style":145},[5704],{"type":56,"value":5705},"\u002Fapp\u002Fmodels\u002F",{"type":50,"tag":132,"props":5707,"children":5708},{"style":173},[5709],{"type":56,"value":327},{"type":50,"tag":132,"props":5711,"children":5712},{"style":173},[5713],{"type":56,"value":332},{"type":50,"tag":132,"props":5715,"children":5716},{"class":134,"line":485},[5717],{"type":50,"tag":132,"props":5718,"children":5719},{"emptyLinePlaceholder":338},[5720],{"type":56,"value":341},{"type":50,"tag":132,"props":5722,"children":5723},{"class":134,"line":493},[5724],{"type":50,"tag":132,"props":5725,"children":5726},{"style":347},[5727],{"type":56,"value":5728},"\u002F\u002F Custom CDN\n",{"type":50,"tag":132,"props":5730,"children":5731},{"class":134,"line":502},[5732,5736,5740,5745,5749,5753,5758,5762],{"type":50,"tag":132,"props":5733,"children":5734},{"style":219},[5735],{"type":56,"value":5175},{"type":50,"tag":132,"props":5737,"children":5738},{"style":173},[5739],{"type":56,"value":518},{"type":50,"tag":132,"props":5741,"children":5742},{"style":219},[5743],{"type":56,"value":5744},"remoteHost ",{"type":50,"tag":132,"props":5746,"children":5747},{"style":173},[5748],{"type":56,"value":193},{"type":50,"tag":132,"props":5750,"children":5751},{"style":173},[5752],{"type":56,"value":317},{"type":50,"tag":132,"props":5754,"children":5755},{"style":145},[5756],{"type":56,"value":5757},"https:\u002F\u002Fcdn.example.com\u002Fmodels",{"type":50,"tag":132,"props":5759,"children":5760},{"style":173},[5761],{"type":56,"value":327},{"type":50,"tag":132,"props":5763,"children":5764},{"style":173},[5765],{"type":56,"value":332},{"type":50,"tag":132,"props":5767,"children":5768},{"class":134,"line":4670},[5769],{"type":50,"tag":132,"props":5770,"children":5771},{"emptyLinePlaceholder":338},[5772],{"type":56,"value":341},{"type":50,"tag":132,"props":5774,"children":5775},{"class":134,"line":4710},[5776],{"type":50,"tag":132,"props":5777,"children":5778},{"style":347},[5779],{"type":56,"value":5780},"\u002F\u002F Disable caching (testing)\n",{"type":50,"tag":132,"props":5782,"children":5783},{"class":134,"line":4718},[5784,5788,5792,5796,5800,5804],{"type":50,"tag":132,"props":5785,"children":5786},{"style":219},[5787],{"type":56,"value":5175},{"type":50,"tag":132,"props":5789,"children":5790},{"style":173},[5791],{"type":56,"value":518},{"type":50,"tag":132,"props":5793,"children":5794},{"style":219},[5795],{"type":56,"value":5439},{"type":50,"tag":132,"props":5797,"children":5798},{"style":173},[5799],{"type":56,"value":193},{"type":50,"tag":132,"props":5801,"children":5802},{"style":3998},[5803],{"type":56,"value":5372},{"type":50,"tag":132,"props":5805,"children":5806},{"style":173},[5807],{"type":56,"value":332},{"type":50,"tag":132,"props":5809,"children":5810},{"class":134,"line":4746},[5811,5815,5819,5823,5827,5831],{"type":50,"tag":132,"props":5812,"children":5813},{"style":219},[5814],{"type":56,"value":5175},{"type":50,"tag":132,"props":5816,"children":5817},{"style":173},[5818],{"type":56,"value":518},{"type":50,"tag":132,"props":5820,"children":5821},{"style":219},[5822],{"type":56,"value":5472},{"type":50,"tag":132,"props":5824,"children":5825},{"style":173},[5826],{"type":56,"value":193},{"type":50,"tag":132,"props":5828,"children":5829},{"style":3998},[5830],{"type":56,"value":5372},{"type":50,"tag":132,"props":5832,"children":5833},{"style":173},[5834],{"type":56,"value":332},{"type":50,"tag":59,"props":5836,"children":5837},{},[5838],{"type":56,"value":5839},"For complete documentation on all configuration options, caching strategies, cache management, pre-downloading models, and more, see:",{"type":50,"tag":59,"props":5841,"children":5842},{},[5843],{"type":50,"tag":537,"props":5844,"children":5845},{},[5846,5848],{"type":56,"value":5847},"→ ",{"type":50,"tag":553,"props":5849,"children":5851},{"href":5850},".\u002Freferences\u002FCONFIGURATION.md",[5852],{"type":56,"value":5853},"Configuration Reference",{"type":50,"tag":113,"props":5855,"children":5857},{"id":5856},"working-with-tensors",[5858],{"type":56,"value":5859},"Working with Tensors",{"type":50,"tag":120,"props":5861,"children":5863},{"className":162,"code":5862,"language":24,"meta":125,"style":125},"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",[5864],{"type":50,"tag":128,"props":5865,"children":5866},{"__ignoreMap":125},[5867,5916,5923,5931,5989,6045,6052,6060,6110,6117,6125],{"type":50,"tag":132,"props":5868,"children":5869},{"class":134,"line":135},[5870,5874,5878,5883,5887,5892,5896,5900,5904,5908,5912],{"type":50,"tag":132,"props":5871,"children":5872},{"style":289},[5873],{"type":56,"value":292},{"type":50,"tag":132,"props":5875,"children":5876},{"style":173},[5877],{"type":56,"value":297},{"type":50,"tag":132,"props":5879,"children":5880},{"style":219},[5881],{"type":56,"value":5882}," AutoTokenizer",{"type":50,"tag":132,"props":5884,"children":5885},{"style":173},[5886],{"type":56,"value":822},{"type":50,"tag":132,"props":5888,"children":5889},{"style":219},[5890],{"type":56,"value":5891}," AutoModel",{"type":50,"tag":132,"props":5893,"children":5894},{"style":173},[5895],{"type":56,"value":307},{"type":50,"tag":132,"props":5897,"children":5898},{"style":289},[5899],{"type":56,"value":312},{"type":50,"tag":132,"props":5901,"children":5902},{"style":173},[5903],{"type":56,"value":317},{"type":50,"tag":132,"props":5905,"children":5906},{"style":145},[5907],{"type":56,"value":322},{"type":50,"tag":132,"props":5909,"children":5910},{"style":173},[5911],{"type":56,"value":327},{"type":50,"tag":132,"props":5913,"children":5914},{"style":173},[5915],{"type":56,"value":332},{"type":50,"tag":132,"props":5917,"children":5918},{"class":134,"line":215},[5919],{"type":50,"tag":132,"props":5920,"children":5921},{"emptyLinePlaceholder":338},[5922],{"type":56,"value":341},{"type":50,"tag":132,"props":5924,"children":5925},{"class":134,"line":245},[5926],{"type":50,"tag":132,"props":5927,"children":5928},{"style":347},[5929],{"type":56,"value":5930},"\u002F\u002F Load tokenizer and model separately for more control\n",{"type":50,"tag":132,"props":5932,"children":5933},{"class":134,"line":353},[5934,5938,5943,5947,5951,5955,5959,5964,5968,5972,5977,5981,5985],{"type":50,"tag":132,"props":5935,"children":5936},{"style":185},[5937],{"type":56,"value":359},{"type":50,"tag":132,"props":5939,"children":5940},{"style":219},[5941],{"type":56,"value":5942}," tokenizer ",{"type":50,"tag":132,"props":5944,"children":5945},{"style":173},[5946],{"type":56,"value":193},{"type":50,"tag":132,"props":5948,"children":5949},{"style":289},[5950],{"type":56,"value":373},{"type":50,"tag":132,"props":5952,"children":5953},{"style":219},[5954],{"type":56,"value":5882},{"type":50,"tag":132,"props":5956,"children":5957},{"style":173},[5958],{"type":56,"value":518},{"type":50,"tag":132,"props":5960,"children":5961},{"style":376},[5962],{"type":56,"value":5963},"from_pretrained",{"type":50,"tag":132,"props":5965,"children":5966},{"style":219},[5967],{"type":56,"value":383},{"type":50,"tag":132,"props":5969,"children":5970},{"style":173},[5971],{"type":56,"value":327},{"type":50,"tag":132,"props":5973,"children":5974},{"style":145},[5975],{"type":56,"value":5976},"bert-base-uncased",{"type":50,"tag":132,"props":5978,"children":5979},{"style":173},[5980],{"type":56,"value":327},{"type":50,"tag":132,"props":5982,"children":5983},{"style":219},[5984],{"type":56,"value":401},{"type":50,"tag":132,"props":5986,"children":5987},{"style":173},[5988],{"type":56,"value":332},{"type":50,"tag":132,"props":5990,"children":5991},{"class":134,"line":408},[5992,5996,6001,6005,6009,6013,6017,6021,6025,6029,6033,6037,6041],{"type":50,"tag":132,"props":5993,"children":5994},{"style":185},[5995],{"type":56,"value":359},{"type":50,"tag":132,"props":5997,"children":5998},{"style":219},[5999],{"type":56,"value":6000}," model ",{"type":50,"tag":132,"props":6002,"children":6003},{"style":173},[6004],{"type":56,"value":193},{"type":50,"tag":132,"props":6006,"children":6007},{"style":289},[6008],{"type":56,"value":373},{"type":50,"tag":132,"props":6010,"children":6011},{"style":219},[6012],{"type":56,"value":5891},{"type":50,"tag":132,"props":6014,"children":6015},{"style":173},[6016],{"type":56,"value":518},{"type":50,"tag":132,"props":6018,"children":6019},{"style":376},[6020],{"type":56,"value":5963},{"type":50,"tag":132,"props":6022,"children":6023},{"style":219},[6024],{"type":56,"value":383},{"type":50,"tag":132,"props":6026,"children":6027},{"style":173},[6028],{"type":56,"value":327},{"type":50,"tag":132,"props":6030,"children":6031},{"style":145},[6032],{"type":56,"value":5976},{"type":50,"tag":132,"props":6034,"children":6035},{"style":173},[6036],{"type":56,"value":327},{"type":50,"tag":132,"props":6038,"children":6039},{"style":219},[6040],{"type":56,"value":401},{"type":50,"tag":132,"props":6042,"children":6043},{"style":173},[6044],{"type":56,"value":332},{"type":50,"tag":132,"props":6046,"children":6047},{"class":134,"line":416},[6048],{"type":50,"tag":132,"props":6049,"children":6050},{"emptyLinePlaceholder":338},[6051],{"type":56,"value":341},{"type":50,"tag":132,"props":6053,"children":6054},{"class":134,"line":425},[6055],{"type":50,"tag":132,"props":6056,"children":6057},{"style":347},[6058],{"type":56,"value":6059},"\u002F\u002F Tokenize input\n",{"type":50,"tag":132,"props":6061,"children":6062},{"class":134,"line":476},[6063,6067,6072,6076,6080,6085,6089,6093,6098,6102,6106],{"type":50,"tag":132,"props":6064,"children":6065},{"style":185},[6066],{"type":56,"value":359},{"type":50,"tag":132,"props":6068,"children":6069},{"style":219},[6070],{"type":56,"value":6071}," inputs ",{"type":50,"tag":132,"props":6073,"children":6074},{"style":173},[6075],{"type":56,"value":193},{"type":50,"tag":132,"props":6077,"children":6078},{"style":289},[6079],{"type":56,"value":373},{"type":50,"tag":132,"props":6081,"children":6082},{"style":376},[6083],{"type":56,"value":6084}," tokenizer",{"type":50,"tag":132,"props":6086,"children":6087},{"style":219},[6088],{"type":56,"value":383},{"type":50,"tag":132,"props":6090,"children":6091},{"style":173},[6092],{"type":56,"value":327},{"type":50,"tag":132,"props":6094,"children":6095},{"style":145},[6096],{"type":56,"value":6097},"Hello world!",{"type":50,"tag":132,"props":6099,"children":6100},{"style":173},[6101],{"type":56,"value":327},{"type":50,"tag":132,"props":6103,"children":6104},{"style":219},[6105],{"type":56,"value":401},{"type":50,"tag":132,"props":6107,"children":6108},{"style":173},[6109],{"type":56,"value":332},{"type":50,"tag":132,"props":6111,"children":6112},{"class":134,"line":485},[6113],{"type":50,"tag":132,"props":6114,"children":6115},{"emptyLinePlaceholder":338},[6116],{"type":56,"value":341},{"type":50,"tag":132,"props":6118,"children":6119},{"class":134,"line":493},[6120],{"type":50,"tag":132,"props":6121,"children":6122},{"style":347},[6123],{"type":56,"value":6124},"\u002F\u002F Run model\n",{"type":50,"tag":132,"props":6126,"children":6127},{"class":134,"line":502},[6128,6132,6137,6141,6145,6150,6155],{"type":50,"tag":132,"props":6129,"children":6130},{"style":185},[6131],{"type":56,"value":359},{"type":50,"tag":132,"props":6133,"children":6134},{"style":219},[6135],{"type":56,"value":6136}," outputs ",{"type":50,"tag":132,"props":6138,"children":6139},{"style":173},[6140],{"type":56,"value":193},{"type":50,"tag":132,"props":6142,"children":6143},{"style":289},[6144],{"type":56,"value":373},{"type":50,"tag":132,"props":6146,"children":6147},{"style":376},[6148],{"type":56,"value":6149}," model",{"type":50,"tag":132,"props":6151,"children":6152},{"style":219},[6153],{"type":56,"value":6154},"(inputs)",{"type":50,"tag":132,"props":6156,"children":6157},{"style":173},[6158],{"type":56,"value":332},{"type":50,"tag":113,"props":6160,"children":6162},{"id":6161},"batch-processing",[6163],{"type":56,"value":6164},"Batch Processing",{"type":50,"tag":120,"props":6166,"children":6168},{"className":162,"code":6167,"language":24,"meta":125,"style":125},"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",[6169],{"type":50,"tag":128,"props":6170,"children":6171},{"__ignoreMap":125},[6172,6219,6226,6234,6263,6283,6303,6319],{"type":50,"tag":132,"props":6173,"children":6174},{"class":134,"line":135},[6175,6179,6183,6187,6191,6195,6199,6203,6207,6211,6215],{"type":50,"tag":132,"props":6176,"children":6177},{"style":185},[6178],{"type":56,"value":359},{"type":50,"tag":132,"props":6180,"children":6181},{"style":219},[6182],{"type":56,"value":1153},{"type":50,"tag":132,"props":6184,"children":6185},{"style":173},[6186],{"type":56,"value":193},{"type":50,"tag":132,"props":6188,"children":6189},{"style":289},[6190],{"type":56,"value":373},{"type":50,"tag":132,"props":6192,"children":6193},{"style":376},[6194],{"type":56,"value":302},{"type":50,"tag":132,"props":6196,"children":6197},{"style":219},[6198],{"type":56,"value":383},{"type":50,"tag":132,"props":6200,"children":6201},{"style":173},[6202],{"type":56,"value":327},{"type":50,"tag":132,"props":6204,"children":6205},{"style":145},[6206],{"type":56,"value":392},{"type":50,"tag":132,"props":6208,"children":6209},{"style":173},[6210],{"type":56,"value":327},{"type":50,"tag":132,"props":6212,"children":6213},{"style":219},[6214],{"type":56,"value":401},{"type":50,"tag":132,"props":6216,"children":6217},{"style":173},[6218],{"type":56,"value":332},{"type":50,"tag":132,"props":6220,"children":6221},{"class":134,"line":215},[6222],{"type":50,"tag":132,"props":6223,"children":6224},{"emptyLinePlaceholder":338},[6225],{"type":56,"value":341},{"type":50,"tag":132,"props":6227,"children":6228},{"class":134,"line":245},[6229],{"type":50,"tag":132,"props":6230,"children":6231},{"style":347},[6232],{"type":56,"value":6233},"\u002F\u002F Process multiple texts\n",{"type":50,"tag":132,"props":6235,"children":6236},{"class":134,"line":353},[6237,6241,6246,6250,6254,6258],{"type":50,"tag":132,"props":6238,"children":6239},{"style":185},[6240],{"type":56,"value":359},{"type":50,"tag":132,"props":6242,"children":6243},{"style":219},[6244],{"type":56,"value":6245}," results ",{"type":50,"tag":132,"props":6247,"children":6248},{"style":173},[6249],{"type":56,"value":193},{"type":50,"tag":132,"props":6251,"children":6252},{"style":289},[6253],{"type":56,"value":373},{"type":50,"tag":132,"props":6255,"children":6256},{"style":376},[6257],{"type":56,"value":513},{"type":50,"tag":132,"props":6259,"children":6260},{"style":219},[6261],{"type":56,"value":6262},"([\n",{"type":50,"tag":132,"props":6264,"children":6265},{"class":134,"line":408},[6266,6270,6275,6279],{"type":50,"tag":132,"props":6267,"children":6268},{"style":173},[6269],{"type":56,"value":614},{"type":50,"tag":132,"props":6271,"children":6272},{"style":145},[6273],{"type":56,"value":6274},"I love this!",{"type":50,"tag":132,"props":6276,"children":6277},{"style":173},[6278],{"type":56,"value":327},{"type":50,"tag":132,"props":6280,"children":6281},{"style":173},[6282],{"type":56,"value":627},{"type":50,"tag":132,"props":6284,"children":6285},{"class":134,"line":416},[6286,6290,6295,6299],{"type":50,"tag":132,"props":6287,"children":6288},{"style":173},[6289],{"type":56,"value":614},{"type":50,"tag":132,"props":6291,"children":6292},{"style":145},[6293],{"type":56,"value":6294},"This is terrible.",{"type":50,"tag":132,"props":6296,"children":6297},{"style":173},[6298],{"type":56,"value":327},{"type":50,"tag":132,"props":6300,"children":6301},{"style":173},[6302],{"type":56,"value":627},{"type":50,"tag":132,"props":6304,"children":6305},{"class":134,"line":425},[6306,6310,6315],{"type":50,"tag":132,"props":6307,"children":6308},{"style":173},[6309],{"type":56,"value":614},{"type":50,"tag":132,"props":6311,"children":6312},{"style":145},[6313],{"type":56,"value":6314},"It was okay.",{"type":50,"tag":132,"props":6316,"children":6317},{"style":173},[6318],{"type":56,"value":644},{"type":50,"tag":132,"props":6320,"children":6321},{"class":134,"line":476},[6322,6326],{"type":50,"tag":132,"props":6323,"children":6324},{"style":219},[6325],{"type":56,"value":2259},{"type":50,"tag":132,"props":6327,"children":6328},{"style":173},[6329],{"type":56,"value":332},{"type":50,"tag":65,"props":6331,"children":6333},{"id":6332},"browser-specific-considerations",[6334],{"type":56,"value":6335},"Browser-Specific Considerations",{"type":50,"tag":113,"props":6337,"children":6339},{"id":6338},"webgpu-usage",[6340],{"type":56,"value":6341},"WebGPU Usage",{"type":50,"tag":59,"props":6343,"children":6344},{},[6345],{"type":56,"value":6346},"WebGPU provides GPU acceleration in browsers:",{"type":50,"tag":120,"props":6348,"children":6350},{"className":162,"code":6349,"language":24,"meta":125,"style":125},"const pipe = await pipeline('text-generation', 'onnx-community\u002Fgemma-3-270m-it-ONNX', {\n  device: 'webgpu',\n  dtype: 'fp32'\n});\n",[6351],{"type":50,"tag":128,"props":6352,"children":6353},{"__ignoreMap":125},[6354,6417,6444,6467],{"type":50,"tag":132,"props":6355,"children":6356},{"class":134,"line":135},[6357,6361,6365,6369,6373,6377,6381,6385,6389,6393,6397,6401,6405,6409,6413],{"type":50,"tag":132,"props":6358,"children":6359},{"style":185},[6360],{"type":56,"value":359},{"type":50,"tag":132,"props":6362,"children":6363},{"style":219},[6364],{"type":56,"value":364},{"type":50,"tag":132,"props":6366,"children":6367},{"style":173},[6368],{"type":56,"value":193},{"type":50,"tag":132,"props":6370,"children":6371},{"style":289},[6372],{"type":56,"value":373},{"type":50,"tag":132,"props":6374,"children":6375},{"style":376},[6376],{"type":56,"value":302},{"type":50,"tag":132,"props":6378,"children":6379},{"style":219},[6380],{"type":56,"value":383},{"type":50,"tag":132,"props":6382,"children":6383},{"style":173},[6384],{"type":56,"value":327},{"type":50,"tag":132,"props":6386,"children":6387},{"style":145},[6388],{"type":56,"value":1516},{"type":50,"tag":132,"props":6390,"children":6391},{"style":173},[6392],{"type":56,"value":327},{"type":50,"tag":132,"props":6394,"children":6395},{"style":173},[6396],{"type":56,"value":822},{"type":50,"tag":132,"props":6398,"children":6399},{"style":173},[6400],{"type":56,"value":317},{"type":50,"tag":132,"props":6402,"children":6403},{"style":145},[6404],{"type":56,"value":1579},{"type":50,"tag":132,"props":6406,"children":6407},{"style":173},[6408],{"type":56,"value":327},{"type":50,"tag":132,"props":6410,"children":6411},{"style":173},[6412],{"type":56,"value":822},{"type":50,"tag":132,"props":6414,"children":6415},{"style":173},[6416],{"type":56,"value":922},{"type":50,"tag":132,"props":6418,"children":6419},{"class":134,"line":215},[6420,6424,6428,6432,6436,6440],{"type":50,"tag":132,"props":6421,"children":6422},{"style":179},[6423],{"type":56,"value":930},{"type":50,"tag":132,"props":6425,"children":6426},{"style":173},[6427],{"type":56,"value":935},{"type":50,"tag":132,"props":6429,"children":6430},{"style":173},[6431],{"type":56,"value":317},{"type":50,"tag":132,"props":6433,"children":6434},{"style":145},[6435],{"type":56,"value":944},{"type":50,"tag":132,"props":6437,"children":6438},{"style":173},[6439],{"type":56,"value":327},{"type":50,"tag":132,"props":6441,"children":6442},{"style":173},[6443],{"type":56,"value":627},{"type":50,"tag":132,"props":6445,"children":6446},{"class":134,"line":245},[6447,6451,6455,6459,6463],{"type":50,"tag":132,"props":6448,"children":6449},{"style":179},[6450],{"type":56,"value":1064},{"type":50,"tag":132,"props":6452,"children":6453},{"style":173},[6454],{"type":56,"value":935},{"type":50,"tag":132,"props":6456,"children":6457},{"style":173},[6458],{"type":56,"value":317},{"type":50,"tag":132,"props":6460,"children":6461},{"style":145},[6462],{"type":56,"value":4469},{"type":50,"tag":132,"props":6464,"children":6465},{"style":173},[6466],{"type":56,"value":644},{"type":50,"tag":132,"props":6468,"children":6469},{"class":134,"line":353},[6470,6474,6478],{"type":50,"tag":132,"props":6471,"children":6472},{"style":173},[6473],{"type":56,"value":237},{"type":50,"tag":132,"props":6475,"children":6476},{"style":219},[6477],{"type":56,"value":401},{"type":50,"tag":132,"props":6479,"children":6480},{"style":173},[6481],{"type":56,"value":332},{"type":50,"tag":59,"props":6483,"children":6484},{},[6485,6490],{"type":50,"tag":537,"props":6486,"children":6487},{},[6488],{"type":56,"value":6489},"Note",{"type":56,"value":6491},": WebGPU is experimental. Check browser compatibility and file issues if problems occur.",{"type":50,"tag":113,"props":6493,"children":6495},{"id":6494},"wasm-performance",[6496],{"type":56,"value":6497},"WASM Performance",{"type":50,"tag":59,"props":6499,"children":6500},{},[6501],{"type":56,"value":6502},"Default browser execution uses WASM:",{"type":50,"tag":120,"props":6504,"children":6506},{"className":162,"code":6505,"language":24,"meta":125,"style":125},"\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",[6507],{"type":50,"tag":128,"props":6508,"children":6509},{"__ignoreMap":125},[6510,6518,6581,6609],{"type":50,"tag":132,"props":6511,"children":6512},{"class":134,"line":135},[6513],{"type":50,"tag":132,"props":6514,"children":6515},{"style":347},[6516],{"type":56,"value":6517},"\u002F\u002F Optimized for browsers with quantization\n",{"type":50,"tag":132,"props":6519,"children":6520},{"class":134,"line":215},[6521,6525,6529,6533,6537,6541,6545,6549,6553,6557,6561,6565,6569,6573,6577],{"type":50,"tag":132,"props":6522,"children":6523},{"style":185},[6524],{"type":56,"value":359},{"type":50,"tag":132,"props":6526,"children":6527},{"style":219},[6528],{"type":56,"value":364},{"type":50,"tag":132,"props":6530,"children":6531},{"style":173},[6532],{"type":56,"value":193},{"type":50,"tag":132,"props":6534,"children":6535},{"style":289},[6536],{"type":56,"value":373},{"type":50,"tag":132,"props":6538,"children":6539},{"style":376},[6540],{"type":56,"value":302},{"type":50,"tag":132,"props":6542,"children":6543},{"style":219},[6544],{"type":56,"value":383},{"type":50,"tag":132,"props":6546,"children":6547},{"style":173},[6548],{"type":56,"value":327},{"type":50,"tag":132,"props":6550,"children":6551},{"style":145},[6552],{"type":56,"value":392},{"type":50,"tag":132,"props":6554,"children":6555},{"style":173},[6556],{"type":56,"value":327},{"type":50,"tag":132,"props":6558,"children":6559},{"style":173},[6560],{"type":56,"value":822},{"type":50,"tag":132,"props":6562,"children":6563},{"style":173},[6564],{"type":56,"value":317},{"type":50,"tag":132,"props":6566,"children":6567},{"style":145},[6568],{"type":56,"value":831},{"type":50,"tag":132,"props":6570,"children":6571},{"style":173},[6572],{"type":56,"value":327},{"type":50,"tag":132,"props":6574,"children":6575},{"style":173},[6576],{"type":56,"value":822},{"type":50,"tag":132,"props":6578,"children":6579},{"style":173},[6580],{"type":56,"value":922},{"type":50,"tag":132,"props":6582,"children":6583},{"class":134,"line":245},[6584,6588,6592,6596,6600,6604],{"type":50,"tag":132,"props":6585,"children":6586},{"style":179},[6587],{"type":56,"value":1064},{"type":50,"tag":132,"props":6589,"children":6590},{"style":173},[6591],{"type":56,"value":935},{"type":50,"tag":132,"props":6593,"children":6594},{"style":173},[6595],{"type":56,"value":317},{"type":50,"tag":132,"props":6597,"children":6598},{"style":145},[6599],{"type":56,"value":4491},{"type":50,"tag":132,"props":6601,"children":6602},{"style":173},[6603],{"type":56,"value":327},{"type":50,"tag":132,"props":6605,"children":6606},{"style":347},[6607],{"type":56,"value":6608},"  \u002F\u002F or 'q4' for even smaller size\n",{"type":50,"tag":132,"props":6610,"children":6611},{"class":134,"line":353},[6612,6616,6620],{"type":50,"tag":132,"props":6613,"children":6614},{"style":173},[6615],{"type":56,"value":237},{"type":50,"tag":132,"props":6617,"children":6618},{"style":219},[6619],{"type":56,"value":401},{"type":50,"tag":132,"props":6621,"children":6622},{"style":173},[6623],{"type":56,"value":332},{"type":50,"tag":113,"props":6625,"children":6627},{"id":6626},"progress-tracking-loading-indicators",[6628],{"type":56,"value":6629},"Progress Tracking & Loading Indicators",{"type":50,"tag":59,"props":6631,"children":6632},{},[6633,6635,6641],{"type":56,"value":6634},"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":50,"tag":128,"props":6636,"children":6638},{"className":6637},[],[6639],{"type":56,"value":6640},"pipeline()",{"type":56,"value":6642}," function:",{"type":50,"tag":120,"props":6644,"children":6646},{"className":162,"code":6645,"language":24,"meta":125,"style":125},"import { pipeline } from '@huggingface\u002Ftransformers';\n\n\u002F\u002F Track progress for each file\nconst fileProgress = {};\n\nfunction onProgress(info) {\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",[6647],{"type":50,"tag":128,"props":6648,"children":6649},{"__ignoreMap":125},[6650,6689,6696,6704,6725,6732,6763,6840,6848,6900,6951,7055,7063,7070,7118,7183,7190,7198,7205,7213,7265,7282],{"type":50,"tag":132,"props":6651,"children":6652},{"class":134,"line":135},[6653,6657,6661,6665,6669,6673,6677,6681,6685],{"type":50,"tag":132,"props":6654,"children":6655},{"style":289},[6656],{"type":56,"value":292},{"type":50,"tag":132,"props":6658,"children":6659},{"style":173},[6660],{"type":56,"value":297},{"type":50,"tag":132,"props":6662,"children":6663},{"style":219},[6664],{"type":56,"value":302},{"type":50,"tag":132,"props":6666,"children":6667},{"style":173},[6668],{"type":56,"value":307},{"type":50,"tag":132,"props":6670,"children":6671},{"style":289},[6672],{"type":56,"value":312},{"type":50,"tag":132,"props":6674,"children":6675},{"style":173},[6676],{"type":56,"value":317},{"type":50,"tag":132,"props":6678,"children":6679},{"style":145},[6680],{"type":56,"value":322},{"type":50,"tag":132,"props":6682,"children":6683},{"style":173},[6684],{"type":56,"value":327},{"type":50,"tag":132,"props":6686,"children":6687},{"style":173},[6688],{"type":56,"value":332},{"type":50,"tag":132,"props":6690,"children":6691},{"class":134,"line":215},[6692],{"type":50,"tag":132,"props":6693,"children":6694},{"emptyLinePlaceholder":338},[6695],{"type":56,"value":341},{"type":50,"tag":132,"props":6697,"children":6698},{"class":134,"line":245},[6699],{"type":50,"tag":132,"props":6700,"children":6701},{"style":347},[6702],{"type":56,"value":6703},"\u002F\u002F Track progress for each file\n",{"type":50,"tag":132,"props":6705,"children":6706},{"class":134,"line":353},[6707,6711,6716,6720],{"type":50,"tag":132,"props":6708,"children":6709},{"style":185},[6710],{"type":56,"value":359},{"type":50,"tag":132,"props":6712,"children":6713},{"style":219},[6714],{"type":56,"value":6715}," fileProgress ",{"type":50,"tag":132,"props":6717,"children":6718},{"style":173},[6719],{"type":56,"value":193},{"type":50,"tag":132,"props":6721,"children":6722},{"style":173},[6723],{"type":56,"value":6724}," {};\n",{"type":50,"tag":132,"props":6726,"children":6727},{"class":134,"line":408},[6728],{"type":50,"tag":132,"props":6729,"children":6730},{"emptyLinePlaceholder":338},[6731],{"type":56,"value":341},{"type":50,"tag":132,"props":6733,"children":6734},{"class":134,"line":416},[6735,6740,6745,6749,6755,6759],{"type":50,"tag":132,"props":6736,"children":6737},{"style":185},[6738],{"type":56,"value":6739},"function",{"type":50,"tag":132,"props":6741,"children":6742},{"style":376},[6743],{"type":56,"value":6744}," onProgress",{"type":50,"tag":132,"props":6746,"children":6747},{"style":173},[6748],{"type":56,"value":383},{"type":50,"tag":132,"props":6750,"children":6752},{"style":6751},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[6753],{"type":56,"value":6754},"info",{"type":50,"tag":132,"props":6756,"children":6757},{"style":173},[6758],{"type":56,"value":401},{"type":50,"tag":132,"props":6760,"children":6761},{"style":173},[6762],{"type":56,"value":922},{"type":50,"tag":132,"props":6764,"children":6765},{"class":134,"line":425},[6766,6771,6775,6779,6783,6788,6792,6796,6801,6805,6809,6814,6818,6822,6827,6832,6836],{"type":50,"tag":132,"props":6767,"children":6768},{"style":219},[6769],{"type":56,"value":6770},"  console",{"type":50,"tag":132,"props":6772,"children":6773},{"style":173},[6774],{"type":56,"value":518},{"type":50,"tag":132,"props":6776,"children":6777},{"style":376},[6778],{"type":56,"value":5275},{"type":50,"tag":132,"props":6780,"children":6781},{"style":179},[6782],{"type":56,"value":383},{"type":50,"tag":132,"props":6784,"children":6785},{"style":173},[6786],{"type":56,"value":6787},"`${",{"type":50,"tag":132,"props":6789,"children":6790},{"style":219},[6791],{"type":56,"value":6754},{"type":50,"tag":132,"props":6793,"children":6794},{"style":173},[6795],{"type":56,"value":518},{"type":50,"tag":132,"props":6797,"children":6798},{"style":219},[6799],{"type":56,"value":6800},"status",{"type":50,"tag":132,"props":6802,"children":6803},{"style":173},[6804],{"type":56,"value":237},{"type":50,"tag":132,"props":6806,"children":6807},{"style":145},[6808],{"type":56,"value":681},{"type":50,"tag":132,"props":6810,"children":6811},{"style":173},[6812],{"type":56,"value":6813},"${",{"type":50,"tag":132,"props":6815,"children":6816},{"style":219},[6817],{"type":56,"value":6754},{"type":50,"tag":132,"props":6819,"children":6820},{"style":173},[6821],{"type":56,"value":518},{"type":50,"tag":132,"props":6823,"children":6824},{"style":219},[6825],{"type":56,"value":6826},"file",{"type":50,"tag":132,"props":6828,"children":6829},{"style":173},[6830],{"type":56,"value":6831},"}`",{"type":50,"tag":132,"props":6833,"children":6834},{"style":179},[6835],{"type":56,"value":401},{"type":50,"tag":132,"props":6837,"children":6838},{"style":173},[6839],{"type":56,"value":332},{"type":50,"tag":132,"props":6841,"children":6842},{"class":134,"line":476},[6843],{"type":50,"tag":132,"props":6844,"children":6845},{"style":179},[6846],{"type":56,"value":6847},"  \n",{"type":50,"tag":132,"props":6849,"children":6850},{"class":134,"line":485},[6851,6856,6861,6865,6869,6873,6878,6882,6887,6891,6896],{"type":50,"tag":132,"props":6852,"children":6853},{"style":289},[6854],{"type":56,"value":6855},"  if",{"type":50,"tag":132,"props":6857,"children":6858},{"style":179},[6859],{"type":56,"value":6860}," (",{"type":50,"tag":132,"props":6862,"children":6863},{"style":219},[6864],{"type":56,"value":6754},{"type":50,"tag":132,"props":6866,"children":6867},{"style":173},[6868],{"type":56,"value":518},{"type":50,"tag":132,"props":6870,"children":6871},{"style":219},[6872],{"type":56,"value":6800},{"type":50,"tag":132,"props":6874,"children":6875},{"style":173},[6876],{"type":56,"value":6877}," ===",{"type":50,"tag":132,"props":6879,"children":6880},{"style":173},[6881],{"type":56,"value":317},{"type":50,"tag":132,"props":6883,"children":6884},{"style":145},[6885],{"type":56,"value":6886},"progress",{"type":50,"tag":132,"props":6888,"children":6889},{"style":173},[6890],{"type":56,"value":327},{"type":50,"tag":132,"props":6892,"children":6893},{"style":179},[6894],{"type":56,"value":6895},") ",{"type":50,"tag":132,"props":6897,"children":6898},{"style":173},[6899],{"type":56,"value":1444},{"type":50,"tag":132,"props":6901,"children":6902},{"class":134,"line":493},[6903,6908,6913,6917,6921,6925,6930,6934,6939,6943,6947],{"type":50,"tag":132,"props":6904,"children":6905},{"style":219},[6906],{"type":56,"value":6907},"    fileProgress",{"type":50,"tag":132,"props":6909,"children":6910},{"style":179},[6911],{"type":56,"value":6912},"[",{"type":50,"tag":132,"props":6914,"children":6915},{"style":219},[6916],{"type":56,"value":6754},{"type":50,"tag":132,"props":6918,"children":6919},{"style":173},[6920],{"type":56,"value":518},{"type":50,"tag":132,"props":6922,"children":6923},{"style":219},[6924],{"type":56,"value":6826},{"type":50,"tag":132,"props":6926,"children":6927},{"style":179},[6928],{"type":56,"value":6929},"] ",{"type":50,"tag":132,"props":6931,"children":6932},{"style":173},[6933],{"type":56,"value":193},{"type":50,"tag":132,"props":6935,"children":6936},{"style":219},[6937],{"type":56,"value":6938}," info",{"type":50,"tag":132,"props":6940,"children":6941},{"style":173},[6942],{"type":56,"value":518},{"type":50,"tag":132,"props":6944,"children":6945},{"style":219},[6946],{"type":56,"value":6886},{"type":50,"tag":132,"props":6948,"children":6949},{"style":173},[6950],{"type":56,"value":332},{"type":50,"tag":132,"props":6952,"children":6953},{"class":134,"line":502},[6954,6959,6963,6967,6971,6975,6979,6983,6987,6991,6995,6999,7003,7007,7011,7015,7020,7024,7029,7033,7037,7042,7047,7051],{"type":50,"tag":132,"props":6955,"children":6956},{"style":219},[6957],{"type":56,"value":6958},"    console",{"type":50,"tag":132,"props":6960,"children":6961},{"style":173},[6962],{"type":56,"value":518},{"type":50,"tag":132,"props":6964,"children":6965},{"style":376},[6966],{"type":56,"value":5275},{"type":50,"tag":132,"props":6968,"children":6969},{"style":179},[6970],{"type":56,"value":383},{"type":50,"tag":132,"props":6972,"children":6973},{"style":173},[6974],{"type":56,"value":6787},{"type":50,"tag":132,"props":6976,"children":6977},{"style":219},[6978],{"type":56,"value":6754},{"type":50,"tag":132,"props":6980,"children":6981},{"style":173},[6982],{"type":56,"value":518},{"type":50,"tag":132,"props":6984,"children":6985},{"style":219},[6986],{"type":56,"value":6826},{"type":50,"tag":132,"props":6988,"children":6989},{"style":173},[6990],{"type":56,"value":237},{"type":50,"tag":132,"props":6992,"children":6993},{"style":145},[6994],{"type":56,"value":681},{"type":50,"tag":132,"props":6996,"children":6997},{"style":173},[6998],{"type":56,"value":6813},{"type":50,"tag":132,"props":7000,"children":7001},{"style":219},[7002],{"type":56,"value":6754},{"type":50,"tag":132,"props":7004,"children":7005},{"style":173},[7006],{"type":56,"value":518},{"type":50,"tag":132,"props":7008,"children":7009},{"style":219},[7010],{"type":56,"value":6886},{"type":50,"tag":132,"props":7012,"children":7013},{"style":173},[7014],{"type":56,"value":518},{"type":50,"tag":132,"props":7016,"children":7017},{"style":376},[7018],{"type":56,"value":7019},"toFixed",{"type":50,"tag":132,"props":7021,"children":7022},{"style":219},[7023],{"type":56,"value":383},{"type":50,"tag":132,"props":7025,"children":7026},{"style":1656},[7027],{"type":56,"value":7028},"1",{"type":50,"tag":132,"props":7030,"children":7031},{"style":219},[7032],{"type":56,"value":401},{"type":50,"tag":132,"props":7034,"children":7035},{"style":173},[7036],{"type":56,"value":237},{"type":50,"tag":132,"props":7038,"children":7039},{"style":145},[7040],{"type":56,"value":7041},"%",{"type":50,"tag":132,"props":7043,"children":7044},{"style":173},[7045],{"type":56,"value":7046},"`",{"type":50,"tag":132,"props":7048,"children":7049},{"style":179},[7050],{"type":56,"value":401},{"type":50,"tag":132,"props":7052,"children":7053},{"style":173},[7054],{"type":56,"value":332},{"type":50,"tag":132,"props":7056,"children":7057},{"class":134,"line":4670},[7058],{"type":50,"tag":132,"props":7059,"children":7060},{"style":173},[7061],{"type":56,"value":7062},"  }\n",{"type":50,"tag":132,"props":7064,"children":7065},{"class":134,"line":4710},[7066],{"type":50,"tag":132,"props":7067,"children":7068},{"style":179},[7069],{"type":56,"value":6847},{"type":50,"tag":132,"props":7071,"children":7072},{"class":134,"line":4718},[7073,7077,7081,7085,7089,7093,7097,7101,7106,7110,7114],{"type":50,"tag":132,"props":7074,"children":7075},{"style":289},[7076],{"type":56,"value":6855},{"type":50,"tag":132,"props":7078,"children":7079},{"style":179},[7080],{"type":56,"value":6860},{"type":50,"tag":132,"props":7082,"children":7083},{"style":219},[7084],{"type":56,"value":6754},{"type":50,"tag":132,"props":7086,"children":7087},{"style":173},[7088],{"type":56,"value":518},{"type":50,"tag":132,"props":7090,"children":7091},{"style":219},[7092],{"type":56,"value":6800},{"type":50,"tag":132,"props":7094,"children":7095},{"style":173},[7096],{"type":56,"value":6877},{"type":50,"tag":132,"props":7098,"children":7099},{"style":173},[7100],{"type":56,"value":317},{"type":50,"tag":132,"props":7102,"children":7103},{"style":145},[7104],{"type":56,"value":7105},"done",{"type":50,"tag":132,"props":7107,"children":7108},{"style":173},[7109],{"type":56,"value":327},{"type":50,"tag":132,"props":7111,"children":7112},{"style":179},[7113],{"type":56,"value":6895},{"type":50,"tag":132,"props":7115,"children":7116},{"style":173},[7117],{"type":56,"value":1444},{"type":50,"tag":132,"props":7119,"children":7120},{"class":134,"line":4746},[7121,7125,7129,7133,7137,7141,7146,7150,7154,7158,7162,7166,7171,7175,7179],{"type":50,"tag":132,"props":7122,"children":7123},{"style":219},[7124],{"type":56,"value":6958},{"type":50,"tag":132,"props":7126,"children":7127},{"style":173},[7128],{"type":56,"value":518},{"type":50,"tag":132,"props":7130,"children":7131},{"style":376},[7132],{"type":56,"value":5275},{"type":50,"tag":132,"props":7134,"children":7135},{"style":179},[7136],{"type":56,"value":383},{"type":50,"tag":132,"props":7138,"children":7139},{"style":173},[7140],{"type":56,"value":7046},{"type":50,"tag":132,"props":7142,"children":7143},{"style":145},[7144],{"type":56,"value":7145},"✓ ",{"type":50,"tag":132,"props":7147,"children":7148},{"style":173},[7149],{"type":56,"value":6813},{"type":50,"tag":132,"props":7151,"children":7152},{"style":219},[7153],{"type":56,"value":6754},{"type":50,"tag":132,"props":7155,"children":7156},{"style":173},[7157],{"type":56,"value":518},{"type":50,"tag":132,"props":7159,"children":7160},{"style":219},[7161],{"type":56,"value":6826},{"type":50,"tag":132,"props":7163,"children":7164},{"style":173},[7165],{"type":56,"value":237},{"type":50,"tag":132,"props":7167,"children":7168},{"style":145},[7169],{"type":56,"value":7170}," complete",{"type":50,"tag":132,"props":7172,"children":7173},{"style":173},[7174],{"type":56,"value":7046},{"type":50,"tag":132,"props":7176,"children":7177},{"style":179},[7178],{"type":56,"value":401},{"type":50,"tag":132,"props":7180,"children":7181},{"style":173},[7182],{"type":56,"value":332},{"type":50,"tag":132,"props":7184,"children":7185},{"class":134,"line":4766},[7186],{"type":50,"tag":132,"props":7187,"children":7188},{"style":173},[7189],{"type":56,"value":7062},{"type":50,"tag":132,"props":7191,"children":7192},{"class":134,"line":4786},[7193],{"type":50,"tag":132,"props":7194,"children":7195},{"style":173},[7196],{"type":56,"value":7197},"}\n",{"type":50,"tag":132,"props":7199,"children":7200},{"class":134,"line":4825},[7201],{"type":50,"tag":132,"props":7202,"children":7203},{"emptyLinePlaceholder":338},[7204],{"type":56,"value":341},{"type":50,"tag":132,"props":7206,"children":7207},{"class":134,"line":4837},[7208],{"type":50,"tag":132,"props":7209,"children":7210},{"style":347},[7211],{"type":56,"value":7212},"\u002F\u002F Pass callback to pipeline\n",{"type":50,"tag":132,"props":7214,"children":7215},{"class":134,"line":4845},[7216,7220,7224,7228,7232,7236,7240,7244,7248,7252,7256,7261],{"type":50,"tag":132,"props":7217,"children":7218},{"style":185},[7219],{"type":56,"value":359},{"type":50,"tag":132,"props":7221,"children":7222},{"style":219},[7223],{"type":56,"value":1153},{"type":50,"tag":132,"props":7225,"children":7226},{"style":173},[7227],{"type":56,"value":193},{"type":50,"tag":132,"props":7229,"children":7230},{"style":289},[7231],{"type":56,"value":373},{"type":50,"tag":132,"props":7233,"children":7234},{"style":376},[7235],{"type":56,"value":302},{"type":50,"tag":132,"props":7237,"children":7238},{"style":219},[7239],{"type":56,"value":383},{"type":50,"tag":132,"props":7241,"children":7242},{"style":173},[7243],{"type":56,"value":327},{"type":50,"tag":132,"props":7245,"children":7246},{"style":145},[7247],{"type":56,"value":392},{"type":50,"tag":132,"props":7249,"children":7250},{"style":173},[7251],{"type":56,"value":327},{"type":50,"tag":132,"props":7253,"children":7254},{"style":173},[7255],{"type":56,"value":822},{"type":50,"tag":132,"props":7257,"children":7258},{"style":173},[7259],{"type":56,"value":7260}," null,",{"type":50,"tag":132,"props":7262,"children":7263},{"style":173},[7264],{"type":56,"value":922},{"type":50,"tag":132,"props":7266,"children":7267},{"class":134,"line":4894},[7268,7273,7277],{"type":50,"tag":132,"props":7269,"children":7270},{"style":179},[7271],{"type":56,"value":7272},"  progress_callback",{"type":50,"tag":132,"props":7274,"children":7275},{"style":173},[7276],{"type":56,"value":935},{"type":50,"tag":132,"props":7278,"children":7279},{"style":219},[7280],{"type":56,"value":7281}," onProgress\n",{"type":50,"tag":132,"props":7283,"children":7284},{"class":134,"line":4911},[7285,7289,7293],{"type":50,"tag":132,"props":7286,"children":7287},{"style":173},[7288],{"type":56,"value":237},{"type":50,"tag":132,"props":7290,"children":7291},{"style":219},[7292],{"type":56,"value":401},{"type":50,"tag":132,"props":7294,"children":7295},{"style":173},[7296],{"type":56,"value":332},{"type":50,"tag":59,"props":7298,"children":7299},{},[7300],{"type":50,"tag":537,"props":7301,"children":7302},{},[7303],{"type":56,"value":7304},"Progress Info Properties:",{"type":50,"tag":120,"props":7306,"children":7309},{"className":7307,"code":7308,"language":21,"meta":125,"style":125},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","interface ProgressInfo {\n  status: 'initiate' | 'download' | 'progress' | 'done' | 'ready';\n  name: string;      \u002F\u002F Model id or path\n  file: string;      \u002F\u002F File being processed\n  progress?: number; \u002F\u002F Percentage (0-100, only for 'progress' status)\n  loaded?: number;   \u002F\u002F Bytes downloaded (only for 'progress' status)\n  total?: number;    \u002F\u002F Total bytes (only for 'progress' status)\n}\n",[7310],{"type":50,"tag":128,"props":7311,"children":7312},{"__ignoreMap":125},[7313,7330,7426,7452,7477,7504,7529,7554],{"type":50,"tag":132,"props":7314,"children":7315},{"class":134,"line":135},[7316,7321,7326],{"type":50,"tag":132,"props":7317,"children":7318},{"style":185},[7319],{"type":56,"value":7320},"interface",{"type":50,"tag":132,"props":7322,"children":7323},{"style":139},[7324],{"type":56,"value":7325}," ProgressInfo",{"type":50,"tag":132,"props":7327,"children":7328},{"style":173},[7329],{"type":56,"value":922},{"type":50,"tag":132,"props":7331,"children":7332},{"class":134,"line":215},[7333,7338,7342,7346,7351,7355,7360,7364,7369,7373,7377,7381,7385,7389,7393,7397,7401,7405,7409,7413,7418,7422],{"type":50,"tag":132,"props":7334,"children":7335},{"style":179},[7336],{"type":56,"value":7337},"  status",{"type":50,"tag":132,"props":7339,"children":7340},{"style":173},[7341],{"type":56,"value":935},{"type":50,"tag":132,"props":7343,"children":7344},{"style":173},[7345],{"type":56,"value":317},{"type":50,"tag":132,"props":7347,"children":7348},{"style":145},[7349],{"type":56,"value":7350},"initiate",{"type":50,"tag":132,"props":7352,"children":7353},{"style":173},[7354],{"type":56,"value":327},{"type":50,"tag":132,"props":7356,"children":7357},{"style":173},[7358],{"type":56,"value":7359}," |",{"type":50,"tag":132,"props":7361,"children":7362},{"style":173},[7363],{"type":56,"value":317},{"type":50,"tag":132,"props":7365,"children":7366},{"style":145},[7367],{"type":56,"value":7368},"download",{"type":50,"tag":132,"props":7370,"children":7371},{"style":173},[7372],{"type":56,"value":327},{"type":50,"tag":132,"props":7374,"children":7375},{"style":173},[7376],{"type":56,"value":7359},{"type":50,"tag":132,"props":7378,"children":7379},{"style":173},[7380],{"type":56,"value":317},{"type":50,"tag":132,"props":7382,"children":7383},{"style":145},[7384],{"type":56,"value":6886},{"type":50,"tag":132,"props":7386,"children":7387},{"style":173},[7388],{"type":56,"value":327},{"type":50,"tag":132,"props":7390,"children":7391},{"style":173},[7392],{"type":56,"value":7359},{"type":50,"tag":132,"props":7394,"children":7395},{"style":173},[7396],{"type":56,"value":317},{"type":50,"tag":132,"props":7398,"children":7399},{"style":145},[7400],{"type":56,"value":7105},{"type":50,"tag":132,"props":7402,"children":7403},{"style":173},[7404],{"type":56,"value":327},{"type":50,"tag":132,"props":7406,"children":7407},{"style":173},[7408],{"type":56,"value":7359},{"type":50,"tag":132,"props":7410,"children":7411},{"style":173},[7412],{"type":56,"value":317},{"type":50,"tag":132,"props":7414,"children":7415},{"style":145},[7416],{"type":56,"value":7417},"ready",{"type":50,"tag":132,"props":7419,"children":7420},{"style":173},[7421],{"type":56,"value":327},{"type":50,"tag":132,"props":7423,"children":7424},{"style":173},[7425],{"type":56,"value":332},{"type":50,"tag":132,"props":7427,"children":7428},{"class":134,"line":245},[7429,7434,7438,7443,7447],{"type":50,"tag":132,"props":7430,"children":7431},{"style":179},[7432],{"type":56,"value":7433},"  name",{"type":50,"tag":132,"props":7435,"children":7436},{"style":173},[7437],{"type":56,"value":935},{"type":50,"tag":132,"props":7439,"children":7440},{"style":139},[7441],{"type":56,"value":7442}," string",{"type":50,"tag":132,"props":7444,"children":7445},{"style":173},[7446],{"type":56,"value":5294},{"type":50,"tag":132,"props":7448,"children":7449},{"style":347},[7450],{"type":56,"value":7451},"      \u002F\u002F Model id or path\n",{"type":50,"tag":132,"props":7453,"children":7454},{"class":134,"line":353},[7455,7460,7464,7468,7472],{"type":50,"tag":132,"props":7456,"children":7457},{"style":179},[7458],{"type":56,"value":7459},"  file",{"type":50,"tag":132,"props":7461,"children":7462},{"style":173},[7463],{"type":56,"value":935},{"type":50,"tag":132,"props":7465,"children":7466},{"style":139},[7467],{"type":56,"value":7442},{"type":50,"tag":132,"props":7469,"children":7470},{"style":173},[7471],{"type":56,"value":5294},{"type":50,"tag":132,"props":7473,"children":7474},{"style":347},[7475],{"type":56,"value":7476},"      \u002F\u002F File being processed\n",{"type":50,"tag":132,"props":7478,"children":7479},{"class":134,"line":408},[7480,7485,7490,7495,7499],{"type":50,"tag":132,"props":7481,"children":7482},{"style":179},[7483],{"type":56,"value":7484},"  progress",{"type":50,"tag":132,"props":7486,"children":7487},{"style":173},[7488],{"type":56,"value":7489},"?:",{"type":50,"tag":132,"props":7491,"children":7492},{"style":139},[7493],{"type":56,"value":7494}," number",{"type":50,"tag":132,"props":7496,"children":7497},{"style":173},[7498],{"type":56,"value":5294},{"type":50,"tag":132,"props":7500,"children":7501},{"style":347},[7502],{"type":56,"value":7503}," \u002F\u002F Percentage (0-100, only for 'progress' status)\n",{"type":50,"tag":132,"props":7505,"children":7506},{"class":134,"line":416},[7507,7512,7516,7520,7524],{"type":50,"tag":132,"props":7508,"children":7509},{"style":179},[7510],{"type":56,"value":7511},"  loaded",{"type":50,"tag":132,"props":7513,"children":7514},{"style":173},[7515],{"type":56,"value":7489},{"type":50,"tag":132,"props":7517,"children":7518},{"style":139},[7519],{"type":56,"value":7494},{"type":50,"tag":132,"props":7521,"children":7522},{"style":173},[7523],{"type":56,"value":5294},{"type":50,"tag":132,"props":7525,"children":7526},{"style":347},[7527],{"type":56,"value":7528},"   \u002F\u002F Bytes downloaded (only for 'progress' status)\n",{"type":50,"tag":132,"props":7530,"children":7531},{"class":134,"line":425},[7532,7537,7541,7545,7549],{"type":50,"tag":132,"props":7533,"children":7534},{"style":179},[7535],{"type":56,"value":7536},"  total",{"type":50,"tag":132,"props":7538,"children":7539},{"style":173},[7540],{"type":56,"value":7489},{"type":50,"tag":132,"props":7542,"children":7543},{"style":139},[7544],{"type":56,"value":7494},{"type":50,"tag":132,"props":7546,"children":7547},{"style":173},[7548],{"type":56,"value":5294},{"type":50,"tag":132,"props":7550,"children":7551},{"style":347},[7552],{"type":56,"value":7553},"    \u002F\u002F Total bytes (only for 'progress' status)\n",{"type":50,"tag":132,"props":7555,"children":7556},{"class":134,"line":476},[7557],{"type":50,"tag":132,"props":7558,"children":7559},{"style":173},[7560],{"type":56,"value":7197},{"type":50,"tag":59,"props":7562,"children":7563},{},[7564],{"type":56,"value":7565},"For complete examples including browser UIs, React components, CLI progress bars, and retry logic, see:",{"type":50,"tag":59,"props":7567,"children":7568},{},[7569],{"type":50,"tag":537,"props":7570,"children":7571},{},[7572,7573],{"type":56,"value":5847},{"type":50,"tag":553,"props":7574,"children":7576},{"href":7575},".\u002Freferences\u002FPIPELINE_OPTIONS.md#progress-callback",[7577],{"type":56,"value":7578},"Pipeline Options - Progress Callback",{"type":50,"tag":65,"props":7580,"children":7582},{"id":7581},"error-handling",[7583],{"type":56,"value":7584},"Error Handling",{"type":50,"tag":120,"props":7586,"children":7588},{"className":162,"code":7587,"language":24,"meta":125,"style":125},"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",[7589],{"type":50,"tag":128,"props":7590,"children":7591},{"__ignoreMap":125},[7592,7604,7669,7718,7739,7799,7839,7906,7946,7961,8010,8017],{"type":50,"tag":132,"props":7593,"children":7594},{"class":134,"line":135},[7595,7600],{"type":50,"tag":132,"props":7596,"children":7597},{"style":289},[7598],{"type":56,"value":7599},"try",{"type":50,"tag":132,"props":7601,"children":7602},{"style":173},[7603],{"type":56,"value":922},{"type":50,"tag":132,"props":7605,"children":7606},{"class":134,"line":215},[7607,7612,7616,7621,7625,7629,7633,7637,7641,7645,7649,7653,7657,7661,7665],{"type":50,"tag":132,"props":7608,"children":7609},{"style":185},[7610],{"type":56,"value":7611},"  const",{"type":50,"tag":132,"props":7613,"children":7614},{"style":219},[7615],{"type":56,"value":448},{"type":50,"tag":132,"props":7617,"children":7618},{"style":173},[7619],{"type":56,"value":7620}," =",{"type":50,"tag":132,"props":7622,"children":7623},{"style":289},[7624],{"type":56,"value":373},{"type":50,"tag":132,"props":7626,"children":7627},{"style":376},[7628],{"type":56,"value":302},{"type":50,"tag":132,"props":7630,"children":7631},{"style":179},[7632],{"type":56,"value":383},{"type":50,"tag":132,"props":7634,"children":7635},{"style":173},[7636],{"type":56,"value":327},{"type":50,"tag":132,"props":7638,"children":7639},{"style":145},[7640],{"type":56,"value":392},{"type":50,"tag":132,"props":7642,"children":7643},{"style":173},[7644],{"type":56,"value":327},{"type":50,"tag":132,"props":7646,"children":7647},{"style":173},[7648],{"type":56,"value":822},{"type":50,"tag":132,"props":7650,"children":7651},{"style":173},[7652],{"type":56,"value":317},{"type":50,"tag":132,"props":7654,"children":7655},{"style":145},[7656],{"type":56,"value":831},{"type":50,"tag":132,"props":7658,"children":7659},{"style":173},[7660],{"type":56,"value":327},{"type":50,"tag":132,"props":7662,"children":7663},{"style":179},[7664],{"type":56,"value":401},{"type":50,"tag":132,"props":7666,"children":7667},{"style":173},[7668],{"type":56,"value":332},{"type":50,"tag":132,"props":7670,"children":7671},{"class":134,"line":245},[7672,7676,7681,7685,7689,7693,7697,7701,7706,7710,7714],{"type":50,"tag":132,"props":7673,"children":7674},{"style":185},[7675],{"type":56,"value":7611},{"type":50,"tag":132,"props":7677,"children":7678},{"style":219},[7679],{"type":56,"value":7680}," result",{"type":50,"tag":132,"props":7682,"children":7683},{"style":173},[7684],{"type":56,"value":7620},{"type":50,"tag":132,"props":7686,"children":7687},{"style":289},[7688],{"type":56,"value":373},{"type":50,"tag":132,"props":7690,"children":7691},{"style":376},[7692],{"type":56,"value":448},{"type":50,"tag":132,"props":7694,"children":7695},{"style":179},[7696],{"type":56,"value":383},{"type":50,"tag":132,"props":7698,"children":7699},{"style":173},[7700],{"type":56,"value":327},{"type":50,"tag":132,"props":7702,"children":7703},{"style":145},[7704],{"type":56,"value":7705},"text to analyze",{"type":50,"tag":132,"props":7707,"children":7708},{"style":173},[7709],{"type":56,"value":327},{"type":50,"tag":132,"props":7711,"children":7712},{"style":179},[7713],{"type":56,"value":401},{"type":50,"tag":132,"props":7715,"children":7716},{"style":173},[7717],{"type":56,"value":332},{"type":50,"tag":132,"props":7719,"children":7720},{"class":134,"line":353},[7721,7725,7730,7735],{"type":50,"tag":132,"props":7722,"children":7723},{"style":173},[7724],{"type":56,"value":237},{"type":50,"tag":132,"props":7726,"children":7727},{"style":289},[7728],{"type":56,"value":7729}," catch",{"type":50,"tag":132,"props":7731,"children":7732},{"style":219},[7733],{"type":56,"value":7734}," (error) ",{"type":50,"tag":132,"props":7736,"children":7737},{"style":173},[7738],{"type":56,"value":1444},{"type":50,"tag":132,"props":7740,"children":7741},{"class":134,"line":408},[7742,7746,7750,7755,7759,7764,7768,7773,7777,7781,7786,7790,7795],{"type":50,"tag":132,"props":7743,"children":7744},{"style":289},[7745],{"type":56,"value":6855},{"type":50,"tag":132,"props":7747,"children":7748},{"style":179},[7749],{"type":56,"value":6860},{"type":50,"tag":132,"props":7751,"children":7752},{"style":219},[7753],{"type":56,"value":7754},"error",{"type":50,"tag":132,"props":7756,"children":7757},{"style":173},[7758],{"type":56,"value":518},{"type":50,"tag":132,"props":7760,"children":7761},{"style":219},[7762],{"type":56,"value":7763},"message",{"type":50,"tag":132,"props":7765,"children":7766},{"style":173},[7767],{"type":56,"value":518},{"type":50,"tag":132,"props":7769,"children":7770},{"style":376},[7771],{"type":56,"value":7772},"includes",{"type":50,"tag":132,"props":7774,"children":7775},{"style":179},[7776],{"type":56,"value":383},{"type":50,"tag":132,"props":7778,"children":7779},{"style":173},[7780],{"type":56,"value":327},{"type":50,"tag":132,"props":7782,"children":7783},{"style":145},[7784],{"type":56,"value":7785},"fetch",{"type":50,"tag":132,"props":7787,"children":7788},{"style":173},[7789],{"type":56,"value":327},{"type":50,"tag":132,"props":7791,"children":7792},{"style":179},[7793],{"type":56,"value":7794},")) ",{"type":50,"tag":132,"props":7796,"children":7797},{"style":173},[7798],{"type":56,"value":1444},{"type":50,"tag":132,"props":7800,"children":7801},{"class":134,"line":416},[7802,7806,7810,7814,7818,7822,7827,7831,7835],{"type":50,"tag":132,"props":7803,"children":7804},{"style":219},[7805],{"type":56,"value":6958},{"type":50,"tag":132,"props":7807,"children":7808},{"style":173},[7809],{"type":56,"value":518},{"type":50,"tag":132,"props":7811,"children":7812},{"style":376},[7813],{"type":56,"value":7754},{"type":50,"tag":132,"props":7815,"children":7816},{"style":179},[7817],{"type":56,"value":383},{"type":50,"tag":132,"props":7819,"children":7820},{"style":173},[7821],{"type":56,"value":327},{"type":50,"tag":132,"props":7823,"children":7824},{"style":145},[7825],{"type":56,"value":7826},"Model download failed. Check internet connection.",{"type":50,"tag":132,"props":7828,"children":7829},{"style":173},[7830],{"type":56,"value":327},{"type":50,"tag":132,"props":7832,"children":7833},{"style":179},[7834],{"type":56,"value":401},{"type":50,"tag":132,"props":7836,"children":7837},{"style":173},[7838],{"type":56,"value":332},{"type":50,"tag":132,"props":7840,"children":7841},{"class":134,"line":425},[7842,7847,7852,7857,7861,7865,7869,7873,7877,7881,7885,7889,7894,7898,7902],{"type":50,"tag":132,"props":7843,"children":7844},{"style":173},[7845],{"type":56,"value":7846},"  }",{"type":50,"tag":132,"props":7848,"children":7849},{"style":289},[7850],{"type":56,"value":7851}," else",{"type":50,"tag":132,"props":7853,"children":7854},{"style":289},[7855],{"type":56,"value":7856}," if",{"type":50,"tag":132,"props":7858,"children":7859},{"style":179},[7860],{"type":56,"value":6860},{"type":50,"tag":132,"props":7862,"children":7863},{"style":219},[7864],{"type":56,"value":7754},{"type":50,"tag":132,"props":7866,"children":7867},{"style":173},[7868],{"type":56,"value":518},{"type":50,"tag":132,"props":7870,"children":7871},{"style":219},[7872],{"type":56,"value":7763},{"type":50,"tag":132,"props":7874,"children":7875},{"style":173},[7876],{"type":56,"value":518},{"type":50,"tag":132,"props":7878,"children":7879},{"style":376},[7880],{"type":56,"value":7772},{"type":50,"tag":132,"props":7882,"children":7883},{"style":179},[7884],{"type":56,"value":383},{"type":50,"tag":132,"props":7886,"children":7887},{"style":173},[7888],{"type":56,"value":327},{"type":50,"tag":132,"props":7890,"children":7891},{"style":145},[7892],{"type":56,"value":7893},"ONNX",{"type":50,"tag":132,"props":7895,"children":7896},{"style":173},[7897],{"type":56,"value":327},{"type":50,"tag":132,"props":7899,"children":7900},{"style":179},[7901],{"type":56,"value":7794},{"type":50,"tag":132,"props":7903,"children":7904},{"style":173},[7905],{"type":56,"value":1444},{"type":50,"tag":132,"props":7907,"children":7908},{"class":134,"line":476},[7909,7913,7917,7921,7925,7929,7934,7938,7942],{"type":50,"tag":132,"props":7910,"children":7911},{"style":219},[7912],{"type":56,"value":6958},{"type":50,"tag":132,"props":7914,"children":7915},{"style":173},[7916],{"type":56,"value":518},{"type":50,"tag":132,"props":7918,"children":7919},{"style":376},[7920],{"type":56,"value":7754},{"type":50,"tag":132,"props":7922,"children":7923},{"style":179},[7924],{"type":56,"value":383},{"type":50,"tag":132,"props":7926,"children":7927},{"style":173},[7928],{"type":56,"value":327},{"type":50,"tag":132,"props":7930,"children":7931},{"style":145},[7932],{"type":56,"value":7933},"Model execution failed. Check model compatibility.",{"type":50,"tag":132,"props":7935,"children":7936},{"style":173},[7937],{"type":56,"value":327},{"type":50,"tag":132,"props":7939,"children":7940},{"style":179},[7941],{"type":56,"value":401},{"type":50,"tag":132,"props":7943,"children":7944},{"style":173},[7945],{"type":56,"value":332},{"type":50,"tag":132,"props":7947,"children":7948},{"class":134,"line":485},[7949,7953,7957],{"type":50,"tag":132,"props":7950,"children":7951},{"style":173},[7952],{"type":56,"value":7846},{"type":50,"tag":132,"props":7954,"children":7955},{"style":289},[7956],{"type":56,"value":7851},{"type":50,"tag":132,"props":7958,"children":7959},{"style":173},[7960],{"type":56,"value":922},{"type":50,"tag":132,"props":7962,"children":7963},{"class":134,"line":493},[7964,7968,7972,7976,7980,7984,7989,7993,7997,8002,8006],{"type":50,"tag":132,"props":7965,"children":7966},{"style":219},[7967],{"type":56,"value":6958},{"type":50,"tag":132,"props":7969,"children":7970},{"style":173},[7971],{"type":56,"value":518},{"type":50,"tag":132,"props":7973,"children":7974},{"style":376},[7975],{"type":56,"value":7754},{"type":50,"tag":132,"props":7977,"children":7978},{"style":179},[7979],{"type":56,"value":383},{"type":50,"tag":132,"props":7981,"children":7982},{"style":173},[7983],{"type":56,"value":327},{"type":50,"tag":132,"props":7985,"children":7986},{"style":145},[7987],{"type":56,"value":7988},"Unknown error:",{"type":50,"tag":132,"props":7990,"children":7991},{"style":173},[7992],{"type":56,"value":327},{"type":50,"tag":132,"props":7994,"children":7995},{"style":173},[7996],{"type":56,"value":822},{"type":50,"tag":132,"props":7998,"children":7999},{"style":219},[8000],{"type":56,"value":8001}," error",{"type":50,"tag":132,"props":8003,"children":8004},{"style":179},[8005],{"type":56,"value":401},{"type":50,"tag":132,"props":8007,"children":8008},{"style":173},[8009],{"type":56,"value":332},{"type":50,"tag":132,"props":8011,"children":8012},{"class":134,"line":502},[8013],{"type":50,"tag":132,"props":8014,"children":8015},{"style":173},[8016],{"type":56,"value":7062},{"type":50,"tag":132,"props":8018,"children":8019},{"class":134,"line":4670},[8020],{"type":50,"tag":132,"props":8021,"children":8022},{"style":173},[8023],{"type":56,"value":7197},{"type":50,"tag":65,"props":8025,"children":8027},{"id":8026},"performance-tips",[8028],{"type":56,"value":8029},"Performance Tips",{"type":50,"tag":4968,"props":8031,"children":8032},{},[8033,8043,8067,8076,8097,8107,8125],{"type":50,"tag":81,"props":8034,"children":8035},{},[8036,8041],{"type":50,"tag":537,"props":8037,"children":8038},{},[8039],{"type":56,"value":8040},"Reuse Pipelines",{"type":56,"value":8042},": Create pipeline once, reuse for multiple inferences",{"type":50,"tag":81,"props":8044,"children":8045},{},[8046,8051,8053,8058,8060,8065],{"type":50,"tag":537,"props":8047,"children":8048},{},[8049],{"type":56,"value":8050},"Use Quantization",{"type":56,"value":8052},": Start with ",{"type":50,"tag":128,"props":8054,"children":8056},{"className":8055},[],[8057],{"type":56,"value":4491},{"type":56,"value":8059}," or ",{"type":50,"tag":128,"props":8061,"children":8063},{"className":8062},[],[8064],{"type":56,"value":1077},{"type":56,"value":8066}," for faster inference",{"type":50,"tag":81,"props":8068,"children":8069},{},[8070,8074],{"type":50,"tag":537,"props":8071,"children":8072},{},[8073],{"type":56,"value":6164},{"type":56,"value":8075},": Process multiple inputs together when possible",{"type":50,"tag":81,"props":8077,"children":8078},{},[8079,8084,8086,8095],{"type":50,"tag":537,"props":8080,"children":8081},{},[8082],{"type":56,"value":8083},"Cache Models",{"type":56,"value":8085},": Models are cached automatically (see ",{"type":50,"tag":537,"props":8087,"children":8088},{},[8089],{"type":50,"tag":553,"props":8090,"children":8092},{"href":8091},".\u002Freferences\u002FCACHE.md",[8093],{"type":56,"value":8094},"Caching Reference",{"type":56,"value":8096}," for details on browser Cache API, Node.js filesystem cache, and custom implementations)",{"type":50,"tag":81,"props":8098,"children":8099},{},[8100,8105],{"type":50,"tag":537,"props":8101,"children":8102},{},[8103],{"type":56,"value":8104},"WebGPU for Large Models",{"type":56,"value":8106},": Use WebGPU for models that benefit from GPU acceleration",{"type":50,"tag":81,"props":8108,"children":8109},{},[8110,8115,8117,8123],{"type":50,"tag":537,"props":8111,"children":8112},{},[8113],{"type":56,"value":8114},"Prune Context",{"type":56,"value":8116},": For text generation, limit ",{"type":50,"tag":128,"props":8118,"children":8120},{"className":8119},[],[8121],{"type":56,"value":8122},"max_new_tokens",{"type":56,"value":8124}," to avoid memory issues",{"type":50,"tag":81,"props":8126,"children":8127},{},[8128,8133,8135,8140],{"type":50,"tag":537,"props":8129,"children":8130},{},[8131],{"type":56,"value":8132},"Clean Up Resources",{"type":56,"value":8134},": Call ",{"type":50,"tag":128,"props":8136,"children":8138},{"className":8137},[],[8139],{"type":56,"value":549},{"type":56,"value":8141}," when done to free memory",{"type":50,"tag":65,"props":8143,"children":8145},{"id":8144},"memory-management",[8146],{"type":56,"value":8147},"Memory Management",{"type":50,"tag":59,"props":8149,"children":8150},{},[8151,8156,8158,8163],{"type":50,"tag":537,"props":8152,"children":8153},{},[8154],{"type":56,"value":8155},"IMPORTANT:",{"type":56,"value":8157}," Always call ",{"type":50,"tag":128,"props":8159,"children":8161},{"className":8160},[],[8162],{"type":56,"value":549},{"type":56,"value":8164}," when finished to prevent memory leaks.",{"type":50,"tag":120,"props":8166,"children":8168},{"className":162,"code":8167,"language":24,"meta":125,"style":125},"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",[8169],{"type":50,"tag":128,"props":8170,"children":8171},{"__ignoreMap":125},[8172,8219,8267],{"type":50,"tag":132,"props":8173,"children":8174},{"class":134,"line":135},[8175,8179,8183,8187,8191,8195,8199,8203,8207,8211,8215],{"type":50,"tag":132,"props":8176,"children":8177},{"style":185},[8178],{"type":56,"value":359},{"type":50,"tag":132,"props":8180,"children":8181},{"style":219},[8182],{"type":56,"value":364},{"type":50,"tag":132,"props":8184,"children":8185},{"style":173},[8186],{"type":56,"value":193},{"type":50,"tag":132,"props":8188,"children":8189},{"style":289},[8190],{"type":56,"value":373},{"type":50,"tag":132,"props":8192,"children":8193},{"style":376},[8194],{"type":56,"value":302},{"type":50,"tag":132,"props":8196,"children":8197},{"style":219},[8198],{"type":56,"value":383},{"type":50,"tag":132,"props":8200,"children":8201},{"style":173},[8202],{"type":56,"value":327},{"type":50,"tag":132,"props":8204,"children":8205},{"style":145},[8206],{"type":56,"value":392},{"type":50,"tag":132,"props":8208,"children":8209},{"style":173},[8210],{"type":56,"value":327},{"type":50,"tag":132,"props":8212,"children":8213},{"style":219},[8214],{"type":56,"value":401},{"type":50,"tag":132,"props":8216,"children":8217},{"style":173},[8218],{"type":56,"value":332},{"type":50,"tag":132,"props":8220,"children":8221},{"class":134,"line":215},[8222,8226,8230,8234,8238,8242,8246,8250,8255,8259,8263],{"type":50,"tag":132,"props":8223,"children":8224},{"style":185},[8225],{"type":56,"value":359},{"type":50,"tag":132,"props":8227,"children":8228},{"style":219},[8229],{"type":56,"value":435},{"type":50,"tag":132,"props":8231,"children":8232},{"style":173},[8233],{"type":56,"value":193},{"type":50,"tag":132,"props":8235,"children":8236},{"style":289},[8237],{"type":56,"value":373},{"type":50,"tag":132,"props":8239,"children":8240},{"style":376},[8241],{"type":56,"value":448},{"type":50,"tag":132,"props":8243,"children":8244},{"style":219},[8245],{"type":56,"value":383},{"type":50,"tag":132,"props":8247,"children":8248},{"style":173},[8249],{"type":56,"value":327},{"type":50,"tag":132,"props":8251,"children":8252},{"style":145},[8253],{"type":56,"value":8254},"Great product!",{"type":50,"tag":132,"props":8256,"children":8257},{"style":173},[8258],{"type":56,"value":327},{"type":50,"tag":132,"props":8260,"children":8261},{"style":219},[8262],{"type":56,"value":401},{"type":50,"tag":132,"props":8264,"children":8265},{"style":173},[8266],{"type":56,"value":332},{"type":50,"tag":132,"props":8268,"children":8269},{"class":134,"line":245},[8270,8274,8278,8282,8286,8290,8294],{"type":50,"tag":132,"props":8271,"children":8272},{"style":289},[8273],{"type":56,"value":508},{"type":50,"tag":132,"props":8275,"children":8276},{"style":219},[8277],{"type":56,"value":448},{"type":50,"tag":132,"props":8279,"children":8280},{"style":173},[8281],{"type":56,"value":518},{"type":50,"tag":132,"props":8283,"children":8284},{"style":376},[8285],{"type":56,"value":523},{"type":50,"tag":132,"props":8287,"children":8288},{"style":219},[8289],{"type":56,"value":528},{"type":50,"tag":132,"props":8291,"children":8292},{"style":173},[8293],{"type":56,"value":5294},{"type":50,"tag":132,"props":8295,"children":8296},{"style":347},[8297],{"type":56,"value":8298},"  \u002F\u002F ✓ Free memory (100MB - several GB per model)\n",{"type":50,"tag":59,"props":8300,"children":8301},{},[8302],{"type":50,"tag":537,"props":8303,"children":8304},{},[8305],{"type":56,"value":8306},"When to dispose:",{"type":50,"tag":77,"props":8308,"children":8309},{},[8310,8315,8320],{"type":50,"tag":81,"props":8311,"children":8312},{},[8313],{"type":56,"value":8314},"Application shutdown or component unmount",{"type":50,"tag":81,"props":8316,"children":8317},{},[8318],{"type":56,"value":8319},"Before loading a different model",{"type":50,"tag":81,"props":8321,"children":8322},{},[8323],{"type":56,"value":8324},"After batch processing in long-running apps",{"type":50,"tag":59,"props":8326,"children":8327},{},[8328],{"type":56,"value":8329},"Models consume significant memory and hold GPU\u002FCPU resources. Disposal is critical for browser memory limits and server stability.",{"type":50,"tag":59,"props":8331,"children":8332},{},[8333,8335],{"type":56,"value":8334},"For detailed patterns (React cleanup, servers, browser), see ",{"type":50,"tag":537,"props":8336,"children":8337},{},[8338],{"type":50,"tag":553,"props":8339,"children":8340},{"href":555},[8341],{"type":56,"value":558},{"type":50,"tag":65,"props":8343,"children":8345},{"id":8344},"troubleshooting",[8346],{"type":56,"value":8347},"Troubleshooting",{"type":50,"tag":113,"props":8349,"children":8351},{"id":8350},"model-not-found",[8352],{"type":56,"value":8353},"Model Not Found",{"type":50,"tag":77,"props":8355,"children":8356},{},[8357,8362,8367],{"type":50,"tag":81,"props":8358,"children":8359},{},[8360],{"type":56,"value":8361},"Verify model exists on Hugging Face Hub",{"type":50,"tag":81,"props":8363,"children":8364},{},[8365],{"type":56,"value":8366},"Check model name spelling",{"type":50,"tag":81,"props":8368,"children":8369},{},[8370,8372,8377],{"type":56,"value":8371},"Ensure model has ONNX files (look for ",{"type":50,"tag":128,"props":8373,"children":8375},{"className":8374},[],[8376],{"type":56,"value":4996},{"type":56,"value":4998},{"type":50,"tag":113,"props":8379,"children":8381},{"id":8380},"memory-issues",[8382],{"type":56,"value":8383},"Memory Issues",{"type":50,"tag":77,"props":8385,"children":8386},{},[8387,8399,8404],{"type":50,"tag":81,"props":8388,"children":8389},{},[8390,8392,8398],{"type":56,"value":8391},"Use smaller models or quantized versions (",{"type":50,"tag":128,"props":8393,"children":8395},{"className":8394},[],[8396],{"type":56,"value":8397},"dtype: 'q4'",{"type":56,"value":401},{"type":50,"tag":81,"props":8400,"children":8401},{},[8402],{"type":56,"value":8403},"Reduce batch size",{"type":50,"tag":81,"props":8405,"children":8406},{},[8407,8409],{"type":56,"value":8408},"Limit sequence length with ",{"type":50,"tag":128,"props":8410,"children":8412},{"className":8411},[],[8413],{"type":56,"value":8414},"max_length",{"type":50,"tag":113,"props":8416,"children":8418},{"id":8417},"webgpu-errors",[8419],{"type":56,"value":8420},"WebGPU Errors",{"type":50,"tag":77,"props":8422,"children":8423},{},[8424,8429,8449],{"type":50,"tag":81,"props":8425,"children":8426},{},[8427],{"type":56,"value":8428},"Check browser compatibility (Chrome 113+, Edge 113+)",{"type":50,"tag":81,"props":8430,"children":8431},{},[8432,8434,8440,8442,8447],{"type":56,"value":8433},"Try ",{"type":50,"tag":128,"props":8435,"children":8437},{"className":8436},[],[8438],{"type":56,"value":8439},"dtype: 'fp16'",{"type":56,"value":8441}," if ",{"type":50,"tag":128,"props":8443,"children":8445},{"className":8444},[],[8446],{"type":56,"value":4469},{"type":56,"value":8448}," fails",{"type":50,"tag":81,"props":8450,"children":8451},{},[8452],{"type":56,"value":8453},"Fall back to WASM if WebGPU unavailable",{"type":50,"tag":65,"props":8455,"children":8457},{"id":8456},"reference-documentation",[8458],{"type":56,"value":8459},"Reference Documentation",{"type":50,"tag":113,"props":8461,"children":8463},{"id":8462},"this-skill",[8464],{"type":56,"value":8465},"This Skill",{"type":50,"tag":77,"props":8467,"children":8468},{},[8469,8513,8532,8544,8556,8570],{"type":50,"tag":81,"props":8470,"children":8471},{},[8472,8481,8483,8488,8490,8496,8498,8504,8505,8511],{"type":50,"tag":537,"props":8473,"children":8474},{},[8475],{"type":50,"tag":553,"props":8476,"children":8478},{"href":8477},".\u002Freferences\u002FPIPELINE_OPTIONS.md",[8479],{"type":56,"value":8480},"Pipeline Options",{"type":56,"value":8482}," - Configure ",{"type":50,"tag":128,"props":8484,"children":8486},{"className":8485},[],[8487],{"type":56,"value":6640},{"type":56,"value":8489}," with ",{"type":50,"tag":128,"props":8491,"children":8493},{"className":8492},[],[8494],{"type":56,"value":8495},"progress_callback",{"type":56,"value":8497},", ",{"type":50,"tag":128,"props":8499,"children":8501},{"className":8500},[],[8502],{"type":56,"value":8503},"device",{"type":56,"value":8497},{"type":50,"tag":128,"props":8506,"children":8508},{"className":8507},[],[8509],{"type":56,"value":8510},"dtype",{"type":56,"value":8512},", etc.",{"type":50,"tag":81,"props":8514,"children":8515},{},[8516,8523,8525,8530],{"type":50,"tag":537,"props":8517,"children":8518},{},[8519],{"type":50,"tag":553,"props":8520,"children":8521},{"href":5850},[8522],{"type":56,"value":5853},{"type":56,"value":8524}," - Global ",{"type":50,"tag":128,"props":8526,"children":8528},{"className":8527},[],[8529],{"type":56,"value":5175},{"type":56,"value":8531}," configuration for caching and model loading",{"type":50,"tag":81,"props":8533,"children":8534},{},[8535,8542],{"type":50,"tag":537,"props":8536,"children":8537},{},[8538],{"type":50,"tag":553,"props":8539,"children":8540},{"href":8091},[8541],{"type":56,"value":8094},{"type":56,"value":8543}," - Browser Cache API, Node.js filesystem cache, and custom cache implementations",{"type":50,"tag":81,"props":8545,"children":8546},{},[8547,8554],{"type":50,"tag":537,"props":8548,"children":8549},{},[8550],{"type":50,"tag":553,"props":8551,"children":8552},{"href":1711},[8553],{"type":56,"value":1714},{"type":56,"value":8555}," - Streaming, chat format, and generation parameters",{"type":50,"tag":81,"props":8557,"children":8558},{},[8559,8568],{"type":50,"tag":537,"props":8560,"children":8561},{},[8562],{"type":50,"tag":553,"props":8563,"children":8565},{"href":8564},".\u002Freferences\u002FMODEL_ARCHITECTURES.md",[8566],{"type":56,"value":8567},"Model Architectures",{"type":56,"value":8569}," - Supported models and selection tips",{"type":50,"tag":81,"props":8571,"children":8572},{},[8573,8580],{"type":50,"tag":537,"props":8574,"children":8575},{},[8576],{"type":50,"tag":553,"props":8577,"children":8578},{"href":555},[8579],{"type":56,"value":558},{"type":56,"value":8581}," - Real-world implementations for different runtimes",{"type":50,"tag":113,"props":8583,"children":8585},{"id":8584},"official-transformersjs",[8586],{"type":56,"value":8587},"Official Transformers.js",{"type":50,"tag":77,"props":8589,"children":8590},{},[8591,8602,8613,8624,8634],{"type":50,"tag":81,"props":8592,"children":8593},{},[8594,8596],{"type":56,"value":8595},"Official docs: ",{"type":50,"tag":553,"props":8597,"children":8600},{"href":8598,"rel":8599},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js",[686],[8601],{"type":56,"value":8598},{"type":50,"tag":81,"props":8603,"children":8604},{},[8605,8607],{"type":56,"value":8606},"API reference: ",{"type":50,"tag":553,"props":8608,"children":8611},{"href":8609,"rel":8610},"https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers.js\u002Fapi\u002Fpipelines",[686],[8612],{"type":56,"value":8609},{"type":50,"tag":81,"props":8614,"children":8615},{},[8616,8618],{"type":56,"value":8617},"Model hub: ",{"type":50,"tag":553,"props":8619,"children":8622},{"href":8620,"rel":8621},"https:\u002F\u002Fhuggingface.co\u002Fmodels?library=transformers.js",[686],[8623],{"type":56,"value":8620},{"type":50,"tag":81,"props":8625,"children":8626},{},[8627,8629],{"type":56,"value":8628},"GitHub: ",{"type":50,"tag":553,"props":8630,"children":8632},{"href":45,"rel":8631},[686],[8633],{"type":56,"value":45},{"type":50,"tag":81,"props":8635,"children":8636},{},[8637,8639],{"type":56,"value":8638},"Examples: ",{"type":50,"tag":553,"props":8640,"children":8643},{"href":8641,"rel":8642},"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js\u002Ftree\u002Fmain\u002Fexamples",[686],[8644],{"type":56,"value":8641},{"type":50,"tag":65,"props":8646,"children":8648},{"id":8647},"best-practices",[8649],{"type":56,"value":8650},"Best Practices",{"type":50,"tag":4968,"props":8652,"children":8653},{},[8654,8670,8680,8690,8700,8710,8719,8729,8739,8749],{"type":50,"tag":81,"props":8655,"children":8656},{},[8657,8662,8663,8668],{"type":50,"tag":537,"props":8658,"children":8659},{},[8660],{"type":56,"value":8661},"Always Dispose Pipelines",{"type":56,"value":8134},{"type":50,"tag":128,"props":8664,"children":8666},{"className":8665},[],[8667],{"type":56,"value":549},{"type":56,"value":8669}," when done - critical for preventing memory leaks",{"type":50,"tag":81,"props":8671,"children":8672},{},[8673,8678],{"type":50,"tag":537,"props":8674,"children":8675},{},[8676],{"type":56,"value":8677},"Start with Pipelines",{"type":56,"value":8679},": Use the pipeline API unless you need fine-grained control",{"type":50,"tag":81,"props":8681,"children":8682},{},[8683,8688],{"type":50,"tag":537,"props":8684,"children":8685},{},[8686],{"type":56,"value":8687},"Test Locally First",{"type":56,"value":8689},": Test models with small inputs before deploying",{"type":50,"tag":81,"props":8691,"children":8692},{},[8693,8698],{"type":50,"tag":537,"props":8694,"children":8695},{},[8696],{"type":56,"value":8697},"Monitor Model Sizes",{"type":56,"value":8699},": Be aware of model download sizes for web applications",{"type":50,"tag":81,"props":8701,"children":8702},{},[8703,8708],{"type":50,"tag":537,"props":8704,"children":8705},{},[8706],{"type":56,"value":8707},"Handle Loading States",{"type":56,"value":8709},": Show progress indicators for better UX",{"type":50,"tag":81,"props":8711,"children":8712},{},[8713,8717],{"type":50,"tag":537,"props":8714,"children":8715},{},[8716],{"type":56,"value":5050},{"type":56,"value":8718},": Pin specific model versions for production stability",{"type":50,"tag":81,"props":8720,"children":8721},{},[8722,8727],{"type":50,"tag":537,"props":8723,"children":8724},{},[8725],{"type":56,"value":8726},"Error Boundaries",{"type":56,"value":8728},": Always wrap pipeline calls in try-catch blocks",{"type":50,"tag":81,"props":8730,"children":8731},{},[8732,8737],{"type":50,"tag":537,"props":8733,"children":8734},{},[8735],{"type":56,"value":8736},"Progressive Enhancement",{"type":56,"value":8738},": Provide fallbacks for unsupported browsers",{"type":50,"tag":81,"props":8740,"children":8741},{},[8742,8747],{"type":50,"tag":537,"props":8743,"children":8744},{},[8745],{"type":56,"value":8746},"Reuse Models",{"type":56,"value":8748},": Load once, use many times - don't recreate pipelines unnecessarily",{"type":50,"tag":81,"props":8750,"children":8751},{},[8752,8757],{"type":50,"tag":537,"props":8753,"children":8754},{},[8755],{"type":56,"value":8756},"Graceful Shutdown",{"type":56,"value":8758},": Dispose models on SIGTERM\u002FSIGINT in servers",{"type":50,"tag":65,"props":8760,"children":8762},{"id":8761},"quick-reference-task-ids",[8763],{"type":56,"value":8764},"Quick Reference: Task IDs",{"type":50,"tag":4067,"props":8766,"children":8767},{},[8768,8783],{"type":50,"tag":4071,"props":8769,"children":8770},{},[8771],{"type":50,"tag":4075,"props":8772,"children":8773},{},[8774,8778],{"type":50,"tag":4079,"props":8775,"children":8776},{},[8777],{"type":56,"value":4083},{"type":50,"tag":4079,"props":8779,"children":8780},{},[8781],{"type":56,"value":8782},"Task ID",{"type":50,"tag":4090,"props":8784,"children":8785},{},[8786,8808,8831,8847,8864,8879,8894,8910,8927,8943,8959,8975,8991,9007,9024,9040,9056,9072,9088,9111,9127,9143,9159],{"type":50,"tag":4075,"props":8787,"children":8788},{},[8789,8794],{"type":50,"tag":4097,"props":8790,"children":8791},{},[8792],{"type":56,"value":8793},"Text classification",{"type":50,"tag":4097,"props":8795,"children":8796},{},[8797,8802,8803],{"type":50,"tag":128,"props":8798,"children":8800},{"className":8799},[],[8801],{"type":56,"value":1131},{"type":56,"value":8059},{"type":50,"tag":128,"props":8804,"children":8806},{"className":8805},[],[8807],{"type":56,"value":392},{"type":50,"tag":4075,"props":8809,"children":8810},{},[8811,8816],{"type":50,"tag":4097,"props":8812,"children":8813},{},[8814],{"type":56,"value":8815},"Token classification",{"type":50,"tag":4097,"props":8817,"children":8818},{},[8819,8824,8825],{"type":50,"tag":128,"props":8820,"children":8822},{"className":8821},[],[8823],{"type":56,"value":1287},{"type":56,"value":8059},{"type":50,"tag":128,"props":8826,"children":8828},{"className":8827},[],[8829],{"type":56,"value":8830},"ner",{"type":50,"tag":4075,"props":8832,"children":8833},{},[8834,8839],{"type":50,"tag":4097,"props":8835,"children":8836},{},[8837],{"type":56,"value":8838},"Question answering",{"type":50,"tag":4097,"props":8840,"children":8841},{},[8842],{"type":50,"tag":128,"props":8843,"children":8845},{"className":8844},[],[8846],{"type":56,"value":1352},{"type":50,"tag":4075,"props":8848,"children":8849},{},[8850,8855],{"type":50,"tag":4097,"props":8851,"children":8852},{},[8853],{"type":56,"value":8854},"Fill mask",{"type":50,"tag":4097,"props":8856,"children":8857},{},[8858],{"type":50,"tag":128,"props":8859,"children":8861},{"className":8860},[],[8862],{"type":56,"value":8863},"fill-mask",{"type":50,"tag":4075,"props":8865,"children":8866},{},[8867,8871],{"type":50,"tag":4097,"props":8868,"children":8869},{},[8870],{"type":56,"value":1953},{"type":50,"tag":4097,"props":8872,"children":8873},{},[8874],{"type":50,"tag":128,"props":8875,"children":8877},{"className":8876},[],[8878],{"type":56,"value":1950},{"type":50,"tag":4075,"props":8880,"children":8881},{},[8882,8886],{"type":50,"tag":4097,"props":8883,"children":8884},{},[8885],{"type":56,"value":1756},{"type":50,"tag":4097,"props":8887,"children":8888},{},[8889],{"type":50,"tag":128,"props":8890,"children":8892},{"className":8891},[],[8893],{"type":56,"value":1753},{"type":50,"tag":4075,"props":8895,"children":8896},{},[8897,8902],{"type":50,"tag":4097,"props":8898,"children":8899},{},[8900],{"type":56,"value":8901},"Text generation",{"type":50,"tag":4097,"props":8903,"children":8904},{},[8905],{"type":50,"tag":128,"props":8906,"children":8908},{"className":8907},[],[8909],{"type":56,"value":1516},{"type":50,"tag":4075,"props":8911,"children":8912},{},[8913,8918],{"type":50,"tag":4097,"props":8914,"children":8915},{},[8916],{"type":56,"value":8917},"Text-to-text generation",{"type":50,"tag":4097,"props":8919,"children":8920},{},[8921],{"type":50,"tag":128,"props":8922,"children":8924},{"className":8923},[],[8925],{"type":56,"value":8926},"text2text-generation",{"type":50,"tag":4075,"props":8928,"children":8929},{},[8930,8935],{"type":50,"tag":4097,"props":8931,"children":8932},{},[8933],{"type":56,"value":8934},"Zero-shot classification",{"type":50,"tag":4097,"props":8936,"children":8937},{},[8938],{"type":50,"tag":128,"props":8939,"children":8941},{"className":8940},[],[8942],{"type":56,"value":2101},{"type":50,"tag":4075,"props":8944,"children":8945},{},[8946,8951],{"type":50,"tag":4097,"props":8947,"children":8948},{},[8949],{"type":56,"value":8950},"Image classification",{"type":50,"tag":4097,"props":8952,"children":8953},{},[8954],{"type":50,"tag":128,"props":8955,"children":8957},{"className":8956},[],[8958],{"type":56,"value":2270},{"type":50,"tag":4075,"props":8960,"children":8961},{},[8962,8967],{"type":50,"tag":4097,"props":8963,"children":8964},{},[8965],{"type":56,"value":8966},"Image segmentation",{"type":50,"tag":4097,"props":8968,"children":8969},{},[8970],{"type":50,"tag":128,"props":8971,"children":8973},{"className":8972},[],[8974],{"type":56,"value":2536},{"type":50,"tag":4075,"props":8976,"children":8977},{},[8978,8983],{"type":50,"tag":4097,"props":8979,"children":8980},{},[8981],{"type":56,"value":8982},"Object detection",{"type":50,"tag":4097,"props":8984,"children":8985},{},[8986],{"type":50,"tag":128,"props":8987,"children":8989},{"className":8988},[],[8990],{"type":56,"value":2418},{"type":50,"tag":4075,"props":8992,"children":8993},{},[8994,8999],{"type":50,"tag":4097,"props":8995,"children":8996},{},[8997],{"type":56,"value":8998},"Depth estimation",{"type":50,"tag":4097,"props":9000,"children":9001},{},[9002],{"type":50,"tag":128,"props":9003,"children":9005},{"className":9004},[],[9006],{"type":56,"value":2646},{"type":50,"tag":4075,"props":9008,"children":9009},{},[9010,9015],{"type":50,"tag":4097,"props":9011,"children":9012},{},[9013],{"type":56,"value":9014},"Image-to-image",{"type":50,"tag":4097,"props":9016,"children":9017},{},[9018],{"type":50,"tag":128,"props":9019,"children":9021},{"className":9020},[],[9022],{"type":56,"value":9023},"image-to-image",{"type":50,"tag":4075,"props":9025,"children":9026},{},[9027,9032],{"type":50,"tag":4097,"props":9028,"children":9029},{},[9030],{"type":56,"value":9031},"Zero-shot image classification",{"type":50,"tag":4097,"props":9033,"children":9034},{},[9035],{"type":50,"tag":128,"props":9036,"children":9038},{"className":9037},[],[9039],{"type":56,"value":2756},{"type":50,"tag":4075,"props":9041,"children":9042},{},[9043,9048],{"type":50,"tag":4097,"props":9044,"children":9045},{},[9046],{"type":56,"value":9047},"Zero-shot object detection",{"type":50,"tag":4097,"props":9049,"children":9050},{},[9051],{"type":50,"tag":128,"props":9052,"children":9054},{"className":9053},[],[9055],{"type":56,"value":3554},{"type":50,"tag":4075,"props":9057,"children":9058},{},[9059,9064],{"type":50,"tag":4097,"props":9060,"children":9061},{},[9062],{"type":56,"value":9063},"Automatic speech recognition",{"type":50,"tag":4097,"props":9065,"children":9066},{},[9067],{"type":50,"tag":128,"props":9068,"children":9070},{"className":9069},[],[9071],{"type":56,"value":2925},{"type":50,"tag":4075,"props":9073,"children":9074},{},[9075,9080],{"type":50,"tag":4097,"props":9076,"children":9077},{},[9078],{"type":56,"value":9079},"Audio classification",{"type":50,"tag":4097,"props":9081,"children":9082},{},[9083],{"type":50,"tag":128,"props":9084,"children":9086},{"className":9085},[],[9087],{"type":56,"value":3043},{"type":50,"tag":4075,"props":9089,"children":9090},{},[9091,9096],{"type":50,"tag":4097,"props":9092,"children":9093},{},[9094],{"type":56,"value":9095},"Text-to-speech",{"type":50,"tag":4097,"props":9097,"children":9098},{},[9099,9104,9105],{"type":50,"tag":128,"props":9100,"children":9102},{"className":9101},[],[9103],{"type":56,"value":3150},{"type":56,"value":8059},{"type":50,"tag":128,"props":9106,"children":9108},{"className":9107},[],[9109],{"type":56,"value":9110},"text-to-audio",{"type":50,"tag":4075,"props":9112,"children":9113},{},[9114,9119],{"type":50,"tag":4097,"props":9115,"children":9116},{},[9117],{"type":56,"value":9118},"Image-to-text",{"type":50,"tag":4097,"props":9120,"children":9121},{},[9122],{"type":50,"tag":128,"props":9123,"children":9125},{"className":9124},[],[9126],{"type":56,"value":3363},{"type":50,"tag":4075,"props":9128,"children":9129},{},[9130,9135],{"type":50,"tag":4097,"props":9131,"children":9132},{},[9133],{"type":56,"value":9134},"Document question answering",{"type":50,"tag":4097,"props":9136,"children":9137},{},[9138],{"type":50,"tag":128,"props":9139,"children":9141},{"className":9140},[],[9142],{"type":56,"value":3427},{"type":50,"tag":4075,"props":9144,"children":9145},{},[9146,9151],{"type":50,"tag":4097,"props":9147,"children":9148},{},[9149],{"type":56,"value":9150},"Feature extraction",{"type":50,"tag":4097,"props":9152,"children":9153},{},[9154],{"type":50,"tag":128,"props":9155,"children":9157},{"className":9156},[],[9158],{"type":56,"value":3763},{"type":50,"tag":4075,"props":9160,"children":9161},{},[9162,9167],{"type":50,"tag":4097,"props":9163,"children":9164},{},[9165],{"type":56,"value":9166},"Sentence similarity",{"type":50,"tag":4097,"props":9168,"children":9169},{},[9170],{"type":50,"tag":128,"props":9171,"children":9173},{"className":9172},[],[9174],{"type":56,"value":9175},"sentence-similarity",{"type":50,"tag":9177,"props":9178,"children":9179},"hr",{},[],{"type":50,"tag":59,"props":9181,"children":9182},{},[9183],{"type":56,"value":9184},"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":50,"tag":9186,"props":9187,"children":9188},"style",{},[9189],{"type":56,"value":9190},"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":9192,"total":9397},[9193,9214,9237,9254,9270,9289,9308,9324,9340,9354,9366,9381],{"slug":9194,"name":9194,"fn":9195,"description":9196,"org":9197,"tags":9198,"stars":9211,"repoUrl":9212,"updatedAt":9213},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9199,9202,9205,9208],{"name":9200,"slug":9201,"type":15},"Documents","documents",{"name":9203,"slug":9204,"type":15},"Healthcare","healthcare",{"name":9206,"slug":9207,"type":15},"Insurance","insurance",{"name":9209,"slug":9210,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":9215,"name":9215,"fn":9216,"description":9217,"org":9218,"tags":9219,"stars":9234,"repoUrl":9235,"updatedAt":9236},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9220,9223,9225,9228,9231],{"name":9221,"slug":9222,"type":15},".NET","dotnet",{"name":9224,"slug":9215,"type":15},"ASP.NET Core",{"name":9226,"slug":9227,"type":15},"Blazor","blazor",{"name":9229,"slug":9230,"type":15},"C#","csharp",{"name":9232,"slug":9233,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":9238,"name":9238,"fn":9239,"description":9240,"org":9241,"tags":9242,"stars":9234,"repoUrl":9235,"updatedAt":9253},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9243,9246,9249,9252],{"name":9244,"slug":9245,"type":15},"Apps SDK","apps-sdk",{"name":9247,"slug":9248,"type":15},"ChatGPT","chatgpt",{"name":9250,"slug":9251,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":9255,"name":9255,"fn":9256,"description":9257,"org":9258,"tags":9259,"stars":9234,"repoUrl":9235,"updatedAt":9269},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9260,9263,9266],{"name":9261,"slug":9262,"type":15},"API Development","api-development",{"name":9264,"slug":9265,"type":15},"CLI","cli",{"name":9267,"slug":9268,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":9271,"name":9271,"fn":9272,"description":9273,"org":9274,"tags":9275,"stars":9234,"repoUrl":9235,"updatedAt":9288},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9276,9279,9282,9285],{"name":9277,"slug":9278,"type":15},"Cloudflare","cloudflare",{"name":9280,"slug":9281,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":9283,"slug":9284,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":9286,"slug":9287,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":9290,"name":9290,"fn":9291,"description":9292,"org":9293,"tags":9294,"stars":9234,"repoUrl":9235,"updatedAt":9307},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9295,9298,9301,9304],{"name":9296,"slug":9297,"type":15},"Productivity","productivity",{"name":9299,"slug":9300,"type":15},"Project Management","project-management",{"name":9302,"slug":9303,"type":15},"Strategy","strategy",{"name":9305,"slug":9306,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":9309,"name":9309,"fn":9310,"description":9311,"org":9312,"tags":9313,"stars":9234,"repoUrl":9235,"updatedAt":9323},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9314,9317,9319,9322],{"name":9315,"slug":9316,"type":15},"Design","design",{"name":9318,"slug":9309,"type":15},"Figma",{"name":9320,"slug":9321,"type":15},"Frontend","frontend",{"name":9250,"slug":9251,"type":15},"2026-04-12T05:06:47.939943",{"slug":9325,"name":9325,"fn":9326,"description":9327,"org":9328,"tags":9329,"stars":9234,"repoUrl":9235,"updatedAt":9339},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9330,9331,9334,9335,9336],{"name":9315,"slug":9316,"type":15},{"name":9332,"slug":9333,"type":15},"Design System","design-system",{"name":9318,"slug":9309,"type":15},{"name":9320,"slug":9321,"type":15},{"name":9337,"slug":9338,"type":15},"UI Components","ui-components","2026-05-10T05:59:52.971881",{"slug":9341,"name":9341,"fn":9342,"description":9343,"org":9344,"tags":9345,"stars":9234,"repoUrl":9235,"updatedAt":9353},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9346,9347,9348,9351,9352],{"name":9315,"slug":9316,"type":15},{"name":9332,"slug":9333,"type":15},{"name":9349,"slug":9350,"type":15},"Documentation","documentation",{"name":9318,"slug":9309,"type":15},{"name":9320,"slug":9321,"type":15},"2026-05-16T06:07:47.821474",{"slug":9355,"name":9355,"fn":9356,"description":9357,"org":9358,"tags":9359,"stars":9234,"repoUrl":9235,"updatedAt":9365},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9360,9361,9362,9363,9364],{"name":9315,"slug":9316,"type":15},{"name":9318,"slug":9309,"type":15},{"name":9320,"slug":9321,"type":15},{"name":9337,"slug":9338,"type":15},{"name":9232,"slug":9233,"type":15},"2026-05-16T06:07:40.583615",{"slug":9367,"name":9367,"fn":9368,"description":9369,"org":9370,"tags":9371,"stars":9234,"repoUrl":9235,"updatedAt":9380},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9372,9375,9376,9379],{"name":9373,"slug":9374,"type":15},"Animation","animation",{"name":9267,"slug":9268,"type":15},{"name":9377,"slug":9378,"type":15},"Creative","creative",{"name":9315,"slug":9316,"type":15},"2026-05-02T05:31:48.48485",{"slug":9382,"name":9382,"fn":9383,"description":9384,"org":9385,"tags":9386,"stars":9234,"repoUrl":9235,"updatedAt":9396},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9387,9388,9389,9392,9395],{"name":9377,"slug":9378,"type":15},{"name":9315,"slug":9316,"type":15},{"name":9390,"slug":9391,"type":15},"Image Generation","image-generation",{"name":9393,"slug":9394,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675,{"items":9399,"total":9511},[9400,9417,9433,9445,9463,9481,9499],{"slug":9401,"name":9401,"fn":9402,"description":9403,"org":9404,"tags":9405,"stars":28,"repoUrl":29,"updatedAt":9416},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9406,9409,9412,9415],{"name":9407,"slug":9408,"type":15},"Accessibility","accessibility",{"name":9410,"slug":9411,"type":15},"Charts","charts",{"name":9413,"slug":9414,"type":15},"Data Visualization","data-visualization",{"name":9315,"slug":9316,"type":15},"2026-06-30T19:00:57.102",{"slug":9418,"name":9418,"fn":9419,"description":9420,"org":9421,"tags":9422,"stars":28,"repoUrl":29,"updatedAt":9432},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9423,9426,9429],{"name":9424,"slug":9425,"type":15},"Agents","agents",{"name":9427,"slug":9428,"type":15},"Browser Automation","browser-automation",{"name":9430,"slug":9431,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":9434,"name":9434,"fn":9435,"description":9436,"org":9437,"tags":9438,"stars":28,"repoUrl":29,"updatedAt":9444},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9439,9440,9443],{"name":9427,"slug":9428,"type":15},{"name":9441,"slug":9442,"type":15},"Local Development","local-development",{"name":9430,"slug":9431,"type":15},"2026-04-06T18:41:17.526867",{"slug":9446,"name":9446,"fn":9447,"description":9448,"org":9449,"tags":9450,"stars":28,"repoUrl":29,"updatedAt":9462},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9451,9452,9453,9456,9459],{"name":9424,"slug":9425,"type":15},{"name":9283,"slug":9284,"type":15},{"name":9454,"slug":9455,"type":15},"SDK","sdk",{"name":9457,"slug":9458,"type":15},"Serverless","serverless",{"name":9460,"slug":9461,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":9464,"name":9464,"fn":9465,"description":9466,"org":9467,"tags":9468,"stars":28,"repoUrl":29,"updatedAt":9480},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9469,9470,9473,9476,9477],{"name":9320,"slug":9321,"type":15},{"name":9471,"slug":9472,"type":15},"React","react",{"name":9474,"slug":9475,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":9337,"slug":9338,"type":15},{"name":9478,"slug":9479,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":9482,"name":9482,"fn":9483,"description":9484,"org":9485,"tags":9486,"stars":28,"repoUrl":29,"updatedAt":9498},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9487,9490,9493,9494,9497],{"name":9488,"slug":9489,"type":15},"AI Infrastructure","ai-infrastructure",{"name":9491,"slug":9492,"type":15},"Cost Optimization","cost-optimization",{"name":17,"slug":18,"type":15},{"name":9495,"slug":9496,"type":15},"Performance","performance",{"name":9478,"slug":9479,"type":15},"2026-04-06T18:40:44.377464",{"slug":9500,"name":9500,"fn":9501,"description":9502,"org":9503,"tags":9504,"stars":28,"repoUrl":29,"updatedAt":9510},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[9505,9506,9509],{"name":9491,"slug":9492,"type":15},{"name":9507,"slug":9508,"type":15},"Database","database",{"name":17,"slug":18,"type":15},"2026-04-06T18:41:08.513425",600]