How danieljamesdavies/turing-explorer-back-end works
Main Components Identification
a) Frontend Application
• Represented as a client-side component
• Interfaces with the backend through API routes
b) Backend Server (Flask-based, indicated by app.py)
• Main API server handling requests
• Route handlers in the /routes directory
c) Core Components:
• TuringLLM Module (model inference and processing)
• SAE (Sparse Autoencoder) Module
• Latent Data Storage System
[Frontend Client] ←→ [Backend API Server] ←→ [Core Processing Modules]
• ↕
• [Data Storage]
Backend API Server (Middle Layer)
• Route endpoints:
• /get_latent_connections
• /get_latent_data
• /get_latent_preview
• /inference
• /search_latents
Core Processing Modules (Right Side)
• TuringLLM Module
• model.py
• inference.py
• tokenizer.py
• config.py
• SAE Module
• SAE_TopK.py
Data Storage (Bottom Layer)
• Latent Data Storage
• top_other_latents
• unembedding_frequencies
C. Connections and Data Flow:
Additional Elements
• Component types
• Data flow directions
Technical Details
Annotations for:
• Model size (254M parameters)
• Key dependencies
• Data storage formats
• API endpoint purposes