Edit model card
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

bert-base for KLUE Relation Extraction task.

Fine-tuned klue/bert-base using KLUE RE dataset.


Usage


from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("ainize/klue-bert-base-re")
model = AutoModelForSequenceClassification.from_pretrained("ainize/klue-bert-base-re")

# Add "<subj>", "</subj>" to both ends of the subject object and "<obj>", "</obj>" to both ends of the object object.
sentence = "<subj>์†ํฅ๋ฏผ</subj>์€ <obj>๋Œ€ํ•œ๋ฏผ๊ตญ</obj>์—์„œ ํƒœ์–ด๋‚ฌ๋‹ค."

encodings = tokenizer(sentence, 
                      max_length=128, 
                      truncation=True, 
                      padding="max_length", 
                      return_tensors="pt")

outputs = model(**encodings)

logits = outputs['logits']

preds = torch.argmax(logits, dim=1)

About us

  • Teachable NLP - Train NLP models with your own text without writing any code
  • Ainize - Deploy ML project using free gpu
Downloads last month
32
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.