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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/biogpt") model = AutoModelForCausalLM.from_pretrained("microsoft/biogpt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Commit History
-
First-pass at putting current summary in Model Card format
This takes the writing that was already here and organizes it into the Model Card protocol. Still more work to do, but it makes information about the model more easily findable.dee4e58
-
Update README.md
eb0d815 -
Update README.md
ba48acd -
Fix architectures
8663af4
-
Update README.md (#3)
- Update README.md (248b4eb430f3f90fa6ed37048ad75b50d774e1ee) Co-authored-by: Kamal Raj Kanakarajan <kamalkraj@users.noreply.huggingface.co>ef3fc6f
-
updated citation cmt
73440ec -
updated model card examples
7be807d -
updated model card
2c5ef04 -
model key changes
723c5ce
-
Update config.json
65f02c7
-
model
d1412a1 -
Create config.json
ce3fe54 -
Upload vocab.json
d38b8d9
-
Upload vocab.json
f065e28
-
Upload merges.txt
7a90c9e -
Upload 2 files
6e524bc -
Delete bpt_vocab.json
8032810 -
Delete biogpt_merges.txt
1989dc2 -
Upload 2 files
9bc24cb -
initial commit
edc0707