LPatchTST โ€” NIFTY 50 Trading Model

A patch-based Transformer (LPatchTST) trained on NIFTY 50 30-minute bars for directional signal prediction.

Files

File Description
best_model_lpatchtst.pth Best fine-tuned checkpoint
pretrained_lpatchtst.pth Pre-trained backbone checkpoint
config.py Hyperparameters & architecture config
model.py Model definition

Loading the model

import torch
import sys
sys.path.insert(0, ".")   # ensure local modules are importable

import config
from model import LPatchTST

net = LPatchTST(
    input_mode=config.INPUT_MODE,
    seq_len=config.LOOKBACK_WINDOW,
    n_features=0,          # set to your feature count
    s1_bits=config.TOKENIZER_S1_BITS,
    s2_bits=config.TOKENIZER_S2_BITS,
    d_model=config.D_MODEL,
    patch_len=config.PATCH_LEN,
    stride=config.STRIDE,
    n_heads=config.N_HEADS,
    n_layers=config.N_LAYERS,
    lstm_layers=config.LSTM_LAYERS,
    dropout=config.DROPOUT,
    aggregation=config.AGGREGATION_MODE,
)
state = torch.load("best_model_lpatchtst.pth", map_location="cpu")
net.load_state_dict(state)
net.eval()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support