Finn / Press

End-to-end pipeline adapting TinyLlama to financial SEC filings — ingestion, RAG, LoRA fine-tuning, DPO alignment, and evaluation on Apple Silicon.

Internship

EY — AI & Data Intern

Domain-adapting open-source LLMs for finance

Finn Clancy ·

Role

AI & Data Intern at EYJun 2026 → 19 Jun 2026 · Dublin · on-site.

What I built

An end-to-end pipeline adapting open-source LLMs (TinyLlama-1.1B) to a financial domain: SEC EDGAR ingestion, synthetic data generation, RAG, LoRA fine-tuning, and DPO alignment — with PyTorch, Hugging Face, peft, and trl on Apple Silicon.

Pipeline

SEC filings (EDGAR)
        |
        v
  Data preparation     raw documents → training examples
        |
   -----+-----
   |         |
   v         v
  RAG      Fine-tuning    adapt the model (one or both)
   |         |
   -----+-----
        |
        v
  Alignment (DPO)      nudge outputs toward better answers
        |
        v
  Evaluation           base vs fine-tuned vs RAG

Technical detail

  • Fine-tuned via rank-16 LoRA adapters on roughly 0.5% of model parameters.
  • Aligned outputs to preferences using a custom reward model and DPO.
  • Built an evaluation harness benchmarking base vs fine-tuned vs RAG models on ROUGE-L, BERTScore, and NLI-based hallucination detection.
  • RAG eliminated the base model's fabricated financial figures — the clearest win in the eval set.

Why finance filings

Public SEC data keeps the project shareable and auditable while still looking like the kind of work a bank, fund, or consultancy would want on private documents — the adaptation pattern is the same.

← Home · About · Essays