Back to directory

pragmatiq

An open, developer-friendly implementation of a research paper's approach to turning timestamped banking event histories, such as transactions and app sessions, into embeddings for fraud detection, anti-money-laundering graph analysis, and credit scoring.

Visit website (opens in a new tab)pragmatiq.getdynamiq.ai
pragmatiq

pragmatiq reimplements the PRAGMA paper's recipe for a foundation model of heterogeneous banking behavior, such as transactions, app sessions, trades, communications and account transfer relationships, since the paper itself does not ship reference code. It includes a deterministic synthetic banking-data generator, a tokenizer, a padding-free PyTorch model, a training pipeline, a batch embedding step, and serving through ONNX and Triton, plus notebooks and a Streamlit demo, so a researcher or engineer can run, inspect, adapt and benchmark the approach directly.

It is GPU-first and CPU-complete: every command uses a CUDA device with bf16 precision when one is available, including a padding-free variable-length attention kernel if flash-attn is installed, and otherwise runs the identical code in fp32 on CPU, more slowly but with the same output contract. The resulting embeddings are intended as an input to downstream tasks such as probing, LoRA fine-tuning, graph-based anti-money-laundering experiments, and serving.

It requires Python 3.11 or later and PyTorch 2.6 or later, and is licensed under Apache-2.0; it is an independent implementation not affiliated with or endorsed by Revolut.

More in Papers

See all 148