Your all-in-one playground for self-supervised learning — from raw data to smart embeddings in audio, vision, graphs, and cross-modal magic under one roof.
Say hello to MK_SSL — a library born from late-night debugging, too much coffee, and the realization that SSL shouldn’t feel like solving a Rubik’s cube in the dark. It’s a unified playground and command center where you can test state-of-the-art methods, swap modalities with a single line, and keep your sanity intact. Everything is modular, transparent, and reproducible.
Whether you’re a student, researcher, or practitioner, MK_SSL has your back. With HuggingFace and PyTorch Lightning baked in—plus distributed training, hyperparameter tuning, and lightweight fine-tuning—you’ll spend less time wrestling with setup and more time exploring ideas. In short: rigor meets playfulness. It also consolidates the earlier AK_SSL project; everything from AK_SSL is now accessible directly from MK_SSL with the same syntax in one unified framework.
High-level APIs for rapid experimentation
Integrated with PyTorch Lightning
Compatibility with pretrained transformers & backbones
Multi-GPU/multi-node deep learning
Parameter-efficient fine-tuning support
Hyperparameter optimization with Optuna
Dynamic visualizations for embeddings (text only)
Clean, customizable logging system
MIT License
Use trainer.train(...) to launch experiments with clear, composable arguments.
Control datasets, batch size, epochs, optimizer, HPO, and logging from a single call.
Track runs with WandB and text-based embedding summaries out of the box.
trainer.train(
train_dataset=train_dataset,
val_dataset=val_dataset,
batch_size=16,
epochs=100,
lr=1e-4,
weight_decay=1e-2,
optimizer="adamw",
use_hpo=True,
n_trials=20,
tuning_epochs=5,
use_embedding_logger=True,
logger_loader=logger_loader
)
Evaluate learned representations with linear classifiers
Complete model fine-tuning for downstream tasks
Dimensionality reduction for embedding analysis (text summaries only)
Non-linear dimensionality reduction (text summaries only)
Dynamic summaries of training progress
Standardized evaluation across all domains
pip install mk-ssl
DDP and DeepSpeed integration for large-scale training
Command-line interface for easy experiment management
Real-time experiment monitoring dashboard
Comprehensive benchmark suite for SSL methods
Thanks to Dr. Peyman Adibi and Dr. Hossein Karshenas for their invaluable guidance and support throughout this project.