Downloads · 30 days
16
20% of all-time downloads
pszemraj/gibberish_detector_onnx-quant-avx2
gibberish_detector_onnx-quant-avx2 is a text classification model from pszemraj. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
the one with -pc suffix means perchannel=True
Downloads · 30 days
16
20% of all-time downloads
All-time downloads
79
Public
Repo size
67.6 MB
Likes
0
Public
Click a slice to open those files.
.onnx67.6 MB · 99%
From the Hugging Face model README
# pip install 'optimum[onnxruntime,exporters]'
from optimum.pipelines import pipeline
classifier = pipeline(
"text-classification",
model="pszemraj/gibberish_detector_onnx-quant-avx2",
accelerator="ort",
)
classifier("ayy waddup")
# [{'label': 'noise', 'score': 0.38642483949661255}]
the one with -pc suffix means per_channel=True
>>> src = 'quant_onnx_gibberish_detector' # avx2
>>> classifier = pipeline('text-classification', model=src, accelerator='ort')
>>> classifier('ayy waddup')
[{'label': 'noise', 'score': 0.34829846024513245}]
>>> src = 'quant_onnx_gibberish_detector-pc' # avx2 per channel (this model)
>>> classifier = pipeline('text-classification', model=src, accelerator='ort')
>>> classifier('ayy waddup')
[{'label': 'noise', 'score': 0.38642483949661255}]
>>> src = 'onnx_gibberish_detector' # unquantized onnx
>>> classifier = pipeline('text-classification', model=src, accelerator='ort')
>>> classifier('ayy waddup')
[{'label': 'noise', 'score': 0.6847617626190186}]