Mistral-7B Storytelling Model (Fine-tuned on Alpaca)
Model Name: StoryTeller
Author: Joel Jaison
License: MIT
Language: English
Framework: PyTorch
Model Type: Causal Language Model
Base Model: Mistral-7B
π Model Description
This model is a fine-tuned version of Mistral-7B, optimized for generating engaging and contextually relevant fictional stories based on real-life incidents. It has been trained using an Alpaca-style instruction dataset to enhance its ability to generate coherent, structured, and immersive narratives. The model is designed for applications such as interactive storytelling, memory recall for elderly users, and creative writing assistance.
π Training Details
- Dataset: Fine-tuned on a custom storytelling dataset formatted in Alpaca-style instruction-response pairs.
- Training Framework: Unsloth (optimized for macOS MPS acceleration).
- Fine-tuning Method: LoRA (Low-Rank Adaptation) with mixed-precision training.
- Hardware: Trained on Apple M3 MacBook Pro (36GB RAM).
- Optimizer: AdamW with cosine learning rate schedule.
π Dataset Overview
The dataset consists of structured instruction-response pairs where:
- The instruction provides a prompt for a story.
- The response is a well-crafted short story inspired by real-life events.
Example entry:
{
"instruction": "Tell me a story about a grandfather recalling his childhood.",
"input": "",
"output": "On a quiet evening, Grandpa sat by the fireplace, recalling the days when he would race his bicycle down the village slopes..."
}
π Key Features
β
Enhanced Storytelling Ability β Generates immersive, structured, and engaging narratives.
β
Fine-tuned for Elderly Assistance β Ideal for memory recollection and cognitive engagement.
β
Supports Instruction-Following β Can adapt to different storytelling styles and prompts.
β
Efficient Inference β Optimized for on-device processing using MPS acceleration.
π Usage
To generate a story using the model, run:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Joel2233/StoryTeller"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
prompt = "Tell me a heartwarming story about a lost puppy finding its way home."
input_text = f"[INST] {prompt} [/INST]"
inputs = tokenizer(input_text, return_tensors="pt").to("cuda") # Use "mps" for macOS MPS acceleration
output = model.generate(**inputs, max_length=512)
story = tokenizer.decode(output[0], skip_special_tokens=True)
print(story)
π Performance & Limitations
Strengths:
- Generates cohesive and contextually rich stories.
- Supports interactive storytelling applications.
- Works on-device with Apple Silicon.
Limitations:
- May occasionally generate hallucinated or excessively long responses.
- Lacks memory persistence across prompts.
- Not fine-tuned for non-English languages.
- Downloads last month
- 25
4-bit
16-bit
Model tree for Joel2233/StoryTeller
Base model
unsloth/mistral-7b-v0.3