Using the model in a fill-mask task

#2
by rdecoupes - opened

Thank you for providing this model !

I was trying to use it in a fill-mask task to assess its Geographical Knowledge :

from transformers import AutoTokenizer, 
from transformers import pipeline

fill_mask = pipeline(task="fill-mask", model='zekun-li/geolm-base-cased')
fill_mask("London is the capital of [MASK]")

But predictions are not very good

[{'score': 0.0032326707150787115,
  'token': 9699,
  'token_str': '##vre',
  'sequence': 'London is the capital ofvre'},
 {'score': 0.0028155348263680935,
  'token': 16387,
  'token_str': 'Win',
  'sequence': 'London is the capital of Win'},
 {'score': 0.0013959930511191487,
  'token': 25352,
  'token_str': '##tras',
  'sequence': 'London is the capital oftras'},
 {'score': 0.0013793088728561997,
  'token': 21932,
  'token_str': '##gro',
  'sequence': 'London is the capital ofgro'},
 {'score': 0.0013577097561210394,
  'token': 23508,
  'token_str': '##oit',
  'sequence': 'London is the capital ofoit'}]

Do I have, somehow, to provide geocoordinates ?

Thank for your help

Sign up or log in to comment