OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Onnx Transformers

Onnx Transformers is a Python library that provides a Transformers-style pipeline interface for NLP inference using ONNX Runtime by default, with an option to use standard PyTorch inference. It supports sentiment analysis, question answering, feature extraction, named entity recognition and zero-shot classification, and can create and cache an ONNX graph on first use.

Independent OpenViST project profile, based on linked sources.

Onnx Transformers — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python workflow needs one of the supported Transformer NLP tasks through a pipeline interface, particularly when exploring ONNX Runtime inference or comparing it with the available PyTorch mode.

Who it is for

  • Python developers integrating Transformer NLP inference into scripts or applications.
  • Practitioners evaluating ONNX Runtime pipelines for CPU-based NLP tasks.

Documented uses

  • Classify text for sentiment or other supported text-classification tasks.
  • Extract an answer from a supplied context in response to a question.
  • Generate text feature representations or named-entity mappings.
  • Assign text to user-supplied categories with zero-shot classification.
Before you choose

Requirements & limits

The repository is public and identifies its license as Apache-2.0. Installation is documented through pip using the Git repository URL.

  • The model argument must be a string containing a path or URL.
  • The first use of a model creates and caches its ONNX graph; subsequent calls reuse the cache.
  • The README says the project is experimental and tested with PyTorch.
  • The README warns that ONNX performance can vary by hardware, reports slow performance in its Colab notebook, and describes its benchmarks as not comprehensive.
  • Zero-shot classification defaults to roberta-large-mnli; the README says BART was not yet tested with ONNX Runtime.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the library and initialize a sentiment pipeline

Set up the package and create an ONNX-backed sentiment-analysis pipeline.

Before you start

  • Python environment with pip
  • A model available by path or URL; the README also shows pipeline initialization without an explicit model argument

Steps

  1. Install from the project repository with pip using the documented Git URL.

  2. Import pipeline from onnx_transformers.

  3. Create a pipeline with the task name sentiment-analysis; ONNX is enabled by default.

  4. Provide text to the pipeline for sentiment classification.

Expected outcome

A pipeline configured to return sentiment-analysis output for supplied text.

Guide limitations

  • The project is described as experimental and tested with PyTorch.
  • The first call loads the model, creates an ONNX graph and caches it, so initial loading can take longer.
  • The repository cautions that performance depends on hardware and its benchmark results are not comprehensive.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
patil-suraj/onnx_transformers · Official homepage title · retained in its source language