Spaces:
Running on Zero
Running on Zero
|
Download README.md from VanillaVector/Hybrid-Comment-Moderation: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/spaces/VanillaVector/Hybrid-Comment-Moderation/resolve/main/README.md
- Command line
-
hf download hf://spaces/VanillaVector/Hybrid-Comment-Moderation/README.md
-
curl -L -o README.md https://huggingface.co/spaces/VanillaVector/Hybrid-Comment-Moderation/resolve/main/README.md
1.5 kB
| title: Hybrid Comment Moderation | |
| emoji: π¬ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: "5.34.0" | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| tags: | |
| - content-moderation | |
| - hybrid-ai | |
| - distilbert | |
| - qwen | |
| - cs541 | |
| # π¬ Hybrid Comment Moderation | |
| **CS541 AI Final Project β Stevens Institute of Technology** | |
| A two-stage content moderation pipeline that routes comments intelligently: | |
| 1. **Stage 1 β ML Classifier** (DistilBERT, CPU, ~7 ms): handles confident predictions instantly. | |
| 2. **Stage 2 β LLM Reviewer** (Qwen2.5-14B-Instruct, NF4, GPU, ~1β2 s): reviews only ambiguous comments. | |
| ## Tabs | |
| | Tab | Description | | |
| |:----|:------------| | |
| | π **Live Demo** | Type a comment, pick a strategy, see the verdict | | |
| | π **Evaluation** | Pre-computed metrics on 100 balanced Civil Comments samples | | |
| | ποΈ **Architecture** | Pipeline diagram and design rationale | | |
| ## Usage | |
| - **ML-only** works for everyone (CPU, no sign-in needed). | |
| - **Hybrid** and **LLM-only** require a free HuggingFace account for ZeroGPU access. | |
| - First LLM call loads the 14B model (~30β40 s); subsequent calls take ~1β2 s. | |
| ## Reference | |
| - Textbook: *Understanding Deep Learning* by Simon J.D. Prince | |
| - Dataset: [google/civil_comments](https://huggingface.co/datasets/google/civil_comments) | |
| - ML model: [martin-ha/toxic-comment-model](https://huggingface.co/martin-ha/toxic-comment-model) | |
| - LLM: [Qwen/Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) |