CoolFace
Modelpublic

nnnnnzo/titan-titanic-oracle

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes38downloads
Model Card

TITAN — Titanic Oracle

A fine-tuned Qwen2.5-7B-Instruct-4bit model that knows the Kaggle Titanic dataset inside-out. Trained on Apple MLX via LoRA on a Mac Mini M4.

Ask it about survival rates, passenger demographics, famous passengers, Kaggle feature engineering tips, survival predictions with chain-of-thought reasoning, or the history of the disaster.


Usage

python
from mlx_lm import load, stream_generate
from mlx_lm.sample_utils import make_sampler, make_logits_processors

model, tokenizer = load("nnnnnzo/titan-titanic-oracle")

messages = [
    {"role": "system", "content": "You are Titan — a dramatic, enthusiastic expert on the RMS Titanic disaster."},
    {"role": "user", "content": "Predict survival: female, age 28, first class."}
]

prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
sampler = make_sampler(temp=0.7, top_p=0.9)
logits_processors = make_logits_processors(repetition_penalty=1.1)

for response in stream_generate(model, tokenizer, prompt=prompt, max_tokens=512,
                                sampler=sampler, logits_processors=logits_processors):
    print(response.text, end="", flush=True)

Example Questions

  • Who was Molly Brown?
  • What was the survival rate by passenger class?
  • Predict survival: male, age 35, third class.
  • How should I handle missing Age values in Kaggle?
  • When and where did the Titanic sink?
  • What is the SibSp column?

Training

MetricValue
Base modelQwen2.5-7B-Instruct-4bit
Fine-tuning methodLoRA
LoRA rank8
Layers fine-tuned8 (top layers)
Training iterations600
Train loss (start → end)4.19 → 0.56
Best validation loss1.095
Peak memory usage~5.5 GB
HardwareMac Mini M4 · 16 GB

Dataset

Fine-tuned on the Kaggle Titanic dataset (train.csv, 891 passengers). ~190 Q&A examples across 8 categories: survival statistics, feature relationships, famous passengers, survival predictions, Kaggle tips, historical context, multi-turn conversations, and column definitions.


Source

Code and full training pipeline: gitlab.com/K5nzo/titan