Source-linked AI summary

Baichuan4-Finance Technical Report

Hanyu Zhang, Boyu Qiu, Yuhao Feng, Shuqi Li, Qian Ma, Xiyuan Zhang, Qiang Ju, Dong Yan, Jian Xie

arXiv:2412.15270v2cs.CLcs.AIcs.CEcs.CYcs.LG

TL;DR

Financial documents require specialized knowledge and numerical reasoning, while the potential of LLMs in finance remains underexplored. The report develops Baichuan4-Finance models with data-quality methods and domain self-constraint continual pre-training. It reports strong financial-task performance for the base model without sacrificing general benchmark performance, and strong results for the chat model on financial certification and application scenarios.

  • Problem

    Financial documents require specialized knowledge and advanced numerical processing and reasoning, while LLMs' potential in finance remains underexplored.

    Source: §1 · p. 3
  • Method

    The authors develop Baichuan4-Finance-Base and an aligned chat model using a data-quality pipeline, domain self-constraint continual pre-training, supervised fine-tuning, and reinforcement learning from human and AI feedback.

    Source: §1 · p. 3, §3.4 · p. 6, §4 · p. 7
  • Results

    Baichuan4-Finance-Base surpasses nearly all competitive baselines on financial tasks without compromising general benchmark performance, while Baichuan4-Finance performs strongly on financial certification and application scenarios.

    Source: §5.3.2 · p. 12, §6 · p. 14
  • Takeaways & Limitations

    The reported results position Baichuan4-Finance as a capable model series for financial certification questions and application scenarios.

    Source: §5.3.2 · p. 12

Abstract

from arXiv · show

Large language models (LLMs) have demonstrated strong capabilities in language understanding, generation, and reasoning, yet their potential in finance remains underexplored due to the complexity and specialization of financial knowledge. In this work, we report the development of the Baichuan4-Finance series, including a comprehensive suite of foundational Baichuan4-Finance-Base and an aligned language model Baichuan4-Finance, which are built upon Baichuan4-Turbo base model and tailored for finance domain. Firstly, we have dedicated significant effort to building a detailed pipeline for improving data quality. Moreover, in the continual pre-training phase, we propose a novel domain self-constraint training strategy, which enables Baichuan4-Finance-Base to acquire financial knowledge without losing general capabilities. After Supervised Fine-tuning and Reinforcement Learning from Human Feedback and AI Feedback, the chat model Baichuan4-Finance is able to tackle various financial certification questions and real-world scenario applications. We evaluate Baichuan4-Finance on many widely used general datasets and two holistic financial benchmarks. The evaluation results show that Baichuan4-Finance-Base surpasses almost all competitive baselines on financial tasks by significant margins without sacrificing performance on general LLM benchmarks. At the same time, Baichuan4-Finance demonstrates even more impressive performance on financial application scenarios, showcasing its potential to foster community innovation in the financial LLM field.

1 INTRODUCTION

Finance-specific LLMs address the specialized knowledge and numerical reasoning demands of financial documents. This report introduces Baichuan4-Finance as a base model and an instruction-tuned chat model built on Baichuan4-Turbo.

1 INTRODUCTION

  • Financial documents combine complex numerical data and specialized terminology, requiring domain knowledge and advanced numerical processing and reasoning.The report describes financial LLMs as useful for interpreting implications in financial documents and converting unstructured data into actionable insights and market intelligence.Source: §1 · p. 3
  • Baichuan4-Finance comprises a pre-trained base model and an instruction-tuned model for chat and downstream applications, both built on Baichuan4-Turbo.The base model is not yet aligned with human preferences; the chat model is fine-tuned for downstream use.Source: §1 · p. 3
  • The development plan targets data quality and mixture, model design, and training strategy across continual pre-training and alignment.The authors identify these factors as influential to final-model performance.Source: §1 · p. 3

2 TOKENIZER & MODEL ARCHITECTURE

Baichuan4-Finance-Base uses BBPE tokenization and an architecture incorporating RMSNorm, grouped-query attention, and RoPE.

