Instructions to use gayanin/med_masked_pubmed_articles_biogpt_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gayanin/med_masked_pubmed_articles_biogpt_large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gayanin/med_masked_pubmed_articles_biogpt_large")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gayanin/med_masked_pubmed_articles_biogpt_large") model = AutoModelForCausalLM.from_pretrained("gayanin/med_masked_pubmed_articles_biogpt_large") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gayanin/med_masked_pubmed_articles_biogpt_large with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gayanin/med_masked_pubmed_articles_biogpt_large" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gayanin/med_masked_pubmed_articles_biogpt_large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gayanin/med_masked_pubmed_articles_biogpt_large
- SGLang
How to use gayanin/med_masked_pubmed_articles_biogpt_large 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 "gayanin/med_masked_pubmed_articles_biogpt_large" \ --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": "gayanin/med_masked_pubmed_articles_biogpt_large", "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 "gayanin/med_masked_pubmed_articles_biogpt_large" \ --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": "gayanin/med_masked_pubmed_articles_biogpt_large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gayanin/med_masked_pubmed_articles_biogpt_large with Docker Model Runner:
docker model run hf.co/gayanin/med_masked_pubmed_articles_biogpt_large
med_masked_pubmed_articles_biogpt_large
This model is a fine-tuned version of microsoft/BioGPT-Large-PubMedQA on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 3.2545
- Rouge2 Precision: 0.7011
- Rouge2 Recall: 0.6931
- Rouge2 Fmeasure: 0.6959
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 10
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Rouge2 Precision | Rouge2 Recall | Rouge2 Fmeasure |
|---|---|---|---|---|---|---|
| 3.0566 | 1.0 | 7914 | 3.0375 | 0.7013 | 0.6931 | 0.6959 |
| 2.911 | 2.0 | 15828 | 3.0228 | 0.7013 | 0.6931 | 0.6959 |
| 2.7386 | 3.0 | 23742 | 3.0594 | 0.7011 | 0.6931 | 0.6959 |
| 2.5718 | 4.0 | 31656 | 3.1371 | 0.7011 | 0.6931 | 0.6959 |
| 2.4573 | 5.0 | 39570 | 3.2545 | 0.7011 | 0.6931 | 0.6959 |
Framework versions
- Transformers 4.26.1
- Pytorch 1.13.1+cu116
- Datasets 2.9.0
- Tokenizers 0.13.2
- Downloads last month
- 4