Improve model card metadata and content
#2
by nielsr HF Staff - opened
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263649 unmodified lines747576777879806 unmodified lines87888990---license: mittags:- time-series- mixture-of-experts- forecasting- pytorch- fftmodel-index:- name: SuperLinearresults: []---# Super-Linear: A Mixture of Experts Time Series Forecasting ModelSuperLinear is a novel time series forecasting model that employs a Mixture of Experts (MoE) architecture to achieve superior performance across various forecasting tasks. The model routes inputs to the most relevant experts based on frequency-domain analysis using FFT-based gating networks.## Model ArchitectureThe SuperLinear model consists of:- **Sparse Mixture of Experts (MoE)**: Routes inputs to the top-k most relevant experts- **FFT-based Gating Network**: Uses frequency domain analysis to determine expert routing- **Frequency-specific Experts**: Pre-trained experts specialized for different temporal patterns## Key Features- **Adaptive Expert Selection**: Dynamic routing based on input characteristics- **Frequency-aware Processing**: Leverages FFT analysis for intelligent expert selection- **Auto-regressive Capabilities**: Supports long-horizon forecasting- **Multi-scale Processing**: Handles various sequence lengths through resampling## Updates- On 26/01/2026 a slight implementation modification was introduced, now inference is more than 10x faster! Making Super-Linear the fastest pre-trained forecaster!## Usage```pythonfrom transformers import AutoModelForCausalLM, AutoConfigimport torch# Load the modelmodel = AutoModelForCausalLM.from_pretrained("SequentialLearning/SuperLinear", trust_remote_code=True)# Prepare input time series data# Shape: [batch_size, channel, sequence_length] or [batch_size, sequence_length]input_data = torch.randn(1, 1, 512)# Generate predictionswith torch.no_grad():outputs = model(inputs_embeds=input_data, pred_len=96, get_prob = True)preds = outputs.logits # Predicted valuesprobs = outputs.attentions # Expert probabilities stored here```## ConfigurationKey parameters:- `train_seq_len`: Training sequence length (default: 512)- `train_pred_len`: Training prediction length (default: 96)9 unmodified lines## CitationIf you use SuperLinear in your research, please cite:```bibtex@article{nochumsohn2025super,6 unmodified lines## LicenseThis model is released under the MIT License.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677789 unmodified lines888990919293946 unmodified lines101102103104---license: mitlibrary_name: transformerspipeline_tag: time-series-forecastingtags:- time-series- mixture-of-experts- forecasting- pytorch- fftmodel-index:- name: SuperLinearresults: []---# Super-Linear: A Mixture of Experts Time Series Forecasting ModelSuper-Linear is a lightweight and scalable mixture-of-experts (MoE) model for general time series forecasting. It replaces deep architectures with simple frequency-specialized linear experts, trained on resampled data across multiple frequency regimes. A lightweight spectral gating mechanism dynamically selects relevant experts, enabling efficient, accurate forecasting.The model was introduced in the paper [Super-Linear: A Lightweight Pretrained Mixture of Linear Experts for Time Series Forecasting](https://huggingface.co/papers/2509.15105).## Model ArchitectureThe Super-Linear model consists of:- **Sparse Mixture of Experts (MoE)**: Routes inputs to the top-k most relevant experts.- **FFT-based Gating Network**: Uses frequency domain analysis to determine expert routing.- **Frequency-specific Experts**: Pre-trained experts specialized for different temporal patterns.## Key Features- **Adaptive Expert Selection**: Dynamic routing based on input characteristics.- **Frequency-aware Processing**: Leverages FFT analysis for intelligent expert selection.- **Auto-regressive Capabilities**: Supports long-horizon forecasting.- **Multi-scale Processing**: Handles various sequence lengths through resampling.## Updates- On 26/01/2026 a slight implementation modification was introduced, now inference is more than 10x faster! Making Super-Linear the fastest pre-trained forecaster!## UsageYou can use the model via the `transformers` library. Ensure you have `trust_remote_code=True` set.```pythonimport torchimport numpy as npfrom transformers import AutoModelForCausalLMmodel_path = "SequentialLearning/SuperLinear"model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)seq_len = 512pred_len = 96# Create sample datafreq = 1/24amp = 1ph = 0t = torch.arange(0, seq_len + pred_len)s = amp * torch.sin(2 * np.pi * freq * t + ph)x = s[:seq_len].unsqueeze(0) # Add batch dimwith torch.no_grad():# takes shapes (B, V, L) or (B, L)output = model(x, pred_len=pred_len, get_prob=True)preds = output.logits # Predicted valuesprobs = output.attentions # Expert probabilities stored hereexpert_names = model.backbone.experts.keys()```## ConfigurationKey parameters in `config.json`:- `train_seq_len`: Training sequence length (default: 512)- `train_pred_len`: Training prediction length (default: 96)9 unmodified lines## CitationIf you use Super-Linear in your research, please cite:```bibtex@article{nochumsohn2025super,6 unmodified lines## LicenseThis model is released under the MIT License.
README.md+46-32