2.1 TOKENIZER

  • BBPE tokenization produces a vocabulary of 141,056 regular tokens.The report says BBPE has a high compression rate relative to other tokenizers.Source: §2.1 · p. 4

2.2 MODEL ARCHITECTURE

  • The architecture uses RMSNorm for pre-normalization to handle training stability.Source: §2.2 · p. 4
  • Grouped-query attention replaces multi-head attention to improve inference speed and reduce key-value cache size during decoding.Source: §2.2 · p. 4
  • RoPE serves as the model's positional encoding.Source: §2.2 · p. 4

3 CONTINUAL PRE-TRAINING

Continual pre-training combines general and financial data with data-quality filtering and scaling-law-guided mixture selection. Domain self-constraint training aims to acquire financial knowledge while retaining general capabilities.

3.1 PRE-TRAINING DATA COMPOSITION

  • The pre-training corpus combines general data for world knowledge with financial data containing financial knowledge.The financial corpus includes news, press releases, finance books and journals, and social media posts; Figure 1 presents its composition.Source: §3.1 · p. 4, Figure 1 · p. 6

3.2 DATA QUALITY ENHANCEMENT

  • Quality enhancement uses rule-based text cleaning, a logistic-regression classifier, and Pareto resampling that favors documents with higher quality scores.The classifier is trained with high-quality examples and raw unfiltered documents in a 1:1 ratio; the retention rule gives higher-quality-scored documents a higher retention probability.Source: §3.2 · pp. 4–5
  • A second filtering stage scores readability, coherence, informativeness, safety, anonymity, and unattainable references, then trains an automatic scoring model to filter data.Source: §3.2 · p. 5
  • The pipeline also uses abnormal-loss analysis, specialized filters for code, math, and Markdown, and URL-, document-, and line-level de-duplication.Anomalous-loss data is sampled for analysis; identified common issues are addressed with rules or learned by the XLM-RoBERTa model.Source: §3.2 · p. 5

3.3 DETERMINING THE DATA MIXTURE RATIO BY SCALING LAWS

  • A two-stage scaling-law method estimates the performance of larger models across candidate data-mixture ratios using smaller models.It relates model size, dataset sizes, and mixture ratios to validation loss, then models the relation between validation loss and benchmark accuracy; the report uses it to determine the financial-data mixture ratio.Source: §3.3 · pp. 5–6

3.4 CONTINUAL PRE-TRAINING

  • Domain self-constraint continual pre-training balances retaining general-model knowledge with learning financial knowledge.For financial documents, its objective combines a KL term and a language-modeling term; the report says this enables learning financial knowledge while maintaining general knowledge.Source: §3.4 · pp. 6–7

3.5 ANNEALING

  • During the final 80M tokens of continual pre-training, the learning rate is linearly reduced to zero and the mixture ratio shifts toward high-quality financial sources.Source: §3.5 · p. 7

4 ALIGNMENT

The alignment phase refines financial computation, logical reasoning, and instruction following while aiming to make outputs useful, truthful, and safe. It builds alignment data and uses supervised fine-tuning and reward-robust reinforcement learning to produce Baichuan4-Finance.

4.1.1 DEMONSTRATION DATA CONSTRUCTION

  • Demonstration construction combines financial documents, manually built seed instructions across capabilities and complexity levels, and Turbo-generated responses reviewed and filtered by annotators.The process comprises finance-material, seed-repository, and large-scale demonstration construction.Source: §4.1.1 · pp. 7–8

4.1.2 TRAINING STRATEGY

  • Over 160,000 high-quality demonstrations support supervised fine-tuning across instruction following, financial classification, clustering, and generation.The supervised fine-tuned model is produced using this dataset and the regular supervised fine-tuning process.Source: §4.1.2 · p. 8

4.2.1 PREFERENCE DATA CONSTRUCTION

  • Human-ranked answers yield preference pairs for non-unique tasks, while verifier-checked math answers supply pairs for unique-answer tasks after all-correct and all-incorrect samples are removed.The resulting preference dataset is used to train the reward model.Source: §4.2.1 · p. 8

