Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
ruslanmv
trl
4-bit precision
bitsandbytes
Instructions to use ruslanmv/llama3-8B-medical with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ruslanmv/llama3-8B-medical with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ruslanmv/llama3-8B-medical")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ruslanmv/llama3-8B-medical") model = AutoModelForCausalLM.from_pretrained("ruslanmv/llama3-8B-medical") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ruslanmv/llama3-8B-medical with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ruslanmv/llama3-8B-medical" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ruslanmv/llama3-8B-medical", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ruslanmv/llama3-8B-medical
- SGLang
How to use ruslanmv/llama3-8B-medical 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 "ruslanmv/llama3-8B-medical" \ --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": "ruslanmv/llama3-8B-medical", "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 "ruslanmv/llama3-8B-medical" \ --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": "ruslanmv/llama3-8B-medical", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ruslanmv/llama3-8B-medical with Docker Model Runner:
docker model run hf.co/ruslanmv/llama3-8B-medical
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,24 +10,26 @@ tags:
|
|
| 10 |
base_model: meta-llama/Meta-Llama-3-8B
|
| 11 |
datasets:
|
| 12 |
- ruslanmv/ai-medical-chatbot
|
|
|
|
| 13 |
|
| 14 |
model-index:
|
| 15 |
-
- name: llama3-8B-medical
|
| 16 |
results: []
|
| 17 |
widget:
|
| 18 |
-
- example_title: llama3-8B-medical
|
| 19 |
messages:
|
| 20 |
- role: system
|
| 21 |
-
content: >-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
- role: user
|
| 26 |
content: I'm a 35-year-old male experiencing symptoms like fatigue, increased sensitivity to cold, and dry, itchy skin. Could these be indicative of hypothyroidism?
|
| 27 |
output:
|
| 28 |
-
text: >-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
---
|
| 32 |
|
| 33 |
# Medical-Llama3-8B-4bit: Fine-Tuned Llama3 for Medical Q&A
|
|
|
|
| 10 |
base_model: meta-llama/Meta-Llama-3-8B
|
| 11 |
datasets:
|
| 12 |
- ruslanmv/ai-medical-chatbot
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
|
| 15 |
model-index:
|
| 16 |
+
- name: llama3-8B-medical
|
| 17 |
results: []
|
| 18 |
widget:
|
| 19 |
+
- example_title: llama3-8B-medical
|
| 20 |
messages:
|
| 21 |
- role: system
|
| 22 |
+
content: >-
|
| 23 |
+
You are an AI Medical Chatbot Assistant, providing comprehensive and informative responses to your inquiries.
|
| 24 |
+
If a question does not make any sense, or is not factually coherent, explain why instead of answering something incorrect.
|
| 25 |
+
If you don't know the answer to a question, please don't share false information.
|
| 26 |
+
|
| 27 |
- role: user
|
| 28 |
content: I'm a 35-year-old male experiencing symptoms like fatigue, increased sensitivity to cold, and dry, itchy skin. Could these be indicative of hypothyroidism?
|
| 29 |
output:
|
| 30 |
+
text: >-
|
| 31 |
+
Yes, it is possible. Hypothyroidism can present symptoms like increased sensitivity to cold, dry skin, and fatigue. These symptoms are characteristic of hypothyroidism.
|
| 32 |
+
I recommend consulting with a healthcare provider.
|
| 33 |
---
|
| 34 |
|
| 35 |
# Medical-Llama3-8B-4bit: Fine-Tuned Llama3 for Medical Q&A
|