liveframe 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. liveframe-0.3.0/.gitignore +61 -0
  2. liveframe-0.3.0/LICENSE +202 -0
  3. liveframe-0.3.0/PKG-INFO +267 -0
  4. liveframe-0.3.0/QUICKSTART.md +254 -0
  5. liveframe-0.3.0/README.md +208 -0
  6. liveframe-0.3.0/THIRD_PARTY.md +24 -0
  7. liveframe-0.3.0/docs/baselines/stock-wan-mlx.md +28 -0
  8. liveframe-0.3.0/docs/mobile-operations.md +25 -0
  9. liveframe-0.3.0/examples/byo_adapter/README.md +64 -0
  10. liveframe-0.3.0/examples/byo_adapter/drift_world.py +120 -0
  11. liveframe-0.3.0/pyproject.toml +166 -0
  12. liveframe-0.3.0/src/liveframe/__init__.py +64 -0
  13. liveframe-0.3.0/src/liveframe/__main__.py +3 -0
  14. liveframe-0.3.0/src/liveframe/_run_worker.py +138 -0
  15. liveframe-0.3.0/src/liveframe/backends/__init__.py +23 -0
  16. liveframe-0.3.0/src/liveframe/backends/base.py +52 -0
  17. liveframe-0.3.0/src/liveframe/backends/mlx.py +40 -0
  18. liveframe-0.3.0/src/liveframe/backends/mlx_causal.py +590 -0
  19. liveframe-0.3.0/src/liveframe/backends/pytorch.py +76 -0
  20. liveframe-0.3.0/src/liveframe/backends/registry.py +53 -0
  21. liveframe-0.3.0/src/liveframe/backends/synthetic.py +43 -0
  22. liveframe-0.3.0/src/liveframe/causal_cache.py +106 -0
  23. liveframe-0.2.0/src/liveframe/cli.py → liveframe-0.3.0/src/liveframe/claims.py +5 -41
  24. liveframe-0.3.0/src/liveframe/cli.py +829 -0
  25. liveframe-0.3.0/src/liveframe/converters/__init__.py +15 -0
  26. liveframe-0.3.0/src/liveframe/converters/cfpp_to_mlx.py +184 -0
  27. liveframe-0.3.0/src/liveframe/converters/taew21_to_mlx.py +190 -0
  28. liveframe-0.3.0/src/liveframe/data/gates/gates.schema.json +17 -0
  29. liveframe-0.3.0/src/liveframe/data/gates/gates.v1.json +79 -0
  30. liveframe-0.3.0/src/liveframe/decoder_contract.py +93 -0
  31. liveframe-0.3.0/src/liveframe/decoders/__init__.py +5 -0
  32. liveframe-0.3.0/src/liveframe/decoders/taew21_mlx.py +279 -0
  33. {liveframe-0.2.0 → liveframe-0.3.0}/src/liveframe/engine.py +38 -9
  34. liveframe-0.3.0/src/liveframe/evaluator.py +177 -0
  35. liveframe-0.3.0/src/liveframe/events.py +50 -0
  36. liveframe-0.3.0/src/liveframe/fixtures.py +245 -0
  37. liveframe-0.3.0/src/liveframe/gates.py +111 -0
  38. liveframe-0.3.0/src/liveframe/host.py +82 -0
  39. liveframe-0.3.0/src/liveframe/manifests.py +129 -0
  40. liveframe-0.3.0/src/liveframe/memory.py +71 -0
  41. liveframe-0.3.0/src/liveframe/mlx_benchmark.py +30 -0
  42. liveframe-0.3.0/src/liveframe/mlx_causal_smoke.py +108 -0
  43. liveframe-0.3.0/src/liveframe/mlx_cfpp_benchmark.py +110 -0
  44. liveframe-0.3.0/src/liveframe/mlx_parity.py +201 -0
  45. liveframe-0.3.0/src/liveframe/mlx_pipeline_parity.py +428 -0
  46. liveframe-0.3.0/src/liveframe/mlx_quality_runner.py +465 -0
  47. liveframe-0.3.0/src/liveframe/mlx_rolling_parity.py +346 -0
  48. liveframe-0.3.0/src/liveframe/mlx_vae_decode.py +264 -0
  49. liveframe-0.3.0/src/liveframe/mlx_vae_profile.py +127 -0
  50. liveframe-0.3.0/src/liveframe/perceptual_policy.py +209 -0
  51. liveframe-0.3.0/src/liveframe/prompting.py +91 -0
  52. liveframe-0.3.0/src/liveframe/py.typed +0 -0
  53. liveframe-0.3.0/src/liveframe/qualification.py +273 -0
  54. liveframe-0.3.0/src/liveframe/qualification_ledger.py +153 -0
  55. liveframe-0.3.0/src/liveframe/quality_artifacts.py +176 -0
  56. liveframe-0.3.0/src/liveframe/quality_calibration.py +580 -0
  57. liveframe-0.3.0/src/liveframe/quality_capture.py +622 -0
  58. liveframe-0.3.0/src/liveframe/quality_checkpoint.py +136 -0
  59. liveframe-0.3.0/src/liveframe/quality_executor.py +113 -0
  60. liveframe-0.3.0/src/liveframe/quality_freeze.py +102 -0
  61. liveframe-0.3.0/src/liveframe/quality_holdout.py +289 -0
  62. liveframe-0.3.0/src/liveframe/quality_manifest.py +162 -0
  63. liveframe-0.3.0/src/liveframe/quality_metric_runner.py +283 -0
  64. liveframe-0.3.0/src/liveframe/quality_metrics.py +83 -0
  65. liveframe-0.3.0/src/liveframe/quality_stochastic.py +227 -0
  66. liveframe-0.3.0/src/liveframe/refresh_capture.py +504 -0
  67. liveframe-0.3.0/src/liveframe/refresh_proof.py +455 -0
  68. liveframe-0.3.0/src/liveframe/refresh_trajectory.py +167 -0
  69. liveframe-0.3.0/src/liveframe/rolling_forcing.py +91 -0
  70. liveframe-0.3.0/src/liveframe/rolling_perceptual_parity.py +462 -0
  71. liveframe-0.3.0/src/liveframe/runs.py +304 -0
  72. liveframe-0.3.0/src/liveframe/scheduler.py +170 -0
  73. liveframe-0.3.0/src/liveframe/streaming.py +86 -0
  74. liveframe-0.3.0/src/liveframe/taew21_protocol.py +327 -0
  75. liveframe-0.3.0/src/liveframe/taew21_reference.py +46 -0
  76. liveframe-0.3.0/src/liveframe/torch_refresh_rerope.py +576 -0
  77. liveframe-0.3.0/src/liveframe/world/__init__.py +49 -0
  78. liveframe-0.3.0/src/liveframe/world/actions.py +204 -0
  79. liveframe-0.3.0/src/liveframe/world/adapters/__init__.py +1 -0
  80. liveframe-0.3.0/src/liveframe/world/adapters/abot_adapter.py +127 -0
  81. liveframe-0.3.0/src/liveframe/world/adapters/hy_worldplay.pins.json +25 -0
  82. liveframe-0.3.0/src/liveframe/world/adapters/hy_worldplay.py +212 -0
  83. liveframe-0.3.0/src/liveframe/world/adapters/matrix_game2.pins.json +16 -0
  84. liveframe-0.3.0/src/liveframe/world/adapters/matrix_game2.py +336 -0
  85. liveframe-0.3.0/src/liveframe/world/adapters/matrix_game3.pins.json +17 -0
  86. liveframe-0.3.0/src/liveframe/world/adapters/matrix_game3.py +184 -0
  87. liveframe-0.3.0/src/liveframe/world/adapters/oasis_adapter.py +141 -0
  88. liveframe-0.3.0/src/liveframe/world/adapters/synthetic.py +410 -0
  89. liveframe-0.3.0/src/liveframe/world/backend.py +100 -0
  90. liveframe-0.3.0/src/liveframe/world/bridge/__init__.py +5 -0
  91. liveframe-0.3.0/src/liveframe/world/bridge/host.py +275 -0
  92. liveframe-0.3.0/src/liveframe/world/bridge/protocol.py +46 -0
  93. liveframe-0.3.0/src/liveframe/world/bridge/worker.py +370 -0
  94. liveframe-0.3.0/src/liveframe/world/doctor.py +293 -0
  95. liveframe-0.3.0/src/liveframe/world/export.py +286 -0
  96. liveframe-0.3.0/src/liveframe/world/ledger.py +90 -0
  97. liveframe-0.3.0/src/liveframe/world/loader.py +79 -0
  98. liveframe-0.3.0/src/liveframe/world/metrics/__init__.py +1 -0
  99. liveframe-0.3.0/src/liveframe/world/metrics/control.py +305 -0
  100. liveframe-0.3.0/src/liveframe/world/metrics/runner.py +226 -0
  101. liveframe-0.3.0/src/liveframe/world/metrics/stability.py +167 -0
  102. liveframe-0.3.0/src/liveframe/world/metrics/validation.py +245 -0
  103. liveframe-0.3.0/src/liveframe/world/report.py +598 -0
  104. liveframe-0.3.0/src/liveframe/world/runner.py +390 -0
  105. liveframe-0.3.0/src/liveframe/world/session.py +467 -0
  106. liveframe-0.3.0/src/liveframe/world/sinks.py +158 -0
  107. liveframe-0.3.0/src/liveframe/world/suites/__init__.py +216 -0
  108. liveframe-0.3.0/src/liveframe/world/suites/scenes/LICENSES.md +8 -0
  109. liveframe-0.3.0/src/liveframe/world/suites/scenes/indoor-depot.npy +0 -0
  110. liveframe-0.3.0/src/liveframe/world/suites/scenes/indoor-hall.npy +0 -0
  111. liveframe-0.3.0/src/liveframe/world/suites/scenes/outdoor-dunes.npy +0 -0
  112. liveframe-0.3.0/src/liveframe/world/suites/scenes/outdoor-meadow.npy +0 -0
  113. liveframe-0.3.0/src/liveframe/world/suites/scenes/stylized-blocks.npy +0 -0
  114. liveframe-0.3.0/src/liveframe/world/suites/scenes/stylized-night.npy +0 -0
  115. liveframe-0.3.0/src/liveframe/world/suites/scenes/thirdperson-court.npy +0 -0
  116. liveframe-0.3.0/src/liveframe/world/suites/scenes/thirdperson-yard.npy +0 -0
  117. liveframe-0.3.0/tests/conftest.py +62 -0
  118. liveframe-0.3.0/tests/data/bridge_test_adapter.py +68 -0
  119. liveframe-0.3.0/tests/fixtures/MANIFEST.json +74 -0
  120. liveframe-0.3.0/tests/flywheel/test_failure_regressions.py +186 -0
  121. liveframe-0.3.0/tests/flywheel/test_fixtures_fictional.py +136 -0
  122. liveframe-0.3.0/tests/test_backends.py +90 -0
  123. liveframe-0.3.0/tests/test_causal_cache.py +74 -0
  124. liveframe-0.3.0/tests/test_conversion.py +41 -0
  125. liveframe-0.3.0/tests/test_decoder_contract.py +57 -0
  126. liveframe-0.3.0/tests/test_engine_api.py +103 -0
  127. liveframe-0.3.0/tests/test_evaluator.py +84 -0
  128. liveframe-0.3.0/tests/test_events.py +17 -0
  129. liveframe-0.3.0/tests/test_fixtures.py +113 -0
  130. liveframe-0.3.0/tests/test_gates.py +38 -0
  131. liveframe-0.3.0/tests/test_h100_pipeline_benchmark.py +144 -0
  132. liveframe-0.3.0/tests/test_h100_quality_batch.py +94 -0
  133. liveframe-0.3.0/tests/test_h100_refresh_campaign.py +135 -0
  134. liveframe-0.3.0/tests/test_manifests.py +44 -0
  135. liveframe-0.3.0/tests/test_memory.py +51 -0
  136. liveframe-0.3.0/tests/test_mlx_benchmark.py +21 -0
  137. liveframe-0.3.0/tests/test_mlx_causal.py +177 -0
  138. liveframe-0.3.0/tests/test_mlx_cfpp_benchmark.py +54 -0
  139. liveframe-0.3.0/tests/test_mlx_quality_runner.py +101 -0
  140. liveframe-0.3.0/tests/test_mlx_vae_profile.py +40 -0
  141. liveframe-0.3.0/tests/test_perceptual_policy.py +115 -0
  142. liveframe-0.3.0/tests/test_prepare_publication_release.py +44 -0
  143. liveframe-0.3.0/tests/test_prompting.py +43 -0
  144. liveframe-0.3.0/tests/test_publication_claims.py +76 -0
  145. liveframe-0.3.0/tests/test_qualification.py +83 -0
  146. liveframe-0.3.0/tests/test_qualification_cli.py +55 -0
  147. liveframe-0.3.0/tests/test_qualification_ledger.py +66 -0
  148. liveframe-0.3.0/tests/test_quality_calibration.py +215 -0
  149. liveframe-0.3.0/tests/test_quality_capture.py +288 -0
  150. liveframe-0.3.0/tests/test_quality_checkpoint.py +112 -0
  151. liveframe-0.3.0/tests/test_quality_executor.py +107 -0
  152. liveframe-0.3.0/tests/test_quality_freeze.py +106 -0
  153. liveframe-0.3.0/tests/test_quality_holdout.py +221 -0
  154. liveframe-0.3.0/tests/test_quality_manifest.py +82 -0
  155. liveframe-0.3.0/tests/test_quality_metric_runner.py +89 -0
  156. liveframe-0.3.0/tests/test_quality_protocol_v2.py +73 -0
  157. liveframe-0.3.0/tests/test_quality_stochastic.py +78 -0
  158. liveframe-0.3.0/tests/test_refresh_proof.py +520 -0
  159. liveframe-0.3.0/tests/test_refresh_trajectory.py +279 -0
  160. liveframe-0.3.0/tests/test_rolling_forcing.py +43 -0
  161. liveframe-0.3.0/tests/test_runs.py +53 -0
  162. liveframe-0.3.0/tests/test_streaming.py +51 -0
  163. liveframe-0.3.0/tests/test_taew21_converter.py +145 -0
  164. liveframe-0.3.0/tests/test_taew21_mlx_structure.py +22 -0
  165. liveframe-0.3.0/tests/test_taew21_protocol.py +123 -0
  166. liveframe-0.3.0/tests/test_taew21_reference.py +36 -0
  167. liveframe-0.3.0/tests/test_taew21_study_tools.py +648 -0
  168. liveframe-0.3.0/tests/test_torch_refresh_harness.py +173 -0
  169. liveframe-0.3.0/tests/test_torch_refresh_rerope.py +197 -0
  170. liveframe-0.3.0/tests/test_world_actions.py +74 -0
  171. liveframe-0.3.0/tests/test_world_bridge.py +211 -0
  172. liveframe-0.3.0/tests/test_world_export.py +92 -0
  173. liveframe-0.3.0/tests/test_world_loader.py +61 -0
  174. liveframe-0.3.0/tests/test_world_metrics.py +109 -0
  175. liveframe-0.3.0/tests/test_world_reference_adapters.py +112 -0
  176. liveframe-0.3.0/tests/test_world_session.py +291 -0
  177. liveframe-0.3.0/tests/test_world_sinks.py +48 -0
  178. liveframe-0.3.0/tests/test_world_suites.py +299 -0
  179. liveframe-0.2.0/.gitignore +0 -37
  180. liveframe-0.2.0/LICENSE +0 -194
  181. liveframe-0.2.0/PKG-INFO +0 -101
  182. liveframe-0.2.0/README.md +0 -78
  183. liveframe-0.2.0/pyproject.toml +0 -40
  184. liveframe-0.2.0/src/liveframe/__init__.py +0 -31
  185. /liveframe-0.2.0/tests/test_cli.py → /liveframe-0.3.0/tests/test_claims_cli.py +0 -0
  186. /liveframe-0.2.0/tests/test_engine.py → /liveframe-0.3.0/tests/test_engine_contract.py +0 -0
