Instructions to use microsoft/biogpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/biogpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/biogpt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/biogpt") model = AutoModelForCausalLM.from_pretrained("microsoft/biogpt") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use microsoft/biogpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/biogpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/biogpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/microsoft/biogpt
- SGLang
How to use microsoft/biogpt with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "microsoft/biogpt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/biogpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "microsoft/biogpt" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/biogpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use microsoft/biogpt with Docker Model Runner:
docker model run hf.co/microsoft/biogpt
Request: DOI
#29 opened 10 months ago
by
ehsan00
Create requirements.txt
#28 opened about 1 year ago
by
capgalea
Some errors occurred using inference endpoints
#27 opened almost 2 years ago
by
HEMPHARMA
Adds missing tokenizer configuration file
#26 opened about 2 years ago
by
lysandre
How can we run this using MLX?
#25 opened over 2 years ago
by
shrijayan
How to use biogpt for end-to-end relationship extraction tasks?
#24 opened over 2 years ago
by
Q93972530
How to fintuned this pretrainded model on my dataset?
#23 opened over 2 years ago
by
zxboy
bioGPT generates a period only for some words
#22 opened almost 3 years ago
by
TaniyaHaghighi
Unable to fine-tune biogpt for ner task
#21 opened almost 3 years ago
by
tekeshwarhirwani
How do I use biogpt?
1
#20 opened about 3 years ago
by
dmaret
Use BioGptModel to get features
2
#19 opened about 3 years ago
by
pete88b
Adding `safetensors` variant of this model
#17 opened about 3 years ago
by
SFconvertbot
BioGPT , word embeddings generation
#16 opened about 3 years ago
by
ali-issa
10.3389/fimmu.2021.794580
#15 opened about 3 years ago
by
KotaRO12111
Does bioGPT support NER ?
3
#14 opened about 3 years ago
by
bear007
Unable to convert BioGpt slow tokenizer to fast: token out of vocabulary
2
#13 opened about 3 years ago
by
Seantaud
First-pass at putting current summary in Model Card format
❤️ 1
#12 opened about 3 years ago
by
meg
Update README.md
#10 opened about 3 years ago
by
Blks
Add arxiv link
#9 opened over 3 years ago
by
kadirnar