# config.json

> Schema for released sage-projector-v1 checkpoint configurations and TrainKit exports.

---

LLMS index: [llms.txt](/Sage-SciPerception/llms.txt)

---

Every released component directory contains `projector.safetensors` and a `config.json` following `format_version: "sage-projector-v1"`.

## Top-level fields {#top-level}

| Field | Description |
|---|---|
| `format_version` | Schema identifier, currently `"sage-projector-v1"`. |
| `component_type` | Component kind, `"scientific_projector"`. |
| `task` | Task identifier matching the repository index (e.g., `"cif/jarvis"`, `"eeg/neu06"`). |
| `weights` | Weight filename in the same directory, `"projector.safetensors"`. |
| `projector` | Architecture specification read by `modeling_projector.build` (see below). |
| `output_dim` | Target language-model embedding width (e.g., `4096`). |
| `base_model` | Object with `repo_id`, `revision`, `dtype`, and `training_fingerprint`. |
| `prompt` | Prompt rendering layout: `system`, `names`, `template_kwargs`, `include_reasoning`, and `atom_numbering`. |
| `scientific_inputs` | Array of input specs with `encoder`, `preprocessing`, `representation` (`feature_dim`, `modality`, `rows`, `maximum_tokens`), `scientific_readout`, and `side_features_per_object`. |
| `training_step` | Integer training step of the exported checkpoint. |
| `training` | Optional provenance block written by TrainKit exports (`step`, `export`, `xtuner_revision`, `initialized_from`, `trainable_parameters`, learning rate, sizing, manifest revision, and `dataset.json` / `features.json` provenance). |

## `projector` block fields {#projector}

All nine currently released checkpoints use `kind: "atom"`. Across the released checkpoints and `modeling_projector.build`, the following fields apply:

| Field | Scope | Description |
|---|---|---|
| `id` | Common (`atom`) | Architecture identifier (e.g., `"scientific-cif-positions"`). |
| `kind` | Common | `"atom"`, `"atom-set"`, or lead projector fallback when neither is set. |
| `modality` | Common (`atom`) | Modality identifier (e.g., `"cif"`, `"eeg"`, `"spectra"`). |
| `feature_dim` | Common | Input scientific feature dimension per token or atom. |
| `tokens` | Lead / `atom` | `null` for `atom` checkpoints; integer slot count for `LeadProjector`. |
| `hidden_dim` | Common (`atom` / Lead) | Hidden width of the MLP stack. |
| `index_dim` | Common (`atom` / `atom-set`) | Learned positional embedding width (`atom_index`). |
| `max_atoms` | Common (`atom` / `atom-set`) | Maximum number of position slots in `atom_index`. |
| `discrete_sizes`, `discrete_dim` | Optional (`atom`) | Per-atom discrete embedding table sizes and embedding dimension (e.g., `spectra/qm9s`: `[3]`, `16`). |
| `side_dim`, `side_hidden_dim` | Optional (`atom`) | Per-object side-feature width and MLP hidden width (e.g., `protein-seq/mpbind`: `2` / `128`; `rna/ncrna`: `13` / `128`). |
| `task_head_outputs` | Optional | Auxiliary head output width (`protein-seq/mpbind` and `protein-struct/psr`: `1`). |
| `readout_classes`, `readout_uses_side` | Optional (`atom`) | Pretrained scientific classification readout count and side-channel flag (`protein-seq/mpbind`: `1`, `false`). |
| `output_scale`, `depth`, `block_mult`, `block_exit_norm` | Optional | Output L2 norm scaling and residual MLP block options. |
| `graph_layers`, `graph_hidden_dim` | Optional (`atom`) | Bond-message residual layers over graph edges and bond types. |
| `context_layers`, `context_dim`, `context_heads` | Optional (`atom`) | Per-object Transformer context residual options. |
| `model_dim`, `layers`, `heads`, `ffn_dim` | `atom-set` | Transformer encoder parameters for `AtomSetProjector`. |

## Example (`cif/jarvis/config.json`) {#example}

```json
{
  "format_version": "sage-projector-v1",
  "component_type": "scientific_projector",
  "task": "cif/jarvis",
  "weights": "projector.safetensors",
  "projector": {
    "hidden_dim": 1024,
    "id": "scientific-cif-positions",
    "kind": "atom",
    "modality": "cif",
    "feature_dim": 64,
    "tokens": null,
    "index_dim": 32,
    "max_atoms": 512
  },
  "output_dim": 4096,
  "base_model": {
    "repo_id": "zai-org/GLM-5.3-Flash-BF16",
    "revision": "f9fed3bbc82291073373d67452e9f25317ef7577",
    "dtype": "bfloat16",
    "training_fingerprint": "5113ec01897c403098c40c38c897d9abb67222ec5caca80a862129037b30e6ea"
  },
  "prompt": {
    "system": "You are reading one crystal. Answer from the supplied scientific payload. Give brief reasoning and then the requested answer format.",
    "names": [["crystal"], ["First crystal", "Second crystal"]],
    "template_kwargs": { "reasoning_effort": "low" },
    "include_reasoning": true,
    "atom_numbering": false
  },
  "scientific_inputs": [
    {
      "encoder": {
        "name": "chgnet-0.3.0",
        "checkpoint_sha256": "d14ab7c0f093efe64b60a7bcd540bca10e74fb7f46c86108a079af60524659d1",
        "states": "one 64-dimensional state per atom entering the energy MLP; 6/3 angstrom cutoffs"
      },
      "preprocessing": null,
      "representation": {
        "feature_dim": 64,
        "modality": "cif",
        "rows": 60698,
        "maximum_tokens": 140
      },
      "scientific_readout": null,
      "side_features_per_object": false
    }
  ],
  "training_step": 2822
}
```
