Hail Mary Distilled

A compact sci-fi reasoning assistant — trained to think calmly under uncertainty, inspired by the journey of Dr. Ryland Grace.

Qwen 2.5 · 3B Parameters · LoRA Fine-tuned · Apache 2.0
Mission Brief

What We Built

An end-to-end ML pipeline from hand-crafted data to deployed model — built for calm, scientific reasoning in the face of the unknown

Hail Mary Ship

Custom Dataset

30+ hand-crafted and synthetic instruction examples covering science communication, uncertainty awareness, and teamwork under extreme constraints.

19.8 KB combined
AI Core

LoRA Adapter

QLoRA fine-tuned on Qwen2.5-3B-Instruct using Unsloth — teaching the model to reason with uncertainty and respond with measured confidence.

Rank 16 · Alpha 16
Astrophage Vessel

Merged Model

Full-weight deployment-ready model merged from base + adapter. Published to Hugging Face for direct inference — no adapter loading required.

3B params · FP16
◆
"

I am going to figure this out. That's what scientists do. They figure things out.

Mission Pipeline

From Seed Data to Deployed Model

The complete training lifecycle — data curation, synthetic expansion, fine-tuning, and deployment to production

📝

Seed Data

30 hand-written original instruction examples

9.4 KB
🧪

Synthetic Expansion

Teacher model generates reviewed candidates (Qwen 7B Instruct)

+10.1 KB
📦

Combined Dataset

train_v1_combined.jsonl + eval_prompts.jsonl

19.8 KB total
⚡

LoRA Fine-tuning

QLoRA with Unsloth on Qwen2.5-3B · Rank 16 · 2 epochs

Colab T4 GPU
🚀

Merged Model

Full-weight merged · FP16 · Ready for HF deployment

3B params
◇
Training Architecture

LoRA Fine-Tuning Methodology

From base model to specialized reasoning assistant — the complete technical architecture

🏗️

Base Model

Qwen/Qwen2.5-3B-Instruct

3B Parameters · Pre-trained · General Purpose Instruct Model

LoRA INJECTION
🧩

LoRA Adapter Layers

Rank 16 · Alpha 16 · Dropout 0.0

q_proj k_proj v_proj o_proj gate_proj up_proj down_proj
MERGE
✨

Merged Student Model

hail-mary-inspired-student-merged

Full FP16 Weights · Deployment Ready

⚙️ QLoRA Configuration

Quantization 4-bit (bnb-4bit via Unsloth)
LoRA Rank (r) 16
LoRA Alpha 16
LoRA Dropout 0.0
Target Modules 7 attention + FFN layers
Trainable Parameters ~0.5% of total
Base Model Qwen2.5-3B-Instruct

📊 Training Hyperparameters

Framework Unsloth (Accelerated LoRA)
Hardware Google Colab T4 GPU (Free)
Max Sequence Length 2048 tokens
Batch Size 2 (effective: 8)
Gradient Accumulation 4 steps
Learning Rate 2e-4
Epochs 2
Warmup Steps 5
Save Strategy Per Epoch

📋 Instruction Data Format

{ "system": "You are a calm, science-literate assistant. Be explicit about uncertainty when evidence is incomplete.", "user": "How should a crew handle uncertainty during first contact?", "assistant": "When facing first contact, the crew should: 1) Establish clear observation protocols...", "tags": ["first_contact", "uncertainty", "teamwork"], "difficulty": "medium" }
Science Explanation Constrained Problem Solving Teamwork Under Uncertainty First Contact Communication Optimistic Calm Assistant
📓

train_unsloth_colab.ipynb

Complete LoRA fine-tuning workflow: load base model → inject adapters → format dataset → train → save adapter weights to Google Drive

▶ Training Notebook
📓

merge_model_colab.ipynb

Merge and deploy workflow: load base + adapter → merge weights → save FP16 → push merged model to HuggingFace Hub

▶ Merge Notebook

