--- 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} } ```