Transformers.js
Transformers.js is a Javascript implementation of the Python library transformers, which was developed by HuggingFace. Transformers.js uses ONNX Runtime to run pre-trained AI models with JavaScript. Basically, ONNX Runtime performs better on edge or low-end devices with its ONNX models compared to PyTorch, TensorFlow, and other similar frameworks. ONNX Runtime will be introduced in detail in another post. For now, we will focus on implementing a Transformers.js demo instead of diving deep into the background.
Common tasks supported by Transformers.js:
- Natural Language Processing: text classification, named entity recognition, question answering, language modelling, summarization, translation, multiple choice, and text generation.
- Computer Vision: image classification, object detection, segmentation, and depth estimation.
- Audio: automatic speech recognition, audio classification, and text-to-speech.
- Multimodal: embeddings, zero-shot audio classification, zero-shot image classification, and zero-shot object detection
Continue reading Build a speech transcription demo with OpenAI’s Whisper model in-browser using Transformers.js