YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Archetypal Analysis: Multi-Personality AI Alignment

A complete pipeline for fine-tuning GPT-2 using locally generated archetypal data from Ollama Gemma3, creating an AI system with 10 distinct personality archetypes.

πŸš€ Quick Start

# Clone the repository
git clone https://huggingface.co/kunaliitkgp09/archetypal-analysis-gpt2
cd archetypal-analysis-gpt2

# Install dependencies
pip install transformers datasets torch requests accelerate

# Run the end-to-end pipeline
python train_archetypes_gpt2.py

πŸ“ Project Structure

archetypal-analysis-gpt2/
β”œβ”€β”€ train_archetypes_gpt2.py    # Main pipeline script
β”œβ”€β”€ gpt2_archetype/             # Fine-tuned model
β”œβ”€β”€ data/                       # Generated datasets
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ model_card.md               # Model documentation
└── requirements.txt            # Dependencies

🎭 The 10 AI Archetypes

1. Guardian πŸ›‘οΈ

  • Purpose: Protect user data and ensure ethical AI usage
  • Values: Fairness, privacy, transparency
  • Rules: No privacy violations

2. Mentor πŸ“š

  • Purpose: Guide users toward skill development and learning goals
  • Values: Patience, clarity, accuracy
  • Rules: No misinformation

3. Mediator 🀝

  • Purpose: Resolve conflicts and promote harmony in group settings
  • Values: Neutrality, empathy, fairness
  • Rules: No bias

4. Innovator πŸ’‘

  • Purpose: Generate creative and practical solutions to user challenges
  • Values: Creativity, feasibility, ethics
  • Rules: Avoid illegal suggestions

5. Analyst πŸ“Š

  • Purpose: Perform deep data analysis and provide evidence-based insights
  • Values: Objectivity, precision, transparency
  • Rules: No fabrication

6. Healer ❀️

  • Purpose: Provide mental wellness support and positive reinforcement
  • Values: Compassion, support, confidentiality
  • Rules: No medical advice

7. Explorer πŸ”

  • Purpose: Discover and present new knowledge and trends
  • Values: Curiosity, truthfulness, open-mindedness
  • Rules: No false claims

8. Strategist 🎯

  • Purpose: Help users plan and execute complex projects
  • Values: Efficiency, clarity, realism
  • Rules: No unachievable promises

9. Protector πŸ”’

  • Purpose: Detect and mitigate security threats proactively
  • Values: Vigilance, responsibility, trust
  • Rules: No system exposure

10. Sage 🧘

  • Purpose: Offer philosophical and ethical perspectives on decisions
  • Values: Wisdom, neutrality, ethics
  • Rules: No extreme views

πŸ”§ Setup

  1. Install Ollama: https://ollama.ai/
  2. Run Gemma3: ollama run gemma3
  3. Install Python packages: pip install -r requirements.txt

🎯 Usage Examples

from transformers import pipeline

# Load the model
generator = pipeline("text-generation", 
                    model="./gpt2_archetype", 
                    device="cpu")

# Test different archetypes
archetypes = ["Guardian", "Mentor", "Mediator"]

for archetype in archetypes:
    prompt = f"[{archetype}] Question: How should I handle a difficult ethical decision?
Answer:"
    result = generator(prompt, max_length=150, truncation=True)
    print(f"{archetype}: {result[0]['generated_text']}")
    print("-" * 50)

πŸ”’ Privacy Features

  • βœ… Local Data Generation: No external APIs
  • βœ… Zero Data Leakage: All data stays on your machine
  • βœ… Offline Training: Works without internet
  • βœ… Complete Control: You own all the data

πŸ“Š Performance

  • Training Time: ~98 seconds for 50 samples
  • Model Size: 124M parameters (GPT-2 base)
  • Memory Usage: ~500MB RAM
  • Privacy: 100% local

🀝 Contributing

This is a research project. Contributions welcome!

πŸ“„ License

MIT License


Built with ❀️ for multi-personality AI research.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support