File size: 1,727 Bytes
4e27472
 
 
 
 
 
294d41b
4e27472
 
 
2fff53a
 
4e27472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2fff53a
 
 
4e27472
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---

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)