Instructions to use abhiyanta/Llama-chatDoctor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abhiyanta/Llama-chatDoctor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abhiyanta/Llama-chatDoctor") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abhiyanta/Llama-chatDoctor") model = AutoModelForCausalLM.from_pretrained("abhiyanta/Llama-chatDoctor") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use abhiyanta/Llama-chatDoctor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abhiyanta/Llama-chatDoctor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhiyanta/Llama-chatDoctor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abhiyanta/Llama-chatDoctor
- SGLang
How to use abhiyanta/Llama-chatDoctor 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 "abhiyanta/Llama-chatDoctor" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhiyanta/Llama-chatDoctor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "abhiyanta/Llama-chatDoctor" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abhiyanta/Llama-chatDoctor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abhiyanta/Llama-chatDoctor with Docker Model Runner:
docker model run hf.co/abhiyanta/Llama-chatDoctor
LLaMA 3 8B - ChatDoctor Model
Model Description
This is a fine-tuned version of the LLaMA 3 8B model. The model is fine-tuned on medical conversations to assist healthcare professionals and users in understanding medical-related queries. It’s designed for natural language understanding and generation, focusing on medical advice and diagnostics.
- Base Model: LLaMA 3 8B
- Fine-Tuned On: Medical QA dataset (or specify other datasets)
- Model Type: Causal Language Model (CLM)
Intended Use
This model is intended for generating conversational responses related to medical diagnostics, symptom analysis, or any medical-related inquiry. It is designed to assist in providing informative and preliminary medical guidance based on the fine-tuned datasets.
Use Cases:
- Medical chatbots.
- Healthcare consultation apps.
- Symptom analysis.
Limitations:
- Not a replacement for professional medical advice: The model is trained on limited datasets and should not be used as a standalone diagnostic tool.
- Language Bias: It may show biases based on the data it was trained on.
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the fine-tuned model and tokenizer
model = AutoModelForCausalLM.from_pretrained("abhiyanta/llama-chatdoctor")
tokenizer = AutoTokenizer.from_pretrained("abhiyanta/llama-chatdoctor")
- Downloads last month
- 3