Downloads · 30 days
5
11% of all-time downloads
np-n/meditron-7b_Q3_K_M.gguf
meditron-7b_Q3_K_M.gguf is a machine learning model from np-n. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model the 3-bit quantized version of the Meditron-7b.Please follow the following instruction to run the model on your device:
Downloads · 30 days
5
11% of all-time downloads
All-time downloads
44
Public
Repo size
3.3 GB
Likes
0
Public
Click a slice to open those files.
.gguf3.3 GB · 100%
From the Hugging Face model README
This model the 3-bit quantized version of the Meditron-7b.Please follow the following instruction to run the model on your device:
There are multiple ways to infer the model. Firstly, let's install llama.cpp and use it for the inference
git clone https://github.com/ggerganov/llama.cpp
!mkdir llama.cpp/build && cd llama.cpp/build && cmake .. && cmake --build . --config Release
./llama.cpp/build/bin/llama-cli -m ./meditron-7b_Q3_K_M.gguf -cnv -p "You are a helpful assistant"
Here, you can interact with model from your terminal.
Alternatively, we can use python binding of the llama.cpp to run the model on both CPU and GPU.
pip install --no-cache-dir llama-cpp-python==0.2.85 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu122
from llama_cpp import Llama
model_path = "./meditron-7b_Q3_K_M.gguf"
llm = Llama(model_path=model_path, n_threads=8, verbose=False)
prompt = "What should I do when my eyes are dry?"
output = llm(
prompt=f"<|user|>\n{prompt}<|end|>\n<|assistant|>",
max_tokens=4096,
stop=["<|end|>"],
echo=False, # Whether to echo the prompt
)
print(output)
from llama_cpp import Llama
model_path = "./meditron-7b_Q3_K_M.gguf"
llm = Llama(model_path=model_path, n_threads=8, n_gpu_layers=-1, verbose=False)
prompt = "What should I do when my eyes are dry?"
output = llm(
prompt=f"<|user|>\n{prompt}<|end|>\n<|assistant|>",
max_tokens=4096,
stop=["<|end|>"],
echo=False, # Whether to echo the prompt
)
print(output)