Alpha Leak uses LightGBM gradient boosting models compiled to ONNX format and executed in-process viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alphaleaks60-maker/docs2/llms.txt
Use this file to discover all available pages before exploring further.
onnxruntime-node. There is no separate inference server — models run inside the same Node.js process as the pipeline, which eliminates a network hop and keeps inference latency in the low milliseconds even at high signal throughput.
Model families
Two families of models operate concurrently, each answering a different question about token price trajectory.Standard models
Score signals from tracked wallet buys using a 68-feature vector. Answer: given what we know about this wallet, this token, and the current market, what is the probability that price reaches X× within Y minutes?
Genesis models
Score newly created tokens based on their first-60-second behaviour using a 75-feature vector. Answer: given the launch dynamics of this token, what is the probability it reaches X× within Y minutes?
Standard model targets
The four standard models each target a distinct prediction horizon and are consumed independently by different trading strategies.| Model file | Target | Use case |
|---|---|---|
reach_2x_1h.onnx | Probability of 2× in 1 hour | Primary strategy: reach_2x_1h |
reach_3x_30m.onnx | Probability of 3× in 30 minutes | Phase 2+ strategy: reach_3x_30m |
reach_2x_10m.onnx | Probability of 2× in 10 minutes | Phase 3 strategy: reach_2x_10m |
is_dead_soon.onnx | Probability of imminent death | Veto signal, combined with others |
ONNX deployment
Each model is stored as a file pair insrc/ml/models/. The .onnx file contains the compiled model weights; the _metadata.json sidecar contains everything the inference code needs to use it correctly.
Metadata format
The_metadata.json file follows this schema:
feature_names array is the canonical ordered feature list for that model version. The inference code reads this array and assembles the Float32Array input tensor in exactly that order, substituting default values for any missing features.
Hot reloading
The model directory is scanned every 5 minutes. If a new.onnx file appears that is not already loaded, it is immediately loaded into an ONNX session and added to the active model set. ONNX sessions from previous model versions are released to free memory.
Calibration
Raw LightGBM outputs are probability-like but often miscalibrated — the model may output 0.70 for signals where the actual hit rate at that probability level is only 0.50. This makes raw scores unreliable as thresholds in strategy configs. Every model is calibrated post-training using Platt scaling: a sigmoid function fitted on a held-out calibration set. The transformation applied at inference time is:platt_a and platt_b parameters come from the model’s _metadata.json. After calibration, a model output of 0.80 means approximately 80% of signals at that score level actually hit the target — which is what makes the threshold values in strategy configuration meaningful rather than arbitrary.
Inference pipeline
Every 5 seconds,MlInference fetches unscored signals from the database and runs them through all loaded models. Each signal goes through the same five steps:
Assemble the feature vector
The 68-feature vector is assembled in the canonical order defined by the model’s
feature_names metadata. Default values are substituted for any features that are unavailable for this signal.Create the input tensor
Each model’s input is a
Float32Array of shape [1, 68], one row per signal. For genesis models the shape is [1, 75].Run the ONNX session
The ONNX runtime executes the model graph. For binary classification models the output is a
[1, 2] probability tensor; the second element — P(class=1) — is extracted as the raw score.Apply Platt calibration
The raw probability is passed through the sigmoid transform using the
platt_a and platt_b parameters from the model’s metadata file.Composite scoring
When multiple models are loaded, all four are run against every signal and their scores are stored independently. The live trader reads the score that corresponds to its configured strategy target.| Column | Source model |
|---|---|
ml_score_1h | reach_2x_1h.onnx |
ml_score_30m | reach_3x_30m.onnx |
ml_score_10m | reach_2x_10m.onnx |
dead_prob | is_dead_soon.onnx |
dead_prob score acts as a veto across all strategies. A signal with ml_score_1h = 0.85 and dead_prob = 0.03 is a strong candidate for the reach_2x_1h strategy. The same signal with dead_prob = 0.40 would be rejected regardless of its primary score.
Fallback behaviour
Ifonnxruntime-node is not installed, or if no model files are present in the models directory, the pipeline degrades gracefully rather than failing.
This means the pipeline can be run from day one without any trained models. It will collect signals and wallet data, which can later be used to train the first model.
MlInferencelogs a warning at startup and disables itself- All signals receive
ml_score = NULL - The live trader falls back to
COALESCE(ml_score_1h, rule_score, 0), using the rule-based composite signal score as its primary decision metric - All other pipeline phases — ingestion, scoring, intelligence — continue operating normally
Feature reference
Complete documentation for all 68 features in the standard model vector.
Training methodology
How models are trained, calibrated, exported, and hot-reloaded.