A small transformer text classifier trained from scratch and exported to OpenVINO IR (FP16) for fast CPU-only inference. No GPU needed.
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"))
openvino_model.xml / openvino_model.bin - OpenVINO IRvocab.json, config.json - tokenizer vocabulary, labels, settingstext_utils.py, inference.py - tokenizer and runtime wrapperSmall 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.