Downloads · 30 days
9
3% of all-time downloads
Khushiee/llama-3.1-8b-instruct-gguf
llama-3.1-8b-instruct-gguf is a text generation model from Khushiee. Use it when you need the model to write or continue text. The card lists the license as llama3.1.
This repository contains an optimized GGUF quantized version of Llama 3.1 8B Instruct for fast inference with llama.cpp.
Downloads · 30 days
9
3% of all-time downloads
All-time downloads
295
Public
Repo size
4.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf4.9 GB · 100%
From the Hugging Face model README
This repository contains an optimized GGUF quantized version of Llama 3.1 8B Instruct for fast inference with llama.cpp.
# Download the model
huggingface-cli download Khushiee/llama-3.1-8b-instruct-gguf Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf --local-dir ./models
# Run inference
./llama-cli -m ./models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf -p "Hello, how are you?"
pip install llama-cpp-python
from llama_cpp import Llama
# Load model
llm = Llama(
model_path="./models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf",
n_ctx=4096, # Context window
n_threads=8, # CPU threads
n_gpu_layers=35 # Use GPU if available (0 for CPU only)
)
# Generate text
output = llm(
"Write a short poem about AI:",
max_tokens=256,
temperature=0.7
)
print(output['choices'][0]['text'])
from langchain_community.llms import LlamaCpp
llm = LlamaCpp(
model_path="./models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf",
n_ctx=4096,
n_threads=8,
temperature=0.1
)
response = llm.invoke("What is machine learning?")
print(response)
n_gpu_layers=0n_gpu_layers=35 or higher for all layersn_batch to 512 or 1024n_threads to your CPU core countThis is a quantized version optimized for:
This model follows the original Llama 3.1 license from Meta.