Downloads · 30 days
5
2% of all-time downloads
alibidaran/llama-2-7b-virtual_doctor-gguf
llama-2-7b-virtual_doctor-gguf is a machine learning model from alibidaran. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
In order to use this model on the CPU, you need to install a few libraries.
Downloads · 30 days
5
2% of all-time downloads
All-time downloads
321
Public
Repo size
7.2 GB
Likes
1
Public
Click a slice to open those files.
.gguf7.2 GB · 100%
From the Hugging Face model README
In order to use this model on the CPU, you need to install a few libraries.
!pip install ctransformers
In the next step you can use this model in your project by using codes below:
from ctransformers import AutoModelForCausalLM
from transformers import AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("alibidaran/llama-2-7b-virtual_doctor-gguf",hf=True)
tokenizer = AutoTokenizer.from_pretrained("alibidaran/llama-2-7b-virtual_doctor")
prompt = " Hi doctor, I have nose running, I have fever, I often feel tired, what should i do?"
text=f"<s> ###Human: {prompt} ###Asistant: "
inputs=tokenizer(text,return_tensors='pt').to('cpu')
with torch.no_grad():
outputs=model.generate(**inputs,max_new_tokens=200,do_sample=True,top_p=0.92,top_k=10,temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))