Downloads · 30 days
15
5% of all-time downloads
devshaheen/Llama-2-7b-chat-finetune
Llama-2-7b-chat-finetune is a text generation model from devshaheen. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of Llama-2-7B-Chat model, optimized for instruction-following tasks. It has been trained on the mlabonne/guanaco-llama2-1k dataset and is optimized for efficient text generation acro…
Downloads · 30 days
15
5% of all-time downloads
All-time downloads
330
Public
Parameters
6.7B
27 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 50%
How the weights are stored.
F166.7B · 100%
From the Hugging Face model README
This model is a fine-tuned version of Llama-2-7B-Chat model, optimized for instruction-following tasks. It has been trained on the mlabonne/guanaco-llama2-1k dataset and is optimized for efficient text generation across various NLP tasks, including question answering, summarization, and text completion.
You can use this fine-tuned model with the Hugging Face transformers library. Below is an example of how to load and use the model for text generation.
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load pre-trained model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("https://huggingface.co/devshaheen/llama-2-7b-chat-finetune")
model = AutoModelForCausalLM.from_pretrained("https://huggingface.co/devshaheen/llama-2-7b-chat-finetune")
# Example text generation
input_text = "What is the capital of France?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)