Upload EVA Lender Matching adapter (SFT + DPO trained)
Browse files- README.md +63 -0
- adapter_config.json +40 -0
- adapters.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: mlx-community/Llama-3.2-3B-Instruct-4bit
|
| 4 |
+
tags:
|
| 5 |
+
- finance
|
| 6 |
+
- lender-matching
|
| 7 |
+
- mlx
|
| 8 |
+
- lora
|
| 9 |
+
- dpo
|
| 10 |
+
- sba-loans
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# EVA Lender Matching Model
|
| 17 |
+
|
| 18 |
+
Fine-tuned Llama 3.2 3B model for SBA lender matching and financial advisory.
|
| 19 |
+
|
| 20 |
+
## Model Description
|
| 21 |
+
|
| 22 |
+
This model was trained using:
|
| 23 |
+
- **SFT (Supervised Fine-Tuning)**: 500 iterations on lender matching data
|
| 24 |
+
- **DPO (Direct Preference Optimization)**: 500 iterations for preference alignment
|
| 25 |
+
|
| 26 |
+
### Training Results
|
| 27 |
+
| Stage | Initial Loss | Final Loss | Improvement |
|
| 28 |
+
|-------|-------------|------------|-------------|
|
| 29 |
+
| Val Loss | 2.902 | 0.331 | 88.6% reduction |
|
| 30 |
+
| Train Loss | 2.495 | 0.300 | 88.0% reduction |
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from mlx_lm import load, generate
|
| 36 |
+
|
| 37 |
+
model, tokenizer = load(
|
| 38 |
+
"mlx-community/Llama-3.2-3B-Instruct-4bit",
|
| 39 |
+
adapter_path="evafiai/eva-lender-matching"
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
+
prompt = "I need a $500,000 SBA loan for my manufacturing business. What lenders do you recommend?"
|
| 43 |
+
response = generate(model, tokenizer, prompt=prompt, max_tokens=300)
|
| 44 |
+
print(response)
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Capabilities
|
| 48 |
+
|
| 49 |
+
- SBA 7(a) and 504 loan recommendations
|
| 50 |
+
- Lender matching based on business profile
|
| 51 |
+
- NAICS code identification
|
| 52 |
+
- Industry-specific financing guidance
|
| 53 |
+
|
| 54 |
+
## Training Data
|
| 55 |
+
|
| 56 |
+
Trained on:
|
| 57 |
+
- 7,393 preference pairs for DPO
|
| 58 |
+
- Comprehensive lender database with verified contacts
|
| 59 |
+
- NAICS code matching examples
|
| 60 |
+
|
| 61 |
+
## License
|
| 62 |
+
|
| 63 |
+
Apache 2.0
|
adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"adapter_path": "eva_dpo_training_live/adapters",
|
| 3 |
+
"batch_size": 1,
|
| 4 |
+
"config": null,
|
| 5 |
+
"data": "eva_dpo_mlx_format",
|
| 6 |
+
"fine_tune_type": "lora",
|
| 7 |
+
"grad_accumulation_steps": 1,
|
| 8 |
+
"grad_checkpoint": true,
|
| 9 |
+
"iters": 500,
|
| 10 |
+
"learning_rate": 3e-06,
|
| 11 |
+
"lora_parameters": {
|
| 12 |
+
"rank": 8,
|
| 13 |
+
"dropout": 0.0,
|
| 14 |
+
"scale": 20.0
|
| 15 |
+
},
|
| 16 |
+
"lr_schedule": null,
|
| 17 |
+
"mask_prompt": false,
|
| 18 |
+
"max_seq_length": 2048,
|
| 19 |
+
"model": "mlx-community/Llama-3.2-3B-Instruct-4bit",
|
| 20 |
+
"num_layers": 16,
|
| 21 |
+
"optimizer": "adam",
|
| 22 |
+
"optimizer_config": {
|
| 23 |
+
"adam": {},
|
| 24 |
+
"adamw": {},
|
| 25 |
+
"muon": {},
|
| 26 |
+
"sgd": {},
|
| 27 |
+
"adafactor": {}
|
| 28 |
+
},
|
| 29 |
+
"project_name": null,
|
| 30 |
+
"report_to": null,
|
| 31 |
+
"resume_adapter_file": "eva_lender_FIXED_20251128_155922/adapters/adapters.safetensors",
|
| 32 |
+
"save_every": 100,
|
| 33 |
+
"seed": 0,
|
| 34 |
+
"steps_per_eval": 100,
|
| 35 |
+
"steps_per_report": 25,
|
| 36 |
+
"test": false,
|
| 37 |
+
"test_batches": 500,
|
| 38 |
+
"train": true,
|
| 39 |
+
"val_batches": 25
|
| 40 |
+
}
|
adapters.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3607bc6f1c2c9443f23508b1f39770d771eecdb57dc7cee60db1e3d26df470ae
|
| 3 |
+
size 27811400
|