jpwahle's picture
update model card
0763962
|
raw
history blame
No virus
2.13 kB
metadata
language: ISO 639-1 code for your language, or `multilingual`
thumbnail: url to a thumbnail used in social sharing
tags:
  - array
  - of
  - tags
license: any valid license identifier
datasets:
  - array of dataset identifiers
metrics:
  - array of metric identifiers
widget:
  - text: >-
      question: which description describes the word " java " best in the
      following context? descriptions: [  " A drink consisting of an infusion of
      ground coffee beans " ,  " a platform-independent programming lanugage "
      ,  or " an island in Indonesia to the south of Borneo " ]  context: I like
      to drink ' java ' in the morning .

T5-large for Word Sense Disambiguation

This is the checkpoint for T5-large after being trained on the SemCor 3.0 dataset.

Additional information about this model:

The model can be loaded to perform a few-shot classification like so:

from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

AutoModelForSeq2SeqLM.from_pretrained("jpelhaw/t5-word-sense-disambiguation")
AutoTokenizer.from_pretrained("jpelhaw/t5-word-sense-disambiguation")

input = 'question: which description describes the word " peculiarities " best in the following context? \
  descriptions: [  " an odd or unusual characteristic " ,  " a distinguishing trait " ,  or " something unusual -- perhaps worthy of collecting " ] \
  context: The art of change-ringing is peculiar to the English , and , like most English \' peculiarities \'  , unintelligible to the rest of the world .'


example = tokenizer.tokenize(input, add_special_tokens=True)

answer = model.generate(input_ids=example['input_ids'], 
                                attention_mask=example['attention_mask'], 
                                max_length=135)
                                
# "a distinguishing trait"