@@ -0,0 +1,61 @@
1
+ .DS_Store
2
+ .venv/
3
+ __pycache__/
4
+ *.py[cod]
5
+ .pytest_cache/
6
+ .mypy_cache/
7
+ .ruff_cache/
8
+ dist/
9
+ build/
10
+ *.egg-info/
11
+ release/
12
+
13
+ # LaTeX build scratch files
14
+ paper/arxiv/*.aux
15
+ paper/arxiv/*.blg
16
+ paper/arxiv/*.log
17
+ paper/arxiv/*.out
18
+ paper/arxiv_submission_runbook.local.md
19
+
20
+ # Large or machine-local artifacts
21
+ outputs/
22
+ weights/
23
+ checkpoints/
24
+ third_party/
25
+ artifacts/h100-holdout-results/
26
+ artifacts/mlx-holdout-results/
27
+ artifacts/shared-rolling-noise.v1/
28
+ artifacts/taew21-campaign-noise.v1/
29
+ *.pt
30
+ *.pth
31
+ *.safetensors
32
+ *.mp4
33
+ *.mov
34
+ *.mkv
35
+
36
+ # Runtime state
37
+ .liveframe/
38
+ .claude/settings.local.json
39
+
40
+ # World-harness run outputs (never committed; evidence bundles go under agent/world/evidence/)
41
+ /runs/
42
+ .hf_token.env
43
+ *.env.local
44
+ .env
45
+
46
+ # Stray legacy package artifacts (not part of the build)
47
+ liveframe-0.1.0-package.zip
48
+ liveframe-0.1.0-package/
49
+
50
+ # World evidence: keep small receipts (json/html/jsonl); never the frame payloads (GBs of .npz)
51
+ agent/world/evidence/**/*.npz
52
+ agent/world/evidence/**/frames_*/
53
+
54
+ # Internal world planning / process notes (not part of the public release)
55
+ /liveframe-world-handoff.md
56
+ /liveframe-world-addendum-flywheel.md
57
+ agent/world/flywheel/
58
+ agent/world/*.md
59
+
60
+ # Launch / go-to-market drafts (local only)
61
+ publishing/
@@ -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 [yyyy] [name of copyright owner]
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.
@@ -0,0 +1,267 @@
1
+ Metadata-Version: 2.5
2
+ Name: liveframe
3
+ Version: 0.3.0
4
+ Summary: Honest runtime qualification for streaming and interactive video generation.
5
+ Project-URL: Homepage, https://github.com/kkjcodes/liveframe
6
+ Project-URL: Repository, https://github.com/kkjcodes/liveframe
7
+ Project-URL: Issues, https://github.com/kkjcodes/liveframe/issues
8
+ Author: kkjcodes
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: benchmark,evaluation,runtime,streaming,video-generation,world-models
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Requires-Python: >=3.10
24
+ Provides-Extra: cuda
25
+ Requires-Dist: torch>=2.6; extra == 'cuda'
26
+ Provides-Extra: dev
27
+ Requires-Dist: mypy>=1.14; extra == 'dev'
28
+ Requires-Dist: pytest>=8.3; extra == 'dev'
29
+ Requires-Dist: ruff>=0.9; extra == 'dev'
30
+ Provides-Extra: metrics
31
+ Requires-Dist: lpips>=0.1.4; extra == 'metrics'
32
+ Requires-Dist: numpy>=2.0; extra == 'metrics'
33
+ Requires-Dist: pillow>=11.0; extra == 'metrics'
34
+ Requires-Dist: scipy>=1.14; extra == 'metrics'
35
+ Requires-Dist: torch>=2.6; extra == 'metrics'
36
+ Requires-Dist: torchvision>=0.21; extra == 'metrics'
37
+ Requires-Dist: transformers>=5.0; extra == 'metrics'
38
+ Provides-Extra: mlx
39
+ Requires-Dist: mlx>=0.31; (platform_system == 'Darwin') and extra == 'mlx'
40
+ Provides-Extra: world
41
+ Requires-Dist: jsonschema>=4.21; extra == 'world'
42
+ Requires-Dist: numpy>=1.26; extra == 'world'
43
+ Requires-Dist: opencv-python-headless>=4.9; extra == 'world'
44
+ Provides-Extra: world-gpu
45
+ Requires-Dist: jsonschema>=4.21; extra == 'world-gpu'
46
+ Requires-Dist: numpy>=1.26; extra == 'world-gpu'
47
+ Requires-Dist: opencv-python-headless>=4.9; extra == 'world-gpu'
48
+ Requires-Dist: pynvml>=11.5; extra == 'world-gpu'
49
+ Requires-Dist: torch>=2.4; extra == 'world-gpu'
50
+ Provides-Extra: world-quality
51
+ Requires-Dist: jsonschema>=4.21; extra == 'world-quality'
52
+ Requires-Dist: lpips>=0.1.4; extra == 'world-quality'
53
+ Requires-Dist: numpy>=1.26; extra == 'world-quality'
54
+ Requires-Dist: opencv-python-headless>=4.9; extra == 'world-quality'
55
+ Requires-Dist: pynvml>=11.5; extra == 'world-quality'
56
+ Requires-Dist: torch>=2.4; extra == 'world-quality'
57
+ Requires-Dist: transformers>=5.0; extra == 'world-quality'
58
+ Description-Content-Type: text/markdown
59
+
60
+ # LiveFrame
61
+
62
+ LiveFrame helps engineers determine whether a streaming video-generation system works for a real
63
+ workload, understand why it fails, and verify that an optimization improves complete-wall
64
+ performance without silently weakening quality or deployment eligibility. The active product
65
+ mission is documented in [agent/liveframe_product_mission.md](agent/liveframe_product_mission.md).
66
+
67
+ ## LiveFrame World: runtime truth for interactive world models
68
+
69
+ Point the harness at an action-conditioned world model and get a verified
70
+ runtime + control + stability report — one command, one GPU, minutes:
71
+
72
+ ```bash
73
+ # From a source checkout:
74
+ pip install -e ".[world]"
75
+ # (PyPI: `pip install "liveframe[world]"` once 0.3.0 is published.)
76
+
77
+ # Prove the loop end to end on CPU first (~seconds):
78
+ liveframe world run synthetic --suite smoke
79
+
80
+ # Bring your own model: any FILE.py:ClassName implementing the adapter
81
+ # protocol, in-process. pip users write their own file (see QUICKSTART.md for a
82
+ # complete paste-and-run adapter); source checkouts can start from the template
83
+ # in examples/byo_adapter/drift_world.py. Declare every action the suites
84
+ # command (W S A D L R U N 0) or the case fails with a clear contract error.
85
+ liveframe world run my_world.py:MyWorld --suite quick
86
+
87
+ # Same adapter file, running inside your model's own environment:
88
+ liveframe world run my_model.py:MyWorld --suite quick \
89
+ --python /path/to/model-env/bin/python
90
+
91
+ # Matrix-Game 2.0 reference adapter (weights + checkout required; run
92
+ # `liveframe world doctor matrix-game-2 --python ...` first — every failed
93
+ # check prints its exact fix):
94
+ liveframe world run matrix-game-2 --suite quick --python /opt/envs/mg2/bin/python
95
+ ```
96
+
97
+ Each run writes a self-contained `report.html` (no scripts, no network), a
98
+ machine-readable `report.json`, and a digest-bound ledger; the command prints
99
+ the `report.html` path when it finishes, and
100
+ `liveframe world verify <run>/ledger.json` re-checks every artifact byte.
101
+ (`smoke` and `quick` are deliberately short, so `realtime_pass` reports `null`
102
+ — the real-time rule needs a continuous 60-second stream; use `soak` for it.)
103
+ Generated FPS counts decoded native frames only — interpolated or duplicated
104
+ frames never count, cold start is reported as context rather than blended into
105
+ generation numbers, and vendor claims are compared with neutral verdicts
106
+ (`different configuration` when the claim names a setup, else `config not
107
+ stated`) — the builder never says "reproduced". Suites: `smoke`,
108
+ `quick`, `standard`, `soak`, `memory` (`liveframe world suites`). Also:
109
+ `world compare A B` (config differences listed before any numbers) and
110
+ `world export --format worldmark|wbench|raw` for interop with quality-focused
111
+ benchmarks. Start at [QUICKSTART.md](QUICKSTART.md) for a step-by-step guide —
112
+ install, a paste-and-run adapter, reading the report, and verifying the ledger —
113
+ or the template in [examples/byo_adapter/](examples/byo_adapter/).
114
+
115
+ ### Measured references (with receipts)
116
+
117
+ We ran four published interactive world models through the harness, each in a
118
+ stated configuration, every number backed by a re-verifiable ledger. The headline
119
+ isn't "these models are slow" — it's that published frame rates are hard to
120
+ reproduce from what's shipped. When a claim is fully specified and we run that
121
+ exact config (Matrix-Game 2.0), it reproduces; otherwise we show which condition
122
+ differs (a different GPU, a proprietary engine vs the open weights, or a streaming
123
+ mode that isn't the released code).
124
+
125
+ | Model | Claim (as published) | Measured | Why they differ (stated conditions) |
126
+ |---|---|---|---|
127
+ | Matrix-Game 2.0 | 25 fps (1× H100) | **19.7 fps** | same H100, same steps — **reproduces** |
128
+ | ABot-World-0 | 16 fps (720p, 1× RTX 5090) | **5.85 fps** | same RTX 5090; remaining gap = their optional fp8/sage stack off (not pip-installable) + the interactive delivery path. (A100 reference: 3.70) |
129
+ | Oasis-500M | 20 fps (Decart's proprietary engine) | **1.06 fps** | we measured the open 500M weights vanilla (1× A100 PCIe) — a different artifact than the engine behind the claim |
130
+ | HY-World 1.5 | 24 fps (streaming; GPU/steps unstated) | **1.36 fps** | released pipeline runs batch, not streaming — not directly comparable |
131
+
132
+ **None of these results contradict a vendor's claim.** The one claim that is fully
133
+ specified and matched (Matrix-Game 2.0) reproduces; the other three can't be tested
134
+ as published from what's shipped — a different GPU class, a proprietary serving
135
+ engine, or a mode not in the released code. That reproducibility gap, stated
136
+ precisely, is the finding.
137
+
138
+ It times frames as they are delivered (so it errs low, never inflates) and counts
139
+ native decoded frames only. We run the released pipeline with conservative settings
140
+ (optional fp8/attention/compile off — for ABot this includes stubbing its optional
141
+ fp8 kernel, unused at our settings), so these are floors, not each model's best.
142
+ The Oasis adapter decodes every frame as it is generated (the interactive cost);
143
+ the upstream script batch-decodes at the end. Every number reproduces from a
144
+ digest-bound ledger (`liveframe world verify`). Matrix-Game 3.0's claim is 9 GPUs
145
+ (8 DiT + 1 VAE) — more than a single node — so its cluster figure is pending; its
146
+ single-GPU number is 2.04 fps.
147
+
148
+ LiveFrame defines **real-time** as at least **16 native generated frames per second for a continuous 60-second stream**, with time-to-first-frame, p95 chunk latency, thermal state, memory, intrinsic quality, same-seed identity, and long-horizon drift disclosed. Interpolated or duplicated presentation frames never count as generated FPS.
149
+
150
+ The strongest clean Apple result in this repository is **1.418 native generated FPS**, measured on an Apple M5 Max with MLX/MLX Metal 0.32.0, Wan2.1-T2V-1.3B Causal-Forcing++ one-step generation, and 480x832 output over an 81-frame fixture. It is **11.28x short of 16 FPS** and is not a 60-second sustained-streaming result.
151
+
152
+ That miss is the headline, not a footnote. LiveFrame's contribution is an evidence-first methodology, one exact-output systems speedup, and three scoped negative results that prevented broader false claims.
153
+
154
+ ## Results
155
+
156
+ | Result | Measurement | Scope |
157
+ | --- | --- | --- |
158
+ | M5 allocator optimization | 69.167s to 57.127s complete wall; 1.171 to 1.418 FPS; `1.2108x` speedup | Apple M5 Max, MLX 0.32.0, one-step CF++, 480x832, 81 frames |
159
+ | Cross-runtime AR divergence | pairwise identity passed 0/128 videos and 0/32 prompt-horizon cells | Frozen Rolling Forcing checkpoint, byte-identical CUDA/MLX stochastic inputs, 15s and 60s |
160
+ | M5 target gap | 1.418 FPS, 11.28x below the 16 FPS threshold | Clean short fixture, not a hardware impossibility or sustained claim |
161
+ | Periodic refresh reuse | 0/16 quality cells; temporal identity failed 64/64 videos | H100 numerical campaign, two high-redundancy strata, 15s and 60s |
162
+
163
+ The M5 speedup came from increasing the bounded MLX free-buffer cache from 1 GiB to 4 GiB before model loading. All measured trials reported the same pre-encode raw RGB digest and zero swap. The original 97 MB raw RGB payload was not retained; the immutable benchmark artifact records the repeated digest, while the shipped H.264 file and its decoded RGB have separate hashes. See [the ledger audit](agent/liveframe_ledger_audit.md).
164
+
165
+ The 60-second M5 holdout campaign measured 0.185 FPS median, but concurrent memory pressure and sustained swap make that timing ineligible as the clean headline denominator. Its quality and identity evidence remains valid because output bytes were unaffected by timing contamination.
166
+
167
+ ## What Failed, Precisely
168
+
169
+ ### 1. Cross-runtime autoregressive reproduction
170
+
171
+ CUDA and MLX consumed byte-identical serialized BF16 stochastic tensors under the frozen Rolling Forcing schedule. The MLX outputs often remained independently plausible, but they did not preserve the same trajectory:
172
+
173
+ - Intrinsic quality: 90/128 videos and 19/32 prompt-horizon cells passed.
174
+ - Same-seed identity: 0/128 videos and 0/32 cells passed.
175
+ - Pairwise temporal CLIP identity: 0/128 videos passed.
176
+
177
+ This rejects the tested checkpoint/runtime pair under the frozen portability contract. It does not establish that every CUDA and MLX video implementation must diverge.
178
+
179
+ ### 2. The tested M5 configuration was not real-time
180
+
181
+ The clean optimized row is 1.418 native FPS at 480x832. Quantization, lower-resolution tiers, different models, custom Metal kernels, decoder redesign, and disclosed interpolation were not exhausted, so this is a configuration result rather than an Apple Silicon impossibility claim.
182
+
183
+ ### 3. Periodic refresh K/V reuse was not quality-safe
184
+
185
+ The tested H100 mechanism reused raw normalized K/V from a full-refresh anchor for the next two framewise refreshes after reapplying temporal RoPE. It failed all 16 frozen prompt-horizon cells. No authoritative timing replay was run because numerical quality GO was a prerequisite.
186
+
187
+ The broader denoise-side Delta Scheduling oracle was **never run**. The research track stopped after the refresh gate by choice. On the frozen H100 denominator, a denoise-only path needed at least 70.3667% denoise reclaim before overhead to reach the 17% complete-wall gate. That is an untested feasibility bar, not a failed oracle.
188
+
189
+ ## Measurement Method
190
+
191
+ LiveFrame separates four claims that are often conflated:
192
+
193
+ 1. **Numerical trajectory:** cache invariants and latent drift under identical inputs.
194
+ 2. **Intrinsic quality:** prompt alignment, motion, flicker, and temporal behavior against prompt-specific teacher distributions.
195
+ 3. **Same-seed identity:** whether reference and candidate remain recognizably the same generated video.
196
+ 4. **Complete-wall performance:** end-to-end timing including denoise, mandatory refresh, VAE, materialization, synchronization, and encoding.
197
+
198
+ The evidence system includes:
199
+
200
+ - Pre-registered prompts, seeds, content strata, 15-second and 60-second horizons, thresholds, and aggregation.
201
+ - Serialized stochastic tensors with literal cross-runtime byte checks.
202
+ - Digest-bound checkpoints, source revisions, metric weights, runtimes, and outputs.
203
+ - Independent numerical and timing eligibility.
204
+ - Component-resolved timing and zero-swap checks.
205
+ - Atomic publication and fail-closed complete-campaign validation.
206
+ - Proof-blind H100 allocation testing before prospective result visibility.
207
+
208
+ The machine-readable claim surface is [artifacts/liveframe-publication-claims.v1.json](artifacts/liveframe-publication-claims.v1.json). The publication plan and limitations are in [agent/liveframe_publication_package.md](agent/liveframe_publication_package.md).
209
+
210
+ ## Evidence Release
211
+
212
+ Evidence is split by cost and reproducibility:
213
+
214
+ - **Compact release:** schemas, manifests, metric JSON, decision artifacts, and reports.
215
+ - **Representative previews:** 64 CUDA/MLX pairs selected using the protocol's pre-registered seed ranks 0 and 2 at both horizons.
216
+ - **Cold archive:** complete raw pixel, latent, stochastic, and refresh campaign corpora.
217
+
218
+ The SHA-bound extraction manifest is [artifacts/liveframe-publication-release-tiers.v1.json](artifacts/liveframe-publication-release-tiers.v1.json). Generated release payloads are staged under ignored `release/` storage rather than committed to Git.
219
+
220
+ ## Reproduction Boundary
221
+
222
+ LiveFrame source is Apache-2.0. Upstream Causal-Forcing source, Causal-Forcing checkpoints, Wan2.1 weights, and tokenizer weights are not redistributed in this repository. Users acquire pinned assets from their publishers and verify them against [artifacts/upstream.v1.json](artifacts/upstream.v1.json). See [THIRD_PARTY.md](THIRD_PARTY.md) before distributing a reproduction bundle.
223
+
224
+ The frozen evidence revision is tagged `evidence-freeze-2026-08-06`. That tag resolves to commit `ea742ee2ea438b6d9ff2d1bca0b4053f9eeaeb44` and contains the campaign evidence and initial publication ledger.
225
+
226
+ ## Development
227
+
228
+ Python 3.11 or newer is required.
229
+
230
+ ```bash
231
+ python -m venv .venv
232
+ source .venv/bin/activate
233
+ python -m pip install -e '.[dev]'
234
+ pytest
235
+ ruff check src/liveframe tests tools
236
+ mypy
237
+ ```
238
+
239
+ Metal-dependent tests require a native macOS session with an accessible Metal device. The VS Code sandbox can run the CPU suite but cannot initialize MLX Metal.
240
+
241
+ Useful verification commands:
242
+
243
+ ```bash
244
+ liveframe gate verify
245
+ liveframe doctor
246
+ liveframe qualify --backend synthetic --profile interactive-480p \
247
+ --output artifacts/synthetic-qualification.v1.json
248
+ liveframe qualification verify artifacts/synthetic-qualification.v1.json
249
+ python tools/prepare_publication_release.py --help
250
+ ```
251
+
252
+ The synthetic qualification exercises request construction, native-frame accounting, timing, and
253
+ profile gates without a GPU. Its overall verdict is intentionally `incomplete` until required
254
+ quality, long-horizon, memory, and thermal evidence is attached; passing FPS alone never qualifies
255
+ a deployment.
256
+
257
+ ## Repository Layout
258
+
259
+ - `src/liveframe/`: runtime-neutral contracts, MLX backend, quality policy, evidence capture, and refresh proof code.
260
+ - `tools/`: pinned benchmark, H100 campaign, and publication extraction tools.
261
+ - `artifacts/`: compact immutable protocols, manifests, measurements, and decisions.
262
+ - `agent/`: standalone reports, runbooks, project state, and publication package.
263
+ - `tests/`: contract, evidence, policy, backend, and publication-ledger tests.
264
+
265
+ ## License
266
+
267
+ LiveFrame is licensed under Apache-2.0. See [LICENSE](LICENSE) and [THIRD_PARTY.md](THIRD_PARTY.md).