Downloads · 30 days
0
atacod/merge_llama-3.1-8b
merge_llama-3.1-8b is a text generation model from atacod. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.1.
This model is a merged version of the base LLaMA 3.1 8B Instruct model with LoRA fine-tuning.
Downloads · 30 days
0
Access
Public
Updated Aug 8, 2025
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
This model is a merged version of the base LLaMA 3.1 8B Instruct model with LoRA fine-tuning.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "your-username/your-repo-name"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Example usage
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Your prompt here"}
]
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
)
outputs = model.generate(
input_ids,
max_new_tokens=256,
temperature=0.7,
top_p=0.9,
do_sample=True
)
response = tokenizer.decode(outputs[0][input_ids.shape[1]:], skip_special_tokens=True)
print(response)
This model was fine-tuned using LoRA (Low-Rank Adaptation) technique and then merged with the base model for easier deployment.
Please refer to the base model limitations and use responsibly.