Comments (6)
you need to install fastBPE with g++ compiler:
https://github.com/glample/fastBPE.git
probably fastBPE doesn't work on windows.
from biogpt.
@Husseinfadhel does fastBPE work with WSL ???
from biogpt.
fastBPE works fine under WSL/Ubuntu, but additional dependencies are either missing or need to be generated using other scripts. For example, data/BC5CDR/relis-bin doesn't exist in the repo and I'm not sure how to create it. It would be nice if the authors would provide instructions for building everything that's needed in order to successfully run the examples.
from biogpt.
I'm running Pycharm on Windows 10 using a conda environment configured under WSL/Ubuntu and this example from the BioGPT github page works fine for me. I haven't been able to run the second example though.
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)
from biogpt.
It looks like the relis-bin is the raw training data and may need to be regenerated via preprocess.sh which rebuilds the source data files from train/test/validate. I'm stuck on the FASTBPE/fast requirement (linux only I believe)
from biogpt.
Yes... it appears that fastBPE needs to run under Linux. My attempts to build it under Windows were not successful. My workaround was to install the Windows Subsystem for Linux (WSL) on my Windows 10 box and then create a BioGPT virtual environment on WSL/Ubuntu. All of the BioGPT dependencies are installed in that environment. I develop all of my python code on Windows, but run the code under WSL/Ubuntu by simply setting the virtual environment as my active python interpreter.
from biogpt.
Related Issues (20)
- BioGPT and NVIDIA Tesla K80
- Valid set and test set of HoC task
- Java code HOT 1
- PubMedQA Finetuning HOT 1
- Can't download models HOT 7
- Token classification is not working HOT 2
- Not able to access the pretrained models via the links. HOT 4
- Not able to get the right response for relation extraction task (DDI Drug Drug Interatcion)
- can't download the checkpoints now
- Drugbank entity replacement
- Downloading checkpoints error HOT 2
- Fine-tune for a Domain Text Generation
- Chat de grupo personal
- Example demo links on the main page do not work
- Cannot download pre trained model HOT 4
- AttributeError: module 'fastBPE' has no attribute 'fastBPE' HOT 1
- Demo's not working HOT 1
- Issue with Degrading Text Generation Quality in Fine-Tuning BioGPT
- Archive name 'data' was not found in archive name list HOT 1
- Cannot run drug-target interaction example.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biogpt.