rigidhat commited on
Commit
9fd5014
·
verified ·
1 Parent(s): 6890ace

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +7 -6
  2. app.py +11 -10
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: Qwen 2.5 1.5B + LoRA for OSHA hazard + code citation
12
  ---
13
 
14
- # Construction Code-Citation Model
15
 
16
- Fine-tuned Qwen 2.5 1.5B for construction-safety incident classification and OSHA 29 CFR 1926 citation grounding.
17
 
18
- - **Base:** [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
19
- - **Adapter:** [rigidhat/qwen-2.5-construction-codecite-v1](https://huggingface.co/rigidhat/qwen-2.5-construction-codecite-v1)
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", "Qwen/Qwen2.5-1.5B-Instruct")
19
- ADAPTER_REPO = os.environ.get("ADAPTER_REPO", "rigidhat/qwen-2.5-construction-codecite-v1")
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
- "Qwen 2.5 1.5B fine-tuned on OSHA Severe Injury Reports for the "
242
- "[AutoScientist Challenge](https://adaptionlabs.ai/auto-scientist) "
243
- "\"All Other Domains\" category. Given a construction-site incident "
244
- "narrative, returns strict JSON with OIICS hazard codes plus verified "
245
- "OSHA 29 CFR 1926 citations. First request downloads the base model "
246
- "(~3 GB, one-time)."
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/qwen-2.5-construction-codecite-v1) · "
 
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