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
|
@@ -222,7 +222,7 @@ print(outputs[0]["generated_text"][len(prompt):])
|
|
| 222 |
|
| 223 |
| | Clinical KG | Medical Genetics | Anatomy | Pro Medicine | College Biology | College Medicine | MedQA 4 opts | PubMedQA | MedMCQA | Avg |
|
| 224 |
|--------------------|-------------|------------------|---------|--------------|-----------------|------------------|--------------|----------|---------|-------|
|
| 225 |
-
| **OpenBioLLM-70B** | **92.93** | **93.197** | **83.904** |
|
| 226 |
| Med-PaLM-2 | 88.3 | 90 | 77.8 | **95.2** | 94.4 | 80.9 | **79.7** | **79.2** | 71.3 | 84.08 |
|
| 227 |
| **GPT-4** | 86.04 | 91 | 80 | 93.01 | **95.14** | 76.88 | 78.87 | 75.2 | 69.52 | 82.85 |
|
| 228 |
| Med-PaLM-1 (Flan-PaLM) | 80.4 | 75 | 63.7 | 83.8 | 88.9 | 76.3 | 67.6 | 79 | 57.6 | 74.7 |
|
|
@@ -238,8 +238,9 @@ print(outputs[0]["generated_text"][len(prompt):])
|
|
| 238 |
| AlpaCare-llama2-7b | 49.81 | 49 | 45.92 | 33.82 | 50 | 43.35 | 29.77 | 72.2 | 34.42 | 45.36 |
|
| 239 |
| ClinicalGPT | 30.56 | 27 | 30.37 | 19.48 | 25 | 24.27 | 26.08 | 63.8 | 28.18 | 30.52 |
|
| 240 |
|
| 241 |
-
|
| 242 |
-
|
|
|
|
| 243 |
|
| 244 |
## Detailed Medical Subjectwise accuracy
|
| 245 |
|
|
|
|
| 222 |
|
| 223 |
| | Clinical KG | Medical Genetics | Anatomy | Pro Medicine | College Biology | College Medicine | MedQA 4 opts | PubMedQA | MedMCQA | Avg |
|
| 224 |
|--------------------|-------------|------------------|---------|--------------|-----------------|------------------|--------------|----------|---------|-------|
|
| 225 |
+
| **OpenBioLLM-70B** | **92.93** | **93.197** | **83.904** | 93.75 | **93.827** | **85.749** | 78.162 | 78.97 | **74.014** | **86.05588** |
|
| 226 |
| Med-PaLM-2 | 88.3 | 90 | 77.8 | **95.2** | 94.4 | 80.9 | **79.7** | **79.2** | 71.3 | 84.08 |
|
| 227 |
| **GPT-4** | 86.04 | 91 | 80 | 93.01 | **95.14** | 76.88 | 78.87 | 75.2 | 69.52 | 82.85 |
|
| 228 |
| Med-PaLM-1 (Flan-PaLM) | 80.4 | 75 | 63.7 | 83.8 | 88.9 | 76.3 | 67.6 | 79 | 57.6 | 74.7 |
|
|
|
|
| 238 |
| AlpaCare-llama2-7b | 49.81 | 49 | 45.92 | 33.82 | 50 | 43.35 | 29.77 | 72.2 | 34.42 | 45.36 |
|
| 239 |
| ClinicalGPT | 30.56 | 27 | 30.37 | 19.48 | 25 | 24.27 | 26.08 | 63.8 | 28.18 | 30.52 |
|
| 240 |
|
| 241 |
+
<div align="center">
|
| 242 |
+
<img width="1600px" src="https://cdn-uploads.huggingface.co/production/uploads/5f3fe13d79c1ba4c353d0c19/_SzdcJSBjZyo8RS1bTEkP.png">
|
| 243 |
+
</div>
|
| 244 |
|
| 245 |
## Detailed Medical Subjectwise accuracy
|
| 246 |
|