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
GGUF
Model size
7.25B params
Architecture
llama
Hardware compatibility
Log In to view the estimation

4-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Joel2233/StoryTeller

Quantized
(22)
this model