Downloads · 30 days
26
40% of all-time downloads
hello231/Llama-2-7b-chat-finetune
Llama-2-7b-chat-finetune is a text generation model from hello231. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is a fine-tuned version of Llama-2-7b-chat for conversational tasks using the Hugging Face Transformers library.
Downloads · 30 days
26
40% of all-time downloads
All-time downloads
65
Public
Repo size
27 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
This is a fine-tuned version of Llama-2-7b-chat for conversational tasks using the Hugging Face Transformers library.
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
# Load tokenizer and model from Hugging Face
tokenizer = AutoTokenizer.from_pretrained("hello231/Llama-2-7b-chat-finetune")
model = AutoModelForCausalLM.from_pretrained("hello231/Llama-2-7b-chat-finetune")
# Optional: Use pipeline for easy inference
chat = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map="auto")
# Prompt
prompt = "### Human: Who are you?\n### Assistant:"
# Generate response
response = chat(prompt, max_new_tokens=200, do_sample=True, temperature=0.7)[0]["generated_text"]
# Output
print(response)