Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -8,15 +8,16 @@ sdk_version: 4.44.1
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
short_description:
|
| 12 |
---
|
| 13 |
|
| 14 |
-
# Construction Code-Citation Model
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
- **Base:** [
|
| 19 |
-
- **Adapter:** [rigidhat/
|
| 20 |
- **Dataset:** [rigidhat/construction-code-corpus-v1](https://huggingface.co/datasets/rigidhat/construction-code-corpus-v1)
|
|
|
|
| 21 |
|
| 22 |
-
Built for the [Adaption Labs AutoScientist Challenge](https://adaptionlabs.ai/auto-scientist), "All Other Domains" category. Credit to Adaptive Data by Adaption.
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
short_description: Llama 3.2 3B for OSHA hazard + code citation
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Construction Code-Citation Model (v2 · AutoScientist)
|
| 15 |
|
| 16 |
+
Llama 3.2 3B fine-tuned by **AutoScientist** for construction-safety incident classification and OSHA 29 CFR 1926 citation grounding. Reports **77% win rate** on our task vs the base Llama 3.2 3B.
|
| 17 |
|
| 18 |
+
- **Base:** [meta-llama/Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct)
|
| 19 |
+
- **Adapter:** [rigidhat/llama-3.2-3b-construction-codecite-v2](https://huggingface.co/rigidhat/llama-3.2-3b-construction-codecite-v2)
|
| 20 |
- **Dataset:** [rigidhat/construction-code-corpus-v1](https://huggingface.co/datasets/rigidhat/construction-code-corpus-v1)
|
| 21 |
+
- **Baseline (Qwen 2.5 1.5B QLoRA):** [rigidhat/qwen-2.5-construction-codecite-v1](https://huggingface.co/rigidhat/qwen-2.5-construction-codecite-v1)
|
| 22 |
|
| 23 |
+
Built for the [Adaption Labs AutoScientist Challenge](https://adaptionlabs.ai/auto-scientist), **"All Other Domains"** category. Credit to **Adaptive Data by Adaption**.
|
app.py
CHANGED
|
@@ -15,8 +15,8 @@ from pathlib import Path
|
|
| 15 |
|
| 16 |
import gradio as gr
|
| 17 |
|
| 18 |
-
BASE_MODEL = os.environ.get("BASE_MODEL", "
|
| 19 |
-
ADAPTER_REPO = os.environ.get("ADAPTER_REPO", "rigidhat/
|
| 20 |
DATASET_REPO = os.environ.get("DATASET_REPO", "rigidhat/construction-code-corpus-v1")
|
| 21 |
MAX_NEW_TOKENS = 384
|
| 22 |
RAG_K = 5
|
|
@@ -236,14 +236,14 @@ EXAMPLES = [
|
|
| 236 |
|
| 237 |
|
| 238 |
with gr.Blocks(title="Construction Code-Citation") as demo:
|
| 239 |
-
gr.Markdown("# Construction Code-Citation Model")
|
| 240 |
gr.Markdown(
|
| 241 |
-
"
|
| 242 |
-
"[AutoScientist Challenge](https://adaptionlabs.ai/auto-scientist) "
|
| 243 |
-
"\"All Other Domains\" category.
|
| 244 |
-
"narrative, returns strict JSON with OIICS hazard
|
| 245 |
-
"OSHA 29 CFR 1926 citations
|
| 246 |
-
"(~
|
| 247 |
)
|
| 248 |
with gr.Row():
|
| 249 |
with gr.Column():
|
|
@@ -264,7 +264,8 @@ with gr.Blocks(title="Construction Code-Citation") as demo:
|
|
| 264 |
gr.Markdown(
|
| 265 |
"**Artifacts:** "
|
| 266 |
"[Dataset](https://huggingface.co/datasets/rigidhat/construction-code-corpus-v1) · "
|
| 267 |
-
"[Model](https://huggingface.co/rigidhat/
|
|
|
|
| 268 |
"[Source](https://github.com/snakezilla/construction-code-llm)"
|
| 269 |
)
|
| 270 |
|
|
|
|
| 15 |
|
| 16 |
import gradio as gr
|
| 17 |
|
| 18 |
+
BASE_MODEL = os.environ.get("BASE_MODEL", "meta-llama/Llama-3.2-3B-Instruct")
|
| 19 |
+
ADAPTER_REPO = os.environ.get("ADAPTER_REPO", "rigidhat/llama-3.2-3b-construction-codecite-v2")
|
| 20 |
DATASET_REPO = os.environ.get("DATASET_REPO", "rigidhat/construction-code-corpus-v1")
|
| 21 |
MAX_NEW_TOKENS = 384
|
| 22 |
RAG_K = 5
|
|
|
|
| 236 |
|
| 237 |
|
| 238 |
with gr.Blocks(title="Construction Code-Citation") as demo:
|
| 239 |
+
gr.Markdown("# Construction Code-Citation Model (v2 · AutoScientist)")
|
| 240 |
gr.Markdown(
|
| 241 |
+
"Llama 3.2 3B fine-tuned by **AutoScientist** on OSHA Severe Injury Reports "
|
| 242 |
+
"for the [Adaption Labs AutoScientist Challenge](https://adaptionlabs.ai/auto-scientist) "
|
| 243 |
+
"\"All Other Domains\" category. **77% win rate** vs base Llama 3.2 3B on our test set. "
|
| 244 |
+
"Given a construction-site incident narrative, returns strict JSON with OIICS hazard "
|
| 245 |
+
"codes plus OSHA 29 CFR 1926 citations, verifier-grounded against the corpus. "
|
| 246 |
+
"First request downloads the base model (~6 GB, one-time)."
|
| 247 |
)
|
| 248 |
with gr.Row():
|
| 249 |
with gr.Column():
|
|
|
|
| 264 |
gr.Markdown(
|
| 265 |
"**Artifacts:** "
|
| 266 |
"[Dataset](https://huggingface.co/datasets/rigidhat/construction-code-corpus-v1) · "
|
| 267 |
+
"[v2 Model (Llama 3.2 3B · AutoScientist)](https://huggingface.co/rigidhat/llama-3.2-3b-construction-codecite-v2) · "
|
| 268 |
+
"[v1 Baseline (Qwen 2.5 1.5B)](https://huggingface.co/rigidhat/qwen-2.5-construction-codecite-v1) · "
|
| 269 |
"[Source](https://github.com/snakezilla/construction-code-llm)"
|
| 270 |
)
|
| 271 |
|