How to use from the
Use from the
Transformers library
# 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, AutoModelForMultimodalLM

tokenizer = AutoTokenizer.from_pretrained("abhiyanta/Llama-chatDoctor")
model = AutoModelForMultimodalLM.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]:]))
Quick Links

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
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for abhiyanta/Llama-chatDoctor

Finetuned
(1127)
this model
Quantizations
2 models