Spaces:
Paused
Paused
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -158,6 +158,53 @@ footer { display: none !important; }
|
|
| 158 |
line-height: 1.6;
|
| 159 |
font-weight: 500;
|
| 160 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
#header-block .meta-pill {
|
| 162 |
display: inline-flex;
|
| 163 |
align-items: center;
|
|
@@ -325,10 +372,44 @@ HEADER_HTML = """
|
|
| 325 |
<div class="title-row">Demo 03 路 Stay Curious 路 Fine-Tuning LLMs</div>
|
| 326 |
<h1>Junior Associate</h1>
|
| 327 |
<div class="subtitle">
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
<div class="meta-pill">
|
| 333 |
<span class="label">MODEL</span>
|
| 334 |
<a href="https://huggingface.co/Curious-PM/lexwell-contract-irac-qwen2.5-3b-lora" target="_blank">Curious-PM/lexwell-contract-irac-qwen2.5-3b-lora</a>
|
|
|
|
| 158 |
line-height: 1.6;
|
| 159 |
font-weight: 500;
|
| 160 |
}
|
| 161 |
+
#header-block .use-case {
|
| 162 |
+
margin: 32px auto 0;
|
| 163 |
+
max-width: 1100px;
|
| 164 |
+
text-align: left;
|
| 165 |
+
border-top: 1px solid var(--hair);
|
| 166 |
+
border-bottom: 1px solid var(--hair);
|
| 167 |
+
padding: 22px 0;
|
| 168 |
+
}
|
| 169 |
+
#header-block .use-case-row {
|
| 170 |
+
display: grid;
|
| 171 |
+
grid-template-columns: 1fr 1fr 1fr;
|
| 172 |
+
gap: 32px;
|
| 173 |
+
}
|
| 174 |
+
#header-block .use-case-label {
|
| 175 |
+
font-family: 'Inter', sans-serif;
|
| 176 |
+
font-size: 10px;
|
| 177 |
+
font-weight: 700;
|
| 178 |
+
letter-spacing: 1.6px;
|
| 179 |
+
color: var(--muted);
|
| 180 |
+
margin-bottom: 6px;
|
| 181 |
+
}
|
| 182 |
+
#header-block .use-case-text {
|
| 183 |
+
font-family: 'Inter', sans-serif;
|
| 184 |
+
font-size: 13.5px;
|
| 185 |
+
line-height: 1.55;
|
| 186 |
+
color: var(--ink);
|
| 187 |
+
font-weight: 500;
|
| 188 |
+
}
|
| 189 |
+
#header-block .use-case-text b { font-weight: 700; }
|
| 190 |
+
#header-block .use-case-text i { color: var(--muted); }
|
| 191 |
+
|
| 192 |
+
#header-block .how-to-read {
|
| 193 |
+
margin-top: 18px;
|
| 194 |
+
padding: 14px 18px;
|
| 195 |
+
background: var(--tint);
|
| 196 |
+
border-radius: 8px;
|
| 197 |
+
font-family: 'Inter', sans-serif;
|
| 198 |
+
font-size: 13.5px;
|
| 199 |
+
line-height: 1.55;
|
| 200 |
+
color: var(--ink);
|
| 201 |
+
text-align: left;
|
| 202 |
+
max-width: 1100px;
|
| 203 |
+
margin-left: auto;
|
| 204 |
+
margin-right: auto;
|
| 205 |
+
}
|
| 206 |
+
#header-block .how-to-read b { font-weight: 700; }
|
| 207 |
+
|
| 208 |
#header-block .meta-pill {
|
| 209 |
display: inline-flex;
|
| 210 |
align-items: center;
|
|
|
|
| 372 |
<div class="title-row">Demo 03 路 Stay Curious 路 Fine-Tuning LLMs</div>
|
| 373 |
<h1>Junior Associate</h1>
|
| 374 |
<div class="subtitle">
|
| 375 |
+
A small open-source model fine-tuned to do <b>first-pass contract review</b>
|
| 376 |
+
in the house style of a fictional B2B law firm.
|
| 377 |
+
</div>
|
| 378 |
+
|
| 379 |
+
<div class="use-case">
|
| 380 |
+
<div class="use-case-row">
|
| 381 |
+
<div class="use-case-cell">
|
| 382 |
+
<div class="use-case-label">THE FIRM</div>
|
| 383 |
+
<div class="use-case-text">
|
| 384 |
+
<b>Lexwell Advisors</b> (fictional) reviews contracts for SMBs.
|
| 385 |
+
Every reply must follow the firm’s exact format.
|
| 386 |
+
</div>
|
| 387 |
+
</div>
|
| 388 |
+
<div class="use-case-cell">
|
| 389 |
+
<div class="use-case-label">THE HOUSE STYLE</div>
|
| 390 |
+
<div class="use-case-text">
|
| 391 |
+
Top disclaimer → <b>I</b>ssue · <b>R</b>ule · <b>A</b>pplication · <b>C</b>onclusion
|
| 392 |
+
→ numbered redlines → bottom disclaimer →
|
| 393 |
+
<i>— Lexwell Advisors</i>
|
| 394 |
+
</div>
|
| 395 |
+
</div>
|
| 396 |
+
<div class="use-case-cell">
|
| 397 |
+
<div class="use-case-label">WHY FINE-TUNE</div>
|
| 398 |
+
<div class="use-case-text">
|
| 399 |
+
Instead of a 2,000-token system prompt on every call,
|
| 400 |
+
we fine-tuned Qwen-3B on <b>80 example memos</b>.
|
| 401 |
+
The structure now lives in a 30 MB adapter.
|
| 402 |
+
</div>
|
| 403 |
+
</div>
|
| 404 |
+
</div>
|
| 405 |
</div>
|
| 406 |
+
|
| 407 |
+
<div class="how-to-read">
|
| 408 |
+
<b>How to read this:</b> paste a contract question below.
|
| 409 |
+
The <b>left column</b> shows the base model with no fine-tuning — helpful, but unstructured.
|
| 410 |
+
The <b>right column</b> shows the same model with the LoRA adapter — locked to Lexwell’s format every time.
|
| 411 |
+
</div>
|
| 412 |
+
|
| 413 |
<div class="meta-pill">
|
| 414 |
<span class="label">MODEL</span>
|
| 415 |
<a href="https://huggingface.co/Curious-PM/lexwell-contract-irac-qwen2.5-3b-lora" target="_blank">Curious-PM/lexwell-contract-irac-qwen2.5-3b-lora</a>
|