Storymation-2-7b Fine-Tuned Model
This fine-tuned model, based on the LLAMA2 architecture, is specifically trained for story generation tasks. It has been fine-tuned on a diverse dataset comprising stories gathered from various open-source datasets, merged, and formatted to serve as direct input for LLAMA2 fine-tuning.
Model Details:
- Model Name: Fateemaa/Storymation-2-7b-chat-finetune
- Architecture: LLAMA2 (Large Language Model Augmented with Metadata for Generation)
- Fine-Tuning Data: Stories dataset gathered from multiple open-source datasets
Usage:
!pip install transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
# Define the model
model = "Fateemaa/Storymation-2-7b-chat-finetune"
# Define your prompt
prompt = "What is a large language model?"
# Initialize tokenizer and pipeline
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
# Generate sequences
sequences = pipeline(
f'<s>[INST] {prompt} [/INST]',
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=200,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
# Increase max_length for longer responses
sequences = pipeline(
f'<s>[INST] {prompt} [/INST]',
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=400,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
This model can be utilized for various story generation tasks, providing coherent and diverse story outputs based on the provided prompts. Adjust the prompt and other parameters as needed to tailor the generated stories to your specific requirements.