Downloads · 30 days
9
36% of all-time downloads
Siyam025/MODEL-2
MODEL-2 is a machine learning model from Siyam025. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
crypto-ts-transformer is a Transformer-based time-series regressor trained to predict short-term cryptocurrency price movement (close returns) using OHLCV features plus a market sentiment signal. It is designed for re…
Downloads · 30 days
9
36% of all-time downloads
All-time downloads
25
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.3 KB · 44%
From the Hugging Face model README
crypto-ts-transformer is a Transformer-based time-series regressor trained to predict short-term cryptocurrency price movement (close returns) using OHLCV features plus a market sentiment signal. It is designed for research and prototyping in quant strategies and short-horizon forecasting.
seq_length timesteps (default 96).scaler: standard). Mismatched scaling will degrade outputs.import torch
import numpy as np
# Load model (load state_dict into your TransformerRegressor class)
# This repository contains only the config and weights; loading code is expected to be part of your infra.
from your_package import TransformerRegressor # placeholder
config = {
"input_size": 6,
"d_model": 128,
"num_encoder_layers": 4,
"num_decoder_layers": 2,
"num_attention_heads": 8,
"dim_feedforward": 512,
"dropout": 0.1,
"output_size": 1,
"seq_length": 96,
"prediction_horizon": 12
}
model = TransformerRegressor(**config)
state = torch.load("pytorch_model.bin", map_location="cpu")
model.load_state_dict(state)
model.eval()
# Example input: (batch, seq_length, input_size)
dummy = np.random.randn(1, config["seq_length"], config["input_size"]).astype("float32")
x = torch.from_numpy(dummy)
with torch.no_grad():
preds = model(x) # shape: (batch, horizon, output_size)
print(preds.shape)