# zimmygao/openjev-rlcd architecture

> Architecture diagram of the GitHub repository zimmygao/openjev-rlcd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zimmygao/openjev-rlcd
- Repository: https://github.com/zimmygao/openjev-rlcd

## Overview

OpenJev-RLCD is an experimental training and evaluation implementation for calibrated decisions by reasoning language models. Its principal workflow loads a task, samples rationales, reads answer-token distributions, and trains with a proper-score objective; the documented two-stage recipe calibrates the readout before reinforcing rationales. Saved per-item distributions are temperature-scaled and scored for accuracy, calibration, and selective-risk metrics, then aggregated into comparison tables. The graph preserves the three task families and baseline/ablation capabilities documented in the README. Some training internals are unsampled, so uncertain runtime links are omitted.

Main entry points: [`openjev_rlcd/train.py`](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/train.py) (RLCD and RL baselines), [`openjev_rlcd/tasks/__init__.py`](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/__init__.py) (Task registry), [`openjev_rlcd/tasks/gsm8k_verify.py`](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/gsm8k_verify.py) (GSM8K-Verify), [`openjev_rlcd/train_direct.py`](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/train_direct.py) (Direct-answer SFT)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tasks["Decision tasks"]
  node_registry["Task registry<br/>[__init__.py]"]
  node_chaosnli["ChaosNLI<br/>[chaosnli.py]"]
  node_gsm8kv["GSM8K-Verify<br/>[gsm8k_verify.py]"]
  node_mmlu["MMLU-Pro<br/>[mmlu_pro.py]"]
  node_gsmdata["GSM8K-Verify data<br/>[gsm8k_verify.json]"]
end

subgraph group_learning["Training methods"]
  node_trainer["RLCD and RL baselines<br/>[train.py]"]
  node_direct["Direct-answer SFT<br/>[train_direct.py]"]
  node_estimators["Proper-score estimators<br/>[estimators.py]"]
end

subgraph group_analysis["Evaluation analysis"]
  node_metrics["Calibration metrics<br/>[metrics.py]"]
  node_evaluation["Per-item evaluation<br/>[evaluation.py]"]
  node_tables["Comparative tables<br/>[final_tables.py]"]
end

subgraph group_artifacts["Results artifacts"]
  node_runresults["Run distributions"]
end

node_researcher(("Experiment runner"))
node_modelhub["Hugging Face models"]
node_datasets["Dataset hub"]

node_researcher -->|"runs training"| node_trainer
node_researcher -->|"runs baseline"| node_direct
node_registry -->|"registers task"| node_chaosnli
node_registry -->|"registers task"| node_gsm8kv
node_registry -->|"registers task"| node_mmlu
node_trainer -->|"loads task"| node_registry
node_direct -->|"loads task"| node_registry
node_gsm8kv -->|"reads data"| node_gsmdata
node_chaosnli -->|"loads dataset"| node_datasets
node_gsm8kv -->|"builds from"| node_datasets
node_trainer -->|"loads model"| node_modelhub
node_gsm8kv -->|"generates proposals"| node_modelhub
node_trainer -->|"uses objectives"| node_estimators
node_trainer -->|"records metrics"| node_metrics
node_direct -->|"fits temperature"| node_metrics
node_trainer -->|"writes runs"| node_runresults
node_direct -->|"writes runs"| node_runresults
node_evaluation -->|"uses metrics"| node_metrics
node_tables -->|"scores arms"| node_evaluation
node_tables -->|"loads task splits"| node_registry
node_tables -->|"reads results"| node_runresults

