├── .gitignore ├── LICENSE ├── README.md ├── data └── model_ops.csv ├── package-lock.json ├── package.json ├── packages ├── bun │ ├── .gitignore │ ├── README.md │ ├── bun.lock │ ├── index.ts │ ├── package.json │ └── tsconfig.json ├── core │ ├── package-lock.json │ ├── package.json │ └── src │ │ ├── architectures.js │ │ ├── architectures │ │ ├── SegformerForSemanticSegmentation.js │ │ ├── albert.js │ │ ├── audio-spectrogram-transformer.js │ │ ├── bart.js │ │ ├── beit.js │ │ ├── ben.js │ │ ├── bert.js │ │ ├── big_bird.js │ │ ├── bigbird_pegasus.js │ │ ├── birefnet.js │ │ ├── blenderbot-small.js │ │ ├── blenderbot.js │ │ ├── bloom.js │ │ ├── camembert.js │ │ ├── chinese_clip.js │ │ ├── clap.js │ │ ├── clip.js │ │ ├── clipseg.js │ │ ├── codegen.js │ │ ├── cohere.js │ │ ├── convbert.js │ │ ├── convnext.js │ │ ├── convnextv2.js │ │ ├── cvt.js │ │ ├── dac.js │ │ ├── data2vec-audio.js │ │ ├── data2vec-text.js │ │ ├── data2vec-vision.js │ │ ├── deberta-v2.js │ │ ├── deberta.js │ │ ├── decision_transformer.js │ │ ├── deit.js │ │ ├── depth_anything.js │ │ ├── depth_pro.js │ │ ├── detr.js │ │ ├── dinov2.js │ │ ├── dinov2_with_registers.js │ │ ├── distilbert.js │ │ ├── donut-swin.js │ │ ├── dpt.js │ │ ├── electra.js │ │ ├── ernie.js │ │ ├── ernie_m.js │ │ ├── esm.js │ │ ├── exaone.js │ │ ├── falcon.js │ │ ├── fastvit.js │ │ ├── flaubert.js │ │ ├── florence2.js │ │ ├── gemma.js │ │ ├── gemma2.js │ │ ├── gemma3_text.js │ │ ├── geoclip.js │ │ ├── gliner.js │ │ ├── glm.js │ │ ├── glpn.js │ │ ├── gpt2.js │ │ ├── gpt_bigcode.js │ │ ├── gpt_neo.js │ │ ├── gpt_neox.js │ │ ├── gptj.js │ │ ├── granite.js │ │ ├── grounding-dino.js │ │ ├── groupvit.js │ │ ├── gte.js │ │ ├── helium.js │ │ ├── hiera.js │ │ ├── hifigan.js │ │ ├── hubert.js │ │ ├── ibert.js │ │ ├── idefics3.js │ │ ├── ijepa.js │ │ ├── imagegpt.js │ │ ├── isnet.js │ │ ├── jais.js │ │ ├── jina_clip.js │ │ ├── layoutlm.js │ │ ├── layoutlmv3.js │ │ ├── levit.js │ │ ├── lilt.js │ │ ├── lite-whisper.js │ │ ├── llama.js │ │ ├── llava.js │ │ ├── llava_onevision.js │ │ ├── longformer.js │ │ ├── longt5.js │ │ ├── m2m_100.js │ │ ├── marian.js │ │ ├── markuplm.js │ │ ├── maskformer.js │ │ ├── mbart.js │ │ ├── mctct.js │ │ ├── megatron-bert.js │ │ ├── metric3d.js │ │ ├── mgp-str.js │ │ ├── mimi.js │ │ ├── mistral.js │ │ ├── mobilebert.js │ │ ├── mobilellm.js │ │ ├── mobilenet_v1.js │ │ ├── mobilenet_v2.js │ │ ├── mobilenet_v3.js │ │ ├── mobilenet_v4.js │ │ ├── mobilevit.js │ │ ├── modernbert.js │ │ ├── modnet.js │ │ ├── moondream1.js │ │ ├── moonshine.js │ │ ├── movenet.js │ │ ├── mpnet.js │ │ ├── mpt.js │ │ ├── mt5.js │ │ ├── multi_modality.js │ │ ├── musicgen.js │ │ ├── new.js │ │ ├── nomic_bert.js │ │ ├── nystromformer.js │ │ ├── olmo.js │ │ ├── olmo2.js │ │ ├── openelm.js │ │ ├── opt.js │ │ ├── owlv2.js │ │ ├── owlvit.js │ │ ├── paligemma.js │ │ ├── patchtsmixer.js │ │ ├── patchtst.js │ │ ├── pegasus.js │ │ ├── perceiver.js │ │ ├── phi.js │ │ ├── phi3.js │ │ ├── phi3_v.js │ │ ├── pix2struct.js │ │ ├── poolformer.js │ │ ├── prompt_depth_anything.js │ │ ├── pvt.js │ │ ├── pyannote.js │ │ ├── qwen2.js │ │ ├── qwen2_vl.js │ │ ├── qwen3.js │ │ ├── regnet.js │ │ ├── rembert.js │ │ ├── resnet.js │ │ ├── rf_detr.js │ │ ├── roberta.js │ │ ├── roformer.js │ │ ├── rt_detr.js │ │ ├── rt_detr_v2.js │ │ ├── rtmo.js │ │ ├── sam.js │ │ ├── sapiens.js │ │ ├── segformer.js │ │ ├── sew-d.js │ │ ├── sew.js │ │ ├── siglip.js │ │ ├── siglip_vision_model.js │ │ ├── speech_to_text.js │ │ ├── speecht5.js │ │ ├── splinter.js │ │ ├── squeezebert.js │ │ ├── stablelm.js │ │ ├── starcoder2.js │ │ ├── style_text_to_speech_2.js │ │ ├── swin.js │ │ ├── swin2sr.js │ │ ├── swinv2.js │ │ ├── t5.js │ │ ├── table-transformer.js │ │ ├── textnet.js │ │ ├── timesformer.js │ │ ├── u2net.js │ │ ├── ultravox.js │ │ ├── unispeech-sat.js │ │ ├── unispeech.js │ │ ├── unknown.js │ │ ├── vision-encoder-decoder.js │ │ ├── vit.js │ │ ├── vit_mae.js │ │ ├── vit_msn.js │ │ ├── vitmatte.js │ │ ├── vitpose.js │ │ ├── vits.js │ │ ├── wav2vec2-bert.js │ │ ├── wav2vec2-conformer.js │ │ ├── wav2vec2.js │ │ ├── wavlm.js │ │ ├── whisper.js │ │ ├── xlm-roberta.js │ │ ├── xlm.js │ │ ├── yolos.js │ │ ├── yolov10.js │ │ ├── yolov8.js │ │ └── yolov9.js │ │ ├── defaults.js │ │ ├── index.js │ │ ├── inputs.js │ │ ├── load.js │ │ ├── models.js │ │ ├── models │ │ ├── bert.js │ │ ├── clip.js │ │ ├── llama.js │ │ ├── qwen2_vl.js │ │ ├── sam.js │ │ ├── t5.js │ │ └── whisper.js │ │ ├── operators.js │ │ ├── pipelines │ │ ├── audio-classification.js │ │ ├── automatic-speech-recognition.js │ │ ├── depth-estimation.js │ │ ├── document-question-answering.js │ │ ├── feature-extraction.js │ │ ├── fill-mask.js │ │ ├── image-classification.js │ │ ├── image-feature-extraction.js │ │ ├── image-segmentation.js │ │ ├── image-to-image.js │ │ ├── image-to-text.js │ │ ├── object-detection.js │ │ ├── question-answering.js │ │ ├── summarization.js │ │ ├── text-classification.js │ │ ├── text-generation.js │ │ ├── text-to-audio.js │ │ ├── text2text-generation.js │ │ ├── token-classification.js │ │ ├── translation.js │ │ ├── zero-shot-audio-classification.js │ │ ├── zero-shot-image-classification.js │ │ └── zero-shot-object-detection.js │ │ ├── suites.js │ │ ├── tasks.js │ │ ├── test.js │ │ └── utils.js ├── node │ ├── index.js │ ├── package-lock.json │ └── package.json └── web │ ├── .gitignore │ ├── eslint.config.js │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── App.jsx │ ├── index.css │ ├── main.jsx │ └── worker.js │ └── vite.config.js └── scripts ├── collect_models.py ├── parser.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | scripts/.cache 3 | __pycache__ 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🤗 Transformers.js Benchmarking 2 | 3 | A versatile toolkit designed to measure and compare the performance of Transformers.js/ONNX models across various environments, including: in-browser (WASM, WebGPU, WebNN), Node.js, Bun, or Deno. 4 | 5 | ## Key Features 6 | 7 | - **Multi-Platform Support:** Benchmark models directly in-browser (WASM, WebGPU, WebNN) as well as in server-side environments like Node.js, Bun, and Deno. 8 | - **Efficient Model Ops Collection:** Streaming-based collection functionality to efficiently gather model operations without needing to download entire models. 9 | 10 | ## Getting Started 11 | 12 | 1. **Install core dependencies** first 13 | 14 | ```sh 15 | cd packages/core/ 16 | npm i 17 | ``` 18 | 19 | Then run with one of the following: 20 | 21 | 2. **Run Benchmarks** 22 | 23 | - web ([online demo](https://huggingface.co/spaces/onnx-internal-testing/transformers.js-benchmarking)): 24 | 25 | ```sh 26 | cd packages/web/ 27 | npm i 28 | npm run dev 29 | ``` 30 | 31 | - Node.js 32 | 33 | ```sh 34 | cd packages/node/ 35 | npm i 36 | node index.js 37 | ``` 38 | 39 | - Bun 40 | ```sh 41 | cd packages/bun/ 42 | bun install 43 | bun run index.ts 44 | ``` 45 | 46 | 3. **(Optional) Prepare model operations** 47 | 48 | - Install Python dependencies: 49 | 50 | ```sh 51 | python3 -m venv .venv 52 | source .venv/bin/activate 53 | python3 -m pip install -r scripts/requirements.txt 54 | ``` 55 | 56 | - Clone model-explorer dataset 57 | 58 | ```sh 59 | npm run pull:model-explorer 60 | ``` 61 | 62 | - Build model operations with: 63 | 64 | ```sh 65 | npm run build:architectures 66 | ``` 67 | 68 | ## Repository Structure 69 | 70 | ``` 71 | ├── packages 72 | │ ├── core # Core engine powering the benchmarking suite. 73 | │ ├── web # User-friendly web interface for running benchmarks. 74 | │ ├── node # CLI tailored for Node.js environments. 75 | │ └── bun # CLI support specifically built for Bun. 76 | ├── scripts # Utility scripts for tasks like collecting model operations. 77 | └── data # Repository and model operation files (e.g., model_ops.csv). 78 | ``` 79 | 80 | ## Additional Resources 81 | 82 | For more details on available models and further information, check out the models on [Hugging Face](https://huggingface.co/models?library=transformers.js). 83 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "benchmark-suite", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "benchmark-suite", 9 | "version": "1.0.0", 10 | "license": "Apache-2.0", 11 | "devDependencies": { 12 | "prettier": "3.4.2" 13 | } 14 | }, 15 | "node_modules/prettier": { 16 | "version": "3.4.2", 17 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", 18 | "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", 19 | "dev": true, 20 | "license": "MIT", 21 | "bin": { 22 | "prettier": "bin/prettier.cjs" 23 | }, 24 | "engines": { 25 | "node": ">=14" 26 | }, 27 | "funding": { 28 | "url": "https://github.com/prettier/prettier?sponsor=1" 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "benchmark-suite", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "type": "module", 6 | "private": true, 7 | "scripts": { 8 | "build:architectures": "rm -rf ./packages/core/src/architectures/* && python ./scripts/collect_models.py --from_cache --all_models && npm run format", 9 | "upload:model-explorer": "huggingface-cli upload onnx-community/model-explorer ./data/model-explorer . --repo-type dataset --create-pr", 10 | "pull:model-explorer": "git clone https://huggingface.co/datasets/onnx-community/model-explorer ./data/model-explorer", 11 | "format": "npx prettier --write \"**/*.js\"", 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "devDependencies": { 15 | "prettier": "3.4.2" 16 | }, 17 | "author": "Hugging Face", 18 | "license": "Apache-2.0" 19 | } 20 | -------------------------------------------------------------------------------- /packages/bun/.gitignore: -------------------------------------------------------------------------------- 1 | # Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore 2 | 3 | # Logs 4 | 5 | logs 6 | _.log 7 | npm-debug.log_ 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | .pnpm-debug.log* 12 | 13 | # Caches 14 | 15 | .cache 16 | 17 | # Diagnostic reports (https://nodejs.org/api/report.html) 18 | 19 | report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json 20 | 21 | # Runtime data 22 | 23 | pids 24 | _.pid 25 | _.seed 26 | *.pid.lock 27 | 28 | # Directory for instrumented libs generated by jscoverage/JSCover 29 | 30 | lib-cov 31 | 32 | # Coverage directory used by tools like istanbul 33 | 34 | coverage 35 | *.lcov 36 | 37 | # nyc test coverage 38 | 39 | .nyc_output 40 | 41 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 42 | 43 | .grunt 44 | 45 | # Bower dependency directory (https://bower.io/) 46 | 47 | bower_components 48 | 49 | # node-waf configuration 50 | 51 | .lock-wscript 52 | 53 | # Compiled binary addons (https://nodejs.org/api/addons.html) 54 | 55 | build/Release 56 | 57 | # Dependency directories 58 | 59 | node_modules/ 60 | jspm_packages/ 61 | 62 | # Snowpack dependency directory (https://snowpack.dev/) 63 | 64 | web_modules/ 65 | 66 | # TypeScript cache 67 | 68 | *.tsbuildinfo 69 | 70 | # Optional npm cache directory 71 | 72 | .npm 73 | 74 | # Optional eslint cache 75 | 76 | .eslintcache 77 | 78 | # Optional stylelint cache 79 | 80 | .stylelintcache 81 | 82 | # Microbundle cache 83 | 84 | .rpt2_cache/ 85 | .rts2_cache_cjs/ 86 | .rts2_cache_es/ 87 | .rts2_cache_umd/ 88 | 89 | # Optional REPL history 90 | 91 | .node_repl_history 92 | 93 | # Output of 'npm pack' 94 | 95 | *.tgz 96 | 97 | # Yarn Integrity file 98 | 99 | .yarn-integrity 100 | 101 | # dotenv environment variable files 102 | 103 | .env 104 | .env.development.local 105 | .env.test.local 106 | .env.production.local 107 | .env.local 108 | 109 | # parcel-bundler cache (https://parceljs.org/) 110 | 111 | .parcel-cache 112 | 113 | # Next.js build output 114 | 115 | .next 116 | out 117 | 118 | # Nuxt.js build / generate output 119 | 120 | .nuxt 121 | dist 122 | 123 | # Gatsby files 124 | 125 | # Comment in the public line in if your project uses Gatsby and not Next.js 126 | 127 | # https://nextjs.org/blog/next-9-1#public-directory-support 128 | 129 | # public 130 | 131 | # vuepress build output 132 | 133 | .vuepress/dist 134 | 135 | # vuepress v2.x temp and cache directory 136 | 137 | .temp 138 | 139 | # Docusaurus cache and generated files 140 | 141 | .docusaurus 142 | 143 | # Serverless directories 144 | 145 | .serverless/ 146 | 147 | # FuseBox cache 148 | 149 | .fusebox/ 150 | 151 | # DynamoDB Local files 152 | 153 | .dynamodb/ 154 | 155 | # TernJS port file 156 | 157 | .tern-port 158 | 159 | # Stores VSCode versions used for testing VSCode extensions 160 | 161 | .vscode-test 162 | 163 | # yarn v2 164 | 165 | .yarn/cache 166 | .yarn/unplugged 167 | .yarn/build-state.yml 168 | .yarn/install-state.gz 169 | .pnp.* 170 | 171 | # IntelliJ based IDEs 172 | .idea 173 | 174 | # Finder (MacOS) folder config 175 | .DS_Store 176 | -------------------------------------------------------------------------------- /packages/bun/README.md: -------------------------------------------------------------------------------- 1 | # bun 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.2.2. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/bun/index.ts: -------------------------------------------------------------------------------- 1 | import { ModelTestSuite, PipelineTestSuite } from "@benchmarking/core"; 2 | 3 | const SUITES = { 4 | ModelTestSuite, 5 | PipelineTestSuite, 6 | }; 7 | 8 | for (const [suiteName, Suite] of Object.entries(SUITES)) { 9 | const FAILURES = []; 10 | console.log("=".repeat(80)); 11 | console.log(`Running ${suiteName}`); 12 | 13 | // Run tests 14 | const suite = new Suite(); 15 | for await (const { name, result } of suite.run()) { 16 | console.log(` - ${name}`); 17 | if ("error" in result) { 18 | console.error(` - Error: ${result.error}`); 19 | FAILURES.push({ suite: suiteName, name, error: result.error }); 20 | continue; 21 | } 22 | console.log(` - Setup time: ${result.setupTime} ms`); 23 | console.log(` - Dispose time: ${result.disposeTime} ms`); 24 | console.log(` - Stats:`); 25 | for (const [testName, stats] of Object.entries( 26 | result.stats as Record, 27 | )) { 28 | console.log(` - ${testName}`); 29 | console.log(` - Mean: ${stats.mean} ms`); 30 | console.log(` - Median: ${stats.median} ms`); 31 | console.log(` - Min: ${stats.min} ms`); 32 | console.log(` - Max: ${stats.max} ms`); 33 | console.log( 34 | ` - Percentiles: 1st=${stats.p1} ms, 5th=${stats.p5} ms, 10th=${stats.p10} ms, 90th=${stats.p90} ms, 95th=${stats.p95} ms, 99th=${stats.p99} ms`, 35 | ); 36 | console.log(` - Standard deviation: ${stats.stdDev} ms`); 37 | } 38 | } 39 | 40 | if (FAILURES.length > 0) { 41 | console.table(FAILURES); 42 | } 43 | console.log("=".repeat(80)); 44 | } 45 | -------------------------------------------------------------------------------- /packages/bun/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bun", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | }, 11 | "dependencies": { 12 | "@benchmarking/core": "../core/" 13 | }, 14 | "trustedDependencies": [ 15 | "onnxruntime-node", 16 | "protobufjs" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/bun/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | // Enable latest features 4 | "lib": ["ESNext", "DOM"], 5 | "target": "ESNext", 6 | "module": "ESNext", 7 | "moduleDetection": "force", 8 | "jsx": "react-jsx", 9 | "allowJs": true, 10 | 11 | // Bundler mode 12 | "moduleResolution": "bundler", 13 | "allowImportingTsExtensions": true, 14 | "verbatimModuleSyntax": true, 15 | "noEmit": true, 16 | 17 | // Best practices 18 | "strict": true, 19 | "skipLibCheck": true, 20 | "noFallthroughCasesInSwitch": true, 21 | 22 | // Some stricter flags (disabled by default) 23 | "noUnusedLocals": false, 24 | "noUnusedParameters": false, 25 | "noPropertyAccessFromIndexSignature": false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@benchmarking/core", 3 | "version": "1.0.0", 4 | "private": true, 5 | "main": "src/index.js", 6 | "type": "module", 7 | "dependencies": { 8 | "@huggingface/transformers": "^3.5.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/core/src/architectures/SegformerForSemanticSegmentation.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "SegformerForSemanticSegmentation", 5 | models: [ 6 | { 7 | model_id: "briaai/RMBG-1.4", 8 | dtype: "quantized", 9 | architectures: ["BriaRMBG"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConvInteger", 16 | "DynamicQuantizeLinear", 17 | "Gather", 18 | "MaxPool", 19 | "Mul", 20 | "Relu", 21 | "Reshape", 22 | "Resize", 23 | "Shape", 24 | "Sigmoid", 25 | "Slice", 26 | "Unsqueeze", 27 | ], 28 | }, 29 | { 30 | model_id: "briaai/RMBG-1.4", 31 | dtype: "fp32", 32 | architectures: ["BriaRMBG"], 33 | ops: [ 34 | "Add", 35 | "Cast", 36 | "Concat", 37 | "Constant", 38 | "Conv", 39 | "Gather", 40 | "MaxPool", 41 | "Relu", 42 | "Resize", 43 | "Shape", 44 | "Sigmoid", 45 | "Slice", 46 | "Unsqueeze", 47 | ], 48 | }, 49 | ], 50 | }; 51 | -------------------------------------------------------------------------------- /packages/core/src/architectures/ben.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "ben", 5 | models: [ 6 | { 7 | model_id: "onnx-community/BEN2-ONNX", 8 | dtype: "fp16", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "AveragePool", 13 | "Cast", 14 | "Concat", 15 | "Conv", 16 | "Div", 17 | "Erf", 18 | "Gather", 19 | "Gemm", 20 | "InstanceNormalization", 21 | "MatMul", 22 | "Mul", 23 | "Pad", 24 | "Pow", 25 | "ReduceMean", 26 | "Reshape", 27 | "Resize", 28 | "Sigmoid", 29 | "Slice", 30 | "Softmax", 31 | "Split", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | ], 38 | }, 39 | ], 40 | }; 41 | -------------------------------------------------------------------------------- /packages/core/src/architectures/big_bird.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "big_bird", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-BigBirdForMultipleChoice-ONNX", 9 | dtype: "fp32", 10 | architectures: ["BigBirdForMultipleChoice"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "Div", 18 | "Equal", 19 | "Expand", 20 | "Gather", 21 | "Gemm", 22 | "Identity", 23 | "MatMul", 24 | "Mul", 25 | "Pow", 26 | "ReduceMean", 27 | "Reshape", 28 | "Shape", 29 | "Slice", 30 | "Softmax", 31 | "Sqrt", 32 | "Squeeze", 33 | "Sub", 34 | "Tanh", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: "onnx-internal-testing/tiny-random-BigBirdForPreTraining-ONNX", 42 | dtype: "fp32", 43 | architectures: ["BigBirdForPreTraining"], 44 | ops: [ 45 | "Add", 46 | "Cast", 47 | "Concat", 48 | "Constant", 49 | "ConstantOfShape", 50 | "Div", 51 | "Equal", 52 | "Expand", 53 | "Gather", 54 | "Identity", 55 | "MatMul", 56 | "Mul", 57 | "Pow", 58 | "ReduceMean", 59 | "Reshape", 60 | "Shape", 61 | "Slice", 62 | "Softmax", 63 | "Sqrt", 64 | "Sub", 65 | "Tanh", 66 | "Transpose", 67 | "Unsqueeze", 68 | "Where", 69 | ], 70 | }, 71 | { 72 | model_id: 73 | "onnx-internal-testing/tiny-random-BigBirdForQuestionAnswering-ONNX", 74 | dtype: "fp32", 75 | architectures: ["BigBirdForQuestionAnswering"], 76 | ops: [ 77 | "Add", 78 | "ArgMax", 79 | "Cast", 80 | "Concat", 81 | "Constant", 82 | "ConstantOfShape", 83 | "Div", 84 | "Equal", 85 | "Expand", 86 | "Gather", 87 | "Identity", 88 | "Less", 89 | "MatMul", 90 | "Mul", 91 | "Pow", 92 | "Range", 93 | "ReduceMean", 94 | "Reshape", 95 | "ScatterND", 96 | "Shape", 97 | "Slice", 98 | "Softmax", 99 | "Split", 100 | "Sqrt", 101 | "Squeeze", 102 | "Sub", 103 | "Tanh", 104 | "Transpose", 105 | "Unsqueeze", 106 | "Where", 107 | ], 108 | }, 109 | { 110 | model_id: 111 | "onnx-internal-testing/tiny-random-BigBirdForSequenceClassification-ONNX", 112 | dtype: "fp32", 113 | architectures: ["BigBirdForSequenceClassification"], 114 | ops: [ 115 | "Add", 116 | "Cast", 117 | "Concat", 118 | "Constant", 119 | "ConstantOfShape", 120 | "Div", 121 | "Equal", 122 | "Expand", 123 | "Gather", 124 | "Gemm", 125 | "Identity", 126 | "MatMul", 127 | "Mul", 128 | "Pow", 129 | "ReduceMean", 130 | "Reshape", 131 | "Shape", 132 | "Slice", 133 | "Softmax", 134 | "Sqrt", 135 | "Sub", 136 | "Tanh", 137 | "Transpose", 138 | "Unsqueeze", 139 | "Where", 140 | ], 141 | }, 142 | ], 143 | }; 144 | -------------------------------------------------------------------------------- /packages/core/src/architectures/birefnet.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "birefnet", 5 | models: [ 6 | { 7 | model_id: "onnx-community/BiRefNet-ONNX", 8 | dtype: "fp32", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "BatchNormalization", 13 | "Cast", 14 | "Clip", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Conv", 19 | "Div", 20 | "Equal", 21 | "Erf", 22 | "Expand", 23 | "Floor", 24 | "Gather", 25 | "GatherND", 26 | "GlobalAveragePool", 27 | "Identity", 28 | "LayerNormalization", 29 | "MatMul", 30 | "Mod", 31 | "Mul", 32 | "Not", 33 | "Pad", 34 | "Relu", 35 | "Reshape", 36 | "Resize", 37 | "ScatterND", 38 | "Shape", 39 | "Sigmoid", 40 | "Slice", 41 | "Softmax", 42 | "Split", 43 | "Sub", 44 | "Sum", 45 | "Transpose", 46 | "Unsqueeze", 47 | "Where", 48 | ], 49 | }, 50 | { 51 | model_id: "onnx-community/BiRefNet_512x512-ONNX", 52 | dtype: "fp32", 53 | architectures: [], 54 | ops: [ 55 | "Add", 56 | "BatchNormalization", 57 | "Cast", 58 | "Ceil", 59 | "Clip", 60 | "Concat", 61 | "Constant", 62 | "ConstantOfShape", 63 | "Conv", 64 | "Div", 65 | "Equal", 66 | "Erf", 67 | "Expand", 68 | "Floor", 69 | "Gather", 70 | "GatherND", 71 | "GlobalAveragePool", 72 | "Identity", 73 | "LayerNormalization", 74 | "MatMul", 75 | "Mod", 76 | "Mul", 77 | "Not", 78 | "Pad", 79 | "Range", 80 | "Relu", 81 | "Reshape", 82 | "Resize", 83 | "ScatterND", 84 | "Shape", 85 | "Sigmoid", 86 | "Slice", 87 | "Softmax", 88 | "Sub", 89 | "Sum", 90 | "Transpose", 91 | "Unsqueeze", 92 | "Where", 93 | ], 94 | }, 95 | ], 96 | }; 97 | -------------------------------------------------------------------------------- /packages/core/src/architectures/blenderbot-small.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "blenderbot-small", 5 | models: [ 6 | { 7 | model_id: "Xenova/blenderbot_small-90M", 8 | dtype: "fp16", 9 | architectures: ["BlenderbotSmallForConditionalGeneration"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Div", 17 | "Equal", 18 | "Erf", 19 | "Expand", 20 | "Gather", 21 | "If", 22 | "Less", 23 | "MatMul", 24 | "Mul", 25 | "Pow", 26 | "Range", 27 | "ReduceMean", 28 | "Reshape", 29 | "Shape", 30 | "Slice", 31 | "Softmax", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: "Xenova/blenderbot_small-90M", 42 | dtype: "quantized", 43 | architectures: ["BlenderbotSmallForConditionalGeneration"], 44 | ops: [ 45 | "Add", 46 | "Cast", 47 | "Concat", 48 | "Constant", 49 | "ConstantOfShape", 50 | "DequantizeLinear", 51 | "Div", 52 | "DynamicQuantizeLinear", 53 | "Equal", 54 | "Erf", 55 | "Expand", 56 | "Gather", 57 | "If", 58 | "Less", 59 | "MatMul", 60 | "MatMulInteger", 61 | "Mul", 62 | "Pow", 63 | "Range", 64 | "ReduceMean", 65 | "Reshape", 66 | "Shape", 67 | "Slice", 68 | "Softmax", 69 | "Sqrt", 70 | "Squeeze", 71 | "Sub", 72 | "Transpose", 73 | "Unsqueeze", 74 | "Where", 75 | ], 76 | }, 77 | { 78 | model_id: 79 | "onnx-internal-testing/tiny-random-BlenderbotSmallForConditionalGeneration-ONNX", 80 | dtype: "fp32", 81 | architectures: ["BlenderbotSmallForConditionalGeneration"], 82 | ops: [ 83 | "Add", 84 | "Cast", 85 | "Concat", 86 | "Constant", 87 | "ConstantOfShape", 88 | "Div", 89 | "Equal", 90 | "Erf", 91 | "Expand", 92 | "Gather", 93 | "Identity", 94 | "If", 95 | "Less", 96 | "MatMul", 97 | "Mul", 98 | "Pow", 99 | "Range", 100 | "ReduceMean", 101 | "Reshape", 102 | "Shape", 103 | "Slice", 104 | "Softmax", 105 | "Sqrt", 106 | "Squeeze", 107 | "Sub", 108 | "Transpose", 109 | "Unsqueeze", 110 | "Where", 111 | ], 112 | }, 113 | ], 114 | }; 115 | -------------------------------------------------------------------------------- /packages/core/src/architectures/blenderbot.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "blenderbot", 5 | models: [ 6 | { 7 | model_id: "Xenova/blenderbot-400M-distill", 8 | dtype: "fp16", 9 | architectures: ["BlenderbotForConditionalGeneration"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Div", 17 | "Equal", 18 | "Erf", 19 | "Expand", 20 | "Gather", 21 | "If", 22 | "Less", 23 | "MatMul", 24 | "Mul", 25 | "Pow", 26 | "Range", 27 | "ReduceMean", 28 | "Reshape", 29 | "Shape", 30 | "Slice", 31 | "Softmax", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: "Xenova/blenderbot-400M-distill", 42 | dtype: "quantized", 43 | architectures: ["BlenderbotForConditionalGeneration"], 44 | ops: [ 45 | "Add", 46 | "Cast", 47 | "Concat", 48 | "Constant", 49 | "ConstantOfShape", 50 | "DequantizeLinear", 51 | "Div", 52 | "DynamicQuantizeLinear", 53 | "Equal", 54 | "Erf", 55 | "Expand", 56 | "Gather", 57 | "If", 58 | "Less", 59 | "MatMul", 60 | "MatMulInteger", 61 | "Mul", 62 | "Pow", 63 | "Range", 64 | "ReduceMean", 65 | "Reshape", 66 | "Shape", 67 | "Slice", 68 | "Softmax", 69 | "Sqrt", 70 | "Squeeze", 71 | "Sub", 72 | "Transpose", 73 | "Unsqueeze", 74 | "Where", 75 | ], 76 | }, 77 | { 78 | model_id: "onnx-internal-testing/tiny-random-BlenderbotForCausalLM-ONNX", 79 | dtype: "fp32", 80 | architectures: ["BlenderbotForCausalLM"], 81 | ops: [ 82 | "Add", 83 | "Cast", 84 | "Concat", 85 | "Constant", 86 | "ConstantOfShape", 87 | "Div", 88 | "Equal", 89 | "Erf", 90 | "Expand", 91 | "Gather", 92 | "Identity", 93 | "Less", 94 | "MatMul", 95 | "Mul", 96 | "Pow", 97 | "Range", 98 | "ReduceMean", 99 | "Reshape", 100 | "Shape", 101 | "Slice", 102 | "Softmax", 103 | "Sqrt", 104 | "Squeeze", 105 | "Sub", 106 | "Transpose", 107 | "Unsqueeze", 108 | "Where", 109 | ], 110 | }, 111 | { 112 | model_id: "onnx-internal-testing/tiny-random-BlenderbotModel-ONNX", 113 | dtype: "fp32", 114 | architectures: ["BlenderbotModel"], 115 | ops: [ 116 | "Add", 117 | "Cast", 118 | "Concat", 119 | "Constant", 120 | "ConstantOfShape", 121 | "Div", 122 | "Equal", 123 | "Erf", 124 | "Expand", 125 | "Gather", 126 | "Identity", 127 | "If", 128 | "Less", 129 | "MatMul", 130 | "Mul", 131 | "Pow", 132 | "Range", 133 | "ReduceMean", 134 | "Reshape", 135 | "Shape", 136 | "Slice", 137 | "Softmax", 138 | "Sqrt", 139 | "Squeeze", 140 | "Sub", 141 | "Transpose", 142 | "Unsqueeze", 143 | "Where", 144 | ], 145 | }, 146 | ], 147 | }; 148 | -------------------------------------------------------------------------------- /packages/core/src/architectures/camembert.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "camembert", 5 | models: [ 6 | { 7 | model_id: "Xenova/sentence-camembert-large", 8 | dtype: "quantized", 9 | architectures: ["CamembertModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "CumSum", 17 | "DequantizeLinear", 18 | "Div", 19 | "DynamicQuantizeLinear", 20 | "Equal", 21 | "Erf", 22 | "Expand", 23 | "Gather", 24 | "MatMul", 25 | "MatMulInteger", 26 | "Mul", 27 | "Not", 28 | "Pow", 29 | "ReduceMean", 30 | "Reshape", 31 | "Shape", 32 | "Slice", 33 | "Softmax", 34 | "Sqrt", 35 | "Sub", 36 | "Transpose", 37 | "Unsqueeze", 38 | "Where", 39 | ], 40 | }, 41 | { 42 | model_id: "Xenova/sentence-camembert-large", 43 | dtype: "fp32", 44 | architectures: ["CamembertModel"], 45 | ops: [ 46 | "Add", 47 | "Cast", 48 | "Concat", 49 | "Constant", 50 | "ConstantOfShape", 51 | "CumSum", 52 | "Div", 53 | "Equal", 54 | "Erf", 55 | "Expand", 56 | "Gather", 57 | "MatMul", 58 | "Mul", 59 | "Not", 60 | "Pow", 61 | "ReduceMean", 62 | "Reshape", 63 | "Shape", 64 | "Slice", 65 | "Softmax", 66 | "Sqrt", 67 | "Sub", 68 | "Transpose", 69 | "Unsqueeze", 70 | "Where", 71 | ], 72 | }, 73 | { 74 | model_id: "onnx-internal-testing/tiny-random-camembert-ONNX", 75 | dtype: "fp32", 76 | architectures: ["CamembertModel"], 77 | ops: [ 78 | "Add", 79 | "Cast", 80 | "Concat", 81 | "Constant", 82 | "ConstantOfShape", 83 | "CumSum", 84 | "Div", 85 | "Equal", 86 | "Erf", 87 | "Expand", 88 | "Gather", 89 | "Identity", 90 | "MatMul", 91 | "Mul", 92 | "Not", 93 | "Pow", 94 | "ReduceMean", 95 | "Reshape", 96 | "Shape", 97 | "Slice", 98 | "Softmax", 99 | "Sqrt", 100 | "Sub", 101 | "Transpose", 102 | "Unsqueeze", 103 | "Where", 104 | ], 105 | }, 106 | ], 107 | }; 108 | -------------------------------------------------------------------------------- /packages/core/src/architectures/chinese_clip.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "chinese_clip", 5 | models: [ 6 | { 7 | model_id: "Xenova/chinese-clip-vit-base-patch16", 8 | dtype: "quantized", 9 | architectures: ["ChineseCLIPModel"], 10 | ops: [ 11 | "Abs", 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "ConvInteger", 18 | "DequantizeLinear", 19 | "Div", 20 | "DynamicQuantizeLinear", 21 | "Equal", 22 | "Erf", 23 | "Exp", 24 | "Expand", 25 | "Gather", 26 | "MatMul", 27 | "MatMulInteger", 28 | "Mul", 29 | "Pow", 30 | "ReduceMean", 31 | "ReduceSum", 32 | "Reshape", 33 | "Shape", 34 | "Sigmoid", 35 | "Slice", 36 | "Softmax", 37 | "Sqrt", 38 | "Sub", 39 | "Transpose", 40 | "Unsqueeze", 41 | "Where", 42 | ], 43 | }, 44 | { 45 | model_id: "Xenova/chinese-clip-vit-base-patch16", 46 | dtype: "fp32", 47 | architectures: ["ChineseCLIPModel"], 48 | ops: [ 49 | "Abs", 50 | "Add", 51 | "Cast", 52 | "Concat", 53 | "Constant", 54 | "ConstantOfShape", 55 | "Conv", 56 | "Div", 57 | "Equal", 58 | "Erf", 59 | "Exp", 60 | "Expand", 61 | "Gather", 62 | "MatMul", 63 | "Mul", 64 | "Pow", 65 | "ReduceMean", 66 | "ReduceSum", 67 | "Reshape", 68 | "Shape", 69 | "Sigmoid", 70 | "Slice", 71 | "Softmax", 72 | "Sqrt", 73 | "Sub", 74 | "Transpose", 75 | "Unsqueeze", 76 | "Where", 77 | ], 78 | }, 79 | ], 80 | }; 81 | -------------------------------------------------------------------------------- /packages/core/src/architectures/clap.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "clap", 5 | models: [ 6 | { 7 | model_id: "Xenova/larger_clap_music_and_speech", 8 | dtype: "fp32", 9 | architectures: ["ClapModel"], 10 | ops: [ 11 | "Abs", 12 | "Add", 13 | "BatchNormalization", 14 | "Cast", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Conv", 19 | "CumSum", 20 | "Div", 21 | "Equal", 22 | "Erf", 23 | "Exp", 24 | "Expand", 25 | "Flatten", 26 | "Gather", 27 | "Gemm", 28 | "GlobalAveragePool", 29 | "MatMul", 30 | "Mul", 31 | "Not", 32 | "Pad", 33 | "Pow", 34 | "Range", 35 | "ReduceMean", 36 | "ReduceSum", 37 | "Relu", 38 | "Reshape", 39 | "Resize", 40 | "ScatterND", 41 | "Shape", 42 | "Slice", 43 | "Softmax", 44 | "Sqrt", 45 | "Sub", 46 | "Tanh", 47 | "Transpose", 48 | "Unsqueeze", 49 | "Where", 50 | ], 51 | }, 52 | { 53 | model_id: "Xenova/larger_clap_music_and_speech", 54 | dtype: "quantized", 55 | architectures: ["ClapModel"], 56 | ops: [ 57 | "Abs", 58 | "Add", 59 | "BatchNormalization", 60 | "Cast", 61 | "Concat", 62 | "Constant", 63 | "ConstantOfShape", 64 | "ConvInteger", 65 | "CumSum", 66 | "DequantizeLinear", 67 | "Div", 68 | "DynamicQuantizeLinear", 69 | "Equal", 70 | "Erf", 71 | "Exp", 72 | "Expand", 73 | "Flatten", 74 | "Gather", 75 | "GlobalAveragePool", 76 | "MatMul", 77 | "MatMulInteger", 78 | "Mul", 79 | "Not", 80 | "Pad", 81 | "Pow", 82 | "Range", 83 | "ReduceMean", 84 | "ReduceSum", 85 | "Relu", 86 | "Reshape", 87 | "Resize", 88 | "ScatterND", 89 | "Shape", 90 | "Slice", 91 | "Softmax", 92 | "Sqrt", 93 | "Sub", 94 | "Tanh", 95 | "Transpose", 96 | "Unsqueeze", 97 | "Where", 98 | ], 99 | }, 100 | ], 101 | }; 102 | -------------------------------------------------------------------------------- /packages/core/src/architectures/clipseg.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "clipseg", 5 | models: [ 6 | { 7 | model_id: "Xenova/clipseg-rd64-refined", 8 | dtype: "quantized", 9 | architectures: ["CLIPSegForImageSegmentation"], 10 | ops: [ 11 | "Add", 12 | "ArgMax", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "ConvInteger", 18 | "ConvTranspose", 19 | "DequantizeLinear", 20 | "Div", 21 | "DynamicQuantizeLinear", 22 | "Equal", 23 | "Expand", 24 | "Flatten", 25 | "Gather", 26 | "Identity", 27 | "If", 28 | "Less", 29 | "MatMul", 30 | "MatMulInteger", 31 | "Mul", 32 | "Pow", 33 | "Range", 34 | "ReduceMean", 35 | "Relu", 36 | "Reshape", 37 | "Resize", 38 | "Shape", 39 | "Sigmoid", 40 | "Slice", 41 | "Softmax", 42 | "Sqrt", 43 | "Squeeze", 44 | "Sub", 45 | "Transpose", 46 | "Unsqueeze", 47 | "Where", 48 | ], 49 | }, 50 | { 51 | model_id: "Xenova/clipseg-rd64-refined", 52 | dtype: "fp32", 53 | architectures: ["CLIPSegForImageSegmentation"], 54 | ops: [ 55 | "Add", 56 | "ArgMax", 57 | "Cast", 58 | "Concat", 59 | "Constant", 60 | "ConstantOfShape", 61 | "Conv", 62 | "ConvTranspose", 63 | "Div", 64 | "Equal", 65 | "Expand", 66 | "Flatten", 67 | "Gather", 68 | "Gemm", 69 | "Identity", 70 | "If", 71 | "Less", 72 | "MatMul", 73 | "Mul", 74 | "Pow", 75 | "Range", 76 | "ReduceMean", 77 | "Relu", 78 | "Reshape", 79 | "Resize", 80 | "Shape", 81 | "Sigmoid", 82 | "Slice", 83 | "Softmax", 84 | "Sqrt", 85 | "Squeeze", 86 | "Sub", 87 | "Transpose", 88 | "Unsqueeze", 89 | "Where", 90 | ], 91 | }, 92 | ], 93 | }; 94 | -------------------------------------------------------------------------------- /packages/core/src/architectures/cohere.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "cohere", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-CohereForCausalLM", 8 | dtype: "fp32", 9 | architectures: ["CohereForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Cos", 17 | "Div", 18 | "Equal", 19 | "Erf", 20 | "Expand", 21 | "Gather", 22 | "Greater", 23 | "Identity", 24 | "MatMul", 25 | "Mul", 26 | "Neg", 27 | "Pow", 28 | "Range", 29 | "ReduceMean", 30 | "Reshape", 31 | "ScatterND", 32 | "Shape", 33 | "Sin", 34 | "Slice", 35 | "Softmax", 36 | "Sqrt", 37 | "Sub", 38 | "Transpose", 39 | "Trilu", 40 | "Unsqueeze", 41 | "Where", 42 | ], 43 | }, 44 | ], 45 | }; 46 | -------------------------------------------------------------------------------- /packages/core/src/architectures/convnext.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "convnext", 5 | models: [ 6 | { 7 | model_id: "Xenova/convnext-tiny-224", 8 | dtype: "quantized", 9 | architectures: ["ConvNextForImageClassification"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Constant", 14 | "ConvInteger", 15 | "Div", 16 | "DynamicQuantizeLinear", 17 | "Erf", 18 | "MatMulInteger", 19 | "Mul", 20 | "Pow", 21 | "ReduceMean", 22 | "Reshape", 23 | "Sqrt", 24 | "Sub", 25 | "Transpose", 26 | ], 27 | }, 28 | { 29 | model_id: "Xenova/convnext-tiny-224", 30 | dtype: "fp32", 31 | architectures: ["ConvNextForImageClassification"], 32 | ops: [ 33 | "Add", 34 | "Cast", 35 | "Constant", 36 | "Conv", 37 | "Div", 38 | "Erf", 39 | "Gemm", 40 | "MatMul", 41 | "Mul", 42 | "Pow", 43 | "ReduceMean", 44 | "Sqrt", 45 | "Sub", 46 | "Transpose", 47 | ], 48 | }, 49 | { 50 | model_id: "onnx-internal-testing/tiny-random-ConvNextModel-ONNX", 51 | dtype: "fp32", 52 | architectures: ["ConvNextModel"], 53 | ops: [ 54 | "Add", 55 | "Cast", 56 | "Constant", 57 | "Conv", 58 | "Div", 59 | "Erf", 60 | "Identity", 61 | "MatMul", 62 | "Mul", 63 | "Pow", 64 | "ReduceMean", 65 | "Sqrt", 66 | "Sub", 67 | "Transpose", 68 | ], 69 | }, 70 | { 71 | model_id: "onnx-internal-testing/tiny-random-convnext-ONNX", 72 | dtype: "fp32", 73 | architectures: ["ConvNextForImageClassification"], 74 | ops: [ 75 | "Add", 76 | "Cast", 77 | "Constant", 78 | "Conv", 79 | "Div", 80 | "Erf", 81 | "Gemm", 82 | "Identity", 83 | "MatMul", 84 | "Mul", 85 | "Pow", 86 | "ReduceMean", 87 | "Sqrt", 88 | "Sub", 89 | "Transpose", 90 | ], 91 | }, 92 | ], 93 | }; 94 | -------------------------------------------------------------------------------- /packages/core/src/architectures/convnextv2.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "convnextv2", 5 | models: [ 6 | { 7 | model_id: "Xenova/convnextv2-large-22k-384", 8 | dtype: "quantized", 9 | architectures: ["ConvNextV2ForImageClassification"], 10 | ops: [ 11 | "Abs", 12 | "Add", 13 | "Cast", 14 | "Constant", 15 | "ConvInteger", 16 | "Div", 17 | "DynamicQuantizeLinear", 18 | "Erf", 19 | "MatMulInteger", 20 | "Mul", 21 | "Pow", 22 | "ReduceMean", 23 | "ReduceSum", 24 | "Reshape", 25 | "Sqrt", 26 | "Sub", 27 | "Transpose", 28 | ], 29 | }, 30 | { 31 | model_id: "Xenova/convnextv2-large-22k-384", 32 | dtype: "fp32", 33 | architectures: ["ConvNextV2ForImageClassification"], 34 | ops: [ 35 | "Abs", 36 | "Add", 37 | "Cast", 38 | "Constant", 39 | "Conv", 40 | "Div", 41 | "Erf", 42 | "Gemm", 43 | "MatMul", 44 | "Mul", 45 | "Pow", 46 | "ReduceMean", 47 | "ReduceSum", 48 | "Sqrt", 49 | "Sub", 50 | "Transpose", 51 | ], 52 | }, 53 | { 54 | model_id: 55 | "onnx-internal-testing/tiny-random-ConvNextV2ForImageClassification-ONNX", 56 | dtype: "fp32", 57 | architectures: ["ConvNextV2ForImageClassification"], 58 | ops: [ 59 | "Add", 60 | "Cast", 61 | "Constant", 62 | "Conv", 63 | "Div", 64 | "Erf", 65 | "Gemm", 66 | "Identity", 67 | "MatMul", 68 | "Mul", 69 | "Pow", 70 | "ReduceL2", 71 | "ReduceMean", 72 | "Sqrt", 73 | "Sub", 74 | "Transpose", 75 | ], 76 | }, 77 | { 78 | model_id: "onnx-internal-testing/tiny-random-ConvNextV2Model-ONNX", 79 | dtype: "fp32", 80 | architectures: ["ConvNextV2Model"], 81 | ops: [ 82 | "Add", 83 | "Cast", 84 | "Constant", 85 | "Conv", 86 | "Div", 87 | "Erf", 88 | "Identity", 89 | "MatMul", 90 | "Mul", 91 | "Pow", 92 | "ReduceL2", 93 | "ReduceMean", 94 | "Sqrt", 95 | "Sub", 96 | "Transpose", 97 | ], 98 | }, 99 | ], 100 | }; 101 | -------------------------------------------------------------------------------- /packages/core/src/architectures/cvt.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "cvt", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-CvtForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["CvtForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Div", 18 | "Einsum", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "Gemm", 24 | "Identity", 25 | "MatMul", 26 | "Mul", 27 | "Pow", 28 | "ReduceMean", 29 | "Reshape", 30 | "Shape", 31 | "Slice", 32 | "Softmax", 33 | "Sqrt", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: "onnx-internal-testing/tiny-random-CvtModel-ONNX", 42 | dtype: "fp32", 43 | architectures: ["CvtModel"], 44 | ops: [ 45 | "Add", 46 | "Concat", 47 | "Constant", 48 | "ConstantOfShape", 49 | "Conv", 50 | "Div", 51 | "Einsum", 52 | "Equal", 53 | "Erf", 54 | "Expand", 55 | "Gather", 56 | "Identity", 57 | "MatMul", 58 | "Mul", 59 | "Pow", 60 | "ReduceMean", 61 | "Reshape", 62 | "Shape", 63 | "Slice", 64 | "Softmax", 65 | "Sqrt", 66 | "Sub", 67 | "Transpose", 68 | "Unsqueeze", 69 | "Where", 70 | ], 71 | }, 72 | ], 73 | }; 74 | -------------------------------------------------------------------------------- /packages/core/src/architectures/data2vec-audio.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "data2vec-audio", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-Data2VecAudioForCTC-ONNX", 8 | dtype: "fp32", 9 | architectures: ["Data2VecAudioForCTC"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "Conv", 16 | "Div", 17 | "Erf", 18 | "Gather", 19 | "Identity", 20 | "MatMul", 21 | "Mul", 22 | "Pow", 23 | "ReduceMean", 24 | "Reshape", 25 | "Shape", 26 | "Slice", 27 | "Softmax", 28 | "Sqrt", 29 | "Sub", 30 | "Transpose", 31 | "Unsqueeze", 32 | ], 33 | }, 34 | { 35 | model_id: 36 | "onnx-internal-testing/tiny-random-Data2VecAudioForSequenceClassification-ONNX", 37 | dtype: "fp32", 38 | architectures: ["Data2VecAudioForSequenceClassification"], 39 | ops: [ 40 | "Add", 41 | "Cast", 42 | "Concat", 43 | "Constant", 44 | "Conv", 45 | "Div", 46 | "Erf", 47 | "Gather", 48 | "Gemm", 49 | "Identity", 50 | "MatMul", 51 | "Mul", 52 | "Pow", 53 | "ReduceMean", 54 | "Reshape", 55 | "Shape", 56 | "Slice", 57 | "Softmax", 58 | "Sqrt", 59 | "Sub", 60 | "Transpose", 61 | "Unsqueeze", 62 | ], 63 | }, 64 | { 65 | model_id: 66 | "onnx-internal-testing/tiny-random-Data2VecAudioForXVector-ONNX", 67 | dtype: "fp32", 68 | architectures: ["Data2VecAudioForXVector"], 69 | ops: [ 70 | "Add", 71 | "Cast", 72 | "Concat", 73 | "Constant", 74 | "Conv", 75 | "Div", 76 | "Erf", 77 | "Gather", 78 | "Gemm", 79 | "Identity", 80 | "MatMul", 81 | "Mul", 82 | "Pow", 83 | "ReduceMean", 84 | "ReduceProd", 85 | "Relu", 86 | "Reshape", 87 | "Shape", 88 | "Slice", 89 | "Softmax", 90 | "Sqrt", 91 | "Sub", 92 | "Transpose", 93 | "Unsqueeze", 94 | ], 95 | }, 96 | ], 97 | }; 98 | -------------------------------------------------------------------------------- /packages/core/src/architectures/data2vec-vision.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "data2vec-vision", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-Data2VecVisionForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["Data2VecVisionForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Div", 18 | "Equal", 19 | "Erf", 20 | "Expand", 21 | "Gather", 22 | "Gemm", 23 | "Identity", 24 | "MatMul", 25 | "Mul", 26 | "Pow", 27 | "ReduceMean", 28 | "Reshape", 29 | "Shape", 30 | "Slice", 31 | "Softmax", 32 | "Sqrt", 33 | "Sub", 34 | "Transpose", 35 | "Unsqueeze", 36 | "Where", 37 | ], 38 | }, 39 | { 40 | model_id: "onnx-internal-testing/tiny-random-Data2VecVisionModel-ONNX", 41 | dtype: "fp32", 42 | architectures: ["Data2VecVisionModel"], 43 | ops: [ 44 | "Add", 45 | "Concat", 46 | "Constant", 47 | "ConstantOfShape", 48 | "Conv", 49 | "Div", 50 | "Equal", 51 | "Erf", 52 | "Expand", 53 | "Gather", 54 | "Identity", 55 | "MatMul", 56 | "Mul", 57 | "Pow", 58 | "ReduceMean", 59 | "Reshape", 60 | "Shape", 61 | "Slice", 62 | "Softmax", 63 | "Sqrt", 64 | "Sub", 65 | "Transpose", 66 | "Unsqueeze", 67 | "Where", 68 | ], 69 | }, 70 | ], 71 | }; 72 | -------------------------------------------------------------------------------- /packages/core/src/architectures/decision_transformer.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "decision_transformer", 5 | models: [ 6 | { 7 | model_id: "onnx-community/decision-transformer-gym-hopper-medium-replay", 8 | dtype: "fp32", 9 | architectures: ["DecisionTransformerModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Div", 17 | "Gather", 18 | "Gemm", 19 | "MatMul", 20 | "Mul", 21 | "Pow", 22 | "ReduceMean", 23 | "Relu", 24 | "Reshape", 25 | "Shape", 26 | "Slice", 27 | "Softmax", 28 | "Split", 29 | "Sqrt", 30 | "Squeeze", 31 | "Sub", 32 | "Tanh", 33 | "Transpose", 34 | "Unsqueeze", 35 | "Where", 36 | ], 37 | }, 38 | ], 39 | }; 40 | -------------------------------------------------------------------------------- /packages/core/src/architectures/donut-swin.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "donut-swin", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-DonutSwinModel-ONNX", 8 | dtype: "fp32", 9 | architectures: ["DonutSwinModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Div", 18 | "Equal", 19 | "Erf", 20 | "Expand", 21 | "Gather", 22 | "Identity", 23 | "MatMul", 24 | "Mod", 25 | "Mul", 26 | "Not", 27 | "Pad", 28 | "Pow", 29 | "Range", 30 | "ReduceMean", 31 | "Reshape", 32 | "ScatterND", 33 | "Shape", 34 | "Slice", 35 | "Softmax", 36 | "Sqrt", 37 | "Sub", 38 | "Transpose", 39 | "Unsqueeze", 40 | "Where", 41 | ], 42 | }, 43 | ], 44 | }; 45 | -------------------------------------------------------------------------------- /packages/core/src/architectures/exaone.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "exaone", 5 | models: [ 6 | { 7 | model_id: "onnx-community/EXAONE-3.5-2.4B-Instruct", 8 | dtype: "q4", 9 | architectures: ["ExaoneForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "ConstantOfShape", 15 | "Cos", 16 | "Div", 17 | "Equal", 18 | "Expand", 19 | "Gather", 20 | "Greater", 21 | "MatMul", 22 | "MatMulNBits", 23 | "Mul", 24 | "Neg", 25 | "Pow", 26 | "Range", 27 | "ReduceMean", 28 | "Reshape", 29 | "ScatterND", 30 | "Shape", 31 | "Sigmoid", 32 | "Sin", 33 | "Slice", 34 | "Softmax", 35 | "Sqrt", 36 | "Transpose", 37 | "Trilu", 38 | "Unsqueeze", 39 | "Where", 40 | ], 41 | }, 42 | { 43 | model_id: "onnx-community/EXAONE-3.5-2.4B-Instruct", 44 | dtype: "bnb4", 45 | architectures: ["ExaoneForCausalLM"], 46 | ops: [ 47 | "Add", 48 | "Cast", 49 | "Concat", 50 | "ConstantOfShape", 51 | "Cos", 52 | "Div", 53 | "Equal", 54 | "Expand", 55 | "Gather", 56 | "Greater", 57 | "MatMul", 58 | "MatMulBnb4", 59 | "Mul", 60 | "Neg", 61 | "Pow", 62 | "Range", 63 | "ReduceMean", 64 | "Reshape", 65 | "ScatterND", 66 | "Shape", 67 | "Sigmoid", 68 | "Sin", 69 | "Slice", 70 | "Softmax", 71 | "Sqrt", 72 | "Transpose", 73 | "Trilu", 74 | "Unsqueeze", 75 | "Where", 76 | ], 77 | }, 78 | { 79 | model_id: "onnx-community/EXAONE-3.5-2.4B-Instruct", 80 | dtype: "quantized", 81 | architectures: ["ExaoneForCausalLM"], 82 | ops: [ 83 | "Add", 84 | "Cast", 85 | "Concat", 86 | "ConstantOfShape", 87 | "Cos", 88 | "DequantizeLinear", 89 | "Div", 90 | "DynamicQuantizeLinear", 91 | "Equal", 92 | "Expand", 93 | "Gather", 94 | "Greater", 95 | "MatMul", 96 | "MatMulInteger", 97 | "Mul", 98 | "Neg", 99 | "Pow", 100 | "Range", 101 | "ReduceMean", 102 | "Reshape", 103 | "ScatterND", 104 | "Shape", 105 | "Sigmoid", 106 | "Sin", 107 | "Slice", 108 | "Softmax", 109 | "Sqrt", 110 | "Transpose", 111 | "Trilu", 112 | "Unsqueeze", 113 | "Where", 114 | ], 115 | }, 116 | { 117 | model_id: "onnx-community/EXAONE-3.5-2.4B-Instruct", 118 | dtype: "fp32", 119 | architectures: ["ExaoneForCausalLM"], 120 | ops: [ 121 | "Add", 122 | "Cast", 123 | "Concat", 124 | "ConstantOfShape", 125 | "Cos", 126 | "Div", 127 | "Equal", 128 | "Expand", 129 | "Gather", 130 | "Greater", 131 | "MatMul", 132 | "Mul", 133 | "Neg", 134 | "Pow", 135 | "Range", 136 | "ReduceMean", 137 | "Reshape", 138 | "ScatterND", 139 | "Shape", 140 | "Sigmoid", 141 | "Sin", 142 | "Slice", 143 | "Softmax", 144 | "Sqrt", 145 | "Transpose", 146 | "Trilu", 147 | "Unsqueeze", 148 | "Where", 149 | ], 150 | }, 151 | ], 152 | }; 153 | -------------------------------------------------------------------------------- /packages/core/src/architectures/flaubert.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "flaubert", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-FlaubertForMultipleChoice-ONNX", 9 | dtype: "fp32", 10 | architectures: ["FlaubertForMultipleChoice"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "Div", 18 | "Equal", 19 | "Erf", 20 | "Expand", 21 | "Gather", 22 | "Gemm", 23 | "Identity", 24 | "MatMul", 25 | "Mul", 26 | "Pow", 27 | "ReduceMean", 28 | "Reshape", 29 | "Shape", 30 | "Slice", 31 | "Softmax", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: 42 | "onnx-internal-testing/tiny-random-FlaubertForQuestionAnsweringSimple-ONNX", 43 | dtype: "fp32", 44 | architectures: ["FlaubertForQuestionAnsweringSimple"], 45 | ops: [ 46 | "Add", 47 | "Cast", 48 | "Concat", 49 | "Constant", 50 | "ConstantOfShape", 51 | "Div", 52 | "Equal", 53 | "Erf", 54 | "Expand", 55 | "Gather", 56 | "Identity", 57 | "MatMul", 58 | "Mul", 59 | "Pow", 60 | "ReduceMean", 61 | "Reshape", 62 | "Shape", 63 | "Slice", 64 | "Softmax", 65 | "Split", 66 | "Sqrt", 67 | "Squeeze", 68 | "Sub", 69 | "Transpose", 70 | "Unsqueeze", 71 | "Where", 72 | ], 73 | }, 74 | { 75 | model_id: 76 | "onnx-internal-testing/tiny-random-FlaubertForSequenceClassification-ONNX", 77 | dtype: "fp32", 78 | architectures: ["FlaubertForSequenceClassification"], 79 | ops: [ 80 | "Add", 81 | "Cast", 82 | "Concat", 83 | "Constant", 84 | "ConstantOfShape", 85 | "Div", 86 | "Equal", 87 | "Erf", 88 | "Expand", 89 | "Gather", 90 | "Gemm", 91 | "Identity", 92 | "MatMul", 93 | "Mul", 94 | "Pow", 95 | "ReduceMean", 96 | "Reshape", 97 | "Shape", 98 | "Slice", 99 | "Softmax", 100 | "Sqrt", 101 | "Sub", 102 | "Transpose", 103 | "Unsqueeze", 104 | "Where", 105 | ], 106 | }, 107 | { 108 | model_id: "onnx-internal-testing/tiny-random-flaubert-ONNX", 109 | dtype: "fp32", 110 | architectures: [], 111 | ops: [ 112 | "Add", 113 | "Cast", 114 | "Concat", 115 | "Constant", 116 | "ConstantOfShape", 117 | "Div", 118 | "Equal", 119 | "Erf", 120 | "Expand", 121 | "Gather", 122 | "Identity", 123 | "MatMul", 124 | "Mul", 125 | "Pow", 126 | "ReduceMean", 127 | "Reshape", 128 | "Shape", 129 | "Slice", 130 | "Softmax", 131 | "Sqrt", 132 | "Sub", 133 | "Transpose", 134 | "Unsqueeze", 135 | "Where", 136 | ], 137 | }, 138 | ], 139 | }; 140 | -------------------------------------------------------------------------------- /packages/core/src/architectures/gemma2.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "gemma2", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-Gemma2ForCausalLM", 8 | dtype: "fp32", 9 | architectures: ["Gemma2ForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Cos", 17 | "Div", 18 | "Equal", 19 | "Expand", 20 | "Gather", 21 | "Greater", 22 | "Identity", 23 | "MatMul", 24 | "Mul", 25 | "Neg", 26 | "Pow", 27 | "Range", 28 | "ReduceMean", 29 | "Reshape", 30 | "ScatterND", 31 | "Shape", 32 | "Sin", 33 | "Slice", 34 | "Softmax", 35 | "Sqrt", 36 | "Tanh", 37 | "Transpose", 38 | "Trilu", 39 | "Unsqueeze", 40 | "Where", 41 | ], 42 | }, 43 | { 44 | model_id: "onnx-community/gemma-2-2b-jpn-it", 45 | dtype: "q4f16", 46 | architectures: ["Gemma2ForCausalLM"], 47 | ops: [ 48 | "Add", 49 | "Cast", 50 | "Concat", 51 | "Constant", 52 | "ConstantOfShape", 53 | "Div", 54 | "Equal", 55 | "Expand", 56 | "FastGelu", 57 | "Gather", 58 | "Less", 59 | "MatMulNBits", 60 | "Mul", 61 | "MultiHeadAttention", 62 | "Range", 63 | "Reshape", 64 | "RotaryEmbedding", 65 | "Shape", 66 | "SimplifiedLayerNormalization", 67 | "SkipSimplifiedLayerNormalization", 68 | "Slice", 69 | "Squeeze", 70 | "Sub", 71 | "Tanh", 72 | "Tile", 73 | "Transpose", 74 | "Unsqueeze", 75 | "Where", 76 | ], 77 | }, 78 | ], 79 | }; 80 | -------------------------------------------------------------------------------- /packages/core/src/architectures/geoclip.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "geoclip", 5 | models: [ 6 | { 7 | model_id: "Xenova/geoclip-large-patch14", 8 | dtype: "uint8", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "Asin", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "ConvInteger", 18 | "Cos", 19 | "DequantizeLinear", 20 | "Div", 21 | "DynamicQuantizeLinear", 22 | "Equal", 23 | "Expand", 24 | "Gather", 25 | "MatMul", 26 | "MatMulInteger", 27 | "Mul", 28 | "Pow", 29 | "ReduceMean", 30 | "Relu", 31 | "Reshape", 32 | "Shape", 33 | "Sigmoid", 34 | "Sin", 35 | "Slice", 36 | "Softmax", 37 | "Sqrt", 38 | "Sub", 39 | "Transpose", 40 | "Unsqueeze", 41 | "Where", 42 | ], 43 | }, 44 | { 45 | model_id: "Xenova/geoclip-large-patch14", 46 | dtype: "fp32", 47 | architectures: [], 48 | ops: [ 49 | "Add", 50 | "Asin", 51 | "Cast", 52 | "Concat", 53 | "Constant", 54 | "ConstantOfShape", 55 | "Conv", 56 | "Cos", 57 | "Div", 58 | "Equal", 59 | "Expand", 60 | "Gather", 61 | "Gemm", 62 | "MatMul", 63 | "Mul", 64 | "Pow", 65 | "ReduceMean", 66 | "Relu", 67 | "Reshape", 68 | "Shape", 69 | "Sigmoid", 70 | "Sin", 71 | "Slice", 72 | "Softmax", 73 | "Sqrt", 74 | "Sub", 75 | "Transpose", 76 | "Unsqueeze", 77 | "Where", 78 | ], 79 | }, 80 | { 81 | model_id: "Xenova/geoclip-large-patch14", 82 | dtype: "q4", 83 | architectures: [], 84 | ops: [ 85 | "Add", 86 | "Asin", 87 | "Cast", 88 | "Concat", 89 | "Constant", 90 | "ConstantOfShape", 91 | "Conv", 92 | "Cos", 93 | "Div", 94 | "Equal", 95 | "Expand", 96 | "Gather", 97 | "Gemm", 98 | "MatMul", 99 | "MatMulNBits", 100 | "Mul", 101 | "Pow", 102 | "ReduceMean", 103 | "Relu", 104 | "Reshape", 105 | "Shape", 106 | "Sigmoid", 107 | "Sin", 108 | "Slice", 109 | "Softmax", 110 | "Sqrt", 111 | "Sub", 112 | "Transpose", 113 | "Unsqueeze", 114 | "Where", 115 | ], 116 | }, 117 | { 118 | model_id: "Xenova/geoclip-large-patch14", 119 | dtype: "bnb4", 120 | architectures: [], 121 | ops: [ 122 | "Add", 123 | "Asin", 124 | "Cast", 125 | "Concat", 126 | "Constant", 127 | "ConstantOfShape", 128 | "Conv", 129 | "Cos", 130 | "Div", 131 | "Equal", 132 | "Expand", 133 | "Gather", 134 | "Gemm", 135 | "MatMul", 136 | "MatMulBnb4", 137 | "Mul", 138 | "Pow", 139 | "ReduceMean", 140 | "Relu", 141 | "Reshape", 142 | "Shape", 143 | "Sigmoid", 144 | "Sin", 145 | "Slice", 146 | "Softmax", 147 | "Sqrt", 148 | "Sub", 149 | "Transpose", 150 | "Unsqueeze", 151 | "Where", 152 | ], 153 | }, 154 | ], 155 | }; 156 | -------------------------------------------------------------------------------- /packages/core/src/architectures/groupvit.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "groupvit", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-GroupViTModel", 8 | dtype: "fp32", 9 | architectures: ["GroupViTModel"], 10 | ops: [ 11 | "Add", 12 | "ArgMax", 13 | "BatchNormalization", 14 | "Cast", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Conv", 19 | "Div", 20 | "Equal", 21 | "Erf", 22 | "Exp", 23 | "Expand", 24 | "Flatten", 25 | "Gather", 26 | "Gemm", 27 | "Identity", 28 | "Less", 29 | "MatMul", 30 | "Mul", 31 | "Pow", 32 | "Range", 33 | "ReduceL2", 34 | "ReduceMean", 35 | "ReduceSum", 36 | "Relu", 37 | "Reshape", 38 | "ScatterElements", 39 | "Shape", 40 | "Sigmoid", 41 | "Slice", 42 | "Softmax", 43 | "Sqrt", 44 | "Squeeze", 45 | "Sub", 46 | "Transpose", 47 | "Unsqueeze", 48 | "Where", 49 | ], 50 | }, 51 | ], 52 | }; 53 | -------------------------------------------------------------------------------- /packages/core/src/architectures/gte.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "gte", 5 | models: [ 6 | { 7 | model_id: "Snowflake/snowflake-arctic-embed-m-v2.0", 8 | dtype: "q4", 9 | architectures: ["GteModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Clip", 14 | "Concat", 15 | "Div", 16 | "Equal", 17 | "Erf", 18 | "Expand", 19 | "Gather", 20 | "MatMul", 21 | "MatMulNBits", 22 | "Mul", 23 | "Neg", 24 | "Pow", 25 | "ReduceL2", 26 | "ReduceMean", 27 | "Reshape", 28 | "Shape", 29 | "Slice", 30 | "Softmax", 31 | "Split", 32 | "Sqrt", 33 | "Sub", 34 | "Transpose", 35 | "Unsqueeze", 36 | "Where", 37 | ], 38 | }, 39 | { 40 | model_id: "Snowflake/snowflake-arctic-embed-m-v2.0", 41 | dtype: "bnb4", 42 | architectures: ["GteModel"], 43 | ops: [ 44 | "Add", 45 | "Cast", 46 | "Clip", 47 | "Concat", 48 | "Div", 49 | "Equal", 50 | "Erf", 51 | "Expand", 52 | "Gather", 53 | "MatMul", 54 | "MatMulBnb4", 55 | "Mul", 56 | "Neg", 57 | "Pow", 58 | "ReduceL2", 59 | "ReduceMean", 60 | "Reshape", 61 | "Shape", 62 | "Slice", 63 | "Softmax", 64 | "Split", 65 | "Sqrt", 66 | "Sub", 67 | "Transpose", 68 | "Unsqueeze", 69 | "Where", 70 | ], 71 | }, 72 | { 73 | model_id: "Snowflake/snowflake-arctic-embed-m-v2.0", 74 | dtype: "quantized", 75 | architectures: ["GteModel"], 76 | ops: [ 77 | "Add", 78 | "Cast", 79 | "Clip", 80 | "Concat", 81 | "DequantizeLinear", 82 | "Div", 83 | "DynamicQuantizeLinear", 84 | "Equal", 85 | "Erf", 86 | "Expand", 87 | "Gather", 88 | "MatMul", 89 | "MatMulInteger", 90 | "Mul", 91 | "Neg", 92 | "Pow", 93 | "ReduceL2", 94 | "ReduceMean", 95 | "Reshape", 96 | "Shape", 97 | "Slice", 98 | "Softmax", 99 | "Split", 100 | "Sqrt", 101 | "Sub", 102 | "Transpose", 103 | "Unsqueeze", 104 | "Where", 105 | ], 106 | }, 107 | { 108 | model_id: "Snowflake/snowflake-arctic-embed-m-v2.0", 109 | dtype: "fp32", 110 | architectures: ["GteModel"], 111 | ops: [ 112 | "Add", 113 | "Cast", 114 | "Clip", 115 | "Concat", 116 | "Div", 117 | "Equal", 118 | "Erf", 119 | "Expand", 120 | "Gather", 121 | "MatMul", 122 | "Mul", 123 | "Neg", 124 | "Pow", 125 | "ReduceL2", 126 | "ReduceMean", 127 | "Reshape", 128 | "Shape", 129 | "Slice", 130 | "Softmax", 131 | "Split", 132 | "Sqrt", 133 | "Sub", 134 | "Transpose", 135 | "Unsqueeze", 136 | "Where", 137 | ], 138 | }, 139 | ], 140 | }; 141 | -------------------------------------------------------------------------------- /packages/core/src/architectures/hifigan.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "hifigan", 5 | models: [ 6 | { 7 | model_id: "Xenova/speecht5_hifigan", 8 | dtype: "quantized", 9 | architectures: ["SpeechT5HifiGan"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Constant", 14 | "ConvInteger", 15 | "ConvTranspose", 16 | "Div", 17 | "DynamicQuantizeLinear", 18 | "LeakyRelu", 19 | "Mul", 20 | "Reshape", 21 | "Squeeze", 22 | "Sub", 23 | "Tanh", 24 | "Transpose", 25 | "Unsqueeze", 26 | ], 27 | }, 28 | { 29 | model_id: "Xenova/speecht5_hifigan", 30 | dtype: "fp32", 31 | architectures: ["SpeechT5HifiGan"], 32 | ops: [ 33 | "Add", 34 | "Constant", 35 | "Conv", 36 | "ConvTranspose", 37 | "Div", 38 | "LeakyRelu", 39 | "Reshape", 40 | "Squeeze", 41 | "Sub", 42 | "Tanh", 43 | "Transpose", 44 | "Unsqueeze", 45 | ], 46 | }, 47 | ], 48 | }; 49 | -------------------------------------------------------------------------------- /packages/core/src/architectures/idefics3.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "idefics3", 5 | models: [ 6 | { 7 | model_id: 8 | "hf-internal-testing/tiny-random-Idefics3ForConditionalGeneration", 9 | dtype: "fp32", 10 | architectures: ["Idefics3ForConditionalGeneration"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Clip", 15 | "Concat", 16 | "ConstantOfShape", 17 | "Conv", 18 | "Div", 19 | "Equal", 20 | "Expand", 21 | "Flatten", 22 | "Gather", 23 | "GatherND", 24 | "Greater", 25 | "GroupQueryAttention", 26 | "Less", 27 | "MatMul", 28 | "Mul", 29 | "NonZero", 30 | "Not", 31 | "Pow", 32 | "ReduceMean", 33 | "ReduceSum", 34 | "Reshape", 35 | "ScatterND", 36 | "Shape", 37 | "Sigmoid", 38 | "SimplifiedLayerNormalization", 39 | "SkipSimplifiedLayerNormalization", 40 | "Slice", 41 | "Softmax", 42 | "Split", 43 | "Sqrt", 44 | "Squeeze", 45 | "Sub", 46 | "Tanh", 47 | "Transpose", 48 | "Unsqueeze", 49 | "Where", 50 | ], 51 | }, 52 | ], 53 | }; 54 | -------------------------------------------------------------------------------- /packages/core/src/architectures/ijepa.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "ijepa", 5 | models: [ 6 | { 7 | model_id: "onnx-community/ijepa_vith14_22k", 8 | dtype: "q4", 9 | architectures: ["IJepaModel"], 10 | ops: [ 11 | "Add", 12 | "Conv", 13 | "Div", 14 | "Erf", 15 | "MatMul", 16 | "MatMulNBits", 17 | "Mul", 18 | "Pow", 19 | "ReduceMean", 20 | "Reshape", 21 | "Softmax", 22 | "Sqrt", 23 | "Sub", 24 | "Transpose", 25 | ], 26 | }, 27 | { 28 | model_id: "onnx-community/ijepa_vith14_22k", 29 | dtype: "bnb4", 30 | architectures: ["IJepaModel"], 31 | ops: [ 32 | "Add", 33 | "Conv", 34 | "Div", 35 | "Erf", 36 | "MatMul", 37 | "MatMulBnb4", 38 | "Mul", 39 | "Pow", 40 | "ReduceMean", 41 | "Reshape", 42 | "Softmax", 43 | "Sqrt", 44 | "Sub", 45 | "Transpose", 46 | ], 47 | }, 48 | { 49 | model_id: "onnx-community/ijepa_vith14_22k", 50 | dtype: "q4f16", 51 | architectures: ["IJepaModel"], 52 | ops: [ 53 | "Add", 54 | "Cast", 55 | "Conv", 56 | "Div", 57 | "Erf", 58 | "MatMul", 59 | "MatMulNBits", 60 | "Mul", 61 | "Pow", 62 | "ReduceMean", 63 | "Reshape", 64 | "Softmax", 65 | "Sqrt", 66 | "Sub", 67 | "Transpose", 68 | ], 69 | }, 70 | { 71 | model_id: "onnx-community/ijepa_vith14_22k", 72 | dtype: "quantized", 73 | architectures: ["IJepaModel"], 74 | ops: [ 75 | "Add", 76 | "Cast", 77 | "ConvInteger", 78 | "Div", 79 | "DynamicQuantizeLinear", 80 | "Erf", 81 | "MatMul", 82 | "MatMulInteger", 83 | "Mul", 84 | "Pow", 85 | "ReduceMean", 86 | "Reshape", 87 | "Softmax", 88 | "Sqrt", 89 | "Sub", 90 | "Transpose", 91 | ], 92 | }, 93 | { 94 | model_id: "onnx-community/ijepa_vith14_22k", 95 | dtype: "fp32", 96 | architectures: ["IJepaModel"], 97 | ops: [ 98 | "Add", 99 | "Conv", 100 | "Div", 101 | "Erf", 102 | "MatMul", 103 | "Mul", 104 | "Pow", 105 | "ReduceMean", 106 | "Reshape", 107 | "Softmax", 108 | "Sqrt", 109 | "Sub", 110 | "Transpose", 111 | ], 112 | }, 113 | { 114 | model_id: "onnx-community/ijepa_vith14_22k", 115 | dtype: "fp16", 116 | architectures: ["IJepaModel"], 117 | ops: [ 118 | "Add", 119 | "Cast", 120 | "Conv", 121 | "Div", 122 | "Erf", 123 | "MatMul", 124 | "Mul", 125 | "Pow", 126 | "ReduceMean", 127 | "Reshape", 128 | "Softmax", 129 | "Sqrt", 130 | "Sub", 131 | "Transpose", 132 | ], 133 | }, 134 | ], 135 | }; 136 | -------------------------------------------------------------------------------- /packages/core/src/architectures/imagegpt.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "imagegpt", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-ImageGPTForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["ImageGPTForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "Div", 17 | "Erf", 18 | "Gather", 19 | "Gemm", 20 | "Identity", 21 | "MatMul", 22 | "Mul", 23 | "Pow", 24 | "Range", 25 | "ReduceMean", 26 | "Reshape", 27 | "Shape", 28 | "Slice", 29 | "Softmax", 30 | "Split", 31 | "Sqrt", 32 | "Squeeze", 33 | "Sub", 34 | "Transpose", 35 | "Unsqueeze", 36 | "Where", 37 | ], 38 | }, 39 | ], 40 | }; 41 | -------------------------------------------------------------------------------- /packages/core/src/architectures/isnet.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "isnet", 5 | models: [ 6 | { 7 | model_id: "onnx-community/ISNet-ONNX", 8 | dtype: "quantized", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "ConvInteger", 15 | "DynamicQuantizeLinear", 16 | "MaxPool", 17 | "Mul", 18 | "Relu", 19 | "Resize", 20 | "Sigmoid", 21 | ], 22 | }, 23 | { 24 | model_id: "onnx-community/ormbg-ONNX", 25 | dtype: "q4", 26 | architectures: [], 27 | ops: ["Add", "Concat", "Conv", "MaxPool", "Relu", "Resize", "Sigmoid"], 28 | }, 29 | { 30 | model_id: "onnx-community/ormbg-ONNX", 31 | dtype: "q4f16", 32 | architectures: [], 33 | ops: [ 34 | "Add", 35 | "Cast", 36 | "Concat", 37 | "Conv", 38 | "MaxPool", 39 | "Relu", 40 | "Resize", 41 | "Sigmoid", 42 | ], 43 | }, 44 | { 45 | model_id: "onnx-community/ormbg-ONNX", 46 | dtype: "quantized", 47 | architectures: [], 48 | ops: [ 49 | "Add", 50 | "Cast", 51 | "Concat", 52 | "ConvInteger", 53 | "DynamicQuantizeLinear", 54 | "MaxPool", 55 | "Mul", 56 | "Relu", 57 | "Reshape", 58 | "Resize", 59 | "Sigmoid", 60 | ], 61 | }, 62 | ], 63 | }; 64 | -------------------------------------------------------------------------------- /packages/core/src/architectures/jais.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "jais", 5 | models: [ 6 | { 7 | model_id: "onnx-community/jais-family-590m-chat", 8 | dtype: "quantized", 9 | architectures: ["JAISLMHeadModel"], 10 | ops: [ 11 | "Abs", 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "DequantizeLinear", 16 | "Div", 17 | "DynamicQuantizeLinear", 18 | "Expand", 19 | "Gather", 20 | "MatMul", 21 | "MatMulInteger", 22 | "Mul", 23 | "Pow", 24 | "Range", 25 | "ReduceMean", 26 | "Reshape", 27 | "Shape", 28 | "Sigmoid", 29 | "Slice", 30 | "Softmax", 31 | "Split", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: "onnx-community/jais-family-590m-chat", 42 | dtype: "fp32", 43 | architectures: ["JAISLMHeadModel"], 44 | ops: [ 45 | "Abs", 46 | "Add", 47 | "Cast", 48 | "Concat", 49 | "Div", 50 | "Expand", 51 | "Gather", 52 | "Gemm", 53 | "MatMul", 54 | "Mul", 55 | "Pow", 56 | "Range", 57 | "ReduceMean", 58 | "Reshape", 59 | "Shape", 60 | "Sigmoid", 61 | "Slice", 62 | "Softmax", 63 | "Split", 64 | "Sqrt", 65 | "Squeeze", 66 | "Sub", 67 | "Transpose", 68 | "Unsqueeze", 69 | "Where", 70 | ], 71 | }, 72 | { 73 | model_id: "onnx-community/tiny-random-jais", 74 | dtype: "fp32", 75 | architectures: ["JAISLMHeadModel"], 76 | ops: [ 77 | "Abs", 78 | "Add", 79 | "Cast", 80 | "Concat", 81 | "Constant", 82 | "ConstantOfShape", 83 | "Div", 84 | "Equal", 85 | "Expand", 86 | "Gather", 87 | "Gemm", 88 | "Identity", 89 | "MatMul", 90 | "Mul", 91 | "Pow", 92 | "Range", 93 | "ReduceMean", 94 | "Reshape", 95 | "Shape", 96 | "Sigmoid", 97 | "Slice", 98 | "Softmax", 99 | "Split", 100 | "Sqrt", 101 | "Squeeze", 102 | "Sub", 103 | "Transpose", 104 | "Unsqueeze", 105 | "Where", 106 | ], 107 | }, 108 | ], 109 | }; 110 | -------------------------------------------------------------------------------- /packages/core/src/architectures/layoutlm.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "layoutlm", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-LayoutLMForMaskedLM-ONNX", 8 | dtype: "fp32", 9 | architectures: ["LayoutLMForMaskedLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "Div", 16 | "Erf", 17 | "Gather", 18 | "Identity", 19 | "MatMul", 20 | "Mul", 21 | "Pow", 22 | "ReduceMean", 23 | "Reshape", 24 | "Shape", 25 | "Slice", 26 | "Softmax", 27 | "Sqrt", 28 | "Sub", 29 | "Transpose", 30 | "Unsqueeze", 31 | ], 32 | }, 33 | { 34 | model_id: 35 | "onnx-internal-testing/tiny-random-LayoutLMForSequenceClassification-ONNX", 36 | dtype: "fp32", 37 | architectures: ["LayoutLMForSequenceClassification"], 38 | ops: [ 39 | "Add", 40 | "Cast", 41 | "Concat", 42 | "Constant", 43 | "Div", 44 | "Erf", 45 | "Gather", 46 | "Gemm", 47 | "Identity", 48 | "MatMul", 49 | "Mul", 50 | "Pow", 51 | "ReduceMean", 52 | "Reshape", 53 | "Shape", 54 | "Slice", 55 | "Softmax", 56 | "Sqrt", 57 | "Sub", 58 | "Tanh", 59 | "Transpose", 60 | "Unsqueeze", 61 | ], 62 | }, 63 | ], 64 | }; 65 | -------------------------------------------------------------------------------- /packages/core/src/architectures/layoutlmv3.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "layoutlmv3", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-LayoutLMv3ForSequenceClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["LayoutLMv3ForSequenceClassification"], 11 | ops: [ 12 | "Abs", 13 | "Add", 14 | "Cast", 15 | "Clip", 16 | "Concat", 17 | "Constant", 18 | "ConstantOfShape", 19 | "Conv", 20 | "CumSum", 21 | "Div", 22 | "Equal", 23 | "Erf", 24 | "Expand", 25 | "Gather", 26 | "Gemm", 27 | "Greater", 28 | "Identity", 29 | "Less", 30 | "Log", 31 | "MatMul", 32 | "Min", 33 | "Mul", 34 | "Not", 35 | "Pow", 36 | "Range", 37 | "ReduceMax", 38 | "ReduceMean", 39 | "Reshape", 40 | "Shape", 41 | "Slice", 42 | "Softmax", 43 | "Sqrt", 44 | "Sub", 45 | "Tanh", 46 | "Tile", 47 | "Transpose", 48 | "Unsqueeze", 49 | "Where", 50 | ], 51 | }, 52 | { 53 | model_id: 54 | "onnx-internal-testing/tiny-random-LayoutLMv3ForTokenClassification-ONNX", 55 | dtype: "fp32", 56 | architectures: ["LayoutLMv3ForTokenClassification"], 57 | ops: [ 58 | "Abs", 59 | "Add", 60 | "Cast", 61 | "Clip", 62 | "Concat", 63 | "Constant", 64 | "ConstantOfShape", 65 | "Conv", 66 | "CumSum", 67 | "Div", 68 | "Equal", 69 | "Erf", 70 | "Expand", 71 | "Gather", 72 | "Greater", 73 | "Identity", 74 | "Less", 75 | "Log", 76 | "MatMul", 77 | "Min", 78 | "Mul", 79 | "Not", 80 | "Pow", 81 | "Range", 82 | "ReduceMax", 83 | "ReduceMean", 84 | "Reshape", 85 | "Shape", 86 | "Slice", 87 | "Softmax", 88 | "Sqrt", 89 | "Sub", 90 | "Tile", 91 | "Transpose", 92 | "Unsqueeze", 93 | "Where", 94 | ], 95 | }, 96 | ], 97 | }; 98 | -------------------------------------------------------------------------------- /packages/core/src/architectures/levit.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "levit", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-LevitForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["LevitForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "BatchNormalization", 14 | "Concat", 15 | "Constant", 16 | "Conv", 17 | "Flatten", 18 | "Gather", 19 | "Gemm", 20 | "HardSigmoid", 21 | "Identity", 22 | "MatMul", 23 | "Mul", 24 | "ReduceMean", 25 | "Reshape", 26 | "Shape", 27 | "Slice", 28 | "Softmax", 29 | "Split", 30 | "Transpose", 31 | "Unsqueeze", 32 | ], 33 | }, 34 | { 35 | model_id: 36 | "onnx-internal-testing/tiny-random-LevitForImageClassificationWithTeacher-ONNX", 37 | dtype: "fp32", 38 | architectures: ["LevitForImageClassificationWithTeacher"], 39 | ops: [ 40 | "Add", 41 | "BatchNormalization", 42 | "Concat", 43 | "Constant", 44 | "Conv", 45 | "Div", 46 | "Flatten", 47 | "Gather", 48 | "Gemm", 49 | "HardSigmoid", 50 | "Identity", 51 | "MatMul", 52 | "Mul", 53 | "ReduceMean", 54 | "Reshape", 55 | "Shape", 56 | "Slice", 57 | "Softmax", 58 | "Split", 59 | "Transpose", 60 | "Unsqueeze", 61 | ], 62 | }, 63 | { 64 | model_id: "onnx-internal-testing/tiny-random-LevitModel-ONNX", 65 | dtype: "fp32", 66 | architectures: ["LevitModel"], 67 | ops: [ 68 | "Add", 69 | "BatchNormalization", 70 | "Concat", 71 | "Constant", 72 | "Conv", 73 | "Flatten", 74 | "Gather", 75 | "HardSigmoid", 76 | "Identity", 77 | "MatMul", 78 | "Mul", 79 | "Reshape", 80 | "Shape", 81 | "Slice", 82 | "Softmax", 83 | "Split", 84 | "Transpose", 85 | "Unsqueeze", 86 | ], 87 | }, 88 | ], 89 | }; 90 | -------------------------------------------------------------------------------- /packages/core/src/architectures/lilt.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "lilt", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-LiltForQuestionAnswering-ONNX", 9 | dtype: "fp32", 10 | architectures: ["LiltForQuestionAnswering"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "CumSum", 18 | "Div", 19 | "Equal", 20 | "Erf", 21 | "Gather", 22 | "Identity", 23 | "MatMul", 24 | "Mul", 25 | "Not", 26 | "Pow", 27 | "ReduceMean", 28 | "Reshape", 29 | "Shape", 30 | "Softmax", 31 | "Split", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | ], 38 | }, 39 | { 40 | model_id: 41 | "onnx-internal-testing/tiny-random-LiltForTokenClassification-ONNX", 42 | dtype: "fp32", 43 | architectures: ["LiltForTokenClassification"], 44 | ops: [ 45 | "Add", 46 | "Cast", 47 | "Concat", 48 | "Constant", 49 | "ConstantOfShape", 50 | "CumSum", 51 | "Div", 52 | "Equal", 53 | "Erf", 54 | "Gather", 55 | "Identity", 56 | "MatMul", 57 | "Mul", 58 | "Not", 59 | "Pow", 60 | "ReduceMean", 61 | "Reshape", 62 | "Shape", 63 | "Softmax", 64 | "Sqrt", 65 | "Sub", 66 | "Transpose", 67 | "Unsqueeze", 68 | ], 69 | }, 70 | ], 71 | }; 72 | -------------------------------------------------------------------------------- /packages/core/src/architectures/longformer.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "longformer", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-LongformerForMaskedLM-ONNX", 8 | dtype: "fp32", 9 | architectures: ["LongformerForMaskedLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "CumSum", 17 | "Div", 18 | "Einsum", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "Identity", 24 | "Less", 25 | "MatMul", 26 | "Mod", 27 | "Mul", 28 | "Neg", 29 | "NonZero", 30 | "Not", 31 | "Pad", 32 | "Pow", 33 | "Range", 34 | "ReduceMean", 35 | "Reshape", 36 | "ScatterND", 37 | "Shape", 38 | "Slice", 39 | "Softmax", 40 | "Sqrt", 41 | "Squeeze", 42 | "Sub", 43 | "Transpose", 44 | "Trilu", 45 | "Unsqueeze", 46 | "Where", 47 | ], 48 | }, 49 | { 50 | model_id: 51 | "onnx-internal-testing/tiny-random-LongformerForMultipleChoice-ONNX", 52 | dtype: "fp32", 53 | architectures: ["LongformerForMultipleChoice"], 54 | ops: [ 55 | "Add", 56 | "Cast", 57 | "Concat", 58 | "Constant", 59 | "ConstantOfShape", 60 | "CumSum", 61 | "Div", 62 | "Einsum", 63 | "Equal", 64 | "Erf", 65 | "Expand", 66 | "Gather", 67 | "Gemm", 68 | "Identity", 69 | "Less", 70 | "MatMul", 71 | "Mod", 72 | "Mul", 73 | "Neg", 74 | "NonZero", 75 | "Not", 76 | "Pad", 77 | "Pow", 78 | "Range", 79 | "ReduceMean", 80 | "Reshape", 81 | "ScatterND", 82 | "Shape", 83 | "Slice", 84 | "Softmax", 85 | "Sqrt", 86 | "Squeeze", 87 | "Sub", 88 | "Tanh", 89 | "Transpose", 90 | "Trilu", 91 | "Unsqueeze", 92 | "Where", 93 | ], 94 | }, 95 | { 96 | model_id: 97 | "onnx-internal-testing/tiny-random-LongformerForQuestionAnswering-ONNX", 98 | dtype: "fp32", 99 | architectures: ["LongformerForQuestionAnswering"], 100 | ops: [ 101 | "Add", 102 | "Cast", 103 | "Concat", 104 | "Constant", 105 | "ConstantOfShape", 106 | "CumSum", 107 | "Div", 108 | "Einsum", 109 | "Equal", 110 | "Erf", 111 | "Expand", 112 | "Gather", 113 | "Identity", 114 | "Less", 115 | "MatMul", 116 | "Mod", 117 | "Mul", 118 | "Neg", 119 | "NonZero", 120 | "Not", 121 | "Pad", 122 | "Pow", 123 | "Range", 124 | "ReduceMean", 125 | "Reshape", 126 | "ScatterND", 127 | "Shape", 128 | "Slice", 129 | "Softmax", 130 | "Split", 131 | "Sqrt", 132 | "Squeeze", 133 | "Sub", 134 | "Transpose", 135 | "Trilu", 136 | "Unsqueeze", 137 | "Where", 138 | ], 139 | }, 140 | ], 141 | }; 142 | -------------------------------------------------------------------------------- /packages/core/src/architectures/markuplm.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "markuplm", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-MarkupLMForQuestionAnswering-ONNX", 9 | dtype: "fp32", 10 | architectures: ["MarkupLMForQuestionAnswering"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "CumSum", 17 | "Div", 18 | "Equal", 19 | "Erf", 20 | "Gather", 21 | "Identity", 22 | "MatMul", 23 | "Mul", 24 | "Not", 25 | "Pow", 26 | "ReduceMean", 27 | "Relu", 28 | "Reshape", 29 | "Shape", 30 | "Softmax", 31 | "Split", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | ], 38 | }, 39 | { 40 | model_id: 41 | "onnx-internal-testing/tiny-random-MarkupLMForSequenceClassification-ONNX", 42 | dtype: "fp32", 43 | architectures: ["MarkupLMForSequenceClassification"], 44 | ops: [ 45 | "Add", 46 | "Cast", 47 | "Concat", 48 | "Constant", 49 | "CumSum", 50 | "Div", 51 | "Equal", 52 | "Erf", 53 | "Gather", 54 | "Gemm", 55 | "Identity", 56 | "MatMul", 57 | "Mul", 58 | "Not", 59 | "Pow", 60 | "ReduceMean", 61 | "Relu", 62 | "Reshape", 63 | "Shape", 64 | "Softmax", 65 | "Sqrt", 66 | "Sub", 67 | "Tanh", 68 | "Transpose", 69 | "Unsqueeze", 70 | ], 71 | }, 72 | { 73 | model_id: 74 | "onnx-internal-testing/tiny-random-MarkupLMForTokenClassification-ONNX", 75 | dtype: "fp32", 76 | architectures: ["MarkupLMForTokenClassification"], 77 | ops: [ 78 | "Add", 79 | "Cast", 80 | "Concat", 81 | "Constant", 82 | "CumSum", 83 | "Div", 84 | "Equal", 85 | "Erf", 86 | "Gather", 87 | "Identity", 88 | "MatMul", 89 | "Mul", 90 | "Not", 91 | "Pow", 92 | "ReduceMean", 93 | "Relu", 94 | "Reshape", 95 | "Shape", 96 | "Softmax", 97 | "Sqrt", 98 | "Sub", 99 | "Transpose", 100 | "Unsqueeze", 101 | ], 102 | }, 103 | ], 104 | }; 105 | -------------------------------------------------------------------------------- /packages/core/src/architectures/mctct.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "mctct", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-MCTCTForCTC-ONNX", 8 | dtype: "fp32", 9 | architectures: ["MCTCTForCTC"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Div", 18 | "Einsum", 19 | "Gather", 20 | "Identity", 21 | "MatMul", 22 | "Mul", 23 | "Pad", 24 | "Pow", 25 | "ReduceMean", 26 | "Relu", 27 | "Reshape", 28 | "Shape", 29 | "Sigmoid", 30 | "Slice", 31 | "Softmax", 32 | "Split", 33 | "Sqrt", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | ], 38 | }, 39 | ], 40 | }; 41 | -------------------------------------------------------------------------------- /packages/core/src/architectures/megatron-bert.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "megatron-bert", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-MegatronBertForMultipleChoice-ONNX", 9 | dtype: "fp32", 10 | architectures: ["MegatronBertForMultipleChoice"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "Div", 17 | "Erf", 18 | "Gather", 19 | "Gemm", 20 | "Identity", 21 | "MatMul", 22 | "Mul", 23 | "Pow", 24 | "ReduceMean", 25 | "Reshape", 26 | "Shape", 27 | "Slice", 28 | "Softmax", 29 | "Sqrt", 30 | "Squeeze", 31 | "Sub", 32 | "Tanh", 33 | "Transpose", 34 | "Unsqueeze", 35 | ], 36 | }, 37 | { 38 | model_id: 39 | "onnx-internal-testing/tiny-random-MegatronBertForPreTraining-ONNX", 40 | dtype: "fp32", 41 | architectures: ["MegatronBertForPreTraining"], 42 | ops: [ 43 | "Add", 44 | "Cast", 45 | "Concat", 46 | "Constant", 47 | "Div", 48 | "Erf", 49 | "Gather", 50 | "Identity", 51 | "MatMul", 52 | "Mul", 53 | "Pow", 54 | "ReduceMean", 55 | "Reshape", 56 | "Shape", 57 | "Slice", 58 | "Softmax", 59 | "Sqrt", 60 | "Sub", 61 | "Transpose", 62 | "Unsqueeze", 63 | ], 64 | }, 65 | { 66 | model_id: 67 | "onnx-internal-testing/tiny-random-MegatronBertForQuestionAnswering-ONNX", 68 | dtype: "fp32", 69 | architectures: ["MegatronBertForQuestionAnswering"], 70 | ops: [ 71 | "Add", 72 | "Cast", 73 | "Concat", 74 | "Constant", 75 | "Div", 76 | "Erf", 77 | "Gather", 78 | "Identity", 79 | "MatMul", 80 | "Mul", 81 | "Pow", 82 | "ReduceMean", 83 | "Reshape", 84 | "Shape", 85 | "Slice", 86 | "Softmax", 87 | "Split", 88 | "Sqrt", 89 | "Squeeze", 90 | "Sub", 91 | "Transpose", 92 | "Unsqueeze", 93 | ], 94 | }, 95 | { 96 | model_id: 97 | "onnx-internal-testing/tiny-random-MegatronBertForSequenceClassification-ONNX", 98 | dtype: "fp32", 99 | architectures: ["MegatronBertForSequenceClassification"], 100 | ops: [ 101 | "Add", 102 | "Cast", 103 | "Concat", 104 | "Constant", 105 | "Div", 106 | "Erf", 107 | "Gather", 108 | "Gemm", 109 | "Identity", 110 | "MatMul", 111 | "Mul", 112 | "Pow", 113 | "ReduceMean", 114 | "Reshape", 115 | "Shape", 116 | "Slice", 117 | "Softmax", 118 | "Sqrt", 119 | "Sub", 120 | "Tanh", 121 | "Transpose", 122 | "Unsqueeze", 123 | ], 124 | }, 125 | ], 126 | }; 127 | -------------------------------------------------------------------------------- /packages/core/src/architectures/metric3d.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "metric3d", 5 | models: [ 6 | { 7 | model_id: "onnx-community/metric3d-vit-giant2", 8 | dtype: "fp32", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "AveragePool", 13 | "Cast", 14 | "Concat", 15 | "Conv", 16 | "ConvTranspose", 17 | "Div", 18 | "Elu", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "MatMul", 24 | "Mul", 25 | "Pad", 26 | "Pow", 27 | "Range", 28 | "ReduceMean", 29 | "ReduceSum", 30 | "Relu", 31 | "Reshape", 32 | "Resize", 33 | "Shape", 34 | "Sigmoid", 35 | "Slice", 36 | "Softmax", 37 | "Split", 38 | "Sqrt", 39 | "Squeeze", 40 | "Sub", 41 | "Tanh", 42 | "Tile", 43 | "Transpose", 44 | "Unsqueeze", 45 | "Where", 46 | ], 47 | }, 48 | { 49 | model_id: "onnx-community/metric3d-vit-small", 50 | dtype: "fp32", 51 | architectures: [], 52 | ops: [ 53 | "Add", 54 | "AveragePool", 55 | "Cast", 56 | "Concat", 57 | "ConstantOfShape", 58 | "Conv", 59 | "ConvTranspose", 60 | "Div", 61 | "Elu", 62 | "Equal", 63 | "Erf", 64 | "Expand", 65 | "Gather", 66 | "MatMul", 67 | "Mul", 68 | "Pad", 69 | "Pow", 70 | "Range", 71 | "ReduceMean", 72 | "ReduceSum", 73 | "Relu", 74 | "Reshape", 75 | "Resize", 76 | "Shape", 77 | "Sigmoid", 78 | "Slice", 79 | "Softmax", 80 | "Split", 81 | "Sqrt", 82 | "Squeeze", 83 | "Sub", 84 | "Tanh", 85 | "Tile", 86 | "Transpose", 87 | "Unsqueeze", 88 | "Where", 89 | ], 90 | }, 91 | ], 92 | }; 93 | -------------------------------------------------------------------------------- /packages/core/src/architectures/mobilenet_v1.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "mobilenet_v1", 5 | models: [ 6 | { 7 | model_id: "onnx-community/mobilenet_v1_0.75_192", 8 | dtype: "q4", 9 | architectures: ["MobileNetV1ForImageClassification"], 10 | ops: ["Clip", "Conv", "Flatten", "Gemm", "GlobalAveragePool"], 11 | }, 12 | { 13 | model_id: "onnx-community/mobilenet_v1_0.75_192", 14 | dtype: "quantized", 15 | architectures: ["MobileNetV1ForImageClassification"], 16 | ops: [ 17 | "Add", 18 | "Cast", 19 | "Clip", 20 | "ConvInteger", 21 | "DynamicQuantizeLinear", 22 | "Flatten", 23 | "GlobalAveragePool", 24 | "MatMulInteger", 25 | "Mul", 26 | "Reshape", 27 | ], 28 | }, 29 | { 30 | model_id: "onnx-community/mobilenet_v1_0.75_192", 31 | dtype: "fp16", 32 | architectures: ["MobileNetV1ForImageClassification"], 33 | ops: ["Cast", "Clip", "Conv", "Flatten", "Gemm", "GlobalAveragePool"], 34 | }, 35 | { 36 | model_id: 37 | "onnx-internal-testing/tiny-random-MobileNetV1ForImageClassification-ONNX", 38 | dtype: "fp32", 39 | architectures: ["MobileNetV1ForImageClassification"], 40 | ops: [ 41 | "Cast", 42 | "Clip", 43 | "Concat", 44 | "Constant", 45 | "ConstantOfShape", 46 | "Conv", 47 | "Flatten", 48 | "Gemm", 49 | "GlobalAveragePool", 50 | "Identity", 51 | "Pad", 52 | "Reshape", 53 | "Slice", 54 | "Transpose", 55 | ], 56 | }, 57 | { 58 | model_id: "onnx-internal-testing/tiny-random-MobileNetV1Model-ONNX", 59 | dtype: "fp32", 60 | architectures: ["MobileNetV1Model"], 61 | ops: [ 62 | "Cast", 63 | "Clip", 64 | "Concat", 65 | "Constant", 66 | "ConstantOfShape", 67 | "Conv", 68 | "Identity", 69 | "Pad", 70 | "Reshape", 71 | "Slice", 72 | "Transpose", 73 | ], 74 | }, 75 | ], 76 | }; 77 | -------------------------------------------------------------------------------- /packages/core/src/architectures/mobilenet_v2.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "mobilenet_v2", 5 | models: [ 6 | { 7 | model_id: "onnx-community/mobilenet_v2_1.0_224", 8 | dtype: "q4", 9 | architectures: ["MobileNetV2ForImageClassification"], 10 | ops: ["Add", "Clip", "Conv", "Flatten", "Gemm", "GlobalAveragePool"], 11 | }, 12 | { 13 | model_id: "onnx-community/mobilenet_v2_1.0_224", 14 | dtype: "quantized", 15 | architectures: ["MobileNetV2ForImageClassification"], 16 | ops: [ 17 | "Add", 18 | "Cast", 19 | "Clip", 20 | "ConvInteger", 21 | "DynamicQuantizeLinear", 22 | "Flatten", 23 | "GlobalAveragePool", 24 | "MatMulInteger", 25 | "Mul", 26 | "Reshape", 27 | ], 28 | }, 29 | { 30 | model_id: "onnx-community/mobilenet_v2_1.0_224", 31 | dtype: "fp16", 32 | architectures: ["MobileNetV2ForImageClassification"], 33 | ops: [ 34 | "Add", 35 | "Cast", 36 | "Clip", 37 | "Conv", 38 | "Flatten", 39 | "Gemm", 40 | "GlobalAveragePool", 41 | ], 42 | }, 43 | { 44 | model_id: 45 | "onnx-internal-testing/tiny-random-MobileNetV2ForImageClassification-ONNX", 46 | dtype: "fp32", 47 | architectures: ["MobileNetV2ForImageClassification"], 48 | ops: [ 49 | "Add", 50 | "Cast", 51 | "Clip", 52 | "Concat", 53 | "Constant", 54 | "ConstantOfShape", 55 | "Conv", 56 | "Flatten", 57 | "Gemm", 58 | "GlobalAveragePool", 59 | "Identity", 60 | "Pad", 61 | "Reshape", 62 | "Slice", 63 | "Transpose", 64 | ], 65 | }, 66 | { 67 | model_id: "onnx-internal-testing/tiny-random-MobileNetV2Model-ONNX", 68 | dtype: "fp32", 69 | architectures: ["MobileNetV2Model"], 70 | ops: [ 71 | "Add", 72 | "Cast", 73 | "Clip", 74 | "Concat", 75 | "Constant", 76 | "ConstantOfShape", 77 | "Conv", 78 | "Identity", 79 | "Pad", 80 | "Reshape", 81 | "Slice", 82 | "Transpose", 83 | ], 84 | }, 85 | ], 86 | }; 87 | -------------------------------------------------------------------------------- /packages/core/src/architectures/mobilenet_v3.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "mobilenet_v3", 5 | models: [ 6 | { 7 | model_id: "onnx-community/mobilenetv3_large_100.miil_in21k_ft_in1k", 8 | dtype: "q4", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "Conv", 13 | "Flatten", 14 | "Gemm", 15 | "GlobalAveragePool", 16 | "HardSigmoid", 17 | "Mul", 18 | "ReduceMean", 19 | "Relu", 20 | ], 21 | }, 22 | { 23 | model_id: "onnx-community/mobilenetv3_large_100.miil_in21k_ft_in1k", 24 | dtype: "quantized", 25 | architectures: [], 26 | ops: [ 27 | "Add", 28 | "Cast", 29 | "ConvInteger", 30 | "DynamicQuantizeLinear", 31 | "Flatten", 32 | "GlobalAveragePool", 33 | "HardSigmoid", 34 | "MatMulInteger", 35 | "Mul", 36 | "ReduceMean", 37 | "Relu", 38 | "Reshape", 39 | ], 40 | }, 41 | { 42 | model_id: "onnx-community/mobilenetv3_large_100.miil_in21k_ft_in1k", 43 | dtype: "fp16", 44 | architectures: [], 45 | ops: [ 46 | "Add", 47 | "Cast", 48 | "Conv", 49 | "Flatten", 50 | "Gemm", 51 | "GlobalAveragePool", 52 | "HardSigmoid", 53 | "Mul", 54 | "ReduceMean", 55 | "Relu", 56 | ], 57 | }, 58 | ], 59 | }; 60 | -------------------------------------------------------------------------------- /packages/core/src/architectures/modnet.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "modnet", 5 | models: [ 6 | { 7 | model_id: "Xenova/modnet", 8 | dtype: "quantized", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "BatchNormalization", 13 | "Cast", 14 | "Clip", 15 | "Concat", 16 | "Constant", 17 | "ConvInteger", 18 | "DynamicQuantizeLinear", 19 | "Expand", 20 | "Gather", 21 | "GlobalAveragePool", 22 | "InstanceNormalization", 23 | "MatMulInteger", 24 | "Mul", 25 | "Relu", 26 | "Reshape", 27 | "Resize", 28 | "Shape", 29 | "Sigmoid", 30 | "Slice", 31 | "Unsqueeze", 32 | ], 33 | }, 34 | { 35 | model_id: "Xenova/modnet", 36 | dtype: "fp32", 37 | architectures: [], 38 | ops: [ 39 | "Add", 40 | "BatchNormalization", 41 | "Clip", 42 | "Concat", 43 | "Constant", 44 | "Conv", 45 | "Expand", 46 | "Gather", 47 | "GlobalAveragePool", 48 | "InstanceNormalization", 49 | "MatMul", 50 | "Mul", 51 | "Relu", 52 | "Reshape", 53 | "Resize", 54 | "Shape", 55 | "Sigmoid", 56 | "Slice", 57 | "Unsqueeze", 58 | ], 59 | }, 60 | { 61 | model_id: "Xenova/modnet", 62 | dtype: "fp16", 63 | architectures: [], 64 | ops: [ 65 | "Add", 66 | "BatchNormalization", 67 | "Cast", 68 | "Clip", 69 | "Concat", 70 | "Constant", 71 | "Conv", 72 | "Expand", 73 | "Gather", 74 | "GlobalAveragePool", 75 | "InstanceNormalization", 76 | "MatMul", 77 | "Mul", 78 | "Relu", 79 | "Reshape", 80 | "Resize", 81 | "Shape", 82 | "Sigmoid", 83 | "Slice", 84 | "Unsqueeze", 85 | ], 86 | }, 87 | ], 88 | }; 89 | -------------------------------------------------------------------------------- /packages/core/src/architectures/mpt.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "mpt", 5 | models: [ 6 | { 7 | model_id: "Xenova/ipt-350m", 8 | dtype: "quantized", 9 | architectures: ["MPTForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "DequantizeLinear", 17 | "Div", 18 | "DynamicQuantizeLinear", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "If", 24 | "Less", 25 | "MatMul", 26 | "MatMulInteger", 27 | "Mul", 28 | "Not", 29 | "Or", 30 | "Pow", 31 | "Range", 32 | "ReduceMean", 33 | "Reshape", 34 | "ScatterND", 35 | "Shape", 36 | "Slice", 37 | "Softmax", 38 | "Sqrt", 39 | "Sub", 40 | "Transpose", 41 | "Unsqueeze", 42 | "Where", 43 | ], 44 | }, 45 | { 46 | model_id: "Xenova/ipt-350m", 47 | dtype: "fp32", 48 | architectures: ["MPTForCausalLM"], 49 | ops: [ 50 | "Add", 51 | "Cast", 52 | "Concat", 53 | "Constant", 54 | "ConstantOfShape", 55 | "Div", 56 | "Equal", 57 | "Erf", 58 | "Expand", 59 | "Gather", 60 | "If", 61 | "Less", 62 | "MatMul", 63 | "Mul", 64 | "Not", 65 | "Or", 66 | "Pow", 67 | "Range", 68 | "ReduceMean", 69 | "Reshape", 70 | "ScatterND", 71 | "Shape", 72 | "Slice", 73 | "Softmax", 74 | "Sqrt", 75 | "Sub", 76 | "Transpose", 77 | "Unsqueeze", 78 | "Where", 79 | ], 80 | }, 81 | { 82 | model_id: "hf-internal-testing/tiny-random-MptForCausalLM", 83 | dtype: "fp32", 84 | architectures: ["MptForCausalLM"], 85 | ops: [ 86 | "Add", 87 | "Cast", 88 | "Concat", 89 | "Constant", 90 | "ConstantOfShape", 91 | "Div", 92 | "Equal", 93 | "Erf", 94 | "Expand", 95 | "Gather", 96 | "Identity", 97 | "Less", 98 | "MatMul", 99 | "Mul", 100 | "Pow", 101 | "Range", 102 | "ReduceMean", 103 | "Reshape", 104 | "Shape", 105 | "Slice", 106 | "Softmax", 107 | "Sqrt", 108 | "Squeeze", 109 | "Sub", 110 | "Transpose", 111 | "Unsqueeze", 112 | "Where", 113 | ], 114 | }, 115 | { 116 | model_id: 117 | "onnx-internal-testing/tiny-random-MptForSequenceClassification-ONNX", 118 | dtype: "fp32", 119 | architectures: ["MptForSequenceClassification"], 120 | ops: [ 121 | "Add", 122 | "ArgMax", 123 | "Cast", 124 | "Concat", 125 | "Constant", 126 | "ConstantOfShape", 127 | "Div", 128 | "Equal", 129 | "Erf", 130 | "Expand", 131 | "Flatten", 132 | "Gather", 133 | "Identity", 134 | "Less", 135 | "MatMul", 136 | "Mod", 137 | "Mul", 138 | "Pow", 139 | "Range", 140 | "ReduceMean", 141 | "Reshape", 142 | "Shape", 143 | "Slice", 144 | "Softmax", 145 | "Sqrt", 146 | "Squeeze", 147 | "Sub", 148 | "Transpose", 149 | "Unsqueeze", 150 | "Where", 151 | ], 152 | }, 153 | ], 154 | }; 155 | -------------------------------------------------------------------------------- /packages/core/src/architectures/nystromformer.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "nystromformer", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-NystromformerForQuestionAnswering-ONNX", 9 | dtype: "fp32", 10 | architectures: ["NystromformerForQuestionAnswering"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "Conv", 17 | "Div", 18 | "Erf", 19 | "Gather", 20 | "Identity", 21 | "MatMul", 22 | "Mul", 23 | "Pow", 24 | "ReduceMean", 25 | "Reshape", 26 | "Shape", 27 | "Slice", 28 | "Softmax", 29 | "Split", 30 | "Sqrt", 31 | "Squeeze", 32 | "Sub", 33 | "Transpose", 34 | "Unsqueeze", 35 | ], 36 | }, 37 | { 38 | model_id: 39 | "onnx-internal-testing/tiny-random-NystromformerForSequenceClassification-ONNX", 40 | dtype: "fp32", 41 | architectures: ["NystromformerForSequenceClassification"], 42 | ops: [ 43 | "Add", 44 | "Cast", 45 | "Concat", 46 | "Constant", 47 | "Conv", 48 | "Div", 49 | "Erf", 50 | "Gather", 51 | "Gemm", 52 | "Identity", 53 | "MatMul", 54 | "Mul", 55 | "Pow", 56 | "ReduceMean", 57 | "Reshape", 58 | "Shape", 59 | "Slice", 60 | "Softmax", 61 | "Sqrt", 62 | "Sub", 63 | "Transpose", 64 | "Unsqueeze", 65 | ], 66 | }, 67 | { 68 | model_id: "onnx-internal-testing/tiny-random-NystromformerModel-ONNX", 69 | dtype: "fp32", 70 | architectures: ["NystromformerModel"], 71 | ops: [ 72 | "Add", 73 | "Cast", 74 | "Concat", 75 | "Constant", 76 | "Conv", 77 | "Div", 78 | "Erf", 79 | "Gather", 80 | "Identity", 81 | "MatMul", 82 | "Mul", 83 | "Pow", 84 | "ReduceMean", 85 | "Reshape", 86 | "Shape", 87 | "Slice", 88 | "Softmax", 89 | "Sqrt", 90 | "Sub", 91 | "Transpose", 92 | "Unsqueeze", 93 | ], 94 | }, 95 | ], 96 | }; 97 | -------------------------------------------------------------------------------- /packages/core/src/architectures/olmo2.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "olmo2", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-Olmo2ForCausalLM", 8 | dtype: "fp32", 9 | architectures: ["Olmo2ForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Cos", 17 | "Div", 18 | "Equal", 19 | "Expand", 20 | "Gather", 21 | "Greater", 22 | "MatMul", 23 | "Mul", 24 | "Neg", 25 | "Pow", 26 | "Range", 27 | "ReduceMean", 28 | "Reshape", 29 | "ScatterND", 30 | "Shape", 31 | "Sigmoid", 32 | "Sin", 33 | "Slice", 34 | "Softmax", 35 | "Sqrt", 36 | "Transpose", 37 | "Trilu", 38 | "Unsqueeze", 39 | "Where", 40 | ], 41 | }, 42 | ], 43 | }; 44 | -------------------------------------------------------------------------------- /packages/core/src/architectures/pegasus.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "pegasus", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-PegasusForCausalLM-ONNX", 8 | dtype: "fp32", 9 | architectures: ["PegasusForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Div", 17 | "Equal", 18 | "Erf", 19 | "Expand", 20 | "Gather", 21 | "Identity", 22 | "Less", 23 | "MatMul", 24 | "Mul", 25 | "Pow", 26 | "Range", 27 | "ReduceMean", 28 | "Reshape", 29 | "Shape", 30 | "Slice", 31 | "Softmax", 32 | "Sqrt", 33 | "Squeeze", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: 42 | "onnx-internal-testing/tiny-random-PegasusForConditionalGeneration-ONNX", 43 | dtype: "fp32", 44 | architectures: ["PegasusForConditionalGeneration"], 45 | ops: [ 46 | "Add", 47 | "Cast", 48 | "Concat", 49 | "Constant", 50 | "ConstantOfShape", 51 | "Div", 52 | "Equal", 53 | "Erf", 54 | "Expand", 55 | "Gather", 56 | "Identity", 57 | "If", 58 | "Less", 59 | "MatMul", 60 | "Mul", 61 | "Pow", 62 | "Range", 63 | "ReduceMean", 64 | "Reshape", 65 | "Shape", 66 | "Slice", 67 | "Softmax", 68 | "Sqrt", 69 | "Squeeze", 70 | "Sub", 71 | "Transpose", 72 | "Unsqueeze", 73 | "Where", 74 | ], 75 | }, 76 | ], 77 | }; 78 | -------------------------------------------------------------------------------- /packages/core/src/architectures/perceiver.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "perceiver", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-PerceiverForImageClassificationConvProcessing-ONNX", 9 | dtype: "fp32", 10 | architectures: ["PerceiverForImageClassificationConvProcessing"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "Conv", 18 | "Cos", 19 | "Div", 20 | "Equal", 21 | "Erf", 22 | "Expand", 23 | "Gather", 24 | "Identity", 25 | "MatMul", 26 | "MaxPool", 27 | "Mul", 28 | "Pad", 29 | "Pow", 30 | "Range", 31 | "ReduceMean", 32 | "Relu", 33 | "Reshape", 34 | "Shape", 35 | "Sin", 36 | "Slice", 37 | "Softmax", 38 | "Sqrt", 39 | "Sub", 40 | "Transpose", 41 | "Unsqueeze", 42 | "Where", 43 | ], 44 | }, 45 | { 46 | model_id: 47 | "onnx-internal-testing/tiny-random-PerceiverForImageClassificationFourier-ONNX", 48 | dtype: "fp32", 49 | architectures: ["PerceiverForImageClassificationFourier"], 50 | ops: [ 51 | "Add", 52 | "Cast", 53 | "Concat", 54 | "Constant", 55 | "ConstantOfShape", 56 | "Cos", 57 | "Div", 58 | "Equal", 59 | "Erf", 60 | "Expand", 61 | "Gather", 62 | "Identity", 63 | "MatMul", 64 | "Mul", 65 | "Pow", 66 | "Range", 67 | "ReduceMean", 68 | "Reshape", 69 | "Shape", 70 | "Sin", 71 | "Softmax", 72 | "Sqrt", 73 | "Sub", 74 | "Transpose", 75 | "Unsqueeze", 76 | "Where", 77 | ], 78 | }, 79 | { 80 | model_id: "onnx-internal-testing/tiny-random-PerceiverForMaskedLM-ONNX", 81 | dtype: "fp32", 82 | architectures: ["PerceiverForMaskedLM"], 83 | ops: [ 84 | "Add", 85 | "Cast", 86 | "Concat", 87 | "Constant", 88 | "ConstantOfShape", 89 | "Div", 90 | "Equal", 91 | "Erf", 92 | "Expand", 93 | "Gather", 94 | "Identity", 95 | "MatMul", 96 | "Mul", 97 | "Pow", 98 | "Range", 99 | "ReduceMean", 100 | "Reshape", 101 | "Shape", 102 | "Softmax", 103 | "Sqrt", 104 | "Sub", 105 | "Transpose", 106 | "Unsqueeze", 107 | "Where", 108 | ], 109 | }, 110 | ], 111 | }; 112 | -------------------------------------------------------------------------------- /packages/core/src/architectures/poolformer.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "poolformer", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-PoolFormerForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["PoolFormerForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "AveragePool", 14 | "Constant", 15 | "Conv", 16 | "Div", 17 | "Erf", 18 | "Gemm", 19 | "Identity", 20 | "InstanceNormalization", 21 | "Mul", 22 | "ReduceMean", 23 | "Reshape", 24 | "Shape", 25 | "Sub", 26 | ], 27 | }, 28 | { 29 | model_id: "onnx-internal-testing/tiny-random-PoolFormerModel-ONNX", 30 | dtype: "fp32", 31 | architectures: ["PoolFormerModel"], 32 | ops: [ 33 | "Add", 34 | "AveragePool", 35 | "Constant", 36 | "Conv", 37 | "Div", 38 | "Erf", 39 | "Identity", 40 | "InstanceNormalization", 41 | "Mul", 42 | "Reshape", 43 | "Shape", 44 | "Sub", 45 | ], 46 | }, 47 | ], 48 | }; 49 | -------------------------------------------------------------------------------- /packages/core/src/architectures/pvt.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "pvt", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-PvtForImageClassification", 8 | dtype: "fp32", 9 | architectures: ["PvtForImageClassification"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Div", 18 | "Equal", 19 | "Erf", 20 | "Expand", 21 | "Gather", 22 | "Gemm", 23 | "Identity", 24 | "MatMul", 25 | "Mul", 26 | "Pow", 27 | "ReduceMean", 28 | "Reshape", 29 | "Resize", 30 | "Shape", 31 | "Slice", 32 | "Softmax", 33 | "Sqrt", 34 | "Sub", 35 | "Transpose", 36 | "Unsqueeze", 37 | "Where", 38 | ], 39 | }, 40 | { 41 | model_id: "onnx-internal-testing/tiny-random-PvtModel-ONNX", 42 | dtype: "fp32", 43 | architectures: ["PvtModel"], 44 | ops: [ 45 | "Add", 46 | "Cast", 47 | "Concat", 48 | "Constant", 49 | "ConstantOfShape", 50 | "Conv", 51 | "Div", 52 | "Equal", 53 | "Erf", 54 | "Expand", 55 | "Gather", 56 | "Identity", 57 | "MatMul", 58 | "Mul", 59 | "Pow", 60 | "ReduceMean", 61 | "Reshape", 62 | "Resize", 63 | "Shape", 64 | "Slice", 65 | "Softmax", 66 | "Sqrt", 67 | "Sub", 68 | "Transpose", 69 | "Unsqueeze", 70 | "Where", 71 | ], 72 | }, 73 | ], 74 | }; 75 | -------------------------------------------------------------------------------- /packages/core/src/architectures/qwen3.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "qwen3", 5 | models: [ 6 | { 7 | model_id: "onnx-community/Qwen3-0.6B-ONNX", 8 | dtype: "q4", 9 | architectures: ["Qwen3ForCausalLM"], 10 | ops: [ 11 | "Cast", 12 | "Concat", 13 | "Constant", 14 | "Gather", 15 | "GroupQueryAttention", 16 | "MatMul", 17 | "MatMulNBits", 18 | "Mul", 19 | "ReduceSum", 20 | "Reshape", 21 | "RotaryEmbedding", 22 | "Shape", 23 | "Sigmoid", 24 | "SimplifiedLayerNormalization", 25 | "SkipSimplifiedLayerNormalization", 26 | "Sub", 27 | "Transpose", 28 | "Unsqueeze", 29 | ], 30 | }, 31 | { 32 | model_id: "onnx-community/Qwen3-0.6B-ONNX", 33 | dtype: "bnb4", 34 | architectures: ["Qwen3ForCausalLM"], 35 | ops: [ 36 | "Cast", 37 | "Concat", 38 | "Constant", 39 | "Gather", 40 | "GroupQueryAttention", 41 | "MatMul", 42 | "MatMulBnb4", 43 | "Mul", 44 | "ReduceSum", 45 | "Reshape", 46 | "RotaryEmbedding", 47 | "Shape", 48 | "Sigmoid", 49 | "SimplifiedLayerNormalization", 50 | "SkipSimplifiedLayerNormalization", 51 | "Sub", 52 | "Transpose", 53 | "Unsqueeze", 54 | ], 55 | }, 56 | { 57 | model_id: "onnx-community/Qwen3-0.6B-ONNX", 58 | dtype: "quantized", 59 | architectures: ["Qwen3ForCausalLM"], 60 | ops: [ 61 | "Cast", 62 | "Concat", 63 | "Constant", 64 | "DequantizeLinear", 65 | "DynamicQuantizeLinear", 66 | "Gather", 67 | "GroupQueryAttention", 68 | "MatMul", 69 | "MatMulInteger", 70 | "Mul", 71 | "ReduceSum", 72 | "Reshape", 73 | "RotaryEmbedding", 74 | "Shape", 75 | "Sigmoid", 76 | "SimplifiedLayerNormalization", 77 | "SkipSimplifiedLayerNormalization", 78 | "Sub", 79 | "Transpose", 80 | "Unsqueeze", 81 | ], 82 | }, 83 | { 84 | model_id: "onnx-community/Qwen3-0.6B-ONNX", 85 | dtype: "fp32", 86 | architectures: ["Qwen3ForCausalLM"], 87 | ops: [ 88 | "Cast", 89 | "Concat", 90 | "Constant", 91 | "Gather", 92 | "GroupQueryAttention", 93 | "MatMul", 94 | "Mul", 95 | "ReduceSum", 96 | "Reshape", 97 | "RotaryEmbedding", 98 | "Shape", 99 | "Sigmoid", 100 | "SimplifiedLayerNormalization", 101 | "SkipSimplifiedLayerNormalization", 102 | "Sub", 103 | "Transpose", 104 | "Unsqueeze", 105 | ], 106 | }, 107 | ], 108 | }; 109 | -------------------------------------------------------------------------------- /packages/core/src/architectures/regnet.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "regnet", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-RegNetForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["RegNetForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "Conv", 14 | "Flatten", 15 | "Gemm", 16 | "GlobalAveragePool", 17 | "Identity", 18 | "Mul", 19 | "Relu", 20 | "Sigmoid", 21 | ], 22 | }, 23 | { 24 | model_id: "onnx-internal-testing/tiny-random-RegNetModel-ONNX", 25 | dtype: "fp32", 26 | architectures: ["RegNetModel"], 27 | ops: [ 28 | "Add", 29 | "Conv", 30 | "GlobalAveragePool", 31 | "Identity", 32 | "Mul", 33 | "Relu", 34 | "Sigmoid", 35 | ], 36 | }, 37 | ], 38 | }; 39 | -------------------------------------------------------------------------------- /packages/core/src/architectures/rembert.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "rembert", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-RemBertForMultipleChoice-ONNX", 9 | dtype: "fp32", 10 | architectures: ["RemBertForMultipleChoice"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "Div", 17 | "Erf", 18 | "Gather", 19 | "Gemm", 20 | "Identity", 21 | "MatMul", 22 | "Mul", 23 | "Pow", 24 | "ReduceMean", 25 | "Reshape", 26 | "Shape", 27 | "Slice", 28 | "Softmax", 29 | "Sqrt", 30 | "Squeeze", 31 | "Sub", 32 | "Tanh", 33 | "Transpose", 34 | "Unsqueeze", 35 | ], 36 | }, 37 | { 38 | model_id: 39 | "onnx-internal-testing/tiny-random-RemBertForQuestionAnswering-ONNX", 40 | dtype: "fp32", 41 | architectures: ["RemBertForQuestionAnswering"], 42 | ops: [ 43 | "Add", 44 | "Cast", 45 | "Concat", 46 | "Constant", 47 | "Div", 48 | "Erf", 49 | "Gather", 50 | "Identity", 51 | "MatMul", 52 | "Mul", 53 | "Pow", 54 | "ReduceMean", 55 | "Reshape", 56 | "Shape", 57 | "Slice", 58 | "Softmax", 59 | "Split", 60 | "Sqrt", 61 | "Squeeze", 62 | "Sub", 63 | "Transpose", 64 | "Unsqueeze", 65 | ], 66 | }, 67 | { 68 | model_id: 69 | "onnx-internal-testing/tiny-random-RemBertForSequenceClassification-ONNX", 70 | dtype: "fp32", 71 | architectures: ["RemBertForSequenceClassification"], 72 | ops: [ 73 | "Add", 74 | "Cast", 75 | "Concat", 76 | "Constant", 77 | "Div", 78 | "Erf", 79 | "Gather", 80 | "Gemm", 81 | "Identity", 82 | "MatMul", 83 | "Mul", 84 | "Pow", 85 | "ReduceMean", 86 | "Reshape", 87 | "Shape", 88 | "Slice", 89 | "Softmax", 90 | "Sqrt", 91 | "Sub", 92 | "Tanh", 93 | "Transpose", 94 | "Unsqueeze", 95 | ], 96 | }, 97 | { 98 | model_id: "onnx-internal-testing/tiny-random-RemBertModel-ONNX", 99 | dtype: "fp32", 100 | architectures: ["RemBertModel"], 101 | ops: [ 102 | "Add", 103 | "Cast", 104 | "Concat", 105 | "Constant", 106 | "Div", 107 | "Erf", 108 | "Gather", 109 | "Identity", 110 | "MatMul", 111 | "Mul", 112 | "Pow", 113 | "ReduceMean", 114 | "Reshape", 115 | "Shape", 116 | "Slice", 117 | "Softmax", 118 | "Sqrt", 119 | "Sub", 120 | "Transpose", 121 | "Unsqueeze", 122 | ], 123 | }, 124 | ], 125 | }; 126 | -------------------------------------------------------------------------------- /packages/core/src/architectures/resnet.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "resnet", 5 | models: [ 6 | { 7 | model_id: "Xenova/resnet-50", 8 | dtype: "quantized", 9 | architectures: ["ResNetForImageClassification"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "ConvInteger", 14 | "DynamicQuantizeLinear", 15 | "Flatten", 16 | "GlobalAveragePool", 17 | "MatMulInteger", 18 | "MaxPool", 19 | "Mul", 20 | "Relu", 21 | "Reshape", 22 | ], 23 | }, 24 | { 25 | model_id: "Xenova/resnet-50", 26 | dtype: "fp32", 27 | architectures: ["ResNetForImageClassification"], 28 | ops: [ 29 | "Add", 30 | "Conv", 31 | "Flatten", 32 | "Gemm", 33 | "GlobalAveragePool", 34 | "MaxPool", 35 | "Relu", 36 | ], 37 | }, 38 | { 39 | model_id: "Xenova/resnet-50", 40 | dtype: "fp16", 41 | architectures: ["ResNetForImageClassification"], 42 | ops: [ 43 | "Add", 44 | "Cast", 45 | "Conv", 46 | "Flatten", 47 | "Gemm", 48 | "GlobalAveragePool", 49 | "MaxPool", 50 | "Relu", 51 | ], 52 | }, 53 | { 54 | model_id: 55 | "onnx-internal-testing/tiny-random-ResNetForImageClassification-ONNX", 56 | dtype: "fp32", 57 | architectures: ["ResNetForImageClassification"], 58 | ops: [ 59 | "Add", 60 | "Conv", 61 | "Flatten", 62 | "Gemm", 63 | "GlobalAveragePool", 64 | "Identity", 65 | "MaxPool", 66 | "Relu", 67 | ], 68 | }, 69 | { 70 | model_id: "onnx-internal-testing/tiny-random-ResNetModel-ONNX", 71 | dtype: "fp32", 72 | architectures: ["ResNetModel"], 73 | ops: ["Add", "Conv", "Identity", "MaxPool", "Relu"], 74 | }, 75 | ], 76 | }; 77 | -------------------------------------------------------------------------------- /packages/core/src/architectures/sam.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "sam", 5 | models: [ 6 | { 7 | model_id: "Xenova/sam-vit-huge", 8 | dtype: "fp16", 9 | architectures: ["SamModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "ConvTranspose", 17 | "Cos", 18 | "Div", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "MatMul", 24 | "Mul", 25 | "Neg", 26 | "Not", 27 | "OneHot", 28 | "Pow", 29 | "Range", 30 | "ReduceMean", 31 | "Relu", 32 | "Reshape", 33 | "ScatterND", 34 | "Shape", 35 | "Sin", 36 | "Slice", 37 | "Softmax", 38 | "Sqrt", 39 | "Sub", 40 | "Tile", 41 | "Transpose", 42 | "Unsqueeze", 43 | "Where", 44 | ], 45 | }, 46 | { 47 | model_id: "Xenova/slimsam-77-uniform", 48 | dtype: "fp16", 49 | architectures: ["SamModel"], 50 | ops: [ 51 | "Add", 52 | "Cast", 53 | "Concat", 54 | "Constant", 55 | "ConstantOfShape", 56 | "Conv", 57 | "ConvTranspose", 58 | "Cos", 59 | "Div", 60 | "Einsum", 61 | "Equal", 62 | "Erf", 63 | "Expand", 64 | "Gather", 65 | "Identity", 66 | "MatMul", 67 | "Mod", 68 | "Mul", 69 | "Neg", 70 | "Not", 71 | "OneHot", 72 | "Pad", 73 | "Pow", 74 | "Range", 75 | "ReduceMean", 76 | "Relu", 77 | "Reshape", 78 | "Resize", 79 | "ScatterND", 80 | "Shape", 81 | "Sin", 82 | "Slice", 83 | "Softmax", 84 | "Split", 85 | "Sqrt", 86 | "Squeeze", 87 | "Sub", 88 | "Tile", 89 | "Transpose", 90 | "Unsqueeze", 91 | "Where", 92 | ], 93 | }, 94 | { 95 | model_id: "Xenova/slimsam-77-uniform", 96 | dtype: "quantized", 97 | architectures: ["SamModel"], 98 | ops: [ 99 | "Add", 100 | "Cast", 101 | "Concat", 102 | "Constant", 103 | "ConstantOfShape", 104 | "ConvInteger", 105 | "ConvTranspose", 106 | "Cos", 107 | "DequantizeLinear", 108 | "Div", 109 | "DynamicQuantizeLinear", 110 | "Einsum", 111 | "Equal", 112 | "Erf", 113 | "Expand", 114 | "Gather", 115 | "Identity", 116 | "MatMul", 117 | "MatMulInteger", 118 | "Mod", 119 | "Mul", 120 | "Neg", 121 | "Not", 122 | "OneHot", 123 | "Pad", 124 | "Pow", 125 | "Range", 126 | "ReduceMean", 127 | "Relu", 128 | "Reshape", 129 | "Resize", 130 | "ScatterND", 131 | "Shape", 132 | "Sin", 133 | "Slice", 134 | "Softmax", 135 | "Split", 136 | "Sqrt", 137 | "Squeeze", 138 | "Sub", 139 | "Tile", 140 | "Transpose", 141 | "Unsqueeze", 142 | "Where", 143 | ], 144 | }, 145 | ], 146 | }; 147 | -------------------------------------------------------------------------------- /packages/core/src/architectures/sew-d.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "sew-d", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-SEWDForCTC-ONNX", 8 | dtype: "fp32", 9 | architectures: ["SEWDForCTC"], 10 | ops: [ 11 | "Abs", 12 | "Add", 13 | "And", 14 | "AveragePool", 15 | "Cast", 16 | "Ceil", 17 | "Clip", 18 | "Concat", 19 | "Constant", 20 | "ConstantOfShape", 21 | "Conv", 22 | "Div", 23 | "Equal", 24 | "Erf", 25 | "Expand", 26 | "Gather", 27 | "GatherElements", 28 | "Greater", 29 | "Identity", 30 | "InstanceNormalization", 31 | "Less", 32 | "LessOrEqual", 33 | "Log", 34 | "MatMul", 35 | "Mul", 36 | "Neg", 37 | "Pad", 38 | "Pow", 39 | "Range", 40 | "ReduceMean", 41 | "Reshape", 42 | "Shape", 43 | "Sign", 44 | "Slice", 45 | "Softmax", 46 | "Sqrt", 47 | "Squeeze", 48 | "Sub", 49 | "Tile", 50 | "Transpose", 51 | "Unsqueeze", 52 | "Where", 53 | ], 54 | }, 55 | { 56 | model_id: 57 | "onnx-internal-testing/tiny-random-SEWDForSequenceClassification-ONNX", 58 | dtype: "fp32", 59 | architectures: ["SEWDForSequenceClassification"], 60 | ops: [ 61 | "Abs", 62 | "Add", 63 | "And", 64 | "AveragePool", 65 | "Cast", 66 | "Ceil", 67 | "Clip", 68 | "Concat", 69 | "Constant", 70 | "ConstantOfShape", 71 | "Conv", 72 | "Div", 73 | "Equal", 74 | "Erf", 75 | "Expand", 76 | "Gather", 77 | "GatherElements", 78 | "Gemm", 79 | "Greater", 80 | "Identity", 81 | "InstanceNormalization", 82 | "Less", 83 | "LessOrEqual", 84 | "Log", 85 | "MatMul", 86 | "Mul", 87 | "Neg", 88 | "Pad", 89 | "Pow", 90 | "Range", 91 | "ReduceMean", 92 | "Reshape", 93 | "Shape", 94 | "Sign", 95 | "Slice", 96 | "Softmax", 97 | "Sqrt", 98 | "Squeeze", 99 | "Sub", 100 | "Tile", 101 | "Transpose", 102 | "Unsqueeze", 103 | "Where", 104 | ], 105 | }, 106 | ], 107 | }; 108 | -------------------------------------------------------------------------------- /packages/core/src/architectures/sew.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "sew", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-SEWForSequenceClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["SEWForSequenceClassification"], 11 | ops: [ 12 | "Add", 13 | "AveragePool", 14 | "Cast", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Conv", 19 | "Div", 20 | "Erf", 21 | "Gather", 22 | "Gemm", 23 | "Identity", 24 | "InstanceNormalization", 25 | "MatMul", 26 | "Mul", 27 | "Pad", 28 | "Pow", 29 | "ReduceMean", 30 | "Reshape", 31 | "Shape", 32 | "Slice", 33 | "Softmax", 34 | "Sqrt", 35 | "Squeeze", 36 | "Sub", 37 | "Transpose", 38 | "Unsqueeze", 39 | ], 40 | }, 41 | { 42 | model_id: "onnx-internal-testing/tiny-random-SEWModel-ONNX", 43 | dtype: "fp32", 44 | architectures: ["SEWModel"], 45 | ops: [ 46 | "Add", 47 | "AveragePool", 48 | "Cast", 49 | "Concat", 50 | "Constant", 51 | "ConstantOfShape", 52 | "Conv", 53 | "Div", 54 | "Erf", 55 | "Gather", 56 | "Identity", 57 | "InstanceNormalization", 58 | "MatMul", 59 | "Mul", 60 | "Pad", 61 | "Pow", 62 | "ReduceMean", 63 | "Reshape", 64 | "Shape", 65 | "Slice", 66 | "Softmax", 67 | "Sqrt", 68 | "Squeeze", 69 | "Sub", 70 | "Transpose", 71 | "Unsqueeze", 72 | ], 73 | }, 74 | ], 75 | }; 76 | -------------------------------------------------------------------------------- /packages/core/src/architectures/siglip_vision_model.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "siglip_vision_model", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-SiglipVisionModel-ONNX", 8 | dtype: "fp32", 9 | architectures: ["SiglipVisionModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Div", 18 | "Expand", 19 | "Gather", 20 | "Gemm", 21 | "Identity", 22 | "MatMul", 23 | "Mod", 24 | "Mul", 25 | "Pow", 26 | "ReduceMean", 27 | "Reshape", 28 | "Shape", 29 | "Slice", 30 | "Softmax", 31 | "Sqrt", 32 | "Squeeze", 33 | "Sub", 34 | "Tanh", 35 | "Tile", 36 | "Transpose", 37 | "Unsqueeze", 38 | ], 39 | }, 40 | ], 41 | }; 42 | -------------------------------------------------------------------------------- /packages/core/src/architectures/speech_to_text.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "speech_to_text", 5 | models: [ 6 | { 7 | model_id: "onnx-internal-testing/tiny-random-Speech2TextModel-ONNX", 8 | dtype: "fp32", 9 | architectures: ["Speech2TextModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "Conv", 17 | "Cos", 18 | "CumSum", 19 | "Div", 20 | "Equal", 21 | "Expand", 22 | "Gather", 23 | "Identity", 24 | "If", 25 | "Less", 26 | "MatMul", 27 | "Mul", 28 | "Not", 29 | "Pow", 30 | "Range", 31 | "ReduceMean", 32 | "ReduceSum", 33 | "Relu", 34 | "Reshape", 35 | "ScatterND", 36 | "Shape", 37 | "Sigmoid", 38 | "Sin", 39 | "Slice", 40 | "Softmax", 41 | "Split", 42 | "Sqrt", 43 | "Squeeze", 44 | "Sub", 45 | "Transpose", 46 | "Unsqueeze", 47 | "Where", 48 | ], 49 | }, 50 | ], 51 | }; 52 | -------------------------------------------------------------------------------- /packages/core/src/architectures/speecht5.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "speecht5", 5 | models: [ 6 | { 7 | model_id: "Xenova/speecht5_tts", 8 | dtype: "fp16", 9 | architectures: ["SpeechT5ForTextToSpeech"], 10 | ops: [ 11 | "Abs", 12 | "Add", 13 | "Cast", 14 | "Clip", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Div", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "Greater", 24 | "If", 25 | "Less", 26 | "MatMul", 27 | "Mul", 28 | "Not", 29 | "Pow", 30 | "RandomUniformLike", 31 | "Range", 32 | "ReduceMean", 33 | "ReduceSum", 34 | "Relu", 35 | "Reshape", 36 | "Shape", 37 | "Sigmoid", 38 | "Slice", 39 | "Softmax", 40 | "Sqrt", 41 | "Sub", 42 | "Transpose", 43 | "Unsqueeze", 44 | "Where", 45 | ], 46 | }, 47 | { 48 | model_id: "Xenova/speecht5_tts", 49 | dtype: "quantized", 50 | architectures: ["SpeechT5ForTextToSpeech"], 51 | ops: [ 52 | "Abs", 53 | "Add", 54 | "Cast", 55 | "Clip", 56 | "Concat", 57 | "Constant", 58 | "ConstantOfShape", 59 | "ConvInteger", 60 | "ConvTranspose", 61 | "DequantizeLinear", 62 | "Div", 63 | "DynamicQuantizeLinear", 64 | "Equal", 65 | "Erf", 66 | "Expand", 67 | "Gather", 68 | "Greater", 69 | "If", 70 | "LeakyRelu", 71 | "Less", 72 | "MatMul", 73 | "MatMulInteger", 74 | "Mul", 75 | "Not", 76 | "Pow", 77 | "RandomUniformLike", 78 | "Range", 79 | "ReduceMean", 80 | "ReduceSum", 81 | "Relu", 82 | "Reshape", 83 | "Shape", 84 | "Sigmoid", 85 | "Slice", 86 | "Softmax", 87 | "Sqrt", 88 | "Squeeze", 89 | "Sub", 90 | "Tanh", 91 | "Transpose", 92 | "Unsqueeze", 93 | "Where", 94 | ], 95 | }, 96 | { 97 | model_id: "Xenova/speecht5_tts", 98 | dtype: "fp32", 99 | architectures: ["SpeechT5ForTextToSpeech"], 100 | ops: [ 101 | "Abs", 102 | "Add", 103 | "Cast", 104 | "Clip", 105 | "Concat", 106 | "Constant", 107 | "ConstantOfShape", 108 | "Conv", 109 | "ConvTranspose", 110 | "Div", 111 | "Equal", 112 | "Erf", 113 | "Expand", 114 | "Gather", 115 | "Greater", 116 | "If", 117 | "LeakyRelu", 118 | "Less", 119 | "MatMul", 120 | "Mul", 121 | "Not", 122 | "Pow", 123 | "RandomUniformLike", 124 | "Range", 125 | "ReduceMean", 126 | "ReduceSum", 127 | "Relu", 128 | "Reshape", 129 | "Shape", 130 | "Sigmoid", 131 | "Slice", 132 | "Softmax", 133 | "Sqrt", 134 | "Squeeze", 135 | "Sub", 136 | "Tanh", 137 | "Transpose", 138 | "Unsqueeze", 139 | "Where", 140 | ], 141 | }, 142 | ], 143 | }; 144 | -------------------------------------------------------------------------------- /packages/core/src/architectures/splinter.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "splinter", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-SplinterForQuestionAnswering-ONNX", 9 | dtype: "fp32", 10 | architectures: ["SplinterForQuestionAnswering"], 11 | ops: [ 12 | "Add", 13 | "ArgMax", 14 | "Cast", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Div", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "GatherElements", 24 | "Identity", 25 | "If", 26 | "MatMul", 27 | "Mul", 28 | "Pow", 29 | "ReduceMean", 30 | "Reshape", 31 | "Shape", 32 | "Slice", 33 | "Softmax", 34 | "Sqrt", 35 | "Squeeze", 36 | "Sub", 37 | "Tile", 38 | "Transpose", 39 | "Unsqueeze", 40 | ], 41 | }, 42 | { 43 | model_id: "onnx-internal-testing/tiny-random-SplinterModel-ONNX", 44 | dtype: "fp32", 45 | architectures: ["SplinterModel"], 46 | ops: [ 47 | "Add", 48 | "Cast", 49 | "Concat", 50 | "Constant", 51 | "Div", 52 | "Erf", 53 | "Gather", 54 | "Identity", 55 | "MatMul", 56 | "Mul", 57 | "Pow", 58 | "ReduceMean", 59 | "Reshape", 60 | "Shape", 61 | "Slice", 62 | "Softmax", 63 | "Sqrt", 64 | "Sub", 65 | "Transpose", 66 | "Unsqueeze", 67 | ], 68 | }, 69 | ], 70 | }; 71 | -------------------------------------------------------------------------------- /packages/core/src/architectures/starcoder2.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "starcoder2", 5 | models: [ 6 | { 7 | model_id: "Xenova/tiny-random-Starcoder2ForCausalLM", 8 | dtype: "quantized", 9 | architectures: ["Starcoder2ForCausalLM"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "DequantizeLinear", 17 | "Div", 18 | "DynamicQuantizeLinear", 19 | "Equal", 20 | "Erf", 21 | "Expand", 22 | "Gather", 23 | "Identity", 24 | "Less", 25 | "MatMul", 26 | "MatMulInteger", 27 | "Mul", 28 | "Neg", 29 | "Pow", 30 | "Range", 31 | "ReduceMean", 32 | "Reshape", 33 | "Shape", 34 | "Slice", 35 | "Softmax", 36 | "Sqrt", 37 | "Squeeze", 38 | "Sub", 39 | "Transpose", 40 | "Unsqueeze", 41 | "Where", 42 | ], 43 | }, 44 | { 45 | model_id: "Xenova/tiny-random-Starcoder2ForCausalLM", 46 | dtype: "fp32", 47 | architectures: ["Starcoder2ForCausalLM"], 48 | ops: [ 49 | "Add", 50 | "Cast", 51 | "Concat", 52 | "Constant", 53 | "ConstantOfShape", 54 | "Div", 55 | "Equal", 56 | "Erf", 57 | "Expand", 58 | "Gather", 59 | "Identity", 60 | "Less", 61 | "MatMul", 62 | "Mul", 63 | "Neg", 64 | "Pow", 65 | "Range", 66 | "ReduceMean", 67 | "Reshape", 68 | "Shape", 69 | "Slice", 70 | "Softmax", 71 | "Sqrt", 72 | "Squeeze", 73 | "Sub", 74 | "Transpose", 75 | "Unsqueeze", 76 | "Where", 77 | ], 78 | }, 79 | ], 80 | }; 81 | -------------------------------------------------------------------------------- /packages/core/src/architectures/swinv2.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "swinv2", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-Swinv2ForImageClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["Swinv2ForImageClassification"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Clip", 15 | "Concat", 16 | "Constant", 17 | "ConstantOfShape", 18 | "Conv", 19 | "Div", 20 | "Equal", 21 | "Erf", 22 | "Exp", 23 | "Expand", 24 | "Flatten", 25 | "Gather", 26 | "Gemm", 27 | "GlobalAveragePool", 28 | "Identity", 29 | "MatMul", 30 | "Mod", 31 | "Mul", 32 | "Not", 33 | "Pad", 34 | "Pow", 35 | "Range", 36 | "ReduceL2", 37 | "ReduceMean", 38 | "Relu", 39 | "Reshape", 40 | "ScatterND", 41 | "Shape", 42 | "Sigmoid", 43 | "Slice", 44 | "Softmax", 45 | "Sqrt", 46 | "Sub", 47 | "Transpose", 48 | "Unsqueeze", 49 | "Where", 50 | ], 51 | }, 52 | { 53 | model_id: "onnx-internal-testing/tiny-random-Swinv2Model-ONNX", 54 | dtype: "fp32", 55 | architectures: ["Swinv2Model"], 56 | ops: [ 57 | "Add", 58 | "Cast", 59 | "Clip", 60 | "Concat", 61 | "Constant", 62 | "ConstantOfShape", 63 | "Conv", 64 | "Div", 65 | "Equal", 66 | "Erf", 67 | "Exp", 68 | "Expand", 69 | "Gather", 70 | "Identity", 71 | "MatMul", 72 | "Mod", 73 | "Mul", 74 | "Not", 75 | "Pad", 76 | "Pow", 77 | "Range", 78 | "ReduceL2", 79 | "ReduceMean", 80 | "Relu", 81 | "Reshape", 82 | "ScatterND", 83 | "Shape", 84 | "Sigmoid", 85 | "Slice", 86 | "Softmax", 87 | "Sqrt", 88 | "Sub", 89 | "Transpose", 90 | "Unsqueeze", 91 | "Where", 92 | ], 93 | }, 94 | ], 95 | }; 96 | -------------------------------------------------------------------------------- /packages/core/src/architectures/textnet.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "textnet", 5 | models: [ 6 | { 7 | model_id: "onnx-community/textnet-tiny", 8 | dtype: "q4", 9 | architectures: ["TextNetBackbone"], 10 | ops: ["Add", "BatchNormalization", "Conv", "Relu"], 11 | }, 12 | { 13 | model_id: "onnx-community/textnet-tiny", 14 | dtype: "q4f16", 15 | architectures: ["TextNetBackbone"], 16 | ops: ["Add", "BatchNormalization", "Cast", "Conv", "Relu"], 17 | }, 18 | { 19 | model_id: "onnx-community/textnet-tiny", 20 | dtype: "quantized", 21 | architectures: ["TextNetBackbone"], 22 | ops: [ 23 | "Add", 24 | "BatchNormalization", 25 | "Cast", 26 | "ConvInteger", 27 | "DynamicQuantizeLinear", 28 | "Mul", 29 | "Relu", 30 | "Reshape", 31 | ], 32 | }, 33 | ], 34 | }; 35 | -------------------------------------------------------------------------------- /packages/core/src/architectures/u2net.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "u2net", 5 | models: [ 6 | { 7 | model_id: "BritishWerewolf/IS-Net", 8 | dtype: "fp32", 9 | architectures: ["U2NetModel"], 10 | ops: [ 11 | "Add", 12 | "Concat", 13 | "Constant", 14 | "Conv", 15 | "MaxPool", 16 | "Relu", 17 | "Resize", 18 | "Shape", 19 | "Sigmoid", 20 | "Slice", 21 | ], 22 | }, 23 | { 24 | model_id: "BritishWerewolf/IS-Net-Anime", 25 | dtype: "fp32", 26 | architectures: ["U2NetModel"], 27 | ops: ["Add", "Concat", "Conv", "MaxPool", "Relu", "Resize", "Sigmoid"], 28 | }, 29 | { 30 | model_id: "BritishWerewolf/U-2-Net", 31 | dtype: "fp32", 32 | architectures: ["U2NetModel"], 33 | ops: [ 34 | "Add", 35 | "Cast", 36 | "Concat", 37 | "Constant", 38 | "Conv", 39 | "Gather", 40 | "MaxPool", 41 | "Relu", 42 | "Resize", 43 | "Shape", 44 | "Sigmoid", 45 | "Slice", 46 | "Unsqueeze", 47 | ], 48 | }, 49 | ], 50 | }; 51 | -------------------------------------------------------------------------------- /packages/core/src/architectures/vit_mae.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "vit_mae", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-ViTMAEModel", 8 | dtype: "fp32", 9 | architectures: ["ViTMAEModel"], 10 | ops: [ 11 | "Add", 12 | "Concat", 13 | "ConstantOfShape", 14 | "Conv", 15 | "Div", 16 | "Equal", 17 | "Erf", 18 | "Expand", 19 | "Gather", 20 | "GatherElements", 21 | "MatMul", 22 | "Mul", 23 | "Pow", 24 | "RandomUniformLike", 25 | "ReduceMean", 26 | "Reshape", 27 | "Shape", 28 | "Slice", 29 | "Softmax", 30 | "Sqrt", 31 | "Sub", 32 | "Tile", 33 | "TopK", 34 | "Transpose", 35 | "Unsqueeze", 36 | "Where", 37 | ], 38 | }, 39 | { 40 | model_id: "onnx-internal-testing/tiny-random-ViTMAEModel-ONNX", 41 | dtype: "fp32", 42 | architectures: ["ViTMAEModel"], 43 | ops: [ 44 | "Add", 45 | "Cast", 46 | "Concat", 47 | "Constant", 48 | "ConstantOfShape", 49 | "Conv", 50 | "Div", 51 | "Equal", 52 | "Erf", 53 | "Expand", 54 | "Gather", 55 | "GatherElements", 56 | "Identity", 57 | "MatMul", 58 | "Mul", 59 | "Pow", 60 | "RandomUniformLike", 61 | "ReduceMean", 62 | "Reshape", 63 | "Shape", 64 | "Slice", 65 | "Softmax", 66 | "Sqrt", 67 | "Sub", 68 | "Tile", 69 | "TopK", 70 | "Transpose", 71 | "Unsqueeze", 72 | "Where", 73 | ], 74 | }, 75 | ], 76 | }; 77 | -------------------------------------------------------------------------------- /packages/core/src/architectures/vit_msn.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "vit_msn", 5 | models: [ 6 | { 7 | model_id: "hf-internal-testing/tiny-random-ViTMSNForImageClassification", 8 | dtype: "fp32", 9 | architectures: ["ViTMSNForImageClassification"], 10 | ops: [ 11 | "Add", 12 | "Concat", 13 | "Conv", 14 | "Div", 15 | "Equal", 16 | "Erf", 17 | "Expand", 18 | "Gather", 19 | "Gemm", 20 | "MatMul", 21 | "Mul", 22 | "Pow", 23 | "ReduceMean", 24 | "Reshape", 25 | "Shape", 26 | "Slice", 27 | "Softmax", 28 | "Sqrt", 29 | "Sub", 30 | "Transpose", 31 | "Unsqueeze", 32 | "Where", 33 | ], 34 | }, 35 | { 36 | model_id: 37 | "onnx-internal-testing/tiny-random-ViTMSNForImageClassification-ONNX", 38 | dtype: "fp32", 39 | architectures: ["ViTMSNForImageClassification"], 40 | ops: [ 41 | "Add", 42 | "Cast", 43 | "Concat", 44 | "Constant", 45 | "ConstantOfShape", 46 | "Conv", 47 | "Div", 48 | "Equal", 49 | "Erf", 50 | "Expand", 51 | "Gather", 52 | "Gemm", 53 | "Identity", 54 | "MatMul", 55 | "Mul", 56 | "Pow", 57 | "ReduceMean", 58 | "Reshape", 59 | "Shape", 60 | "Slice", 61 | "Softmax", 62 | "Sqrt", 63 | "Sub", 64 | "Transpose", 65 | "Unsqueeze", 66 | "Where", 67 | ], 68 | }, 69 | { 70 | model_id: "onnx-internal-testing/tiny-random-ViTMSNModel-ONNX", 71 | dtype: "fp32", 72 | architectures: ["ViTMSNModel"], 73 | ops: [ 74 | "Add", 75 | "Cast", 76 | "Concat", 77 | "Constant", 78 | "ConstantOfShape", 79 | "Conv", 80 | "Div", 81 | "Equal", 82 | "Erf", 83 | "Expand", 84 | "Gather", 85 | "Identity", 86 | "MatMul", 87 | "Mul", 88 | "Pow", 89 | "ReduceMean", 90 | "Reshape", 91 | "Shape", 92 | "Slice", 93 | "Softmax", 94 | "Sqrt", 95 | "Sub", 96 | "Transpose", 97 | "Unsqueeze", 98 | "Where", 99 | ], 100 | }, 101 | ], 102 | }; 103 | -------------------------------------------------------------------------------- /packages/core/src/architectures/vitmatte.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "vitmatte", 5 | models: [ 6 | { 7 | model_id: "Xenova/vitmatte-small-composition-1k", 8 | dtype: "quantized", 9 | architectures: ["VitMatteForImageMatting"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Concat", 14 | "Constant", 15 | "ConstantOfShape", 16 | "ConvInteger", 17 | "DequantizeLinear", 18 | "Div", 19 | "DynamicQuantizeLinear", 20 | "Einsum", 21 | "Erf", 22 | "Gather", 23 | "Identity", 24 | "MatMul", 25 | "MatMulInteger", 26 | "Mod", 27 | "Mul", 28 | "Pad", 29 | "Pow", 30 | "Range", 31 | "ReduceMean", 32 | "Relu", 33 | "Reshape", 34 | "Resize", 35 | "Shape", 36 | "Sigmoid", 37 | "Slice", 38 | "Softmax", 39 | "Split", 40 | "Sqrt", 41 | "Squeeze", 42 | "Sub", 43 | "Transpose", 44 | "Unsqueeze", 45 | ], 46 | }, 47 | { 48 | model_id: "Xenova/vitmatte-small-composition-1k", 49 | dtype: "fp32", 50 | architectures: ["VitMatteForImageMatting"], 51 | ops: [ 52 | "Add", 53 | "Cast", 54 | "Concat", 55 | "Constant", 56 | "ConstantOfShape", 57 | "Conv", 58 | "Div", 59 | "Einsum", 60 | "Erf", 61 | "Gather", 62 | "Identity", 63 | "MatMul", 64 | "Mod", 65 | "Mul", 66 | "Pad", 67 | "Pow", 68 | "Range", 69 | "ReduceMean", 70 | "Relu", 71 | "Reshape", 72 | "Resize", 73 | "Shape", 74 | "Sigmoid", 75 | "Slice", 76 | "Softmax", 77 | "Split", 78 | "Sqrt", 79 | "Squeeze", 80 | "Sub", 81 | "Transpose", 82 | "Unsqueeze", 83 | ], 84 | }, 85 | ], 86 | }; 87 | -------------------------------------------------------------------------------- /packages/core/src/architectures/wav2vec2-bert.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "wav2vec2-bert", 5 | models: [ 6 | { 7 | model_id: "Xenova/w2v-bert-2.0", 8 | dtype: "quantized", 9 | architectures: ["Wav2Vec2BertModel"], 10 | ops: [ 11 | "Add", 12 | "Cast", 13 | "Clip", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "ConvInteger", 18 | "DequantizeLinear", 19 | "Div", 20 | "DynamicQuantizeLinear", 21 | "Einsum", 22 | "Gather", 23 | "MatMul", 24 | "MatMulInteger", 25 | "Mul", 26 | "Pad", 27 | "Pow", 28 | "Range", 29 | "ReduceMean", 30 | "Reshape", 31 | "Shape", 32 | "Sigmoid", 33 | "Slice", 34 | "Softmax", 35 | "Split", 36 | "Sqrt", 37 | "Sub", 38 | "Transpose", 39 | "Unsqueeze", 40 | ], 41 | }, 42 | { 43 | model_id: "Xenova/w2v-bert-2.0", 44 | dtype: "fp32", 45 | architectures: ["Wav2Vec2BertModel"], 46 | ops: [ 47 | "Add", 48 | "Cast", 49 | "Clip", 50 | "Concat", 51 | "Constant", 52 | "ConstantOfShape", 53 | "Conv", 54 | "Div", 55 | "Einsum", 56 | "Gather", 57 | "MatMul", 58 | "Mul", 59 | "Pad", 60 | "Pow", 61 | "Range", 62 | "ReduceMean", 63 | "Reshape", 64 | "Shape", 65 | "Sigmoid", 66 | "Slice", 67 | "Softmax", 68 | "Split", 69 | "Sqrt", 70 | "Sub", 71 | "Transpose", 72 | "Unsqueeze", 73 | ], 74 | }, 75 | { 76 | model_id: "Xenova/wav2vec2-bert-CV16-en", 77 | dtype: "quantized", 78 | architectures: ["Wav2Vec2BertForCTC"], 79 | ops: [ 80 | "Add", 81 | "Cast", 82 | "Clip", 83 | "Concat", 84 | "Constant", 85 | "ConstantOfShape", 86 | "ConvInteger", 87 | "DequantizeLinear", 88 | "Div", 89 | "DynamicQuantizeLinear", 90 | "Einsum", 91 | "Gather", 92 | "MatMul", 93 | "MatMulInteger", 94 | "Mul", 95 | "Pad", 96 | "Pow", 97 | "Range", 98 | "ReduceMean", 99 | "Relu", 100 | "Reshape", 101 | "Shape", 102 | "Sigmoid", 103 | "Slice", 104 | "Softmax", 105 | "Split", 106 | "Sqrt", 107 | "Sub", 108 | "Transpose", 109 | "Unsqueeze", 110 | ], 111 | }, 112 | { 113 | model_id: "Xenova/wav2vec2-bert-CV16-en", 114 | dtype: "fp32", 115 | architectures: ["Wav2Vec2BertForCTC"], 116 | ops: [ 117 | "Add", 118 | "Cast", 119 | "Clip", 120 | "Concat", 121 | "Constant", 122 | "ConstantOfShape", 123 | "Conv", 124 | "Div", 125 | "Einsum", 126 | "Gather", 127 | "MatMul", 128 | "Mul", 129 | "Pad", 130 | "Pow", 131 | "Range", 132 | "ReduceMean", 133 | "Relu", 134 | "Reshape", 135 | "Shape", 136 | "Sigmoid", 137 | "Slice", 138 | "Softmax", 139 | "Split", 140 | "Sqrt", 141 | "Sub", 142 | "Transpose", 143 | "Unsqueeze", 144 | ], 145 | }, 146 | ], 147 | }; 148 | -------------------------------------------------------------------------------- /packages/core/src/architectures/wav2vec2-conformer.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "wav2vec2-conformer", 5 | models: [ 6 | { 7 | model_id: 8 | "onnx-internal-testing/tiny-random-Wav2Vec2ConformerForAudioFrameClassification-ONNX", 9 | dtype: "fp32", 10 | architectures: ["Wav2Vec2ConformerForAudioFrameClassification"], 11 | ops: [ 12 | "Add", 13 | "Cast", 14 | "Concat", 15 | "Constant", 16 | "ConstantOfShape", 17 | "Conv", 18 | "Div", 19 | "Erf", 20 | "Gather", 21 | "Identity", 22 | "InstanceNormalization", 23 | "MatMul", 24 | "Mul", 25 | "Pow", 26 | "ReduceMean", 27 | "Reshape", 28 | "Shape", 29 | "Sigmoid", 30 | "Slice", 31 | "Softmax", 32 | "Split", 33 | "Sqrt", 34 | "Squeeze", 35 | "Sub", 36 | "Transpose", 37 | "Unsqueeze", 38 | ], 39 | }, 40 | { 41 | model_id: 42 | "onnx-internal-testing/tiny-random-Wav2Vec2ConformerForSequenceClassification-ONNX", 43 | dtype: "fp32", 44 | architectures: ["Wav2Vec2ConformerForSequenceClassification"], 45 | ops: [ 46 | "Add", 47 | "Cast", 48 | "Concat", 49 | "Constant", 50 | "ConstantOfShape", 51 | "Conv", 52 | "Div", 53 | "Erf", 54 | "Gather", 55 | "Gemm", 56 | "Identity", 57 | "InstanceNormalization", 58 | "MatMul", 59 | "Mul", 60 | "Pow", 61 | "ReduceMean", 62 | "Reshape", 63 | "Shape", 64 | "Sigmoid", 65 | "Slice", 66 | "Softmax", 67 | "Split", 68 | "Sqrt", 69 | "Squeeze", 70 | "Sub", 71 | "Transpose", 72 | "Unsqueeze", 73 | ], 74 | }, 75 | { 76 | model_id: 77 | "onnx-internal-testing/tiny-random-Wav2Vec2ConformerForXVector-ONNX", 78 | dtype: "fp32", 79 | architectures: ["Wav2Vec2ConformerForXVector"], 80 | ops: [ 81 | "Add", 82 | "Cast", 83 | "Concat", 84 | "Constant", 85 | "ConstantOfShape", 86 | "Conv", 87 | "Div", 88 | "Erf", 89 | "Gather", 90 | "Gemm", 91 | "Identity", 92 | "InstanceNormalization", 93 | "MatMul", 94 | "Mul", 95 | "Pow", 96 | "ReduceMean", 97 | "ReduceProd", 98 | "Relu", 99 | "Reshape", 100 | "Shape", 101 | "Sigmoid", 102 | "Slice", 103 | "Softmax", 104 | "Split", 105 | "Sqrt", 106 | "Squeeze", 107 | "Sub", 108 | "Transpose", 109 | "Unsqueeze", 110 | ], 111 | }, 112 | { 113 | model_id: "onnx-internal-testing/tiny-random-wav2vec2-conformer-ONNX", 114 | dtype: "fp32", 115 | architectures: ["Wav2Vec2ConformerForCTC"], 116 | ops: [ 117 | "Add", 118 | "Cast", 119 | "Concat", 120 | "Constant", 121 | "ConstantOfShape", 122 | "Conv", 123 | "Div", 124 | "Erf", 125 | "Gather", 126 | "Identity", 127 | "MatMul", 128 | "Mul", 129 | "Pow", 130 | "ReduceMean", 131 | "Reshape", 132 | "Shape", 133 | "Sigmoid", 134 | "Slice", 135 | "Softmax", 136 | "Split", 137 | "Sqrt", 138 | "Squeeze", 139 | "Sub", 140 | "Transpose", 141 | "Unsqueeze", 142 | ], 143 | }, 144 | ], 145 | }; 146 | -------------------------------------------------------------------------------- /packages/core/src/architectures/yolov8.js: -------------------------------------------------------------------------------- 1 | // NOTE: This file has been auto-generated. Do not edit directly. 2 | 3 | export default { 4 | model_type: "yolov8", 5 | models: [ 6 | { 7 | model_id: "Xenova/yolov8n-pose", 8 | dtype: "q4", 9 | architectures: [], 10 | ops: [ 11 | "Add", 12 | "Concat", 13 | "Constant", 14 | "Conv", 15 | "Div", 16 | "Gather", 17 | "MaxPool", 18 | "Mul", 19 | "Reshape", 20 | "Resize", 21 | "Shape", 22 | "Sigmoid", 23 | "Slice", 24 | "Softmax", 25 | "Split", 26 | "Sub", 27 | "Transpose", 28 | ], 29 | }, 30 | { 31 | model_id: "Xenova/yolov8n-pose", 32 | dtype: "quantized", 33 | architectures: [], 34 | ops: [ 35 | "Add", 36 | "Cast", 37 | "Concat", 38 | "Constant", 39 | "ConvInteger", 40 | "Div", 41 | "DynamicQuantizeLinear", 42 | "Gather", 43 | "MaxPool", 44 | "Mul", 45 | "Reshape", 46 | "Resize", 47 | "Shape", 48 | "Sigmoid", 49 | "Slice", 50 | "Softmax", 51 | "Split", 52 | "Sub", 53 | "Transpose", 54 | ], 55 | }, 56 | { 57 | model_id: "Xenova/yolov8n-pose", 58 | dtype: "fp16", 59 | architectures: [], 60 | ops: [ 61 | "Add", 62 | "Cast", 63 | "Concat", 64 | "Constant", 65 | "Conv", 66 | "Div", 67 | "Gather", 68 | "MaxPool", 69 | "Mul", 70 | "Reshape", 71 | "Resize", 72 | "Shape", 73 | "Sigmoid", 74 | "Slice", 75 | "Softmax", 76 | "Split", 77 | "Sub", 78 | "Transpose", 79 | ], 80 | }, 81 | ], 82 | }; 83 | -------------------------------------------------------------------------------- /packages/core/src/defaults.js: -------------------------------------------------------------------------------- 1 | export const DEFAULT_MODEL_OPTIONS = { 2 | dtype: "fp32", 3 | }; 4 | -------------------------------------------------------------------------------- /packages/core/src/index.js: -------------------------------------------------------------------------------- 1 | export { PipelineTestSuite, ModelTestSuite } from "./suites.js"; 2 | -------------------------------------------------------------------------------- /packages/core/src/inputs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Since we want the benchmark to run in JavaScript "engine shells" (e.g., d8 for V8 or jsc for JavaScriptCore, not full browsers), 3 | * many browser APIs are not available, e.g., for audio processing, TextDecoder/TextEncoder, or even web workers. 4 | * 5 | * For this reason, we prepare inputs that can be passed to the models. 6 | */ 7 | import { RawImage } from "@huggingface/transformers"; 8 | 9 | export const DUMMY_AUDIO = new Float32Array(16000); 10 | 11 | export const DUMMY_IMAGE = new RawImage( 12 | new Uint8ClampedArray(224 * 224 * 4), 13 | 224, 14 | 224, 15 | 4, 16 | ); 17 | 18 | export const TINY_DUMMY_IMAGE = new RawImage( 19 | new Uint8ClampedArray(64 * 32 * 3), 20 | 64, 21 | 32, 22 | 3, 23 | ); 24 | -------------------------------------------------------------------------------- /packages/core/src/load.js: -------------------------------------------------------------------------------- 1 | import * as ARCHICTURES from "./architectures.js"; 2 | import * as TRANSFORMERS_JS from "@huggingface/transformers"; 3 | import { DEFAULT_MODEL_OPTIONS } from "./defaults.js"; 4 | 5 | // console.log(ARCHICTURES); 6 | const UNSUPPORTED_ARCHITECTURES = []; 7 | for (const [key, value] of Object.entries(ARCHICTURES)) { 8 | for (const model of value.models) { 9 | if (model.skip) continue; 10 | 11 | if (model.architectures.length !== 1) { 12 | throw new Error( 13 | `Expected exactly one architecture for ${model.model_id}`, 14 | ); 15 | } 16 | const architecture = model.architectures[0]; 17 | const cls = TRANSFORMERS_JS[architecture]; 18 | if (!cls) { 19 | console.warn( 20 | `Unknown architecture: ${architecture} in ${model.model_id}`, 21 | ); 22 | UNSUPPORTED_ARCHITECTURES.push(architecture); 23 | continue; 24 | } 25 | console.log(model.model_id); 26 | const m = await cls 27 | .from_pretrained(model.model_id, { 28 | ...DEFAULT_MODEL_OPTIONS, 29 | dtype: model.dtype === "quantized" ? "q8" : model.dtype, 30 | }) 31 | .catch((err) => { 32 | console.error(err); 33 | return null; 34 | }); 35 | await m?.dispose(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/core/src/models.js: -------------------------------------------------------------------------------- 1 | export { default as bert } from "./models/bert.js"; 2 | export { default as clip } from "./models/clip.js"; 3 | export { default as llama } from "./models/llama.js"; 4 | export { default as sam } from "./models/sam.js"; 5 | export { default as t5 } from "./models/t5.js"; 6 | export { default as qwen2_vl } from "./models/qwen2_vl.js"; 7 | export { default as whisper } from "./models/whisper.js"; 8 | -------------------------------------------------------------------------------- /packages/core/src/models/bert.js: -------------------------------------------------------------------------------- 1 | import { AutoTokenizer, BertModel } from "@huggingface/transformers"; 2 | 3 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 4 | 5 | import { computeStatistics, pick, time, toBeCloseToNested } from "../utils.js"; 6 | 7 | class BertTest extends Test { 8 | constructor(config) { 9 | super(config); 10 | this.name = config.name; 11 | this.options = config.options; 12 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 13 | } 14 | async run() { 15 | const { 16 | result: [test, expected, cleanup], 17 | time: setupTime, 18 | } = await time(async () => { 19 | const model_id = "Snowflake/snowflake-arctic-embed-xs"; 20 | const tokenizer = await AutoTokenizer.from_pretrained(model_id); 21 | const model = await BertModel.from_pretrained(model_id, { 22 | ...this.options, 23 | }); 24 | const inputs = await tokenizer(["hello", "hello world"], { 25 | truncation: true, 26 | padding: true, 27 | }); 28 | 29 | return [ 30 | async () => { 31 | const { last_hidden_state } = await model(inputs); 32 | return pick(last_hidden_state, ["type", "dims"]); 33 | }, 34 | { 35 | type: "float32", 36 | dims: [2, 4, 384], 37 | }, 38 | () => model.dispose(), 39 | ]; 40 | }); 41 | 42 | const times = []; 43 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 44 | for (let i = 0; i < numRuns; ++i) { 45 | const { result, time: executionTime } = await time(test); 46 | const { pass, message } = toBeCloseToNested(result, expected); 47 | if (!pass) { 48 | console.log(result); 49 | console.log(expected); 50 | throw new Error(message()); 51 | } 52 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 53 | } 54 | const stats = { 55 | [this.name]: computeStatistics(times), 56 | }; 57 | 58 | const { time: disposeTime } = await time(cleanup); 59 | 60 | return { 61 | setupTime, 62 | stats, 63 | disposeTime, 64 | }; 65 | } 66 | } 67 | 68 | export default [ 69 | { 70 | test: BertTest, 71 | config: { 72 | name: "BertModel", 73 | num_runs: 20, 74 | }, 75 | }, 76 | ]; 77 | -------------------------------------------------------------------------------- /packages/core/src/models/clip.js: -------------------------------------------------------------------------------- 1 | import { 2 | AutoTokenizer, 3 | AutoImageProcessor, 4 | CLIPModel, 5 | } from "@huggingface/transformers"; 6 | 7 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 8 | 9 | import { DUMMY_IMAGE } from "../inputs.js"; 10 | import { computeStatistics, time, toBeCloseToNested } from "../utils.js"; 11 | import { DEFAULT_MODEL_OPTIONS } from "../defaults.js"; 12 | 13 | class CLIPTest extends Test { 14 | constructor(config) { 15 | super(config); 16 | this.name = config.name; 17 | this.options = config.options; 18 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 19 | } 20 | async run() { 21 | const { 22 | result: [test, expected, cleanup], 23 | time: setupTime, 24 | } = await time(async () => { 25 | const model_id = "onnx-internal-testing/tiny-random-CLIPModel-ONNX"; 26 | 27 | const tokenizer = await AutoTokenizer.from_pretrained(model_id); 28 | const processor = await AutoImageProcessor.from_pretrained(model_id); 29 | const model = await CLIPModel.from_pretrained(model_id, { 30 | ...DEFAULT_MODEL_OPTIONS, 31 | ...this.options, 32 | }); 33 | const texts = ["a photo of a car", "a photo of a football match"]; 34 | const text_inputs = tokenizer(texts, { padding: true, truncation: true }); 35 | const image_inputs = await processor(DUMMY_IMAGE); 36 | 37 | const expected = { 38 | logits_per_image: [1, 2], 39 | logits_per_text: [2, 1], 40 | text_embeds: [2, 64], 41 | image_embeds: [1, 64], 42 | }; 43 | return [ 44 | async () => { 45 | const { 46 | logits_per_image, 47 | logits_per_text, 48 | text_embeds, 49 | image_embeds, 50 | } = await model({ 51 | ...text_inputs, 52 | ...image_inputs, 53 | }); 54 | return { 55 | logits_per_image: logits_per_image.dims, 56 | logits_per_text: logits_per_text.dims, 57 | text_embeds: text_embeds.dims, 58 | image_embeds: image_embeds.dims, 59 | }; 60 | }, 61 | expected, 62 | () => model.dispose(), 63 | ]; 64 | }); 65 | 66 | const times = []; 67 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 68 | for (let i = 0; i < numRuns; ++i) { 69 | const { result, time: executionTime } = await time(test); 70 | const { pass, message } = toBeCloseToNested(result, expected); 71 | if (!pass) { 72 | console.log(result); 73 | console.log(expected); 74 | throw new Error(message()); 75 | } 76 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 77 | } 78 | const stats = { 79 | [this.name]: computeStatistics(times), 80 | }; 81 | 82 | const { time: disposeTime } = await time(cleanup); 83 | 84 | return { 85 | setupTime, 86 | stats, 87 | disposeTime, 88 | }; 89 | } 90 | } 91 | 92 | export default [ 93 | { 94 | test: CLIPTest, 95 | config: { 96 | name: "CLIPModel", 97 | num_runs: 20, 98 | }, 99 | }, 100 | ]; 101 | -------------------------------------------------------------------------------- /packages/core/src/models/llama.js: -------------------------------------------------------------------------------- 1 | import { AutoTokenizer, LlamaForCausalLM } from "@huggingface/transformers"; 2 | 3 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 4 | import { computeStatistics, time, toBeCloseToNested } from "../utils.js"; 5 | 6 | class LlamaTest extends Test { 7 | constructor(config) { 8 | super(config); 9 | this.name = config.name; 10 | this.options = config.options; 11 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 12 | } 13 | async run() { 14 | const { 15 | result: [test, expected, cleanup], 16 | time: setupTime, 17 | } = await time(async () => { 18 | const model_id = "Xenova/llama2.c-stories15M"; 19 | const tokenizer = await AutoTokenizer.from_pretrained(model_id); 20 | const model = await LlamaForCausalLM.from_pretrained(model_id, { 21 | ...this.options, 22 | }); 23 | const inputs = await tokenizer("Once upon a time,"); 24 | 25 | const expected = [" Once upon a time, there was a little girl"]; 26 | return [ 27 | async () => { 28 | const outputs = await model.generate({ 29 | ...inputs, 30 | max_new_tokens: 5, 31 | }); 32 | const decoded = tokenizer.batch_decode(outputs); 33 | return decoded; 34 | }, 35 | expected, 36 | () => model.dispose(), 37 | ]; 38 | }); 39 | 40 | const times = []; 41 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 42 | for (let i = 0; i < numRuns; ++i) { 43 | const { result, time: executionTime } = await time(test); 44 | const { pass, message } = toBeCloseToNested(result, expected); 45 | if (!pass) { 46 | console.log(result); 47 | console.log(expected); 48 | throw new Error(message()); 49 | } 50 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 51 | } 52 | const stats = { 53 | [this.name]: computeStatistics(times), 54 | }; 55 | 56 | const { time: disposeTime } = await time(cleanup); 57 | 58 | return { 59 | setupTime, 60 | stats, 61 | disposeTime, 62 | }; 63 | } 64 | } 65 | 66 | export default [ 67 | { 68 | test: LlamaTest, 69 | config: { 70 | name: "LlamaForCausalLM", 71 | num_runs: 20, 72 | }, 73 | }, 74 | ]; 75 | -------------------------------------------------------------------------------- /packages/core/src/models/qwen2_vl.js: -------------------------------------------------------------------------------- 1 | import { 2 | AutoProcessor, 3 | Qwen2VLForConditionalGeneration, 4 | } from "@huggingface/transformers"; 5 | 6 | import { DEFAULT_MODEL_OPTIONS } from "../defaults.js"; 7 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 8 | 9 | import { DUMMY_IMAGE } from "../inputs.js"; 10 | import { computeStatistics, time, toBeCloseToNested } from "../utils.js"; 11 | 12 | class Qwen2VLTest extends Test { 13 | constructor(config) { 14 | super(config); 15 | this.name = config.name; 16 | this.options = config.options; 17 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 18 | } 19 | async run() { 20 | const { 21 | result: [test, expected, cleanup], 22 | time: setupTime, 23 | } = await time(async () => { 24 | const model_id = 25 | "hf-internal-testing/tiny-random-Qwen2VLForConditionalGeneration"; 26 | const processor = await AutoProcessor.from_pretrained(model_id); 27 | const model = await Qwen2VLForConditionalGeneration.from_pretrained( 28 | model_id, 29 | { 30 | ...DEFAULT_MODEL_OPTIONS, 31 | ...this.options, 32 | }, 33 | ); 34 | const image = DUMMY_IMAGE; 35 | const conversation = [ 36 | { 37 | role: "user", 38 | content: [ 39 | { type: "image" }, 40 | { type: "text", text: "Describe this image." }, 41 | ], 42 | }, 43 | ]; 44 | const text = processor.apply_chat_template(conversation, { 45 | add_generation_prompt: true, 46 | }); 47 | const inputs = await processor(text, image); 48 | 49 | const expected = [" finishing Patio无意 możliwości𬱖"]; 50 | return [ 51 | async () => { 52 | const outputs = await model.generate({ 53 | ...inputs, 54 | max_new_tokens: 5, 55 | }); 56 | const decoded = processor.batch_decode( 57 | outputs.slice(null, [inputs.input_ids.dims.at(-1), null]), 58 | { skip_special_tokens: true }, 59 | ); 60 | return decoded; 61 | }, 62 | expected, 63 | () => model.dispose(), 64 | ]; 65 | }); 66 | 67 | const times = []; 68 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 69 | for (let i = 0; i < numRuns; ++i) { 70 | const { result, time: executionTime } = await time(test); 71 | const { pass, message } = toBeCloseToNested(result, expected); 72 | if (!pass) { 73 | console.log(result); 74 | console.log(expected); 75 | throw new Error(message()); 76 | } 77 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 78 | } 79 | const stats = { 80 | [this.name]: computeStatistics(times), 81 | }; 82 | 83 | const { time: disposeTime } = await time(cleanup); 84 | 85 | return { 86 | setupTime, 87 | stats, 88 | disposeTime, 89 | }; 90 | } 91 | } 92 | 93 | export default [ 94 | { 95 | test: Qwen2VLTest, 96 | config: { 97 | name: "Qwen2VLForConditionalGeneration", 98 | num_runs: 10, 99 | }, 100 | }, 101 | ]; 102 | -------------------------------------------------------------------------------- /packages/core/src/models/sam.js: -------------------------------------------------------------------------------- 1 | import { SamModel, Tensor } from "@huggingface/transformers"; 2 | 3 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 4 | 5 | import { computeStatistics, pick, time, toBeCloseToNested } from "../utils.js"; 6 | 7 | class SamTest extends Test { 8 | constructor(config) { 9 | super(config); 10 | this.name = config.name; 11 | this.options = config.options; 12 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 13 | } 14 | async run() { 15 | const { 16 | result: [test, expected, cleanup], 17 | time: setupTime, 18 | } = await time(async () => { 19 | const model_id = "Xenova/slimsam-77-uniform"; 20 | const model = await SamModel.from_pretrained(model_id, { 21 | ...this.options, 22 | }); 23 | 24 | const inputs = { 25 | input_points: new Tensor("float32", [10, 10], [1, 1, 1, 2]), 26 | input_labels: new Tensor("int64", [0], [1, 1, 1]), 27 | image_embeddings: new Tensor( 28 | "float32", 29 | new Float32Array(1 * 256 * 64 * 64), 30 | [1, 256, 64, 64], 31 | ), 32 | image_positional_embeddings: new Tensor( 33 | "float32", 34 | new Float32Array(1 * 256 * 64 * 64), 35 | [1, 256, 64, 64], 36 | ), 37 | }; 38 | 39 | return [ 40 | async () => { 41 | const { pred_masks, iou_scores } = await model(inputs); 42 | return { 43 | pred_masks: pick(pred_masks, ["type", "dims"]), 44 | iou_scores: pick(iou_scores, ["type", "dims"]), 45 | }; 46 | }, 47 | { 48 | pred_masks: { 49 | type: "float32", 50 | dims: [1, 1, 3, 256, 256], 51 | }, 52 | iou_scores: { 53 | type: "float32", 54 | dims: [1, 1, 3], 55 | }, 56 | }, 57 | () => model.dispose(), 58 | ]; 59 | }); 60 | 61 | const times = []; 62 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 63 | for (let i = 0; i < numRuns; ++i) { 64 | const { result, time: executionTime } = await time(test); 65 | const { pass, message } = toBeCloseToNested(result, expected); 66 | if (!pass) { 67 | console.log(result); 68 | console.log(expected); 69 | throw new Error(message()); 70 | } 71 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 72 | } 73 | const stats = { 74 | [this.name]: computeStatistics(times), 75 | }; 76 | 77 | const { time: disposeTime } = await time(cleanup); 78 | 79 | return { 80 | setupTime, 81 | stats, 82 | disposeTime, 83 | }; 84 | } 85 | } 86 | 87 | export default [ 88 | { 89 | test: SamTest, 90 | config: { 91 | name: "SamModel", 92 | num_runs: 20, 93 | }, 94 | }, 95 | ]; 96 | -------------------------------------------------------------------------------- /packages/core/src/models/t5.js: -------------------------------------------------------------------------------- 1 | import { 2 | AutoTokenizer, 3 | T5ForConditionalGeneration, 4 | } from "@huggingface/transformers"; 5 | 6 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 7 | import { computeStatistics, time, toBeCloseToNested } from "../utils.js"; 8 | 9 | class T5Test extends Test { 10 | constructor(config) { 11 | super(config); 12 | this.name = config.name; 13 | this.options = config.options; 14 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 15 | } 16 | async run() { 17 | const { 18 | result: [test, expected, cleanup], 19 | time: setupTime, 20 | } = await time(async () => { 21 | const model_id = "Xenova/t5-small"; 22 | const tokenizer = await AutoTokenizer.from_pretrained(model_id); 23 | const model = await T5ForConditionalGeneration.from_pretrained(model_id, { 24 | ...this.options, 25 | }); 26 | const inputs = await tokenizer("Translate English to French: Hello."); 27 | 28 | const expected = [" Bonjour."]; 29 | return [ 30 | async () => { 31 | const outputs = await model.generate({ 32 | ...inputs, 33 | max_new_tokens: 5, 34 | }); 35 | const decoded = tokenizer.batch_decode(outputs); 36 | return decoded; 37 | }, 38 | expected, 39 | () => model.dispose(), 40 | ]; 41 | }); 42 | 43 | const times = []; 44 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 45 | for (let i = 0; i < numRuns; ++i) { 46 | const { result, time: executionTime } = await time(test); 47 | const { pass, message } = toBeCloseToNested(result, expected); 48 | if (!pass) { 49 | console.log(result); 50 | console.log(expected); 51 | throw new Error(message()); 52 | } 53 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 54 | } 55 | const stats = { 56 | [this.name]: computeStatistics(times), 57 | }; 58 | 59 | const { time: disposeTime } = await time(cleanup); 60 | 61 | return { 62 | setupTime, 63 | stats, 64 | disposeTime, 65 | }; 66 | } 67 | } 68 | 69 | export default [ 70 | { 71 | test: T5Test, 72 | config: { 73 | name: "T5ForConditionalGeneration", 74 | num_runs: 10, 75 | }, 76 | }, 77 | ]; 78 | -------------------------------------------------------------------------------- /packages/core/src/models/whisper.js: -------------------------------------------------------------------------------- 1 | import { 2 | AutoProcessor, 3 | WhisperForConditionalGeneration, 4 | } from "@huggingface/transformers"; 5 | 6 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "../test.js"; 7 | 8 | import { DUMMY_AUDIO } from "../inputs.js"; 9 | import { computeStatistics, time, toBeCloseToNested } from "../utils.js"; 10 | 11 | class WhisperTest extends Test { 12 | constructor(config) { 13 | super(config); 14 | this.name = config.name; 15 | this.options = config.options; 16 | this.num_runs = config.num_runs ?? DEFAULT_NUM_RUNS; 17 | } 18 | async run() { 19 | const { 20 | result: [test, expected, cleanup], 21 | time: setupTime, 22 | } = await time(async () => { 23 | const model_id = "onnx-community/whisper-tiny.en"; 24 | const processor = await AutoProcessor.from_pretrained(model_id); 25 | const model = await WhisperForConditionalGeneration.from_pretrained( 26 | model_id, 27 | { 28 | ...this.options, 29 | }, 30 | ); 31 | const audio = DUMMY_AUDIO; 32 | const inputs = await processor(audio); 33 | 34 | const expected = [ 35 | "<|startoftranscript|><|notimestamps|> you<|endoftext|>", 36 | ]; 37 | return [ 38 | async () => { 39 | const outputs = await model.generate({ 40 | ...inputs, 41 | max_new_tokens: 5, 42 | }); 43 | const decoded = processor.batch_decode(outputs); 44 | return decoded; 45 | }, 46 | expected, 47 | () => model.dispose(), 48 | ]; 49 | }); 50 | 51 | const times = []; 52 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + this.num_runs; 53 | for (let i = 0; i < numRuns; ++i) { 54 | const { result, time: executionTime } = await time(test); 55 | const { pass, message } = toBeCloseToNested(result, expected); 56 | if (!pass) { 57 | console.log(result); 58 | console.log(expected); 59 | throw new Error(message()); 60 | } 61 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 62 | } 63 | const stats = { 64 | [this.name]: computeStatistics(times), 65 | }; 66 | 67 | const { time: disposeTime } = await time(cleanup); 68 | 69 | return { 70 | setupTime, 71 | stats, 72 | disposeTime, 73 | }; 74 | } 75 | } 76 | 77 | export default [ 78 | { 79 | test: WhisperTest, 80 | config: { 81 | name: "WhisperForConditionalGeneration", 82 | num_runs: 5, 83 | }, 84 | }, 85 | ]; 86 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/audio-classification.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_AUDIO } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Audio Classification", 5 | config: { 6 | task: "audio-classification", 7 | model_id: "hf-internal-testing/tiny-random-unispeech", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [DUMMY_AUDIO, { top_k: 3 }], 13 | expected: [ 14 | { score: 0.5043687224388123, label: "LABEL_0" }, 15 | { score: 0.4956313371658325, label: "LABEL_1" }, 16 | ], 17 | }, 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/automatic-speech-recognition.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_AUDIO } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Automatic Speech Recognition", 5 | config: { 6 | task: "automatic-speech-recognition", 7 | model_id: 8 | "hf-internal-testing/tiny-random-MoonshineForConditionalGeneration", 9 | }, 10 | tests: [ 11 | { 12 | name: "Default", 13 | inputs: [DUMMY_AUDIO, { max_new_tokens: 3, language: "en" }], 14 | expected: { text: "operator Swedishapprox" }, 15 | }, 16 | ], 17 | }; 18 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/depth-estimation.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | import { pick, toBeCloseToNested } from "../utils.js"; 3 | 4 | export default { 5 | name: "Depth Estimation", 6 | config: { 7 | task: "depth-estimation", 8 | model_id: "hf-internal-testing/tiny-random-DPTForDepthEstimation", 9 | }, 10 | tests: [ 11 | { 12 | name: "Default", 13 | inputs: [DUMMY_IMAGE], 14 | expected: { 15 | predicted_depth: { dims: [224, 224] }, 16 | depth: { size: DUMMY_IMAGE.size }, 17 | }, 18 | test_function: (result, expected) => 19 | toBeCloseToNested( 20 | { 21 | predicted_depth: pick(result.predicted_depth, ["dims"]), 22 | depth: pick(result.depth, ["size"]), 23 | }, 24 | expected, 25 | ), 26 | }, 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/document-question-answering.js: -------------------------------------------------------------------------------- 1 | import { TINY_DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Document Question Answering", 5 | config: { 6 | task: "document-question-answering", 7 | model_id: 8 | "hf-internal-testing/tiny-random-VisionEncoderDecoderModel-vit-gpt2", 9 | }, 10 | tests: [ 11 | { 12 | name: "Default", 13 | inputs: [ 14 | TINY_DUMMY_IMAGE, 15 | "What is the invoice number?", 16 | { max_new_tokens: 10 }, 17 | ], 18 | expected: [{ answer: null }], 19 | }, 20 | ], 21 | }; 22 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/feature-extraction.js: -------------------------------------------------------------------------------- 1 | import { pick, toBeCloseToNested } from "../utils.js"; 2 | 3 | export default { 4 | name: "Feature Extraction", 5 | config: { 6 | task: "feature-extraction", 7 | model_id: "hf-internal-testing/tiny-random-BertModel", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [Array.from({ length: 64 }, () => "This is a simple test.")], 13 | expected: { 14 | type: "float32", 15 | dims: [64, 20, 32], 16 | mean: -1.538501215314625e-9, 17 | }, 18 | test_function: (result, expected) => 19 | toBeCloseToNested( 20 | { 21 | ...pick(result, ["type", "dims"]), 22 | mean: result.mean().item(), 23 | }, 24 | expected, 25 | ), 26 | }, 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/fill-mask.js: -------------------------------------------------------------------------------- 1 | const BATCH_SIZE = 32; 2 | 3 | export default { 4 | name: "Fill Mask", 5 | config: { 6 | task: "fill-mask", 7 | model_id: "hf-internal-testing/tiny-random-BertForMaskedLM", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [ 13 | Array.from( 14 | { length: BATCH_SIZE }, 15 | () => "The quick brown [MASK] jumps over the lazy dog.", 16 | ), 17 | { 18 | top_k: 3, 19 | }, 20 | ], 21 | expected: Array.from({ length: BATCH_SIZE }, () => [ 22 | { 23 | score: 0.001336989109404385, 24 | token: 823, 25 | token_str: "##ن", 26 | sequence: "the quick brownن jumps over the lazy dog.", 27 | }, 28 | { 29 | score: 0.0013063998194411397, 30 | token: 962, 31 | token_str: "##ち", 32 | sequence: "the quick brownち jumps over the lazy dog.", 33 | }, 34 | { 35 | score: 0.0012906234478577971, 36 | token: 854, 37 | token_str: "##ο", 38 | sequence: "the quick brownο jumps over the lazy dog.", 39 | }, 40 | ]), 41 | }, 42 | ], 43 | }; 44 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/image-classification.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Image Classification", 5 | config: { 6 | task: "image-classification", 7 | model_id: "hf-internal-testing/tiny-random-vit", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [DUMMY_IMAGE, { top_k: 3 }], 13 | expected: [ 14 | { score: 0.501950204372406, label: "LABEL_0" }, 15 | { score: 0.4980497658252716, label: "LABEL_1" }, 16 | ], 17 | }, 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/image-feature-extraction.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | import { pick, toBeCloseToNested } from "../utils.js"; 3 | 4 | export default { 5 | name: "Image Feature Extraction", 6 | config: { 7 | task: "image-feature-extraction", 8 | model_id: "hf-internal-testing/tiny-random-ViTMAEModel", 9 | }, 10 | tests: [ 11 | { 12 | name: "Default", 13 | inputs: [DUMMY_IMAGE], 14 | expected: { 15 | type: "float32", 16 | dims: [1, 91, 32], 17 | mean: -8.507473614471905e-10, 18 | }, 19 | test_function: (result, expected) => 20 | toBeCloseToNested( 21 | { 22 | ...pick(result, ["type", "dims"]), 23 | mean: result.mean().item(), 24 | }, 25 | expected, 26 | ), 27 | }, 28 | ], 29 | }; 30 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/image-segmentation.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Image Segmentation", 5 | config: { 6 | task: "image-segmentation", 7 | model_id: "...", // TODO: Find a tiny model ID 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [DUMMY_IMAGE, { threshold: 0.0, mask_threshold: 0.0 }], 13 | expected: [], 14 | }, 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/image-to-image.js: -------------------------------------------------------------------------------- 1 | import { TINY_DUMMY_IMAGE } from "../inputs.js"; 2 | import { toBeCloseToNested } from "../utils.js"; 3 | 4 | export default { 5 | name: "Image to Image", 6 | config: { 7 | task: "image-to-image", 8 | model_id: "hf-internal-testing/tiny-random-Swin2SRForImageSuperResolution", 9 | }, 10 | tests: [ 11 | { 12 | name: "Default", 13 | inputs: [TINY_DUMMY_IMAGE], 14 | expected: { 15 | size: [64, 32], 16 | channels: 3, 17 | mean: 110.57991536458333, 18 | }, 19 | test_function: (result, expected) => 20 | toBeCloseToNested( 21 | { 22 | size: result.size, 23 | channels: result.channels, 24 | mean: result.data.reduce((a, b) => a + b, 0) / result.data.length, 25 | }, 26 | expected, 27 | ), 28 | }, 29 | ], 30 | }; 31 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/image-to-text.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Image to Text", 5 | config: { 6 | task: "image-to-text", 7 | model_id: 8 | "hf-internal-testing/tiny-random-VisionEncoderDecoderModel-vit-gpt2", 9 | }, 10 | tests: [ 11 | { 12 | name: "Default", 13 | inputs: [DUMMY_IMAGE, { max_new_tokens: 5 }], 14 | expected: [{ generated_text: "ririririri" }], 15 | }, 16 | ], 17 | }; 18 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/object-detection.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Object Detection", 5 | config: { 6 | task: "object-detection", 7 | model_id: "onnx-internal-testing/tiny-random-YolosForObjectDetection-ONNX", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [DUMMY_IMAGE, { threshold: 0 }], 13 | expected: [], 14 | }, 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/question-answering.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Question Answering", 3 | config: { 4 | task: "question-answering", 5 | model_id: "hf-internal-testing/tiny-random-BertForQuestionAnswering", 6 | }, 7 | tests: [ 8 | { 9 | name: "Default", 10 | inputs: [ 11 | "a ".repeat(256), 12 | "b c ".repeat(256), 13 | { 14 | top_k: 1, 15 | }, 16 | ], 17 | expected: { 18 | score: 0.000020034284354665714, 19 | /* start: 0, end: 1, */ answer: 20 | "c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b c b", 21 | }, 22 | }, 23 | ], 24 | }; 25 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/summarization.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Summarization", 3 | config: { 4 | task: "summarization", 5 | model_id: "hf-internal-testing/tiny-random-T5ForConditionalGeneration", 6 | }, 7 | tests: [ 8 | { 9 | name: "Default", 10 | inputs: [ 11 | "a ".repeat(256), 12 | { 13 | max_new_tokens: 10, 14 | }, 15 | ], 16 | expected: [{ summary_text: "" }], 17 | }, 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/text-classification.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Text Classification", 3 | config: { 4 | task: "text-classification", 5 | model_id: "hf-internal-testing/tiny-random-BertForSequenceClassification", 6 | }, 7 | tests: [ 8 | { 9 | name: "Default", 10 | inputs: [ 11 | "a ".repeat(512), 12 | { 13 | top_k: 1, 14 | }, 15 | ], 16 | expected: [{ label: "LABEL_0", score: 0.5076301693916321 }], 17 | }, 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/text-generation.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Text Generation", 3 | config: { 4 | task: "text-generation", 5 | model_id: "hf-internal-testing/tiny-random-LlamaForCausalLM", 6 | }, 7 | tests: [ 8 | { 9 | name: "Default", 10 | inputs: [ 11 | "a ".repeat(256), 12 | { 13 | max_new_tokens: 10, 14 | return_full_text: false, 15 | }, 16 | ], 17 | expected: [ 18 | { 19 | generated_text: 20 | " note GET unixkunftassoc joskyabestanden________leitung", 21 | }, 22 | ], 23 | }, 24 | ], 25 | }; 26 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/text-to-audio.js: -------------------------------------------------------------------------------- 1 | import { toBeCloseToNested } from "../utils.js"; 2 | 3 | export default { 4 | name: "Text to Audio", 5 | config: { 6 | task: "text-to-audio", 7 | model_id: "Xenova/tiny-random-vits", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: ["hello ".repeat(32)], 13 | expected: { 14 | audio_length: 212480, 15 | mean: -0.0125, 16 | }, 17 | test_function: (result, expected) => 18 | toBeCloseToNested( 19 | { 20 | audio_length: result.audio.length, 21 | mean: result.audio.reduce((a, b) => a + b, 0) / result.audio.length, 22 | }, 23 | expected, 24 | 2, // The mean value is not deterministic, so we just check the first few digits 25 | ), 26 | }, 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/text2text-generation.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Text to Text Generation", 3 | config: { 4 | task: "text2text-generation", 5 | model_id: "hf-internal-testing/tiny-random-T5ForConditionalGeneration", 6 | }, 7 | tests: [ 8 | { 9 | name: "Default", 10 | inputs: [ 11 | "a ".repeat(256), 12 | { 13 | max_new_tokens: 10, 14 | }, 15 | ], 16 | expected: [{ generated_text: "" }], 17 | }, 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/token-classification.js: -------------------------------------------------------------------------------- 1 | const BATCH_SIZE = 256; 2 | 3 | export default { 4 | name: "Token Classification", 5 | config: { 6 | task: "token-classification", 7 | model_id: "hf-internal-testing/tiny-random-BertForTokenClassification", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [Array.from({ length: BATCH_SIZE }, () => "a b c d e")], 13 | expected: Array.from({ length: BATCH_SIZE }, () => [ 14 | { entity: "LABEL_0", score: 0.5395538210868835, index: 1, word: "a" }, 15 | { entity: "LABEL_0", score: 0.5303943753242493, index: 2, word: "b" }, 16 | { entity: "LABEL_0", score: 0.5155872106552124, index: 3, word: "c" }, 17 | { entity: "LABEL_0", score: 0.5232135653495789, index: 4, word: "d" }, 18 | { entity: "LABEL_0", score: 0.5132490992546082, index: 5, word: "e" }, 19 | ]), 20 | }, 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/translation.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: "Translation", 3 | config: { 4 | task: "translation", 5 | model_id: "Xenova/tiny-random-M2M100ForConditionalGeneration", 6 | }, 7 | tests: [ 8 | { 9 | name: "Default", 10 | inputs: [ 11 | "जीवन एक चॉकलेट बॉक्स की तरह है।", 12 | { 13 | src_lang: "hi", 14 | tgt_lang: "fr", 15 | max_new_tokens: 5, 16 | }, 17 | ], 18 | expected: [{ translation_text: "Slovenska төсли төсли төсли" }], 19 | }, 20 | ], 21 | }; 22 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/zero-shot-audio-classification.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_AUDIO } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Zero-shot Audio Classification", 5 | config: { 6 | task: "zero-shot-audio-classification", 7 | model_id: "hf-internal-testing/tiny-clap-htsat-unfused", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [ 13 | DUMMY_AUDIO, // audio 14 | ["cat", "dog"], // labels 15 | { 16 | hypothesis_template: "sound of a {}", // hypothesis template 17 | }, 18 | ], 19 | expected: [ 20 | { score: 0.49881038069725037, label: "cat" }, 21 | { score: 0.501189649105072, label: "dog" }, 22 | ], 23 | }, 24 | ], 25 | }; 26 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/zero-shot-image-classification.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Zero-shot Image Classification", 5 | config: { 6 | task: "zero-shot-image-classification", 7 | model_id: "hf-internal-testing/tiny-random-GroupViTModel", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [ 13 | DUMMY_IMAGE, // image 14 | ["cat", "dog"], // labels 15 | { 16 | hypothesis_template: "a photo of a {}", // hypothesis template 17 | }, 18 | ], 19 | expected: [ 20 | { score: 0.5883981585502625, label: "dog" }, 21 | { score: 0.41160184144973755, label: "cat" }, 22 | ], 23 | }, 24 | ], 25 | }; 26 | -------------------------------------------------------------------------------- /packages/core/src/pipelines/zero-shot-object-detection.js: -------------------------------------------------------------------------------- 1 | import { DUMMY_IMAGE } from "../inputs.js"; 2 | 3 | export default { 4 | name: "Zero-shot Object Detection", 5 | config: { 6 | task: "zero-shot-object-detection", 7 | model_id: "hf-internal-testing/tiny-random-OwlViTForObjectDetection", 8 | }, 9 | tests: [ 10 | { 11 | name: "Default", 12 | inputs: [ 13 | DUMMY_IMAGE, // image 14 | ["cat", "dog"], // labels 15 | { top_k: 3 }, 16 | ], 17 | expected: [ 18 | { 19 | box: { xmin: 54, ymin: 44, xmax: 69, ymax: 58 }, 20 | label: "cat", 21 | score: 0.6850778460502625, 22 | }, 23 | { 24 | box: { xmin: 204, ymin: 44, xmax: 218, ymax: 59 }, 25 | label: "cat", 26 | score: 0.6674455404281616, 27 | }, 28 | { 29 | box: { xmin: 140, ymin: 70, xmax: 154, ymax: 85 }, 30 | label: "cat", 31 | score: 0.6629524827003479, 32 | }, 33 | ], 34 | }, 35 | ], 36 | }; 37 | -------------------------------------------------------------------------------- /packages/core/src/suites.js: -------------------------------------------------------------------------------- 1 | import { pipeline } from "@huggingface/transformers"; 2 | 3 | import { computeStatistics, toBeCloseToNested, time } from "./utils.js"; 4 | import { DEFAULT_MODEL_OPTIONS } from "./defaults.js"; 5 | 6 | import { DEFAULT_NUM_RUNS, DEFAULT_NUM_WARMUP_RUNS, Test } from "./test.js"; 7 | 8 | import * as TASKS from "./tasks.js"; 9 | import * as MODELS from "./models.js"; 10 | 11 | class PipelineTest extends Test { 12 | constructor(data) { 13 | super(data); 14 | this.name = data.name; 15 | this.config = data.config; 16 | this.tests = data.tests; 17 | } 18 | 19 | async run() { 20 | const { task, model_id, options } = this.config; 21 | 22 | const { result: pipe, time: setupTime } = await time(() => 23 | pipeline(task, model_id, { 24 | ...DEFAULT_MODEL_OPTIONS, 25 | ...options, 26 | }), 27 | ); 28 | 29 | const stats = {}; 30 | for (const test of this.tests) { 31 | const { inputs, expected, test_function, num_runs } = test; 32 | 33 | const times = []; 34 | const numRuns = DEFAULT_NUM_WARMUP_RUNS + (num_runs ?? DEFAULT_NUM_RUNS); 35 | for (let i = 0; i < numRuns; ++i) { 36 | const { result, time: executionTime } = await time(() => 37 | pipe(...inputs), 38 | ); 39 | const { pass, message } = (test_function ?? toBeCloseToNested)( 40 | result, 41 | expected, 42 | ); 43 | if (!pass) { 44 | console.log(result); 45 | console.log(expected); 46 | throw new Error(message()); 47 | } 48 | if (i >= DEFAULT_NUM_WARMUP_RUNS) times.push(executionTime); 49 | } 50 | stats[test.name] = computeStatistics(times); 51 | } 52 | 53 | const { time: disposeTime } = await time(() => pipe.dispose()); 54 | 55 | return { 56 | setupTime, 57 | stats, 58 | disposeTime, 59 | }; 60 | } 61 | } 62 | 63 | class BaseTestSuite { 64 | constructor(config, options) { 65 | this.config = config; 66 | this.options = options; 67 | } 68 | 69 | async *run() { 70 | // NOTE: Perform one test at a time to ensure accurate timing 71 | for await (const test of this.collect()) { 72 | const result = await test.run().catch((error) => { 73 | console.error(error); 74 | return { error: error.message }; 75 | }); 76 | yield { name: test.name, result }; 77 | } 78 | } 79 | } 80 | 81 | /** 82 | * Test that the pipeline API operates correctly 83 | * This is the most common way of using Transformers.js 84 | */ 85 | export class PipelineTestSuite extends BaseTestSuite { 86 | constructor(options) { 87 | super(Object.values(TASKS), options); 88 | } 89 | 90 | *collect() { 91 | for (const task of this.config) { 92 | if (task.skip) continue; 93 | yield new PipelineTest({ 94 | ...task, 95 | config: { ...task.config, options: this.options }, 96 | }); 97 | } 98 | } 99 | } 100 | 101 | export class ModelTestSuite extends BaseTestSuite { 102 | constructor(options) { 103 | super(MODELS, options); 104 | } 105 | 106 | *collect() { 107 | for (const [model_type, tests] of Object.entries(this.config)) { 108 | for (const { name, test, config } of tests) { 109 | yield new test({ 110 | ...config, 111 | options: this.options, 112 | }); 113 | } 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /packages/core/src/tasks.js: -------------------------------------------------------------------------------- 1 | export { default as AUDIO_CLASSIFICATION } from "./pipelines/audio-classification.js"; 2 | export { default as AUTOMATIC_SPEECH_RECOGNITION } from "./pipelines/automatic-speech-recognition.js"; 3 | export { default as DEPTH_ESTIMATION } from "./pipelines/depth-estimation.js"; 4 | export { default as DOCUMENT_QUESTION_ANSWERING } from "./pipelines/document-question-answering.js"; 5 | export { default as FEATURE_EXTRACTION } from "./pipelines/feature-extraction.js"; 6 | export { default as FILL_MASK } from "./pipelines/fill-mask.js"; 7 | export { default as IMAGE_CLASSIFICATION } from "./pipelines/image-classification.js"; 8 | export { default as IMAGE_FEATURE_EXTRACTION } from "./pipelines/image-feature-extraction.js"; 9 | // TODO: export { default as IMAGE_SEGMENTATION } from "./pipelines/image-segmentation.js"; 10 | export { default as IMAGE_TO_IMAGE } from "./pipelines/image-to-image.js"; 11 | export { default as IMAGE_TO_TEXT } from "./pipelines/image-to-text.js"; 12 | export { default as OBJECT_DETECTION } from "./pipelines/object-detection.js"; 13 | export { default as QUESTION_ANSWERING } from "./pipelines/question-answering.js"; 14 | export { default as SUMMARIZATION } from "./pipelines/summarization.js"; 15 | export { default as TEXT2TEXT_GENERATION } from "./pipelines/text2text-generation.js"; 16 | export { default as TEXT_CLASSIFICATION } from "./pipelines/text-classification.js"; 17 | export { default as TEXT_GENERATION } from "./pipelines/text-generation.js"; 18 | export { default as TEXT_TO_AUDIO } from "./pipelines/text-to-audio.js"; 19 | export { default as TOKEN_CLASSIFICATION } from "./pipelines/token-classification.js"; 20 | export { default as TRANSLATION } from "./pipelines/translation.js"; 21 | // TODO: export { default as ZERO_SHOT_CLASSIFICATION } from "./pipelines/zero-shot-classification.js"; 22 | export { default as ZERO_SHOT_AUDIO_CLASSIFICATION } from "./pipelines/zero-shot-audio-classification.js"; 23 | export { default as ZERO_SHOT_IMAGE_CLASSIFICATION } from "./pipelines/zero-shot-image-classification.js"; 24 | export { default as ZERO_SHOT_OBJECT_DETECTION } from "./pipelines/zero-shot-object-detection.js"; 25 | -------------------------------------------------------------------------------- /packages/core/src/test.js: -------------------------------------------------------------------------------- 1 | export const DEFAULT_NUM_WARMUP_RUNS = 3; 2 | export const DEFAULT_NUM_RUNS = 50; 3 | 4 | export class Test { 5 | constructor(config) { 6 | this.config = config; 7 | } 8 | 9 | async run() { 10 | throw new Error("Not implemented"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/node/index.js: -------------------------------------------------------------------------------- 1 | import { ModelTestSuite, PipelineTestSuite } from "@benchmarking/core"; 2 | 3 | const SUITES = { 4 | ModelTestSuite, 5 | PipelineTestSuite, 6 | }; 7 | 8 | for (const [name, Suite] of Object.entries(SUITES)) { 9 | console.log("=".repeat(80)); 10 | console.log(`Running ${name}`); 11 | 12 | // Run tests 13 | const suite = new Suite(); 14 | for await (const { name, result } of suite.run()) { 15 | console.log(` - ${name}`); 16 | console.log(` - Setup time: ${result.setupTime} ms`); 17 | console.log(` - Dispose time: ${result.disposeTime} ms`); 18 | console.log(` - Stats:`); 19 | for (const [testName, stats] of Object.entries(result.stats)) { 20 | console.log(` - ${testName}`); 21 | console.log(` - Mean: ${stats.mean} ms`); 22 | console.log(` - Median: ${stats.median} ms`); 23 | console.log(` - Min: ${stats.min} ms`); 24 | console.log(` - Max: ${stats.max} ms`); 25 | console.log( 26 | ` - Percentiles: 1st=${stats.p1} ms, 5th=${stats.p5} ms, 10th=${stats.p10} ms, 90th=${stats.p90} ms, 95th=${stats.p95} ms, 99th=${stats.p99} ms`, 27 | ); 28 | console.log(` - Standard deviation: ${stats.stdDev} ms`); 29 | } 30 | } 31 | console.log("=".repeat(80)); 32 | } 33 | -------------------------------------------------------------------------------- /packages/node/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@benchmark-suite/node", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "@benchmark-suite/node", 9 | "version": "1.0.0", 10 | "dependencies": { 11 | "@benchmarking/core": "file:../core" 12 | } 13 | }, 14 | "../core": { 15 | "name": "@benchmarking/core", 16 | "version": "1.0.0", 17 | "dependencies": { 18 | "@huggingface/transformers": "^3.3.3" 19 | } 20 | }, 21 | "node_modules/@benchmarking/core": { 22 | "resolved": "../core", 23 | "link": true 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@benchmark-suite/node", 3 | "private": true, 4 | "version": "1.0.0", 5 | "type": "module", 6 | "main": "index.js", 7 | "scripts": { 8 | "benchmark": "node index.js" 9 | }, 10 | "dependencies": { 11 | "@benchmarking/core": "file:../core" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/web/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /packages/web/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from "@eslint/js"; 2 | import globals from "globals"; 3 | import react from "eslint-plugin-react"; 4 | import reactHooks from "eslint-plugin-react-hooks"; 5 | import reactRefresh from "eslint-plugin-react-refresh"; 6 | 7 | export default [ 8 | { ignores: ["dist"] }, 9 | { 10 | files: ["**/*.{js,jsx}"], 11 | languageOptions: { 12 | ecmaVersion: 2020, 13 | globals: globals.browser, 14 | parserOptions: { 15 | ecmaVersion: "latest", 16 | ecmaFeatures: { jsx: true }, 17 | sourceType: "module", 18 | }, 19 | }, 20 | settings: { react: { version: "18.3" } }, 21 | plugins: { 22 | react, 23 | "react-hooks": reactHooks, 24 | "react-refresh": reactRefresh, 25 | }, 26 | rules: { 27 | ...js.configs.recommended.rules, 28 | ...react.configs.recommended.rules, 29 | ...react.configs["jsx-runtime"].rules, 30 | ...reactHooks.configs.recommended.rules, 31 | "react/jsx-no-target-blank": "off", 32 | "react-refresh/only-export-components": [ 33 | "warn", 34 | { allowConstantExport: true }, 35 | ], 36 | }, 37 | }, 38 | ]; 39 | -------------------------------------------------------------------------------- /packages/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Transformers.js Benchmarking 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@benchmark-suite/web", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@benchmarking/core": "file:../core", 14 | "@tailwindcss/vite": "^4.0.6", 15 | "lucide-react": "^0.475.0", 16 | "react": "^19.0.0", 17 | "react-dom": "^19.0.0", 18 | "tailwindcss": "^4.0.6" 19 | }, 20 | "devDependencies": { 21 | "@eslint/js": "^9.19.0", 22 | "@types/react": "^19.0.8", 23 | "@types/react-dom": "^19.0.3", 24 | "@vitejs/plugin-react": "^4.3.4", 25 | "eslint": "^9.19.0", 26 | "eslint-plugin-react": "^7.37.4", 27 | "eslint-plugin-react-hooks": "^5.0.0", 28 | "eslint-plugin-react-refresh": "^0.4.18", 29 | "globals": "^15.14.0", 30 | "vite": "^6.1.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/web/src/index.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | -------------------------------------------------------------------------------- /packages/web/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import "./index.css"; 4 | import App from "./App.jsx"; 5 | 6 | createRoot(document.getElementById("root")).render( 7 | 8 | 9 | , 10 | ); 11 | -------------------------------------------------------------------------------- /packages/web/src/worker.js: -------------------------------------------------------------------------------- 1 | import { ModelTestSuite, PipelineTestSuite } from "@benchmarking/core"; 2 | 3 | const SUITES = { 4 | ModelTestSuite, 5 | PipelineTestSuite, 6 | }; 7 | 8 | self.addEventListener("message", async (event) => { 9 | const { command, suite, device } = event.data; 10 | if (command !== "start") return; 11 | 12 | console.log(`Starting test suite: ${suite} on device: ${device}`); 13 | 14 | const TestSuiteClass = SUITES[suite]; 15 | if (!TestSuiteClass) { 16 | console.error(`Unknown suite type: ${suite}`); 17 | return; 18 | } 19 | 20 | const cls = new TestSuiteClass({ device }); 21 | for await (const { name, result } of cls.run()) { 22 | self.postMessage({ status: "update", name, result }); 23 | } 24 | self.postMessage({ status: "complete" }); 25 | }); 26 | -------------------------------------------------------------------------------- /packages/web/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | import tailwindcss from "@tailwindcss/vite"; 4 | 5 | // https://vite.dev/config/ 6 | export default defineConfig({ 7 | plugins: [tailwindcss(), react()], 8 | }); 9 | -------------------------------------------------------------------------------- /scripts/requirements.txt: -------------------------------------------------------------------------------- 1 | onnx==1.17.0 2 | huggingface-hub==0.28.1 --------------------------------------------------------------------------------