Downloads · 30 days
95
48% of all-time downloads
kabayan/enma-deberta-v3-japanese-large
enma-deberta-v3-japanese-large is a machine learning model from kabayan. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-sa-4.0.
https://huggingface.co/globis-university/deberta-v3-japanese-large
Downloads · 30 days
95
48% of all-time downloads
All-time downloads
199
Public
Parameters
111M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt885 MB · 67%
From the Hugging Face model README
https://huggingface.co/globis-university/deberta-v3-japanese-large
F1 specificity recall
総合 88.96 89.07 88.92
jsquad 97.02 95.46 98.42
jnli 78.04 96.89 75.29
jdolly 97.94 98.46 97.54
jaquad 95.58 93.07 98.03
jfldD1 79.28 80.96 75.94
jfldD3 78.13 74.03 77.9
学習用データセットは以下のものをベースにし、独自にnegativeデータを追加しています。
class NLIPredictor:
def __init__(self, model_name, model_path, device="cpu", max_length=2048):
device = "cuda"
self.device = torch.device(device)
self.max_length = max_length
self.model = AutoModelForSequenceClassification.from_pretrained(model_path).to(
self.device
)
self.model.eval()
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
def predict(self, premise, hypothesis):
inputs = self.tokenizer(
premise,
hypothesis,
return_tensors="pt",
max_length=self.max_length,
truncation=True,
padding=True,
)
inputs = {k: v.to(self.device) for k, v in inputs.items()}
with torch.no_grad():
outputs = self.model(**inputs)
logits = outputs.logits
probabilities = torch.softmax(logits, dim=1)
predicted_class = torch.argmax(probabilities, dim=1).item()
return predicted_class