akdeniz27/bert-base-turkish-cased-ner-quantized
By akdeniz27 · ↓ 13 · ♥ 1 · Updated 2022-12-23
What's in this repo
This page lists the files in akdeniz27/bert-base-turkish-cased-ner-quantized, including model_quantized.onnx.
- 1 ONNX models (.onnx files)
- 10 files, including 5 .json, 1 .md, 1 .onnx, 1 .model, 1 .txt
- Last updated 2022-12-23
ONNX files
| File | Size | Download |
|---|---|---|
| model_quantized.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
Turkish Named Entity Recognition (NER) Quantized Model
This model is the dynamically quantized version of the model (https://akdeniz27/bert-base-turkish-cased-ner)
How to use:
# First install "optimum[onnxruntime]":
!pip install "optimum[onnxruntime]"
# and import "ORTModelForTokenClassification":
from transformers import AutoTokenizer, pipeline
from optimum.onnxruntime import ORTModelForTokenClassification
model = ORTModelForTokenClassification.from_pretrained("akdeniz27/bert-base-turkish-cased-ner-quantized", file_name="model_quantized.onnx")
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/bert-base-turkish-cased-ner-quantized")
ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="first")
ner("your text here")
Pls refer (https://github.com/akdeniz27/dynamic_quantization) for details of quantization.
Model info
token-classification
transformers
transformers
onnx
bert
token-classification
tr
license:mit
endpoints_compatible
region:us
↓ 13
♥ 1
Created: 2022-11-20
Updated: 2022-12-23
View on Hugging FaceFiles (10)
.gitattributes
README.md
config.json
model_quantized.onnx
ONNX
ort_config.json
sentencepiece.bpe.model
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt