Llama-2-7b-Chat-Finetune

This is a fine-tuned version of the LLaMA-2-7b model. It has been fine-tuned on persona-based data to generate human-like conversational responses.

Model Description

The model is based on the LLaMA 2 architecture and has been fine-tuned for conversational tasks, specifically targeting persona-based interactions.

Intended Use

This model is designed to generate human-like text responses in a conversational context. It can be used for chatbot systems, virtual assistants, or other AI-based interaction applications.

Model Details

  • Architecture: LLaMA 2 7B
  • Pretraining Data: The original model was pretrained on a large corpus of text data.
  • Fine-tuning Data: This model was fine-tuned on persona-based conversational data.

Library

  • Framework: PyTorch
  • Model: LLaMA-2
  • Fine-Tuned with: LoRA (Low-Rank Adaptation)

Example Usage

You can use this model via the Hugging Face transformers library. To use the fine-tuned model for text generation based on a persona, follow these steps:

from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer

# Load the fine-tuned model and tokenizer
model_name = "rudrajadon18/Llama-2-7b-chat-finetune"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Define the persona and prompt
prompt = "<persona_b>I love traveling, reading romance novels, and trying new cuisines. I have a deep passion for animals and enjoy volunteering at shelters. I enjoy hiking in the mountains and spending time at the beach. I am a carnivore who loves sharing my experiences with friends over a good meal.</persona_b><s>[INST] \n What do you think about animals? \n</INST>"

# Generate response for the prompt
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
result = pipe(f"<s>[INST] {prompt} [/INST]")

# Print the generated text
print("Response: \n")
print(result[0]['generated_text'])
Downloads last month
37
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the model is not deployed on the HF Inference API.

Datasets used to train rudrajadon18/Llama-2-7b-chat-finetune