llama-cpp-kinetic 0.1.0__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.
- llama_cpp_kinetic-0.1.0/MANIFEST.in +1 -0
- llama_cpp_kinetic-0.1.0/PKG-INFO +9 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.egg-info/PKG-INFO +9 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.egg-info/SOURCES.txt +10 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.egg-info/dependency_links.txt +1 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.egg-info/requires.txt +1 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.egg-info/top_level.txt +1 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.pth +1 -0
- llama_cpp_kinetic-0.1.0/llama_cpp_kinetic.py +28 -0
- llama_cpp_kinetic-0.1.0/pyproject.toml +18 -0
- llama_cpp_kinetic-0.1.0/setup.cfg +4 -0
- llama_cpp_kinetic-0.1.0/setup.py +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include llama_cpp_kinetic.pth
|
|
@@ -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,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,10 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
llama_cpp_kinetic.pth
|
|
3
|
+
llama_cpp_kinetic.py
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.py
|
|
6
|
+
llama_cpp_kinetic.egg-info/PKG-INFO
|
|
7
|
+
llama_cpp_kinetic.egg-info/SOURCES.txt
|
|
8
|
+
llama_cpp_kinetic.egg-info/dependency_links.txt
|
|
9
|
+
llama_cpp_kinetic.egg-info/requires.txt
|
|
10
|
+
llama_cpp_kinetic.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
kinetic-engine
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
llama_cpp_kinetic
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import llama_cpp_kinetic
|
|
@@ -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())
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "llama-cpp-kinetic"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Runs code written for llama-cpp-python on Kinetic, unchanged"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
license = { text = "Apache-2.0" }
|
|
11
|
+
authors = [{ name = "Velocity" }]
|
|
12
|
+
dependencies = ["kinetic-engine"]
|
|
13
|
+
|
|
14
|
+
[project.urls]
|
|
15
|
+
Source = "https://github.com/Veloresearch/kinetic"
|
|
16
|
+
|
|
17
|
+
[tool.setuptools]
|
|
18
|
+
py-modules = ["llama_cpp_kinetic"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from setuptools import setup
|
|
4
|
+
from setuptools.command.build_py import build_py
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class BuildWithPth(build_py):
|
|
8
|
+
"""Puts the .pth file at the top of site-packages, where Python runs it."""
|
|
9
|
+
|
|
10
|
+
def run(self):
|
|
11
|
+
super().run()
|
|
12
|
+
name = "llama_cpp_kinetic.pth"
|
|
13
|
+
self.copy_file(name, os.path.join(self.build_lib, name))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
setup(cmdclass={"build_py": BuildWithPth})
|