jekyll-hyde-demo / README.md
benjamin5607's picture
Jekyll & Hyde Gradio demo
294d41b verified
|
Raw
History Blame Contribute Delete
1.73 kB
---
title: Jekyll & Hyde
emoji: 🎭
colorFrom: green
colorTo: red
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: mit
python_version: "3.12"
startup_duration_timeout: 1h
short_description: Dual-persona Gemma 2B LoRA β€” Jekyll & Hyde MoE demo
models:
- google/gemma-2-2b-it
- benjamin5607/jekyll-hyde-jekyll-lora
- benjamin5607/jekyll-hyde-hyde-lora
---
# Jekyll & Hyde β€” Hugging Face Demo
Browser demo of **Jekyll & Hyde** (Gemma 2 2B + dual LoRA, MoE blend, dynamic decoding).
| Mode | Description |
|------|-------------|
| **Chat** | Auto MoE blend from prompt (gray-zone aware) |
| **Jekyll** | Guideline defense (strict, low temperature) |
| **Hyde** | Red-team probe |
| **Duel** | Hyde ↔ Jekyll rebuttal β†’ middle-ground synthesis |
## Setup (maintainers)
1. Accept [Gemma 2 license](https://huggingface.co/google/gemma-2-2b-it) on your HF account.
2. Upload adapters: `python scripts/upload_hf_hub.py`
3. Create this Space from the GitHub repo with **App file** = `hf_space/app.py` (or duplicate `hf_space/` into a dedicated Space repo).
4. Space **Settings β†’ Hardware** β†’ **ZeroGPU** (`zero-a10g`) β€” free for PRO hosts; visitors use daily GPU quota.
Or run: `python scripts/enable_zerogpu_space.py`
5. Add Space secret `HF_TOKEN` if gated model access fails (usually auto on Spaces).
## Local smoke test
```bash
pip install -r hf_space/requirements.txt
set HF_JEKYLL_ADAPTER=benjamin5607/jekyll-hyde-jekyll-lora
set HF_HYDE_ADAPTER=benjamin5607/jekyll-hyde-hyde-lora
python hf_space/app.py
```
Full platform (MCP, Workforce, learning): [GitHub β€” model_JekyllHyde](https://github.com/Benjamin5607/model_JekyllHyde)