Spaces:
Running
Running
Max Rossi commited on
Publish CacheBack project website and demos
Browse files- .gitattributes +2 -0
- .nojekyll +1 -0
- LICENSE +202 -0
- README.md +17 -6
- demo/coding/evidence.json +54 -0
- demo/coding/poster.jpg +0 -0
- demo/coding/rclc-cacheback-4k.mp4 +3 -0
- demo/index.html +279 -0
- demo/trace-w4.json +0 -0
- index.html +137 -17
- social-preview.jpg +3 -0
- website/assets/app.js +38 -0
- website/assets/figures/communication-overview.svg +1 -0
- website/assets/figures/fanoutqa-nemotron.svg +217 -0
- website/assets/figures/fanoutqa-qwen.svg +235 -0
- website/assets/figures/longbench-nemotron.svg +249 -0
- website/assets/figures/longbench-qwen.svg +254 -0
- website/assets/results.json +61 -0
- website/assets/styles.css +263 -0
- website/check.mjs +106 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
demo/coding/rclc-cacheback-4k.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
social-preview.jpg filter=lfs diff=lfs merge=lfs -text
|
.nojekyll
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright 2026 The RCLC Authors
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
README.md
CHANGED
|
@@ -1,10 +1,21 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CacheBack
|
| 3 |
+
emoji: 🗂️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
+
app_file: index.html
|
| 8 |
+
fullWidth: true
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
short_description: Receiver-conditioned latent communication between agents
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# CacheBack
|
| 14 |
+
|
| 15 |
+
Receiver-Conditioned Latent Communication gives 94% CacheBack.
|
| 16 |
+
|
| 17 |
+
[Paper](https://arxiv.org/abs/2609.32046) · [Code](https://github.com/agentcacheback/cacheback) · [Website](https://agentcacheback.github.io/)
|
| 18 |
+
|
| 19 |
+
This static Space mirrors the project website, with benchmark results, an interactive recorded booking replay, and a coding demo video. It does not run model inference.
|
| 20 |
+
|
| 21 |
+
The website source is maintained at https://github.com/agentcacheback/agentcacheback.github.io.
|
demo/coding/evidence.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run_id": "bughunt-16333-run-20261001T051520Z",
|
| 3 |
+
"source": "s3://lce-pr2789-paper/rclc-demo/bughunt-16333-run-20261001T051520Z/",
|
| 4 |
+
"model": "Qwen/Qwen3-8B",
|
| 5 |
+
"issue": "django__django-16333",
|
| 6 |
+
"arms": {
|
| 7 |
+
"text": {
|
| 8 |
+
"seconds": 113.20635836,
|
| 9 |
+
"worker_seconds": 100.612943677,
|
| 10 |
+
"worker_done": [
|
| 11 |
+
100.612943677,
|
| 12 |
+
38.252793639,
|
| 13 |
+
25.637343035,
|
| 14 |
+
33.867839988,
|
| 15 |
+
22.492231897,
|
| 16 |
+
78.432600727,
|
| 17 |
+
29.442396709
|
| 18 |
+
],
|
| 19 |
+
"status": "resolved",
|
| 20 |
+
"patch": "diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py\n--- a/django/contrib/auth/forms.py\n+++ b/django/contrib/auth/forms.py\n@@ -141,6 +141,7 @@\n user.set_password(self.cleaned_data[\"password1\"])\n if commit:\n user.save()\n+ self.save_m2m()\n return user\n \n \n",
|
| 21 |
+
"new_tests_passed": 1,
|
| 22 |
+
"regression_tests_passed": 87,
|
| 23 |
+
"failed_tests": 0,
|
| 24 |
+
"handoff_bytes": 24969,
|
| 25 |
+
"handoff_rows": 0,
|
| 26 |
+
"coordinator_tokens": 1470,
|
| 27 |
+
"source_result": "s3://lce-pr2789-paper/rclc-demo/bughunt-16333-run-20261001T051520Z/text/result.json",
|
| 28 |
+
"source_grade": "s3://lce-pr2789-paper/rclc-demo/bughunt-16333-run-20261001T051520Z/grades/text.json"
|
| 29 |
+
},
|
| 30 |
+
"latent": {
|
| 31 |
+
"seconds": 25.66205141,
|
| 32 |
+
"worker_seconds": 6.196859804,
|
| 33 |
+
"worker_done": [
|
| 34 |
+
6.196859804,
|
| 35 |
+
6.093338203,
|
| 36 |
+
6.146028218,
|
| 37 |
+
6.18476604,
|
| 38 |
+
6.18007457,
|
| 39 |
+
5.908353919,
|
| 40 |
+
6.053007381
|
| 41 |
+
],
|
| 42 |
+
"status": "resolved",
|
| 43 |
+
"patch": "diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py\n--- a/django/contrib/auth/forms.py\n+++ b/django/contrib/auth/forms.py\n@@ -141,6 +141,7 @@\n user.set_password(self.cleaned_data[\"password1\"])\n if commit:\n user.save()\n+ self.save_m2m()\n return user\n \n \n",
|
| 44 |
+
"new_tests_passed": 1,
|
| 45 |
+
"regression_tests_passed": 87,
|
| 46 |
+
"failed_tests": 0,
|
| 47 |
+
"handoff_bytes": 675872768,
|
| 48 |
+
"handoff_rows": 82504,
|
| 49 |
+
"coordinator_tokens": 921,
|
| 50 |
+
"source_result": "s3://lce-pr2789-paper/rclc-demo/bughunt-16333-run-20261001T051520Z/latent/result.json",
|
| 51 |
+
"source_grade": "s3://lce-pr2789-paper/rclc-demo/bughunt-16333-run-20261001T051520Z/grades/latent.json"
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
}
|
demo/coding/poster.jpg
ADDED
|
demo/coding/rclc-cacheback-4k.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0410bb4e8dc44218716c97160413bfebe7c3185bf79abd94e5566d3357d0691
|
| 3 |
+
size 5796872
|
demo/index.html
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
+
<meta name="color-scheme" content="light">
|
| 7 |
+
<title>CacheBack | Booking relay</title>
|
| 8 |
+
<style>
|
| 9 |
+
* { box-sizing:border-box; }
|
| 10 |
+
body { margin:0; background:#fff; color:#222; font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
|
| 11 |
+
main { width:min(1320px,calc(100% - 64px)); margin:24px auto; }
|
| 12 |
+
header { font-size:18px; font-weight:650; }
|
| 13 |
+
.question { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:14px 0 22px; }
|
| 14 |
+
h1 { max-width:880px; margin:0; font-size:clamp(23px,3vw,28px); font-weight:500; letter-spacing:-.6px; line-height:1.3; }
|
| 15 |
+
h2 { margin:0; font-size:15px; font-weight:600; }
|
| 16 |
+
button,a { -webkit-tap-highlight-color:transparent; }
|
| 17 |
+
button { font:inherit; cursor:pointer; border:0; border-radius:4px; background:#222; color:#fff; padding:10px 20px; white-space:nowrap; }
|
| 18 |
+
button:disabled { cursor:default; opacity:.5; }
|
| 19 |
+
.controls { display:flex; align-items:center; gap:14px; }
|
| 20 |
+
#speed { font:inherit; font-size:13px; color:#666; border:0; background:transparent; padding:8px 2px; cursor:pointer; }
|
| 21 |
+
#clear { background:none; color:#777; padding:8px 0; font-size:13px; }
|
| 22 |
+
:focus-visible { outline:2px solid #222; outline-offset:5px; }
|
| 23 |
+
.topology,.row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:28px; }
|
| 24 |
+
.topology { margin:0 0 16px; padding:0; list-style:none; }
|
| 25 |
+
.flow-label { margin:0 0 10px; color:#777; font-size:11px; }
|
| 26 |
+
.topology li { position:relative; padding:10px 14px; border:1px solid #ddd; border-radius:5px; font-size:13px; }
|
| 27 |
+
.topology li:not(:last-child)::after { content:"→"; position:absolute; right:-23px; top:50%; transform:translateY(-50%); font-size:20px; color:#777; }
|
| 28 |
+
.topology strong { display:block; }
|
| 29 |
+
.topology span { color:#777; font-size:12px; }
|
| 30 |
+
.method { margin-top:16px; }
|
| 31 |
+
.method-heading { display:flex; align-items:baseline; gap:14px; margin-bottom:12px; }
|
| 32 |
+
.time { font-size:13px; color:#666; font-variant-numeric:tabular-nums; }
|
| 33 |
+
.chunk { border-top:1px solid #ddd; padding:12px 10px 0 0; height:230px; overflow:auto; scrollbar-width:thin; white-space:pre-wrap; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
|
| 34 |
+
.chunk::before { display:none; content:attr(data-agent); font:600 12px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; white-space:normal; margin-bottom:12px; }
|
| 35 |
+
.source { font-family:Georgia,"Times New Roman",serif; font-size:13px; }
|
| 36 |
+
.answer { font-size:13px; }
|
| 37 |
+
.answer-check { margin:14px 0 0; font-size:12px; font-weight:600; }
|
| 38 |
+
strong { font-weight:600; }
|
| 39 |
+
mark { color:inherit; background:linear-gradient(#bde8e3,#bde8e3) left/100% 100% no-repeat; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
|
| 40 |
+
.revealing mark { animation:highlight .18s ease-out both; }
|
| 41 |
+
@keyframes highlight { from { background-size:0% 100%; } to { background-size:100% 100%; } }
|
| 42 |
+
footer { display:flex; justify-content:space-between; gap:20px; margin-top:28px; font-size:11px; color:#777; }
|
| 43 |
+
footer p { margin:0; }
|
| 44 |
+
a { color:inherit; text-underline-offset:3px; }
|
| 45 |
+
#error { color:#8e2b1d; }
|
| 46 |
+
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
|
| 47 |
+
@media(max-width:800px) {
|
| 48 |
+
main { width:calc(100% - 32px); margin:24px auto; }
|
| 49 |
+
.question { align-items:flex-start; flex-direction:column; gap:18px; margin:24px 0; }
|
| 50 |
+
.topology { display:none; }
|
| 51 |
+
.row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
|
| 52 |
+
.chunk::before { display:block; }
|
| 53 |
+
.chunk { height:260px; }
|
| 54 |
+
footer { flex-direction:column; gap:8px; }
|
| 55 |
+
}
|
| 56 |
+
@media(max-width:520px) { .row { grid-template-columns:1fr; } }
|
| 57 |
+
.embedded header,.embedded #question { display:none; }
|
| 58 |
+
.embedded main { margin:16px auto; }
|
| 59 |
+
.embedded .question { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
|
| 60 |
+
.embedded .flow-label { display:none; }
|
| 61 |
+
.embedded .question { padding-bottom:12px; border-bottom:1px solid #ddd; }
|
| 62 |
+
.embedded .topology { display:flex; flex:1; min-width:0; gap:22px; margin:0; }
|
| 63 |
+
.embedded .topology li { display:flex; align-items:center; gap:6px; flex:1; min-width:0; padding:0; border:0; }
|
| 64 |
+
.embedded .topology strong { white-space:nowrap; font-size:12px; }
|
| 65 |
+
.embedded .topology span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
|
| 66 |
+
.embedded .topology li:not(:last-child)::after { right:-17px; font-size:15px; }
|
| 67 |
+
.embedded .controls { flex-shrink:0; gap:10px; }
|
| 68 |
+
@media(max-width:800px) {
|
| 69 |
+
.embedded .topology span { display:none; }
|
| 70 |
+
.embedded .topology { gap:16px; }
|
| 71 |
+
.embedded .topology li:not(:last-child)::after { right:-12px; }
|
| 72 |
+
.embedded .topology strong { font-size:10px; }
|
| 73 |
+
.embedded .controls { gap:5px; }
|
| 74 |
+
.embedded button { padding:8px 10px; }
|
| 75 |
+
}
|
| 76 |
+
@media(min-width:801px) { .embedded .chunk { height:260px; } }
|
| 77 |
+
@media(prefers-reduced-motion:reduce) { .revealing mark { animation:none; } }
|
| 78 |
+
</style>
|
| 79 |
+
</head>
|
| 80 |
+
<body>
|
| 81 |
+
<main>
|
| 82 |
+
<header>CacheBack</header>
|
| 83 |
+
<section class="question" aria-label="Recorded question">
|
| 84 |
+
<h1 id="question">Where should Maya collect her pass on Friday, and what ID should she bring?</h1>
|
| 85 |
+
<div class="controls">
|
| 86 |
+
<select id="speed" aria-label="Playback speed" disabled>
|
| 87 |
+
<option value="1">1×</option>
|
| 88 |
+
<option value="2">2×</option>
|
| 89 |
+
<option value="4">4×</option>
|
| 90 |
+
</select>
|
| 91 |
+
<button id="clear" type="button" hidden>Clear</button>
|
| 92 |
+
<button id="play" type="button" disabled>Run</button>
|
| 93 |
+
</div>
|
| 94 |
+
</section>
|
| 95 |
+
<p id="error" role="alert" hidden></p>
|
| 96 |
+
<div class="flow" aria-label="Four-agent relay">
|
| 97 |
+
<p class="flow-label">Chain of agents</p>
|
| 98 |
+
<ol class="topology" aria-label="Agent topology">
|
| 99 |
+
<li><strong>Agent 1</strong><span>booking-confirmation.txt</span></li>
|
| 100 |
+
<li><strong>Agent 2</strong><span>friday-desk-changes.txt</span></li>
|
| 101 |
+
<li><strong>Agent 3</strong><span>collection-id-rules.txt</span></li>
|
| 102 |
+
<li><strong>Agent 4</strong><span>Final answer</span></li>
|
| 103 |
+
</ol>
|
| 104 |
+
<section class="method" aria-labelledby="rclc-title">
|
| 105 |
+
<div class="method-heading"><h2 id="rclc-title">CacheBack</h2><span class="time" id="rclc-time"></span></div>
|
| 106 |
+
<div class="row" id="rclc-row"></div>
|
| 107 |
+
</section>
|
| 108 |
+
<section class="method" aria-labelledby="text-title">
|
| 109 |
+
<div class="method-heading"><h2 id="text-title">Text</h2><span class="time" id="text-time"></span></div>
|
| 110 |
+
<div class="row" id="text-row"></div>
|
| 111 |
+
</section>
|
| 112 |
+
</div>
|
| 113 |
+
<p class="sr-only" id="status" role="status" aria-live="polite"></p>
|
| 114 |
+
<footer>
|
| 115 |
+
<p><span id="run-info">Recorded replay</span> · <span id="timing-note">Estimated streaming, measured completion times.</span></p>
|
| 116 |
+
<a href="https://github.com/agentcacheback/cacheback/tree/main/demo">Code & recording</a>
|
| 117 |
+
</footer>
|
| 118 |
+
</main>
|
| 119 |
+
<script>
|
| 120 |
+
const $ = id => document.getElementById(id);
|
| 121 |
+
const host = window.frameElement;
|
| 122 |
+
if (host) {
|
| 123 |
+
document.body.classList.add("embedded");
|
| 124 |
+
document.querySelector(".question").prepend(document.querySelector(".topology"));
|
| 125 |
+
const main = document.querySelector("main");
|
| 126 |
+
new ResizeObserver(() => {
|
| 127 |
+
const bottomMargin = parseFloat(getComputedStyle(main).marginBottom);
|
| 128 |
+
host.style.height = `${Math.ceil(main.offsetTop + main.offsetHeight + bottomMargin) + 1}px`;
|
| 129 |
+
}).observe(main);
|
| 130 |
+
}
|
| 131 |
+
let trace, playing = false, frame;
|
| 132 |
+
const phases = {rclc:0, text:0};
|
| 133 |
+
const reviewedAnswer = 'Maya should collect her pass at **Harbour Hub** on Friday, and she should bring a **passport** as her ID.\n\n**Evidence:**\n- "Reference J7 has moved to Harbour Hub."\n- "Harbour Hub requires a passport for replacement building pass collections."';
|
| 134 |
+
|
| 135 |
+
function element(tag, text) {
|
| 136 |
+
const node = document.createElement(tag);
|
| 137 |
+
if (text !== undefined) node.textContent = text;
|
| 138 |
+
return node;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
function segments(source, indices) {
|
| 142 |
+
const chars = Array.from(source.text), mask = Array(chars.length).fill(false);
|
| 143 |
+
for (const index of indices) {
|
| 144 |
+
const [start, end] = source.offsets[index];
|
| 145 |
+
for (let i = start; i < end; i++) mask[i] = true;
|
| 146 |
+
}
|
| 147 |
+
const result = [];
|
| 148 |
+
for (let start = 0; start < chars.length;) {
|
| 149 |
+
let end = start + 1;
|
| 150 |
+
while (end < chars.length && mask[end] === mask[start]) end++;
|
| 151 |
+
result.push({text:chars.slice(start, end).join(""), selected:mask[start]});
|
| 152 |
+
start = end;
|
| 153 |
+
}
|
| 154 |
+
return result;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
function prose(container, text, fraction = 1) {
|
| 158 |
+
const parts = text.split(/(\*\*[^*\n]+\*\*)/g).map(part => {
|
| 159 |
+
const bold = part.startsWith("**") && part.endsWith("**");
|
| 160 |
+
return {bold, chars:Array.from(bold ? part.slice(2, -2) : part)};
|
| 161 |
+
});
|
| 162 |
+
let remaining = Math.floor(parts.reduce((n, part) => n + part.chars.length, 0) * fraction);
|
| 163 |
+
if (container.dataset.characters === String(remaining)) return;
|
| 164 |
+
container.dataset.characters = String(remaining); container.replaceChildren();
|
| 165 |
+
for (const part of parts) {
|
| 166 |
+
const chars = part.chars.slice(0, remaining); remaining -= chars.length;
|
| 167 |
+
if (chars.length) container.append(element(part.bold ? "strong" : "span", chars.join("")));
|
| 168 |
+
}
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
function render(method) {
|
| 172 |
+
const phase = phases[method], recorded = trace.cases[0], selected = trace.sources.map(() => []);
|
| 173 |
+
if (method === "rclc" && phase) for (const [source, token] of recorded.rclc.hops[Math.min(phase,3) - 1].origins) selected[source].push(token);
|
| 174 |
+
const row = $(`${method}-row`), scroll = [...row.children].map(node => node.scrollTop);
|
| 175 |
+
row.replaceChildren();
|
| 176 |
+
trace.sources.forEach((source, i) => {
|
| 177 |
+
const chunk = element("div"); chunk.className = "chunk";
|
| 178 |
+
const name = document.querySelectorAll(".topology li span")[i].textContent;
|
| 179 |
+
chunk.dataset.agent = `Agent ${i + 1} · ${name}`;
|
| 180 |
+
chunk.tabIndex = 0; chunk.setAttribute("aria-label", `${method === "rclc" ? "Source document" : "Text handoff"} ${i + 1}: ${name}`);
|
| 181 |
+
if (method === "rclc") {
|
| 182 |
+
chunk.classList.add("source");
|
| 183 |
+
chunk.classList.toggle("revealing", playing && phase === i + 1);
|
| 184 |
+
for (const piece of segments(source, selected[i])) chunk.append(element(piece.selected ? "mark" : "span", piece.text));
|
| 185 |
+
} else if (phase > i) {
|
| 186 |
+
const message = recorded.text.hops[i].message;
|
| 187 |
+
prose(chunk, message.text || "(empty handoff)");
|
| 188 |
+
if (message.stop === "limit") chunk.append(element("p", "Handoff reached its token limit."));
|
| 189 |
+
}
|
| 190 |
+
row.append(chunk);
|
| 191 |
+
chunk.scrollTop = method === "text" && phase === i + 1 ? chunk.scrollHeight : scroll[i] || 0;
|
| 192 |
+
});
|
| 193 |
+
const answer = element("div"); answer.className = "chunk answer";
|
| 194 |
+
answer.dataset.agent = "Agent 4 · Final answer";
|
| 195 |
+
answer.tabIndex = 0; answer.setAttribute("aria-label", `${method === "rclc" ? "CacheBack" : "Text"} final answer`);
|
| 196 |
+
if (phase === 4) {
|
| 197 |
+
prose(answer, recorded[method].answer.text || "(empty answer)");
|
| 198 |
+
if (recorded[method].answer.stop === "limit") answer.append(element("p", "Answer reached its token limit."));
|
| 199 |
+
if (method === "rclc" && recorded.question === "Where should Maya collect her pass on Friday, and what ID should she bring?" && recorded.rclc.answer.text === reviewedAnswer) {
|
| 200 |
+
const check = element("p", "✓ Harbour Hub · Passport");
|
| 201 |
+
check.className = "answer-check"; answer.append(check);
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
row.append(answer); answer.scrollTop = phase === 4 ? answer.scrollHeight : scroll[3] || 0;
|
| 205 |
+
$(`${method}-time`).textContent = phase === 4 ? `${recorded[method].seconds.toFixed(2)} s` : "";
|
| 206 |
+
$("status").textContent = `${method === "rclc" ? "CacheBack" : "Text"}: ${phase === 4 ? "final answer received." : `${phase} of 3 handoffs received.`}`;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
function play() {
|
| 210 |
+
if (playing || !trace) return;
|
| 211 |
+
playing = true; $("play").disabled = $("speed").disabled = true;
|
| 212 |
+
$("clear").hidden = false;
|
| 213 |
+
const speed = Number($("speed").value), deadlines = {};
|
| 214 |
+
for (const method of ["rclc", "text"]) {
|
| 215 |
+
const run = trace.cases[0][method];
|
| 216 |
+
let elapsed = 0;
|
| 217 |
+
deadlines[method] = [...run.hops.map(hop => elapsed += hop.seconds * 1000), run.seconds * 1000];
|
| 218 |
+
phases[method] = 0; render(method);
|
| 219 |
+
}
|
| 220 |
+
let start;
|
| 221 |
+
function advance(now) {
|
| 222 |
+
start ??= now;
|
| 223 |
+
const elapsed = (now - start) * speed;
|
| 224 |
+
for (const method of ["rclc", "text"]) {
|
| 225 |
+
const phase = deadlines[method].filter(ms => elapsed >= ms).length;
|
| 226 |
+
if (phase !== phases[method]) { phases[method] = phase; render(method); }
|
| 227 |
+
if (phase < 4) {
|
| 228 |
+
$(`${method}-time`).textContent = `${(elapsed / 1000).toFixed(2)} s`;
|
| 229 |
+
if (method === "text" || phase === 3) {
|
| 230 |
+
const begin = phase ? deadlines[method][phase - 1] : 0;
|
| 231 |
+
const message = phase === 3 ? trace.cases[0][method].answer : trace.cases[0].text.hops[phase].message;
|
| 232 |
+
const chunk = $(`${method}-row`).children[phase];
|
| 233 |
+
prose(chunk, message.text, (elapsed - begin) / (deadlines[method][phase] - begin));
|
| 234 |
+
chunk.scrollTop = chunk.scrollHeight;
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
if (phases.rclc < 4 || phases.text < 4) frame = requestAnimationFrame(advance);
|
| 239 |
+
else {
|
| 240 |
+
playing = false; $("play").disabled = $("speed").disabled = false;
|
| 241 |
+
$("play").textContent = "Replay";
|
| 242 |
+
}
|
| 243 |
+
}
|
| 244 |
+
frame = requestAnimationFrame(advance);
|
| 245 |
+
}
|
| 246 |
+
$("play").addEventListener("click", play);
|
| 247 |
+
$("clear").addEventListener("click", () => {
|
| 248 |
+
cancelAnimationFrame(frame); playing = false;
|
| 249 |
+
for (const method of ["rclc", "text"]) {
|
| 250 |
+
phases[method] = 0; render(method);
|
| 251 |
+
for (const chunk of $(`${method}-row`).children) chunk.scrollTop = 0;
|
| 252 |
+
}
|
| 253 |
+
$("play").disabled = $("speed").disabled = false;
|
| 254 |
+
$("play").textContent = "Run"; $("clear").hidden = true;
|
| 255 |
+
$("play").focus();
|
| 256 |
+
});
|
| 257 |
+
$("speed").addEventListener("change", () => {
|
| 258 |
+
$("timing-note").textContent = `${$("speed").value === "1" ? "" : `Playback ${$("speed").value}×. `}Estimated streaming, measured completion times.`;
|
| 259 |
+
});
|
| 260 |
+
|
| 261 |
+
async function load() {
|
| 262 |
+
try {
|
| 263 |
+
const response = await fetch("trace-w4.json");
|
| 264 |
+
if (!response.ok) throw new Error(`Recording unavailable (${response.status}).`);
|
| 265 |
+
trace = await response.json();
|
| 266 |
+
if (trace.schema !== 2 || trace.span_size !== 4 || trace.sources.length !== 3 || !trace.cases.length) throw new Error("Expected a W=4 three-handoff recording.");
|
| 267 |
+
$("question").textContent = trace.cases[0].question;
|
| 268 |
+
const hardware = trace.run.device.startsWith("cuda") ? trace.run.gpu.replace("NVIDIA ", "") : "CPU";
|
| 269 |
+
$("run-info").textContent = `Recorded ${trace.run.model.split("/").pop()} · ${hardware} · r${trace.ratio} · W=4${trace.complete === false ? " · Partial recording" : ""}`;
|
| 270 |
+
render("rclc"); render("text"); $("play").disabled = $("speed").disabled = false;
|
| 271 |
+
} catch (error) {
|
| 272 |
+
$("error").hidden = false;
|
| 273 |
+
$("error").textContent = `${error.message} Serve this folder with python -m http.server.`;
|
| 274 |
+
}
|
| 275 |
+
}
|
| 276 |
+
load();
|
| 277 |
+
</script>
|
| 278 |
+
</body>
|
| 279 |
+
</html>
|
demo/trace-w4.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
index.html
CHANGED
|
@@ -1,19 +1,139 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
+
<meta name="theme-color" content="#fafafa">
|
| 7 |
+
<meta name="description" content="CacheBack: receiver-conditioned communication between LLM agents. Paper, code, results, and demonstrations.">
|
| 8 |
+
<meta property="og:title" content="CacheBack | Receiver-conditioned communication">
|
| 9 |
+
<meta property="og:description" content="The receiver asks for what it needs. CacheBack uses that request to select which internal state gets sent, without additional training.">
|
| 10 |
+
<meta property="og:type" content="website">
|
| 11 |
+
<meta property="og:url" content="https://agentcacheback.github.io/">
|
| 12 |
+
<meta property="og:image" content="https://agentcacheback.github.io/social-preview.jpg">
|
| 13 |
+
<meta property="og:image:alt" content="CacheBack: receiver-conditioned communication between LLM agents, with accuracy and completion-time results across four model families.">
|
| 14 |
+
<meta property="og:image:type" content="image/jpeg">
|
| 15 |
+
<meta property="og:image:width" content="1200">
|
| 16 |
+
<meta property="og:image:height" content="727">
|
| 17 |
+
<meta name="twitter:image" content="https://agentcacheback.github.io/social-preview.jpg">
|
| 18 |
+
<meta name="twitter:card" content="summary_large_image">
|
| 19 |
+
<link rel="canonical" href="https://agentcacheback.github.io/">
|
| 20 |
+
<title>Receiver-Conditioned Latent Communication gives 94% CacheBack</title>
|
| 21 |
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='6' fill='%231c211e'/%3E%3Cpath d='M7 7h7v7H7zm11 0h7v7h-7zM7 18h7v7H7z' fill='%230f766e'/%3E%3Cpath d='M18 18h7v7h-7z' fill='%23fff'/%3E%3C/svg%3E">
|
| 22 |
+
<link rel="stylesheet" href="website/assets/styles.css?v=tldr-hero-2">
|
| 23 |
+
<script type="module" src="website/assets/app.js"></script>
|
| 24 |
+
</head>
|
| 25 |
+
<body>
|
| 26 |
+
<a class="skip-link" href="#main">Skip to content</a>
|
| 27 |
+
<header class="site-header wrap">
|
| 28 |
+
<a class="brand" href="#" aria-label="CacheBack home"><span class="brand-mark" aria-hidden="true"><i></i><i></i><i></i><i></i></span>CacheBack</a>
|
| 29 |
+
<nav aria-label="Main navigation"><a href="#abstract">Overview</a><a href="#results">Results</a><a href="#demo">Demos</a></nav>
|
| 30 |
+
</header>
|
| 31 |
+
<main id="main">
|
| 32 |
+
<section class="hero wrap" aria-labelledby="hero-title">
|
| 33 |
+
<div class="hero-copy">
|
| 34 |
+
<p class="eyebrow">September 2026</p>
|
| 35 |
+
<h1 id="hero-title">Receiver-Conditioned Latent Communication gives <span class="rclc-emphasis">94% CacheBack</span></h1>
|
| 36 |
+
<div class="hero-authors">
|
| 37 |
+
<ul aria-label="Authors"><li>Maximillian Rossi</li><li>Prajwal Raghunath</li><li>Haoqing Xuan</li><li>Yusen Zhang</li><li>Eugene Wu</li></ul>
|
| 38 |
+
<p class="affiliations"><a href="https://daplab.cs.columbia.edu/"><img src="https://daplab.cs.columbia.edu/files/images/daplab_logo_horiz.png" width="1508" height="331" alt="DAP Lab"></a><span>Columbia University</span></p>
|
| 39 |
+
</div>
|
| 40 |
+
<div class="tldr"><p><b>TLDR;</b> Agents can share <strong>internal model state</strong> instead of generating text messages. Sending all of it, however, overwhelms the receiver.</p><p><strong>The receiver asks for what it needs.</strong> CacheBack uses attention to that request to select which state gets sent. Simple, robust, and <strong>training-free.</strong></p><p>The title’s 94% refers to removing 93.75% of sender positions at 16× compression.</p></div>
|
| 41 |
+
<nav class="resource-links" aria-label="Project resources">
|
| 42 |
+
<a href="https://arxiv.org/pdf/2609.32046">Paper <span>PDF</span></a>
|
| 43 |
+
<a href="https://github.com/agentcacheback/cacheback">Code</a>
|
| 44 |
+
<a href="#demo">Watch demo</a>
|
| 45 |
+
<a href="https://arxiv.org/abs/2609.32046">arXiv</a>
|
| 46 |
+
<a href="#citation" id="cite-link">Cite</a>
|
| 47 |
+
</nav>
|
| 48 |
+
</div>
|
| 49 |
+
<aside class="hero-results" aria-labelledby="hero-results-title">
|
| 50 |
+
<h2 id="hero-results-title" class="eyebrow">FANOUTQA</h2><p class="visual-note">Three senders read different Wikipedia pages; one receiver combines their messages to answer a question. Each row compares same-size models: higher accuracy and lower time are better. pp = percentage points.</p>
|
| 51 |
+
<figure id="result-summary" class="comparison-plot" aria-labelledby="hero-results-title">
|
| 52 |
+
<div class="plot-legend"><span><i></i>Text · same-size senders</span><span class="rclc-emphasis"><i></i>CacheBack</span></div>
|
| 53 |
+
<div class="paired-metrics chart-heading"><div><strong>Strict accuracy (%) ↑</strong></div><div><strong>Median time (s) ↓</strong></div></div>
|
| 54 |
+
<div class="model-row" data-model="qwen"><div class="model-heading paired-metrics"><div class="model-label"><h3>Qwen 3 <small>8B</small></h3><strong class="accuracy-gain">+14.7<abbr title="percentage points">pp</abbr></strong></div></div><div class="paired-metrics"><div class="paired-bars"><div class="bar-row" role="img" aria-label="Text: 40.7%"><div class="bar-track"><i style="width:40.6700%"></i></div><b>40.7%</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 55.3%"><div class="bar-track"><i style="width:55.3300%"></i></div><b>55.3%</b></div></div><div class="paired-bars latency-bars"><div class="speed-guide" style="--cache-end:11.9938%"><strong class="speedup">3.2× faster</strong></div><div class="bar-row" role="img" aria-label="Text: 612 s"><div class="bar-track"><i style="width:38.2437%"></i></div><b>612 s</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 192 s"><div class="bar-track"><i style="width:11.9938%"></i></div><b>192 s</b></div></div></div></div>
|
| 55 |
+
<div class="model-row" data-model="nemotron"><div class="model-heading paired-metrics"><div class="model-label"><h3>Nemotron <small>12B</small></h3><strong class="accuracy-gain">+11.3<abbr title="percentage points">pp</abbr></strong></div></div><div class="paired-metrics"><div class="paired-bars"><div class="bar-row" role="img" aria-label="Text: 38.7%"><div class="bar-track"><i style="width:38.6667%"></i></div><b>38.7%</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 50.0%"><div class="bar-track"><i style="width:50.0000%"></i></div><b>50.0%</b></div></div><div class="paired-bars latency-bars"><div class="speed-guide" style="--cache-end:6.3516%"><strong class="speedup">1.3× faster</strong></div><div class="bar-row" role="img" aria-label="Text: 131 s"><div class="bar-track"><i style="width:8.2023%"></i></div><b>131 s</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 102 s"><div class="bar-track"><i style="width:6.3516%"></i></div><b>102 s</b></div></div></div></div>
|
| 56 |
+
<div class="model-row" data-model="gemma"><div class="model-heading paired-metrics"><div class="model-label"><h3>Gemma 4 <small>12B</small></h3><strong class="accuracy-gain">+7.3<abbr title="percentage points">pp</abbr></strong></div></div><div class="paired-metrics"><div class="paired-bars"><div class="bar-row" role="img" aria-label="Text: 52.0%"><div class="bar-track"><i style="width:52.0000%"></i></div><b>52.0%</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 59.3%"><div class="bar-track"><i style="width:59.3300%"></i></div><b>59.3%</b></div></div><div class="paired-bars latency-bars"><div class="speed-guide" style="--cache-end:12.5812%"><strong class="speedup">3× faster</strong></div><div class="bar-row" role="img" aria-label="Text: 603 s"><div class="bar-track"><i style="width:37.6938%"></i></div><b>603 s</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 201 s"><div class="bar-track"><i style="width:12.5812%"></i></div><b>201 s</b></div></div></div></div>
|
| 57 |
+
<div class="model-row" data-model="ministral"><div class="model-heading paired-metrics"><div class="model-label"><h3>Ministral 3 <small>14B</small></h3><strong class="accuracy-gain">+20.7<abbr title="percentage points">pp</abbr></strong></div></div><div class="paired-metrics"><div class="paired-bars"><div class="bar-row" role="img" aria-label="Text: 38.7%"><div class="bar-track"><i style="width:38.6700%"></i></div><b>38.7%</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 59.3%"><div class="bar-track"><i style="width:59.3300%"></i></div><b>59.3%</b></div></div><div class="paired-bars latency-bars"><div class="speed-guide" style="--cache-end:12.0813%"><strong class="speedup">8× faster</strong></div><div class="bar-row" role="img" aria-label="Text: 1,537 s"><div class="bar-track"><i style="width:96.0563%"></i></div><b>1,537 s</b></div><div class="bar-row rclc-bar" role="img" aria-label="CacheBack: 193 s"><div class="bar-track"><i style="width:12.0813%"></i></div><b>193 s</b></div></div></div></div>
|
| 58 |
+
<div class="paired-metrics chart-axes" aria-hidden="true"><div class="chart-axis"><span>0</span><span>50</span><span>100</span></div><div class="chart-axis"><span>0</span><span>800</span><span>1,600</span></div></div>
|
| 59 |
+
</figure>
|
| 60 |
+
|
| 61 |
+
</aside>
|
| 62 |
+
</section>
|
| 63 |
+
<section id="booking-demo" class="section wrap" aria-labelledby="booking-question">
|
| 64 |
+
<div class="booking-heading"><div><p class="eyebrow">Interactive demo</p><h2 id="booking-question">Where should Maya collect her pass on Friday, and what ID should she bring?</h2></div><a class="text-link" href="demo/index.html" target="_blank" rel="noopener noreferrer">Open full window <span aria-hidden="true">↗</span></a></div>
|
| 65 |
+
<p class="visual-note">Press <strong>Run</strong> to replay two Qwen3-8B chains. Agents 1-3 each read a different document and pass a message to the next agent; Agent 4 answers. <strong>Top:</strong> CacheBack highlights source positions whose state is selected for the next agent, guided by the question. Highlights change at each handoff as inherited and new positions are selected. <strong>Bottom:</strong> text messages appear as they are generated. The last column shows each chain’s answer. Timers show recorded elapsed time; streaming is reconstructed.</p>
|
| 66 |
+
<div class="recorded-demo">
|
| 67 |
+
<div class="demo-window"><iframe id="flagship-demo" src="demo/index.html?v=fit-7" title="Recorded CacheBack and text booking relay comparison, with playback controls" loading="lazy" sandbox="allow-scripts allow-same-origin" referrerpolicy="no-referrer"></iframe></div>
|
| 68 |
+
</div>
|
| 69 |
+
</section>
|
| 70 |
+
<section id="abstract" class="abstract-section wrap" aria-label="Communication overview">
|
| 71 |
+
<figure class="overview-figure"><a href="https://arxiv.org/pdf/2609.32046" aria-label="Read Figure 2 in the paper"><img src="website/assets/figures/communication-overview.svg" width="1240" height="510" loading="lazy" alt="Figure 2: sending every agent's full cache exceeds the receiver's context limit. CacheBack sends selected positions and latent steps, leaving room for the receiver's prompt."></a><figcaption>Figure 2. Full KV caches (stored model state) accumulate source context at the receiver and can exceed its context limit. Receiver-conditioning selects source and latent positions, leaving room for the receiver’s prompt. Token IDs represent source positions; continuous vectors represent latent steps.</figcaption></figure>
|
| 72 |
+
</section>
|
| 73 |
+
<section id="results" class="section wrap" aria-labelledby="results-title">
|
| 74 |
+
<h2 id="results-title">Results</h2>
|
| 75 |
+
<div class="paper-curves" id="paper-curves">
|
| 76 |
+
<div class="benchmark-setup"><div class="curves-heading"><h3>FanOutQA</h3><p id="compression-guide">Questions require combining evidence across Wikipedia pages. We split at least 120K tokens among three parallel senders; a receiver answers from their messages. Strict accuracy requires every reference-answer group. <strong>Higher is more accurate; left is faster.</strong> Each panel fixes the receiver model. Text labels give sender size; CacheBack uses same-size senders. <strong>rX retains 1/X of sender positions; r4 keeps 25%.</strong></p></div>
|
| 77 |
+
<div class="topology-diagram parallel" role="img" aria-label="Three senders read separate Wikipedia pages in parallel. Their messages converge on one receiver, which answers."><div class="senders"><div class="agent-node"><small>Wikipedia pages A</small><strong>Sender 1</strong></div><div class="agent-node"><small>Wikipedia pages B</small><strong>Sender 2</strong></div><div class="agent-node"><small>Wikipedia pages C</small><strong>Sender 3</strong></div></div><div class="merge" aria-hidden="true"><span>messages</span></div><div class="agent-node receiver"><small>Combines 3 messages</small><strong>Receiver</strong><small>↓ Answer</small></div></div></div>
|
| 78 |
+
<div class="curve-legend" aria-label="Curve legend"><span class="rclc-emphasis">● ━ CacheBack</span><span class="text-emphasis">▲ ┄ Text · labels show sender size</span><span>× Question only</span></div>
|
| 79 |
+
<div class="curve-grid">
|
| 80 |
+
<figure><img src="website/assets/figures/fanoutqa-qwen.svg?v=sender-sizes" width="560" height="460" loading="lazy" alt="FanOutQA, Qwen 3 8B: CacheBack r4 reaches 55.3% strict accuracy at 192 seconds, compared with 40.7% at 612 seconds for same-size text; weaker settings are also plotted."><figcaption>Qwen: r4 improves accuracy and completion time over 8B text; 1.7B text is slightly faster but less accurate.</figcaption></figure>
|
| 81 |
+
<figure><img src="website/assets/figures/fanoutqa-nemotron.svg?v=sender-sizes" width="560" height="460" loading="lazy" alt="FanOutQA, Nemotron Nano 2 12B: CacheBack r8 reaches 50% accuracy near 102 seconds versus 38.7% near 131 seconds for same-size text. A smaller text sender is faster at lower accuracy."><figcaption>Nemotron: r8 improves on 12B text; 4B text is faster but less accurate.</figcaption></figure>
|
| 82 |
+
</div>
|
| 83 |
+
<div class="chain-results" id="chain-results"><div class="benchmark-setup"><div class="curves-heading"><h3>LongBench v2 Easy</h3><p>Long-document questions test whether evidence survives repeated handoffs. We split each 100K-246K-token document into four equal parts. Each sender reads its part plus the previous message; a final receiver answers from the fourth message. Relative budgets (rX) grow with accumulated context; fixed budgets (32K, 64K) cap message positions. Axes and text-size labels follow FanOutQA.</p></div>
|
| 84 |
+
<div class="topology-diagram sequential" role="img" aria-label="Four agents read document parts in order. Each passes a message to the next. A final receiver answers from the fourth message."><div class="agent-node"><small>Document part 1</small><strong>Agent 1</strong></div><div class="agent-node"><small>Document part 2</small><strong>Agent 2</strong></div><div class="agent-node"><small>Document part 3</small><strong>Agent 3</strong></div><div class="agent-node"><small>Document part 4</small><strong>Agent 4</strong></div><div class="agent-node receiver"><small>Final message</small><strong>Receiver</strong><small>↓ Answer</small></div></div></div>
|
| 85 |
+
<div class="curve-legend" aria-label="LongBench curve legend"><span class="rclc-emphasis">● ━ CacheBack · relative budget</span><span class="fixed-emphasis">■ ━ CacheBack · fixed budget</span><span class="text-emphasis">▲ ┄ Text · labels show sender size</span><span>× Question only</span></div>
|
| 86 |
+
<div class="curve-grid">
|
| 87 |
+
<figure><img src="website/assets/figures/longbench-qwen.svg?v=sender-sizes" width="560" height="460" loading="lazy" alt="LongBench v2 Easy, Qwen 3 8B: both relative and fixed CacheBack budgets include settings faster and more accurate than same-size text. Stronger compression eventually lowers accuracy."><figcaption>Qwen: relative r4 gives the highest plotted accuracy; stronger compression loses accuracy.</figcaption></figure>
|
| 88 |
+
<figure><img src="website/assets/figures/longbench-nemotron.svg?v=sender-sizes" width="560" height="460" loading="lazy" alt="LongBench v2 Easy, Nemotron Nano 2 12B: CacheBack r8 reaches 48% accuracy near 133 seconds, while fixed-budget settings show a different tradeoff; smaller text senders can be faster."><figcaption>Nemotron: relative r8 beats 12B text on both axes; 4B text remains faster but less accurate.</figcaption></figure>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
<p class="curve-caption">Lines join the best accuracy-time tradeoffs within each channel; faded points are dominated settings. × means the receiver gets only the question. 50 concurrent tasks on 8 H100s; accuracy averaged over three receiver draws. Completion includes queueing. <a href="https://arxiv.org/pdf/2609.32046">Full setup and results in the paper.</a></p>
|
| 92 |
+
</div>
|
| 93 |
+
</section>
|
| 94 |
+
<section id="demo" class="demo-section" aria-labelledby="demo-title">
|
| 95 |
+
<div class="wrap">
|
| 96 |
+
<div class="demo-heading"><h2 id="demo-title">Watch the demo</h2></div>
|
| 97 |
+
<article class="recorded-demo coding-demo" id="coding-demo" aria-labelledby="coding-title">
|
| 98 |
+
<div class="demo-description"><div><p class="demo-type">36 seconds · 4K · Recorded coding task</p><h3 id="coding-title">Fixing a Django bug with seven coding agents</h3><p>Seven Qwen3-8B workers inspect the code and send information to a coordinator, which writes the Django fix. The video compares selected latent state with generated text messages. CacheBack produces the patch <strong class="rclc-emphasis">4.41× faster</strong> than with text communication on this case. Both runs make the same one-line code change and pass all 88 tests.</p></div></div>
|
| 99 |
+
<div class="demo-player"><video id="coding-video" controls playsinline preload="auto" tabindex="0" width="3840" height="2160" poster="demo/coding/poster.jpg" aria-labelledby="coding-title" aria-describedby="coding-caption">
|
| 100 |
+
<source src="demo/coding/rclc-cacheback-4k.mp4" type="video/mp4">
|
| 101 |
+
<p><a href="demo/coding/rclc-cacheback-4k.mp4">Watch the demo as an MP4</a>.</p>
|
| 102 |
+
</video><button class="play-demo" id="play-demo" type="button" hidden><span aria-hidden="true">▶</span> Watch the full demo</button></div>
|
| 103 |
+
<div class="demo-caption" id="coding-caption"><p><strong>One recorded case:</strong> CacheBack 25.66 s; text 113.21 s. Separate recorded runs are aligned at their start. Startup and test grading excluded. Silent video; playback speed varies. <a href="demo/coding/rclc-cacheback-4k.mp4">Open in full window</a></p>
|
| 104 |
+
</div>
|
| 105 |
+
</article>
|
| 106 |
+
</div>
|
| 107 |
+
</section>
|
| 108 |
+
<section class="code-section" id="code" aria-labelledby="code-title"><div class="wrap code-layout"><div><h2 id="code-title">Use CacheBack</h2><p>Install <code>rclc</code>, bind your agents, and pass the receiver’s request.</p><a class="button primary" href="https://github.com/agentcacheback/cacheback">Code and documentation</a></div><div class="code-card"><div class="code-bar"><span>Python</span><button class="copy-button" data-copy="quickstart" type="button" aria-label="Copy code"><svg class="copy-icon" aria-hidden="true" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><rect x="8" y="8" width="12" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/></svg><span class="copy-feedback" aria-hidden="true">Copied</span></button></div><pre><code id="quickstart"><span class="code-keyword">import</span> rclc
|
| 109 |
+
|
| 110 |
+
sender = rclc.<span class="code-function">bind</span>(
|
| 111 |
+
model, tokenizer,
|
| 112 |
+
messages=sender_history, backend=<span class="code-string">"hf"</span>,
|
| 113 |
+
)
|
| 114 |
+
receiver = rclc.<span class="code-function">bind</span>(
|
| 115 |
+
model, tokenizer,
|
| 116 |
+
messages=receiver_history, backend=<span class="code-string">"hf"</span>,
|
| 117 |
+
)
|
| 118 |
+
<span class="code-focus"><span class="code-keyword">await</span> rclc.<span class="code-function">transfer</span>(
|
| 119 |
+
sender, receiver,
|
| 120 |
+
<span class="code-string">"Who owns the Cedar booking?"</span>,
|
| 121 |
+
)</span>
|
| 122 |
+
inputs = receiver.<span class="code-function">pop</span>()</code></pre><p class="snippet-note">Model, tokenizer, and histories loaded; run in an async function or notebook. <a href="https://github.com/agentcacheback/cacheback/blob/main/examples/quickstart.py">Runnable quickstart</a></p></div></div></section>
|
| 123 |
+
<section id="paper" class="section wrap paper-section" aria-labelledby="paper-title"><div><p class="eyebrow">THE PAPER</p><h2 id="paper-title">Receiver-Conditioned Latent Communication gives 94% CacheBack</h2><p>Maximillian Rossi, Prajwal Raghunath, Haoqing Xuan, Yusen Zhang, and Eugene Wu.</p><div class="hero-actions"><a class="button primary" href="https://arxiv.org/pdf/2609.32046">Read the PDF</a><a class="text-link" href="https://github.com/agentcacheback/cacheback/tree/paper">Reproduce the paper</a></div></div><div class="citation" id="citation"><h3>Cite this work</h3><button class="copy-button" data-copy="bibtex" type="button" aria-label="Copy citation"><svg class="copy-icon" aria-hidden="true" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><rect x="8" y="8" width="12" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/></svg><span class="copy-feedback" aria-hidden="true">Copied</span></button><pre><code id="bibtex">@misc{rossi2026cacheback,
|
| 124 |
+
title = {Receiver-Conditioned Latent Communication
|
| 125 |
+
gives 94\% CacheBack},
|
| 126 |
+
author = {Rossi, Maximillian and Raghunath, Prajwal
|
| 127 |
+
and Xuan, Haoqing and Zhang, Yusen
|
| 128 |
+
and Wu, Eugene},
|
| 129 |
+
year = {2026},
|
| 130 |
+
eprint = {2609.32046},
|
| 131 |
+
archivePrefix = {arXiv},
|
| 132 |
+
primaryClass = {cs.AI},
|
| 133 |
+
url = {https://arxiv.org/abs/2609.32046}
|
| 134 |
+
}</code></pre></div></section>
|
| 135 |
+
</main>
|
| 136 |
+
<footer class="site-footer wrap"><a class="brand" href="#">CacheBack</a><span>Receiver-conditioned communication · 2026</span><a href="https://github.com/agentcacheback/cacheback">Code & reproducibility</a></footer>
|
| 137 |
+
<div id="copy-status" class="sr-only" role="status"></div>
|
| 138 |
+
</body>
|
| 139 |
</html>
|
social-preview.jpg
ADDED
|
Git LFS Details
|
website/assets/app.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
if (typeof document !== 'undefined') {
|
| 2 |
+
const byId = (id) => document.getElementById(id);
|
| 3 |
+
const video = byId('coding-video');
|
| 4 |
+
const play = byId('play-demo');
|
| 5 |
+
play.hidden = false;
|
| 6 |
+
play.addEventListener('click', async () => {
|
| 7 |
+
try {
|
| 8 |
+
await video.play();
|
| 9 |
+
video.focus();
|
| 10 |
+
} catch {
|
| 11 |
+
byId('copy-status').textContent = 'Playback unavailable. Try the Open in full window link below the video.';
|
| 12 |
+
}
|
| 13 |
+
});
|
| 14 |
+
video.addEventListener('play', () => { play.hidden = true; });
|
| 15 |
+
|
| 16 |
+
document.querySelectorAll('[data-copy]').forEach((button) => {
|
| 17 |
+
let reset;
|
| 18 |
+
button.addEventListener('click', async () => {
|
| 19 |
+
const content = byId(button.dataset.copy);
|
| 20 |
+
try {
|
| 21 |
+
await navigator.clipboard.writeText(content.textContent);
|
| 22 |
+
button.querySelector('.copy-feedback').textContent = 'Copied';
|
| 23 |
+
byId('copy-status').textContent = 'Copied to clipboard.';
|
| 24 |
+
} catch {
|
| 25 |
+
const selection = window.getSelection();
|
| 26 |
+
const range = document.createRange();
|
| 27 |
+
range.selectNodeContents(content);
|
| 28 |
+
selection.removeAllRanges();
|
| 29 |
+
selection.addRange(range);
|
| 30 |
+
button.querySelector('.copy-feedback').textContent = 'Selected';
|
| 31 |
+
byId('copy-status').textContent = 'Clipboard unavailable. Text selected; use your device’s copy command.';
|
| 32 |
+
}
|
| 33 |
+
clearTimeout(reset);
|
| 34 |
+
button.classList.add('is-copied');
|
| 35 |
+
reset = setTimeout(() => button.classList.remove('is-copied'), 1800);
|
| 36 |
+
});
|
| 37 |
+
});
|
| 38 |
+
}
|
website/assets/figures/communication-overview.svg
ADDED
|
|
website/assets/figures/fanoutqa-nemotron.svg
ADDED
|
|
website/assets/figures/fanoutqa-qwen.svg
ADDED
|
|
website/assets/figures/longbench-nemotron.svg
ADDED
|
|
website/assets/figures/longbench-qwen.svg
ADDED
|
|
website/assets/results.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source": "https://arxiv.org/html/2609.32046v1",
|
| 3 |
+
"table": "Table 1: selected operating points, FanOutQA",
|
| 4 |
+
"tasks": 50,
|
| 5 |
+
"gpus": "8 H100",
|
| 6 |
+
"receiver_draws": 3,
|
| 7 |
+
"models": {
|
| 8 |
+
"qwen": {
|
| 9 |
+
"name": "Qwen 3",
|
| 10 |
+
"size": "8B",
|
| 11 |
+
"ratio": 4,
|
| 12 |
+
"text": {
|
| 13 |
+
"accuracy": 0.4067,
|
| 14 |
+
"seconds": 611.9
|
| 15 |
+
},
|
| 16 |
+
"cache": {
|
| 17 |
+
"accuracy": 0.5533,
|
| 18 |
+
"seconds": 191.9
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
"nemotron": {
|
| 22 |
+
"name": "Nemotron Nano 2",
|
| 23 |
+
"size": "12B",
|
| 24 |
+
"ratio": 8,
|
| 25 |
+
"text": {
|
| 26 |
+
"accuracy": 0.38666666666666666,
|
| 27 |
+
"seconds": 131.2367
|
| 28 |
+
},
|
| 29 |
+
"cache": {
|
| 30 |
+
"accuracy": 0.5,
|
| 31 |
+
"seconds": 101.6259
|
| 32 |
+
}
|
| 33 |
+
},
|
| 34 |
+
"gemma": {
|
| 35 |
+
"name": "Gemma 4",
|
| 36 |
+
"size": "12B",
|
| 37 |
+
"ratio": 4,
|
| 38 |
+
"text": {
|
| 39 |
+
"accuracy": 0.52,
|
| 40 |
+
"seconds": 603.1
|
| 41 |
+
},
|
| 42 |
+
"cache": {
|
| 43 |
+
"accuracy": 0.5933,
|
| 44 |
+
"seconds": 201.3
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"ministral": {
|
| 48 |
+
"name": "Ministral 3",
|
| 49 |
+
"size": "14B",
|
| 50 |
+
"ratio": 32,
|
| 51 |
+
"text": {
|
| 52 |
+
"accuracy": 0.3867,
|
| 53 |
+
"seconds": 1536.9
|
| 54 |
+
},
|
| 55 |
+
"cache": {
|
| 56 |
+
"accuracy": 0.5933,
|
| 57 |
+
"seconds": 193.3
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
}
|
website/assets/styles.css
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap');
|
| 2 |
+
|
| 3 |
+
:root { --paper:#fafafa; --ink:#202828; --muted:#636b6b; --line:#dce3e2; --soft:#f0f5f4; --accent:#bde8e3; --rclc:#0f766e; --text:#995319; --fixed:#795697; --sans:'DM Sans',Arial,sans-serif; }
|
| 4 |
+
* { box-sizing:border-box; }
|
| 5 |
+
html { scroll-behavior:smooth; scroll-padding-top:35px; }
|
| 6 |
+
body { margin:0; background:var(--paper); color:var(--ink); font:16px/1.65 var(--sans); -webkit-font-smoothing:antialiased; }
|
| 7 |
+
::selection { background:var(--accent); color:var(--ink); }
|
| 8 |
+
a { color:inherit; text-underline-offset:5px; }
|
| 9 |
+
button,select,input { font:inherit; }
|
| 10 |
+
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
|
| 11 |
+
button,summary { cursor:pointer; }
|
| 12 |
+
button { color:inherit; }
|
| 13 |
+
button:disabled { cursor:default; }
|
| 14 |
+
:focus-visible { outline:3px solid var(--rclc); outline-offset:5px; }
|
| 15 |
+
h1,h2,h3,p,figure { margin:0; }
|
| 16 |
+
h1,h2,h3 { font-weight:500; }
|
| 17 |
+
.wrap { width:min(1240px,calc(100% - 112px)); margin-inline:auto; }
|
| 18 |
+
.site-header { min-height:100px; display:flex; align-items:center; justify-content:space-between; gap:24px; border-bottom:1px solid var(--line); }
|
| 19 |
+
.brand { display:inline-flex; align-items:center; gap:12px; font-size:21px; letter-spacing:-.7px; font-weight:650; text-decoration:none; white-space:nowrap; }
|
| 20 |
+
.brand-mark { display:grid; grid-template-columns:repeat(2,9px); gap:3px; }
|
| 21 |
+
.brand-mark i { width:9px; height:9px; border-radius:1px; background:var(--ink); }
|
| 22 |
+
.brand-mark i:last-child { background:var(--rclc); }
|
| 23 |
+
.site-header nav { display:flex; align-items:center; gap:30px; font-size:14px; }
|
| 24 |
+
.site-header nav a { text-decoration:none; color:var(--muted); }
|
| 25 |
+
.site-header nav a:hover,.text-link:hover { color:var(--rclc); }
|
| 26 |
+
.button { display:inline-flex; justify-content:center; align-items:center; gap:12px; padding:13px 21px; border:1px solid var(--ink); border-radius:5px; text-decoration:none; font-size:14px; font-weight:550; transition:background .16s,transform .16s; }
|
| 27 |
+
.button:hover { background:var(--soft); transform:translateY(-1px); }
|
| 28 |
+
.button.primary { background:var(--ink); color:white; }
|
| 29 |
+
.button.primary:hover { background:var(--rclc); }
|
| 30 |
+
.hero { display:grid; grid-template-columns:1fr 1fr; align-items:start; gap:74px; padding-block:80px 70px; }
|
| 31 |
+
.eyebrow,.mono { font-family:var(--sans); font-size:12px; font-weight:600; letter-spacing:.12em; }
|
| 32 |
+
.eyebrow { color:var(--muted); display:flex; align-items:center; gap:12px; }
|
| 33 |
+
h1 { font-size:clamp(56px,6vw,84px); font-weight:650; line-height:1.05; letter-spacing:-3px; margin:20px 0 12px; }
|
| 34 |
+
.hero-subtitle { font-size:26px; line-height:1.3; letter-spacing:-.6px; margin-bottom:27px; }
|
| 35 |
+
.hero-copy>.eyebrow { text-transform:uppercase; }
|
| 36 |
+
.hero-authors { margin-bottom:28px; }
|
| 37 |
+
.hero-authors ul { display:flex; flex-wrap:wrap; gap:3px 19px; list-style:none; padding:0; margin:0; font-size:19px; font-weight:550; line-height:1.5; }
|
| 38 |
+
.hero-authors li { white-space:nowrap; }
|
| 39 |
+
.hero-authors .affiliations { display:flex; align-items:center; flex-wrap:wrap; gap:10px 14px; margin-top:13px; font-size:14px; color:var(--muted); }
|
| 40 |
+
.affiliations a { display:flex; }
|
| 41 |
+
.affiliations img { display:block; height:28px; width:auto; }
|
| 42 |
+
.hero-intro { font-size:22px; line-height:1.45; letter-spacing:-.4px; }
|
| 43 |
+
.hero-intro .rclc-emphasis { color:var(--rclc); font-weight:700; }
|
| 44 |
+
.hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:24px; margin-top:29px; }
|
| 45 |
+
.text-link { font-size:14px; font-weight:500; }
|
| 46 |
+
.resource-links { display:flex; flex-wrap:wrap; align-items:center; gap:9px; margin-top:31px; font-size:14px; }
|
| 47 |
+
.resource-links a { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:10px 15px; font-weight:650; text-decoration:none; border:1px solid var(--ink); border-radius:12px; background:#fff; color:var(--ink); transition:background .15s,color .15s,border-color .15s; }
|
| 48 |
+
.resource-links a:is(:hover,:focus-visible) { background:var(--ink); color:#fff; border-color:transparent; }
|
| 49 |
+
.resource-links a:first-child { background:var(--rclc); border-color:var(--rclc); color:#fff; }
|
| 50 |
+
.resource-links a:first-child:is(:hover,:focus-visible) { background:#fff; color:var(--rclc); border-color:transparent; }
|
| 51 |
+
.resource-links a:nth-child(2) { background:var(--ink); border-color:var(--ink); color:#fff; }
|
| 52 |
+
.resource-links a:nth-child(2):is(:hover,:focus-visible) { background:#fff; color:var(--ink); border-color:transparent; }
|
| 53 |
+
.resource-links a>span { font-size:10px; letter-spacing:.03em; color:inherit; }
|
| 54 |
+
strong,b { font-weight:650; }
|
| 55 |
+
.rclc-emphasis { color:var(--rclc); }
|
| 56 |
+
.text-emphasis { color:var(--text); }
|
| 57 |
+
.fixed-emphasis { color:var(--fixed); }
|
| 58 |
+
.hero-results { min-width:0; }
|
| 59 |
+
.hero-results .eyebrow { line-height:1.65; }
|
| 60 |
+
.chart-context { color:var(--muted); font-size:13px; line-height:1.5; margin-top:9px; max-width:400px; }
|
| 61 |
+
.hero-results .technical { margin-top:20px; font-size:13px; border-bottom:0; padding-bottom:0; }
|
| 62 |
+
.hero-results .technical p { font-size:12px; }
|
| 63 |
+
.comparison-plot { margin-top:20px; }
|
| 64 |
+
.plot-legend { display:flex; flex-wrap:wrap; gap:18px; font-size:13px; margin-bottom:18px; }
|
| 65 |
+
.plot-legend span { display:flex; align-items:center; gap:7px; }
|
| 66 |
+
.plot-legend i { width:16px; height:8px; background:#67726b; border-radius:2px; }
|
| 67 |
+
.plot-legend .rclc-emphasis i { background:var(--rclc); }
|
| 68 |
+
.paired-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
|
| 69 |
+
.chart-heading { border-bottom:1px solid var(--line); padding-bottom:15px; font-size:14px; line-height:1.4; }
|
| 70 |
+
.model-row { padding:14px 0; border-bottom:1px solid var(--line); }
|
| 71 |
+
.model-heading { margin-bottom:8px; }
|
| 72 |
+
.model-label { display:flex; justify-content:space-between; align-items:baseline; gap:8px; min-width:0; }
|
| 73 |
+
.accuracy-gain,.speedup { color:var(--rclc); font-size:14px; white-space:nowrap; }
|
| 74 |
+
.accuracy-gain abbr { text-decoration:none; }
|
| 75 |
+
.latency-bars { position:relative; }
|
| 76 |
+
.speed-guide { position:absolute; inset:0 58px 0 0; color:var(--rclc); pointer-events:none; }
|
| 77 |
+
.speedup { position:absolute; left:calc(var(--cache-end) + 6px); top:25px; font-size:12px; line-height:20px; }
|
| 78 |
+
.model-heading h3 { font-size:15px; font-weight:650; letter-spacing:0; }
|
| 79 |
+
.model-heading small { color:var(--muted); font-size:12px; font-weight:400; }
|
| 80 |
+
.bar-row { line-height:20px; display:grid; grid-template-columns:minmax(0,1fr) 50px; gap:8px; align-items:center; font-size:12px; }
|
| 81 |
+
.bar-row+.bar-row { margin-top:5px; }
|
| 82 |
+
.bar-row>b { text-align:right; font-variant-numeric:tabular-nums; }
|
| 83 |
+
.bar-track { border-left:1px solid #b5bfb7; background:repeating-linear-gradient(to right,transparent 0 calc(50% - 1px),#dce2dc calc(50% - 1px) 50%); }
|
| 84 |
+
.bar-track i { display:block; height:17px; background:#67726b; border-radius:0 2px 2px 0; }
|
| 85 |
+
.rclc-bar { color:var(--rclc); }
|
| 86 |
+
.rclc-bar i { background:var(--rclc); }
|
| 87 |
+
.chart-axis { margin:8px 58px 0 0; color:var(--muted); font-size:12px; position:relative; height:20px; }
|
| 88 |
+
.chart-axis span { position:absolute; transform:translateX(-50%); white-space:nowrap; }
|
| 89 |
+
.chart-axis span:nth-child(1) { left:0; }
|
| 90 |
+
.chart-axis span:nth-child(2) { left:50%; }
|
| 91 |
+
.chart-axis span:nth-child(3) { left:100%; }
|
| 92 |
+
|
| 93 |
+
.abstract-section { display:grid; grid-template-columns:1fr; align-items:center; gap:48px; padding-block:64px; border-top:1px solid var(--line); }
|
| 94 |
+
.tldr { font-size:16px; line-height:1.65; }
|
| 95 |
+
.abstract-section .overview-figure { max-width:900px; margin-inline:auto; }
|
| 96 |
+
.overview-figure img { width:100%; height:auto; display:block; }
|
| 97 |
+
.overview-figure figcaption { color:var(--muted); font-size:12px; margin-top:18px; }
|
| 98 |
+
.tldr p+p { margin-top:12px; }
|
| 99 |
+
.tldr strong { color:var(--rclc); }
|
| 100 |
+
.paper-curves { margin-top:30px; }
|
| 101 |
+
.curves-heading { max-width:810px; }
|
| 102 |
+
.curves-heading h3 { font-size:27px; margin-bottom:12px; }
|
| 103 |
+
.curves-heading p { color:var(--muted); font-size:15px; }
|
| 104 |
+
.curve-legend { display:flex; flex-wrap:wrap; gap:10px 24px; font-size:13px; margin-block:23px 5px; }
|
| 105 |
+
.curve-grid { display:grid; grid-template-columns:1fr 1fr; gap:34px; }
|
| 106 |
+
.curve-grid figure { min-width:0; }
|
| 107 |
+
.curve-grid img { width:100%; height:auto; display:block; }
|
| 108 |
+
.chain-results { margin-top:32px; border-block:1px solid var(--line); padding:20px 0; }
|
| 109 |
+
.curve-caption { color:var(--muted); font-size:12px; margin-top:26px; }
|
| 110 |
+
.section { padding-block:64px; border-top:1px solid var(--line); }
|
| 111 |
+
h2 { font-size:36px; line-height:1.2; letter-spacing:-1.1px; }
|
| 112 |
+
h3 { font-size:20px; letter-spacing:-.5px; }
|
| 113 |
+
.technical { border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-top:32px; padding:15px 0; font-size:14px; }
|
| 114 |
+
summary { font-weight:500; }
|
| 115 |
+
.technical p { color:var(--muted); max-width:960px; margin-top:17px; }
|
| 116 |
+
.demo-section { padding:70px 0; border-block:1px solid var(--line); }
|
| 117 |
+
.demo-heading { display:grid; grid-template-columns:1fr 1fr; align-items:end; gap:85px; margin-bottom:32px; }
|
| 118 |
+
.demo-heading p { color:var(--muted); max-width:460px; }
|
| 119 |
+
.recorded-demo { background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
|
| 120 |
+
.coding-demo video { display:block; width:100%; height:auto; aspect-ratio:16/9; background:#f4f5f5; border-top:1px solid var(--line); }
|
| 121 |
+
.coding-demo .demo-evidence { margin-top:12px; }
|
| 122 |
+
.coding-demo .demo-evidence p { margin-top:12px; max-width:100ch; }
|
| 123 |
+
.demo-player { position:relative; }
|
| 124 |
+
.play-demo { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); border:0; border-radius:12px; padding:18px 24px; background:var(--rclc); color:#fff; font-size:18px; font-weight:700; white-space:nowrap; box-shadow:0 4px 24px #163b3526; }
|
| 125 |
+
.play-demo:hover { background:var(--ink); }
|
| 126 |
+
.play-demo span { margin-right:8px; }
|
| 127 |
+
.demo-description { display:flex; align-items:flex-start; justify-content:space-between; gap:36px; padding:27px 30px; }
|
| 128 |
+
.demo-description h3 { font-size:28px; margin:7px 0 10px; }
|
| 129 |
+
.demo-description p { color:var(--muted); font-size:14px; max-width:74ch; }
|
| 130 |
+
.demo-description .demo-type { font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.09em; color:var(--rclc); }
|
| 131 |
+
.demo-evidence { margin-top:18px; color:var(--muted); font-size:12px; }
|
| 132 |
+
.demo-evidence>div { white-space:pre-wrap; margin-top:12px; }
|
| 133 |
+
.demo-replay-link { padding:20px 30px; }
|
| 134 |
+
.demo-window { border-top:1px solid var(--line); background:#fff; }
|
| 135 |
+
iframe { display:block; width:100%; height:815px; border:0; background:#fff; }
|
| 136 |
+
.demo-caption { color:var(--muted); font-size:12px; padding:17px 30px; border-top:1px solid var(--line); }
|
| 137 |
+
.code-section { background:var(--soft); border-block:1px solid var(--line); padding:75px 0; }
|
| 138 |
+
.code-layout { display:grid; grid-template-columns:.9fr 1.1fr; gap:90px; align-items:center; }
|
| 139 |
+
.code-layout h2 { margin:0 0 20px; }
|
| 140 |
+
.code-layout>div>p:not(.eyebrow) { color:var(--muted); max-width:370px; }
|
| 141 |
+
.code-layout .button { margin-top:25px; }
|
| 142 |
+
.code-layout .code-note { font-size:12px; margin-top:23px; }
|
| 143 |
+
.code-card { background:#162c2c; color:#e8f3f2; border-radius:12px; overflow:hidden; min-width:0; }
|
| 144 |
+
.code-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid #345151; padding:12px 24px; color:#b6cdcb; font-size:12px; }
|
| 145 |
+
.copy-button { border:0; background:transparent; border-radius:3px; padding:5px 10px; font-size:12px; }
|
| 146 |
+
.copy-button:hover { background:transparent; color:var(--rclc); }
|
| 147 |
+
.code-card .copy-button { border:0; border-radius:7px; background:transparent; color:#e8f3f2; padding:6px 11px; }
|
| 148 |
+
.code-card .copy-button:hover { background:transparent; color:#8bd9d1; }
|
| 149 |
+
.code-card pre { padding:22px 24px 18px; line-height:1.65; }
|
| 150 |
+
.code-focus { display:block; background:#214442; border-left:2px solid #8bd9d1; margin:15px -24px 0; padding:12px 22px; }
|
| 151 |
+
pre { margin:0; padding:23px; overflow:auto; font:13px/1.85 'SFMono-Regular',Consolas,monospace; tab-size:2; }
|
| 152 |
+
.snippet-note { font-size:12px; line-height:1.65; color:#adc7c4; padding:0 24px 21px; }
|
| 153 |
+
.snippet-note a { display:block; margin-top:8px; color:#e8f3f2; }
|
| 154 |
+
.paper-section { display:grid; grid-template-columns:1.05fr .95fr; gap:80px; align-items:start; }
|
| 155 |
+
.paper-section h2 { font-size:33px; margin:19px 0; letter-spacing:-1px; }
|
| 156 |
+
.citation { border-block:1px solid var(--line); padding:18px 0; margin-top:38px; min-width:0; }
|
| 157 |
+
.citation h3 { font-size:18px; }
|
| 158 |
+
.citation pre { padding:18px 0 0; font-size:12px; }
|
| 159 |
+
.citation button { margin-top:12px; }
|
| 160 |
+
.site-footer { padding:27px 0; border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:20px; color:var(--muted); font-size:12px; }
|
| 161 |
+
.site-footer .brand { color:var(--ink); font-size:17px; }
|
| 162 |
+
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
|
| 163 |
+
.skip-link { position:fixed; top:-100px; left:15px; z-index:10; background:var(--accent); padding:10px; }
|
| 164 |
+
.skip-link:focus { top:10px; }
|
| 165 |
+
@media(min-width:1500px) { .hero { padding-block:95px 85px; } }
|
| 166 |
+
@media(max-width:1100px) {
|
| 167 |
+
.wrap { width:calc(100% - 64px); }
|
| 168 |
+
.hero { gap:38px; padding-block:60px; }
|
| 169 |
+
h1 { font-size:64px; }
|
| 170 |
+
.section-heading,.demo-heading { gap:40px; }
|
| 171 |
+
.code-layout { gap:45px; }
|
| 172 |
+
}
|
| 173 |
+
@media(min-width:521px) { body { zoom:.945; } }
|
| 174 |
+
@media(min-width:801px) {
|
| 175 |
+
body { zoom:.85; }
|
| 176 |
+
.wrap { width:min(1240px,calc(100% - 144px)); }
|
| 177 |
+
}
|
| 178 |
+
@media(max-width:800px) {
|
| 179 |
+
|
| 180 |
+
.hero-results { width:100%; max-width:600px; }
|
| 181 |
+
.abstract-section { grid-template-columns:1fr; gap:28px; padding-block:45px; }
|
| 182 |
+
.curve-grid { grid-template-columns:1fr; gap:30px; }
|
| 183 |
+
.site-header { min-height:80px; }
|
| 184 |
+
.site-header nav { gap:19px; }
|
| 185 |
+
.hero { gap:35px; grid-template-columns:1fr; padding-block:45px; }
|
| 186 |
+
.hero-copy { max-width:600px; }
|
| 187 |
+
h1 { font-size:72px; }
|
| 188 |
+
.section { padding-block:60px; }
|
| 189 |
+
.section-heading,.demo-heading { grid-template-columns:1fr; gap:19px; }
|
| 190 |
+
.code-layout,.paper-section { grid-template-columns:1fr; gap:30px; }
|
| 191 |
+
.code-layout>div>p:not(.eyebrow) { max-width:none; }
|
| 192 |
+
.citation { margin-top:0; }
|
| 193 |
+
iframe { height:890px; }
|
| 194 |
+
.site-footer>span { display:none; }
|
| 195 |
+
}
|
| 196 |
+
@media(max-width:520px) {
|
| 197 |
+
.hero-authors ul { font-size:17px; gap:4px 17px; }
|
| 198 |
+
|
| 199 |
+
.curve-legend { gap:8px 15px; font-size:12px; }
|
| 200 |
+
.wrap { width:calc(100% - 36px); }
|
| 201 |
+
.site-header { min-height:74px; gap:12px; }
|
| 202 |
+
.brand { font-size:18px; gap:8px; }
|
| 203 |
+
.brand-mark { grid-template-columns:repeat(2,7px); gap:2px; }
|
| 204 |
+
.brand-mark i { width:7px; height:7px; }
|
| 205 |
+
.site-header nav { gap:12px; font-size:12px; }
|
| 206 |
+
h1 { font-size:56px; letter-spacing:-2px; }
|
| 207 |
+
.hero-subtitle { font-size:23px; }
|
| 208 |
+
.hero-intro { font-size:21px; }
|
| 209 |
+
.hero-actions { gap:20px; }
|
| 210 |
+
.resource-links { gap:8px; }
|
| 211 |
+
.resource-links a { padding-inline:12px; }
|
| 212 |
+
h2 { font-size:32px; }
|
| 213 |
+
.demo-section { padding-top:51px; }
|
| 214 |
+
.demo-replay-link { padding-inline:20px; }
|
| 215 |
+
.demo-caption { padding:17px 20px; }
|
| 216 |
+
.demo-description { flex-direction:column; gap:18px; padding:22px 20px; }
|
| 217 |
+
.code-section { padding-block:50px; }
|
| 218 |
+
.paper-section h2 { font-size:32px; }
|
| 219 |
+
.site-footer { flex-wrap:wrap; font-size:12px; }
|
| 220 |
+
.citation pre { font-size:12px; }
|
| 221 |
+
}
|
| 222 |
+
@media(prefers-reduced-motion:reduce) {
|
| 223 |
+
html { scroll-behavior:auto; }
|
| 224 |
+
*,*::before,*::after { transition:none!important; animation:none!important; }
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
.code-keyword { color:#bacafa; }
|
| 228 |
+
.code-function { color:#8bd9d1; }
|
| 229 |
+
.code-string { color:#e6ce99; }
|
| 230 |
+
|
| 231 |
+
.copy-button { position:relative; display:inline-grid; place-items:center; min-width:72px; min-height:36px; }
|
| 232 |
+
.copy-icon,.copy-feedback { grid-area:1/1; transition:opacity .6s ease; }
|
| 233 |
+
.copy-feedback { opacity:0; }
|
| 234 |
+
.is-copied .copy-icon { opacity:0; }
|
| 235 |
+
.is-copied .copy-feedback { opacity:1; }
|
| 236 |
+
@media(prefers-reduced-motion:reduce) { .copy-icon,.copy-feedback { transition:none; } }
|
| 237 |
+
|
| 238 |
+
.booking-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:30px; margin-bottom:24px; }
|
| 239 |
+
.booking-heading h2 { max-width:850px; font-size:clamp(24px,2.5vw,32px); line-height:1.3; margin:0; }
|
| 240 |
+
.booking-heading .eyebrow { margin-bottom:10px; }
|
| 241 |
+
.booking-heading > a { flex-shrink:0; }
|
| 242 |
+
#booking-demo .demo-window { border-top:0; }
|
| 243 |
+
@media(max-width:800px) { .booking-heading { align-items:flex-start; flex-direction:column; gap:14px; } }
|
| 244 |
+
|
| 245 |
+
#hero-title { font-size:clamp(34px,3.6vw,50px); line-height:1.12; letter-spacing:-1.5px; margin-bottom:28px; }
|
| 246 |
+
.visual-note { color:var(--muted); font-size:14px; line-height:1.65; margin-bottom:24px; }
|
| 247 |
+
.curve-grid figcaption { color:var(--muted); font-size:13px; margin-top:10px; }
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
.topology-diagram { margin:24px 0 32px; padding:24px; background:var(--soft); border-radius:14px; }
|
| 251 |
+
.agent-node { position:relative; display:flex; flex-direction:column; justify-content:center; gap:4px; min-width:0; padding:16px 12px; text-align:center; background:white; border:1px solid var(--line); border-radius:9px; }
|
| 252 |
+
.agent-node small { font-size:12px; color:var(--muted); }.agent-node strong { font-size:16px; }
|
| 253 |
+
.agent-node.receiver { background:var(--rclc); color:white; }.receiver small { color:white; }
|
| 254 |
+
.parallel { display:grid; grid-template-columns:minmax(0,1fr) 110px minmax(0,1fr); align-items:center; max-width:700px; }
|
| 255 |
+
.senders { display:grid; gap:12px; }.merge { height:calc(100% - 80px); border-right:2px solid var(--rclc); border-block:2px solid var(--rclc); position:relative; margin-right:35px; }
|
| 256 |
+
.merge:before { content:""; position:absolute; top:50%; width:100%; border-top:2px solid var(--rclc); }.merge:after { content:"→"; position:absolute; left:100%; top:50%; transform:translateY(-50%); width:35px; text-align:center; color:var(--rclc); font-size:26px; }.merge span { position:absolute; left:5px; top:50%; transform:translateY(-25px); font-size:11px; color:var(--rclc); }
|
| 257 |
+
.sequential { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:28px; align-items:stretch; }.sequential .agent-node:not(:last-child):after { content:"→"; position:absolute; left:100%; width:28px; top:50%; transform:translateY(-50%); color:var(--rclc); font-size:24px; }
|
| 258 |
+
@media(max-width:600px) { .parallel { grid-template-columns:minmax(0,1fr) 65px minmax(0,1fr); padding:14px; }.merge { margin-right:20px; }.merge:after { width:20px; }.merge span { display:none; }.agent-node { padding:12px 6px; }.sequential { grid-template-columns:1fr; gap:25px; }.sequential .agent-node:not(:last-child):after { content:"↓"; left:50%; top:100%; transform:translateX(-50%); height:25px; line-height:25px; } }
|
| 259 |
+
|
| 260 |
+
.benchmark-setup { display:grid; grid-template-columns:1fr 1fr; gap:36px; align-items:center; margin-bottom:24px; }.benchmark-setup .topology-diagram { margin:0; padding:16px; }.benchmark-setup .sequential { gap:18px; }.benchmark-setup .sequential .agent-node { padding:12px 4px; }.benchmark-setup .sequential .agent-node:after { width:18px; }.benchmark-setup .sequential strong { font-size:13px; }
|
| 261 |
+
@media(max-width:900px) { .benchmark-setup { grid-template-columns:1fr; gap:20px; } }
|
| 262 |
+
|
| 263 |
+
@media(max-width:600px) { .benchmark-setup .sequential { gap:25px; } }
|
website/check.mjs
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import assert from 'node:assert/strict';
|
| 2 |
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
| 3 |
+
import { fileURLToPath } from 'node:url';
|
| 4 |
+
import { resolve, dirname } from 'node:path';
|
| 5 |
+
import { gzipSync } from 'node:zlib';
|
| 6 |
+
|
| 7 |
+
const root = dirname(fileURLToPath(import.meta.url));
|
| 8 |
+
const dist = resolve(root, 'assets');
|
| 9 |
+
const project = resolve(root, '..');
|
| 10 |
+
const read = (name) => readFileSync(resolve(dist, name), 'utf8');
|
| 11 |
+
const html = readFileSync(resolve(project, 'index.html'), 'utf8');
|
| 12 |
+
const css = read('styles.css');
|
| 13 |
+
const js = read('app.js');
|
| 14 |
+
const data = JSON.parse(read('results.json'));
|
| 15 |
+
const ids = [...html.matchAll(/\bid="([^"]+)"/g)].map((match) => match[1]);
|
| 16 |
+
assert.equal(new Set(ids).size, ids.length, 'Duplicate HTML IDs');
|
| 17 |
+
assert.equal((html.match(/<h1\b/g) || []).length, 1, 'One page heading');
|
| 18 |
+
assert.match(html, /<h1 id="hero-title">Receiver-Conditioned Latent Communication gives/);
|
| 19 |
+
assert.equal((html.match(/<figcaption>/g) || []).length, 5, 'Explain each paper figure');
|
| 20 |
+
assert.match(html, /<html lang="en">/);
|
| 21 |
+
assert.match(html, /name="viewport"/);
|
| 22 |
+
assert.match(html, /<title>Receiver-Conditioned Latent Communication gives 94% CacheBack<\/title>/);
|
| 23 |
+
const sectionOrder = ['result-summary', 'booking-demo', 'abstract', 'results', 'demo', 'code', 'paper'];
|
| 24 |
+
sectionOrder.slice(1).forEach((id, i) => {
|
| 25 |
+
assert.ok(html.indexOf(`id="${sectionOrder[i]}"`) < html.indexOf(`id="${id}"`), `Section order: ${id}`);
|
| 26 |
+
});
|
| 27 |
+
assert.equal((html.match(/<img src="website\/assets\/figures\//g) || []).length, 5);
|
| 28 |
+
|
| 29 |
+
for (const [, url] of html.matchAll(/(?:href|src|poster)="([^"]+)"/g)) {
|
| 30 |
+
if (/^(https:|data:)/.test(url)) continue;
|
| 31 |
+
if (url.startsWith('#')) {
|
| 32 |
+
assert.ok(url === '#' || ids.includes(url.slice(1)), `Missing anchor: ${url}`);
|
| 33 |
+
} else {
|
| 34 |
+
const pathname = new URL(url, 'https://example.invalid/rclc/').pathname;
|
| 35 |
+
assert.ok(pathname.startsWith('/rclc/'), `Link escapes the project path: ${url}`);
|
| 36 |
+
const path = pathname.slice('/rclc/'.length);
|
| 37 |
+
const asset = path.endsWith('/') ? `${path}index.html` : path;
|
| 38 |
+
assert.ok(statSync(resolve(project, asset)).isFile(), `Missing local asset: ${url}`);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
for (const [, id] of js.matchAll(/byId\('([^']+)'\)/g)) {
|
| 42 |
+
assert.ok(ids.includes(id), `Script refers to missing element: ${id}`);
|
| 43 |
+
}
|
| 44 |
+
assert.equal(data.models.gemma.ratio, 4, 'Use the paper selected point, not Gemma maximum accuracy');
|
| 45 |
+
assert.equal(data.models.ministral.ratio, 32);
|
| 46 |
+
assert.equal(data.models.nemotron.ratio, 8);
|
| 47 |
+
for (const model of Object.values(data.models)) {
|
| 48 |
+
assert.ok(model.ratio >= 2 && Number.isInteger(model.ratio));
|
| 49 |
+
for (const arm of [model.text, model.cache]) {
|
| 50 |
+
assert.ok(arm.accuracy >= 0 && arm.accuracy <= 1);
|
| 51 |
+
assert.ok(arm.seconds > 0 && Number.isFinite(arm.seconds));
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
// The displayed bar lengths must encode the published data on shared zero-based scales.
|
| 55 |
+
const plottedWidths = [...html.matchAll(/<i style="width:([\d.]+)%"/g)].map(match => Number(match[1]));
|
| 56 |
+
const expectedWidths = Object.values(data.models).flatMap(model => [
|
| 57 |
+
model.text.accuracy * 100, model.cache.accuracy * 100,
|
| 58 |
+
model.text.seconds / 1600 * 100, model.cache.seconds / 1600 * 100,
|
| 59 |
+
]);
|
| 60 |
+
assert.equal(plottedWidths.length, 16);
|
| 61 |
+
plottedWidths.forEach((width, i) => assert.ok(Math.abs(width - expectedWidths[i]) < 0.0001));
|
| 62 |
+
const gains = [...html.matchAll(/class="accuracy-gain">\+([\d.]+)<abbr/g)].map(match => Number(match[1]));
|
| 63 |
+
const speedups = [...html.matchAll(/<strong class="speedup">([\d.]+)× faster<\/strong>/g)].map(match => Number(match[1]));
|
| 64 |
+
assert.deepEqual(gains, Object.values(data.models).map(m => Number(((m.cache.accuracy - m.text.accuracy) * 100).toFixed(1))));
|
| 65 |
+
assert.deepEqual(speedups, Object.values(data.models).map(m => Number((m.text.seconds / m.cache.seconds).toFixed(1))));
|
| 66 |
+
assert.doesNotMatch(html, /name="model"/);
|
| 67 |
+
assert.match(html, /loading="lazy" sandbox="allow-scripts allow-same-origin"/);
|
| 68 |
+
assert.match(css, /prefers-reduced-motion:reduce/);
|
| 69 |
+
assert.match(css, /:focus-visible/);
|
| 70 |
+
assert.match(html, /id="bibtex"/);
|
| 71 |
+
assert.match(html, /<iframe[^>]+src="demo\/index\.html\?v=fit-7"/);
|
| 72 |
+
assert.match(readFileSync(resolve(project, 'demo/index.html'), 'utf8'), /fetch\("trace-w4\.json"\)/);
|
| 73 |
+
// The booking record is rendered by the embedded replay, not duplicated in the page.
|
| 74 |
+
const replay = readFileSync(resolve(project, 'demo/index.html'), 'utf8');
|
| 75 |
+
assert.match(replay, /trace-w4\.json/);
|
| 76 |
+
assert.match(html, /aria-labelledby="booking-question"/);
|
| 77 |
+
assert.doesNotMatch(html, /Recorded model run|demo-outcomes|hero-description|class="contribution"/);
|
| 78 |
+
for (const label of ['Copy code', 'Copy citation']) assert.ok(html.includes(`aria-label="${label}"`));
|
| 79 |
+
|
| 80 |
+
const coding = JSON.parse(readFileSync(resolve(project, 'demo/coding/evidence.json'), 'utf8')).arms;
|
| 81 |
+
assert.ok(html.indexOf('id="booking-demo"') < html.indexOf('id="coding-demo"'), 'Booking replay precedes coding video');
|
| 82 |
+
const video = html.match(/<video\b[^>]*>[\s\S]*?<\/video>/)[0];
|
| 83 |
+
assert.match(video, /controls playsinline preload="auto"/);
|
| 84 |
+
assert.doesNotMatch(video, /autoplay/);
|
| 85 |
+
assert.match(video, /src="demo\/coding\/rclc-cacheback-4k.mp4"/);
|
| 86 |
+
assert.match(video, /poster="demo\/coding\/poster.jpg"/);
|
| 87 |
+
assert.equal(readFileSync(resolve(project, 'demo/coding/rclc-cacheback-4k.mp4')).toString('ascii', 4, 8), 'ftyp', 'Real MP4, not a Git LFS pointer');
|
| 88 |
+
assert.ok(html.includes(`${(coding.text.seconds / coding.latent.seconds).toFixed(2)}× faster`));
|
| 89 |
+
assert.ok(html.includes(`CacheBack ${coding.latent.seconds.toFixed(2)} s; text ${coding.text.seconds.toFixed(2)} s`));
|
| 90 |
+
assert.equal(coding.latent.patch, coding.text.patch);
|
| 91 |
+
for (const arm of Object.values(coding)) {
|
| 92 |
+
assert.equal(arm.new_tests_passed + arm.regression_tests_passed, 88);
|
| 93 |
+
assert.equal(arm.failed_tests, 0);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
assert.ok(gzipSync(js).length < 6000, 'Keep page JavaScript below 6 KB gzip');
|
| 97 |
+
assert.ok(!/[\u2013\u2014\u200b-\u200d\ufeff\u2060]/u.test(html), 'Banned punctuation or invisible character: index.html');
|
| 98 |
+
let bytes = Buffer.byteLength(html);
|
| 99 |
+
for (const name of readdirSync(dist, { recursive: true })) {
|
| 100 |
+
if (!statSync(resolve(dist, name)).isFile()) continue;
|
| 101 |
+
const content = readFileSync(resolve(dist, name));
|
| 102 |
+
bytes += content.length;
|
| 103 |
+
assert.ok(!/[\u2013\u2014\u200b-\u200d\ufeff\u2060]/u.test(content.toString()), `Banned punctuation or invisible character: ${name}`);
|
| 104 |
+
}
|
| 105 |
+
assert.ok(bytes < 100000, 'Keep first-party static assets below 100 KB');
|
| 106 |
+
console.log(`Website checks passed: anchors, assets, benchmark points, accessibility hooks; ${bytes} bytes, ${gzipSync(js).length} bytes gzipped JS.`);
|