Spaces:
Sleeping
Sleeping
metadata
title: Thought Anchors
emoji: 🧠
colorFrom: blue
colorTo: red
sdk: docker
app_port: 7860
hf_oauth: true
pinned: false
models:
- sapientinc/HRM-Text-1B
Thought Anchors
Thought Anchors generates visible reasoning traces from open-weight models and computes sentence-to-sentence influence with gradient x attention attribution.
Current product shape:
- Hugging Face
Docker Spacefirst - Hugging Face OAuth sign-in
- web UI + API
- per-user ephemeral sessions
- JSON / CSV export
- adaptive CPU / MPS / CUDA loading
Quick Start
Install deps:
uv sync --extra dev
Run API:
uv run python -m app.cli.run_api
Run CLI:
uv run python -m app.cli.run_prototype "Explain why the derivative of x^2 is 2x"
Run tests:
uv run python -m pytest -q
Main Endpoints
GET /healthzGET /api/mePOST /api/warmupPOST /api/analyzeGET /api/sessionsPOST /api/sessionsGET /api/sessions/{id}GET /api/sessions/{id}/resultGET /api/sessions/{id}/export.jsonGET /api/sessions/{id}/export.csv
Docs
Notebook
Colab / Kaggle smoke-test notebook:
Key Constraints
- Attribution needs
attn_implementation="eager". - Model must expose supported decoder layers and attention modules.
- Long traces stay capped because analysis uses full backward pass.
- Space disk is ephemeral; export results you want to keep.