PHANTASM¶
Probabilistic Hallucination-Aware Neural Transformation with Adaptive Synthesis Method
The first ML framework to mathematically invert LLM "failure modes" into productive features.
What is PHANTASM?¶
PHANTASM is a paradigm-inverting PyTorch framework that takes the three most reviled failure modes of large language models — hallucination, confabulation, and epistemic miscalibration — and converts each one into a structured, actionable, machine-readable asset.
Instead of suppressing failures, PHANTASM harvests them.
Three Pillars at a Glance¶
Hallucination Gradient Tracing
Uses gradient analysis to map exactly WHERE the model's knowledge ends.
Produces a CompetencyAtlas — the model's blind spots, on a silver platter.
Confabulation Mining Network
Mines the model's creative falsehoods for novel, plausible hypotheses. Turns the "garbage" into gold — literally.
Quick Start¶
from phantasm import PHANTASMPipeline
pipeline = PHANTASMPipeline.from_pretrained("gpt2")
report = pipeline.analyze("The Amazon flows through Africa.", domain="geography")
print(report)
Why PHANTASM is Different¶
| Framework | What it does with hallucinations |
|---|---|
| RAG | Tries to prevent them |
| RLHF | Trains away from them |
| Fact-checkers | Catches them after generation |
| SelfCheckGPT | Detects them via sampling |
| PHANTASM | Converts them into knowledge maps, hypotheses, and confidence oracles |
Author¶
Vignesh S — B.Tech CSE, Takshashila University, 2022–2026. GitHub: vignesh2027 HuggingFace: vigneshwar234
Apache 2.0 License.