* ONNX Runtime improvements (experimental native webgpu; fix iOS) (#1231)
* customize the wasm paths
* update implementation
* allow using 'webgpu' in nodejs binding
* update version of onnxruntime-node
* Upgrade onnxruntime-web to same version as onnxruntime-node
* Update list of supported devices
---------
Co-authored-by: Joshua Lochner <26504141+xenova@users.noreply.github.com>
* customize the wasm paths (#1250)
* customize the wasm paths
* update implementation
* [internal] Add is_decoder option to session retrieval for preferred output location
* Update tests
* Formatting
* Bump ort versions
* Bump onnxruntime-node version
* Bump versions
* Bump ORT versions
* Bump versions
* Only check webgpu fp16 for non-node environments
* Fix
* Assume node supports webgpu
* Update ORT node support comment
* Relax test strictness
* Update conversion script versions
* Downgrade onnxslim
* cleanup
* Update package-lock.json
* Update onnxruntime versions
* Update post-build script
* Use built-in session release function
* Call garbage collection after each tokenizer test
* Do not double-throw error
* Fix race-condition in build process with file removal
* Update versions
* Bump jinja version
* [version] Update to 3.6.3
* Bump jinja version to support new features
* [version] Update to 3.6.3
* Add support for LFM2 models (#1367)
* Use prefix in lfm2 output location (#1369)
* Update package-lock.json
* Run `npm audit fix`
* Add special tokens in text-generation pipeline if tokenizer requires (#1370)
* Add special tokens in text-generation pipeline if tokenizer requires
* Fix logits processors tests
* Update bundles.test.js
* Update comment
* Formatting
* Add support for ModernBERT Decoder (#1371)
* Use from/to buffer instead of string
Actually fixes https://github.com/huggingface/transformers.js/issues/1343
* Add support for Voxtral (#1373)
* Support longform voxtral processing (#1375)
* [version] Update to 3.7.0
* Add support for Arcee (#1377)
* Optimize tensor.slice() (#1381)
* Optimize tensor.slice()
The performance of executing `tensor.slice()` is super poor, especially for
the 'logits' tensor with large dimensions.
```
const logits = outputs.logits.slice(null, -1, null);`
```
This is because currently implementation of the `slice` method manually iterates
through each element and calculate indices which is a big time consuming if
the tensor shape is large.
For cases like `slice(null, -1, null)`, where the slicing operation is
contiguous along certain dimensions, which can be optimized by bulk copy
by using `TypeArray.subarray()` and `TypeArray.set()`.
* nit
* Add a few more tensor slice unit tests
---------
Co-authored-by: Joshua Lochner <26504141+xenova@users.noreply.github.com>
---------
Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com>
Co-authored-by: Wanming Lin <wanming.lin@intel.com>
* Update conversion script versions
* Use custom float16 converter script
* Add MIT license header
* Use relative import
* Fix transformers to stable 4.48.x branch
* Add strictness check when saving model
* Create new output nodes after casts
* Use onnxslim after fp16 conversion
* Prevent in-place modification while iterating (infinite loops)
* Finalize fp16 quantization script
* Only warn if alignment heads can't be found
* [WIP] Add support for idefics3 (SmolVLM)
* Cleanup
* Update `DataTypeMap` with 4-bit data types
* Format the model inputs before logging to console
* Use QUInt8 when quantizing models produced by onnxruntime-genai
* `auto` dtype selection
* Export `load_image` helper function
* Add listed support for Idefics3
* Add support for batched 2d images in idefics3 processor
* Update unit tests
* Add another unit test to ensure correctness of pixel attention mask placement
* Move image tokens out of call function
* Formatting
* Improve auto selection logic
* Return correct pixel_attention_mask
* Update pixel_attention_mask unit test
* Formatting
* Add idefics3 unit tests
* Increase idefics processor unit test timeout
* Extract processor classes into separate folders
* Fix typo
* Define which classes use `processor_config.json`
* [WIP] Add support for `deepseek-ai/Janus-1.3B`
* Fix unit tests
* Remove redundant `extends` JSDoc
* Fix JSDoc
* Update Janus JSDoc
* Improve `VLChatProcessor` processor types
* Expose ImageFeatureExtractor as copy of ImageProcessor
* Add support for `LLaVA-OneVision`
* Add support for ViTPose
* Add ViTPose to README
* Bump dependencies
* Add support for `MGP-STR` models
* Documentation fixes
* Add support for `Qwen2VLImageProcessor`
* Format tests folder
* Use `AutoImageProcessor` for image processors
* Add support for `Qwen2VLProcessor`
* Fix `image_grid_thw` dtype
* Fix bigint product
* [WIP] Support for qwen2vl models
* Add support for JinaCLIP models
* Add listed support for Janus
* Fix qwen2vl processor unit test
* Update dependency versions
* Export logits processors
* Expose batch_decode for processor
* Qwen2VL - Implement `get_rope_index`
* Add `Qwen2VLForConditionalGeneration` unit tests
* Update dependencies
* Update `onnxslim==0.1.42`
* `tokenizer.default_chat_template` has been removed
* Add listed support for Qwen2-VL
* Fix `.from_pretrained` function type