liveBook · Manning

Fine-tuning

As explained in Financial AI in Practice

Fine-tuning adapts a pretrained model by continuing training on task-specific or domain-specific data.

Fine-tuning continues training a pretrained model on a smaller, domain-specific dataset to teach a skill or behavior—not new facts. It can shape a finance product’s writing style when prompting and retrieval-augmented generation are insufficient. section 3.3.3

A practical adaptation plan:

  • Curate a small, high-quality set of paired inputs and desired outputs; the AlphaStream team prepares 200 examples with summaries written by a human analyst. section 3.3.3
  • Consider parameter-efficient methods such as LoRA, adapters, or prefix tuning instead of updating every model parameter, which can be expensive and time-consuming. section 3.3.3

AlphaStream summaries

To make community-post digests sound like AlphaStream, the team pairs raw posts with summaries in the platform’s desired tone. section 3.3.3

Table 3.1 Parameter-efficient fine-tuning techniques
Method
How it works
BFSI considerations
LoRA
Inserts low-rank matrices into a few key layers, freezing most of the model’s original weights. Only these small added matrices are trained.
Lowers GPU memory usage compared to a full fine-tune; feasible if HPC costs are a concern. Potentially simpler to revert or reapply for new base model versions.
Adapters
Adds small, trainable “adapter” modules in each transformer layer; the base model remains frozen.
Well-known approach in NLP that often requires minimal HPC resources. BFSI teams must ensure consistent brand voice or disclaimers across the entire pipeline.
Prefix Tuning (p-Tuning)
Learns special “prefix tokens” that guide the model’s hidden states, with no changes to the main model parameters.
Suitable for injecting official disclaimers or short policy text. Less ideal for deeply specialized tasks such as complex derivatives. Easy to discard or layer on top of new models.
QLoRA [4] and Hybrids
Combines LoRA with quantization (e.g., 8-bit or 4-bit) to reduce memory usage further; may also use other PEFT combinations.
Especially relevant for on-premises HPC constraints: BFSI can handle bigger base models at lower precision, though quantization demands careful validation of numeric stability.

Compare PEFT methods by how they adapt a model and the financial-sector considerations attached to each. section 3.3.3

How Financial AI in Practice covers it

How deep it goes
Explains the goal, data curation, PEFT trade-offs, and a conceptual LoRA recipe, but not a complete training workflow.
Examples
Uses 200 analyst-written input-output examples to adapt summaries of AlphaStream community posts.
What it assumes
Assumes a pretrained foundation model and task-specific examples pairing inputs with desired outputs.
What you can do after
Apply it via Hugging Face Transformers and PEFT to customize a pretrained model with LoRA.
How it connects
Contrasts fine-tuning with prompt engineering and retrieval-augmented generation, and connects it to PEFT, LoRA, adapters, and prefix tuning.

Also explained in

Compare how 37 books explain fine-tuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Financial AI in Practice. The section links point to the parts of the book it draws on.