programasweights 0.1.1__tar.gz → 0.2.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 (535) hide show
  1. programasweights-0.2.0/.cursor/rules/vllm-deployment.mdc +106 -0
  2. programasweights-0.2.0/.git +1 -0
  3. programasweights-0.2.0/.github/workflows/web-sdk.yml +51 -0
  4. programasweights-0.2.0/.gitignore +76 -0
  5. programasweights-0.2.0/.gitmodules +3 -0
  6. programasweights-0.2.0/.hatch_build.toml +28 -0
  7. programasweights-0.2.0/.readthedocs.yaml +13 -0
  8. programasweights-0.2.0/1apple.jpg +0 -0
  9. programasweights-0.2.0/1apple2.jpg +0 -0
  10. programasweights-0.2.0/2apples.jpg +0 -0
  11. programasweights-0.2.0/2apples2.jpg +0 -0
  12. programasweights-0.2.0/3apples.jpg +0 -0
  13. programasweights-0.2.0/3apples2.jpg +0 -0
  14. programasweights-0.2.0/479400.png +0 -0
  15. programasweights-0.2.0/4apples.jpg +0 -0
  16. programasweights-0.2.0/4apples2.jpg +0 -0
  17. programasweights-0.2.0/4apples3.jpg +0 -0
  18. programasweights-0.2.0/4apples4.jpg +0 -0
  19. programasweights-0.2.0/5apples.jpg +0 -0
  20. programasweights-0.2.0/6apples.jpg +0 -0
  21. programasweights-0.2.0/8apples.jpg +0 -0
  22. programasweights-0.2.0/9apples.jpg +0 -0
  23. programasweights-0.2.0/AGENTS.md +127 -0
  24. programasweights-0.2.0/CHANGELOG.md +13 -0
  25. programasweights-0.2.0/FLOW_SUMMARY.md +202 -0
  26. programasweights-0.2.0/LICENSE +21 -0
  27. {programasweights-0.1.1 → programasweights-0.2.0}/MANIFEST.in +1 -0
  28. programasweights-0.2.0/ONNX_MIGRATION_PLAN.md +84 -0
  29. programasweights-0.2.0/PKG-INFO +144 -0
  30. programasweights-0.2.0/PREFIX_TOKENS_DESIGN.md +176 -0
  31. programasweights-0.2.0/PYPI_README.md +114 -0
  32. {programasweights-0.1.1 → programasweights-0.2.0}/README.md +2 -2
  33. programasweights-0.2.0/TRUNCATION_CHANGES.md +185 -0
  34. programasweights-0.2.0/USE_CASES_AND_IDEAS.md +748 -0
  35. programasweights-0.2.0/VERIFICATION_USAGE.md +282 -0
  36. programasweights-0.2.0/analyze_dataset.py +372 -0
  37. programasweights-0.2.0/analyze_lengths.py +246 -0
  38. programasweights-0.2.0/baselines/code_prompt.md +21 -0
  39. programasweights-0.2.0/baselines/evaluate_openai_python_code_baseline.py +296 -0
  40. programasweights-0.2.0/baselines/openai_batch_request.py +218 -0
  41. programasweights-0.2.0/baselines/prepare_alchemist_data.py +194 -0
  42. programasweights-0.2.0/baselines/prepare_var_bench_data.py +53 -0
  43. programasweights-0.2.0/baselines/python_code_sandbox.py +302 -0
  44. programasweights-0.2.0/baselines/script_evaluation_var_bench.sh +3 -0
  45. programasweights-0.2.0/baselines/script_evalution_evaluation.sh +8 -0
  46. programasweights-0.2.0/baselines/script_evalution_request.sh +8 -0
  47. programasweights-0.2.0/baselines/script_evalution_statistics.sh +8 -0
  48. programasweights-0.2.0/benchmark_pytorch_vs_onnx.py +315 -0
  49. programasweights-0.2.0/benchmark_user_experience.py +375 -0
  50. programasweights-0.2.0/check_dataset.py +31 -0
  51. programasweights-0.2.0/combine_datasets.py +157 -0
  52. programasweights-0.2.0/compare_datasets.py +268 -0
  53. programasweights-0.2.0/compare_old_vs_regen.py +227 -0
  54. programasweights-0.2.0/convert_paw_to_svg.py +119 -0
  55. programasweights-0.2.0/create_favicon_sizes.py +86 -0
  56. programasweights-0.2.0/create_visualization_from_log.py +269 -0
  57. programasweights-0.2.0/create_vqa_dataset.py +217 -0
  58. programasweights-0.2.0/debug_cache.py +80 -0
  59. programasweights-0.2.0/debug_eos_example.sh +22 -0
  60. programasweights-0.2.0/docs/adr/001-llama-cpp-over-pytorch.md +21 -0
  61. programasweights-0.2.0/docs/adr/002-q4_0-adapter-format.md +32 -0
  62. programasweights-0.2.0/docs/adr/003-single-spec-field.md +26 -0
  63. programasweights-0.2.0/docs/adr/004-compiler-naming.md +32 -0
  64. programasweights-0.2.0/docs/adr/005-vllm-hidden-states.md +24 -0
  65. programasweights-0.2.0/docs/adr/006-email-api-key-auth.md +41 -0
  66. programasweights-0.2.0/docs/advanced/adrs.md +66 -0
  67. programasweights-0.2.0/docs/advanced/architecture.md +47 -0
  68. programasweights-0.2.0/docs/api-reference/cli.md +76 -0
  69. programasweights-0.2.0/docs/api-reference/python-sdk.md +75 -0
  70. programasweights-0.2.0/docs/api-reference/rest-api.md +147 -0
  71. programasweights-0.2.0/docs/architecture.md +38 -0
  72. programasweights-0.2.0/docs/getting-started/first-program.md +77 -0
  73. programasweights-0.2.0/docs/getting-started/installation.md +36 -0
  74. programasweights-0.2.0/docs/getting-started/naming-programs.md +78 -0
  75. programasweights-0.2.0/docs/guide/browser-inference.md +139 -0
  76. programasweights-0.2.0/docs/guide/how-it-works.md +47 -0
  77. programasweights-0.2.0/docs/guide/local-inference.md +40 -0
  78. programasweights-0.2.0/docs/guide/writing-good-specs.md +36 -0
  79. programasweights-0.2.0/docs/hub/browsing-programs.md +37 -0
  80. programasweights-0.2.0/docs/hub/feedback-cases.md +34 -0
  81. programasweights-0.2.0/docs/hub/publishing-programs.md +31 -0
  82. programasweights-0.2.0/docs/index.md +82 -0
  83. programasweights-0.2.0/docs/requirements.txt +2 -0
  84. programasweights-0.2.0/estimate_data_gen_cost.py +273 -0
  85. programasweights-0.2.0/eval.py +739 -0
  86. programasweights-0.2.0/examples/flask_app.py +52 -0
  87. programasweights-0.2.0/examples/jupyter_notebook.py +52 -0
  88. programasweights-0.2.0/examples/langchain_integration.py +52 -0
  89. programasweights-0.2.0/examples/replace_openai.py +44 -0
  90. programasweights-0.2.0/export_to_onnx.py +485 -0
  91. programasweights-0.2.0/extract_models.py +193 -0
  92. programasweights-0.2.0/inspect_data_dirs.py +384 -0
  93. programasweights-0.2.0/latest_export.csv +230 -0
  94. programasweights-0.2.0/log.train.81920.morecategories.extraprefix +14928 -0
  95. programasweights-0.2.0/main_no_spec_direct_ans_mix_continuous_sampleref_shorterprompt_vllm.py +1546 -0
  96. programasweights-0.2.0/merge_datasets.py +303 -0
  97. programasweights-0.2.0/mkdocs.yml +81 -0
  98. programasweights-0.2.0/paw.png +0 -0
  99. programasweights-0.2.0/paw.svg +34 -0
  100. programasweights-0.2.0/process_im2latex_dataset.py +207 -0
  101. programasweights-0.2.0/programasweights/__init__.py +185 -0
  102. programasweights-0.2.0/programasweights/cache.py +122 -0
  103. programasweights-0.2.0/programasweights/cli.py +213 -0
  104. programasweights-0.2.0/programasweights/client.py +151 -0
  105. programasweights-0.2.0/programasweights/compiler/__init__.py +263 -0
  106. {programasweights-0.1.1 → programasweights-0.2.0}/programasweights/compiler/dummy.py +6 -2
  107. programasweights-0.2.0/programasweights/config.py +62 -0
  108. programasweights-0.2.0/programasweights/convert_peft_to_paw.py +187 -0
  109. programasweights-0.2.0/programasweights/paw_format.py +330 -0
  110. programasweights-0.2.0/programasweights/runtime/__init__.py +22 -0
  111. programasweights-0.2.0/programasweights/runtime/interpreter.py +485 -0
  112. programasweights-0.2.0/programasweights/runtime/interpreter_onnx.py +534 -0
  113. programasweights-0.2.0/programasweights/runtime_llamacpp.py +199 -0
  114. programasweights-0.2.0/programasweights_lora/__init__.py +28 -0
  115. programasweights-0.2.0/programasweights_lora/compiler/__init__.py +112 -0
  116. programasweights-0.2.0/programasweights_lora/lora_format.py +193 -0
  117. programasweights-0.2.0/programasweights_lora/runtime/__init__.py +6 -0
  118. programasweights-0.2.0/programasweights_lora/runtime/interpreter_lora.py +267 -0
  119. programasweights-0.2.0/programasweights_lora/tests/test_compile_and_run.py +67 -0
  120. programasweights-0.2.0/programasweights_lora/tests/test_lora_format.py +91 -0
  121. programasweights-0.2.0/programasweights_lora/tests/test_training.py +153 -0
  122. programasweights-0.2.0/programasweights_lora/train_lora.py +101 -0
  123. programasweights-0.2.0/programasweights_lora/training/__init__.py +6 -0
  124. programasweights-0.2.0/programasweights_lora/training/loops/lora_tuning_sft.py +655 -0
  125. {programasweights-0.1.1 → programasweights-0.2.0}/pyproject.toml +20 -29
  126. programasweights-0.2.0/run_eval.sh +95 -0
  127. programasweights-0.2.0/run_training.sh +70 -0
  128. programasweights-0.2.0/scripts/filter_table_by_length.py +150 -0
  129. programasweights-0.2.0/server/.env.example +47 -0
  130. programasweights-0.2.0/server/alembic/env.py +48 -0
  131. programasweights-0.2.0/server/alembic/script.py.mako +24 -0
  132. programasweights-0.2.0/server/alembic/versions/001_initial_schema.py +127 -0
  133. programasweights-0.2.0/server/alembic/versions/002_namespaced_aliases_hf_url.py +37 -0
  134. programasweights-0.2.0/server/alembic/versions/003_fulltext_search_ranking.py +41 -0
  135. programasweights-0.2.0/server/alembic/versions/004_fix_alias_slug_constraint.py +49 -0
  136. programasweights-0.2.0/server/alembic.ini +36 -0
  137. programasweights-0.2.0/server/api/__init__.py +1 -0
  138. programasweights-0.2.0/server/api/config.py +76 -0
  139. programasweights-0.2.0/server/api/dependencies.py +63 -0
  140. programasweights-0.2.0/server/api/logging_config.py +74 -0
  141. programasweights-0.2.0/server/api/main.py +233 -0
  142. programasweights-0.2.0/server/api/middleware/__init__.py +0 -0
  143. programasweights-0.2.0/server/api/middleware/rate_limit.py +172 -0
  144. programasweights-0.2.0/server/api/models/__init__.py +1 -0
  145. programasweights-0.2.0/server/api/models/database.py +41 -0
  146. programasweights-0.2.0/server/api/models/orm.py +205 -0
  147. programasweights-0.2.0/server/api/models/schemas.py +224 -0
  148. programasweights-0.2.0/server/api/routes/__init__.py +1 -0
  149. programasweights-0.2.0/server/api/routes/auth.py +275 -0
  150. programasweights-0.2.0/server/api/routes/compile.py +269 -0
  151. programasweights-0.2.0/server/api/routes/feedback.py +45 -0
  152. programasweights-0.2.0/server/api/routes/health.py +24 -0
  153. programasweights-0.2.0/server/api/routes/infer.py +115 -0
  154. programasweights-0.2.0/server/api/routes/models_info.py +17 -0
  155. programasweights-0.2.0/server/api/routes/programs.py +726 -0
  156. programasweights-0.2.0/server/api/services/__init__.py +1 -0
  157. programasweights-0.2.0/server/api/services/auto_tag_service.py +103 -0
  158. programasweights-0.2.0/server/api/services/auto_title_service.py +100 -0
  159. programasweights-0.2.0/server/api/services/compile_provider.py +712 -0
  160. programasweights-0.2.0/server/api/services/compile_service.py +546 -0
  161. programasweights-0.2.0/server/api/services/infer_service.py +263 -0
  162. programasweights-0.2.0/server/api/services/search_service.py +152 -0
  163. programasweights-0.2.0/server/api/services/storage_service.py +239 -0
  164. programasweights-0.2.0/server/benchmarks/benchmark_api.py +301 -0
  165. programasweights-0.2.0/server/benchmarks/handcrafted_specs.json +130 -0
  166. programasweights-0.2.0/server/benchmarks/last_benchmark_results.json +266 -0
  167. programasweights-0.2.0/server/benchmarks/last_stress_results.json +250 -0
  168. programasweights-0.2.0/server/benchmarks/stress_test.py +695 -0
  169. programasweights-0.2.0/server/compiler_registry.json +26 -0
  170. programasweights-0.2.0/server/provider_configs/gpt2.json +17 -0
  171. programasweights-0.2.0/server/provider_configs/qwen3-0.6b.json +16 -0
  172. programasweights-0.2.0/server/requirements.txt +25 -0
  173. programasweights-0.2.0/server/scripts/ab_test_hf_vs_vllm.py +180 -0
  174. programasweights-0.2.0/server/scripts/ablation_search.py +221 -0
  175. programasweights-0.2.0/server/scripts/backfill_hf_browser_assets.py +226 -0
  176. programasweights-0.2.0/server/scripts/backfill_hf_safetensors.py +95 -0
  177. programasweights-0.2.0/server/scripts/backfill_interestingness.py +111 -0
  178. programasweights-0.2.0/server/scripts/backfill_tags.py +76 -0
  179. programasweights-0.2.0/server/scripts/backfill_titles.py +76 -0
  180. programasweights-0.2.0/server/scripts/benchmark_gpt2.py +89 -0
  181. programasweights-0.2.0/server/scripts/cleanup_storage.py +66 -0
  182. programasweights-0.2.0/server/scripts/eval_search.py +211 -0
  183. programasweights-0.2.0/server/scripts/evict_cold_programs.py +40 -0
  184. programasweights-0.2.0/server/scripts/generate_prefix_cache.py +117 -0
  185. programasweights-0.2.0/server/scripts/launch_gpt2_compiler.py +32 -0
  186. programasweights-0.2.0/server/scripts/launch_qwen3_compiler.py +32 -0
  187. programasweights-0.2.0/server/scripts/patch_vllm.sh +65 -0
  188. programasweights-0.2.0/server/scripts/restart.sh +23 -0
  189. programasweights-0.2.0/server/scripts/start_all.sh +193 -0
  190. programasweights-0.2.0/server/scripts/start_gpt2_services.sh +67 -0
  191. programasweights-0.2.0/server/scripts/start_provider.sh +27 -0
  192. programasweights-0.2.0/server/scripts/start_services.sh +86 -0
  193. programasweights-0.2.0/server/tests/__init__.py +1 -0
  194. programasweights-0.2.0/server/tests/conftest.py +86 -0
  195. programasweights-0.2.0/server/tests/test_auth.py +52 -0
  196. programasweights-0.2.0/server/tests/test_compile.py +97 -0
  197. programasweights-0.2.0/server/tests/test_errors.py +60 -0
  198. programasweights-0.2.0/server/tests/test_infer.py +72 -0
  199. programasweights-0.2.0/server/tests/test_integration_gpu.py +183 -0
  200. programasweights-0.2.0/server/tests/test_rate_limit.py +213 -0
  201. programasweights-0.2.0/server/tests/test_storage.py +134 -0
  202. programasweights-0.2.0/server/vllm_models/__init__.py +1 -0
  203. programasweights-0.2.0/server/vllm_models/gpt2_lora_patch.py +34 -0
  204. programasweights-0.2.0/server/vllm_models/paw_compiler.py +414 -0
  205. programasweights-0.2.0/server/vllm_models/prepare_checkpoint.py +143 -0
  206. programasweights-0.2.0/server/vllm_models/register.py +17 -0
  207. programasweights-0.2.0/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.rollout_ppl.png +0 -0
  208. programasweights-0.2.0/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.em_es.png +0 -0
  209. programasweights-0.2.0/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.ppl.png +0 -0
  210. programasweights-0.2.0/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.reward.png +0 -0
  211. {programasweights-0.1.1 → programasweights-0.2.0}/test_1spec.py +1 -1
  212. programasweights-0.2.0/test_all_caching.py +167 -0
  213. programasweights-0.2.0/test_apple_count.py +84 -0
  214. programasweights-0.2.0/test_batch_pilot.py +593 -0
  215. programasweights-0.2.0/test_e2e.py +363 -0
  216. programasweights-0.2.0/test_nspecs.py +18 -0
  217. programasweights-0.2.0/test_one_vs_two_step.py +149 -0
  218. programasweights-0.2.0/test_onnx_correctness.py +430 -0
  219. programasweights-0.2.0/test_onnx_hf_model.py +39 -0
  220. programasweights-0.2.0/test_onnx_hf_with_images.py +158 -0
  221. programasweights-0.2.0/test_paw_format.py +144 -0
  222. programasweights-0.2.0/test_thinking_comparison.py +542 -0
  223. programasweights-0.2.0/tests/test_offline_cache.py +97 -0
  224. programasweights-0.2.0/tests/test_sdk.py +330 -0
  225. programasweights-0.2.0/tests/test_sdk.sh +89 -0
  226. {programasweights-0.1.1 → programasweights-0.2.0}/train.py +60 -12
  227. programasweights-0.2.0/train_no_spec_direct_ans_mix_continuous_sampleref_trainonly_shorterprompt_withregularizer_generate_lora.py +3581 -0
  228. programasweights-0.2.0/training/data_generation/DATASET_CHANGELOG.md +1791 -0
  229. programasweights-0.2.0/training/data_generation/VERIFICATION_PIPELINE.md +259 -0
  230. programasweights-0.2.0/training/data_generation/build_user_bench.py +487 -0
  231. programasweights-0.2.0/training/data_generation/dry_run_batch.py +248 -0
  232. programasweights-0.2.0/training/data_generation/filter_test_data.py +397 -0
  233. programasweights-0.2.0/training/data_generation/generate_specs.py +716 -0
  234. programasweights-0.2.0/training/data_generation/generate_specs_batch.py +368 -0
  235. programasweights-0.2.0/training/data_generation/incremental_merge.py +397 -0
  236. programasweights-0.2.0/training/data_generation/merge_and_upload.py +383 -0
  237. programasweights-0.2.0/training/data_generation/regenerate_outputs_batch.py +522 -0
  238. {programasweights-0.1.1 → programasweights-0.2.0}/training/data_generation/synthesize_data.py +91 -40
  239. programasweights-0.2.0/training/data_generation/synthesize_data_batch.py +389 -0
  240. programasweights-0.2.0/training/data_generation/templates/filter_system.txt +10 -0
  241. programasweights-0.2.0/training/data_generation/templates/filter_user.txt +9 -0
  242. programasweights-0.2.0/training/data_generation/templates/pairs_system.txt +3 -0
  243. programasweights-0.2.0/training/data_generation/templates/pairs_user.txt +14 -0
  244. programasweights-0.2.0/training/data_generation/templates/specs_system.txt +1 -0
  245. programasweights-0.2.0/training/data_generation/templates/specs_user.txt +11 -0
  246. programasweights-0.2.0/training/data_generation/templates/specs_user_freeform.txt +8 -0
  247. programasweights-0.2.0/training/data_generation/templates/specs_user_freeform_with_examples.txt +8 -0
  248. programasweights-0.2.0/training/data_generation/templates/specs_user_with_examples.txt +11 -0
  249. programasweights-0.2.0/training/data_generation/templates/verify_system.txt +10 -0
  250. programasweights-0.2.0/training/data_generation/templates/verify_user.txt +3 -0
  251. programasweights-0.2.0/training/data_generation/templates_old/filter_system.txt +10 -0
  252. programasweights-0.2.0/training/data_generation/templates_old/filter_user.txt +9 -0
  253. {programasweights-0.1.1/training/data_generation/templates → programasweights-0.2.0/training/data_generation/templates_old}/specs_user.txt +1 -1
  254. programasweights-0.2.0/training/data_generation/templates_old/specs_user_freeform.txt +8 -0
  255. programasweights-0.2.0/training/data_generation/templates_old/specs_user_freeform_with_examples.txt +8 -0
  256. programasweights-0.2.0/training/data_generation/templates_old/specs_user_with_examples.txt +10 -0
  257. programasweights-0.2.0/training/data_generation/templates_old/verify_system.txt +10 -0
  258. programasweights-0.2.0/training/data_generation/templates_old/verify_user.txt +3 -0
  259. programasweights-0.2.0/training/data_generation/verify_test_data.py +377 -0
  260. programasweights-0.2.0/training/datasets/jsonl_text_pairs.py +186 -0
  261. programasweights-0.2.0/training/loops/prefix_tuning_sft.py +1297 -0
  262. programasweights-0.2.0/ttt.py +11 -0
  263. programasweights-0.2.0/upload_onnx_to_huggingface.py +242 -0
  264. programasweights-0.2.0/upload_onnx_to_huggingface_with_token.py +264 -0
  265. programasweights-0.2.0/utils.py +100 -0
  266. programasweights-0.2.0/web-app/HANDOFF.md +237 -0
  267. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/README.md +14 -2
  268. programasweights-0.2.0/web-app/backend/app/config.py +71 -0
  269. programasweights-0.2.0/web-app/backend/app/main.py +1463 -0
  270. programasweights-0.2.0/web-app/backend/app/middleware/__init__.py +1 -0
  271. programasweights-0.2.0/web-app/backend/app/middleware/rate_limit.py +58 -0
  272. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/backend/app/models.py +23 -4
  273. programasweights-0.2.0/web-app/backend/app/services/__init__.py +13 -0
  274. programasweights-0.2.0/web-app/backend/app/services/auth_service.py +172 -0
  275. programasweights-0.2.0/web-app/backend/app/services/case_service.py +201 -0
  276. programasweights-0.2.0/web-app/backend/app/services/compiler_service.py +202 -0
  277. programasweights-0.2.0/web-app/backend/app/services/gpt_service.py +166 -0
  278. programasweights-0.2.0/web-app/backend/app/services/hub_service.py +291 -0
  279. programasweights-0.2.0/web-app/backend/app/services/image_service.py +127 -0
  280. programasweights-0.2.0/web-app/backend/app/services/interpreter_service.py +179 -0
  281. programasweights-0.2.0/web-app/backend/app/services/sql_manager.py +1324 -0
  282. programasweights-0.2.0/web-app/backend/app/templates/gpt_test_generation.txt +42 -0
  283. programasweights-0.2.0/web-app/backend/app/utils/__init__.py +1 -0
  284. programasweights-0.2.0/web-app/backend/app/utils/image_placeholders.py +147 -0
  285. programasweights-0.2.0/web-app/backend/app/utils/program_hash.py +211 -0
  286. programasweights-0.2.0/web-app/backend/clear_db.sh +62 -0
  287. programasweights-0.2.0/web-app/backend/clear_tables.sql +29 -0
  288. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/backend/data/programs.db +0 -0
  289. programasweights-0.2.0/web-app/backend/env_example.txt +24 -0
  290. programasweights-0.2.0/web-app/backend/example_images/README.md +140 -0
  291. programasweights-0.2.0/web-app/backend/get_data_examples.py +55 -0
  292. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/backend/requirements.txt +3 -0
  293. programasweights-0.2.0/web-app/backend/setup_analytics_tables.sql +16 -0
  294. programasweights-0.2.0/web-app/backend/setup_auth_tables.sql +30 -0
  295. programasweights-0.2.0/web-app/backend/setup_cache_tables.sql +73 -0
  296. programasweights-0.2.0/web-app/backend/setup_cases_tables.sql +36 -0
  297. programasweights-0.2.0/web-app/backend/setup_database.sql +248 -0
  298. programasweights-0.2.0/web-app/backend/setup_database_simple.sql +113 -0
  299. programasweights-0.2.0/web-app/backend/setup_db.sh +52 -0
  300. programasweights-0.2.0/web-app/backend/setup_example_images.py +166 -0
  301. programasweights-0.2.0/web-app/backend/setup_hub_tables.sql +74 -0
  302. programasweights-0.2.0/web-app/backend/test_compilation_cache.py +85 -0
  303. programasweights-0.2.0/web-app/frontend/e2e/full.spec.ts +798 -0
  304. programasweights-0.2.0/web-app/frontend/e2e/helpers.ts +14 -0
  305. programasweights-0.2.0/web-app/frontend/e2e/smoke.spec.ts +117 -0
  306. programasweights-0.2.0/web-app/frontend/index.html +39 -0
  307. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/package-lock.json +100 -0
  308. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/package.json +6 -1
  309. programasweights-0.2.0/web-app/frontend/playwright.config.ts +17 -0
  310. programasweights-0.2.0/web-app/frontend/public/apple-touch-icon.png +0 -0
  311. programasweights-0.2.0/web-app/frontend/public/browser-worker.html +142 -0
  312. programasweights-0.2.0/web-app/frontend/public/favicon-16x16.png +0 -0
  313. programasweights-0.2.0/web-app/frontend/public/favicon-32x32.png +0 -0
  314. programasweights-0.2.0/web-app/frontend/public/paw-192.png +0 -0
  315. programasweights-0.2.0/web-app/frontend/public/paw-512.png +0 -0
  316. programasweights-0.2.0/web-app/frontend/public/paw.svg +34 -0
  317. programasweights-0.2.0/web-app/frontend/scripts/deploy.sh +43 -0
  318. programasweights-0.2.0/web-app/frontend/src/App.tsx +77 -0
  319. programasweights-0.2.0/web-app/frontend/src/components/AboutPage.tsx +208 -0
  320. programasweights-0.2.0/web-app/frontend/src/components/AgentsPage.tsx +170 -0
  321. programasweights-0.2.0/web-app/frontend/src/components/AuthorPage.tsx +123 -0
  322. programasweights-0.2.0/web-app/frontend/src/components/BrowserPage.tsx +564 -0
  323. programasweights-0.2.0/web-app/frontend/src/components/CasesSection.tsx +192 -0
  324. programasweights-0.2.0/web-app/frontend/src/components/CompileButtonWithConfig.tsx +115 -0
  325. programasweights-0.2.0/web-app/frontend/src/components/DocsPage.tsx +496 -0
  326. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/components/ExamplesInput.tsx +2 -2
  327. programasweights-0.2.0/web-app/frontend/src/components/Footer.tsx +86 -0
  328. programasweights-0.2.0/web-app/frontend/src/components/Header.tsx +173 -0
  329. programasweights-0.2.0/web-app/frontend/src/components/HubPage.tsx +351 -0
  330. programasweights-0.2.0/web-app/frontend/src/components/HubProgramPage.tsx +417 -0
  331. programasweights-0.2.0/web-app/frontend/src/components/HubUploadPage.tsx +14 -0
  332. programasweights-0.2.0/web-app/frontend/src/components/LandingPage.tsx +544 -0
  333. programasweights-0.2.0/web-app/frontend/src/components/MainInterface.tsx +624 -0
  334. programasweights-0.2.0/web-app/frontend/src/components/NavigationHelper.tsx +334 -0
  335. programasweights-0.2.0/web-app/frontend/src/components/PrivacyPage.tsx +101 -0
  336. programasweights-0.2.0/web-app/frontend/src/components/ProfilePage.tsx +274 -0
  337. programasweights-0.2.0/web-app/frontend/src/components/SettingsPage.tsx +219 -0
  338. programasweights-0.2.0/web-app/frontend/src/components/SpecSuggestions.tsx +49 -0
  339. programasweights-0.2.0/web-app/frontend/src/components/TermsPage.tsx +101 -0
  340. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/index.css +9 -4
  341. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/main.tsx +4 -1
  342. programasweights-0.2.0/web-app/frontend/src/types/index.ts +204 -0
  343. programasweights-0.2.0/web-app/frontend/src/utils/api.ts +225 -0
  344. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/tailwind.config.js +18 -1
  345. programasweights-0.2.0/web-app/frontend/test-results/.last-run.json +4 -0
  346. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/vite.config.ts +3 -0
  347. programasweights-0.2.0/web-app/nginx-paw.conf +56 -0
  348. programasweights-0.2.0/web-app/nginx.conf +111 -0
  349. programasweights-0.2.0/web-app/setup_mysql.sh +145 -0
  350. programasweights-0.2.0/web-app/ttt.py +26 -0
  351. programasweights-0.2.0/web-sdk/.gitignore +3 -0
  352. programasweights-0.2.0/web-sdk/README.md +117 -0
  353. programasweights-0.2.0/web-sdk/__tests__/loader.test.ts +110 -0
  354. programasweights-0.2.0/web-sdk/__tests__/prompt.test.ts +45 -0
  355. programasweights-0.2.0/web-sdk/examples/basic.html +121 -0
  356. programasweights-0.2.0/web-sdk/package-lock.json +3034 -0
  357. programasweights-0.2.0/web-sdk/package.json +57 -0
  358. programasweights-0.2.0/web-sdk/serve.py +12 -0
  359. programasweights-0.2.0/web-sdk/src/index.ts +55 -0
  360. programasweights-0.2.0/web-sdk/src/loader.ts +96 -0
  361. programasweights-0.2.0/web-sdk/src/runtime.ts +144 -0
  362. programasweights-0.2.0/web-sdk/src/types.ts +35 -0
  363. programasweights-0.2.0/web-sdk/test-standalone.html +188 -0
  364. programasweights-0.2.0/web-sdk/tsconfig.json +22 -0
  365. programasweights-0.2.0/web-sdk/vitest.config.ts +12 -0
  366. programasweights-0.2.0/web-sdk/wllama/.git +1 -0
  367. programasweights-0.2.0/web-sdk/wllama/.github/workflows/build-hf-space.yml +41 -0
  368. programasweights-0.2.0/web-sdk/wllama/.github/workflows/ci.yml +80 -0
  369. programasweights-0.2.0/web-sdk/wllama/.github/workflows/generate-docs.yml +63 -0
  370. programasweights-0.2.0/web-sdk/wllama/.github/workflows/verify-generated-code.yml +37 -0
  371. programasweights-0.2.0/web-sdk/wllama/.gitignore +16 -0
  372. programasweights-0.2.0/web-sdk/wllama/.gitmodules +3 -0
  373. programasweights-0.2.0/web-sdk/wllama/.npmignore +9 -0
  374. programasweights-0.2.0/web-sdk/wllama/.prettierignore +35 -0
  375. programasweights-0.2.0/web-sdk/wllama/CMakeLists.txt +23 -0
  376. programasweights-0.2.0/web-sdk/wllama/LICENCE +21 -0
  377. programasweights-0.2.0/web-sdk/wllama/README.md +210 -0
  378. programasweights-0.2.0/web-sdk/wllama/README_banner.png +0 -0
  379. programasweights-0.2.0/web-sdk/wllama/assets/screenshot_0.png +0 -0
  380. programasweights-0.2.0/web-sdk/wllama/cpp/actions.hpp +949 -0
  381. programasweights-0.2.0/web-sdk/wllama/cpp/generate_glue_prototype.js +115 -0
  382. programasweights-0.2.0/web-sdk/wllama/cpp/glue.hpp +874 -0
  383. programasweights-0.2.0/web-sdk/wllama/cpp/helpers/wcommon.cpp +580 -0
  384. programasweights-0.2.0/web-sdk/wllama/cpp/helpers/wcommon.h +561 -0
  385. programasweights-0.2.0/web-sdk/wllama/cpp/helpers/wlog.cpp +392 -0
  386. programasweights-0.2.0/web-sdk/wllama/cpp/helpers/wlog.h +102 -0
  387. programasweights-0.2.0/web-sdk/wllama/cpp/helpers/wsampling.cpp +526 -0
  388. programasweights-0.2.0/web-sdk/wllama/cpp/helpers/wsampling.h +107 -0
  389. programasweights-0.2.0/web-sdk/wllama/cpp/test_glue.cpp +80 -0
  390. programasweights-0.2.0/web-sdk/wllama/cpp/wllama.cpp +194 -0
  391. programasweights-0.2.0/web-sdk/wllama/examples/basic/index.html +176 -0
  392. programasweights-0.2.0/web-sdk/wllama/examples/embeddings/index.html +107 -0
  393. programasweights-0.2.0/web-sdk/wllama/examples/main/.eslintrc.cjs +18 -0
  394. programasweights-0.2.0/web-sdk/wllama/examples/main/.gitignore +24 -0
  395. programasweights-0.2.0/web-sdk/wllama/examples/main/README.md +6 -0
  396. {programasweights-0.1.1/web-app/frontend → programasweights-0.2.0/web-sdk/wllama/examples/main}/index.html +2 -2
  397. programasweights-0.2.0/web-sdk/wllama/examples/main/package-lock.json +5800 -0
  398. programasweights-0.2.0/web-sdk/wllama/examples/main/package.json +40 -0
  399. programasweights-0.2.0/web-sdk/wllama/examples/main/postcss.config.js +6 -0
  400. programasweights-0.2.0/web-sdk/wllama/examples/main/public/favicon.ico +0 -0
  401. programasweights-0.2.0/web-sdk/wllama/examples/main/public/wllama.png +0 -0
  402. programasweights-0.2.0/web-sdk/wllama/examples/main/src/App.tsx +40 -0
  403. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/ChatScreen.tsx +196 -0
  404. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/GuideScreen.tsx +91 -0
  405. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/LogScreen.tsx +26 -0
  406. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/MarkdownMessage.tsx +58 -0
  407. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/ModelScreen.tsx +444 -0
  408. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/Navbar.tsx +27 -0
  409. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/ScreenWrapper.tsx +17 -0
  410. programasweights-0.2.0/web-sdk/wllama/examples/main/src/components/Sidebar.tsx +119 -0
  411. programasweights-0.2.0/web-sdk/wllama/examples/main/src/config.ts +96 -0
  412. programasweights-0.2.0/web-sdk/wllama/examples/main/src/index.css +56 -0
  413. programasweights-0.2.0/web-sdk/wllama/examples/main/src/main.tsx +11 -0
  414. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/benchmark.ts +116 -0
  415. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/custom-models.tsx +97 -0
  416. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/displayed-model.tsx +90 -0
  417. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/messages.context.tsx +120 -0
  418. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/nl2br.tsx +10 -0
  419. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/types.ts +38 -0
  420. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/use-interval-when.ts +48 -0
  421. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/utils.ts +133 -0
  422. programasweights-0.2.0/web-sdk/wllama/examples/main/src/utils/wllama.context.tsx +293 -0
  423. programasweights-0.2.0/web-sdk/wllama/examples/main/src/vite-env.d.ts +1 -0
  424. programasweights-0.2.0/web-sdk/wllama/examples/main/tailwind.config.cjs +8 -0
  425. programasweights-0.2.0/web-sdk/wllama/examples/main/tsconfig.app.json +27 -0
  426. programasweights-0.2.0/web-sdk/wllama/examples/main/tsconfig.json +11 -0
  427. programasweights-0.2.0/web-sdk/wllama/examples/main/tsconfig.node.json +13 -0
  428. programasweights-0.2.0/web-sdk/wllama/examples/main/vite.config.ts +20 -0
  429. programasweights-0.2.0/web-sdk/wllama/guides/intro-v2.md +132 -0
  430. programasweights-0.2.0/web-sdk/wllama/index.ts +1 -0
  431. programasweights-0.2.0/web-sdk/wllama/package-lock.json +7396 -0
  432. programasweights-0.2.0/web-sdk/wllama/package.json +68 -0
  433. programasweights-0.2.0/web-sdk/wllama/scripts/build_hf_space.sh +26 -0
  434. programasweights-0.2.0/web-sdk/wllama/scripts/build_wasm.sh +19 -0
  435. programasweights-0.2.0/web-sdk/wllama/scripts/build_worker.sh +39 -0
  436. programasweights-0.2.0/web-sdk/wllama/scripts/docker-compose.yml +53 -0
  437. programasweights-0.2.0/web-sdk/wllama/scripts/generate_wasm_from_cdn.js +20 -0
  438. programasweights-0.2.0/web-sdk/wllama/scripts/http_server.js +33 -0
  439. programasweights-0.2.0/web-sdk/wllama/scripts/post_build.sh +26 -0
  440. programasweights-0.2.0/web-sdk/wllama/src/cache-manager.ts +392 -0
  441. programasweights-0.2.0/web-sdk/wllama/src/glue/glue.ts +291 -0
  442. programasweights-0.2.0/web-sdk/wllama/src/glue/messages.ts +1346 -0
  443. programasweights-0.2.0/web-sdk/wllama/src/index.ts +4 -0
  444. programasweights-0.2.0/web-sdk/wllama/src/mjs.test.ts +48 -0
  445. programasweights-0.2.0/web-sdk/wllama/src/model-manager.test.ts +200 -0
  446. programasweights-0.2.0/web-sdk/wllama/src/model-manager.ts +324 -0
  447. programasweights-0.2.0/web-sdk/wllama/src/multi-thread/wllama.js +1 -0
  448. programasweights-0.2.0/web-sdk/wllama/src/multi-thread/wllama.wasm +0 -0
  449. programasweights-0.2.0/web-sdk/wllama/src/single-thread/wllama.js +1 -0
  450. programasweights-0.2.0/web-sdk/wllama/src/single-thread/wllama.wasm +0 -0
  451. programasweights-0.2.0/web-sdk/wllama/src/utils.test.ts +231 -0
  452. programasweights-0.2.0/web-sdk/wllama/src/utils.ts +271 -0
  453. programasweights-0.2.0/web-sdk/wllama/src/wasm-from-cdn.ts +9 -0
  454. programasweights-0.2.0/web-sdk/wllama/src/wllama.test.ts +402 -0
  455. programasweights-0.2.0/web-sdk/wllama/src/wllama.ts +1396 -0
  456. programasweights-0.2.0/web-sdk/wllama/src/worker.ts +298 -0
  457. programasweights-0.2.0/web-sdk/wllama/src/workers-code/generated.ts +13 -0
  458. programasweights-0.2.0/web-sdk/wllama/src/workers-code/llama-cpp.js +383 -0
  459. programasweights-0.2.0/web-sdk/wllama/src/workers-code/opfs-utils.js +141 -0
  460. programasweights-0.2.0/web-sdk/wllama/tsconfig.build.json +34 -0
  461. programasweights-0.2.0/web-sdk/wllama/tsup.config.ts +23 -0
  462. programasweights-0.2.0/web-sdk/wllama/vitest.config.ts +44 -0
  463. programasweights-0.1.1/.gitignore +0 -34
  464. programasweights-0.1.1/.readthedocs.yaml +0 -13
  465. programasweights-0.1.1/PKG-INFO +0 -88
  466. programasweights-0.1.1/PYPI_README.md +0 -53
  467. programasweights-0.1.1/docs/Makefile +0 -20
  468. programasweights-0.1.1/docs/api-reference.rst +0 -194
  469. programasweights-0.1.1/docs/conf.py +0 -27
  470. programasweights-0.1.1/docs/index.rst +0 -84
  471. programasweights-0.1.1/docs/installation.rst +0 -95
  472. programasweights-0.1.1/docs/quickstart.rst +0 -165
  473. programasweights-0.1.1/docs/requirements.txt +0 -3
  474. programasweights-0.1.1/docs/using-pretrained.rst +0 -223
  475. programasweights-0.1.1/eval.py +0 -142
  476. programasweights-0.1.1/outputs_1spec/prefix_kv/LATEST +0 -1
  477. programasweights-0.1.1/outputs_1spec/prefix_kv/eval_program/kv_prefix.pt +0 -0
  478. programasweights-0.1.1/outputs_1spec/prefix_kv/eval_program/program.json +0 -5
  479. programasweights-0.1.1/programasweights/__init__.py +0 -6
  480. programasweights-0.1.1/programasweights/compiler/__init__.py +0 -67
  481. programasweights-0.1.1/programasweights/runtime/__init__.py +0 -1
  482. programasweights-0.1.1/programasweights/runtime/interpreter.py +0 -181
  483. programasweights-0.1.1/test_api.py +0 -53
  484. programasweights-0.1.1/tests/test_programasweights.py +0 -239
  485. programasweights-0.1.1/training/data_generation/generate_specs.py +0 -460
  486. programasweights-0.1.1/training/datasets/jsonl_text_pairs.py +0 -29
  487. programasweights-0.1.1/training/loops/prefix_tuning_sft.py +0 -580
  488. programasweights-0.1.1/web-app/backend/app/config.py +0 -59
  489. programasweights-0.1.1/web-app/backend/app/main.py +0 -344
  490. programasweights-0.1.1/web-app/backend/app/services/__init__.py +0 -1
  491. programasweights-0.1.1/web-app/backend/app/services/compiler_service.py +0 -137
  492. programasweights-0.1.1/web-app/backend/app/services/gpt_service.py +0 -129
  493. programasweights-0.1.1/web-app/backend/app/services/interpreter_service.py +0 -133
  494. programasweights-0.1.1/web-app/backend/app/services/program_service.py +0 -268
  495. programasweights-0.1.1/web-app/backend/env_example.txt +0 -11
  496. programasweights-0.1.1/web-app/frontend/src/App.tsx +0 -39
  497. programasweights-0.1.1/web-app/frontend/src/components/AboutPage.tsx +0 -203
  498. programasweights-0.1.1/web-app/frontend/src/components/Header.tsx +0 -64
  499. programasweights-0.1.1/web-app/frontend/src/components/LeaderboardPage.tsx +0 -354
  500. programasweights-0.1.1/web-app/frontend/src/components/MainInterface.tsx +0 -251
  501. programasweights-0.1.1/web-app/frontend/src/components/ProgramDetailPage.tsx +0 -449
  502. programasweights-0.1.1/web-app/frontend/src/components/PublishProgramPage.tsx +0 -495
  503. programasweights-0.1.1/web-app/frontend/src/components/SpecInput.tsx +0 -41
  504. programasweights-0.1.1/web-app/frontend/src/types/index.ts +0 -113
  505. programasweights-0.1.1/web-app/frontend/src/utils/api.ts +0 -87
  506. {programasweights-0.1.1 → programasweights-0.2.0}/programasweights/artifacts.py +0 -0
  507. {programasweights-0.1.1 → programasweights-0.2.0}/test_compile.py +0 -0
  508. {programasweights-0.1.1 → programasweights-0.2.0}/test_execute.py +0 -0
  509. {programasweights-0.1.1 → programasweights-0.2.0}/training/README.md +0 -0
  510. {programasweights-0.1.1 → programasweights-0.2.0}/training/__init__.py +0 -0
  511. {programasweights-0.1.1 → programasweights-0.2.0}/training/data_generation/README.md +0 -0
  512. {programasweights-0.1.1/training/data_generation/templates → programasweights-0.2.0/training/data_generation/templates_old}/pairs_system.txt +0 -0
  513. {programasweights-0.1.1/training/data_generation/templates → programasweights-0.2.0/training/data_generation/templates_old}/pairs_user.txt +0 -0
  514. {programasweights-0.1.1/training/data_generation/templates → programasweights-0.2.0/training/data_generation/templates_old}/specs_system.txt +0 -0
  515. {programasweights-0.1.1 → programasweights-0.2.0}/training/datasets/__init__.py +0 -0
  516. {programasweights-0.1.1 → programasweights-0.2.0}/training/loops/__init__.py +0 -0
  517. {programasweights-0.1.1 → programasweights-0.2.0}/upload_model.py +0 -0
  518. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/backend/app/__init__.py +0 -0
  519. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/backend/run_server.py +0 -0
  520. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/README.md +0 -0
  521. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/eslint.config.js +0 -0
  522. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/postcss.config.js +0 -0
  523. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/public/react-test.html +0 -0
  524. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/public/test.html +0 -0
  525. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/public/vite.svg +0 -0
  526. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/App.css +0 -0
  527. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/assets/react.svg +0 -0
  528. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/components/CompileSection.tsx +0 -0
  529. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/components/ModelSelector.tsx +0 -0
  530. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/src/components/TestSection.tsx +0 -0
  531. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/tsconfig.app.json +0 -0
  532. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/tsconfig.json +0 -0
  533. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/frontend/tsconfig.node.json +0 -0
  534. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/start.sh +0 -0
  535. {programasweights-0.1.1 → programasweights-0.2.0}/web-app/test_setup.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,76 @@
