tiny-news-classifier-openvino

A small transformer text classifier trained from scratch and exported to OpenVINO IR (FP16) for fast CPU-only inference. No GPU needed.

  • Labels: World, Sports, Business, Sci/Tech
  • Parameters: 4.06M
  • Test accuracy: 0.8767
  • Max input length: 128 tokens (simple word-level tokenizer included)

Usage

pip install openvino huggingface_hub numpy
import sys
from huggingface_hub import snapshot_download

path = snapshot_download("unnicr/tiny-news-classifier-openvino")
sys.path.insert(0, path)
from inference import Classifier

clf = Classifier(path)            # device="CPU" by default; "GPU"/"NPU" on Intel hardware
print(clf("Stocks rallied after the central bank cut rates"))

Files

  • openvino_model.xml / openvino_model.bin - OpenVINO IR
  • vocab.json, config.json - tokenizer vocabulary, labels, settings
  • text_utils.py, inference.py - tokenizer and runtime wrapper

Limitations

Small model with a word-level tokenizer: it can't handle words it never saw in training and works best on short English text similar to its training data.

Downloads last month
37
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train unnicr/tiny-news-classifier-openvino