Spaces:
Running on Zero
A newer version of the Gradio SDK is available: 6.26.0
title: Remora Layer Lab
emoji: 🐟
colorFrom: blue
colorTo: indigo
sdk: gradio
python_version: '3.12'
sdk_version: 5.49.1
app_file: app.py
models:
- LiquidAI/LFM2.5-1.2B-Instruct
tags:
- remora
- layer-control
- lfm2
- zerogpu
Remora Layer Lab
A research-only Hugging Face ZeroGPU Space that runs LiquidAI/LFM2.5-1.2B-Instruct and applies explicit, reproducible controls to selected hidden-state layers.
What this is
A PyTorch experimental adapter for the existing Remora research method.
Captures per-layer hidden-state statistics for each generation run.
Applies a scalar gain to selected decoder-block outputs:
controlled = baseline + strength × (baseline - token_mean)strength = 0: observation only; output is unchanged.- negative strength: damp the selected residual signal.
- positive strength: amplify it.
Produces a JSONL trace that can be compared with the Rust/llama.cpp Remora traces.
What this is not
This is not the Rust production lane and does not replace local remora on Janus. The HF ZeroGPU Space is a bounded research surface: Gradio/PyTorch only, shared GPU allocation, daily quota, and no persistent runtime disk. The production route remains octopus → local lfm-fast.
Run protocol
- Use the default
strength = 0to create a baseline trace. - Repeat the same prompt with one selected layer and one non-zero strength.
- Compare output and trace statistics outside the Space. Save the downloaded JSONL with the prompt suite and run metadata.
- Keep a request below the declared GPU duration. Start with 32 output tokens.
Cost boundary
For a PRO account, ZeroGPU has a 40-minute daily quota. Usage after the quota costs $1 per 10 minutes from pre-paid HF credits. The Space uses large (48 GB, one quota unit), not xlarge.
Local checks
python -m unittest discover -s tests -v
Deploy
Create an HF Gradio ZeroGPU Space called gcorzo/remora-layer-lab, select ZeroGPU hardware in its Settings, then push this directory to the Space repository. The HF token used for this must have Space write permission; no token is stored in this repository.