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
Model card: repo contents, occupancy 120.131, eval table, load.
Browse files
README.md
CHANGED
|
@@ -14,49 +14,83 @@ pipeline_tag: text-generation
|
|
| 14 |
|
| 15 |
# Trace
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
```python
|
| 30 |
from mlx_lm import load, generate
|
|
|
|
| 31 |
model, tokenizer = load(
|
| 32 |
"mlx-community/Qwen2.5-7B-Instruct-4bit",
|
| 33 |
adapter_path="AmPac/trace",
|
| 34 |
)
|
| 35 |
```
|
| 36 |
|
| 37 |
-
Staff
|
| 38 |
|
| 39 |
```bash
|
| 40 |
-
python3 -m sba_screen --
|
|
|
|
| 41 |
```
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
| Seat | All-pass | False-kill |
|
| 46 |
-
|---|---|---|
|
| 47 |
-
| Naked adapter (this repo) | 6/12 | 0 |
|
| 48 |
-
| Complete system (lake + TRACE bind) | 12/12 | 0 |
|
| 49 |
|
| 50 |
-
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
## License
|
| 61 |
|
| 62 |
-
`other`. Qwen2.5
|
|
|
|
| 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 |
|
| 64 |
```python
|
| 65 |
from mlx_lm import load, generate
|
| 66 |
+
|
| 67 |
model, tokenizer = load(
|
| 68 |
"mlx-community/Qwen2.5-7B-Instruct-4bit",
|
| 69 |
adapter_path="AmPac/trace",
|
| 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.
|