New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3: custom pipelines #747
v3: custom pipelines #747
Conversation
Thanks! Are these methods present in the python version of the image feature extraction pipeline? If so, can you please link to the original documentation? If not, please note that we're trying to match the python API as closely as possible, and may make it difficult to merge the PR. |
I don't think there in an equivalent in Python transformers. Lines 5816 to 5821 in 880cd3e
However, I think it would be really handful to have those fonctions directly into the library transformers.js image feature extraction pipeline. It's used in hugging face spaces and in examples model code |
To not differ from the Python library, I will add the custom pipeline separetely, with register_pipeline. #684 |
* Add RawAudio class and 'save to wav' * Apply suggestions from code review Co-authored-by: Joshua Lochner <admin@xenova.com> * RawAudio toBlob() + save() rewrite * Add saveBlob in utils/core.js * RawAudio : Add support 2 channels + interleave * Fix * Fix * simplify type check * RawAudio : improve interleave + change env -> apis * image.js: change env -> apis * env.js remove changes --------- Co-authored-by: Joshua Lochner <admin@xenova.com>
* Add custom task `register_pipeline` * Change model_name in register_pipeline * add custom tasks to SUPPORTED_TASKS * models.js getModelClassFromName + refactor model mapping * models.js fix model mapping * Beautify code * Allow updating existing supported_tasks
* v3: wasmPaths relative path * Onnx InferenceSession logLevel * remove logLevel * set logLevel * Beautify code
* Add `ignore_merges` option to BPE tokenizers (xenova#716) * [version] Update to 2.17.1 * Use ungated version of mistral tokenizer (xenova#718) * Add mobilevitv2 (xenova#721) * Add support for MobileViTV2 * Update supported_models.py * Add support for `do_flip_channel_order` * Add unit test for `do_flip_channel_order=true` * docs: update vanilla-js.md (xenova#738) minor fix * Support reading data from blob URI (xenova#645) * Make blob as valid URL * Create function to detect the blob URI * Change to `isValidUrl` * Remove comment Co-authored-by: Joshua Lochner <admin@xenova.com> * Merge `isValidHttpUrl` into `isValidUrl` * Correct implement * Update docs * Add test * Remove export for `isValidUrl` * Test read blob via `getFile` * Use `res.text()` instead `res.body` --------- Co-authored-by: Joshua Lochner <admin@xenova.com> * Add aggregation_strategy + start end tokens * Beautify code * tokenizers return_offsets_mapping * QuestionAnswering start end char --------- Co-authored-by: Joshua Lochner <admin@xenova.com> Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com> Co-authored-by: Hans <me@hans00.me>
Add
get_text_embeddings
andget_similarities
methods toImageFeatureExtractionPipeline