Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Changelog

## Unreleased

- Add `prompt_template=` for local adapter-free text and image interpreters,
using shared numbered positional placeholders with repeatable, ordered slots.
- Execute complete image prompt templates directly, without an added chat
wrapper. Older experimental image bundles must be re-exported with the
`rendered_text` / `{INPUT_N}` contract and a complete prompt template.
- Preserve existing compiled text templates, call conventions and prefix caches.
## 0.4.13 (2026-10-07)

- Add `prompt_template=` for local base models (no adapter applied), with
text and image inputs.
- Use `{INPUT_0}`, `{INPUT_1}`, etc. to place, repeat, or reorder inputs
in a prompt.
- Image `.paw` bundles use the `rendered_text` / `{INPUT_N}` template format.

## 0.4.12 (2026-10-07)

Expand Down
2 changes: 1 addition & 1 deletion PYPI_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Install the optional image dependencies:
pip install "programasweights[vision]" --extra-index-url https://pypi.programasweights.com/simple/
```

The unreleased numbered-template API lets you specify the complete prompt for
Use `prompt_template=` (SDK 0.4.13+) to specify the complete prompt for
text-only or image-capable base models. For Qwen3.5-0.8B with no adapter:

```python
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Install the optional image dependencies:
pip install "programasweights[vision]" --extra-index-url https://pypi.programasweights.com/simple/
```

The unreleased numbered-template API lets you specify the complete prompt for
Use `prompt_template=` (SDK 0.4.13+) to specify the complete prompt for
text-only or image-capable base models. For Qwen3.5-0.8B with no adapter:

```python
Expand Down
8 changes: 4 additions & 4 deletions docs/api-reference/python-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bundle directly. Required runtime metadata and base models are cached for reuse.
| `offline` | Use only local files/cache and make zero network calls; fail if required validated assets are missing. `PAW_OFFLINE=1` has the same effect. |
| `remote` | Run hosted inference without downloading model assets (default `False`). Accepts a `Program` object, ID, or slug. Cannot be combined with offline mode, local file paths, `interpreter`, or non-default local runtime options. |
| `interpreter` | Advanced adapter-free mode only. Must be passed by keyword and only when `program_id` is explicitly `None`. Supported values are `Qwen/Qwen3-0.6B`, `gpt2`, and `Qwen/Qwen3.5-0.8B`. |
| `prompt_template` | Unreleased. Optional complete numbered template for a local base interpreter. Pass by keyword with `program_id=None`. Works with text-only and image-capable models. Cannot override a compiled bundle or be used with `remote=True`. |
| `prompt_template` | SDK 0.4.13+. Optional complete numbered template for a local base interpreter. Pass by keyword with `program_id=None`. Works with text-only and image-capable models. Cannot override a compiled bundle or be used with `remote=True`. |

For existing local text-only programs and text base interpreters without an
explicit `prompt_template`, the returned callable accepts:
Expand Down Expand Up @@ -153,7 +153,7 @@ The Qwen3 interpreter uses its chat template with thinking disabled. GPT-2 uses
the input as a raw prompt. These defaults are unchanged when `prompt_template`
is omitted.

#### Complete numbered templates (unreleased)
#### Complete numbered templates (SDK 0.4.13+)

For a local base model, pass `prompt_template=` when loading the function to
specify the complete prompt. This option works for both text-only and
Expand Down Expand Up @@ -213,8 +213,8 @@ inputs and keyword generation options described above.

### Local text/image calls

Install `programasweights[vision]` to use Qwen3.5-0.8B. With the unreleased
numbered-template API, order images and text through the complete template:
Install `programasweights[vision]` to use Qwen3.5-0.8B. Use
`prompt_template=` (SDK 0.4.13+) to order images and text:

```python
prompt = (
Expand Down
2 changes: 1 addition & 1 deletion programasweights/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from importlib.metadata import version as _meta_version
__version__ = _meta_version("programasweights")
except Exception:
__version__ = "0.4.12"
__version__ = "0.4.13"

from ._inputs import Image
from ._result import FunctionResult
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "programasweights"
version = "0.4.12"
version = "0.4.13"
description = "Compile natural language specifications into neural programs that run locally via llama.cpp."
readme = "PYPI_README.md"
requires-python = ">=3.8"
Expand Down
Loading