--- license: mit library_name: programasweights tags: - onnx - neural-programs - prefix-tuning --- # paw-interpreter-onnx ONNX runtime models for ProgramAsWeights. ## Model Files **Core (always downloaded):** - `text_embeddings.onnx` - Text tokenizer embeddings - `interpreter.onnx` - Main interpreter model - `tokenizer/` - Fast tokenizer **Optional (lazy loaded):** - `image_encoder.onnx` - Image encoder (CLIP + projection) - only downloaded when using image inputs ## Usage ```python import programasweights as paw # Text-only program (no Pillow needed!) fn = paw.function("abc123") result = fn("Extract emails: contact@example.com") # With images (requires: pip install programasweights[images]) from PIL import Image img = Image.open("photo.jpg") result = fn("Count apples:", img) ``` ## Installation ```bash # Base install (text-only, ~70MB) pip install programasweights # With image support (~85MB) pip install programasweights[images] ``` ## Model Details - Base model: Qwen2-0.5B - Runtime: ONNX (lightweight, fast) - Input: .paw files (prefix KV cache) - Output: Generated text