Downloads · 30 days
7
13% of all-time downloads
Fateemaa/Storymation-2-7b-chat-finetune
Storymation-2-7b-chat-finetune is a text generation model from Fateemaa. Use it when you need the model to write or continue text. It is set up for transformers.
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, m…
Downloads · 30 days
7
13% of all-time downloads
All-time downloads
54
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 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.
!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.