Downloads · 30 days
18
0% of all-time downloads
hmthanh/VietnamLegalText-SBERT
VietnamLegalText-SBERT is a text classification model from hmthanh. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
1. Introduction 2. Using Vietnamese Legal Text BERT - Installation - Pre-trained models - Example usage
Downloads · 30 days
18
0% of all-time downloads
All-time downloads
7.8K
Public
Parameters
135M
1.1 GB on disk
Likes
2
Public
Click a slice to open those files.
.bin540 MB · 50%
How the weights are stored.
F32135M · 100%
From the Hugging Face model README
hmthanh/VietnamLegalText-SBERTtransformerstransformers with pip:pip install transformers<br />
tokenizers with pip:pip install tokenizers
| Model | #params | Arch. | Max length | Pre-training data |
|---|---|---|---|---|
hmthanh/VietnamLegalText-SBERT | 135M | base | 256 | 20GB of texts |
import torch
from transformers import AutoModel, AutoTokenizer
phobert = AutoModel.from_pretrained("hmthanh/VietnamLegalText-SBERT")
tokenizer = AutoTokenizer.from_pretrained("hmthanh/VietnamLegalText-SBERT")
sentence = 'Vượt đèn đỏ bị phạt bao nhiêu tiền?'
input_ids = torch.tensor([tokenizer.encode(sentence)])
with torch.no_grad():
features = phobert(input_ids) # Models outputs are now tuples