Instructions to use GeorgiaTech/scibert-generative-pubmedqa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GeorgiaTech/scibert-generative-pubmedqa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GeorgiaTech/scibert-generative-pubmedqa")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("GeorgiaTech/scibert-generative-pubmedqa") model = AutoModelForSeq2SeqLM.from_pretrained("GeorgiaTech/scibert-generative-pubmedqa") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GeorgiaTech/scibert-generative-pubmedqa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GeorgiaTech/scibert-generative-pubmedqa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GeorgiaTech/scibert-generative-pubmedqa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GeorgiaTech/scibert-generative-pubmedqa
- SGLang
How to use GeorgiaTech/scibert-generative-pubmedqa 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 "GeorgiaTech/scibert-generative-pubmedqa" \ --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": "GeorgiaTech/scibert-generative-pubmedqa", "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 "GeorgiaTech/scibert-generative-pubmedqa" \ --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": "GeorgiaTech/scibert-generative-pubmedqa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GeorgiaTech/scibert-generative-pubmedqa with Docker Model Runner:
docker model run hf.co/GeorgiaTech/scibert-generative-pubmedqa
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
datasets:
|
| 4 |
+
- qiaojin/PubMedQA
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
pipeline_tag: text2text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- medical
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
*Author - Hayden Beadles*
|
| 13 |
+
|
| 14 |
+
This model is meant to evaluate the results of creating an Encoder / Decoder generative model using SciBERT. The model is then finetuned on 30000 samples of the PubMedQA dataset. Instead of being finetuned
|
| 15 |
+
on the columns **question** and **final_answer**, where **final_answer** is a set of yes / no answers, we instead fine tune on the more challenging **long_answer** column, which gives a short answer
|
| 16 |
+
to the question.
|
| 17 |
+
|
| 18 |
+
The model was fine-tuned over 3 epochs, using the Adam learning rate scheduler, with a max length of 128 tokens.
|
| 19 |
+
|
| 20 |
+
The results are to help gauge SciBERT's abilities to answer (generate an answer) directly to a question, with no context provided. It is meant to evaluate the overall models training and attention towards
|
| 21 |
+
a more focused topic, to see if SciBERTs base training gives it any advantages.
|
| 22 |
+
|