Downloads · 30 days
6
9% of all-time downloads
Tapan101/Llama-2-7b-Medical-chat-finetune
Llama-2-7b-Medical-chat-finetune is a text generation model from Tapan101. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
6
9% of all-time downloads
All-time downloads
65
Public
Repo size
27 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
How to run the model ?
model = AutoModelForCausalLM.from_pretrained( "Tapan101/Llama-2-7b-Medical-chat-finetune" )
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) tokenizer.pad_token = tokenizer.eos_token tokenizer.padding_side = "right" # Fix weird overflow issue with fp16 training
import logging from transformers import pipeline
logging.getLogger("transformers.generation_utils").setLevel(logging.ERROR)
prompt = "What is dance therapy ?" #How does dysmenorrhea is diagnosised through allopathic pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200) result = pipe(f"<s>[INST] {prompt} [/INST]") generated_text = result[0] print(generated_text)