File size: 4,001 Bytes
afae0bb eb5a4af 728ea85 afae0bb db4512b afae0bb 728ea85 afae0bb eb5a4af 728ea85 a929903 728ea85 152d70c ce474fd 45ea61f 65c8666 7251e08 45ea61f db4512b 152d70c 09a3d6b 65c8666 | 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 61 62 63 64 65 | ---
title: CID · Demo
emoji: 🧠
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 5.44.1
python_version: '3.10.13'
app_file: app.py
pinned: false
models:
- fwerkor/CID-v1-0.4B
tags:
- cid
- continuous-interaction-diffusion
- diffusion-language-model
- tool-use
- reasoning
---
# CID · Demo
Interactive Hugging Face Space for the 398.8M-parameter `fwerkor/CID-v1-0.4B` checkpoint.
The demo exposes CID's revisable Display and runtime trace with example prompts for the released 0.4B checkpoint. Compute can be switched between ZeroGPU and a CPU fallback; CPU runs bypass the ZeroGPU-decorated execution path and do not consume GPU quota. This hosted Demo intentionally uses the portable reference runtime; native deployments can use [`cid-engine`](https://github.com/fwerkor/cid-engine) for substantial execution acceleration. `calculator`, `symbolic_math`, and the task-local workspace are enabled explicitly from the UI. The workspace editor is disabled until its tool switch is enabled; document-backed examples enable it automatically. Workspace mode exposes read-only `workspace_search` and `workspace_read` information needs while reasoning.
The **CID in motion** replay sits between the result and detailed inspection tabs. Play or scrub through the current run, jump to tool returns and evidence projections, inspect observed TCT cell states, and compare successive Display snapshots. The shared clock uses measured trace timestamps; playback speed is adjustable. The visualization uses the full runtime events, including asynchronous completion callbacks, without additional model calls. Cell semantics and unrecorded tool contents are not inferred.
The model is mechanism-focused, with general-purpose chat outside the primary evaluation target. The Space uses the published unified checkpoint and pins the CID runtime implementation to commit `49c02313044278c93e929834261bebebf3f66bf5`.
**Paper:** [Continuous Interaction Diffusion: A Diffusion-Native Architecture for Asynchronous Tool-Augmented Reasoning](https://arxiv.org/abs/2608.10438)
## Code layout
- `app.py` — minimal Space entrypoint.
- `cid_demo/ui.py` — Gradio component tree and event wiring.
- `cid_demo/runtime.py` — CID request construction and benchmark execution.
- `cid_demo/model.py` — checkpoint download and model bundle initialization.
- `cid_demo/tools.py` — tool descriptors and math argument extraction.
- `cid_demo/workspace.py` — task-local document parsing.
- `cid_demo/examples.py` — public examples and workspace fixtures.
- `cid_demo/presentation.py` and `cid_demo/assets/styles.css` — display formatting, HTML, and styling.
- `cid_demo/mechanism.py` and `cid_demo/assets/mechanism.*` — isolated interactive trace replay, event reducer, and responsive mechanism view.
## Frontend checks
Run `python -m pytest tests` and `node --test tests/mechanism-state.test.cjs`. These cover trace preservation, text isolation, asynchronous ordering, lifecycle reconstruction, failure/cancellation, and non-converged runs. The `/run_cid` API retains its first four outputs and appends the replay HTML as its fifth output.
The Runtime trace inspector preserves complete event payloads, supports event/search filters, and exports JSON with run settings. Detailed tracing in this Demo records threshold scores, Display token edits, TCT lifecycle state, tool arguments and observations. The mechanism replay shows these measured events, including model/tool overlap and tool-result collection delays.
## Citation
If you use this CID artifact in research, please cite the CID paper:
```bibtex
@article{cao2026continuous,
title = {Continuous Interaction Diffusion: A Diffusion-Native Architecture for Asynchronous Tool-Augmented Reasoning},
author = {Cao, Yuhang and Mu, Yanzhou and Fang, Chunrong and Chen, Zhenyu},
journal = {arXiv preprint arXiv:2608.10438},
year = {2026},
doi = {10.48550/arXiv.2608.10438},
url = {https://arxiv.org/abs/2608.10438}
}
```
|