SeisLM base

Pretrained seismic waveform encoder from SeisLM: a Foundation Model for Seismic Waveforms. Code and installation: https://github.com/liutianlin0121/seisLM

This is an encoder with the original self-supervised pretraining heads. It does not include a trained phase-picking or earthquake-detection head. Downstream adaptation is needed for those tasks. It is not a Transformers AutoModel artifact or a hosted inference endpoint.

Architecture and provenance

  • Parameters (including pretraining heads): 11,359,568
  • Transformer layers: 6
  • Contextual feature dimension: 240
  • Original checkpoint SHA-256: 6e97c53c562e9ba6bc96df85d8d208b89ff84e80a25468825f29bb5bace5eacb
  • Export: unchanged state tensors in safetensors plus the architecture configuration embedded in the original checkpoint. Optimizer state omitted.
  • Training sources recorded in the original checkpoint: ETHZ, GEOFON, STEAD, MLAAPDE, InstanceCounts, Iquique, PNW, OBST2024.

Input and output

Inputs: float32 tensors [batch, 3, samples], components ZNE, 100 Hz. Reference window: 3001 samples. Demean each component, then divide by its population standard deviation plus 1e-10 (replace zero standard deviation by 1). No automatic resampling, filtering, or component filling is performed. See preprocessing.json for the contract and missing-component caveat.

Contextual features have shape [batch, reduced_time, 240]. For 3001 input samples, reduced_time is 749. These are features, not P/S picks.

Loading

Package 0.2.1 adds Python 3.13 / NumPy 2 support for pretrained inference, including the current Colab runtime. Python 3.11–3.12 retain NumPy 1.x. This compatibility update leaves the model weights, configuration, and preprocessing unchanged; the original 0.2.0 wheel is retained for older pinned examples.

A compatible Python wheel is included so this release can be used before the source changes are merged or published to PyPI. Install with Python 3.11–3.13:

python -m pip install "https://huggingface.co/ltlltl2006/seislm-base/resolve/main/seislm-0.2.1-py3-none-any.whl"

For reproducible installation, replace main in the wheel URL with the reviewed model-repository commit. For GPU-specific PyTorch installation, use the PyTorch selector.

import torch
from seisLM import load_pretrained, encode

model = load_pretrained("ltlltl2006/seislm-base")
# Synthetic installation smoke example, not a scientific evaluation:
x = torch.randn(1, 3, 3001, generator=torch.Generator().manual_seed(2024))
x = x - x.mean(dim=-1, keepdim=True)
std = x.std(dim=-1, correction=0, keepdim=True)
x = x / (torch.where(std == 0, torch.ones_like(std), std) + 1e-10)
features = encode(model, x)
print(features.shape)

Set revision to a published model-repository commit for repeatable downloads. A local bundle directory also works offline.

Refactoring regression check

The exported weights were compared with the original Lightning-loaded checkpoint on fixed complete/noise/zero-channel inputs using CPU and NVIDIA GB10 CUDA, PyTorch 2.14.1+cu130, Python 3.12.3. All eight checked fields (encoder features, convolutional features, projected/quantized features, codebook perplexity, and three masked-loss values) matched exactly, with maximum absolute error 0. This is numerical parity on a regression fixture, not a downstream benchmark. See the source repository's regression documentation for the protocol.

Evaluation and limitations

The original paper evaluates fine-tuned task models, not this bare encoder. The paper's downstream scores cannot be inferred from successful loading or numerical parity of this artifact. Local adaptation and held-out evaluation are needed before relying on predictions for a new region or instrument.

License

These pretrained weights are released under the MIT license, as confirmed by the author. See LICENSE. The code is also distributed under MIT.

Citation

Tianlin Liu et al. (2024). SeisLM: a Foundation Model for Seismic Waveforms. arXiv:2410.15765. https://doi.org/10.48550/arXiv.2410.15765

Downloads last month
-
Safetensors
Model size
11.4M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for ltlltl2006/seislm-base