Component Diagrams
Details
Static architecture map of 59 files (py, sh) in 6 components: eval: inference, topogpt3: model, topogpt3: inference_hrm, topogpt3: tasks, topogpt3: jlens, eval: data_pipeline. Structure is extracted statically without LLM calls; component prose may be enriched locally.
Relations
- eval: inference calls into topogpt3: model — 4 imports, 21 calls across the boundary
app.py::run_training@112 → topogpt3/train.py::TopoGPT3Config·app.py::run_training@115 → topogpt3/train.py::TopoGPT3Trainer·app.py::run_training@117 → topogpt3/train.py::prepare_all - eval: inference calls into topogpt3: inference_hrm — 1 imports, 9 calls across the boundary
app.py::run_inference_hrm@85 → topogpt3/inference_hrm.py::RecursiveReasoningConfig·app.py::run_inference_hrm@90 → topogpt3/inference_hrm.py::HRMInferenceSettings·app.py::run_inference_hrm@101 → topogpt3/inference_hrm.py::HRMInferencePipeline - eval: inference depends on topogpt3: jlens — 2 imports, 0 calls across the boundary
- eval: inference calls into eval: data_pipeline — 1 imports, 2 calls across the boundary
eval/harness.py::run_one_test_sandboxed@184 → eval/sandbox.py::SandboxConfig·eval/harness.py::run_one_test_sandboxed@188 → eval/sandbox.py::safe_exec - topogpt3: model calls into eval: inference — 1 imports, 2 calls across the boundary
synthetic_dataset.py::_enqueue_sample@466 → eval/governor.py::put·synthetic_dataset.py::_flush_writer@470 → eval/governor.py::put - topogpt3: model calls into topogpt3: inference_hrm — 2 imports, 3 calls across the boundary
infer_exploitgym.py::load_model@162 → topogpt3/checkpoint_meta.py::config_from_checkpoint·topogpt3/model.py::generate_with_continuation@1266 → topogpt3/continuation.py::is_response_complete·topogpt3/model.py::generate_with_continuation@1269 → topogpt3/continuation.py::extract_tail_for_continuation - topogpt3: inference_hrm calls into topogpt3: model — 3 imports, 30 calls across the boundary
tests/test_structured_output.py::tokenizer@24 → topogpt3/model.py::BPETokenizer·tests/test_structured_output.py::test_json_schema_accepts_and_terminates@118 → topogpt3/model.py::encode·tests/test_structured_output.py::test_regex_masks_illegal_first_token@131 → topogpt3/model.py::encode - topogpt3: inference_hrm calls into topogpt3: tasks — 7 imports, 10 calls across the boundary
topogpt3/api_server.py::list_models@957 → topogpt3/fallback.py::models_payload·topogpt3/api_server.py::_resolve_generation@961 → topogpt3/fallback.py::resolve_profile·topogpt3/api_server.py::completions@1026 → topogpt3/chat.py::_fmt_tool_defs - topogpt3: tasks calls into topogpt3: model — 1 imports, 4 calls across the boundary
eval/tasks.py::build_generate_fn@210 → topogpt3/model.py::BPETokenizer·eval/tasks.py::build_generate_fn@212 → topogpt3/model.py::TopoGPT2·eval/tasks.py::generate@225 → topogpt3/model.py::encode - topogpt3: tasks calls into topogpt3: inference_hrm — 1 imports, 1 calls across the boundary
eval/tasks.py::build_generate_fn@209 → topogpt3/checkpoint_meta.py::config_from_checkpoint - topogpt3: tasks calls into eval: data_pipeline — 1 imports, 1 calls across the boundary
topogpt3/tools_agent.py::execute_tool@127 → eval/sandbox.py::safe_exec - topogpt3: jlens depends on eval: inference — 1 imports, 0 calls across the boundary
- topogpt3: jlens calls into topogpt3: model — 5 imports, 11 calls across the boundary
tests/test_lens_model.py::test_from_topogpt2_config@29 → topogpt3/model.py::TopoGPT2Config·tests/test_lens_model.py::test_forward_output_shape@55 → topogpt3/model.py::model·tests/test_lens_model.py::test_encode_with_tokenizer@101 → topogpt3/model.py::BPETokenizer - topogpt3: jlens depends on topogpt3: inference_hrm — 2 imports, 0 calls across the boundary
eval: inference (1) [Expand]
eval: inference groups 12 files (py) around load_humaneval, build_prompt, extract_candidate, run_one_test, run_one_test_sandboxed. Drop-in entry point that demonstrates how to use the topogpt3 package.
Related Classes/Methods:
eval/harness.py::load_humaneval#L59-L74eval/harness.py::build_prompt#L75-L99eval/harness.py::extract_candidate#L100-L149eval/harness.py::run_one_test#L150-L171eval/harness.py::run_one_test_sandboxed#L172-L194eval/harness.py::make_sampler#L195-L203eval/harness.py::completion_for_problem#L204-L216eval/harness.py::ModelLoader#L217-L219
Sub-components
eval (1.1)
eval groups 9 files (py) around load_humaneval, build_prompt, extract_candidate, run_one_test, run_one_test_sandboxed. Streaming + governance for autoregressive generation.
root (1.2)
root groups 1 files (py) around run_inference, run_inference_hrm, run_training, _build_parser, main. Drop-in entry point that demonstrates how to use the topogpt3 package.
topogpt3 (1.3)
topogpt3 groups 2 files (py) around ScalePreset, InferenceSettings, scale_presets, preset, validate. TopoGPT3: complex-valued spectral language model for code.
Files
app.pyeval/governor.pyeval/governor_smoke.pyeval/harness.pyeval/integration_smoke.pyeval/noise_sweep.pyeval/repair.pyeval/samplers.pyeval/smoke.pyeval/temp_sweep.pytopogpt3/__init__.pytopogpt3/inference.py
topogpt3: model (2) [Expand]
topogpt3: model groups 12 files (py) around TopoGPT2Config, __post_init__, setup_logger, set_seed, QuaternionOps. Diagnostico estatico de un checkpoint TopoGPT3 congelado.
Related Classes/Methods:
topogpt3/model.py::TopoGPT2Config#L58-L162topogpt3/model.py::__post_init__#L163-L195topogpt3/model.py::setup_logger#L196-L205topogpt3/model.py::set_seed#L206-L217topogpt3/model.py::QuaternionOps#L218-L225topogpt3/model.py::hamilton_product#L226-L237topogpt3/model.py::normalize#L238-L241topogpt3/model.py::conjugate#L242-L246
Sub-components
eval (2.1)
eval groups 2 files (py) around phase_discretization, synthetic_winding, static_kappa, context_length_diagnostic, main. Diagnostico estatico de un checkpoint TopoGPT3 congelado.
root (2.2)
root groups 3 files (py) around LLMBackend, generate, name, GroqBackend, __init__. Standalone inference script for TopoExploit.
topogpt3 (2.3)
topogpt3 groups 7 files (py) around TopoGPT2Config, __post_init__, setup_logger, set_seed, QuaternionOps. Elastic Weight Consolidation (EWC) and Experience Replay for TopoGPT3.
Files
eval/diag_static.pyeval/hodge_cm_ablation.pyinfer_exploitgym.pysynthetic_dataset.pytopogpt3/ewc.pytopogpt3/exploitgym_config.pytopogpt3/exploitgym_loader.pytopogpt3/hodge_cm.pytopogpt3/merged_config.pytopogpt3/model.pytopogpt3/train.pytransfer_weights.py
topogpt3: inference_hrm (3) [Expand]
topogpt3: inference_hrm groups 8 files (py) around _count_unclosed_brackets, _count_unclosed_fences, is_response_complete, extract_tail_for_continuation, split_at_last_newline. Checkpoint architecture discovery tests.
Related Classes/Methods:
topogpt3/continuation.py::_count_unclosed_brackets#L25-L35topogpt3/continuation.py::_count_unclosed_fences#L36-L44topogpt3/continuation.py::is_response_complete#L45-L74topogpt3/continuation.py::extract_tail_for_continuation#L75-L104topogpt3/continuation.py::split_at_last_newline#L105-L114topogpt3/checkpoint_meta.py::read_state#L24-L34topogpt3/checkpoint_meta.py::probe_checkpoint#L35-L80topogpt3/checkpoint_meta.py::config_from_checkpoint#L81-L119
Sub-components
tests (3.1)
tests groups 2 files (py) around test_read_state_missing, test_probe_t3_small, test_probe_exploitgym_meta, test_config_matches_weights, tokenizer. Checkpoint architecture discovery tests.
topogpt3 (3.2)
topogpt3 groups 6 files (py) around _count_unclosed_brackets, _count_unclosed_fences, is_response_complete, extract_tail_for_continuation, split_at_last_newline. OpenAI-compatible HTTP API server so TopoGPT3 can be used as a backend for coding...
Files
tests/test_checkpoint_meta.pytests/test_structured_output.pytopogpt3/api_server.pytopogpt3/checkpoint_meta.pytopogpt3/continuation.pytopogpt3/inference_hrm.pytopogpt3/structured_output.pytopogpt3/tokenizer_tools.py
topogpt3: tasks (4) [Expand]
topogpt3: tasks groups 7 files (py) around pre_processing_chat, post_processing_chat, _fmt_tool_defs, _tool_calls_text, apply_chat_template. Generic task eval: JSONL cases + safe verifiers.
Related Classes/Methods:
topogpt3/chat.py::pre_processing_chat#L44-L57topogpt3/chat.py::post_processing_chat#L58-L63topogpt3/chat.py::_fmt_tool_defs#L64-L88topogpt3/chat.py::_tool_calls_text#L89-L115topogpt3/chat.py::apply_chat_template#L116-L167topogpt3/chat.py::parse_tool_calls#L168-L177topogpt3/chat.py::parse_thinking#L178-L184topogpt3/chat.py::split_reasoning_content#L185-L196
Sub-components
eval (4.1)
eval groups 1 files (py) around _extract_code, _extract_json, verify_tool_call, verify_json, verify_regex. Generic task eval: JSONL cases + safe verifiers.
tests (4.2)
tests groups 2 files (py) around _gen, test_apt_chain_cases_full_pass, test_regex_verifier, test_tool_call_verifier_rejects_wrong_target, _call. Generic task eval tests (no model load).
topogpt3 (4.3)
topogpt3 groups 4 files (py) around pre_processing_chat, post_processing_chat, _fmt_tool_defs, _tool_calls_text, apply_chat_template. Chat template + special tokens for TopoGPT3.
Files
eval/tasks.pytests/test_eval_tasks.pytests/test_fallback.pytopogpt3/chat.pytopogpt3/eval_toolcall.pytopogpt3/fallback.pytopogpt3/tools_agent.py
topogpt3: jlens (5)
topogpt3: jlens groups 5 files (py) around LensModel, encode, forward, unembed, TopoGPT3LensConfig. TestValidPositionMask: Feature: valid_position_mask excludes attention-sink and final...
Related Classes/Methods:
topogpt3/lens_model.py::LensModel#L23-L39topogpt3/lens_model.py::encode#L40-L44topogpt3/lens_model.py::forward#L45-L51topogpt3/lens_model.py::unembed#L52-L58topogpt3/lens_model.py::TopoGPT3LensConfig#L59-L83topogpt3/lens_model.py::from_topogpt2_config#L84-L103topogpt3/lens_model.py::probe_checkpoint#L104-L141topogpt3/lens_model.py::_TopoGPT3ResidualForward#L142-L149
Files
tests/test_jlens.pytests/test_lens_model.pytopogpt3/__main__.pytopogpt3/jlens.pytopogpt3/lens_model.py
eval: data_pipeline (6)
eval: data_pipeline groups 4 files (py) around SandboxConfig, _names_imported, _blocked_dunder_access, _max_depth, d. Sandbox for executing model-generated code during HumanEval evaluation.
Related Classes/Methods:
eval/sandbox.py::SandboxConfig#L53-L99eval/sandbox.py::_names_imported#L100-L113eval/sandbox.py::_blocked_dunder_access#L114-L122eval/sandbox.py::_max_depth#L123-L124eval/sandbox.py::d#L125-L132eval/sandbox.py::check_safety#L133-L253eval/sandbox.py::_build_worker_src#L254-L269eval/sandbox.py::safe_exec#L270-L372
Files
eval/sandbox.pyeval/sandbox_smoke.pytests/test_data_pipeline.pytopogpt3/data_pipeline.py