2.17.2
版本发布时间: 2024-05-29 22:36:30
xenova/transformers.js最新发布版本:2.17.2(2024-05-29 22:36:30)
🚀 What's new?
-
Add support for MobileViTv2 in https://github.com/xenova/transformers.js/pull/721
import { pipeline } from '@xenova/transformers'; // Create an image classification pipeline const classifier = await pipeline('image-classification', 'Xenova/mobilevitv2-1.0-imagenet1k-256', { quantized: false, }); // Classify an image const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg'; const output = await classifier(url); // [{ label: 'tiger, Panthera tigris', score: 0.6491137742996216 }]
See here for the full list of supported models.
-
Add support for FastViT in https://github.com/xenova/transformers.js/pull/749
import { pipeline } from '@xenova/transformers'; // Create an image classification pipeline const classifier = await pipeline('image-classification', 'Xenova/fastvit_t12.apple_in1k', { quantized: false }); // Classify an image const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg'; const output = await classifier(url, { topk: 5 }); // [ // { label: 'tiger, Panthera tigris', score: 0.6649345755577087 }, // { label: 'tiger cat', score: 0.12454754114151001 }, // { label: 'lynx, catamount', score: 0.0010689536575227976 }, // { label: 'dhole, Cuon alpinus', score: 0.0010422508930787444 }, // { label: 'silky terrier, Sydney silky', score: 0.0009548701345920563 } // ]
See here for the full list of supported models.
-
Optimize FFT in https://github.com/xenova/transformers.js/pull/766
-
Auto rotate image by @KTibow in https://github.com/xenova/transformers.js/pull/737
-
Support reading data from blob URI by @hans00 in https://github.com/xenova/transformers.js/pull/645
-
Add sequence post processor in https://github.com/xenova/transformers.js/pull/771
-
Add model file name by @NawarA in https://github.com/xenova/transformers.js/pull/594
-
Update pipelines.js to allow for
token_embeddings
as well by @NikhilVerma in https://github.com/xenova/transformers.js/pull/770 -
Remove old import from
stream/web
forReadableStream
in https://github.com/xenova/transformers.js/pull/752 -
Update tokenizer playground by @xenova in https://github.com/xenova/transformers.js/pull/717
-
Use ungated version of mistral tokenizer by @xenova in https://github.com/xenova/transformers.js/pull/718
-
docs: update vanilla-js.md by @eltociear in https://github.com/xenova/transformers.js/pull/738
-
Fix CI by in https://github.com/xenova/transformers.js/pull/768
-
Update Next.js demos to 14.2.3 in https://github.com/xenova/transformers.js/pull/772
🤗 New contributors
- @eltociear made their first contribution in https://github.com/xenova/transformers.js/pull/738
- @KTibow made their first contribution in https://github.com/xenova/transformers.js/pull/737
- @NawarA made their first contribution in https://github.com/xenova/transformers.js/pull/594
- @NikhilVerma made their first contribution in https://github.com/xenova/transformers.js/pull/770
Full Changelog: https://github.com/xenova/transformers.js/compare/2.17.1...2.17.2