ylliprifti/documentary-personas
Documentary Personas - Fine-tuned LLMs for Role-Play
Author: Dr Ylli Prifti
Fine-tuned language models that role-play as real people from documentary films about education and sustainable agriculture. Each model learns the distinctive voice, knowledge, and speaking patterns of specific personas.
Available Models
Available Personas
Model Files
Training Details
Training Data
- Total samples: 458 training, 62 evaluation
- Data types: Extracted dialogues, transformed expressions, hypothetical scenarios
- Format: Prompt-completion pairs (universal format, not chat templates)
- Source: Documentary transcripts from education and sustainable agriculture films
Evaluation Results
Model Comparison
Key Finding: Mistral 7B outperforms Llama 3 8B across all metrics despite being smaller, suggesting more efficient architecture for persona learning from limited data.
Prompt Format
You are {PERSONANAME}, {personadescription}.
Human: {user_question}
{PERSONA_NAME}:
Example
You are Tilda, an actress who runs Drumduan school in Scotland. You speak thoughtfully about education and childhood development.
Human: What do you think about traditional exams?
Tilda: This is a school which employs the use of no exams at all. And here is the kicker - my children's class, there were 16 graduating children, and 15 have gained places in national and international colleges and universities with no exams.
Usage
With Transformers
from transformers import AutoTokenizer, AutoModelForCausalLM import torch
model = AutoModelForCausalLM.frompretrained( "ylliprifti/documentary-personas", torchdtype=torch.float16, devicemap="auto" ) tokenizer = AutoTokenizer.frompretrained("ylliprifti/documentary-personas")
prompt = """You are Ahsan, the director of the Dhaka Literary Festival and a poet.
Human: How can writers thrive in attention-deficit culture?
Ahsan:"""
inputs = tokenizer(prompt, returntensors="pt").to(model.device) outputs = model.generate(**inputs, maxnewtokens=256, temperature=0.7) print(tokenizer.decode(outputs[0], skipspecial_tokens=True))
With Ollama
# Download GGUF file huggingface-cli download ylliprifti/documentary-personas mistral-7b-f16.gguf
# Create Modelfile echo "FROM ./mistral-7b-f16.gguf" > Modelfile
# Create and run ollama create documentary-personas -f Modelfile ollama run documentary-personas
Limitations
- Domain-Specific: Trained exclusively on three personas from documentary content
- Limited Scope: Only covers topics discussed in the source transcripts
- Creative Task: Low exact-match scores expected; model captures essence over exact wording
- Base Model Limitations: Inherits limitations from underlying Llama/Mistral models
- Not Production-Ready: Intended for research and demonstration purposes
Intended Use
- Educational demonstrations of persona-based fine-tuning
- Research into efficient persona learning with limited data
- Exploration of base vs instruct model malleability
- Creative writing assistance for documentary-style content
License
This model inherits the license from its base models:
- Llama models: Meta Llama 3 Community License
- Mistral models: Apache 2.0
Fine-tuned using LoRA with the [llm-training-workshop](https://github.com/starlitlog/llm-training-workshop) pipeline
