Instructions to use icosha/klar-spam-demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use icosha/klar-spam-demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="icosha/klar-spam-demo")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("icosha/klar-spam-demo") model = AutoModelForSequenceClassification.from_pretrained("icosha/klar-spam-demo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Klar Spam Demo (toy model)
A deliberately small, deliberately weak spam classifier, published only so the open-source Klar milter builds and runs out-of-the-box without the commercial model.
This is not a usable spam filter. It is a 4-layer XLM-RoBERTa distilled from Klar's production classifier purely to demonstrate the engine's end-to-end pipeline (encode β 4-label head β decision). Binary spam accuracy is ~0.79 on a held-out split; the production model is far better and is licensed separately.
Labels
0=gibberish 1=marketing 2=regular 3=spam
The engine treats anything that is not regular as spam-ish.
Use
# inside the open-source engine repo:
make import-demo MODEL=icosha/klar-spam-demo
make build
./engine/build/spam_classifier ./engine/model
Licence
Proprietary β Klar Model License (LICENSE), the same licence as Klar's
production model. You may download and use this toy model for evaluation and to
run the engine demo; production use, redistribution, and derivatives require a
commercial agreement (hello@klar.im). The engine code is separately AGPLv3.
- Downloads last month
- 8