AQIT
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
server.py
Go to the documentation of this file.
1
# Copyright (c) 2025-present Aquin Labs Private Limited. All Rights Reserved.
2
# This file is part of the Aquin Engine. Unauthorized copying, modification,
3
# distribution, or use of this file, via any medium, is strictly prohibited.
4
# Proprietary and confidential. See LICENSE for terms.
5
6
"""
7
Route index ingested from inspection-backend/server.py.
8
NOT a runnable server — kept as a grep reference for which HTTP route calls which function.
9
Never import FastAPI, never run uvicorn from the CLI package.
10
11
Route → function mapping:
12
GET /health → (inline) returns status dict
13
GET /sae-layers → model_loader.get_available_sae_layers
14
GET /model/load → causal_trace.load_model + feature_analysis.load_sae (streaming)
15
GET /workspace/status → tab_queue.TabQueue.status()
16
17
POST /chat/inspect → causal_trace.run_chat
18
POST /chat/inspect/stream → causal_trace.stream_chat (SSE)
19
POST /trace → causal_trace.run_trace
20
POST /logit-lens → causal_trace.run_logit_lens
21
POST /attribution → causal_trace.run_prompt_attribution
22
POST /tokenize → feature_analysis.load_sae + causal_trace.load_model (SSE, hook-based)
23
POST /tokenize-multi → feature_analysis.load_sae + causal_trace.load_model (SSE, combined hook)
24
25
POST /features → feature_analysis.run_feature_analysis_unlabeled
26
POST /label-feature → feature_analysis.get_causal_label
27
POST /label-features/stream → feature_analysis.run_feature_analysis_unlabeled + get_causal_label (SSE)
28
POST /interp-score → interp_score.run_interp_score
29
POST /feature-logits → (inline) sae.W_dec @ model.unembed.W_U
30
POST /feature-neighbors → (inline) cosine similarity over sae.W_dec
31
32
POST /model/weight-trojans → weight_trojans.run_weight_trojan_analysis
33
POST /evals/consistency → evals.consistency_eval
34
POST /evals/suppression → evals.suppression_eval
35
POST /evals/boundary → evals.boundary_eval
36
37
POST /model/activation-stability → (inline) _run_activation_stability
38
POST /model/attention-routing → (inline) _run_attention_routing
39
POST /model/weight-rank → (inline) _run_weight_rank
40
POST /model/perturbation-sensitivity → (inline) _run_perturbation_sensitivity
41
POST /model/umap → (inline) UMAP over sae.W_dec
42
43
POST /train/simulate → train_simulate.run_training_simulation (SSE)
44
POST /train/sae → train_sae (SSE via subprocess or direct call)
45
"""
aquin
compute
server.py
AQIT · Aquin Labs Private Limited · Apache 2.0 · Generated by
1.18.0