click node_registry "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/__init__.py"
click node_chaosnli "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/chaosnli.py"
click node_gsm8kv "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/gsm8k_verify.py"
click node_mmlu "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/mmlu_pro.py"
click node_gsmdata "https://github.com/zimmygao/openjev-rlcd/blob/main/data/gsm8k_verify.json"
click node_trainer "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/train.py"
click node_direct "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/train_direct.py"
click node_estimators "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/estimators.py"
click node_metrics "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/metrics.py"
click node_evaluation "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/evaluation.py"
click node_tables "https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/final_tables.py"
click node_runresults "https://github.com/zimmygao/openjev-rlcd/tree/main/results"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registry,node_chaosnli,node_gsm8kv,node_mmlu,node_gsmdata toneBlue
class node_trainer,node_direct,node_estimators toneAmber
class node_metrics,node_evaluation,node_tables toneMint
class node_runresults toneRose
class node_researcher,node_modelhub,node_datasets toneIndigo
```

## Components

### Decision tasks

- [Task registry](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/__init__.py): `openjev_rlcd/tasks/__init__.py`
- [ChaosNLI](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/chaosnli.py): `openjev_rlcd/tasks/chaosnli.py`
- [GSM8K-Verify](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/gsm8k_verify.py): `openjev_rlcd/tasks/gsm8k_verify.py`
- [MMLU-Pro](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/tasks/mmlu_pro.py): `openjev_rlcd/tasks/mmlu_pro.py`
- [GSM8K-Verify data](https://github.com/zimmygao/openjev-rlcd/blob/main/data/gsm8k_verify.json): `data/gsm8k_verify.json`

### Training methods

- [RLCD and RL baselines](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/train.py): `openjev_rlcd/train.py`
- [Direct-answer SFT](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/train_direct.py): `openjev_rlcd/train_direct.py`
- [Proper-score estimators](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/estimators.py): `openjev_rlcd/estimators.py`

### Evaluation analysis

- [Calibration metrics](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/metrics.py): `openjev_rlcd/metrics.py`
- [Per-item evaluation](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/evaluation.py): `openjev_rlcd/evaluation.py`
- [Comparative tables](https://github.com/zimmygao/openjev-rlcd/blob/main/openjev_rlcd/final_tables.py): `openjev_rlcd/final_tables.py`

### Results artifacts

- [Run distributions](https://github.com/zimmygao/openjev-rlcd/tree/main/results): `results`

### Other components

- **Experiment runner**
- **Hugging Face models**
- **Dataset hub**

## Connections

- Experiment runner → RLCD and RL baselines: runs training (evidence: `README.md`)
- Experiment runner → Direct-answer SFT: runs baseline (evidence: `README.md`)
- Task registry → ChaosNLI: registers task (evidence: `openjev_rlcd/tasks/__init__.py`)
- Task registry → GSM8K-Verify: registers task (evidence: `openjev_rlcd/tasks/__init__.py`)
- Task registry → MMLU-Pro: registers task (evidence: `openjev_rlcd/tasks/__init__.py`)
- RLCD and RL baselines → Task registry: loads task (evidence: `openjev_rlcd/train.py`)
- Direct-answer SFT → Task registry: loads task (evidence: `openjev_rlcd/train_direct.py`)
- GSM8K-Verify → GSM8K-Verify data: reads data (evidence: `openjev_rlcd/tasks/gsm8k_verify.py`)
- ChaosNLI → Dataset hub: loads dataset (evidence: `openjev_rlcd/tasks/chaosnli.py`)
- GSM8K-Verify → Dataset hub: builds from (evidence: `openjev_rlcd/tasks/gsm8k_verify.py`)
- RLCD and RL baselines → Hugging Face models: loads model (evidence: `README.md`)
- GSM8K-Verify → Hugging Face models: generates proposals (evidence: `openjev_rlcd/tasks/gsm8k_verify.py`)
- RLCD and RL baselines → Proper-score estimators: uses objectives (evidence: `openjev_rlcd/train.py`)
- RLCD and RL baselines → Calibration metrics: records metrics (evidence: `openjev_rlcd/train.py`)
- Direct-answer SFT → Calibration metrics: fits temperature (evidence: `openjev_rlcd/train_direct.py`)
- RLCD and RL baselines → Run distributions: writes runs (evidence: `README.md`)
- Direct-answer SFT → Run distributions: writes runs (evidence: `README.md`)
- Per-item evaluation → Calibration metrics: uses metrics (evidence: `openjev_rlcd/evaluation.py`)
- Comparative tables → Per-item evaluation: scores arms (evidence: `openjev_rlcd/final_tables.py`)
- Comparative tables → Task registry: loads task splits (evidence: `openjev_rlcd/final_tables.py`)
- Comparative tables → Run distributions: reads results (evidence: `README.md`)
