Downloads · 30 days
23
33% of all-time downloads
ramtinasadi/Quantfinlab-Qwen3.5-2B-Financial-Analysis-LoRA
Quantfinlab-Qwen3.5-2B-Financial-Analysis-LoRA is a text generation model from ramtinasadi. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains the LoRA adapter for Qwen3.5-2B Quantfinlab Financial Analyst, an English financial-analysis adaptation of Qwen/Qwen3.5-2B.
Downloads · 30 days
23
33% of all-time downloads
All-time downloads
70
Public
Repo size
63.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors43.7 MB · 69%
From the Hugging Face model README
This repository contains the LoRA adapter for Qwen3.5-2B Quantfinlab Financial Analyst, an English financial-analysis adaptation of Qwen/Qwen3.5-2B.
The adapter was developed for Financial Analysis with Local LLM in the Quantitative Finance Lab. It is published primarily for training reproducibility, inspection, and continued experimentation.
For lightweight local inference, use the companion Q4_K_M GGUF repository.
The adapter modifies the language path of Qwen3.5-2B for evidence-grounded financial analysis.
The intended workflow supplies current evidence and calculated financial context at runtime. The model then analyzes what changed, what appears material, why it may matter, which evidence supports each claim, and where uncertainty remains.
The five supervised task families are:
These correspond directly to the workflows demonstrated in Project 24.
Training used a reviewed and frozen evidence-grounded dataset rather than generic financial instruction data.
Each example contains a point-in-time evidence packet and a supervised analytical response. Before training, the pipeline verifies source timestamps and text hashes and requires all evidence to have been available by the example's declared analysis cutoff.
The training notebook enforces separation between training and validation using:
Validation examples are strictly later than the training examples.
The model-visible targets train the assistant to produce structured financial analysis rather than hidden chain-of-thought. The supervised output contains:
The underlying source corpus is not published here as a general-purpose financial dataset. The reproducible training logic, schema checks, and processing workflow are documented in the training notebook.
The adapter was trained from the following pinned base:
Qwen/Qwen3.5-2B15852e8c16360a2fea060d615a32b45270f8a8fcThe workflow uses the text/language path only; vision layers were frozen.
| Setting | Value |
|---|---|
| Base precision | 16-bit |
| Training context | 8,192 tokens |
| LoRA rank | 16 |
| LoRA alpha | 16 |
| LoRA dropout | 0 |
| Bias | none |
| Epochs | 2 |
| Learning rate | 5e-5 |
| Per-device train batch size | 1 |
| Gradient accumulation | 8 |
| Seed | 3407 |
| Training objective | Completion-only / assistant-output tokens |
LoRA target modules:
q_proj
k_proj
v_proj
o_proj
gate_proj
up_proj
down_proj
The training notebook verifies that only LoRA parameters are trainable and rejects unexpected trainable vision projections or 4-bit base-model loading.
The complete workflow is implemented in qwen_train_lora.ipynb.
The notebook:
llama.cpp revision;The notebook is designed to be resumable: completed adapters, merge artifacts, conversions, and quantization outputs are checksum-verified and reused rather than silently rebuilt.
Open it directly in Google Colab.
The adapter was checked on 30 held-out validation examples, six examples from each of the five task families.
All 30/30 adapter checks passed on the first attempt in the published release workflow.
The companion Q4_K_M export was separately loaded through llama.cpp and passed 5/5 post-export task checks.
The automatic checks cover:
These are release and grounding checks. They are not a benchmark of financial judgment, investment performance, forecasting accuracy, or superiority over another language model.
A compatible PEFT/Transformers workflow can load the pinned base and this adapter.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen3.5-2B"
adapter_id = "ramtinasadi/Quantfinlab-Qwen3.5-2B-Financial-Analysis-LoRA"
base_revision = "15852e8c16360a2fea060d615a32b45270f8a8fc"
tokenizer = AutoTokenizer.from_pretrained(base_id, revision=base_revision)
base = AutoModelForCausalLM.from_pretrained(
base_id,
revision=base_revision,
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(base, adapter_id)
For exact reproducibility, use the pinned environment documented in the training notebook.
For low-memory local use, the companion GGUF repository is the intended artifact.
The LoRA is only one component of Project 24. The full project adds:
llama.cpp;See the complete implementation in Financial Analysis with Local LLM.
The adapter is intended for:
This adapter is derived from Qwen/Qwen3.5-2B, released under the Apache License 2.0. This repository uses the same license.
Please retain attribution to the original Qwen model when redistributing derivative artifacts.
Developed by Ramtin Asadi as part of the open-source Quantitative Finance Lab.