Legal-BERT Base Uncased (Safetensors)

This is a safetensors serialization of the model nlpaueb/legal-bert-base-uncased. It is functionally identical to the original, but uses the safetensors format for:

  • Faster and safer loading
  • Avoiding pickle security issues
  • Compatibility with Hugging Face’s recommended serialization format

Model Details

  • Base model: nlpaueb/legal-bert-base-uncased
  • Architecture: BERT (encoder-only, uncased)
  • License: CC-BY-SA-4.0 (see LICENSE)
  • Author of original model: NLP at AUEB group
  • Conversion: Converted to safetensors using transformers with safe_serialization=True.

Usage

from transformers import AutoTokenizer, AutoModel

repo\_id = "your-username/legal-bert-base-uncased-safetensors"

tokenizer = AutoTokenizer.from\_pretrained(repo\_id)
model = AutoModel.from\_pretrained(repo\_id)

inputs = tokenizer("The court finds the defendant guilty.", return\_tensors="pt")
outputs = model(\*\*inputs)

The outputs are identical to the PyTorch .bin version of the model.


Citation

@article{chalkidis2020legal,
title={LEGAL-BERT: The Muppets straight out of Law School},
author={Chalkidis, Ilias and Fergadiotis, Manos and Malakasiotis, Prodromos and Aletras, Nikolaos and Androutsopoulos, Ion},
journal={arXiv preprint arXiv:2010.02559},
year={2020}
}

License

This model is distributed under the Creative Commons Attribution-ShareAlike 4.0 International License, in accordance with the license of the original legal-bert-base-uncased model.

Downloads last month
2
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for ggomarr/legal-bert-base-uncased-safetensors