Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,60 +1,69 @@
|
|
| 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 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
-
|
| 59 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
- Stable operation across varying input patterns
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
title: sundew_demo
|
| 4 |
+
sdk: gradio
|
| 5 |
+
emoji: 🚀
|
| 6 |
+
colorFrom: indigo
|
| 7 |
+
colorTo: indigo
|
| 8 |
+
short_description: ' Sundew: Adaptive Energy-Aware Gating Algorithm'
|
| 9 |
+
---
|
| 10 |
+
# Sundew Algorithm Demo
|
| 11 |
+
|
| 12 |
+
A simple, interactive demonstration of the Sundew adaptive gating algorithm.
|
| 13 |
+
|
| 14 |
+
## What This Demo Shows
|
| 15 |
+
|
| 16 |
+
This demo visualizes how the Sundew algorithm:
|
| 17 |
+
1. **Scores input significance** based on multiple features
|
| 18 |
+
2. **Adapts the activation threshold** to maintain target processing rates
|
| 19 |
+
3. **Saves energy** by skipping low-importance inputs
|
| 20 |
+
4. **Maintains stability** using hysteresis to prevent oscillation
|
| 21 |
+
|
| 22 |
+
## Running Locally
|
| 23 |
+
|
| 24 |
+
```bash
|
| 25 |
+
pip install -r requirements.txt
|
| 26 |
+
python app.py
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
Then open your browser to the displayed URL (usually http://localhost:7860).
|
| 30 |
+
|
| 31 |
+
## Deploying to Hugging Face Spaces
|
| 32 |
+
|
| 33 |
+
1. Create a new Space on [Hugging Face](https://huggingface.co/spaces)
|
| 34 |
+
2. Upload these files:
|
| 35 |
+
- `app.py`
|
| 36 |
+
- `requirements.txt`
|
| 37 |
+
- `README.md`
|
| 38 |
+
3. Set SDK to "Gradio"
|
| 39 |
+
4. The demo will automatically deploy
|
| 40 |
+
|
| 41 |
+
## Understanding the Visualization
|
| 42 |
+
|
| 43 |
+
### Top Chart: Significance vs Threshold
|
| 44 |
+
- **Blue line**: Significance score for each input (0-1)
|
| 45 |
+
- **Red line**: Adaptive threshold that adjusts over time
|
| 46 |
+
- **Green dots**: Inputs that were processed (activated)
|
| 47 |
+
|
| 48 |
+
### Middle Chart: Activation Pattern
|
| 49 |
+
- Shows which samples were processed (green) vs skipped (white)
|
| 50 |
+
- Gives a clear view of the selective processing pattern
|
| 51 |
+
|
| 52 |
+
### Bottom Chart: Energy Savings
|
| 53 |
+
- Real-time percentage of energy saved
|
| 54 |
+
- Orange dashed line shows the target based on processing rate
|
| 55 |
+
|
| 56 |
+
## Key Parameters
|
| 57 |
+
|
| 58 |
+
- **Target Processing Rate**: What percentage of inputs to process
|
| 59 |
+
- **Number of Samples**: How many data points to simulate
|
| 60 |
+
- **Anomaly Rate**: Percentage of high-importance events in the stream
|
| 61 |
+
|
| 62 |
+
## Technical Innovation
|
| 63 |
+
|
| 64 |
+
The algorithm uses a PI controller with hysteresis to maintain stable activation rates while adapting to changing input patterns. This prevents oscillation while enabling efficient energy management.
|
| 65 |
+
|
| 66 |
+
Typical results:
|
| 67 |
+
- 70-85% energy savings
|
| 68 |
+
- ±3% accuracy in maintaining target rates
|
| 69 |
- Stable operation across varying input patterns
|