--- base_model: meta-llama/Llama-4-Scout-17B-16E-Instruct library_name: peft license: mit tags: - adaption-labs - autoscientist - finance - sec-filings - financial-arithmetic - table-reasoning - lora - text-generation - hackathon datasets: - narendarcodes/adaption-sec-financial-arithmetic-dataset language: - en pipeline_tag: text-generation --- # Adaption AutoScientist — SEC Financial Arithmetic (109B LoRA) > **Powered by Adaptive Data — [Adaption Labs](https://www.adaptionlabs.ai/)** ## 🎯 Core Problem Solved **Given a financial table from an SEC filing (10-K, 10-Q, earnings report), this model extracts the correct numeric values, identifies the right formula, executes multi-step arithmetic, and produces a verified numeric answer — never hallucinating numbers.** Specifically, this model performs: 1. **Table-Grounded Variable Extraction** — "Given this SEC filing table with 20+ rows and 5+ columns, identify exactly which cells contain the values needed for this calculation" 2. **Multi-Step Financial Arithmetic** — "Compute the year-over-year revenue growth rate by extracting 2021 and 2022 revenue, then applying: ((2022 - 2021) / 2021) × 100" 3. **Formula-Verified Calculations** — "Every answer is cross-checked against a gold reasoning program (e.g., `subtract(8.5, 7.2) → divide(#0, 7.2) → multiply(#1, 100)`) to ensure mathematical correctness" 4. **Compound Financial Metrics** — "Compute LTI payout percentages, operating margins, debt-to-equity ratios, and other multi-variable derived values from dense financial context" ### Why This Matters Financial analysts extract numbers from **dense corporate filings** to compute key metrics. Current LLMs: - **Hallucinate numbers** that aren't in the table - **Skip intermediate steps** (jumping to a final answer without showing work) - **Apply wrong formulas** (e.g., computing growth rate with the wrong denominator) This model is trained on **real SEC filing data** with gold reasoning programs that verify every arithmetic step, teaching it to show complete `` traces before outputting a verified ``. ## Model Details | Field | Value | |:---|:---| | **Trained Model Name** | `adaption_finqa_financial_reasoning` | | **Base Model** | `meta-llama/Llama-4-Scout-17B-16E-Instruct` (109B MoE) | | **Training Method** | Supervised Fine-Tuning (SFT) with LoRA | | **Training Platform** | [Adaption Labs AutoScientist](https://www.adaptionlabs.ai/) | | **Language** | English (en) | | **License** | MIT | ## AutoScientist Platform Integration The model was adapted using the automated training features of the Adaption Labs AutoScientist platform: * **Adaptive Data Pipeline:** Validated the financial dataset structure, maintaining a stable Grade B (8.9 score) across multi-step calculation patterns. * **Prompt Deduplication:** Removed redundant financial questions, focusing training on unique computation flows. * **Prompt Rephrase Constraint:** Prompt rephrasing was disabled to protect the integrity of financial tables, column headers, and tabular structures from corruption. * **Reasoning Traces & Blueprint Constraints:** Enforced structured arithmetic thinking. The model is trained to show complete working in a `` trace verified against gold calculation programs before outputting the final answer. The blueprint constraints mandate: 1. Extracting the exact cell coordinates and values from the input SEC table. 2. Stating the mathematical formula explicitly. 3. Executing arithmetic steps sequentially. 4. Outputting a clear, verified final numeric value. * **Hyperparameter Optimization:** Managed the training run using LoRA SFT targeting the attention and feed-forward layers of meta-llama/Llama-4-Scout-17B-16E-Instruct. * **Evaluation:** Compared the adapted model performance against the base model on held-out financial prompts using automated preference scoring. ## 📊 Dataset - **Dataset:** [narendarcodes/adaption-sec-financial-arithmetic-dataset](https://huggingface.co/datasets/narendarcodes/adaption-sec-financial-arithmetic-dataset) - **Size:** 1,055 rows - **License:** MIT **Source Data & Attribution:** | Source | Rows | What It Teaches | License | |:---|:---|:---|:---| | [czyssrs/FinQA](https://github.com/czyssrs/FinQA) | ~550 | Financial QA from real SEC filings with gold reasoning programs | MIT | | [cerebras/TAT-QA-Arithmetic-CoT](https://huggingface.co/datasets/cerebras/TAT-QA-Arithmetic-CoT) | ~550 | Table-and-text financial QA with chain-of-thought arithmetic | Apache-2.0 | | Metric | Before | After | Change | |:---|:---|:---|:---| | Grade | B | **B** | — | | Score | 9.0 | **8.9** | -1.1% | | Percentile | — | **28.9%** | — | ## ⚙️ Training Configuration | Hyperparameter | Value | |:---|:---| | Finetune Job ID | `5213d7c9-d937-4f5b-b4f8-c7316c0a18b3` | | Training Experiment ID | `4fa65b4d-3ed8-4189-9e8f-98a920c92a4d` | | LoRA Rank (r) | 16 | | LoRA Alpha | 32 | | LoRA Dropout | 0.1 | | Target Modules | `q_proj`, `k_proj`, `v_proj`, `o_proj`, `shared_expert.*`, `feed_forward.*` | | Epochs | 1 | | Batch Size | max | | Learning Rate | 2e-5 | | LR Scheduler | Cosine (0.5 cycles) | | Warmup Ratio | 0.05 | | Weight Decay | 0.05 | | Max Grad Norm | 1.0 | ## 📈 Evaluation Results | Evaluation Set | Base Model | Adapted Model | Winner | |:---|:---|:---|:---| | On Your Dataset | 44% | **58%** | ✅ Adapted | | Across Category (Held-out) | 40% | **61%** | ✅ Adapted | ## How to Use ```python from peft import PeftModel from transformers import AutoModelForCausalLM, AutoTokenizer base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-4-Scout-17B-16E-Instruct") model = PeftModel.from_pretrained(base_model, "narendarcodes/adaption-sec-financial-arithmetic-109b") tokenizer = AutoTokenizer.from_pretrained("narendarcodes/adaption-sec-financial-arithmetic-109b") ``` ## Citation ``` @misc{golla2026secfinancial, title={SEC Financial Arithmetic — Table-Grounded Multi-Step Calculation from Corporate Filings}, author={Golla Narendar}, year={2026}, note={Trained using Adaption Labs AutoScientist platform. Powered by Adaptive Data.} } ``` --- > **Powered by Adaptive Data — [Adaption Labs](https://www.adaptionlabs.ai/)** > > Built for the [2026 Adaption AutoScientist Challenge](https://hackindia.org/2026/adaption-autoscientist-challenge-50000-prize-pool) — Finance Category ### Framework Versions - PEFT 0.15.1