r/SelfHostedAI • • 5d ago

LingSante-Pulse's MIT waveform encoder has a local CPU smoke test

LingSante-Pulse-1.0 has released waveform-encoder weights and inference code under MIT. The repository documents CPU inference with synthetic examples, so there is a concrete way to check that the feature extractor loads before connecting real ECG, EEG, PPG or EMG data.

From a clone of `inclusionAI/LingSante-Pulse`, install the documented dependencies with `python -m pip install -r requirements.txt` and then `python -m pip install . --no-deps`. The model card's single-lead ECG example is:

  1. import numpy as np
  2. from lingsante_pulse import LingSantePulse
  3. model = LingSantePulse.from_pretrained()
  4. x = np.random.default_rng(42).normal(size=(2, 1, 1280)).astype(np.float32)
  5. f = model.encode(x, sample_rate=128, channels=[{"modality": "ECG", "lead": "II"}])
  6. print(f["cls"].shape, f["patch_mean"].shape)
  7. torch.Size([2, 256]) torch.Size([2, 256])

The first load downloads the public weights; a cached local model directory can be loaded with `local_files_only=True` for an offline repeat. The code handles observed-sample information and storage-padding masks separately. This example proves the interface returns embeddings; it is not a throughput benchmark or a disease classifier. Those need separate evaluation on real data and hardware.

9 Upvotes

0 comments sorted by