Skip to main content

laya-weights

Offline weights for laya's English checkpoint (convaiinnovations/laya, repo root), the one laya.load() uses by default.

Many organisations let pip reach PyPI (directly or through an internal mirror) but block the Hugging Face Hub, so laya can't download its model. This package ships the weights through pip, so pip install laya-weights is all you need.

Maintainer: Aleeza Noor

Agent routing example

The English checkpoint suits agent routing and orchestration: read a query and pick the agent whose description fits it best.

import laya

agent = laya.load()
questions = {"agent": {
    "type": "choice",
    "instructions": "Which agent should handle this request?",
    "criteria": {
        "billing_agent": "refunds, invoices, duplicate charges",
        "tech_support_agent": "crashes, bugs, login problems",
        "sales_agent": "pricing, plans, upgrades for new customers",
    },
}}
result = agent.predict("The app crashes every time I open settings", questions)
print(result["answers"]["agent"]["choice"])   # tech_support_agent

Descriptions that are specific and don't overlap give the best routing.

pip install laya-weights        # also installs laya
import laya
agent = laya.load()             # no Hugging Face Hub access needed

Code that works today keeps working unchanged. A .pth startup hook wraps huggingface_hub.snapshot_download so that requests for this checkpoint are served from the installed package. Other models, other revisions and full-repo snapshots still go to the Hub as before.

Notes

  • PyPI rejects files over 100 MB, so the 843 MB model.safetensors ships as 9 laya-weights-part-NN packages. The first load rebuilds the file into ~/.cache/laya-weights (set LAYA_WEIGHTS_HOME to change this), checks its SHA-256, and then reuses it. To do the rebuild ahead of time, for example in a Dockerfile, run python -m laya_weights.
  • The multilingual and typed-decisions checkpoints are not included. Router() sends non-English text to the multilingual checkpoint, which still needs the Hub.

Building and releasing

pip install build hatchling twine huggingface_hub
python -c "from huggingface_hub import snapshot_download as s; s('convaiinnovations/laya', revision='55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851', local_dir='hf_snapshot', allow_patterns=['rl_agent_config.json','model.safetensors','tokenizer/*','encoder/*'])"
python build_weights.py --version 0.1.0
python -m pytest tests
twine upload dist/*

Metadata

Release files for laya-weights 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for laya-weights 0.1.0
File Interpreter ABI Platform Actions
laya_weights-0.1.0-py3-none-any.whl Python 3 none any Details for laya_weights-0.1.0-py3-none-any.whl

Release files / laya_weights-0.1.0-py3-none-any.whl

Download URL laya_weights-0.1.0-py3-none-any.whl
Size 667.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f03fa2915722c8920ef03aafefe7d0eac3e86120e321522a9ebc62cba9e0a7a8
BLAKE2b-256 checksum
How to use checksums
d88493d4362cd71bdfdf585f539abb117ae66b3c505358a4ca8fe0473bd59d93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Security for laya-weights 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page