Text Generation
Transformers
PyTorch
English
llama
llama-3
Mixtral
instruct
finetune
chatml
DPO
RLHF
gpt4
distillation
text-generation-inference
Instructions to use aaditya/Llama3-OpenBioLLM-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aaditya/Llama3-OpenBioLLM-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aaditya/Llama3-OpenBioLLM-8B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aaditya/Llama3-OpenBioLLM-8B") model = AutoModelForCausalLM.from_pretrained("aaditya/Llama3-OpenBioLLM-8B", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aaditya/Llama3-OpenBioLLM-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aaditya/Llama3-OpenBioLLM-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aaditya/Llama3-OpenBioLLM-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aaditya/Llama3-OpenBioLLM-8B
- SGLang
How to use aaditya/Llama3-OpenBioLLM-8B 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 "aaditya/Llama3-OpenBioLLM-8B" \ --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": "aaditya/Llama3-OpenBioLLM-8B", "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 "aaditya/Llama3-OpenBioLLM-8B" \ --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": "aaditya/Llama3-OpenBioLLM-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aaditya/Llama3-OpenBioLLM-8B with Docker Model Runner:
docker model run hf.co/aaditya/Llama3-OpenBioLLM-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -176,7 +176,7 @@ print(outputs[0]["generated_text"][len(prompt):])
|
|
| 176 |
- train_batch_size: 12
|
| 177 |
- eval_batch_size: 8
|
| 178 |
- GPU: H100 80GB SXM5
|
| 179 |
-
- num_devices:
|
| 180 |
- optimizer: adamw_bnb_8bit
|
| 181 |
- lr_scheduler_warmup_steps: 100
|
| 182 |
- num_epochs: 4
|
|
@@ -220,7 +220,7 @@ print(outputs[0]["generated_text"][len(prompt):])
|
|
| 220 |
|
| 221 |
# Benchmark Results
|
| 222 |
|
| 223 |
-
🔥 OpenBioMed-8B demonstrates superior performance compared to larger models, such as GPT-3.5, Gemini, Meditron-70B across 9 diverse biomedical datasets, achieving state-of-the-art results with an average score of
|
| 224 |
|
| 225 |
🚨 The GPT-4, Med-PaLM-1, and Med-PaLM-2 results are taken from their official papers. Since Med-PaLM doesn't provide zero-shot accuracy, we are using 5-shot accuracy from their paper for comparison. All results presented are in the zero-shot setting, except for Med-PaLM-2 and Med-PaLM-1, which use 5-shot accuracy.
|
| 226 |
|
|
|
|
| 176 |
- train_batch_size: 12
|
| 177 |
- eval_batch_size: 8
|
| 178 |
- GPU: H100 80GB SXM5
|
| 179 |
+
- num_devices: 1
|
| 180 |
- optimizer: adamw_bnb_8bit
|
| 181 |
- lr_scheduler_warmup_steps: 100
|
| 182 |
- num_epochs: 4
|
|
|
|
| 220 |
|
| 221 |
# Benchmark Results
|
| 222 |
|
| 223 |
+
🔥 OpenBioMed-8B demonstrates superior performance compared to larger models, such as GPT-3.5, Gemini, Meditron-70B across 9 diverse biomedical datasets, achieving state-of-the-art results with an average score of 72.50%, despite having a significantly smaller parameter count. The model's strong performance in domain-specific tasks, such as Clinical KG, Medical Genetics, and PubMedQA, highlights its ability to effectively capture and apply biomedical knowledge.
|
| 224 |
|
| 225 |
🚨 The GPT-4, Med-PaLM-1, and Med-PaLM-2 results are taken from their official papers. Since Med-PaLM doesn't provide zero-shot accuracy, we are using 5-shot accuracy from their paper for comparison. All results presented are in the zero-shot setting, except for Med-PaLM-2 and Med-PaLM-1, which use 5-shot accuracy.
|
| 226 |
|