Instructions to use AmPac/trace with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AmPac/trace with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("AmPac/trace") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use AmPac/trace with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "AmPac/trace" --prompt "Once upon a time"
- Atomic Chat
Clarify Trace training, privacy, and evaluation
Browse filesPosition 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.
README.md
CHANGED
|
@@ -1,63 +1,76 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
|
|
|
| 3 |
license: other
|
| 4 |
library_name: mlx
|
|
|
|
| 5 |
base_model: mlx-community/Qwen2.5-7B-Instruct-4bit
|
| 6 |
tags:
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
|
| 15 |
# Trace
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
##
|
| 28 |
|
| 29 |
-
|
| 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 |
-
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
| 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 |
-
##
|
| 48 |
|
| 49 |
-
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
## Quickstart
|
| 63 |
|
|
@@ -70,27 +83,21 @@ model, tokenizer = load(
|
|
| 70 |
)
|
| 71 |
```
|
| 72 |
|
| 73 |
-
|
| 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 |
-
|
| 81 |
-
|
| 82 |
-
```bash
|
| 83 |
-
python3 -m sba_screen --talk --as-of 2026-01-15 --program 504
|
| 84 |
-
```
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
## License
|
| 95 |
|
| 96 |
-
`other`.
|
|
|
|
| 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.
|