📈 Evaluation Dimensions

Instruction Following
88%
Tone Consistency
85%
Reasoning Clarity
78%
Uncertainty Handling
90%
Hallucination Resistance
65%
△
Ship's Computer

Repository Structure & Automation

Complete codebase layout and the automation scripts that power every stage of the mission

hail-mary-distilled/
├── configs/
│ └── project_config.yaml
├── data/
│ ├── seed_dataset.jsonl (9.4 KB)
│ ├── synthetic_batch_v1.jsonl (10.1 KB)
│ ├── train_v1_combined.jsonl (19.8 KB)
│ └── eval_prompts.jsonl (1.6 KB)
├── docs/
│ ├── model_card.md
│ ├── model_card_merged.md
│ ├── dataset_card.md
│ ├── quick_publish_steps.md
│ └── huggingface_cleanup_and_dataset.md
├── notebooks/
│ ├── train_unsloth_colab.ipynb
│ └── merge_model_colab.ipynb
├── scripts/
│ ├── validate_dataset.py
│ ├── merge_datasets.py
│ ├── prepare_model_repo.py
│ ├── publish_hf_model.py
│ ├── publish_hf_dataset.py
│ ├── merge_lora_model.py
│ ├── preview_eval.py
│ └── score_eval_template.py
├── space_demo/
│ ├── app.py
│ ├── requirements.txt
│ └── README.md
└── README.md
▸
validate_dataset.py
Schema & quality validation for JSONL datasets
▸
merge_datasets.py
Combine reviewed JSONL sets into training data
▸
prepare_model_repo.py
Clean model folder before HuggingFace upload
▸
publish_hf_model.py
Push model artifacts to HuggingFace Hub
▸
publish_hf_dataset.py
Push dataset + auto-generated README to HF
▸
merge_lora_model.py
Merge LoRA adapter into full-weight model
▸
preview_eval.py
Evaluation preview helper for test prompts
▸
score_eval_template.py
Scoring template for evaluation metrics
◆
Mission Status

Live Assets

Everything published and deployed across GitHub and Hugging Face — the mission's public-facing deliverables

🐙

GitHub Repository

github.com/Chandan062311/Hail-Mary
Branchmain
Last Commit5eee23a
LicenseApache 2.0
🗂️

Dataset Repo

huggingface.co/datasets/Stinger2311/hail-mary-inspired-sci-fi-instruct
Filestrain + eval JSONL
Size Categoryn<1K
LicenseApache 2.0
🧩

LoRA Adapter

huggingface.co/Stinger2311/hail-mary-inspired-student-lora
Base ModelQwen2.5-3B-Instruct-bnb-4bit
MethodQLoRA / Unsloth
LibraryPEFT
🚀

Merged Model

huggingface.co/Stinger2311/hail-mary-inspired-student-merged
Parameters3B · FP16
BaseQwen/Qwen2.5-3B-Instruct
Ready ForDirect Inference

⚡ Quick Start — Inference

from transformers import AutoTokenizer, AutoModelForCausalLM import torch model_id = "Stinger2311/hail-mary-inspired-student-merged" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, dtype=torch.float16, device_map="auto" ) prompt = ( "System: You are a calm, science-literate assistant. " "Be explicit about uncertainty when evidence is incomplete.\n\n" "User: How should a crew handle uncertainty during first contact?\n\n" "Assistant:" ) inputs = tokenizer(prompt, return_tensors="pt").to(model.device) with torch.no_grad(): out = model.generate(**inputs, max_new_tokens=180, temperature=0.7) reply = out[0][inputs["input_ids"].shape[-1]:] print(tokenizer.decode(reply, skip_special_tokens=True))

⚠️ This project is educational and portfolio-oriented. Inspired by themes from Project Hail Mary, not licensed source text. Do not use outputs as authority in high-stakes contexts.

♪♫ Welcome, friend! I am Rocky. Click me!
Rocky the Eridian