llama-cpp-kinetic 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: llama-cpp-kinetic
3
+ Version: 0.1.0
4
+ Summary: Runs code written for llama-cpp-python on Kinetic, unchanged
5
+ Author: Velocity
6
+ License: Apache-2.0
7
+ Project-URL: Source, https://github.com/Veloresearch/kinetic
8
+ Requires-Python: >=3.9
9
+ Requires-Dist: kinetic-engine
@@ -0,0 +1,6 @@
1
+ llama_cpp_kinetic.pth,sha256=0IE6Bsw2AOy_kdd1lqFItp4SXSyooL9nGHx1eea3HTk,25
2
+ llama_cpp_kinetic.py,sha256=VRvpCfMMfwc03klbpZyyoFHGLoyjnWJRukCFGo2GICo,767
3
+ llama_cpp_kinetic-0.1.0.dist-info/METADATA,sha256=C5rMiqPXkxgVytOUWIa-8vhubQkG8xgPBs2YEzhTpHg,282
4
+ llama_cpp_kinetic-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
5
+ llama_cpp_kinetic-0.1.0.dist-info/top_level.txt,sha256=hCzrQbt8C5N5PVtz9tbWfx7XuaXTj8OuK9Y2bTyY4Gs,18
6
+ llama_cpp_kinetic-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ llama_cpp_kinetic
llama_cpp_kinetic.pth ADDED
@@ -0,0 +1 @@
1
+ import llama_cpp_kinetic
llama_cpp_kinetic.py ADDED
@@ -0,0 +1,28 @@
1
+ """Makes `import llama_cpp` load `kinetic.llama_cpp`.
2
+
3
+ It runs at interpreter start from llama_cpp_kinetic.pth. An installed
4
+ llama-cpp-python is shadowed, not touched: uninstalling this package brings
5
+ it back.
6
+ """
7
+
8
+ import importlib
9
+ import importlib.abc
10
+ import importlib.util
11
+ import sys
12
+
13
+
14
+ class _Alias(importlib.abc.MetaPathFinder, importlib.abc.Loader):
15
+ def find_spec(self, name, path=None, target=None):
16
+ if name != "llama_cpp":
17
+ return None
18
+ return importlib.util.spec_from_loader(name, self)
19
+
20
+ def create_module(self, spec):
21
+ return importlib.import_module("kinetic.llama_cpp")
22
+
23
+ def exec_module(self, module):
24
+ pass
25
+
26
+
27
+ if not any(isinstance(f, _Alias) for f in sys.meta_path):
28
+ sys.meta_path.insert(0, _Alias())