BioGPT
BioGPT copied to clipboard
"data" is not found after executing the code on Github
Hello,
Could anybody please guide me that how I can run the standard BioGPT model by using the current below code?
import torch from fairseq.models.transformer_lm import TransformerLanguageModel m = TransformerLanguageModel.from_pretrained( "checkpoints/Pre-trained-BioGPT", "checkpoint.pt", "data", tokenizer='moses', bpe='fastbpe', bpe_codes="data/bpecodes", min_len=100, max_len_b=1024) m.cuda() src_tokens = m.encode("COVID-19 is") generate = m.generate([src_tokens], beam=5)[0] output = m.decode(generate[0]["tokens"]) print(output)
After running this, I always get the error that the data is not found. Not sure if I have to download the data from an external source separately or not.
Thanks
I am getting the same error
@thiptanawatp did you clone the repo itself? It contains the data.
@ahvdk I did both download in .ZIP file manually and git clone ... but the data didn't appear under the BioGPT/data folder except bpecodes and dict.txt. Any suggestion?
Thanks so much
Did you cd to the repo before you run your script, or at least add path of repo to PATH of python?