mzwin9870 commited on
Commit
a63467e
·
verified ·
1 Parent(s): 6de04a3

Clarify Trace training, privacy, and evaluation

Browse files

Position Trace as a specialized model trained on curated synthetic data. Add source links and privacy boundaries. Remove open-source wording and an unsupported evaluation claim.

Files changed (1) hide show
  1. README.md +60 -53
README.md CHANGED
@@ -1,63 +1,76 @@
1
  ---
2
- language: en
 
3
  license: other
4
  library_name: mlx
 
5
  base_model: mlx-community/Qwen2.5-7B-Instruct-4bit
6
  tags:
7
- - sba
8
- - "504"
9
- - "7a"
10
- - lora
11
- - mlx
12
- pipeline_tag: text-generation
13
  ---
14
 
15
  # Trace
16
 
17
- This repository contains LoRA weights and `adapter_config.json` for Trace, in the MLX format used by `mlx_lm`.
18
 
19
- Trace is a small open-source 504/7(a) screening model for CDFIs and lenders. Ask it a file. It returns the SOP or CFR paragraph in force on the loan-number date, a hard-stop or bounce, and a board you can check. A human certifies eligibility and credit.
20
 
21
- **Occupancy opens [13 CFR 120.131](https://www.ecfr.gov/current/title-13/section-120.131).**
22
 
23
- Working capital on a 504 opens [13 CFR 120.120](https://www.ecfr.gov/current/title-13/section-120.120). SOP 50 10 8.1 does not leak onto a January 2026 file.
 
 
24
 
25
- These artifacts load on the public base [`mlx-community/Qwen2.5-7B-Instruct-4bit`](https://huggingface.co/mlx-community/Qwen2.5-7B-Instruct-4bit). The staff runtime is the dated lake plus TRACE bind — not this adapter alone.
26
 
27
- ## Highlights
28
 
29
- - **Occupancy.** Investor real estate and low occupancy open 13 CFR 120.131. Existing buy is **(b) 51%**. New construction is **(a) 60%**.
30
- - **Proceeds.** Payroll, inventory, and marketing on a 504 open 13 CFR 120.120 **(b)** and fail `USE_OF_PROCEEDS`.
31
- - **Clock.** A loan number on or after 2026-10-01 opens **SOP 50 10 8.1**. January files stay on SOP 50 10 8.
32
- - **Talk.** Messy processor English. Follow-up (“what if they occupy 100”) keeps the file. TRACE re-runs.
33
 
34
- If it cannot open the paragraph, it is not a screen.
35
 
36
- ## Model overview
 
 
 
37
 
38
- | | |
39
- |---|---|
40
- | Type | Causal LM + LoRA (screening JSON / officer memo) |
41
- | Base | Qwen2.5-7B-Instruct 4-bit (MLX) |
42
- | Method | MLX LoRA, rank 16, `mask_prompt` |
43
- | Pick | v9-160 (ScreenBench, not min val loss) |
44
- | Lake | Public SOP 50 10 / 50 55 / 50 57, 13 CFR 120–121, SBA notices — **retrieved**, not CPT |
45
- | Mouth (optional) | v17-160 English; JSON still TRACE-bound |
46
 
47
- ## Evaluation
48
 
49
- Grader is code (`sba_screen/quality.py`). Not an LLM judge.
50
 
51
- **ScreenBench holdout n=12**
 
 
 
 
52
 
53
- | | All-pass | False-kill |
54
- |---|---|---|
55
- | This adapter, no TRACE bind | 6/12 | 0 |
56
- | Complete system (lake + TRACE bind) | 12/12 | 0 |
 
 
 
 
 
 
 
 
57
 
58
- Exam-v1 (n=76) with bind: all-pass 76/76, false-kill 0. Retrieve on occupancy / WC / clock sentinels: 13/13.
59
 
60
- Do not quote 12/12 as a naked-7B number. The adapter copies the board. TRACE computes the board.
 
 
 
 
 
61
 
62
  ## Quickstart
63
 
@@ -70,27 +83,21 @@ model, tokenizer = load(
70
  )
71
  ```
72
 
73
- Staff runner (opens 120.131 on investor apartments; no GPU required for TRACE-only):
74
-
75
- ```bash
76
- python3 -m sba_screen --as-of 2026-01-15 --program 504 \
77
- --sketch "504 to buy apartments they will rent out and not occupy"
78
- ```
79
 
80
- Talk:
81
-
82
- ```bash
83
- python3 -m sba_screen --talk --as-of 2026-01-15 --program 504
84
- ```
85
 
86
- Studio mouth (`--mouth`) is optional English. TRACE still binds `hard_stop`.
87
 
88
- ## Limitations
89
 
90
- Does not determine eligibility. Does not decide credit. Does not speak for SBA. Trace is not an SBA product. SBA does not approve or endorse Trace. Do not give Trace to applicants. Outputs are drafts.
91
 
92
- Not included in training: borrower NPI, tax returns, AmPac files, approve/decline tapes.
 
 
 
93
 
94
- ## License
95
 
96
- `other`. Qwen2.5 weights are Tongyi Qianwen. The SOP/CFR lake is U.S. government work. Screening code is ours.
 
1
  ---
2
+ language:
3
+ - en
4
  license: other
5
  library_name: mlx
6
+ pipeline_tag: text-generation
7
  base_model: mlx-community/Qwen2.5-7B-Instruct-4bit
8
  tags:
9
+ - sba
10
+ - "504"
11
+ - "7a"
12
+ - lora
13
+ - screening
 
14
  ---
15
 
16
  # Trace
17
 
18
+ Trace is a specialized MLX LoRA adapter trained on high-quality, curated synthetic data for SBA 504 and 7(a) screening.
19
 
20
+ It helps a lender identify the rule that applies on a loan’s effective date, surface a potential hard stop, and prepare a reviewable screening summary. A qualified human must confirm every eligibility and credit decision.
21
 
22
+ ## What is included
23
 
24
+ - LoRA adapter weights in MLX format
25
+ - `adapter_config.json`
26
+ - Evaluation visuals based on synthetic screening scenarios
27
 
28
+ The complete Trace system also uses a dated retrieval layer and deterministic policy checks. Those components are separate from this adapter.
29
 
30
+ ## Training and grounding
31
 
32
+ The adapter was trained on 11,196 curated synthetic examples and 768 screening stems. The examples use fictional entities and are grounded in authoritative program material.
 
 
 
33
 
34
+ The runtime retrieval layer contains 23 official sources and 4,775 indexed sections, including:
35
 
36
+ - SBA SOP 50 10 guidance
37
+ - SBA SOP 50 55 and SOP 50 57 guidance
38
+ - 13 CFR Parts 120 and 121
39
+ - Relevant SBA notices and program forms
40
 
41
+ The effective loan date selects the applicable SOP version. Runtime retrieval provides the current source text; it is not stored in the adapter weights.
 
 
 
 
 
 
 
42
 
43
+ ## Privacy boundary
44
 
45
+ The training set does not include:
46
 
47
+ - AmPac borrower files
48
+ - Borrower names, loan numbers, addresses, or account numbers
49
+ - Tax returns, Social Security numbers, or other borrower NPI
50
+ - Historical approval or decline records
51
+ - Private email or document content
52
 
53
+ ## Model details
54
+
55
+ | Field | Value |
56
+ | --- | --- |
57
+ | Architecture | Causal language model with LoRA adapter |
58
+ | Base model | [Qwen2.5-7B-Instruct 4-bit for MLX](https://huggingface.co/mlx-community/Qwen2.5-7B-Instruct-4bit) |
59
+ | Fine-tuning method | MLX LoRA, rank 16, prompt masking enabled |
60
+ | Selected checkpoint | v9-160 |
61
+ | Primary output | Screening JSON and officer-facing draft summary |
62
+ | Intended users | Trained lending and compliance staff |
63
+
64
+ ## Evaluation
65
 
66
+ ScreenBench holdout uses 12 frozen synthetic files and a deterministic grader.
67
 
68
+ | Configuration | All-pass | False-kill |
69
+ | --- | ---: | ---: |
70
+ | Adapter without the Trace runtime | 6/12 | 0 |
71
+ | Complete system with retrieval and policy checks | 12/12 | 0 |
72
+
73
+ These results measure the complete screening workflow on a small internal holdout. They are not an independent certification.
74
 
75
  ## Quickstart
76
 
 
83
  )
84
  ```
85
 
86
+ The adapter alone does not provide the dated retrieval and deterministic policy checks used by the complete Trace system.
 
 
 
 
 
87
 
88
+ ## Important limitations
 
 
 
 
89
 
90
+ Trace does not determine eligibility, approve credit, or speak for the U.S. Small Business Administration. It produces review drafts for qualified staff.
91
 
92
+ Do not use Trace as the sole basis for an approval, decline, servicing action, or applicant communication. Confirm the source text and effective date before relying on an output.
93
 
94
+ ## Official references
95
 
96
+ - [SBA SOP 50 10 — Lender and Development Company Loan Programs](https://www.sba.gov/document/sop-50-10-lender-development-company-loan-programs)
97
+ - [13 CFR 120.120 — Eligible use of proceeds](https://www.ecfr.gov/current/title-13/section-120.120)
98
+ - [13 CFR 120.131 — Leasing part of an existing or proposed building](https://www.ecfr.gov/current/title-13/section-120.131)
99
+ - [AmPac Business Capital](https://www.ampac.com/)
100
 
101
+ ## License and attribution
102
 
103
+ Repository license: `other`. The base model has its own license and terms. SBA SOPs, federal regulations, and notices remain subject to their source terms.