Views
No views yet

Pre-built tokie tokenizer included (tokenizer.tkz). 5x faster tokenization, drop-in replacement for HuggingFace tokenizers.
precision recall f1-score support
0 0.70 0.42 0.52 5694
1 0.75 0.86 0.80 26512
2 0.55 0.51 0.53 10322
3 0.54 0.45 0.49 3407
4 0.59 0.30 0.40 807
5 0.00 0.00 0.00 1
accuracy 0.69 46743
macro avg 0.52 0.42 0.46 46743
weighted avg 0.68 0.69 0.68 467430.79. The original classifier achieves 0.81 on the same dataset, but this classifier is orders of magnitude faster on CPU. precision recall f1-score support
not edu 0.96 0.98 0.97 42528
edu 0.70 0.54 0.61 4215
accuracy 0.94 46743
macro avg 0.83 0.76 0.79 46743
weighted avg 0.93 0.94 0.93 46743pip install model2vec[inference]from_pretrained method:1from model2vec.inference import StaticModelPipeline
2
3# Load a pretrained Model2Vec model
4model = StaticModelPipeline.from_pretrained("minishlab/potion-8m-edu-classifier")
5
6# Predict labels
7label = model.predict(["Example sentence"])@software{minishlab2024model2vec,
authors = {Stephan Tulkens, Thomas van Dongen},
title = {Model2Vec: Turn any Sentence Transformer into a Small Fast Model},
year = {2024},
url = {https://github.com/MinishLab/model2vec},
}