Meridian.AI β Financial Prediction Models
Overview
Meridian.AI is a deep-learning system for predicting price movements across stocks and forex pairs. Version 5.1 keeps the MeridianModel architecture introduced in v5.0 (Grouped Query Attention + Mixture-of-Experts + optional Mamba SSM) and adds a hardened training pipeline: signal-safe shutdown, atomic checkpoint writes, comprehensive Comet ML telemetry on every run, and an audit trail of which symbols / date ranges fed each training job.
Repository layout
meridianal/ARA.AI/
βββ models/
β βββ Meridian.AI_Stocks.pt β current v5 stock checkpoint
β βββ Meridian.AI_Forex.pt β current v5 forex checkpoint
βββ legacy/
βββ <archived pre-v5 checkpoints>
Anything older than v5 has been moved into legacy/. Loaders accept both
old (RevolutionaryFinancialModel-2026) and new (MeridianModel-2026)
architecture strings, but newly trained checkpoints always advertise
MeridianModel-2026 and version=5.1.0.
Model versions
| Version | Architecture string | Params | Status |
|---|---|---|---|
| v5.1 | MeridianModel-2026 |
~11M (CPU) | Current β hardened CI, full Comet telemetry, atomic saves |
| v5.0 | MeridianModel-2026 |
~11M (CPU) | Loadable |
| v4.1 | RevolutionaryFinancialModel-2026 |
~45M | Loadable; archived in legacy/ on HF |
| β€ v4.0 | various | various | Archived; loader refuses |
Architecture
MeridianBlock
Each layer of MeridianModel is a MeridianBlock containing:
- RMSNorm β pre-norm before attention
- GroupedQueryAttention (GQA) β multi-head attention with fewer KV heads; QK-Norm for stability; RoPE position encoding
- Optional MambaBlock β vectorised selective-scan SSM (disabled in CPU default)
- Layer Scale β per-block learnable scalar (init 0.1) for training stability at depth
- Stochastic Depth β drop-path regularisation
- RMSNorm β pre-norm before MoE
- MixtureOfExperts β
num_expertsSwiGLU expert networks, top-2 routing
Component table
| Component | Implementation | Purpose |
|---|---|---|
| Attention | GQA + QK-Norm | Reduced KV cache, training stability |
| Position | RoPE | Relative temporal awareness |
| Expert routing | MoE, top-2, SwiGLU | Regime-specific specialization |
| Activations | SwiGLU | Better gradient flow vs GELU/ReLU |
| Normalisation | RMSNorm + Layer Scale | Stable training at depth |
| Regularisation | Stochastic Depth | Generalisation, prevents overfitting |
| Optional SSM | Mamba (vectorised scan) | Long-range sequential dependencies |
| Loss | BalancedDirectionLoss | Joint regression + direction accuracy |
Model specifications
| Spec | CPU Default (v5.0) | GPU / Large |
|---|---|---|
| Parameters | ~11M | ~45M |
| Hidden dimension | 256 | 384 |
| Layers | 6 | 6 |
| Attention heads | 4 | 6 |
| KV heads | 2 | 2 |
| Experts | 4 (top-2) | 4 (top-2) |
| Prediction heads | 4 | 4 |
| Mamba SSM | Disabled | Optional |
| Input features | 44 | 44 |
| Sequence length | 30 timesteps | 30 timesteps |
Available models
Meridian.AI Stocks
- File:
models/Meridian.AI_Stocks.pt - Coverage: 49+ equities β AAPL, MSFT, GOOGL, AMZN, TSLA, NVDA, JPM, SPY, and more
- Data: Daily + 2yr hourly + 5yr weekly OHLCV with 44 technical indicators
- Training: Automatic CI retrain (GitHub Actions)
- Tracking: Comet project
meridianalgo/meridian-ai-stock-v5
Meridian.AI Forex
- File:
models/Meridian.AI_Forex.pt - Coverage: 22 currency pairs β EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CHF, USD/CAD, etc.
- Data: Multi-timeframe OHLCV with 44 technical indicators
- Training: Automatic CI retrain (GitHub Actions)
- Tracking: Comet project
meridianalgo/meridian-ai-forex-v5
Usage
from huggingface_hub import hf_hub_download
from meridianalgo.unified_ml import UnifiedStockML
model_path = hf_hub_download(
repo_id="meridianal/ARA.AI",
filename="models/Meridian.AI_Stocks.pt"
)
ml = UnifiedStockML(model_path=model_path)
prediction = ml.predict_ultimate("AAPL", days=5)
print(prediction)
from huggingface_hub import hf_hub_download
from meridianalgo.forex_ml import ForexML
model_path = hf_hub_download(
repo_id="meridianal/ARA.AI",
filename="models/Meridian.AI_Forex.pt"
)
ml = ForexML(model_path=model_path)
prediction = ml.predict("EURUSD=X", days=5)
print(prediction)
Training configuration
| Setting | Value |
|---|---|
| Optimizer | AdamW (weight_decay=0.02, betas=(0.9, 0.95)) |
| LR warmup | 2-epoch linear ramp, 10% β 100% of base LR |
| Scheduler | CosineAnnealingWarmRestarts after warmup |
| Loss | BalancedDirectionLoss (60% Huber + 40% weighted BCE) |
| Effective batch size | 256 via gradient accumulation |
| Gradient clipping | Max norm 1.0 |
| EMA | Decay 0.999 β used for validation and saved checkpoint |
| Data augmentation | Gaussian noise (0.5%) + timestep masking (5%) |
| Early stopping | Patience 15 on EMA validation loss |
| Mixed precision | bfloat16 on CPU, float16 on CUDA |
| Feature clamping | [-10, 10] after z-score normalisation |
| Sample cap | 60K most-recent rows per run |
| CI budget | 35 minutes, up to 999 epochs (was 45 β tightened in v5.1) |
| Signal handling | SIGTERM/SIGINT β save best EMA, then exit (v5.1) |
| Checkpoint write | Atomic (.tmp β os.replace) β never partial (v5.1) |
| Comet logging | Every loss, every metric, per-symbol dataset audit (v5.1) |
Checkpoint format
Every v5.0 .pt file contains:
{
"model_state_dict": ..., # PyTorch weights
"model_type": "stock", # or "forex"
"architecture": "MeridianModel-2026",
"version": "5.1.0",
"input_size": 44,
"seq_len": 30,
"dim": 256,
"num_layers": 6,
"num_heads": 4,
"num_kv_heads": 2,
"num_experts": 4,
"num_prediction_heads": 4,
"dropout": 0.1,
"use_mamba": False,
"mamba_state_dim": 4,
"scaler_mean": Tensor, # shape (44,)
"scaler_std": Tensor, # shape (44,)
"metadata": {
"best_val_loss": float,
"direction_accuracy": float, # percent (0β100)
"target_min": float,
"target_max": float,
"training_history": [...],
}
}
Technical indicators (44 features)
| Category | Indicators |
|---|---|
| Price | Returns, Log Returns, Volatility, ATR |
| Trend | SMA (5/10/20/50/200), EMA (5/10/20/50/200) |
| Momentum | RSI, Fast RSI, Stochastic RSI, Momentum, ROC, Williams %R |
| Oscillators | MACD, MACD Signal, MACD Histogram, Stochastic K/D, CCI |
| Volatility | Bollinger Bands (Upper/Lower/Width/%B), Keltner Channels (Upper/Lower/%K) |
| Volume | Volume SMA, Volume Ratio, OBV (normalized) |
| Trend Strength | ADX, +DI, -DI, Price vs SMA50/SMA200, ATR% |
| Mean Reversion | Z-Score (20d), Distance from 52-week High |
Limitations
- Performance may degrade during black swan events or extreme market dislocation.
- Predictive accuracy decreases as the forecast horizon extends beyond a few days.
- The model reflects statistical patterns in historical data β these patterns may not persist.
- Pre-v5.0 checkpoints (before 2026-05-15) have a known bug where validation never ran; direction accuracy is unreliable on those models.
- For research and educational use only β not financial advice.
Citation
@software{meridianalgo_2026,
title = {Meridian.AI: Financial Prediction Engine},
author = {MeridianAlgo},
year = {2026},
version = {5.1.0},
url = {https://github.com/MeridianAlgo/AraAI}
}
Disclaimer
These models are for research and educational purposes only. They do not constitute financial advice. Trading financial instruments carries significant risk. Past performance does not guarantee future results. The developers and contributors are not liable for any financial losses. All trading decisions are yours alone.
License
MIT License. See the GitHub repository for details.