1
+ # Dependencies
2
+ node_modules/
3
+ npm-debug.log*
4
+ yarn-debug.log*
5
+ yarn-error.log*
6
+
7
+ # Build outputs
8
+ dist/
9
+ build/
10
+
11
+ # Cache directories
12
+ .vite/
13
+ .cache/
14
+
15
+ # Python
16
+ __pycache__/
17
+ *.pyc
18
+ *.pyo
19
+ .venv
20
+ .env
21
+
22
+ # System files
23
+ .DS_Store
24
+ Thumbs.db
25
+
26
+ # IDE
27
+ .vscode/
28
+ .idea/
29
+ *.swp
30
+ *.swo
31
+ *.swm
32
+ *.swn
33
+
34
+ # Compiled models and temp files
35
+ web-app/backend/compiled_models/
36
+ web-app/backend/temp/
37
+ web-app/backend/uploads/
38
+ outputs/
39
+ outputs_onnx/
40
+
41
+ # SQLite caches
42
+ cache.sqlite3
43
+ verify_cache.sqlite3
44
+ filter_cache.sqlite3
45
+
46
+ # Training data (large generated files)
47
+ data/batch_gpt52*/
48
+ data/merged_gpt52*/
49
+ data/regen_fuzzy_bench/
50
+ data/dry_run_gpt52/
51
+ data/pilot_test/
52
+ data/vqa_images/
53
+ data/ocr_data/
54
+ *.jsonl
55
+
56
+ # ONNX models
57
+ *.onnx
58
+ *.onnx_data
59
+
60
+ # Compiled neural programs
61
+ *.paw
62
+
63
+ # Log files
64
+ *.log
65
+
66
+ # Handwriting/OCR data
67
+ *.inkml
68
+
69
+ # Private config
70
+ init_private.sh
71
+
72
+ # Playground scratch space
73
+ playground/
74
+
75
+ # Large inspection logs (generated on server)
76
+ inspect_*.txt
@@ -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,28 @@
1
+ [targets.sdist]
2
+ # Explicitly include only the source package folder
3
+ include = ["programasweights"]
4
+
5
+ # Exclude large or non-source folders
6
+ exclude = [
7
+ "outputs",
8
+ "outputs_1spec",
9
+ "outputs_1spec_bak",
10
+ "demo_weights.safetensors",
11
+ "dist",
12
+ "training",
13
+ "web-app",
14
+ "tests",
15
+ "data",
16
+ "__pycache__",
17
+ "*.egg-info",
18
+ "*.pt",
19
+ "*.safetensors",
20
+ "*.sqlite3",
21
+ "eval.py",
22
+ "train.py",
23
+ "upload_model.py",
24
+ "test_*.py",
25
+ ".git",
26
+ ".gitignore",
27
+ ".DS_Store"
28
+ ]
@@ -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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -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 programasweights --extra-index-url https://pypi.programasweights.com/simple/
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,13 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 (2026-04-01)
4
+
5
+ First public release.
6
+
7
+ - Compile natural language specs into neural programs via `paw.compile()`
8
+ - Load and run programs locally via `paw.function()` (llama.cpp backend)
9
+ - HuggingFace-style slug naming: `paw.function("da03/my-classifier")`
10
+ - Offline support: slug cache + program cache, no internet after first use
11
+ - CLI: `paw compile`, `paw run`, `paw info`, `paw rename`, `paw login`
12
+ - Pre-built wheels via pypi.programasweights.com for fast install
13
+ - Privacy enforcement: private programs only accessible by owner
@@ -0,0 +1,202 @@
1
+ # ProgramAsWeights Data Flow Summary
2
+
3
+ ## Overview
4
+
5
+ This document explains how prefix tokens flow through training, compilation, and inference.
6
+
7
+ ## Three Stages
8
+
9
+ ### 1. Training (`train.py` → `training/loops/prefix_tuning_sft.py`)
10
+
11
+ **Purpose**: Learn to map specs to KV caches via prefix tokens
12
+
13
+ ```python
14
+ # Stage: TRAINING
15
+ spec = "Parse (A) (B) (C) into JSON list"
16
+ input = "(A) cat (B) dog"
17
+ output = '["cat", "dog"]'
18
+
19
+ # Flow:
20
+ 1. Add prefix tokens to spec:
21
+ spec_tokens = tokenize(spec) # [tok1, tok2, ..., tokN]
22
+ spec_with_prefix = spec_tokens + [<PREFIX_0>, <PREFIX_1>, ..., <PREFIX_4>]
23
+
24
+ 2. Run through compiler:
25
+ hidden = compiler(spec_with_prefix) # [batch, seq_len, hidden_dim]
26
+
27
+ 3. Extract prefix token hidden states:
28
+ prefix_hiddens = hidden[:, -5:, :] # Last 5 positions
29
+
30
+ 4. Map to KV cache:
31
+ kv_cache = mapper(prefix_hiddens) # [batch, layers, 2, heads, prefix_steps, head_dim]
32
+
33
+ 5. Use KV cache in interpreter:
34
+ logits = interpreter(input_tokens, past_key_values=kv_cache)
35
+
36
+ 6. Compute loss against output:
37
+ loss = cross_entropy(logits, output_tokens)
38
+
39
+ 7. Backprop through entire chain:
40
+ loss.backward() # Updates: compiler embeddings, mapper, (optionally) models
41
+ ```
42
+
43
+ **Saves**:
44
+ - `checkpoint/compiler/` - Compiler model with prefix token embeddings
45
+ - `checkpoint/interpreter/` - Interpreter model
46
+ - `checkpoint/compiler/mapper.pt` - Mapper weights + metadata
47
+
48
+ ---
49
+
50
+ ### 2. Compilation (`eval.py` or `paw.compile()`)
51
+
52
+ **Purpose**: Convert a new spec into a standalone `.paw` file
53
+
54
+ ```python
55
+ # Stage: COMPILATION
56
+ spec = "Extract numbers from text" # New, unseen spec
57
+
58
+ # Flow:
59
+ 1. Load trained model:
60
+ model = JointCompilerInterpreter(
61
+ compiler_model_name="checkpoint/compiler", # Has prefix tokens!
62
+ interpreter_model_name="checkpoint/interpreter",
63
+ prefix_steps=5
64
+ )
65
+ # Note: Tokenizer loaded from checkpoint already has prefix tokens
66
+
67
+ 2. Add prefix tokens to new spec:
68
+ spec_tokens = tokenize(spec)
69
+ spec_with_prefix = spec_tokens + model.prefix_token_ids
70
+
71
+ 3. Run through trained compiler:
72
+ hidden = model.compiler(spec_with_prefix)
73
+
74
+ 4. Extract prefix token hidden states:
75
+ prefix_hiddens = hidden[:, -5:, :]
76
+
77
+ 5. Map to KV cache using trained mapper:
78
+ kv_cache = model.mapper(prefix_hiddens)
79
+
80
+ 6. Save KV cache to .paw file:
81
+ save_paw_program(
82
+ filepath="program.paw",
83
+ kv_layers=kv_cache,
84
+ spec=spec, # For reference only
85
+ base_model="interpreter_model_name",
86
+ prefix_steps=5
87
+ )
88
+ ```
89
+
90
+ **Saves**:
91
+ - `program.paw` - Contains only the KV cache (not the spec with prefix tokens!)
92
+
93
+ ---
94
+
95
+ ### 3. Inference (`paw.function()`)
96
+
97
+ **Purpose**: Run a compiled program on new inputs
98
+
99
+ ```python
100
+ # Stage: INFERENCE
101
+ f = paw.function("program.paw")
102
+ output = f("Extract from: 123 and 456")
103
+
104
+ # Flow:
105
+ 1. Load .paw file:
106
+ kv_cache = load_paw_program("program.paw")
107
+ # kv_cache = precomputed KV prefix from compilation
108
+ # NO spec, NO prefix tokens - just the cache!
109
+
110
+ 2. Tokenize input and add separator:
111
+ input_tokens = tokenize(input) + [<BOS>] # Separator for generation
112
+
113
+ 3. Run through interpreter with KV cache:
114
+ logits = interpreter(input_tokens, past_key_values=kv_cache)
115
+
116
+ 4. Generate output:
117
+ output_tokens = generate(logits, max_new_tokens=128)
118
+ output = detokenize(output_tokens)
119
+ ```
120
+
121
+ **No compilation needed** - the KV cache is already computed and saved!
122
+
123
+ ---
124
+
125
+ ## Key Points
126
+
127
+ ### Prefix Tokens:
128
+ - ✅ **Training**: Added to every spec, embeddings learned
129
+ - ✅ **Compilation**: Added to new spec, uses learned embeddings
130
+ - ❌ **Inference**: NOT used - we use precomputed KV cache
131
+
132
+ ### What Gets Saved:
133
+ - **Training checkpoint**: Compiler (with prefix tokens) + Interpreter + Mapper
134
+ - **.paw file**: Only KV cache (no spec, no prefix tokens)
135
+
136
+ ### Why This Works:
137
+ ```
138
+ Training: spec + prefix_tokens → compiler → hidden → mapper → KV cache
139
+
140
+ Compilation: new_spec + prefix_tokens → trained_compiler → hidden → trained_mapper → KV cache → save to .paw
141
+
142
+ Inference: input → interpreter(past_kv=loaded_from_.paw) → output
143
+ ```
144
+
145
+ The prefix tokens are a **compilation-time mechanism** to create good KV caches. Once compiled, the KV cache is all you need!
146
+
147
+ ---
148
+
149
+ ## Checkpoint Loading
150
+
151
+ When loading from checkpoint during compilation:
152
+
153
+ ```python
154
+ # 1. Create model (loads tokenizer from checkpoint directory)
155
+ model = JointCompilerInterpreter(
156
+ compiler_model_name="checkpoint/compiler", # Directory path
157
+ ...
158
+ )
159
+
160
+ # 2. Tokenizer already has prefix tokens (saved during training)
161
+ # 3. Model detects this and skips adding them again:
162
+ if tokens_already_exist:
163
+ print("Prefix tokens already exist in tokenizer (loaded from checkpoint)")
164
+ num_added = 0
165
+ else:
166
+ # Only happens during initial training
167
+ num_added = tokenizer.add_special_tokens(...)
168
+ compiler.resize_token_embeddings(len(tokenizer))
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Summary Table
174
+
175
+ | Stage | Uses Prefix Tokens? | Uses Compiler? | Uses Interpreter? | Input | Output |
176
+ |-------------|---------------------|----------------|-------------------|----------------------|---------------------|
177
+ | Training | ✅ Yes | ✅ Yes | ✅ Yes | spec, input, output | Updated models |
178
+ | Compilation | ✅ Yes | ✅ Yes | ❌ No | spec | .paw file (KV cache)|
179
+ | Inference | ❌ No | ❌ No | ✅ Yes | input | output |
180
+
181
+ ---
182
+
183
+ ## Example End-to-End
184
+
185
+ ```python
186
+ # 1. TRAINING (once)
187
+ python train.py --train-jsonl data/samples_train.jsonl
188
+ # → Creates checkpoint/ with compiler+interpreter+mapper
189
+
190
+ # 2. COMPILATION (per program)
191
+ import programasweights as paw
192
+ paw.compile("my_parser.paw", spec="Parse (A)(B)(C) format", checkpoint_dir="checkpoint/")
193
+ # → Creates my_parser.paw with KV cache
194
+
195
+ # 3. INFERENCE (many times)
196
+ f = paw.function("my_parser.paw")
197
+ result = f("(A) apple (B) banana (C) cherry")
198
+ print(result) # ["apple", "banana", "cherry"]
199
+ # → Fast! No compilation, just interpreter + cached KV
200
+ ```
201
+
202
+ The magic: **Train once, compile many programs, run them infinitely fast!**
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ProgramAsWeights
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -22,3 +22,4 @@ exclude upload_model.py
22
22
  exclude *.pt
23
23
  exclude *.safetensors
24
24
  exclude *.sqlite3
25
+ exclude outputs/*