programasweights 0.1.0.dev9__py3-none-any.whl → 0.1.0.dev10__py3-none-any.whl
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/__init__.py +1 -1
- programasweights/cache.py +7 -2
- programasweights/cli.py +9 -4
- {programasweights-0.1.0.dev9.dist-info → programasweights-0.1.0.dev10.dist-info}/METADATA +2 -2
- {programasweights-0.1.0.dev9.dist-info → programasweights-0.1.0.dev10.dist-info}/RECORD +7 -7
- {programasweights-0.1.0.dev9.dist-info → programasweights-0.1.0.dev10.dist-info}/WHEEL +0 -0
- {programasweights-0.1.0.dev9.dist-info → programasweights-0.1.0.dev10.dist-info}/entry_points.txt +0 -0
programasweights/__init__.py
CHANGED
programasweights/cache.py
CHANGED
|
@@ -4,7 +4,7 @@ Local cache management for base models and compiled programs.
|
|
|
4
4
|
Cache structure:
|
|
5
5
|
~/.cache/programasweights/
|
|
6
6
|
base_models/
|
|
7
|
-
qwen3-0.6b-
|
|
7
|
+
qwen3-0.6b-q6_k.gguf # ~623 MB, downloaded once
|
|
8
8
|
programs/
|
|
9
9
|
<program_id>/
|
|
10
10
|
adapter.gguf # ~23 MB, Q4_0 LoRA
|
|
@@ -36,7 +36,12 @@ INTERPRETER_TO_GGUF = {
|
|
|
36
36
|
|
|
37
37
|
def get_base_model_path(interpreter: str = "Qwen/Qwen3-0.6B") -> Path:
|
|
38
38
|
"""Get the path to the base model GGUF, downloading if needed."""
|
|
39
|
-
gguf_name = INTERPRETER_TO_GGUF.get(interpreter
|
|
39
|
+
gguf_name = INTERPRETER_TO_GGUF.get(interpreter)
|
|
40
|
+
if not gguf_name:
|
|
41
|
+
raise ValueError(
|
|
42
|
+
f"Unknown interpreter: '{interpreter}'. "
|
|
43
|
+
f"Supported: {list(INTERPRETER_TO_GGUF.keys())}"
|
|
44
|
+
)
|
|
40
45
|
gguf_path = config.get_base_models_dir() / f"{gguf_name}.gguf"
|
|
41
46
|
|
|
42
47
|
if gguf_path.exists():
|
programasweights/cli.py
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
ProgramAsWeights CLI.
|
|
4
4
|
|
|
5
5
|
Usage:
|
|
6
|
-
paw compile
|
|
7
|
-
paw run <
|
|
8
|
-
paw
|
|
9
|
-
paw info <
|
|
6
|
+
paw compile --spec "..." Compile a spec on the server
|
|
7
|
+
paw run --program <id> --input "..." Run a program locally
|
|
8
|
+
paw rename <program> <slug> Set or change a program's slug
|
|
9
|
+
paw info <program> Show program metadata
|
|
10
|
+
paw login [key] Save API key for authentication
|
|
10
11
|
|
|
11
12
|
All commands support --json for structured output (agent-friendly).
|
|
12
13
|
"""
|
|
@@ -63,6 +64,8 @@ def cmd_run(args):
|
|
|
63
64
|
import programasweights as paw
|
|
64
65
|
if args.api_url:
|
|
65
66
|
paw.api_url = args.api_url
|
|
67
|
+
if args.api_key:
|
|
68
|
+
paw.api_key = args.api_key
|
|
66
69
|
|
|
67
70
|
fn = paw.function(
|
|
68
71
|
args.program, verbose=args.verbose,
|
|
@@ -119,6 +122,8 @@ def cmd_info(args):
|
|
|
119
122
|
import programasweights as paw
|
|
120
123
|
if args.api_url:
|
|
121
124
|
paw.api_url = args.api_url
|
|
125
|
+
if args.api_key:
|
|
126
|
+
paw.api_key = args.api_key
|
|
122
127
|
|
|
123
128
|
from programasweights.client import PAWClient
|
|
124
129
|
client = PAWClient(api_url=paw.api_url, api_key=paw.api_key)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: programasweights
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev10
|
|
4
4
|
Summary: Compile natural language specifications into neural programs that run locally via llama.cpp.
|
|
5
5
|
Project-URL: Homepage, https://programasweights.com
|
|
6
6
|
Project-URL: Repository, https://github.com/programasweights/programasweights-python
|
|
@@ -36,7 +36,7 @@ Define what a function should do in plain English. PAW compiles it into a small
|
|
|
36
36
|
## Install
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
pip install programasweights
|
|
39
|
+
pip install programasweights --extra-index-url https://pypi.programasweights.com/simple/
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Quick Start
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
programasweights/__init__.py,sha256=
|
|
1
|
+
programasweights/__init__.py,sha256=kZ2JEAJmNN4d26rVdVnHLAtozWOjbDf5OEMtIm78lww,5953
|
|
2
2
|
programasweights/artifacts.py,sha256=bSRZgYadAYyuH9aIW6P3VocExfGDGAHeDuj8vod5-Bo,1968
|
|
3
|
-
programasweights/cache.py,sha256=
|
|
4
|
-
programasweights/cli.py,sha256=
|
|
3
|
+
programasweights/cache.py,sha256=7L4D5juQLtARVT4aEqzy9N2Lz6xUv9uk7LBZMuJJFrY,3866
|
|
4
|
+
programasweights/cli.py,sha256=3r8ggIAvrnCdpT1L0qnQVzw4UBPyv_dh4rTqMT8O26U,6674
|
|
5
5
|
programasweights/client.py,sha256=Qk0ubKW54robuVnvEf0AyED5zX2Rw-W4HefBg_GQp8s,4391
|
|
6
6
|
programasweights/config.py,sha256=zQFnVNfYR4bFx2DsZheMnPy2yd9T4-fe0u2sG1GluE8,1553
|
|
7
7
|
programasweights/convert_peft_to_paw.py,sha256=yvavaAzLUqc-lFHEC_9AOhsuI-fCobu6k-GDMVQdOHk,6521
|
|
@@ -12,7 +12,7 @@ programasweights/compiler/dummy.py,sha256=PcLwijRNM4q2E9PNUcfCPf_y08QjsteVENR0TV
|
|
|
12
12
|
programasweights/runtime/__init__.py,sha256=S4jp7-eWAcMa0X417U7P6HkTL1j3v8ffQA-nneh9wY0,549
|
|
13
13
|
programasweights/runtime/interpreter.py,sha256=brYCtatSsu23lq87cuki4MViqZX6U32LBw7Z3USbQmA,19632
|
|
14
14
|
programasweights/runtime/interpreter_onnx.py,sha256=kzYKmwg_h0tVhoQlixJGKoHPVhcCK22AcHG59oeYX2Q,21559
|
|
15
|
-
programasweights-0.1.0.
|
|
16
|
-
programasweights-0.1.0.
|
|
17
|
-
programasweights-0.1.0.
|
|
18
|
-
programasweights-0.1.0.
|
|
15
|
+
programasweights-0.1.0.dev10.dist-info/METADATA,sha256=AqQHZ3pAeD8upM9fgYxzyyENYncay2h8Gu_968fXluU,5639
|
|
16
|
+
programasweights-0.1.0.dev10.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
17
|
+
programasweights-0.1.0.dev10.dist-info/entry_points.txt,sha256=l4ZnfCPU0oMzhGB9T2Fv9AnDbSCMM70KUUJVtSvMJBc,50
|
|
18
|
+
programasweights-0.1.0.dev10.dist-info/RECORD,,
|
|
File without changes
|
{programasweights-0.1.0.dev9.dist-info → programasweights-0.1.0.dev10.dist-info}/entry_points.txt
RENAMED
|
File without changes
|