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
Training in progress, epoch 1
Browse files- .gitignore +1 -0
- config.json +27 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- runs/Feb20_01-21-14_1a8386358ae3/1676856085.1856484/events.out.tfevents.1676856085.1a8386358ae3.3533.1 +3 -0
- runs/Feb20_01-21-14_1a8386358ae3/events.out.tfevents.1676856085.1a8386358ae3.3533.0 +3 -0
- runs/Feb20_01-26-17_1a8386358ae3/1676856383.400506/events.out.tfevents.1676856383.1a8386358ae3.5348.1 +3 -0
- runs/Feb20_01-26-17_1a8386358ae3/events.out.tfevents.1676856383.1a8386358ae3.5348.0 +3 -0
- special_tokens_map.json +7 -0
- tokenizer_config.json +11 -0
- training_args.bin +3 -0
- vocab.json +0 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
checkpoint-*/
|
config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "microsoft/BioGPT-Large-PubMedQA",
|
| 3 |
+
"activation_dropout": 0.0,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"BioGptForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_probs_dropout_prob": 0.1,
|
| 8 |
+
"bos_token_id": 0,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "gelu",
|
| 11 |
+
"hidden_dropout_prob": 0.1,
|
| 12 |
+
"hidden_size": 1600,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 6400,
|
| 15 |
+
"layer_norm_eps": 1e-12,
|
| 16 |
+
"layerdrop": 0.0,
|
| 17 |
+
"max_position_embeddings": 2048,
|
| 18 |
+
"model_type": "biogpt",
|
| 19 |
+
"num_attention_heads": 25,
|
| 20 |
+
"num_hidden_layers": 48,
|
| 21 |
+
"pad_token_id": 1,
|
| 22 |
+
"scale_embedding": true,
|
| 23 |
+
"torch_dtype": "float32",
|
| 24 |
+
"transformers_version": "4.26.1",
|
| 25 |
+
"use_cache": true,
|
| 26 |
+
"vocab_size": 57726
|
| 27 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55b20adc86a916b05231fa73e33c97a403d1582ff7efa063b0f109b89f869402
|
| 3 |
+
size 6285072877
|
runs/Feb20_01-21-14_1a8386358ae3/1676856085.1856484/events.out.tfevents.1676856085.1a8386358ae3.3533.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd24803b5e69119cba3860bf30d6eb8d3096b6c3ed5535b0209d8e023bb8ab70
|
| 3 |
+
size 5999
|
runs/Feb20_01-21-14_1a8386358ae3/events.out.tfevents.1676856085.1a8386358ae3.3533.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5ccf9b3c4ca370a6ed35ff33a74689990dca9f376541580edb76c149d2477cf
|
| 3 |
+
size 4059
|
runs/Feb20_01-26-17_1a8386358ae3/1676856383.400506/events.out.tfevents.1676856383.1a8386358ae3.5348.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9568e636818d89d4bcd3329c21706808b27b0bf83422afe0b544aa351f70542
|
| 3 |
+
size 5999
|
runs/Feb20_01-26-17_1a8386358ae3/events.out.tfevents.1676856383.1a8386358ae3.5348.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6fbb14fa183a5ee05efde835fd7b2cb774df30da1c562bce2027d2626767098
|
| 3 |
+
size 6861
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"pad_token": "<pad>",
|
| 5 |
+
"sep_token": "</s>",
|
| 6 |
+
"unk_token": "<unk>"
|
| 7 |
+
}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"model_max_length": 1024,
|
| 5 |
+
"name_or_path": "microsoft/BioGPT-Large-PubMedQA",
|
| 6 |
+
"pad_token": "<pad>",
|
| 7 |
+
"sep_token": "</s>",
|
| 8 |
+
"special_tokens_map_file": null,
|
| 9 |
+
"tokenizer_class": "BioGptTokenizer",
|
| 10 |
+
"unk_token": "<unk>"
|
| 11 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c088de1dc709a8ff2e604202b5fe0060fe28a95020cf4fd7a72325b4a740edd
|
| 3 |
+
size 3707
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|