Downloads · 30 days
75
5% of all-time downloads
wambugu71/SwahiliInstruct-v0.1-GGUF
SwahiliInstruct-v0.1-GGUF is a machine learning model from wambugu71. 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 mit.
This repo contains models from LLM SwahiliInstruct-v0.1 in GGUF format in quantization: - q3km - q4km - q5km
Downloads · 30 days
75
5% of all-time downloads
All-time downloads
1.6K
Public
Repo size
13 GB
Likes
1
Public
Click a slice to open those files.
.gguf13 GB · 100%
From the Hugging Face model README
This repo contains models from LLM SwahiliInstruct-v0.1 in GGUF format in quantization:
| Name | Quant method | Bits | Size | Max RAM required | Use case |
|---|---|---|---|---|---|
| swahiliinstruct-v0.1.Q3_K_M.gguf | Q3_K_M | 3 | 3.52 GB | 6.02 GB | very small, high quality loss |
| swahiliinstruct-v0.1.Q4_K_M.gguf | Q4_K_M | 4 | 4.37 GB | 6.87 GB | medium, balanced quality - recommended |
| swahiliinstruct-v0.1.Q5_K_M.gguf | Q5_K_M | 5 | 5.13 GB | 7.63 GB | large, very low quality loss - recommended |
#loading the models on cpu
pip install llama_cpp_python
import llama_cpp
model = llama_cpp.Llama(model_path="swahiliinstruct-v0.1.Q4_K_M.gguf",n_ctx=4096,n_threads=0,n_gpu_layers=-1,verbose=True, chat_format="chatml-function-calling")
def model_out(prompt):
outp = model.create_chat_completion(
messages=[{"role": "system", "content": "You are a human like assistant."},{
"role": "user",
"content": f"{prompt}"
}] ,stream=True,temperature=0.4, max_tokens=4096)
return outp
while True:
prompt = input("\nUser:\n")
for i in model_out(prompt):
try:
print(i['choices'][0][ 'delta']['role'])
except:
try:
print(i['choices'][0][ 'delta']['content'],end="")
except:
pass