streamllm 0.2.0__tar.gz → 0.2.1__tar.gz

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.
Files changed (23) hide show
  1. {streamllm-0.2.0 → streamllm-0.2.1}/PKG-INFO +1 -1
  2. {streamllm-0.2.0 → streamllm-0.2.1}/pyproject.toml +1 -1
  3. {streamllm-0.2.0 → streamllm-0.2.1}/setup.py +1 -1
  4. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/__init__.py +1 -1
  5. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/auto_model.py +2 -2
  6. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm.egg-info/PKG-INFO +1 -1
  7. {streamllm-0.2.0 → streamllm-0.2.1}/LICENSE +0 -0
  8. {streamllm-0.2.0 → streamllm-0.2.1}/README.md +0 -0
  9. {streamllm-0.2.0 → streamllm-0.2.1}/setup.cfg +0 -0
  10. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/cli.py +0 -0
  11. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/engine.py +0 -0
  12. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/hardware.py +0 -0
  13. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/kv_cache.py +0 -0
  14. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/models.py +0 -0
  15. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/pinned_host.py +0 -0
  16. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/scratchpad.py +0 -0
  17. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm/transfer.py +0 -0
  18. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm.egg-info/SOURCES.txt +0 -0
  19. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm.egg-info/dependency_links.txt +0 -0
  20. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm.egg-info/entry_points.txt +0 -0
  21. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm.egg-info/requires.txt +0 -0
  22. {streamllm-0.2.0 → streamllm-0.2.1}/streamllm.egg-info/top_level.txt +0 -0
  23. {streamllm-0.2.0 → streamllm-0.2.1}/tests/test_generation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamllm
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Run bigger LLMs on smaller GPUs through intelligent, asynchronous layer streaming.
5
5
  Author: StreamLLM Authors
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "streamllm"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "Run bigger LLMs on smaller GPUs through intelligent, asynchronous layer streaming."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name="streamllm",
5
- version="0.2.0",
5
+ version="0.2.1",
6
6
  packages=["streamllm"],
7
7
  entry_points={
8
8
  "console_scripts": [
@@ -28,7 +28,7 @@ except (ImportError, ValueError):
28
28
  print_models_table,
29
29
  )
30
30
 
31
- __version__ = "0.2.0"
31
+ __version__ = "0.2.1"
32
32
  __all__ = [
33
33
  "AutoModel",
34
34
  "StreamLLMModel",
@@ -189,8 +189,8 @@ class StreamLLMModel(nn.Module):
189
189
  from transformers.cache_utils import DynamicCache
190
190
 
191
191
  params = inspect.signature(self.layer_template.forward).parameters
192
- key = "past_key_values" if "past_key_values" in params else "past_key_value"
193
- if key not in params or not hasattr(self.layer_template, "self_attn"):
192
+ key = next((name for name in ("cache", "past_key_values", "past_key_value") if name in params), None)
193
+ if key is None or not hasattr(self.layer_template, "self_attn"):
194
194
  raise ValueError("Unsupported decoder cache API")
195
195
  return DynamicCache() if use_cache else None, key
196
196
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamllm
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Run bigger LLMs on smaller GPUs through intelligent, asynchronous layer streaming.
5
5
  Author: StreamLLM Authors
6
6
  License-Expression: Apache-2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes