Views
No views yet
CRUISEResearchGroup/CGM-JEPA-PretrainingCRUISEResearchGroup/CGM-JEPA-Downstreamhuggingface-cli download CRUISEResearchGroup/CGM-JEPA --local-dir Output1# Reproduce paper Tables 1–6
2python scripts/run_all_eval.py.
├── cgm_jepa/
│ ├── model.safetensors
│ └── config.json
├── x_cgm_jepa/
│ ├── model.safetensors
│ └── config.json
└── baselines/
├── gluformer.pt
└── ts2vec.pklcgm_jepa/ and x_cgm_jepa/ use the standard PyTorchModelHubMixin layout — model.safetensors for weights, config.json for architecture hyperparameters — so they load via the standard from_pretrained one-liner.from_pretrained one-linerEncoder is a PyTorchModelHubMixin subclass, so the architecture hyperparameters and weights load in a single call directly from this repo:1from models.encoder import Encoder
2
3encoder = Encoder.from_pretrained("CRUISEResearchGroup/CGM-JEPA", subfolder="cgm_jepa")
4encoder.eval()
5
6# X-CGM-JEPA: same call, different subfolder
7encoder_x = Encoder.from_pretrained("CRUISEResearchGroup/CGM-JEPA", subfolder="x_cgm_jepa")1import torch
2import torch.nn as nn
3from models.gluformer.gluformer import GluFormer
4
5vocab_size = 278
6gluformer = GluFormer(
7 vocab_size=vocab_size,
8 embed_dim=96,
9 nhead=6,
10 num_layers=3,
11 dim_feedforward=192,
12 max_seq_length=25000,
13 dropout=0.0,
14 pad_token=vocab_size,
15)
16gluformer.load_state_dict(
17 torch.load("Output/baselines/gluformer.pt", map_location="cpu")["encoder"]
18)
19gluformer.output_head = nn.Identity() # discard the LM head for embedding extraction
20gluformer.eval()cgm_jepa and x_cgm_jepamodels.encoder.Encoder class with identical hyperparameters; only the pretraining objective differs. At downstream / inference time only the temporal encoder is used.| Field | Value |
|---|---|
patch_size | 12 |
encoder_kernel_size | 3 |
encoder_embed_dim | 96 |
encoder_nhead | 6 |
encoder_num_layers | 3 |
(B, num_patches, patch_size) (raw glucose values, z-scored).
Output: per-patch embedding of shape (B, num_patches, embed_dim).1@article{muhammad2026cgm,
2 title = {CGM-JEPA: Learning Consistent Continuous Glucose Monitor Representations via Predictive Self-Supervised Pretraining},
3 author = {Muhammad, Hada Melino and Li, Zechen and Salim, Flora and Metwally, Ahmed A},
4 journal = {arXiv preprint arXiv:2605.00933},
5 year = {2026}
6}