{"repo":"Amirhosein-gh98/Gnosis","free":true,"listed":false,"github":"https://github.com/Amirhosein-gh98/Gnosis","clone":"git clone https://github.com/Amirhosein-gh98/Gnosis.git","description":"Can LLMs Predict Their Own Failures? Self-Awareness via Internal Circuits","language":"Python","stars":46,"topics":["attention","efficient","error-detection","hallucination","hallucination-detection","large-language-model","latent-representations","llm","orm","reasoning"],"license":null,"category":"ai-agents","readme_excerpt":"Can LLMs Predict Their Own Failures? Self-Awareness via Internal Circuits &nbsp;&nbsp; &nbsp;&nbsp; Overview of our Gnosis self-awareness mechanism and its performance. Gnosis is a lightweight self-awareness head attached to a (frozen) LLM backbone that predicts a scalar correctness probability for a generated response by reading the model’s hidden states + attention maps . --- 🚨 NEW RELEASE 🚨 Multi-Head Latent Control From predicting failures to actively controlling agents Building on Gnosis, our new work turns latent self-awareness into real-time deployment decisions. Multi-Head Latent Control reads the internal states of frozen LLMs to decide when to answer, continue reasoning, ask for clarification, use tools, abstain, or route to a stronger model—achieving higher success while reducing plotted API cost by up to 90% in our reported AndroidWorld settings. --- 📁 Repository layout - transformers/ — local Transformers fork with Gnosis integrated into the model architecture - Implemented under: - transformers/src/transformers/models/gpt oss - transformers/src/transformers/models/qwen3 - trl/ — local TRL fork with a modified SFTTrainer to train the Gnosis head - Key change: - trl/trl/trainer/sft trainer.py - open-r1/ — training code + configs - src/ — inference + data tools (quickstart, scoring, preprocessing scripts) --- 🧩 Installation ✅ Option A: One-command setup From repo root: 🛠️ Option B: Manual install (exact steps) --- ⚡ Quickstart: Use Gnosis on a single question ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Amirhosein-gh98","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Amirhosein-gh98/Gnosis/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}