Skip to content

This is the multi-page printable view of this section.

Return to the regular view of this page

Blog

Project announcements and engineering notes from Sage-SciPerception.

Read how Sage-SciPerception connects scientific representations to GLM-5.3-Flash, and how its public tools serve, evaluate, and train the nine released projectors.

1 - One training path for nine projector modalities

How TrainKit aligns feature exports, XTuner packing, and serving-compatible checkpoints.

The nine released projectors share the atom architecture, with task-specific feature widths and optional components. The first public TrainKit recipe trained an NEU06 sleep-staging projector. The general recipe extends the same training contract across all nine modalities while retaining the strict NEU06 recipe.

Hand off frozen features through a common export

A sage-training-data-v1 manifest points to split JSONL files and a feature cache. Each training row names its objects by array_index. The cache holds frozen feature rows and their offsets, and can supply discrete columns or side features for components that require them. The public training samples show how the files are organized.

The component configuration drives the projector and prompt layout, including multi-object or numbered payloads. TrainKit builds the supervision mask and collates the scientific inputs so they can be inserted into the packed token sequence. XTuner runs FSDP, the optimizer, and the loss against the frozen language model.

Check the actual packs before launch

scip-train preflight uses the recipe’s XTuner dataset, sampler, and collator to check the data and payload alignment. It reports pack count, dropped packs, and resulting steps. Sequence parallelism constrains the pack length, and data parallelism constrains the global batch size. With round_up=False, a tail smaller than one global batch is dropped. The two-row public NEU06 example uses a packing chunk size of one to produce two packs for one global batch.

Export the interface used by inference

recipes/projector_sft.py handles the nine published variants. recipes/neu06_projector.py applies the strict NEU06 checks. A saved step exports projector.safetensors and a config.json that records the component interface and training provenance. The public loader and the vLLM prompt adapter use this same format, and EvalKit scores the predictions from the resulting service. The training chapter shows how to run preflight on the sample.

2 - Reproducible evaluation across nine benchmarks

Frozen inputs, stable prediction logs, and dataset-specific CPU scoring.

EvalKit began with SciTS NEU06 sleep staging. It now exposes nine dataset IDs through a single scip-eval score command. Each dataset implementation owns its references, answer rules, and metrics. The scorer aligns reference IDs with saved JSONL predictions, then writes per-item results and an aggregate summary.

Verify the reference set and keep parsing explicit

For SciTS NEU06, the loader compares the number of references and the SHA-256 of ordered [eval_id, label] pairs with the frozen protocol. Other suites record fingerprints or validate their own reference artifacts. These checks and metadata identify what was scored even when different suites use different file formats.

The shared answer_span takes the text after the final </think>, selects the last complete <answer>…</answer> span when present, and strips an enclosing Markdown fence. Each dataset still defines what it considers a valid prediction and how to score it. NEU06, for example, can report malformed output separately from the stage labels it extracted.

Bind each log to a generation run

The generation loop binds a run_id to ordered inputs, model and service identity, and decoding settings. A sidecar records the identity, and each append carries the ID. With the same identity, resuming skips IDs already written. Changing settings requires a new file. Existing prediction logs can be scored without a run_id. For repeated eval_id records the scorer uses the last entry.

By default the scorer includes every frozen ID and treats missing predictions as empty answers. The --only-responded mode measures a subset and records that choice in the result.

Keep CPU dependencies local to each metric

The core package is standard-library first. ATOM3D PSR uses scipy for ranking, while QM9S molecular scoring uses rdkit, myopic-mces, and pulp. The root CPU CI job installs the optional dependencies, runs the root, EvalKit, and TrainKit suites, and fails if any test is skipped.

The evaluation tutorial walks through NEU06 and lists all nine IDs. Read the CI workflow.

3 - Serving scientific inputs through prompt embeddings

How the client constructs scientific prompts while vLLM serves the backbone.

The public crystal example maps CHGNet atom states into the same embedding space as GLM-5.3-Flash text tokens. Doing the projection on the client lets the stock vLLM service use its prompt_embeds interface. A new task can bring its own scientific representation and projector configuration while using the same language-model endpoint.

Build the prompt as the backbone expects it

The client renders the checkpoint’s native chat template with positions reserved for the scientific payload. It reads the required text embedding rows from the same backbone snapshot served by vLLM. Next it projects the scientific features, checks the row count against the reserved spans, and copies those rows into the text embedding matrix using its dtype. The client serializes the full matrix and sends it to /v1/completions, where vLLM continues generation.

This makes the model revision part of the interface. The tokenizer, text embedding rows, and prompt layout must agree with the checkpoint and the served backbone. The local client can read the necessary rows without loading the full language model.

Reuse model state across different payloads

GlmProjectorPrompt caches a fixed question and payload layout. The NEU06 example uses it for EEG segments with a common feature length. GlmProjectorSession reuses the projector and tokenizer across questions whose input lengths vary. It computes the spans for each prompt and retrieves the corresponding text rows.

For a multi-object prompt, the adapter takes feature rows in object order and receives a length for each object. The configuration can render numbered positions via atom_numbering, and the caller can supply grouped payload_labels. Optional discrete and side inputs follow the projector configuration. When the projector requires counts, the default is the list of per-object lengths. These details stay in the client adapter, with vLLM receiving the finished embedding matrix.

See the serving tutorial for startup flags and a working crystal command. Read the adapter source.

4 - Introducing Sage-SciPerception

Nine task-specific projectors connect scientific data to a frozen language model.

Sage-SciPerception v0.1.0 releases nine task-specific projector checkpoints for GLM-5.3-Flash, their configuration files, and public loading and crystal inference code. Each projector receives features from a scientific encoder or preprocessing pipeline and maps them into the language model’s input space. The same serving interface can carry features from crystals, spectra, biological sequences, and biosignals.

The Sage S2.1 Flash Technical Report describes the broader approach, in which modality-specific projectors bring scientific representations into the input space of a shared backbone. The checkpoints here are separate task-specific components paired with the GLM-5.3-Flash revisions in their configuration files.

Published v0.1.0 results

BenchmarkMetricPublished score
JARVIS-DFTMAD/MAE15.03
MPBindPer-protein F1 (%)61.12
QM9SAcc@1 (%)49.75
SciTS PHU01Macro-F1 (%)71.53
GUE spliceMCC (%)87.87
SciTS NEU06Macro-F1 (%)72.01
BEACON ncRNAAccuracy (%)97.35
SimXRD OLAccuracy (%)63.60
ATOM3D PSRSpearman (%)35.36

Scores are from generated answers using the selected checkpoint for each task. JARVIS uses MAD/MAE, where higher is better. MPBind reports mean per-protein F1 on the assembly-1 reconstructed evaluation set. PSR reports mean Spearman.

Four public showcases

Three spectra to a molecular structure

IR, Raman, and UV–Vis spectra feed a replay of the analysis and predicted structure.

Three spectra, streamed analysis, and a recorded structure prediction

Protein interface sites

The demo shows positions in a protein sequence alongside reference annotations for individual residues.

Protein sequence positions and residue-level interface annotations

Crystal structure and formation energy

The crystal demo pairs atomic geometry with a reference formation energy.

Crystal geometry and reference formation energy

RNA interface refinement

The replay shows revisions to an RNA integration design guided by experimental feedback.

RNA interface revisions and experimental feedback

The release entry identifies the code tag and pinned weight snapshot. The tutorial starts with checkpoint anatomy and a CPU forward pass.