4.2.2 REWARD MODEL TRAINING

  • The reward model starts from Baichuan4-Turbo with its language-modeling head replaced by a value head, and outputs a reward score for each prompt-answer pair.Its loss is formulated using prompts and their chosen and rejected answers.Source: §4.2.2 · p. 8

4.3 REINFORCEMENT LEARNING FROM HUMAN FEEDBACK AND AI FEEDBACK

  • A PPO-based reward-robust framework addresses instability and imperfections in reward models; optimizing the supervised fine-tuned model with this framework yields Baichuan4-Finance.The model generates predictions for randomly selected preference-data prompts before reinforcement learning.Source: §4.3 · p. 8

5 EXPERIMENTS

The experiments evaluate general and financial capabilities, test the domain self-constraint and PPO training strategies, and compare Baichuan4-Finance with baselines. The reported results show strong performance across financial certifications and application scenarios.

5.1 BENCHMARKS

  • Evaluation covers public general datasets, FinanceIQ and FLAME, including certification benchmarks and financial scenario applications.FinanceIQ comprises 7,173 multiple-choice questions across 10 certifications; FLAME includes 14 certifications and 10 scenario applications.Source: §5.1 · p. 9

5.2.1 ABLATION STUDY FOR DOMAIN SELF-CONSTRAINT CONTINUAL PRE-TRAINING

  • On a 1B Base model, domain self-constraint improves financial performance while preserving general knowledge, unlike regular continual pre-training.Figure 2 presents the comparison across the three training approaches.Source: §5.2.1 · p. 9, Figure 2 · p. 10
  • Baichuan4-Finance-Base surpasses its Baichuan4-Turbo backbone by significant margins on the financial benchmark, with comparable general-dataset performance.Figure 3 presents this comparison.Source: §5.2.1 · p. 9, Figure 3 · p. 10

5.2.2 ABLATION STUDY FOR PPO

  • With the same training data, SFT plus PPO performs significantly better than SFT alone on eight mathematical datasets.Figure 4 visualizes this comparison.Source: §5.2.2 · p. 11, Figure 4 · p. 11
  • The PPO analysis reports that similar shapes for two Figure 5 lines indicate positive correlation and suggest PPO could transfer pass@5 potential to pass@1 hit rate.The lines compare w/o-PPO pass@1 versus pass@5 performance and Baichuan4-Finance pass@1 versus w/o-PPO pass@1 performance.Source: Figure 5 · p. 11, §5.2.2 · p. 12

5.3.1 BASELINES

  • For zero-shot comparisons, Baichuan4-Finance is evaluated against GPT-4o and two open-source models on FinanceIQ; FLAME results come from its official institute.The FLAME comparison includes five chat LLMs.Source: §5.3.1 · p. 12

5.3.2 COMPARISON RESULTS

  • Baichuan4-Finance shows strong capabilities across financial certifications and application scenarios on FLAME-Cer, FLAME-Sce, and FinanceIQ.The comparison results are presented in Tables 1, 2, and 3, respectively.Source: Table 1 · p. 12, §5.3.2 · p. 12, Table 2 · p. 13

6 CONCLUSION

Baichuan4-Finance combines a data-construction pipeline and domain self-constraint pre-training strategy. The report says its base model performs strongly on financial tasks while preserving general benchmark performance, and its chat model performs especially well in financial applications.

  • Baichuan4-Finance-Base outperforms nearly all competitive baselines on financial tasks without compromising general LLM benchmark performance, while Baichuan4-Finance performs especially well in financial applications.Source: §6 · p. 14
  • The report highlights a continual pre-training data pipeline and a data-mixture-ratio process based on two scaling laws.Source: §6 · p. 14
  • The series includes Baichuan4-Finance-Base and the Baichuan4-Finance chat model, with domain self-constraint pre-training as a key training strategy.Source: §6 · p. 14
Loading 2412.15270v2…