This repository contains the code for training and fine-tuning the Seismic LM model, a transformer-based language model for seismic waveforms.
The model is based on the Wav2Vec2 and is trained on SeisBench, a large collection of seismic waveforms. The model can be used for various tasks in seismology, including waveform classification, phase picking, and event detection.
Pretrained Seismic LM checkpoints are available for download here.
See the colab demos below for examples on how to load the pretrained checkpoints for interence and finetuning.
Examples | |
---|---|
Visualize SeisLM base pretrained features | |
Finetune SeisLM base on foreshock-aftershock task |
To install the Seismic LM model, you can use the following command:
conda create -n seislm python=3.9 -y
source activate seislm
# Install necessary dependencies
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y
pip install seisbench ml-collections pandas scikit-learn transformers einops gitpython wandb lightning torchtune
# Clone the SeisLM repo and install it
git clone https://github.com/liutianlin0121/seisLM.git
cd seisLM
pip install -e .