Views
No views yet
| Property | Value |
|---|---|
| Base Model | nlpaueb/legal-bert-base-uncased |
| Format | ONNX |
| Quantization | INT8 (dynamic quantization) |
| Embedding Dimension | 768 |
| Quantized by | JustEmbed |
model_quantized.onnx — INT8 quantized ONNX modeltokenizer.json — Fast tokenizervocab.txt — Vocabulary fileconfig.json — Model configuration1from justembed import Embedder
2
3embedder = Embedder("legalbert-int8")
4vectors = embedder.embed(["breach of fiduciary duty"])1import onnxruntime as ort
2from transformers import AutoTokenizer
3
4tokenizer = AutoTokenizer.from_pretrained(".")
5session = ort.InferenceSession("model_quantized.onnx")
6
7inputs = tokenizer("breach of fiduciary duty", return_tensors="np")
8outputs = session.run(None, dict(inputs))1@inproceedings{chalkidis2020legal,
2 title={LEGAL-BERT: The Muppets straight out of Law School},
3 author={Chalkidis, Ilias and Fergadiotis, Manos and Malakasiotis, Prodromos and Aletras, Nikolaos and Androutsopoulos, Ion},
4 booktitle={Findings of EMNLP},
5 year={2020}
6}