Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text classification

byte-sized-brain-distilbert-imdb

by Vardh Jain vardhjain20/byte-sized-brain-distilbert-imdb

byte-sized-brain-distilbert-imdb is an open-weight model for text classification from Vardh Jain, released under MIT License. It has 512-token context. Its published files total 336.3 MB. It draws 5 downloads a month.

Two ONNX versions of one DistilBERT model that reads an English movie review and says whether it is positive or negative.

Parameters—
Context512
Weights335.4 MB
Licensemit
AccessOpen weights
Monthly Downloads5

Model Card

By Vardh Jain, published under mit, revision 49836559daf3.

Two ONNX versions of one DistilBERT model that reads an English movie review and says whether it is positive or negative. They were made by Byte-Sized Brain, a project that measures what quantization does to the size, accuracy, speed and memory of neural networks. - distilbertimdbfp32.onnx is the full-precision model, fine-tuned on 3,000 IMDB reviews. - distilbertimdbint8.onnx is the same model after ONNX Runtime dynamic INT8 quantization, which stores the weights as 8-bit numbers. Try both side by side in the hosted demo. The model reads at most 128 tokens. Label 0 is negative and label 1 is positive. Both inputs must be int64, which the tokenizer does not guarantee on every platform.

Read Vardh Jain's full model card

DistilBERT movie-review sentiment, FP32 and INT8 ONNX

Two ONNX versions of one DistilBERT model that reads an English movie review and says whether it is positive or negative. They were made by Byte-Sized Brain, a project that measures what quantization does to the size, accuracy, speed and memory of neural networks.

  • distilbert_imdb_fp32.onnx is the full-precision model, fine-tuned on 3,000 IMDB reviews.
  • distilbert_imdb_int8.onnx is the same model after ONNX Runtime dynamic INT8 quantization, which stores the weights as 8-bit numbers.

Try both side by side in the hosted demo.

Benchmark (500 IMDB test reviews, CPU)

File Size Accuracy Mean time per review
distilbert_imdb_fp32.onnx 255.5 MB 84.6% 99 ms
distilbert_imdb_int8.onnx 64.3 MB 84.0% 55 ms

Use it

The model reads at most 128 tokens. Label 0 is negative and label 1 is positive. Both inputs must be int64, which the tokenizer does not guarantee on every platform.

import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer

repo = "vardhjain20/byte-sized-brain-distilbert-imdb"
tokenizer = AutoTokenizer.from_pretrained(repo)
session = ort.InferenceSession(hf_hub_download(repo, "distilbert_imdb_int8.onnx"))
enc = tokenizer("A moving, beautifully acted film.", truncation=True, max_length=128,
                return_tensors="np")
feed = {name: enc[name].astype(np.int64) for name in ("input_ids", "attention_mask")}
logits = session.run(None, feed)[0]
print(["negative", "positive"][int(np.argmax(logits))])

Configuration

Architecture
DistilBertForSequenceClassification
Context length (tokens)
512
Vocabulary size
30,522
Model type
distilbert

Identity and Version

Repository
vardhjain20/byte-sized-brain-distilbert-imdb
Publisher
Vardh Jain
Task
Text classification
Modality
Text
Library
Not stated by the source
Parameters
Not stated by the source
Languages
en
Revision
49836559daf3c9dabf20fb3fc1dca7822ed35df8
First published
2026-06-23
Last updated
2026-10-05

Files and Weights

9 files, 336.3 MB in total. The weights are 2 files totalling 335.4 MB in onnx.

Weights2 files · 335.4 MB
Configuration2 files · 719 B
Tokenizer3 files · 944.2 KB
Documentation1 file · 2.0 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
distilbert_imdb_fp32.onnxWeights268.0 MB e04244da5557
distilbert_imdb_int8.onnxWeights67.4 MB 8dc1f2a70e06
config.jsonConfiguration587 B —
special_tokens_map.jsonConfiguration132 B —
README.mdDocumentation2.0 KB —
.gitattributesRepository1.5 KB —
tokenizer.jsonTokenizer711.4 KB —
tokenizer_config.jsonTokenizer1.3 KB —
vocab.txtTokenizer231.5 KB —

License and Download

License
mit
Access
Open weights, no gate
Download size
335.4 MB
Download from Vardh Jain

Released by Vardh Jain through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published335.4 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About byte-sized-brain-distilbert-imdb

Can I use byte-sized-brain-distilbert-imdb commercially?

Yes. byte-sized-brain-distilbert-imdb is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is byte-sized-brain-distilbert-imdb's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text classification

twitter-roberta-base-sentiment-latest

Cardiff NLP

This is a RoBERTa-base model trained on ~124M tweets from January 2018 to December 2021, and finetuned for sentiment analysis with the TweetEval benchmark. The original Twitter-based RoBERTa model can be found here and the original reference paper is TweetEval. This model is suitable for English. 0 -> Negative; 1 -> Neutral; 2 -> Positive This sentiment analysis model has been integrated into TweetNLP. You can access the demo here.

Open weights cc-by-4.0 514 tokens transformers

Model · Text classification

finbert-tone

Yi

FinBERT is a BERT model pre-trained on financial communication text. The purpose is to enhance financial NLP research and practice. It is trained on the following three financial communication corpus. The total corpora size is 4.9B tokens. More technical details on FinBERT: Click Link This released finbert-tone model is the FinBERT model fine-tuned on 10,000 manually annotated (positive, negative, neutral) sentences from analyst reports. This model achieves superior performance on financial tone analysis task. If you are simply interested in using FinBERT for financial tone analysis, give it a try. If you use the model in your academic work, please cite the following paper: Huang, Allen H.…

Open weights 512 tokens transformers

Model · Text classification

ms-marco-MiniLM-L-6-v2

Joshua

https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-6-v2 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights 512 tokens transformers.js

Model · Text classification

twitter-xlm-roberta-base-sentiment

Cardiff NLP

This is a multilingual XLM-roBERTa-base model trained on ~198M tweets and finetuned for sentiment analysis. The sentiment fine-tuning was done on 8 languages (Ar, En, Fr, De, Hi, It, Sp, Pt) but it can be used for more languages (see paper for details). This model has been integrated into the TweetNLP library.

Open weights 514 tokens transformers

Model · Text classification

unbiased-toxic-roberta

Unitary

The huggingface models currently give different results to the detoxify library (see issue here). For the most up to date models we recommend using the models from https://github.com/unitaryai/detoxify Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification. Built by Laura Hanu at Unitary, where we are working to stop harmful content online by interpreting visual content in context. Score not directly comparable since it is obtained on the validation set provided and not on the test set. To update when the test labels are made available. It is also noteworthy to mention…

Open weights apache-2.0 514 tokens transformers

Model · Text classification

emotion-english-distilroberta-base

Hartmann

With this model, you can classify emotions in English text data. The model was trained on 6 diverse datasets (see Appendix below) and predicts Ekman's 6 basic emotions, plus a neutral class: 1) anger 2) disgust 3) fear 4) joy 5) neutral 6) sadness 7) surprise The model is a fine-tuned checkpoint of DistilRoBERTa-base. For a 'non-distilled' emotion model, please refer to the model card of the RoBERTa-large version. a) Run emotion model with 3 lines of code on single text example using Hugging Face's pipeline command on Google Colab: b) Run emotion model on multiple examples and full datasets (e.g.,.csv files) on Google Colab: Please reach out to [email protected] if you have any…

Open weights 514 tokens transformers