Skip to content

About

Scientific perception for language models: connect crystals, spectra, biological sequences and biosignals through trained projectors.

Topics

Resources

Contributing

Stars

30 stars

Watchers

1 watching

Forks

Repository files navigation

Sage-SciPerception

Scientific perception for language models · 书生·元征

Standardize how crystals, spectra, biological sequences, and biosignals connect to language models through modular projectors, unified data contracts, and reproducible evaluation.

PyPI scipkit 8 Modalities Documentation Hugging Face Weights Training Samples CI status Apache 2.0 License Python 3.12+

Modalities · Docs · Quick start · Results · Contributing · Roadmap & Issues · 简体中文

A young scholar explores molecular, genomic, crystal and spectral representations in a scientific garden.

Sage-SciPerception standardizes the four orthogonal seams between scientific representations and language models:

Seam Interface What it standardizes
1. Encoder sage-training-data-v1 / FeatureCache Variable-length states (nodes, offsets), discrete atom/spectrum columns (modality.npy), and scientific readouts (side.npy)
2. Projector sage-projector-v1 (modeling_projector.py) Standalone .safetensors + config.json checkpoints portable across training and serving
3. Backbone ProjectorSession / prompt_embeds Non-invasive scientific embedding injection for vLLM /v1/completions and XTuner SFT
4. Task / Verifier EvalKit (EvalDataset, scip eval) Versioned holdout protocols, resumable run_id logs, and deterministic CPU scoring / RL rewards

News

  • 2026-12 (v0.2.1): Published scipkit (pip install scipkit, unified scip CLI), generalized ProjectorSession for non-GLM backbones, unified 9-modality client examples/vllm_projector.py, and the Modalities showcase.
  • 2026-11: Published all 9 EvalKit benchmark datasets, TrainKit recipes, and 2-row training slices on Hugging Face Datasets.

Examples

Joint spectra, streamed analysis, and a predicted molecule.
Three spectra → molecular structure
IR, Raman and UV–Vis with streamed analysis and a recorded prediction.
Protein sequence positions and reference interface annotations.
Protein interface sites
Sequence positions and reference residue-level annotations.
Crystal geometry and its reference formation energy.
Crystal structure and formation energy
Atomic geometry and a reference material property.
Recorded RNA interface experiments and evaluation feedback.
RNA interface refinement
Design revisions guided by experimental feedback.

Quick start

Install scipkit (pip install scipkit or pip install -e ".[infer]" from source), check your environment, and verify a released projector on CPU:

pip install "scipkit[infer]"   # or CPU-only scoring/inspection: pip install scipkit

scip doctor
scip list
scip download glm-5.3-flash/cif/jarvis --local-dir ./checkpoints
from load_projector import load_projector

projector, config = load_projector(
    "checkpoints/projectors/glm-5.3-flash/cif/jarvis", device="cpu"
)
print(config["task"], sum(p.numel() for p in projector.parameters()), config["output_dim"])
# cif/jarvis 4314304 4096

Documentation & guides

Topic Documentation Repository entry points
Modalities Supported modalities Overview, common datasets, and demos across 8 modalities
Quick start Get started load_projector.py, modeling_projector.py
Inference with vLLM Inference guide examples/README.md, examples/vllm_projector.py, examples/vllm_cif.py
Training a projector Training guide trainkit/README.md · Training samples
Evaluation Evaluation guide evalkit/, examples/neu06/README.md
Tutorial book Tutorial End-to-end chapters including all inference examples

Results

Scores from generated answers using selected task-specific checkpoints. Each task page documents its encoder, expected scientific_inputs, and training step.

Benchmark / task Metric ↑ Score Checkpoint Evaluation
JARVIS-DFT
Formation energy
MAD/MAE 15.03 Files llm4mat-jarvis
MPBind
PPI interface sites
Per-protein F1 (%) 61.12 Files mpbind-ba1
QM9S
Molecular structure identification
Acc@1 (%) 49.75 Files qm9s-allspectra
SciTS PHU01
ECG classification
Macro-F1 (%) 71.53 Files scits-phu01
GUE splice
Splice-site classification
MCC (%) 87.87 Files gue-splice
SciTS NEU06
Sleep staging
Macro-F1 (%) 72.01 Files scits-neu06 · NEU06 guide
BEACON ncRNA
RNA family classification
Accuracy (%) 97.35 Files beacon-ncrna
SimXRD OL
Crystal-system classification
Accuracy (%) 63.60 Files simxrd-ol
ATOM3D PSR
Protein structure ranking
Spearman (%) 35.36 Files atom3d-psr

Metrics differ across rows: MAD/MAE is a ratio where higher is better. MPBind uses the assembly-1 reconstructed evaluation set and mean per-protein F1; PSR uses mean Spearman. These scores do not describe a jointly trained model.

Contributing & Roadmap

We are actively building out support for additional language backbones (Qwen, InternLM, Llama), open-source end-to-end scientific encoders, and new frontier modalities (molecules, NMR, mass spectrometry, single-cell, microscopy, astronomy, weather & climate).

Contributors

yuhangzang
yuhangzang

License

This repository is released under the Apache License 2.0. Upstream datasets, base language models, and scientific encoders remain governed by their respective licenses.

Citation

If you use Sage-SciPerception (scipkit) in your work, please cite:

@misc{sage_sciperception,
  author       = {{InternLM}},
  title        = {{Sage-SciPerception}},
  version      = {0.2.1},
  note         = {GitHub repository},
  year         = {2026},
  url          = {https://github.com/InternLM/Sage-SciPerception}
}

About

Scientific perception for language models: connect crystals, spectra, biological sequences and biosignals through trained projectors.

Topics

Resources

Contributing

Stars

30 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages