Downloads · 30 days
8
21% of all-time downloads
banhchungtuongot/aki-clinical-text-encoder
aki-clinical-text-encoder is a machine learning model from banhchungtuongot. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Continued pretraining of manhtt-079/vipubmed-deberta-base on Vietnamese perioperative clinical notes for the AKI prediction task.
Downloads · 30 days
8
21% of all-time downloads
All-time downloads
39
Public
Parameters
184M
735 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors735 MB · 99%
From the Hugging Face model README
Continued pretraining of manhtt-079/vipubmed-deberta-base on Vietnamese perioperative clinical notes for the AKI prediction task.
manhtt-079/vipubmed-deberta-baseTrained with 25 clinical-field special tokens (e.g. [FIELD=LYDOVAOVIEN], [FIELD=BENHCHINH], [FIELD=CONTENT]).
from transformers import AutoModel, AutoTokenizer
import torch
tokenizer = AutoTokenizer.from_pretrained('banhchungtuongot/aki-clinical-text-encoder', trust_remote_code=True)
model = AutoModel.from_pretrained('banhchungtuongot/aki-clinical-text-encoder', trust_remote_code=True).eval()
enc = tokenizer(['[FIELD=BENHCHINH] phẫu thuật tim'], return_tensors='pt', truncation=True)
with torch.no_grad():
out = model(**enc)
mask = enc['attention_mask'].unsqueeze(-1).float()
embedding = (out.last_hidden_state * mask).sum(1) / mask.sum(1)