Downloads · 30 days
81
6% of all-time downloads
RichardErkhov/sethuiyer_-_Llama3.2-3B-Anvita-Instruct-gguf
sethuiyer_-_Llama3.2-3B-Anvita-Instruct-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
81
6% of all-time downloads
All-time downloads
1.4K
Public
Repo size
42.5 GB
Likes
0
Public
Click a slice to open those files.
.gguf49.2 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Llama3.2-3B-Anvita-Instruct - GGUF
base_model:
This is a merge of pre-trained language models created using mergekit.
This model was merged using the DARE TIES merge method using chuanli11/Llama-3.2-3B-Instruct-uncensored as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
slices:
models:
- model: Joycean0301/Llama-3.2-3B-Instruct-Medical-Conversational
parameters:
weight: [0.25, 0.35, 0.45, 0.35, 0.25]
density: [0.1, 0.25, 0.5, 0.25, 0.1]
- model: chuanli11/Llama-3.2-3B-Instruct-uncensored
- model: ./anvita
parameters:
weight: [0.55, 0.45, 0.35, 0.45, 0.55]
density: [0.1, 0.25, 0.5, 0.25, 0.1]
merge_method: dare_ties
base_model: chuanli11/Llama-3.2-3B-Instruct-uncensored
parameters:
int8_mask: true
dtype: bfloat16
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained('./merge')
# Load the model (safetensors)
model = AutoModelForCausalLM.from_pretrained(
'sethuiyer/Llama3.2-3B-Anvita-Instruct',
torch_dtype=torch.bfloat16
)
model.to("cuda")
model.eval()
def generate_response(user_prompt):
input_ids = tokenizer(user_prompt, return_tensors="pt").input_ids
input_ids = input_ids.to("cuda")
# Generate response
with torch.no_grad(): # Disable gradient calculation for inference
output = model.generate(input_ids=input_ids, max_length=512) # Adjust max_length as needed
# Decode the generated output
response = tokenizer.decode(output[0], skip_special_tokens=True)
return response
# Example usage
user_prompt = "<|start_header_id|>user<|end_header_id|>What is large language models?<|eot_id|><|start_header_id|>assistant<|end_header_id|>"
response = generate_response(user_prompt)
response = response[response.index("assistant") + len("assistant"):]
print("Generated Response:")
print(response)
Additional thanks to @nicoboss for giving me access to his private supercomputer, enabling me to provide many more quants, at much higher speed, than I would otherwise be able to.