programasweights 0.1.0.dev6__tar.gz → 0.1.0.dev7__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.
- programasweights-0.1.0.dev7/.cursor/rules/vllm-deployment.mdc +108 -0
- programasweights-0.1.0.dev7/.git +1 -0
- programasweights-0.1.0.dev7/.github/workflows/web-sdk.yml +51 -0
- programasweights-0.1.0.dev7/.gitmodules +3 -0
- programasweights-0.1.0.dev7/.readthedocs.yaml +13 -0
- programasweights-0.1.0.dev7/AGENTS.md +112 -0
- programasweights-0.1.0.dev7/PKG-INFO +141 -0
- programasweights-0.1.0.dev7/PYPI_README.md +112 -0
- programasweights-0.1.0.dev7/docs/advanced/adrs.md +66 -0
- programasweights-0.1.0.dev7/docs/advanced/architecture.md +47 -0
- programasweights-0.1.0.dev7/docs/api-reference/cli.md +76 -0
- programasweights-0.1.0.dev7/docs/api-reference/python-sdk.md +75 -0
- programasweights-0.1.0.dev7/docs/api-reference/rest-api.md +143 -0
- programasweights-0.1.0.dev7/docs/getting-started/first-program.md +77 -0
- programasweights-0.1.0.dev7/docs/getting-started/installation.md +38 -0
- programasweights-0.1.0.dev7/docs/getting-started/naming-programs.md +52 -0
- programasweights-0.1.0.dev7/docs/guide/browser-inference.md +139 -0
- programasweights-0.1.0.dev7/docs/guide/how-it-works.md +47 -0
- programasweights-0.1.0.dev7/docs/guide/local-inference.md +40 -0
- programasweights-0.1.0.dev7/docs/guide/writing-good-specs.md +36 -0
- programasweights-0.1.0.dev7/docs/hub/browsing-programs.md +37 -0
- programasweights-0.1.0.dev7/docs/hub/feedback-cases.md +34 -0
- programasweights-0.1.0.dev7/docs/hub/publishing-programs.md +31 -0
- programasweights-0.1.0.dev7/docs/index.md +82 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/index.rst +1 -1
- programasweights-0.1.0.dev7/docs/requirements.txt +2 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/using-pretrained.rst +1 -1
- programasweights-0.1.0.dev7/examples/flask_app.py +52 -0
- programasweights-0.1.0.dev7/examples/jupyter_notebook.py +52 -0
- programasweights-0.1.0.dev7/examples/langchain_integration.py +52 -0
- programasweights-0.1.0.dev7/examples/replace_openai.py +44 -0
- programasweights-0.1.0.dev7/mkdocs.yml +81 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/__init__.py +55 -55
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/cache.py +3 -1
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/cli.py +57 -27
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/runtime/interpreter_onnx.py +1 -1
- programasweights-0.1.0.dev7/programasweights/runtime_llamacpp.py +199 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/runtime/interpreter_lora.py +1 -1
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/pyproject.toml +7 -1
- programasweights-0.1.0.dev7/server/api/__init__.py +1 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/config.py +8 -7
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/dependencies.py +20 -4
- programasweights-0.1.0.dev7/server/api/main.py +232 -0
- programasweights-0.1.0.dev7/server/api/middleware/rate_limit.py +172 -0
- programasweights-0.1.0.dev7/server/api/models/__init__.py +1 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/models/schemas.py +3 -0
- programasweights-0.1.0.dev7/server/api/routes/__init__.py +1 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/routes/auth.py +88 -23
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/routes/compile.py +87 -72
- programasweights-0.1.0.dev7/server/api/routes/infer.py +97 -0
- programasweights-0.1.0.dev7/server/api/routes/models_info.py +17 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/routes/programs.py +42 -7
- programasweights-0.1.0.dev7/server/api/services/__init__.py +1 -0
- programasweights-0.1.0.dev7/server/api/services/auto_tag_service.py +103 -0
- programasweights-0.1.0.dev7/server/api/services/auto_title_service.py +100 -0
- programasweights-0.1.0.dev7/server/api/services/compile_provider.py +613 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/services/compile_service.py +80 -25
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/services/storage_service.py +33 -1
- programasweights-0.1.0.dev7/server/compiler_registry.json +26 -0
- programasweights-0.1.0.dev7/server/provider_configs/gpt2.json +16 -0
- programasweights-0.1.0.dev7/server/provider_configs/qwen3-0.6b.json +15 -0
- programasweights-0.1.0.dev7/server/scripts/ab_test_hf_vs_vllm.py +180 -0
- programasweights-0.1.0.dev7/server/scripts/backfill_hf_browser_assets.py +226 -0
- programasweights-0.1.0.dev7/server/scripts/backfill_tags.py +76 -0
- programasweights-0.1.0.dev7/server/scripts/backfill_titles.py +76 -0
- programasweights-0.1.0.dev7/server/scripts/benchmark_gpt2.py +89 -0
- programasweights-0.1.0.dev7/server/scripts/generate_prefix_cache.py +117 -0
- programasweights-0.1.0.dev7/server/scripts/patch_vllm.sh +65 -0
- programasweights-0.1.0.dev7/server/scripts/start_gpt2_services.sh +67 -0
- programasweights-0.1.0.dev7/server/scripts/start_provider.sh +27 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/scripts/start_services.sh +2 -1
- programasweights-0.1.0.dev7/server/tests/__init__.py +1 -0
- programasweights-0.1.0.dev7/server/tests/test_rate_limit.py +213 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/test_storage.py +4 -4
- programasweights-0.1.0.dev7/server/vllm_models/__init__.py +1 -0
- programasweights-0.1.0.dev7/server/vllm_models/gpt2_lora_patch.py +34 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/vllm_models/paw_compiler.py +19 -2
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_1spec.py +1 -1
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_nspecs.py +1 -1
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/HANDOFF.md +1 -1
- programasweights-0.1.0.dev7/web-app/frontend/public/browser-worker.html +142 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/App.tsx +15 -1
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/AboutPage.tsx +1 -1
- programasweights-0.1.0.dev7/web-app/frontend/src/components/AgentsPage.tsx +169 -0
- programasweights-0.1.0.dev7/web-app/frontend/src/components/BrowserPage.tsx +428 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/CasesSection.tsx +5 -1
- programasweights-0.1.0.dev7/web-app/frontend/src/components/DocsPage.tsx +496 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/Footer.tsx +13 -16
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/Header.tsx +12 -2
- programasweights-0.1.0.dev7/web-app/frontend/src/components/HubPage.tsx +305 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/HubProgramPage.tsx +99 -14
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/LandingPage.tsx +52 -16
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/MainInterface.tsx +204 -50
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/PrivacyPage.tsx +1 -1
- programasweights-0.1.0.dev7/web-app/frontend/src/components/SettingsPage.tsx +219 -0
- programasweights-0.1.0.dev7/web-app/frontend/src/components/SpecSuggestions.tsx +49 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/TermsPage.tsx +1 -1
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/types/index.ts +6 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/utils/api.ts +23 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/nginx-paw.conf +15 -1
- programasweights-0.1.0.dev7/web-sdk/.gitignore +3 -0
- programasweights-0.1.0.dev7/web-sdk/README.md +117 -0
- programasweights-0.1.0.dev7/web-sdk/__tests__/loader.test.ts +110 -0
- programasweights-0.1.0.dev7/web-sdk/__tests__/prompt.test.ts +45 -0
- programasweights-0.1.0.dev7/web-sdk/examples/basic.html +121 -0
- programasweights-0.1.0.dev7/web-sdk/package-lock.json +3034 -0
- programasweights-0.1.0.dev7/web-sdk/package.json +57 -0
- programasweights-0.1.0.dev7/web-sdk/serve.py +12 -0
- programasweights-0.1.0.dev7/web-sdk/src/index.ts +54 -0
- programasweights-0.1.0.dev7/web-sdk/src/loader.ts +96 -0
- programasweights-0.1.0.dev7/web-sdk/src/runtime.ts +144 -0
- programasweights-0.1.0.dev7/web-sdk/src/types.ts +35 -0
- programasweights-0.1.0.dev7/web-sdk/test-standalone.html +188 -0
- programasweights-0.1.0.dev7/web-sdk/tsconfig.json +22 -0
- programasweights-0.1.0.dev7/web-sdk/vitest.config.ts +12 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.git +1 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.github/workflows/build-hf-space.yml +41 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.github/workflows/ci.yml +80 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.github/workflows/generate-docs.yml +63 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.github/workflows/verify-generated-code.yml +37 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.gitignore +16 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.gitmodules +3 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.npmignore +9 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/.prettierignore +35 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/CMakeLists.txt +23 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/LICENCE +21 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/README.md +210 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/README_banner.png +0 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/assets/screenshot_0.png +0 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/actions.hpp +949 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/generate_glue_prototype.js +115 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/glue.hpp +874 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/helpers/wcommon.cpp +580 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/helpers/wcommon.h +561 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/helpers/wlog.cpp +392 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/helpers/wlog.h +102 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/helpers/wsampling.cpp +526 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/helpers/wsampling.h +107 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/test_glue.cpp +80 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/cpp/wllama.cpp +194 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/basic/index.html +176 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/embeddings/index.html +107 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/.eslintrc.cjs +18 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/.gitignore +24 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/README.md +6 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/index.html +13 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/package-lock.json +5800 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/package.json +40 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/postcss.config.js +6 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/public/favicon.ico +0 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/public/wllama.png +0 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/App.tsx +40 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/ChatScreen.tsx +196 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/GuideScreen.tsx +91 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/LogScreen.tsx +26 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/MarkdownMessage.tsx +58 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/ModelScreen.tsx +444 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/Navbar.tsx +27 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/ScreenWrapper.tsx +17 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/components/Sidebar.tsx +119 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/config.ts +96 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/index.css +56 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/main.tsx +11 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/benchmark.ts +116 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/custom-models.tsx +97 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/displayed-model.tsx +90 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/messages.context.tsx +120 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/nl2br.tsx +10 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/types.ts +38 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/use-interval-when.ts +48 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/utils.ts +133 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/utils/wllama.context.tsx +293 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/src/vite-env.d.ts +1 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/tailwind.config.cjs +8 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/tsconfig.app.json +27 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/tsconfig.json +11 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/tsconfig.node.json +13 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/examples/main/vite.config.ts +20 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/guides/intro-v2.md +132 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/index.ts +1 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/package-lock.json +7396 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/package.json +68 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/build_hf_space.sh +26 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/build_wasm.sh +19 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/build_worker.sh +39 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/docker-compose.yml +53 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/generate_wasm_from_cdn.js +20 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/http_server.js +33 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/scripts/post_build.sh +26 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/cache-manager.ts +392 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/glue/glue.ts +291 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/glue/messages.ts +1346 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/index.ts +4 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/mjs.test.ts +48 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/model-manager.test.ts +200 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/model-manager.ts +324 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/multi-thread/wllama.js +1 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/multi-thread/wllama.wasm +0 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/single-thread/wllama.js +1 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/single-thread/wllama.wasm +0 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/utils.test.ts +231 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/utils.ts +271 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/wasm-from-cdn.ts +9 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/wllama.test.ts +402 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/wllama.ts +1396 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/worker.ts +298 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/workers-code/generated.ts +13 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/workers-code/llama-cpp.js +383 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/src/workers-code/opfs-utils.js +141 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/tsconfig.build.json +34 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/tsup.config.ts +23 -0
- programasweights-0.1.0.dev7/web-sdk/wllama/vitest.config.ts +44 -0
- programasweights-0.1.0.dev6/.readthedocs.yaml +0 -13
- programasweights-0.1.0.dev6/PKG-INFO +0 -127
- programasweights-0.1.0.dev6/PYPI_README.md +0 -102
- programasweights-0.1.0.dev6/docs/requirements.txt +0 -3
- programasweights-0.1.0.dev6/examples/flask_app.py +0 -48
- programasweights-0.1.0.dev6/examples/jupyter_notebook.py +0 -60
- programasweights-0.1.0.dev6/examples/langchain_integration.py +0 -103
- programasweights-0.1.0.dev6/examples/replace_openai.py +0 -72
- programasweights-0.1.0.dev6/programasweights/runtime_llamacpp.py +0 -126
- programasweights-0.1.0.dev6/server/api/main.py +0 -125
- programasweights-0.1.0.dev6/server/api/models/__init__.py +0 -0
- programasweights-0.1.0.dev6/server/api/routes/__init__.py +0 -0
- programasweights-0.1.0.dev6/server/api/routes/infer.py +0 -87
- programasweights-0.1.0.dev6/server/api/routes/models_info.py +0 -24
- programasweights-0.1.0.dev6/server/api/services/__init__.py +0 -0
- programasweights-0.1.0.dev6/server/tests/__init__.py +0 -0
- programasweights-0.1.0.dev6/server/tests/test_rate_limit.py +0 -59
- programasweights-0.1.0.dev6/server/vllm_models/__init__.py +0 -0
- programasweights-0.1.0.dev6/web-app/frontend/src/components/AutoTestSection.tsx +0 -537
- programasweights-0.1.0.dev6/web-app/frontend/src/components/CollapsibleExamples.tsx +0 -160
- programasweights-0.1.0.dev6/web-app/frontend/src/components/CopyCodeSection.tsx +0 -316
- programasweights-0.1.0.dev6/web-app/frontend/src/components/DocsPage.tsx +0 -294
- programasweights-0.1.0.dev6/web-app/frontend/src/components/ExampleRow/ExampleRowEditor.tsx +0 -169
- programasweights-0.1.0.dev6/web-app/frontend/src/components/HubPage.tsx +0 -180
- programasweights-0.1.0.dev6/web-app/frontend/src/components/ImageUpload.tsx +0 -206
- programasweights-0.1.0.dev6/web-app/frontend/src/components/InputBlocks/ImageBlock.tsx +0 -153
- programasweights-0.1.0.dev6/web-app/frontend/src/components/InputBlocks/InputBlockList.tsx +0 -151
- programasweights-0.1.0.dev6/web-app/frontend/src/components/InputBlocks/TextBlock.tsx +0 -80
- programasweights-0.1.0.dev6/web-app/frontend/src/components/LeaderboardPage.tsx +0 -354
- programasweights-0.1.0.dev6/web-app/frontend/src/components/MultiImageUpload.tsx +0 -210
- programasweights-0.1.0.dev6/web-app/frontend/src/components/ProgramDetailPage.tsx +0 -449
- programasweights-0.1.0.dev6/web-app/frontend/src/components/PublishProgramPage.tsx +0 -494
- programasweights-0.1.0.dev6/web-app/frontend/src/components/SpecInput.tsx +0 -499
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/.gitignore +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/.hatch_build.toml +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/1apple.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/1apple2.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/2apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/2apples2.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/3apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/3apples2.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/479400.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/4apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/4apples2.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/4apples3.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/4apples4.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/5apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/6apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/8apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/9apples.jpg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/FLOW_SUMMARY.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/MANIFEST.in +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/ONNX_MIGRATION_PLAN.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/PREFIX_TOKENS_DESIGN.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/README.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/TRUNCATION_CHANGES.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/USE_CASES_AND_IDEAS.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/VERIFICATION_USAGE.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/analyze_dataset.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/analyze_lengths.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/code_prompt.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/evaluate_openai_python_code_baseline.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/openai_batch_request.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/prepare_alchemist_data.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/prepare_var_bench_data.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/python_code_sandbox.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/script_evaluation_var_bench.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/script_evalution_evaluation.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/script_evalution_request.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/baselines/script_evalution_statistics.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/benchmark_pytorch_vs_onnx.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/benchmark_user_experience.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/check_dataset.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/combine_datasets.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/compare_datasets.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/compare_old_vs_regen.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/convert_paw_to_svg.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/create_favicon_sizes.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/create_visualization_from_log.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/create_vqa_dataset.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/debug_cache.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/debug_eos_example.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/Makefile +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/adr/001-llama-cpp-over-pytorch.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/adr/002-q4_0-adapter-format.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/adr/003-single-spec-field.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/adr/004-compiler-naming.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/adr/005-vllm-hidden-states.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/adr/006-email-api-key-auth.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/api-reference.rst +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/architecture.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/conf.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/examples/evaluation-tasks.rst +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/installation.rst +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/make.bat +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/docs/quickstart.rst +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/estimate_data_gen_cost.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/eval.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/export_to_onnx.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/extract_models.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/inspect_data_dirs.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/latest_export.csv +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/log.train.81920.morecategories.extraprefix +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/main_no_spec_direct_ans_mix_continuous_sampleref_shorterprompt_vllm.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/merge_datasets.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/paw.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/paw.svg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/process_im2latex_dataset.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/artifacts.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/client.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/compiler/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/compiler/dummy.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/config.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/convert_peft_to_paw.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/paw_format.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/runtime/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights/runtime/interpreter.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/compiler/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/lora_format.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/runtime/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/tests/test_compile_and_run.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/tests/test_lora_format.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/tests/test_training.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/train_lora.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/training/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/programasweights_lora/training/loops/lora_tuning_sft.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/run_eval.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/run_training.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/scripts/filter_table_by_length.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/.env.example +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/alembic/env.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/alembic/script.py.mako +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/alembic/versions/001_initial_schema.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/alembic/versions/002_namespaced_aliases_hf_url.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/alembic.ini +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/logging_config.py +0 -0
- {programasweights-0.1.0.dev6/server/api → programasweights-0.1.0.dev7/server/api/middleware}/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/models/database.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/models/orm.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/routes/health.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/api/services/infer_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/benchmarks/benchmark_api.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/benchmarks/handcrafted_specs.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/benchmarks/last_benchmark_results.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/benchmarks/last_stress_results.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/benchmarks/stress_test.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/requirements.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/scripts/cleanup_storage.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/conftest.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/test_auth.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/test_compile.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/test_errors.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/test_infer.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/tests/test_integration_gpu.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/vllm_models/prepare_checkpoint.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/server/vllm_models/register.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.rollout_ppl.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.em_es.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.ppl.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/stage2_firstpromptqwen_512_e1_generate_lora_e2grpo_overfit_one_debug.reward_plot.train_gt_logprob.reward.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_all_caching.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_apple_count.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_batch_pilot.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_compile.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_e2e.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_execute.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_one_vs_two_step.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_onnx_correctness.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_onnx_hf_model.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_onnx_hf_with_images.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_paw_format.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/test_thinking_comparison.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/tests/test_programasweights.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/train.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/train_no_spec_direct_ans_mix_continuous_sampleref_trainonly_shorterprompt_withregularizer_generate_lora.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/README.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/DATASET_CHANGELOG.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/README.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/VERIFICATION_PIPELINE.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/dry_run_batch.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/filter_test_data.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/generate_specs.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/generate_specs_batch.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/incremental_merge.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/merge_and_upload.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/regenerate_outputs_batch.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/synthesize_data.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/synthesize_data_batch.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/filter_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/filter_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/pairs_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/pairs_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/specs_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/specs_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/specs_user_freeform.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/specs_user_freeform_with_examples.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/specs_user_with_examples.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/verify_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates/verify_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/filter_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/filter_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/pairs_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/pairs_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/specs_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/specs_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/specs_user_freeform.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/specs_user_freeform_with_examples.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/specs_user_with_examples.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/verify_system.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/templates_old/verify_user.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/data_generation/verify_test_data.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/datasets/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/datasets/jsonl_text_pairs.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/loops/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/training/loops/prefix_tuning_sft.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/ttt.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/upload_model.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/upload_onnx_to_huggingface.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/upload_onnx_to_huggingface_with_token.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/utils.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/README.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/config.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/main.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/middleware/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/middleware/rate_limit.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/models.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/auth_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/case_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/compiler_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/gpt_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/hub_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/image_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/interpreter_service.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/services/sql_manager.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/templates/gpt_test_generation.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/utils/__init__.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/utils/image_placeholders.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/app/utils/program_hash.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/clear_db.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/clear_tables.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/data/programs.db +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/env_example.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/example_images/README.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/get_data_examples.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/requirements.txt +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/run_server.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_analytics_tables.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_auth_tables.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_cache_tables.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_cases_tables.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_database.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_database_simple.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_db.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_example_images.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/setup_hub_tables.sql +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/backend/test_compilation_cache.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/README.md +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/eslint.config.js +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/index.html +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/package-lock.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/package.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/postcss.config.js +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/apple-touch-icon.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/favicon-16x16.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/favicon-32x32.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/paw-192.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/paw-512.png +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/paw.svg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/react-test.html +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/test.html +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/public/vite.svg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/App.css +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/assets/react.svg +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/CompileButtonWithConfig.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/CompileSection.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/ExamplesInput.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/HubUploadPage.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/ModelSelector.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/PricingPage.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/ProfilePage.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/components/TestSection.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/index.css +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/src/main.tsx +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/tailwind.config.js +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/tsconfig.app.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/tsconfig.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/tsconfig.node.json +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/frontend/vite.config.ts +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/nginx.conf +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/setup_mysql.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/start.sh +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/test_setup.py +0 -0
- {programasweights-0.1.0.dev6 → programasweights-0.1.0.dev7}/web-app/ttt.py +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: vLLM deployment rules and known issues for PAW servers
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# vLLM Deployment Rules
|
|
7
|
+
|
|
8
|
+
## Critical Environment Variables
|
|
9
|
+
|
|
10
|
+
### VLLM_ALLOW_RUNTIME_LORA_UPDATING=1
|
|
11
|
+
**MUST** be set when starting any vLLM inference server with `--enable-lora`.
|
|
12
|
+
Without this, `/v1/load_lora_adapter` and `/v1/unload_lora_adapter` endpoints
|
|
13
|
+
are NOT registered, and dynamic LoRA loading silently fails.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
VLLM_ALLOW_RUNTIME_LORA_UPDATING=1 python -m vllm.entrypoints.openai.api_server \
|
|
17
|
+
--model ... --enable-lora --max-loras 100 --max-lora-rank 64 ...
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### VLLM_TORCH_COMPILE_LEVEL=0
|
|
21
|
+
Set this on servers that don't have full CUDA dev toolchain installed.
|
|
22
|
+
Without it, vLLM tries to compile CUDA kernels via gcc which may fail
|
|
23
|
+
with missing headers.
|
|
24
|
+
|
|
25
|
+
## vLLM Multi-LoRA Inference Flow
|
|
26
|
+
|
|
27
|
+
1. Start server with `--enable-lora` + `VLLM_ALLOW_RUNTIME_LORA_UPDATING=1`
|
|
28
|
+
2. Load adapter: `POST /v1/load_lora_adapter {"lora_name": "my_adapter", "lora_path": "/path/to/peft/dir"}`
|
|
29
|
+
3. Infer: `POST /v1/completions {"model": "my_adapter", "prompt": "...", ...}`
|
|
30
|
+
4. The adapter dir must contain `adapter_config.json` + `adapter_model.safetensors` (PEFT format)
|
|
31
|
+
|
|
32
|
+
## vLLM Compiler Pooling (PawCompilerForPooling)
|
|
33
|
+
|
|
34
|
+
- Must use `--enforce-eager` flag (CUDA graph capture hangs otherwise)
|
|
35
|
+
- Must use `--runner pooling` flag
|
|
36
|
+
- The model must be registered in vLLM's registry. Use `scripts/patch_vllm.sh` after every pip install.
|
|
37
|
+
- Endpoint: `POST /v1/embeddings` (NOT `/pooling`)
|
|
38
|
+
|
|
39
|
+
## Post-Install Patch (scripts/patch_vllm.sh)
|
|
40
|
+
|
|
41
|
+
Run after every `pip install vllm` or `pip install --upgrade vllm`:
|
|
42
|
+
```bash
|
|
43
|
+
cd server && bash scripts/patch_vllm.sh /root/paw-venv
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This patches:
|
|
47
|
+
1. GPT-2 LoRA support (adds `SupportsLoRA` mixin to `GPT2LMHeadModel`)
|
|
48
|
+
2. PawCompilerForPooling registration in vLLM model registry
|
|
49
|
+
|
|
50
|
+
## Server Architecture
|
|
51
|
+
|
|
52
|
+
- Main server (95.133.252.12): API gateway + Qwen3 provider (port 9000) + vLLM services
|
|
53
|
+
- GPT-2 server (95.133.253.173): GPT-2 provider (port 9000) + vLLM services
|
|
54
|
+
- Pseudo-gen (Qwen3-4B) runs on main server GPU 0 only; GPT-2 server shares it remotely
|
|
55
|
+
- Each provider is self-contained: owns checkpoint, tokenizers, compilation pipeline
|
|
56
|
+
|
|
57
|
+
## GPT-2 Specifics
|
|
58
|
+
|
|
59
|
+
- Interpreter uses NO chat template (use_chat_template: false in config)
|
|
60
|
+
- LoRA target modules: c_attn, attn_c_proj, c_fc, mlp_c_proj (disambiguated names)
|
|
61
|
+
- GGUF arch: "gpt2" (not "qwen3")
|
|
62
|
+
- MODULE_TO_PEFT mapping differs from Qwen3 (transformer.h.{} vs model.layers.{})
|
|
63
|
+
- Position embeddings extended to 2048 (saved in checkpoint interpreter/)
|
|
64
|
+
|
|
65
|
+
## Deployment: Git Push/Pull Only
|
|
66
|
+
|
|
67
|
+
NEVER use rsync for code. Always:
|
|
68
|
+
```bash
|
|
69
|
+
# Local
|
|
70
|
+
git push origin main
|
|
71
|
+
# Server
|
|
72
|
+
cd /data/paw-repo && git pull
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Model weight files (checkpoints, GGUFs) use scp between servers — they don't belong in git.
|
|
76
|
+
|
|
77
|
+
## Service Dependencies on Main Server (95.133.252.12)
|
|
78
|
+
|
|
79
|
+
The API gateway (port 8000) depends on the Qwen3 CompileProvider (port 9000).
|
|
80
|
+
When restarting the API, ALWAYS check that the provider is also running.
|
|
81
|
+
|
|
82
|
+
Services that must be running:
|
|
83
|
+
- vLLM pseudo-gen: port 8001 (GPU 0)
|
|
84
|
+
- vLLM compiler: port 8002 (GPU 1, --runner pooling)
|
|
85
|
+
- vLLM inference: port 8003 (GPU 1, --enable-lora)
|
|
86
|
+
- CompileProvider: port 9000 (depends on 8001, 8002, 8003)
|
|
87
|
+
- API gateway: port 8000 (depends on 9000)
|
|
88
|
+
|
|
89
|
+
After restarting the API, verify the provider:
|
|
90
|
+
```bash
|
|
91
|
+
curl -s http://localhost:9000/provider/health
|
|
92
|
+
```
|
|
93
|
+
If not running, start it:
|
|
94
|
+
```bash
|
|
95
|
+
cd /data/paw-server && PYTHONPATH=. PROVIDER_CONFIG=provider_configs/qwen3-0.6b.json \
|
|
96
|
+
nohup /root/paw-venv/bin/uvicorn api.services.compile_provider:create_app \
|
|
97
|
+
--factory --host 0.0.0.0 --port 9000 > /tmp/paw-provider-9000.log 2>&1 &
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Testing: Use 36 Hard Examples
|
|
101
|
+
|
|
102
|
+
When testing compile+infer, use the 36 handcrafted examples from
|
|
103
|
+
`server/benchmarks/handcrafted_specs.json`. Simple tasks work without LoRA.
|
|
104
|
+
Hard tasks (Caesar cipher, JSON extraction) require LoRA to function correctly.
|
|
105
|
+
|
|
106
|
+
Expected baselines:
|
|
107
|
+
- Qwen3-0.6B: 30/36 (83.3%) via server, 32/36 (88.9%) via local HF
|
|
108
|
+
- GPT-2: 24/36 (66.7%) via local HF (server TBD)
|
|
@@ -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,112 @@
|
|
|
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
|
+
)
|
|
29
|
+
fn = paw.function(program.id)
|
|
30
|
+
fn("{name: 'Alice',}") # '{"name": "Alice"}'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Two Compilers
|
|
34
|
+
|
|
35
|
+
| | Qwen3 0.6B | GPT-2 124M |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| Compiler name | `paw-4b-qwen3-0.6b` | `paw-4b-gpt2` |
|
|
38
|
+
| Accuracy | Higher | Lower |
|
|
39
|
+
| Base model size | 594 MB | 105 MB |
|
|
40
|
+
| Program size | ~22 MB | ~5 MB |
|
|
41
|
+
| Inference speed | ~90ms (server) | ~50ms (server) |
|
|
42
|
+
| Runs in browser | No | Yes |
|
|
43
|
+
|
|
44
|
+
Default is Qwen3 0.6B. Use GPT-2 when you need smaller files or browser deployment.
|
|
45
|
+
|
|
46
|
+
## Browser / JavaScript SDK
|
|
47
|
+
|
|
48
|
+
Programs compiled with GPT-2 also run entirely in the browser via WebAssembly — no server needed. Users' data never leaves their device.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install @programasweights/web
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
import paw from '@programasweights/web';
|
|
56
|
+
|
|
57
|
+
const fn = await paw.function('programasweights/email-triage');
|
|
58
|
+
const result = await fn('Urgent: server is down!');
|
|
59
|
+
// result: "immediate"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
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.
|
|
63
|
+
|
|
64
|
+
## When to Use PAW
|
|
65
|
+
|
|
66
|
+
- **Fuzzy search** — typo-tolerant matching, semantic search, near-duplicate detection
|
|
67
|
+
- **Format repair** — fix broken JSON, normalize dates, repair malformed inputs
|
|
68
|
+
- **Classification** — sentiment, urgency, categories defined in your own words
|
|
69
|
+
- **Extraction** — emails, names, dates from messy unstructured text
|
|
70
|
+
- **Log triage** — extract errors from verbose output, filter noise
|
|
71
|
+
- **Agent preprocessing** — parse tool calls, validate outputs, route tasks
|
|
72
|
+
|
|
73
|
+
## Authentication
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Option 1: environment variable (recommended)
|
|
77
|
+
export PAW_API_KEY=paw_sk_...
|
|
78
|
+
|
|
79
|
+
# Option 2: CLI login (opens browser to generate key)
|
|
80
|
+
paw login
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Generate API keys at https://programasweights.com/settings
|
|
84
|
+
|
|
85
|
+
The SDK automatically reads `PAW_API_KEY` from the environment. Authenticated users get higher rate limits (60 compiles/hr vs 5 for anonymous).
|
|
86
|
+
|
|
87
|
+
## CLI
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
paw compile --spec "Classify sentiment as positive or negative" --json
|
|
91
|
+
paw run --program <program_id> --input "I love this!" --json
|
|
92
|
+
paw login # Save API key for higher rate limits
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`--json` gives structured output for programmatic use.
|
|
96
|
+
|
|
97
|
+
## API
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
paw.compile(spec, compiler="paw-4b-qwen3-0.6b") # Compile a spec
|
|
101
|
+
paw.function(name_or_id) # Load a compiled program
|
|
102
|
+
paw.login() # Save API key
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Browse Programs
|
|
106
|
+
|
|
107
|
+
https://programasweights.com/hub
|
|
108
|
+
|
|
109
|
+
## Add PAW to Your Project
|
|
110
|
+
|
|
111
|
+
Copy this file into your project as AGENTS.md:
|
|
112
|
+
https://programasweights.com/agents
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: programasweights
|
|
3
|
+
Version: 0.1.0.dev7
|
|
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
|
+
| | Qwen3 0.6B | 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 Qwen3 0.6B. Use 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
|
+
- **Agent preprocessing** — parse tool calls, validate outputs, route tasks
|
|
108
|
+
|
|
109
|
+
## Authentication
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Option 1: environment variable (recommended)
|
|
113
|
+
export PAW_API_KEY=paw_sk_...
|
|
114
|
+
|
|
115
|
+
# Option 2: CLI login (opens browser to generate key)
|
|
116
|
+
paw login
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Generate API keys at [programasweights.com/settings](https://programasweights.com/settings). Authenticated users get higher rate limits.
|
|
120
|
+
|
|
121
|
+
## CLI
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
paw compile --spec "Extract error lines from logs" --json
|
|
125
|
+
paw run --program <program_id> --input "[ERROR] timeout" --json
|
|
126
|
+
paw login
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`--json` gives structured output for programmatic use.
|
|
130
|
+
|
|
131
|
+
## Links
|
|
132
|
+
|
|
133
|
+
- **Website**: [programasweights.com](https://programasweights.com)
|
|
134
|
+
- **Documentation**: [programasweights.readthedocs.io](https://programasweights.readthedocs.io)
|
|
135
|
+
- **Python SDK**: [github.com/programasweights/programasweights-python](https://github.com/programasweights/programasweights-python)
|
|
136
|
+
- **Browser SDK**: [github.com/programasweights/programasweights-js](https://github.com/programasweights/programasweights-js)
|
|
137
|
+
- **Program Hub**: [programasweights.com/hub](https://programasweights.com/hub)
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
MIT
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
| | Qwen3 0.6B | 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 Qwen3 0.6B. Use 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
|
+
- **Agent preprocessing** — parse tool calls, validate outputs, route tasks
|
|
79
|
+
|
|
80
|
+
## Authentication
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Option 1: environment variable (recommended)
|
|
84
|
+
export PAW_API_KEY=paw_sk_...
|
|
85
|
+
|
|
86
|
+
# Option 2: CLI login (opens browser to generate key)
|
|
87
|
+
paw login
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Generate API keys at [programasweights.com/settings](https://programasweights.com/settings). Authenticated users get higher rate limits.
|
|
91
|
+
|
|
92
|
+
## CLI
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
paw compile --spec "Extract error lines from logs" --json
|
|
96
|
+
paw run --program <program_id> --input "[ERROR] timeout" --json
|
|
97
|
+
paw login
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`--json` gives structured output for programmatic use.
|
|
101
|
+
|
|
102
|
+
## Links
|
|
103
|
+
|
|
104
|
+
- **Website**: [programasweights.com](https://programasweights.com)
|
|
105
|
+
- **Documentation**: [programasweights.readthedocs.io](https://programasweights.readthedocs.io)
|
|
106
|
+
- **Python SDK**: [github.com/programasweights/programasweights-python](https://github.com/programasweights/programasweights-python)
|
|
107
|
+
- **Browser SDK**: [github.com/programasweights/programasweights-js](https://github.com/programasweights/programasweights-js)
|
|
108
|
+
- **Program Hub**: [programasweights.com/hub](https://programasweights.com/hub)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
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.
|