gguf connector core built on llama.cpp
Project description
llama-core
This is a solo llama connector also; being able to work independently.
install via (pip/pip3):
pip install llama-core
run it by (python/python3):
python -m llama_core
Prompt to user interface selection menu above; while chosen, GGUF file(s) in the current directory will be searched and detected (if any) as below.
include interface selector to your code by adding:
from llama_core import menu
include gguf reader to your code by adding:
from llama_core import reader
include gguf writer to your code by adding:
from llama_core import writer
remark(s)
Other functions are same as llama-cpp-python; for CUDA(GPU, Nvida) and Metal(M1/M2, Apple) supported settings, please specify CMAKE_ARGS
following Abetlen's repo below; if you want to install it by source file (under releases), you should opt to do it by .tar.gz file (then build your machine-customized installable package) rather than .whl (wheel; a pre-built binary package) with an appropriate cmake tag(s).
references
repo llama-cpp-python llama.cpp page gguf.us
build from llama_core-(version).tar.gz (examples below are for CPU)
According to the latest note inside vs code, msys64 is recommended by Microsoft; or you can opt w64devkit or etc. as source of your gcc and g++ compilers.
for windows user(s):
$env:CMAKE_GENERATOR = "MinGW Makefiles"
$env:CMAKE_ARGS = "-DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe"
pip install llama_core-(version).tar.gz
In mac, xcode command line tools are recommended by Apple for dealing all coding related issue(s); or you can bypass it for your own good/preference.
for mac user(s):
pip3 install llama_core-(version).tar.gz
Make sure your gcc and g++ are >=11; you can check it by: gcc --version and g++ --version; other settings include: typing-extensions>=4.5.0, numpy>=1.20.0, diskcache>=5.6.1, jinja2>=2.11.3, MarkupSafe>=2.0, cmake>=3.21, etc.; however, if you opt to install it by the pre-built wheel (.whl) file then you don't need to worry about that.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for llama_core-0.1.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd88dfdd4ec5b5f6c50696625d7fdfc82649b58535c46a0618da6ac5048fd75 |
|
MD5 | 2efea5dd7043e499097897ee8d6c7c6c |
|
BLAKE2b-256 | f1218be8befcd79b2341f1711d6f7efdde7f23002a3347b046dc2c8f4e7dcd45 |
Hashes for llama_core-0.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 858d6608911e1742ae82278283491ae27f7bbe676c4fe804cb9436ef607a938a |
|
MD5 | 65c0b0f640a529d2c5be362b506ea12d |
|
BLAKE2b-256 | 5f51cc390690ead964850a1ab7f6cbc1386c70e3f192f664a6bbd76babd12fcc |