From Quantitative Trading to General-Purpose LLMs: An Engineering Path Through AI Compute and Training

    This article traces one technical team's progression from machine vision, through AI-driven quantitative trading, to training general-purpose large language models. It covers the key engineering decisions along the way: cluster architecture from thousands to tens of thousands of GPUs, low-cost training methods including MoE and mixed precision, reasoning model training and evaluation, and open-source strategy. Some figures cited come from the original author's account and have not been independently verified. Readers should treat them accordingly.

    In the development of AI, few teams actually travel the full path from application-layer work down to training foundation models. This article follows the trajectory of a senior technical expert: starting in traditional machine vision, moving through AI-powered quantitative trading, and finally arriving at general-purpose large models. The architectural choices, cluster construction, and training optimization methods described here can serve as references for similar projects. Some numbers in the original account come from the author and have not been independently verified, so readers should distinguish between verified and self-reported figures.

    1. From Machine Vision to Quantitative Trading

    Machine vision research is good at extracting local features and spatial patterns from images. Applying this mindset to financial markets requires solving a different problem first: market data is a high-dimensional time series, it is noisy, and market structure changes over time.

    In the early stage, the team built trading models with traditional machine learning. Features and rules were first set manually, then algorithms were gradually allowed to mine factors automatically from historical data. The critical parts of this step are feature engineering and validation methodology. If time-series data is randomly split into training and test sets, the model gains access to future information, and backtest results become artificially inflated. The correct approach is to split data chronologically and use rolling validation.

    As compute improved, strategy models expanded from linear models and decision trees to deep neural networks. Deep networks can fit more complex nonlinear relationships and can take multiple data sources at once, such as market quotes, order books, and news text. The cost is a significantly higher risk of overfitting. Common countermeasures include early stopping, regularization, continuous out-of-sample testing, and limiting model capacity.

    2. Building Clusters from 1,000 to 10,000 GPUs

    Demand for compute in large model training grows quickly. For scenarios involving high-frequency scheduling, customized networking, and long-term occupancy, public cloud is not necessarily superior in cost or flexibility, so building private clusters is a common choice. The prerequisite is that the team can handle operations: hardware failure handling, network tuning, and storage management.

    At the thousand-GPU scale, bottlenecks usually appear in inter-node communication and storage I/O. GPUs within a node are typically connected through high-speed interconnects such as NVLink, while cross-node traffic commonly uses InfiniBand or RDMA-capable Ethernet. The distributed file system must simultaneously handle massive small-file reads and the throughput demands of checkpoint writes. If network bandwidth is insufficient, GPUs idle while waiting for communication, and actual utilization falls far below theoretical peak.

    At the ten-thousand-GPU scale, hardware failures become routine. Training jobs typically combine data parallelism, tensor parallelism, and pipeline parallelism; large-scale MoE models add expert parallelism on top. The more complex the parallelism strategy, the larger the blast radius of a single node failure. Checkpoint frequency must balance two factors: more frequent saving means more I/O overhead; longer intervals mean more steps to recompute after a failure. The Young/Daly approximation formula can estimate a near-optimal interval, with checkpoint duration and mean time between failures as the main inputs. Failure detection must also be fast: faulty nodes need to be isolated, and jobs should resume from the most recent checkpoint rather than restarting entirely.

    3. Engineering Methods for Low-Cost Training

    For training large language models on a limited budget, common techniques fall into three categories: model architecture, numerical precision, and data quality.

    First, the mixture-of-experts architecture. An MoE model can have a very large total parameter count, but each token activates only a small fraction of experts, so the compute per inference is far lower than that of a dense model with the same total parameters. The trade-offs are clear. Memory usage is still determined by the total parameter count, routing between experts requires all-to-all communication, and load imbalance can leave some experts undertrained. Load-balancing constraints in routing and overlapping communication with computation are the key implementation points.

    Second, mixed-precision training. BF16 has a numeric range close to FP32, offers good training stability, and is the most widely used. FP16 has a smaller dynamic range and usually requires loss scaling. FP8 further reduces memory and bandwidth pressure, but it requires hardware support and per-tensor or per-block scaling; otherwise, some layers are prone to overflow or precision loss. When choosing precision, validate the convergence curve in small-scale experiments before scaling up.

    Third, the data pipeline. Deduplication, quality filtering, and language ratios in training data directly determine how much the model learns from each token. Near-duplicate samples waste compute and can cause the model to memorize the training set. A common pipeline is exact and approximate deduplication first, then filtering low-quality text with classifiers or rules, and finally adjusting sampling ratios by target language and domain.

    The original article states that the team’s total cost of training a foundation model was on the order of several million US dollars, and that its API pricing was well below the industry average. These figures do not specify the accounting method and have not been independently verified. Cost typically may include GPU rental or depreciation, electricity, and facilities, but may not include failed experiments, data-processing labor, and evaluation costs. A low-priced API can put pressure on market pricing, but the impact of a single team on overall market prices is hard to measure independently.

    How to Estimate LLM Training Cost

    The basic formula is: number of GPUs, multiplied by training hours, multiplied by the per-GPU hourly price. Training hours are determined jointly by total training tokens, activated parameter count, and effective hardware throughput. Effective throughput is usually measured by Model FLOPs Utilization (MFU). In large-scale training, MFU commonly falls between 30% and 50%, depending on implementation and model architecture, so estimating directly from peak hardware FLOPS will significantly underestimate the cost.

    Four common mistakes: First, counting only the final training run while ignoring earlier ablation experiments. Second, ignoring the cost of reruns after failures. Third, mixing cloud service quotes with depreciation of self-built hardware, producing inconsistent accounting. Fourth, ignoring the compute consumed by data cleaning and evaluation.

    4. Training and Evaluating Reasoning Models

    The core idea of reasoning models is to have the model generate a longer reasoning process before producing the final answer. Training typically uses reinforcement learning, with rewards from automatically verifiable outcomes—for example, whether a math answer is correct or whether code passes tests. This kind of reward is more stable than human preference scoring, but the model may over-optimize for verifiable tasks, with limited benefit for open-ended questions.

    Reasoning models produce longer outputs, so inference cost rises accordingly. When selecting a model, do not look only at the quality of a single answer; also consider average generation length, cost per task, and response latency. For simple Q&A, a standard model may offer better cost-effectiveness.

    The original article claims the reasoning model performs notably well in mathematical proofs and complex code optimization, but gives no specific metrics. When reading or publishing evaluation results, pay attention to the following: the name and version of the evaluation set, decoding parameters (such as temperature and maximum generation length), whether results are averaged over multiple samples, and the version numbers of compared models. Without this information, numbers are hard to compare directly. In addition, errors in long reasoning chains accumulate step by step, and if evaluation questions appear in the training data, results will be inflated. Both issues need to be controlled for in evaluation.

    5. Open Source and Industry Choices

    After achieving progress with its models, the team chose to release model weights and technical reports. The article quotes the founder: “Building the edifice of large models is nothing more than standing on the shoulders of the open-source community and tightening a few more screws.” This expresses the team’s attitude toward open source. For users, the more practical question is the specific terms of the license: commercial use permission, usage restrictions, and requirements for derivative models. Open weights are not the same as full open source (including training code and data), and these should be verified separately when making selections.

    Regarding industry direction, the article argues that application-layer packaging alone can hardly form a long-term moat, which is why the team extended downward into compute and algorithms. This is a debatable judgment. For teams with limited resources, training a foundation model from scratch carries high cost and risk. A more common route is domain fine-tuning on top of open-source base models, building advantages in data and inference optimization. Whether to extend toward the lower layers depends on the team’s ability to obtain compute, its data advantages, and its target market.

    Infrastructure choices also depend on usage patterns. If training requires long-term, stable occupancy of large-scale compute, self-built clusters or annual reserved capacity may cost less. If demand fluctuates significantly, on-demand cloud resources are more flexible. Decisions should be based on total cost calculated from actual utilization and operational capability, rather than comparing unit prices alone.