Closed klys-equinix closed 4 years ago
This bug is unfortunate and will require some time to be fixed, because we need to update FARM first.
One solution would be to use a TransformersReader instead of FARMReader with:
reader = TransformersReader(
model="henryk/bert-base-multilingual-cased-finetuned-polish-squad2",
tokenizer="henryk/bert-base-multilingual-cased-finetuned-polish-squad2",
use_gpu=-1)
Thx for the reply. I have been playing around with the TransformerReader too, but in my experience FARMReader is more useful. Will wait for the fix. Also, I have been trying to use FARM directly by
model = LanguageModel.load("henryk/bert-base-multilingual-cased-finetuned-polish-squad2", language='polish')
nlp = Inferencer.load(model,
task_type='question_answering', gpu=True)
which obviously didn't work because one can't just pass model to Inferencer.load(). But the Inferencer.load() also does not provide an option to pass a language param so you could use the model without LanguageModel.load. Can you also update the Inferencer.load in FARM for that?
Hi, in the latest version of FARM that ValueError that you were getting is now just a warning. Could you install the latest version of Haystack (which in turn installs a later version of FARM) and try again?
Hi, just came back to project. As of now the problem no longer appears, so I am closing the issue
I am trying to use https://huggingface.co/henryk/bert-base-multilingual-cased-finetuned-polish-squad2 model in the FARMReader. The model is named rather unfortunately, as it's name contains both 'mutlilingual' and 'polish'. As a result, i get following error:
Please add an option to pass model language as arguments. Here is full stacktrace: