programasweights 0.1.0.dev6__tar.gz → 0.1.0.dev8__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 (539) hide show
  1. programasweights-0.1.0.dev8/.cursor/rules/vllm-deployment.mdc +106 -0
  2. programasweights-0.1.0.dev8/.git +1 -0
  3. programasweights-0.1.0.dev8/.github/workflows/web-sdk.yml +51 -0
  4. programasweights-0.1.0.dev8/.gitmodules +3 -0
  5. programasweights-0.1.0.dev8/.readthedocs.yaml +13 -0
  6. programasweights-0.1.0.dev8/AGENTS.md +127 -0
  7. programasweights-0.1.0.dev8/PKG-INFO +142 -0
  8. programasweights-0.1.0.dev8/PYPI_README.md +113 -0
  9. programasweights-0.1.0.dev8/docs/advanced/adrs.md +66 -0
  10. programasweights-0.1.0.dev8/docs/advanced/architecture.md +47 -0
  11. programasweights-0.1.0.dev8/docs/api-reference/cli.md +76 -0
  12. programasweights-0.1.0.dev8/docs/api-reference/python-sdk.md +75 -0
  13. programasweights-0.1.0.dev8/docs/api-reference/rest-api.md +147 -0
  14. programasweights-0.1.0.dev8/docs/getting-started/first-program.md +77 -0
  15. programasweights-0.1.0.dev8/docs/getting-started/installation.md +38 -0
  16. programasweights-0.1.0.dev8/docs/getting-started/naming-programs.md +78 -0
  17. programasweights-0.1.0.dev8/docs/guide/browser-inference.md +139 -0
  18. programasweights-0.1.0.dev8/docs/guide/how-it-works.md +47 -0
  19. programasweights-0.1.0.dev8/docs/guide/local-inference.md +40 -0
  20. programasweights-0.1.0.dev8/docs/guide/writing-good-specs.md +36 -0
  21. programasweights-0.1.0.dev8/docs/hub/browsing-programs.md +37 -0
  22. programasweights-0.1.0.dev8/docs/hub/feedback-cases.md +34 -0
  23. programasweights-0.1.0.dev8/docs/hub/publishing-programs.md +31 -0
  24. programasweights-0.1.0.dev8/docs/index.md +82 -0
  25. programasweights-0.1.0.dev8/docs/requirements.txt +2 -0
  26. programasweights-0.1.0.dev8/examples/flask_app.py +52 -0
  27. programasweights-0.1.0.dev8/examples/jupyter_notebook.py +52 -0
  28. programasweights-0.1.0.dev8/examples/langchain_integration.py +52 -0
  29. programasweights-0.1.0.dev8/examples/replace_openai.py +44 -0
  30. programasweights-0.1.0.dev8/mkdocs.yml +81 -0
  31. programasweights-0.1.0.dev8/programasweights/__init__.py +185 -0
  32. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/cache.py +38 -1
  33. programasweights-0.1.0.dev8/programasweights/cli.py +208 -0
  34. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/client.py +10 -3
  35. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/runtime/interpreter_onnx.py +1 -1
  36. programasweights-0.1.0.dev8/programasweights/runtime_llamacpp.py +199 -0
  37. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/runtime/interpreter_lora.py +1 -1
  38. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/pyproject.toml +7 -1
  39. programasweights-0.1.0.dev8/server/alembic/versions/003_fulltext_search_ranking.py +41 -0
  40. programasweights-0.1.0.dev8/server/alembic/versions/004_fix_alias_slug_constraint.py +49 -0
  41. programasweights-0.1.0.dev8/server/api/__init__.py +1 -0
  42. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/config.py +10 -7
  43. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/dependencies.py +20 -4
  44. programasweights-0.1.0.dev8/server/api/main.py +233 -0
  45. programasweights-0.1.0.dev8/server/api/middleware/rate_limit.py +172 -0
  46. programasweights-0.1.0.dev8/server/api/models/__init__.py +1 -0
  47. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/models/orm.py +25 -3
  48. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/models/schemas.py +17 -5
  49. programasweights-0.1.0.dev8/server/api/routes/__init__.py +1 -0
  50. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/routes/auth.py +89 -27
  51. programasweights-0.1.0.dev8/server/api/routes/compile.py +269 -0
  52. programasweights-0.1.0.dev8/server/api/routes/feedback.py +45 -0
  53. programasweights-0.1.0.dev8/server/api/routes/infer.py +115 -0
  54. programasweights-0.1.0.dev8/server/api/routes/models_info.py +17 -0
  55. programasweights-0.1.0.dev8/server/api/routes/programs.py +691 -0
  56. programasweights-0.1.0.dev8/server/api/services/__init__.py +1 -0
  57. programasweights-0.1.0.dev8/server/api/services/auto_tag_service.py +103 -0
  58. programasweights-0.1.0.dev8/server/api/services/auto_title_service.py +100 -0
  59. programasweights-0.1.0.dev8/server/api/services/compile_provider.py +712 -0
  60. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/services/compile_service.py +80 -25
  61. programasweights-0.1.0.dev8/server/api/services/search_service.py +152 -0
  62. programasweights-0.1.0.dev8/server/api/services/storage_service.py +239 -0
  63. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/benchmarks/last_benchmark_results.json +123 -123
  64. programasweights-0.1.0.dev8/server/benchmarks/last_stress_results.json +250 -0
  65. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/benchmarks/stress_test.py +13 -14
  66. programasweights-0.1.0.dev8/server/compiler_registry.json +26 -0
  67. programasweights-0.1.0.dev8/server/provider_configs/gpt2.json +17 -0
  68. programasweights-0.1.0.dev8/server/provider_configs/qwen3-0.6b.json +16 -0
  69. programasweights-0.1.0.dev8/server/scripts/ab_test_hf_vs_vllm.py +180 -0
  70. programasweights-0.1.0.dev8/server/scripts/ablation_search.py +221 -0
  71. programasweights-0.1.0.dev8/server/scripts/backfill_hf_browser_assets.py +226 -0
  72. programasweights-0.1.0.dev8/server/scripts/backfill_hf_safetensors.py +95 -0
  73. programasweights-0.1.0.dev8/server/scripts/backfill_interestingness.py +111 -0
  74. programasweights-0.1.0.dev8/server/scripts/backfill_tags.py +76 -0
  75. programasweights-0.1.0.dev8/server/scripts/backfill_titles.py +76 -0
  76. programasweights-0.1.0.dev8/server/scripts/benchmark_gpt2.py +89 -0
  77. programasweights-0.1.0.dev8/server/scripts/eval_search.py +211 -0
  78. programasweights-0.1.0.dev8/server/scripts/evict_cold_programs.py +40 -0
  79. programasweights-0.1.0.dev8/server/scripts/generate_prefix_cache.py +117 -0
  80. programasweights-0.1.0.dev8/server/scripts/launch_gpt2_compiler.py +32 -0
  81. programasweights-0.1.0.dev8/server/scripts/launch_qwen3_compiler.py +32 -0
  82. programasweights-0.1.0.dev8/server/scripts/patch_vllm.sh +65 -0
  83. programasweights-0.1.0.dev8/server/scripts/restart.sh +23 -0
  84. programasweights-0.1.0.dev8/server/scripts/start_all.sh +193 -0
  85. programasweights-0.1.0.dev8/server/scripts/start_gpt2_services.sh +67 -0
  86. programasweights-0.1.0.dev8/server/scripts/start_provider.sh +27 -0
  87. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/scripts/start_services.sh +2 -1
  88. programasweights-0.1.0.dev8/server/tests/__init__.py +1 -0
  89. programasweights-0.1.0.dev8/server/tests/test_rate_limit.py +213 -0
  90. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/test_storage.py +4 -4
  91. programasweights-0.1.0.dev8/server/vllm_models/__init__.py +1 -0
  92. programasweights-0.1.0.dev8/server/vllm_models/gpt2_lora_patch.py +34 -0
  93. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/vllm_models/paw_compiler.py +19 -2
  94. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_1spec.py +1 -1
  95. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_nspecs.py +1 -1
  96. programasweights-0.1.0.dev8/training/data_generation/build_user_bench.py +487 -0
  97. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/HANDOFF.md +1 -1
  98. programasweights-0.1.0.dev8/web-app/frontend/e2e/full.spec.ts +798 -0
  99. programasweights-0.1.0.dev8/web-app/frontend/e2e/helpers.ts +14 -0
  100. programasweights-0.1.0.dev8/web-app/frontend/e2e/smoke.spec.ts +117 -0
  101. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/package-lock.json +64 -0
  102. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/package.json +5 -1
  103. programasweights-0.1.0.dev8/web-app/frontend/playwright.config.ts +17 -0
  104. programasweights-0.1.0.dev8/web-app/frontend/public/browser-worker.html +142 -0
  105. programasweights-0.1.0.dev8/web-app/frontend/scripts/deploy.sh +43 -0
  106. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/App.tsx +20 -1
  107. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/AboutPage.tsx +43 -12
  108. programasweights-0.1.0.dev8/web-app/frontend/src/components/AgentsPage.tsx +169 -0
  109. programasweights-0.1.0.dev8/web-app/frontend/src/components/AuthorPage.tsx +117 -0
  110. programasweights-0.1.0.dev8/web-app/frontend/src/components/BrowserPage.tsx +564 -0
  111. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/CasesSection.tsx +15 -3
  112. programasweights-0.1.0.dev8/web-app/frontend/src/components/DocsPage.tsx +496 -0
  113. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/Footer.tsx +15 -17
  114. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/Header.tsx +21 -2
  115. programasweights-0.1.0.dev8/web-app/frontend/src/components/HubPage.tsx +344 -0
  116. programasweights-0.1.0.dev8/web-app/frontend/src/components/HubProgramPage.tsx +414 -0
  117. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/LandingPage.tsx +61 -26
  118. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/MainInterface.tsx +207 -66
  119. programasweights-0.1.0.dev8/web-app/frontend/src/components/NavigationHelper.tsx +334 -0
  120. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/PrivacyPage.tsx +1 -1
  121. programasweights-0.1.0.dev8/web-app/frontend/src/components/ProfilePage.tsx +268 -0
  122. programasweights-0.1.0.dev8/web-app/frontend/src/components/SettingsPage.tsx +219 -0
  123. programasweights-0.1.0.dev8/web-app/frontend/src/components/SpecSuggestions.tsx +49 -0
  124. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/TermsPage.tsx +1 -1
  125. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/types/index.ts +11 -0
  126. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/utils/api.ts +48 -1
  127. programasweights-0.1.0.dev8/web-app/frontend/test-results/.last-run.json +4 -0
  128. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/nginx-paw.conf +15 -1
  129. programasweights-0.1.0.dev8/web-sdk/.gitignore +3 -0
  130. programasweights-0.1.0.dev8/web-sdk/README.md +117 -0
  131. programasweights-0.1.0.dev8/web-sdk/__tests__/loader.test.ts +110 -0
  132. programasweights-0.1.0.dev8/web-sdk/__tests__/prompt.test.ts +45 -0
  133. programasweights-0.1.0.dev8/web-sdk/examples/basic.html +121 -0
  134. programasweights-0.1.0.dev8/web-sdk/package-lock.json +3034 -0
  135. programasweights-0.1.0.dev8/web-sdk/package.json +57 -0
  136. programasweights-0.1.0.dev8/web-sdk/serve.py +12 -0
  137. programasweights-0.1.0.dev8/web-sdk/src/index.ts +55 -0
  138. programasweights-0.1.0.dev8/web-sdk/src/loader.ts +96 -0
  139. programasweights-0.1.0.dev8/web-sdk/src/runtime.ts +144 -0
  140. programasweights-0.1.0.dev8/web-sdk/src/types.ts +35 -0
  141. programasweights-0.1.0.dev8/web-sdk/test-standalone.html +188 -0
  142. programasweights-0.1.0.dev8/web-sdk/tsconfig.json +22 -0
  143. programasweights-0.1.0.dev8/web-sdk/vitest.config.ts +12 -0
  144. programasweights-0.1.0.dev8/web-sdk/wllama/.git +1 -0
  145. programasweights-0.1.0.dev8/web-sdk/wllama/.github/workflows/build-hf-space.yml +41 -0
  146. programasweights-0.1.0.dev8/web-sdk/wllama/.github/workflows/ci.yml +80 -0
  147. programasweights-0.1.0.dev8/web-sdk/wllama/.github/workflows/generate-docs.yml +63 -0
  148. programasweights-0.1.0.dev8/web-sdk/wllama/.github/workflows/verify-generated-code.yml +37 -0
  149. programasweights-0.1.0.dev8/web-sdk/wllama/.gitignore +16 -0
  150. programasweights-0.1.0.dev8/web-sdk/wllama/.gitmodules +3 -0
  151. programasweights-0.1.0.dev8/web-sdk/wllama/.npmignore +9 -0
  152. programasweights-0.1.0.dev8/web-sdk/wllama/.prettierignore +35 -0
  153. programasweights-0.1.0.dev8/web-sdk/wllama/CMakeLists.txt +23 -0
  154. programasweights-0.1.0.dev8/web-sdk/wllama/LICENCE +21 -0
  155. programasweights-0.1.0.dev8/web-sdk/wllama/README.md +210 -0
  156. programasweights-0.1.0.dev8/web-sdk/wllama/README_banner.png +0 -0
  157. programasweights-0.1.0.dev8/web-sdk/wllama/assets/screenshot_0.png +0 -0
  158. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/actions.hpp +949 -0
  159. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/generate_glue_prototype.js +115 -0
  160. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/glue.hpp +874 -0
  161. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/helpers/wcommon.cpp +580 -0
  162. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/helpers/wcommon.h +561 -0
  163. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/helpers/wlog.cpp +392 -0
  164. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/helpers/wlog.h +102 -0
  165. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/helpers/wsampling.cpp +526 -0
  166. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/helpers/wsampling.h +107 -0
  167. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/test_glue.cpp +80 -0
  168. programasweights-0.1.0.dev8/web-sdk/wllama/cpp/wllama.cpp +194 -0
  169. programasweights-0.1.0.dev8/web-sdk/wllama/examples/basic/index.html +176 -0
  170. programasweights-0.1.0.dev8/web-sdk/wllama/examples/embeddings/index.html +107 -0
  171. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/.eslintrc.cjs +18 -0
  172. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/.gitignore +24 -0
  173. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/README.md +6 -0
  174. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/index.html +13 -0
  175. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/package-lock.json +5800 -0
  176. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/package.json +40 -0
  177. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/postcss.config.js +6 -0
  178. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/public/favicon.ico +0 -0
  179. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/public/wllama.png +0 -0
  180. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/App.tsx +40 -0
  181. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/ChatScreen.tsx +196 -0
  182. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/GuideScreen.tsx +91 -0
  183. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/LogScreen.tsx +26 -0
  184. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/MarkdownMessage.tsx +58 -0
  185. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/ModelScreen.tsx +444 -0
  186. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/Navbar.tsx +27 -0
  187. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/ScreenWrapper.tsx +17 -0
  188. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/components/Sidebar.tsx +119 -0
  189. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/config.ts +96 -0
  190. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/index.css +56 -0
  191. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/main.tsx +11 -0
  192. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/benchmark.ts +116 -0
  193. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/custom-models.tsx +97 -0
  194. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/displayed-model.tsx +90 -0
  195. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/messages.context.tsx +120 -0
  196. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/nl2br.tsx +10 -0
  197. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/types.ts +38 -0
  198. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/use-interval-when.ts +48 -0
  199. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/utils.ts +133 -0
  200. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/utils/wllama.context.tsx +293 -0
  201. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/src/vite-env.d.ts +1 -0
  202. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/tailwind.config.cjs +8 -0
  203. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/tsconfig.app.json +27 -0
  204. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/tsconfig.json +11 -0
  205. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/tsconfig.node.json +13 -0
  206. programasweights-0.1.0.dev8/web-sdk/wllama/examples/main/vite.config.ts +20 -0
  207. programasweights-0.1.0.dev8/web-sdk/wllama/guides/intro-v2.md +132 -0
  208. programasweights-0.1.0.dev8/web-sdk/wllama/index.ts +1 -0
  209. programasweights-0.1.0.dev8/web-sdk/wllama/package-lock.json +7396 -0
  210. programasweights-0.1.0.dev8/web-sdk/wllama/package.json +68 -0
  211. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/build_hf_space.sh +26 -0
  212. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/build_wasm.sh +19 -0
  213. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/build_worker.sh +39 -0
  214. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/docker-compose.yml +53 -0
  215. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/generate_wasm_from_cdn.js +20 -0
  216. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/http_server.js +33 -0
  217. programasweights-0.1.0.dev8/web-sdk/wllama/scripts/post_build.sh +26 -0
  218. programasweights-0.1.0.dev8/web-sdk/wllama/src/cache-manager.ts +392 -0
  219. programasweights-0.1.0.dev8/web-sdk/wllama/src/glue/glue.ts +291 -0
  220. programasweights-0.1.0.dev8/web-sdk/wllama/src/glue/messages.ts +1346 -0
  221. programasweights-0.1.0.dev8/web-sdk/wllama/src/index.ts +4 -0
  222. programasweights-0.1.0.dev8/web-sdk/wllama/src/mjs.test.ts +48 -0
  223. programasweights-0.1.0.dev8/web-sdk/wllama/src/model-manager.test.ts +200 -0
  224. programasweights-0.1.0.dev8/web-sdk/wllama/src/model-manager.ts +324 -0
  225. programasweights-0.1.0.dev8/web-sdk/wllama/src/multi-thread/wllama.js +1 -0
  226. programasweights-0.1.0.dev8/web-sdk/wllama/src/multi-thread/wllama.wasm +0 -0
  227. programasweights-0.1.0.dev8/web-sdk/wllama/src/single-thread/wllama.js +1 -0
  228. programasweights-0.1.0.dev8/web-sdk/wllama/src/single-thread/wllama.wasm +0 -0
  229. programasweights-0.1.0.dev8/web-sdk/wllama/src/utils.test.ts +231 -0
  230. programasweights-0.1.0.dev8/web-sdk/wllama/src/utils.ts +271 -0
  231. programasweights-0.1.0.dev8/web-sdk/wllama/src/wasm-from-cdn.ts +9 -0
  232. programasweights-0.1.0.dev8/web-sdk/wllama/src/wllama.test.ts +402 -0
  233. programasweights-0.1.0.dev8/web-sdk/wllama/src/wllama.ts +1396 -0
  234. programasweights-0.1.0.dev8/web-sdk/wllama/src/worker.ts +298 -0
  235. programasweights-0.1.0.dev8/web-sdk/wllama/src/workers-code/generated.ts +13 -0
  236. programasweights-0.1.0.dev8/web-sdk/wllama/src/workers-code/llama-cpp.js +383 -0
  237. programasweights-0.1.0.dev8/web-sdk/wllama/src/workers-code/opfs-utils.js +141 -0
  238. programasweights-0.1.0.dev8/web-sdk/wllama/tsconfig.build.json +34 -0
  239. programasweights-0.1.0.dev8/web-sdk/wllama/tsup.config.ts +23 -0
  240. programasweights-0.1.0.dev8/web-sdk/wllama/vitest.config.ts +44 -0
  241. programasweights-0.1.0.dev6/.readthedocs.yaml +0 -13
  242. programasweights-0.1.0.dev6/PKG-INFO +0 -127
  243. programasweights-0.1.0.dev6/PYPI_README.md +0 -102
  244. programasweights-0.1.0.dev6/docs/Makefile +0 -20
  245. programasweights-0.1.0.dev6/docs/api-reference.rst +0 -180
  246. programasweights-0.1.0.dev6/docs/conf.py +0 -27
  247. programasweights-0.1.0.dev6/docs/examples/evaluation-tasks.rst +0 -206
  248. programasweights-0.1.0.dev6/docs/index.rst +0 -73
  249. programasweights-0.1.0.dev6/docs/installation.rst +0 -65
  250. programasweights-0.1.0.dev6/docs/make.bat +0 -35
  251. programasweights-0.1.0.dev6/docs/quickstart.rst +0 -120
  252. programasweights-0.1.0.dev6/docs/requirements.txt +0 -3
  253. programasweights-0.1.0.dev6/docs/using-pretrained.rst +0 -223
  254. programasweights-0.1.0.dev6/examples/flask_app.py +0 -48
  255. programasweights-0.1.0.dev6/examples/jupyter_notebook.py +0 -60
  256. programasweights-0.1.0.dev6/examples/langchain_integration.py +0 -103
  257. programasweights-0.1.0.dev6/examples/replace_openai.py +0 -72
  258. programasweights-0.1.0.dev6/programasweights/__init__.py +0 -175
  259. programasweights-0.1.0.dev6/programasweights/cli.py +0 -136
  260. programasweights-0.1.0.dev6/programasweights/runtime_llamacpp.py +0 -126
  261. programasweights-0.1.0.dev6/server/api/main.py +0 -125
  262. programasweights-0.1.0.dev6/server/api/models/__init__.py +0 -0
  263. programasweights-0.1.0.dev6/server/api/routes/__init__.py +0 -0
  264. programasweights-0.1.0.dev6/server/api/routes/compile.py +0 -223
  265. programasweights-0.1.0.dev6/server/api/routes/infer.py +0 -87
  266. programasweights-0.1.0.dev6/server/api/routes/models_info.py +0 -24
  267. programasweights-0.1.0.dev6/server/api/routes/programs.py +0 -378
  268. programasweights-0.1.0.dev6/server/api/services/__init__.py +0 -0
  269. programasweights-0.1.0.dev6/server/api/services/storage_service.py +0 -114
  270. programasweights-0.1.0.dev6/server/benchmarks/last_stress_results.json +0 -92
  271. programasweights-0.1.0.dev6/server/tests/__init__.py +0 -0
  272. programasweights-0.1.0.dev6/server/tests/test_rate_limit.py +0 -59
  273. programasweights-0.1.0.dev6/server/vllm_models/__init__.py +0 -0
  274. programasweights-0.1.0.dev6/web-app/frontend/src/components/AutoTestSection.tsx +0 -537
  275. programasweights-0.1.0.dev6/web-app/frontend/src/components/CollapsibleExamples.tsx +0 -160
  276. programasweights-0.1.0.dev6/web-app/frontend/src/components/CopyCodeSection.tsx +0 -316
  277. programasweights-0.1.0.dev6/web-app/frontend/src/components/DocsPage.tsx +0 -294
  278. programasweights-0.1.0.dev6/web-app/frontend/src/components/ExampleRow/ExampleRowEditor.tsx +0 -169
  279. programasweights-0.1.0.dev6/web-app/frontend/src/components/HubPage.tsx +0 -180
  280. programasweights-0.1.0.dev6/web-app/frontend/src/components/HubProgramPage.tsx +0 -237
  281. programasweights-0.1.0.dev6/web-app/frontend/src/components/ImageUpload.tsx +0 -206
  282. programasweights-0.1.0.dev6/web-app/frontend/src/components/InputBlocks/ImageBlock.tsx +0 -153
  283. programasweights-0.1.0.dev6/web-app/frontend/src/components/InputBlocks/InputBlockList.tsx +0 -151
  284. programasweights-0.1.0.dev6/web-app/frontend/src/components/InputBlocks/TextBlock.tsx +0 -80
  285. programasweights-0.1.0.dev6/web-app/frontend/src/components/LeaderboardPage.tsx +0 -354
  286. programasweights-0.1.0.dev6/web-app/frontend/src/components/MultiImageUpload.tsx +0 -210
  287. programasweights-0.1.0.dev6/web-app/frontend/src/components/PricingPage.tsx +0 -192
  288. programasweights-0.1.0.dev6/web-app/frontend/src/components/ProfilePage.tsx +0 -102
  289. programasweights-0.1.0.dev6/web-app/frontend/src/components/ProgramDetailPage.tsx +0 -449
  290. programasweights-0.1.0.dev6/web-app/frontend/src/components/PublishProgramPage.tsx +0 -494
  291. programasweights-0.1.0.dev6/web-app/frontend/src/components/SpecInput.tsx +0 -499
  292. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/.gitignore +0 -0
  293. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/.hatch_build.toml +0 -0
  294. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/1apple.jpg +0 -0
  295. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/1apple2.jpg +0 -0
  296. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/2apples.jpg +0 -0
  297. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/2apples2.jpg +0 -0
  298. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/3apples.jpg +0 -0
  299. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/3apples2.jpg +0 -0
  300. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/479400.png +0 -0
  301. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/4apples.jpg +0 -0
  302. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/4apples2.jpg +0 -0
  303. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/4apples3.jpg +0 -0
  304. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/4apples4.jpg +0 -0
  305. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/5apples.jpg +0 -0
  306. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/6apples.jpg +0 -0
  307. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/8apples.jpg +0 -0
  308. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/9apples.jpg +0 -0
  309. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/FLOW_SUMMARY.md +0 -0
  310. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/MANIFEST.in +0 -0
  311. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/ONNX_MIGRATION_PLAN.md +0 -0
  312. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/PREFIX_TOKENS_DESIGN.md +0 -0
  313. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/README.md +0 -0
  314. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/TRUNCATION_CHANGES.md +0 -0
  315. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/USE_CASES_AND_IDEAS.md +0 -0
  316. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/VERIFICATION_USAGE.md +0 -0
  317. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/analyze_dataset.py +0 -0
  318. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/analyze_lengths.py +0 -0
  319. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/code_prompt.md +0 -0
  320. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/evaluate_openai_python_code_baseline.py +0 -0
  321. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/openai_batch_request.py +0 -0
  322. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/prepare_alchemist_data.py +0 -0
  323. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/prepare_var_bench_data.py +0 -0
  324. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/python_code_sandbox.py +0 -0
  325. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/script_evaluation_var_bench.sh +0 -0
  326. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/script_evalution_evaluation.sh +0 -0
  327. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/script_evalution_request.sh +0 -0
  328. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/baselines/script_evalution_statistics.sh +0 -0
  329. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/benchmark_pytorch_vs_onnx.py +0 -0
  330. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/benchmark_user_experience.py +0 -0
  331. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/check_dataset.py +0 -0
  332. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/combine_datasets.py +0 -0
  333. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/compare_datasets.py +0 -0
  334. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/compare_old_vs_regen.py +0 -0
  335. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/convert_paw_to_svg.py +0 -0
  336. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/create_favicon_sizes.py +0 -0
  337. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/create_visualization_from_log.py +0 -0
  338. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/create_vqa_dataset.py +0 -0
  339. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/debug_cache.py +0 -0
  340. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/debug_eos_example.sh +0 -0
  341. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/adr/001-llama-cpp-over-pytorch.md +0 -0
  342. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/adr/002-q4_0-adapter-format.md +0 -0
  343. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/adr/003-single-spec-field.md +0 -0
  344. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/adr/004-compiler-naming.md +0 -0
  345. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/adr/005-vllm-hidden-states.md +0 -0
  346. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/adr/006-email-api-key-auth.md +0 -0
  347. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/docs/architecture.md +0 -0
  348. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/estimate_data_gen_cost.py +0 -0
  349. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/eval.py +0 -0
  350. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/export_to_onnx.py +0 -0
  351. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/extract_models.py +0 -0
  352. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/inspect_data_dirs.py +0 -0
  353. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/latest_export.csv +0 -0
  354. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/log.train.81920.morecategories.extraprefix +0 -0
  355. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/main_no_spec_direct_ans_mix_continuous_sampleref_shorterprompt_vllm.py +0 -0
  356. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/merge_datasets.py +0 -0
  357. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/paw.png +0 -0
  358. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/paw.svg +0 -0
  359. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/process_im2latex_dataset.py +0 -0
  360. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/artifacts.py +0 -0
  361. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/compiler/__init__.py +0 -0
  362. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/compiler/dummy.py +0 -0
  363. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/config.py +0 -0
  364. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/convert_peft_to_paw.py +0 -0
  365. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/paw_format.py +0 -0
  366. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/runtime/__init__.py +0 -0
  367. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights/runtime/interpreter.py +0 -0
  368. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/__init__.py +0 -0
  369. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/compiler/__init__.py +0 -0
  370. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/lora_format.py +0 -0
  371. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/runtime/__init__.py +0 -0
  372. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/tests/test_compile_and_run.py +0 -0
  373. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/tests/test_lora_format.py +0 -0
  374. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/tests/test_training.py +0 -0
  375. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/train_lora.py +0 -0
  376. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/training/__init__.py +0 -0
  377. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/programasweights_lora/training/loops/lora_tuning_sft.py +0 -0
  378. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/run_eval.sh +0 -0
  379. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/run_training.sh +0 -0
  380. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/scripts/filter_table_by_length.py +0 -0
  381. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/.env.example +0 -0
  382. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/alembic/env.py +0 -0
  383. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/alembic/script.py.mako +0 -0
  384. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/alembic/versions/001_initial_schema.py +0 -0
  385. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/alembic/versions/002_namespaced_aliases_hf_url.py +0 -0
  386. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/alembic.ini +0 -0
  387. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/logging_config.py +0 -0
  388. {programasweights-0.1.0.dev6/server/api → programasweights-0.1.0.dev8/server/api/middleware}/__init__.py +0 -0
  389. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/models/database.py +0 -0
  390. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/routes/health.py +0 -0
  391. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/api/services/infer_service.py +0 -0
  392. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/benchmarks/benchmark_api.py +0 -0
  393. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/benchmarks/handcrafted_specs.json +0 -0
  394. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/requirements.txt +0 -0
  395. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/scripts/cleanup_storage.py +0 -0
  396. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/conftest.py +0 -0
  397. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/test_auth.py +0 -0
  398. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/test_compile.py +0 -0
  399. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/test_errors.py +0 -0
  400. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/test_infer.py +0 -0
  401. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/tests/test_integration_gpu.py +0 -0
  402. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/vllm_models/prepare_checkpoint.py +0 -0
  403. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/server/vllm_models/register.py +0 -0
  404. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.rollout_ppl.png +0 -0
  405. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.em_es.png +0 -0
  406. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.ppl.png +0 -0
  407. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.reward.png +0 -0
  408. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_all_caching.py +0 -0
  409. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_apple_count.py +0 -0
  410. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_batch_pilot.py +0 -0
  411. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_compile.py +0 -0
  412. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_e2e.py +0 -0
  413. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_execute.py +0 -0
  414. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_one_vs_two_step.py +0 -0
  415. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_onnx_correctness.py +0 -0
  416. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_onnx_hf_model.py +0 -0
  417. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_onnx_hf_with_images.py +0 -0
  418. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_paw_format.py +0 -0
  419. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/test_thinking_comparison.py +0 -0
  420. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/tests/test_programasweights.py +0 -0
  421. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/train.py +0 -0
  422. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/train_no_spec_direct_ans_mix_continuous_sampleref_trainonly_shorterprompt_withregularizer_generate_lora.py +0 -0
  423. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/README.md +0 -0
  424. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/__init__.py +0 -0
  425. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/DATASET_CHANGELOG.md +0 -0
  426. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/README.md +0 -0
  427. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/VERIFICATION_PIPELINE.md +0 -0
  428. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/dry_run_batch.py +0 -0
  429. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/filter_test_data.py +0 -0
  430. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/generate_specs.py +0 -0
  431. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/generate_specs_batch.py +0 -0
  432. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/incremental_merge.py +0 -0
  433. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/merge_and_upload.py +0 -0
  434. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/regenerate_outputs_batch.py +0 -0
  435. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/synthesize_data.py +0 -0
  436. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/synthesize_data_batch.py +0 -0
  437. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/filter_system.txt +0 -0
  438. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/filter_user.txt +0 -0
  439. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/pairs_system.txt +0 -0
  440. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/pairs_user.txt +0 -0
  441. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/specs_system.txt +0 -0
  442. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/specs_user.txt +0 -0
  443. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/specs_user_freeform.txt +0 -0
  444. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/specs_user_freeform_with_examples.txt +0 -0
  445. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/specs_user_with_examples.txt +0 -0
  446. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/verify_system.txt +0 -0
  447. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates/verify_user.txt +0 -0
  448. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/filter_system.txt +0 -0
  449. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/filter_user.txt +0 -0
  450. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/pairs_system.txt +0 -0
  451. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/pairs_user.txt +0 -0
  452. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/specs_system.txt +0 -0
  453. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/specs_user.txt +0 -0
  454. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/specs_user_freeform.txt +0 -0
  455. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/specs_user_freeform_with_examples.txt +0 -0
  456. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/specs_user_with_examples.txt +0 -0
  457. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/verify_system.txt +0 -0
  458. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/templates_old/verify_user.txt +0 -0
  459. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/data_generation/verify_test_data.py +0 -0
  460. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/datasets/__init__.py +0 -0
  461. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/datasets/jsonl_text_pairs.py +0 -0
  462. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/loops/__init__.py +0 -0
  463. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/training/loops/prefix_tuning_sft.py +0 -0
  464. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/ttt.py +0 -0
  465. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/upload_model.py +0 -0
  466. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/upload_onnx_to_huggingface.py +0 -0
  467. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/upload_onnx_to_huggingface_with_token.py +0 -0
  468. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/utils.py +0 -0
  469. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/README.md +0 -0
  470. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/__init__.py +0 -0
  471. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/config.py +0 -0
  472. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/main.py +0 -0
  473. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/middleware/__init__.py +0 -0
  474. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/middleware/rate_limit.py +0 -0
  475. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/models.py +0 -0
  476. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/__init__.py +0 -0
  477. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/auth_service.py +0 -0
  478. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/case_service.py +0 -0
  479. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/compiler_service.py +0 -0
  480. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/gpt_service.py +0 -0
  481. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/hub_service.py +0 -0
  482. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/image_service.py +0 -0
  483. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/interpreter_service.py +0 -0
  484. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/services/sql_manager.py +0 -0
  485. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/templates/gpt_test_generation.txt +0 -0
  486. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/utils/__init__.py +0 -0
  487. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/utils/image_placeholders.py +0 -0
  488. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/app/utils/program_hash.py +0 -0
  489. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/clear_db.sh +0 -0
  490. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/clear_tables.sql +0 -0
  491. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/data/programs.db +0 -0
  492. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/env_example.txt +0 -0
  493. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/example_images/README.md +0 -0
  494. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/get_data_examples.py +0 -0
  495. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/requirements.txt +0 -0
  496. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/run_server.py +0 -0
  497. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_analytics_tables.sql +0 -0
  498. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_auth_tables.sql +0 -0
  499. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_cache_tables.sql +0 -0
  500. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_cases_tables.sql +0 -0
  501. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_database.sql +0 -0
  502. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_database_simple.sql +0 -0
  503. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_db.sh +0 -0
  504. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_example_images.py +0 -0
  505. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/setup_hub_tables.sql +0 -0
  506. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/backend/test_compilation_cache.py +0 -0
  507. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/README.md +0 -0
  508. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/eslint.config.js +0 -0
  509. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/index.html +0 -0
  510. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/postcss.config.js +0 -0
  511. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/apple-touch-icon.png +0 -0
  512. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/favicon-16x16.png +0 -0
  513. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/favicon-32x32.png +0 -0
  514. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/paw-192.png +0 -0
  515. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/paw-512.png +0 -0
  516. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/paw.svg +0 -0
  517. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/react-test.html +0 -0
  518. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/test.html +0 -0
  519. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/public/vite.svg +0 -0
  520. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/App.css +0 -0
  521. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/assets/react.svg +0 -0
  522. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/CompileButtonWithConfig.tsx +0 -0
  523. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/CompileSection.tsx +0 -0
  524. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/ExamplesInput.tsx +0 -0
  525. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/HubUploadPage.tsx +0 -0
  526. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/ModelSelector.tsx +0 -0
  527. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/components/TestSection.tsx +0 -0
  528. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/index.css +0 -0
  529. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/src/main.tsx +0 -0
  530. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/tailwind.config.js +0 -0
  531. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/tsconfig.app.json +0 -0
  532. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/tsconfig.json +0 -0
  533. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/tsconfig.node.json +0 -0
  534. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/frontend/vite.config.ts +0 -0
  535. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/nginx.conf +0 -0
  536. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/setup_mysql.sh +0 -0
  537. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/start.sh +0 -0
  538. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/test_setup.py +0 -0
  539. {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev8}/web-app/ttt.py +0 -0
@@ -0,0 +1,106 @@
1
+ ---
2
+ description: vLLM deployment rules and known issues for PAW servers
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # vLLM Deployment Rules
7
+
8
+ ## Server: 31.22.104.226 (4x RTX PRO 6000 Blackwell, 98 GB each)
9
+
10
+ ### Code Location
11
+
12
+ All server code lives at `/root/paw-website/` (git clone of `programasweights/website`).
13
+
14
+ **Deployment (the ONLY way to update code):**
15
+ ```bash
16
+ # Local: push changes
17
+ git push origin main
18
+
19
+ # Server: pull and restart
20
+ cd /root/paw-website && git pull
21
+ cd server && bash scripts/start_all.sh
22
+ ```
23
+
24
+ **NEVER use rsync or scp for code.** Model weights use scp between servers.
25
+
26
+ ### GPU Layout
27
+
28
+ | GPU | Service | Port | VRAM |
29
+ |-----|---------|------|------|
30
+ | 0 | Pseudo-gen (Qwen3-4B) | 8001 | 90% |
31
+ | 1 | Qwen3 compiler pooling (4B) | 8002 | 85% |
32
+ | 2 | GPT-2 compiler pooling (4B) | 8012 | 85% |
33
+ | 3 | Qwen3 inference (0.6B) + GPT-2 inference (124M) | 8003 + 8013 | 50% + 40% |
34
+
35
+ GPU 3 services must start sequentially: GPT-2 first (smaller, faster), then Qwen3 after GPT-2 claims its VRAM.
36
+
37
+ ### Services
38
+
39
+ | Service | Port | Working Dir |
40
+ |---------|------|-------------|
41
+ | vLLM pseudo-gen | 8001 | - |
42
+ | vLLM Qwen3 compiler | 8002 | /root/paw-website/server |
43
+ | vLLM GPT-2 compiler | 8012 | /root/paw-website/server |
44
+ | vLLM Qwen3 inference | 8003 | - |
45
+ | vLLM GPT-2 inference | 8013 | - |
46
+ | Qwen3 CompileProvider | 9000 | /root/paw-website/server |
47
+ | GPT-2 CompileProvider | 9001 | /root/paw-website/server |
48
+ | API gateway | 8000 | /root/paw-website/server |
49
+
50
+ ### Startup
51
+
52
+ ```bash
53
+ cd /root/paw-website/server
54
+ bash scripts/start_all.sh # starts everything, waits for models to load
55
+ ```
56
+
57
+ Or for full redeploy (git pull + patch + start):
58
+ ```bash
59
+ cd /root/paw-website
60
+ bash server/scripts/restart.sh
61
+ ```
62
+
63
+ ### Key Files
64
+
65
+ - `.env`: `/root/paw-website/server/.env` (secrets, NOT in git)
66
+ - Provider configs: `server/provider_configs/qwen3-0.6b.json`, `server/provider_configs/gpt2.json`
67
+ - Compiler registry: `server/compiler_registry.json`
68
+ - vLLM launchers: `server/scripts/launch_qwen3_compiler.py`, `server/scripts/launch_gpt2_compiler.py`
69
+ - Patch script: `server/scripts/patch_vllm.sh` (run after every pip install vllm)
70
+
71
+ ## Critical Environment Variables
72
+
73
+ ### VLLM_ALLOW_RUNTIME_LORA_UPDATING=1
74
+ MUST be set for inference servers with --enable-lora.
75
+
76
+ ### VLLM_TORCH_COMPILE_LEVEL=0
77
+ Set on servers without full CUDA dev toolchain.
78
+
79
+ ## vLLM Compiler Pooling (PawCompilerForPooling)
80
+
81
+ - Must use `--enforce-eager` flag
82
+ - Must use `--runner pooling` flag
83
+ - Must run `scripts/patch_vllm.sh` after every vLLM install
84
+ - Endpoint: `POST /v1/embeddings`
85
+ - Launcher scripts use `if __name__ == '__main__'` guard for multiprocessing
86
+
87
+ ## Post-Install Patch
88
+
89
+ ```bash
90
+ cd /root/paw-website/server && bash scripts/patch_vllm.sh /root/paw-venv
91
+ ```
92
+
93
+ ## GPT-2 Specifics
94
+
95
+ - Interpreter uses NO chat template (use_chat_template: false)
96
+ - Compiler port: 8012 (NOT 8002 which is Qwen3)
97
+ - Inference port: 8013 (NOT 8003 which is Qwen3)
98
+
99
+ ## Testing
100
+
101
+ Full benchmark: 12 specs, 36 examples, expected 30/36 (83.3%) for Qwen3
102
+ ```bash
103
+ cd /root/paw-website/server
104
+ python benchmarks/benchmark_api.py --server https://programasweights.com
105
+ python benchmarks/stress_test.py --server https://programasweights.com --scenario all
106
+ ```
@@ -0,0 +1 @@
1
+ gitdir: ../.git/modules/programasweights
@@ -0,0 +1,51 @@
1
+ name: Web SDK CI
2
+
3
+ on:
4
+ push:
5
+ paths: ['web-sdk/**']
6
+ pull_request:
7
+ paths: ['web-sdk/**']
8
+
9
+ jobs:
10
+ lint-and-test:
11
+ runs-on: ubuntu-latest
12
+ defaults:
13
+ run:
14
+ working-directory: web-sdk
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ submodules: recursive
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: 20
22
+ cache: npm
23
+ cache-dependency-path: web-sdk/package-lock.json
24
+ - run: npm ci
25
+ - run: npm run typecheck
26
+ - run: npm test
27
+ - run: npm run build
28
+
29
+ publish:
30
+ if: startsWith(github.ref, 'refs/tags/web-sdk-v')
31
+ needs: [lint-and-test]
32
+ runs-on: ubuntu-latest
33
+ defaults:
34
+ run:
35
+ working-directory: web-sdk
36
+ permissions:
37
+ contents: read
38
+ id-token: write
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ with:
42
+ submodules: recursive
43
+ - uses: actions/setup-node@v4
44
+ with:
45
+ node-version: 20
46
+ registry-url: https://registry.npmjs.org
47
+ - run: npm ci
48
+ - run: npm run build
49
+ - run: npm publish --access public --provenance
50
+ env:
51
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,3 @@
1
+ [submodule "web-sdk/wllama"]
2
+ path = web-sdk/wllama
3
+ url = git@github.com:programasweights/wllama.git
@@ -0,0 +1,13 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.12"
7
+
8
+ mkdocs:
9
+ configuration: mkdocs.yml
10
+
11
+ python:
12
+ install:
13
+ - requirements: docs/requirements.txt
@@ -0,0 +1,127 @@
1
+ # ProgramAsWeights (PAW)
2
+
3
+ PAW compiles natural language specifications into tiny neural functions that run locally. Use it when you need fuzzy text processing — classification, extraction, format repair, search, triage — that regex can't handle but a full LLM is overkill for.
4
+
5
+ Website: https://programasweights.com
6
+ Docs: https://programasweights.readthedocs.io
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ pip install --pre programasweights
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```python
17
+ import programasweights as paw
18
+
19
+ # Use a pre-compiled function (downloads once, runs locally forever)
20
+ fn = paw.function("email-triage")
21
+ fn("Urgent: server is down!") # "immediate"
22
+ fn("Newsletter: spring picnic") # "wait"
23
+
24
+ # Compile your own from a description
25
+ program = paw.compile(
26
+ "Fix malformed JSON: repair missing quotes and trailing commas",
27
+ compiler="paw-4b-qwen3-0.6b", # or "paw-4b-gpt2" for smaller/faster
28
+ slug="json-fixer" # optional: creates da03/json-fixer handle
29
+ )
30
+ fn = paw.function(program.slug) # or paw.function(program.id)
31
+ fn("{name: 'Alice',}") # '{"name": "Alice"}'
32
+ ```
33
+
34
+ ## Two Compilers
35
+
36
+ | | Standard (Qwen3 0.6B) | Compact (GPT-2 124M) |
37
+ |---|---|---|
38
+ | Compiler name | `paw-4b-qwen3-0.6b` | `paw-4b-gpt2` |
39
+ | Accuracy | Higher | Lower |
40
+ | Base model size | 594 MB | 105 MB |
41
+ | Program size | ~22 MB | ~5 MB |
42
+ | Inference speed | ~90ms (server) | ~50ms (server) |
43
+ | Runs in browser | No | Yes |
44
+
45
+ Default is Standard (Qwen3 0.6B). Use Compact (GPT-2) when you need smaller files or browser deployment.
46
+
47
+ ## Browser / JavaScript SDK
48
+
49
+ Programs compiled with GPT-2 also run entirely in the browser via WebAssembly — no server needed. Users' data never leaves their device.
50
+
51
+ ```bash
52
+ npm install @programasweights/web
53
+ ```
54
+
55
+ ```javascript
56
+ import paw from '@programasweights/web';
57
+
58
+ const fn = await paw.function('programasweights/email-triage');
59
+ const result = await fn('Urgent: server is down!');
60
+ // result: "immediate"
61
+ ```
62
+
63
+ Use this when you want to offload all computation to the user's browser: zero server costs, zero API keys, full data privacy. The 105 MB base model downloads once and is cached.
64
+
65
+ ## When to Use PAW
66
+
67
+ - **Fuzzy search** — typo-tolerant matching, semantic search, near-duplicate detection
68
+ - **Format repair** — fix broken JSON, normalize dates, repair malformed inputs
69
+ - **Classification** — sentiment, urgency, categories defined in your own words
70
+ - **Extraction** — emails, names, dates from messy unstructured text
71
+ - **Log triage** — extract errors from verbose output, filter noise
72
+ - **Intent routing** — map user descriptions to the closest URL, menu item, or setting
73
+ - **Agent preprocessing** — parse tool calls, validate outputs, route tasks
74
+
75
+ ## Authentication
76
+
77
+ ```bash
78
+ # Option 1: environment variable (recommended)
79
+ export PAW_API_KEY=paw_sk_...
80
+
81
+ # Option 2: CLI login (opens browser to generate key)
82
+ paw login
83
+ ```
84
+
85
+ Generate API keys at https://programasweights.com/settings
86
+
87
+ The SDK automatically reads `PAW_API_KEY` from the environment. Authenticated users get higher rate limits (60 compiles/hr vs 5 for anonymous).
88
+
89
+ ## Program Naming
90
+
91
+ Programs have an immutable hash ID (e.g. `a6b454023d41ac9ca845`). Authenticated
92
+ users can optionally assign a slug at compile time to create a human-readable
93
+ handle like `da03/json-fixer`. Both forms work everywhere:
94
+
95
+ ```python
96
+ fn = paw.function("da03/json-fixer") # by slug
97
+ fn = paw.function("a6b454023d41ac9ca845") # by hash
98
+ ```
99
+
100
+ ## CLI
101
+
102
+ ```bash
103
+ paw compile --spec "Classify sentiment" --slug "my-classifier" --json
104
+ paw run --program "da03/my-classifier" --input "I love this!" --json
105
+ paw rename <program> <new-slug> # rename a program's slug
106
+ paw info <program> # show program metadata
107
+ paw login # save API key
108
+ ```
109
+
110
+ `--json` gives structured output for programmatic use.
111
+
112
+ ## API
113
+
114
+ ```python
115
+ paw.compile(spec, slug="my-fn") # Compile with optional slug
116
+ paw.function(name_or_id) # Load by slug or hash
117
+ paw.login() # Save API key
118
+ ```
119
+
120
+ ## Browse Programs
121
+
122
+ https://programasweights.com/hub
123
+
124
+ ## Add PAW to Your Project
125
+
126
+ Copy this file into your project as AGENTS.md:
127
+ https://programasweights.com/agents
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: programasweights
3
+ Version: 0.1.0.dev8
4
+ Summary: Compile natural language specifications into neural programs that run locally via llama.cpp.
5
+ Project-URL: Homepage, https://programasweights.com
6
+ Project-URL: Repository, https://github.com/programasweights/programasweights-python
7
+ Project-URL: Documentation, https://programasweights.readthedocs.io
8
+ Project-URL: Bug Tracker, https://github.com/programasweights/programasweights-python/issues
9
+ Author-email: ProgramAsWeights <support@programasweights.com>
10
+ License: MIT
11
+ Keywords: inference,llama-cpp,lora,neural-programs,nlp
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
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 :: Libraries :: Python Modules
23
+ Requires-Python: >=3.9
24
+ Requires-Dist: httpx<1.0,>=0.27.0
25
+ Requires-Dist: llama-cpp-python<1.0,>=0.3.0
26
+ Provides-Extra: test
27
+ Requires-Dist: pytest; extra == 'test'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # ProgramAsWeights
31
+
32
+ **Compile natural language specs into tiny neural functions that run locally.**
33
+
34
+ Define what a function should do in plain English. PAW compiles it into a small neural program that runs on your machine — no API keys at runtime, no internet needed after setup, fully deterministic.
35
+
36
+ ## Install
37
+
38
+ ```bash
39
+ pip install programasweights
40
+ ```
41
+
42
+ ## Quick Start
43
+
44
+ ```python
45
+ import programasweights as paw
46
+
47
+ # Use a pre-compiled function (downloads once, runs locally forever)
48
+ fn = paw.function("email-triage")
49
+ fn("Urgent: the server is down!") # "immediate"
50
+ fn("Newsletter: spring picnic") # "wait"
51
+
52
+ # Compile your own from a description
53
+ program = paw.compile(
54
+ "Fix malformed JSON: repair missing quotes and trailing commas",
55
+ compiler="paw-4b-qwen3-0.6b" # or "paw-4b-gpt2" for smaller/faster
56
+ )
57
+ fn = paw.function(program.id)
58
+ fn("{name: 'Alice',}") # '{"name": "Alice"}'
59
+ ```
60
+
61
+ ## Two Compilers
62
+
63
+ | | Standard (Qwen3 0.6B) | Compact (GPT-2 124M) |
64
+ |--------------------|-------------------------|------------------------|
65
+ | Compiler name | `paw-4b-qwen3-0.6b` | `paw-4b-gpt2` |
66
+ | Accuracy | Higher | Lower |
67
+ | Base model size | 594 MB | 105 MB |
68
+ | Program size | ~22 MB | ~5 MB |
69
+ | Inference speed | ~90ms (server) | ~50ms (server) |
70
+ | Runs in browser | No | Yes |
71
+
72
+ Default is Standard (Qwen3 0.6B). Use Compact (GPT-2) when you need smaller files or browser deployment.
73
+
74
+ ## Browser SDK
75
+
76
+ Programs compiled with GPT-2 also run entirely in the browser via WebAssembly — no server needed, data never leaves the user's device.
77
+
78
+ ```bash
79
+ npm install @programasweights/web
80
+ ```
81
+
82
+ ```javascript
83
+ import paw from '@programasweights/web';
84
+
85
+ const fn = await paw.function('programasweights/email-triage');
86
+ const result = await fn('Urgent: the server is down!');
87
+ // result: "immediate"
88
+ ```
89
+
90
+ See the [browser SDK repo](https://github.com/programasweights/programasweights-js) for full documentation.
91
+
92
+ ## Use with AI Agents
93
+
94
+ PAW works with Cursor, Claude, Codex, and other AI coding assistants. Paste this into your agent's chat:
95
+
96
+ > I want to use ProgramAsWeights (PAW) to create fuzzy text functions that run locally. Read the instructions at https://programasweights.com/agents and help me integrate it.
97
+
98
+ Or save [`AGENTS.md`](https://programasweights.com/agents) to your project root — agents read it automatically.
99
+
100
+ ## When to Use PAW
101
+
102
+ - **Fuzzy search** — typo-tolerant matching, semantic search, near-duplicate detection
103
+ - **Format repair** — fix broken JSON, normalize dates, repair malformed inputs
104
+ - **Classification** — sentiment, urgency, categories defined in your own words
105
+ - **Extraction** — emails, names, dates from messy unstructured text
106
+ - **Log triage** — extract errors from verbose output, filter noise
107
+ - **Intent routing** — map user descriptions to the closest URL, menu item, or setting
108
+ - **Agent preprocessing** — parse tool calls, validate outputs, route tasks
109
+
110
+ ## Authentication
111
+
112
+ ```bash
113
+ # Option 1: environment variable (recommended)
114
+ export PAW_API_KEY=paw_sk_...
115
+
116
+ # Option 2: CLI login (opens browser to generate key)
117
+ paw login
118
+ ```
119
+
120
+ Generate API keys at [programasweights.com/settings](https://programasweights.com/settings). Authenticated users get higher rate limits.
121
+
122
+ ## CLI
123
+
124
+ ```bash
125
+ paw compile --spec "Extract error lines from logs" --json
126
+ paw run --program <program_id> --input "[ERROR] timeout" --json
127
+ paw login
128
+ ```
129
+
130
+ `--json` gives structured output for programmatic use.
131
+
132
+ ## Links
133
+
134
+ - **Website**: [programasweights.com](https://programasweights.com)
135
+ - **Documentation**: [programasweights.readthedocs.io](https://programasweights.readthedocs.io)
136
+ - **Python SDK**: [github.com/programasweights/programasweights-python](https://github.com/programasweights/programasweights-python)
137
+ - **Browser SDK**: [github.com/programasweights/programasweights-js](https://github.com/programasweights/programasweights-js)
138
+ - **Program Hub**: [programasweights.com/hub](https://programasweights.com/hub)
139
+
140
+ ## License
141
+
142
+ MIT
@@ -0,0 +1,113 @@
1
+ # ProgramAsWeights
2
+
3
+ **Compile natural language specs into tiny neural functions that run locally.**
4
+
5
+ Define what a function should do in plain English. PAW compiles it into a small neural program that runs on your machine — no API keys at runtime, no internet needed after setup, fully deterministic.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install programasweights
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```python
16
+ import programasweights as paw
17
+
18
+ # Use a pre-compiled function (downloads once, runs locally forever)
19
+ fn = paw.function("email-triage")
20
+ fn("Urgent: the server is down!") # "immediate"
21
+ fn("Newsletter: spring picnic") # "wait"
22
+
23
+ # Compile your own from a description
24
+ program = paw.compile(
25
+ "Fix malformed JSON: repair missing quotes and trailing commas",
26
+ compiler="paw-4b-qwen3-0.6b" # or "paw-4b-gpt2" for smaller/faster
27
+ )
28
+ fn = paw.function(program.id)
29
+ fn("{name: 'Alice',}") # '{"name": "Alice"}'
30
+ ```
31
+
32
+ ## Two Compilers
33
+
34
+ | | Standard (Qwen3 0.6B) | Compact (GPT-2 124M) |
35
+ |--------------------|-------------------------|------------------------|
36
+ | Compiler name | `paw-4b-qwen3-0.6b` | `paw-4b-gpt2` |
37
+ | Accuracy | Higher | Lower |
38
+ | Base model size | 594 MB | 105 MB |
39
+ | Program size | ~22 MB | ~5 MB |
40
+ | Inference speed | ~90ms (server) | ~50ms (server) |
41
+ | Runs in browser | No | Yes |
42
+
43
+ Default is Standard (Qwen3 0.6B). Use Compact (GPT-2) when you need smaller files or browser deployment.
44
+
45
+ ## Browser SDK
46
+
47
+ Programs compiled with GPT-2 also run entirely in the browser via WebAssembly — no server needed, data never leaves the user's device.
48
+
49
+ ```bash
50
+ npm install @programasweights/web
51
+ ```
52
+
53
+ ```javascript
54
+ import paw from '@programasweights/web';
55
+
56
+ const fn = await paw.function('programasweights/email-triage');
57
+ const result = await fn('Urgent: the server is down!');
58
+ // result: "immediate"
59
+ ```
60
+
61
+ See the [browser SDK repo](https://github.com/programasweights/programasweights-js) for full documentation.
62
+
63
+ ## Use with AI Agents
64
+
65
+ PAW works with Cursor, Claude, Codex, and other AI coding assistants. Paste this into your agent's chat:
66
+
67
+ > I want to use ProgramAsWeights (PAW) to create fuzzy text functions that run locally. Read the instructions at https://programasweights.com/agents and help me integrate it.
68
+
69
+ Or save [`AGENTS.md`](https://programasweights.com/agents) to your project root — agents read it automatically.
70
+
71
+ ## When to Use PAW
72
+
73
+ - **Fuzzy search** — typo-tolerant matching, semantic search, near-duplicate detection
74
+ - **Format repair** — fix broken JSON, normalize dates, repair malformed inputs
75
+ - **Classification** — sentiment, urgency, categories defined in your own words
76
+ - **Extraction** — emails, names, dates from messy unstructured text
77
+ - **Log triage** — extract errors from verbose output, filter noise
78
+ - **Intent routing** — map user descriptions to the closest URL, menu item, or setting
79
+ - **Agent preprocessing** — parse tool calls, validate outputs, route tasks
80
+
81
+ ## Authentication
82
+
83
+ ```bash
84
+ # Option 1: environment variable (recommended)
85
+ export PAW_API_KEY=paw_sk_...
86
+
87
+ # Option 2: CLI login (opens browser to generate key)
88
+ paw login
89
+ ```
90
+
91
+ Generate API keys at [programasweights.com/settings](https://programasweights.com/settings). Authenticated users get higher rate limits.
92
+
93
+ ## CLI
94
+
95
+ ```bash
96
+ paw compile --spec "Extract error lines from logs" --json
97
+ paw run --program <program_id> --input "[ERROR] timeout" --json
98
+ paw login
99
+ ```
100
+
101
+ `--json` gives structured output for programmatic use.
102
+
103
+ ## Links
104
+
105
+ - **Website**: [programasweights.com](https://programasweights.com)
106
+ - **Documentation**: [programasweights.readthedocs.io](https://programasweights.readthedocs.io)
107
+ - **Python SDK**: [github.com/programasweights/programasweights-python](https://github.com/programasweights/programasweights-python)
108
+ - **Browser SDK**: [github.com/programasweights/programasweights-js](https://github.com/programasweights/programasweights-js)
109
+ - **Program Hub**: [programasweights.com/hub](https://programasweights.com/hub)
110
+
111
+ ## License
112
+
113
+ MIT
@@ -0,0 +1,66 @@
1
+ # Architecture Decision Records
2
+
3
+ Concise records of major technical choices. Full ADR files may live elsewhere in the repository; this page is the canonical summary for documentation.
4
+
5
+ ---
6
+
7
+ ## ADR 001: llama.cpp instead of PyTorch for the SDK runtime
8
+
9
+ **Decision:** Ship local inference via **llama-cpp-python** (llama.cpp), not a PyTorch stack.
10
+
11
+ **Context:** A PyTorch install typically exceeds **2 GB** of dependencies. llama.cpp bindings add on the order of **80 MB**, which keeps the SDK viable as a lightweight dependency.
12
+
13
+ **Consequence:** Adapter weights must be converted to **GGUF** and loaded through the llama.cpp path. Training and server-side tooling may still use PyTorch where needed; the **end-user runtime** is GGUF-centric.
14
+
15
+ ---
16
+
17
+ ## ADR 002: Q4_0 adapter and Q6_K base quantization
18
+
19
+ **Decision:** Use **Q4_0** for adapters and **Q6_K** for the base model in shipped bundles.
20
+
21
+ **Context:** Empirical evaluation on **4096** held-out examples across quantization settings informed the trade-off.
22
+
23
+ **Consequence:**
24
+
25
+ - **Q6_K base** — quality is preserved while the footprint is roughly **60% smaller** than fp16.
26
+ - **Q4_0 adapter** — quality loss is negligible; adapter size drops to about **23 MB** versus **78 MB** for a heavier format at comparable settings in prior experiments.
27
+
28
+ ---
29
+
30
+ ## ADR 003: Single specification field in the API
31
+
32
+ **Decision:** The compile API accepts **one text field** for the specification. There is **no separate “examples” field** in the contract.
33
+
34
+ **Context:** The compiler was trained on specs that naturally embed examples inside the same prose block.
35
+
36
+ **Consequence:** The web UI may offer structured fields for examples or hints, but the client **merges** them into a single string before calling the API.
37
+
38
+ ---
39
+
40
+ ## ADR 004: Two-level compiler naming
41
+
42
+ **Decision:** Expose **pretty aliases** (for example `paw-4b-qwen3-0.6b`) that resolve to **dated snapshots** (for example `paw-4b-qwen3-0.6b-20260325`).
43
+
44
+ **Context:** Mirrors patterns such as OpenAI’s `gpt-4o` mapping to dated model IDs like `gpt-4o-2024-11-20`.
45
+
46
+ **Consequence:** Users get stable marketing names while the platform can roll forward immutable snapshots without breaking references that pin the dated id.
47
+
48
+ ---
49
+
50
+ ## ADR 005: vLLM for GPU services
51
+
52
+ **Decision:** Run **all** GPU-heavy paths (pseudo-program generation, hidden-state extraction / pooling, multi-LoRA inference) on **vLLM** instead of hand-rolled Hugging Face inference loops in production.
53
+
54
+ **Context:** vLLM improves **throughput**, **batching**, and **memory efficiency** for serving and batched extraction workloads.
55
+
56
+ **Consequence:** Operations that might classically be expressed as “run HuggingFace model X” are implemented as vLLM-managed models and schedules in the deployed stack.
57
+
58
+ ---
59
+
60
+ ## ADR 006: GitHub OAuth for authentication
61
+
62
+ **Decision:** Use **GitHub OAuth** rather than email verification or password accounts for primary sign-in.
63
+
64
+ **Context:** The target audience already maintains GitHub accounts; OAuth removes friction for naming programs, voting, and submitting cases.
65
+
66
+ **Consequence:** Identity is tied to GitHub; users without GitHub need an alternative path if one is offered separately.
@@ -0,0 +1,47 @@
1
+ # Architecture
2
+
3
+ This page summarizes how the ProgramAsWeights production system is structured end to end.
4
+
5
+ ## Components
6
+
7
+ | Layer | Technology | Role |
8
+ |--------|------------|------|
9
+ | Frontend | React, Vite | Web UI; static assets served by nginx |
10
+ | API | FastAPI, uvicorn | REST endpoints, orchestration, auth integration |
11
+ | Database | PostgreSQL | Users, programs, aliases, votes, cases, operational logs |
12
+ | GPU services | Three vLLM instances | Pseudo-program generation, compiler (including hidden-state work), inference |
13
+ | Storage | Hugging Face, local disk | `.paw` bundles on Hugging Face; PEFT adapter artifacts on server disk |
14
+ | Auth | GitHub OAuth | Sign-in; session backed by HTTP cookies |
15
+
16
+ ### GPU layout
17
+
18
+ Typical allocation:
19
+
20
+ - **GPU 0** — pseudo-program generation
21
+ - **GPU 1** — compiler workload (including pooling / hidden-state extraction used in the pipeline)
22
+ - **GPU 2** — multi-LoRA inference
23
+
24
+ Exact mapping may vary by deployment; the important split is dedicated vLLM roles per stage.
25
+
26
+ ## Compile pipeline
27
+
28
+ High-level flow:
29
+
30
+ 1. **Pseudo-generation** (vLLM) — turn the natural-language spec into a pseudo-program representation.
31
+ 2. **LoRA extraction** — derive adapter weights from vLLM hidden states / pooling as implemented in the compiler stack.
32
+ 3. **Quantization** — convert adapters to **Q4_0 GGUF** for the bundle format used by the runtime.
33
+ 4. **Bundle** — assemble the **`.paw`** package with metadata and weights.
34
+ 5. **Upload** — publish the `.paw` artifact to Hugging Face for CDN-backed distribution.
35
+
36
+ ## Caching
37
+
38
+ The system uses **two-level caching**:
39
+
40
+ 1. **Pseudo-generation cache** — avoid recomputing pseudo-programs for identical or equivalent spec inputs where the cache key applies.
41
+ 2. **Program-level disk cache** — reuse compiled artifacts and intermediate state on the server when the same content-addressed program is requested again.
42
+
43
+ Together these reduce redundant GPU work and speed up repeat compiles.
44
+
45
+ ## Downloads and the SDK
46
+
47
+ The Python SDK **downloads `.paw` files from the Hugging Face CDN** (or equivalent object storage fronted as a CDN). Programs are **not** served as large binary payloads from the ProgramAsWeights API host, which keeps the API focused on metadata, auth, and orchestration.