Skip to content

v3.14.3

@wpferrell wpferrell tagged this 21 May 16:05
bigsmall/codecs/kv_cache.py did a top-level `import torch` that
`import bigsmall` pulled in via kv_cache_manager. Since torch is an
optional extra (not in install_requires), a bare `pip install bigsmall`
then any CLI command (--version, --help, compress, decompress, info,
migrate) crashed with ModuleNotFoundError. The import is now lazy.

- kv_cache.py: torch under TYPE_CHECKING for annotations, imported
  lazily inside the runtime functions that need it
- setup.py: comment documenting why torch stays out of install_requires
- README: pip install bigsmall[torch] for model loading
- version bump 3.14.2 -> 3.14.3, CHANGELOG entry

Verified: clean torch-free venv runs all CLI commands (exit 0);
with torch, install_hook + from_pretrained on gpt2-bigsmall still
loads and generates; full suite 245 passed.
Assets 2
Loading