├── .gitattributes ├── .github └── workflows │ ├── build.yml │ └── tests.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── ctransformers ├── __init__.py ├── gptq │ ├── __init__.py │ ├── hub.py │ └── llm.py ├── hub.py ├── langchain.py ├── lib.py ├── lib │ ├── avx │ │ ├── ctransformers.dll │ │ ├── libctransformers.dylib │ │ └── libctransformers.so │ ├── avx2 │ │ ├── ctransformers.dll │ │ ├── libctransformers.dylib │ │ └── libctransformers.so │ ├── basic │ │ ├── ctransformers.dll │ │ ├── libctransformers.dylib │ │ └── libctransformers.so │ └── cuda │ │ ├── ctransformers.dll │ │ └── libctransformers.so ├── llm.py ├── logger.py ├── transformers.py └── utils.py ├── models ├── common.h ├── ggml │ ├── cmpnct_unicode.cpp │ ├── cmpnct_unicode.h │ ├── ggml-alloc.c │ ├── ggml-alloc.h │ ├── ggml-cuda-ggllm.cu │ ├── ggml-cuda-ggllm.h │ ├── ggml-cuda.cu │ ├── ggml-cuda.h │ ├── ggml-ggllm.c │ ├── ggml-ggllm.h │ ├── ggml-metal.h │ ├── ggml-metal.m │ ├── ggml-metal.metal │ ├── ggml.c │ ├── ggml.h │ ├── k_quants.c │ ├── k_quants.h │ ├── libfalcon.cpp │ ├── libfalcon.h │ ├── llama-ggml.cpp │ ├── llama-ggml.h │ ├── llama-util.h │ ├── llama.cpp │ └── llama.h ├── llm.cc ├── llm.h └── llms │ ├── dolly.cc │ ├── falcon.cc │ ├── gpt-neox.cc │ ├── gpt2.cc │ ├── gptj.cc │ ├── llama-ggml.cc │ ├── llama.cc │ ├── mpt.cc │ ├── replit.cc │ └── starcoder.cc ├── pyproject.toml ├── scripts ├── build.sh ├── docs.py ├── release.sh └── sync.sh ├── setup.py └── tests ├── __init__.py ├── conftest.py ├── test_llm.py └── test_model.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Enforce Unix newlines 2 | * text=auto eol=lf 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/.github/workflows/tests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/.gitmodules -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/README.md -------------------------------------------------------------------------------- /ctransformers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/__init__.py -------------------------------------------------------------------------------- /ctransformers/gptq/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/gptq/__init__.py -------------------------------------------------------------------------------- /ctransformers/gptq/hub.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/gptq/hub.py -------------------------------------------------------------------------------- /ctransformers/gptq/llm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/gptq/llm.py -------------------------------------------------------------------------------- /ctransformers/hub.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/hub.py -------------------------------------------------------------------------------- /ctransformers/langchain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/langchain.py -------------------------------------------------------------------------------- /ctransformers/lib.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib.py -------------------------------------------------------------------------------- /ctransformers/lib/avx/ctransformers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/avx/ctransformers.dll -------------------------------------------------------------------------------- /ctransformers/lib/avx/libctransformers.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/avx/libctransformers.dylib -------------------------------------------------------------------------------- /ctransformers/lib/avx/libctransformers.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/avx/libctransformers.so -------------------------------------------------------------------------------- /ctransformers/lib/avx2/ctransformers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/avx2/ctransformers.dll -------------------------------------------------------------------------------- /ctransformers/lib/avx2/libctransformers.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/avx2/libctransformers.dylib -------------------------------------------------------------------------------- /ctransformers/lib/avx2/libctransformers.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/avx2/libctransformers.so -------------------------------------------------------------------------------- /ctransformers/lib/basic/ctransformers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/basic/ctransformers.dll -------------------------------------------------------------------------------- /ctransformers/lib/basic/libctransformers.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/basic/libctransformers.dylib -------------------------------------------------------------------------------- /ctransformers/lib/basic/libctransformers.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/basic/libctransformers.so -------------------------------------------------------------------------------- /ctransformers/lib/cuda/ctransformers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/cuda/ctransformers.dll -------------------------------------------------------------------------------- /ctransformers/lib/cuda/libctransformers.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/lib/cuda/libctransformers.so -------------------------------------------------------------------------------- /ctransformers/llm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/llm.py -------------------------------------------------------------------------------- /ctransformers/logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/logger.py -------------------------------------------------------------------------------- /ctransformers/transformers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/transformers.py -------------------------------------------------------------------------------- /ctransformers/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/ctransformers/utils.py -------------------------------------------------------------------------------- /models/common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/common.h -------------------------------------------------------------------------------- /models/ggml/cmpnct_unicode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/cmpnct_unicode.cpp -------------------------------------------------------------------------------- /models/ggml/cmpnct_unicode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/cmpnct_unicode.h -------------------------------------------------------------------------------- /models/ggml/ggml-alloc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-alloc.c -------------------------------------------------------------------------------- /models/ggml/ggml-alloc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-alloc.h -------------------------------------------------------------------------------- /models/ggml/ggml-cuda-ggllm.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-cuda-ggllm.cu -------------------------------------------------------------------------------- /models/ggml/ggml-cuda-ggllm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-cuda-ggllm.h -------------------------------------------------------------------------------- /models/ggml/ggml-cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-cuda.cu -------------------------------------------------------------------------------- /models/ggml/ggml-cuda.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-cuda.h -------------------------------------------------------------------------------- /models/ggml/ggml-ggllm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-ggllm.c -------------------------------------------------------------------------------- /models/ggml/ggml-ggllm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-ggllm.h -------------------------------------------------------------------------------- /models/ggml/ggml-metal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-metal.h -------------------------------------------------------------------------------- /models/ggml/ggml-metal.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-metal.m -------------------------------------------------------------------------------- /models/ggml/ggml-metal.metal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml-metal.metal -------------------------------------------------------------------------------- /models/ggml/ggml.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml.c -------------------------------------------------------------------------------- /models/ggml/ggml.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/ggml.h -------------------------------------------------------------------------------- /models/ggml/k_quants.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/k_quants.c -------------------------------------------------------------------------------- /models/ggml/k_quants.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/k_quants.h -------------------------------------------------------------------------------- /models/ggml/libfalcon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/libfalcon.cpp -------------------------------------------------------------------------------- /models/ggml/libfalcon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/libfalcon.h -------------------------------------------------------------------------------- /models/ggml/llama-ggml.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/llama-ggml.cpp -------------------------------------------------------------------------------- /models/ggml/llama-ggml.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/llama-ggml.h -------------------------------------------------------------------------------- /models/ggml/llama-util.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/llama-util.h -------------------------------------------------------------------------------- /models/ggml/llama.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/llama.cpp -------------------------------------------------------------------------------- /models/ggml/llama.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/ggml/llama.h -------------------------------------------------------------------------------- /models/llm.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llm.cc -------------------------------------------------------------------------------- /models/llm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llm.h -------------------------------------------------------------------------------- /models/llms/dolly.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/dolly.cc -------------------------------------------------------------------------------- /models/llms/falcon.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/falcon.cc -------------------------------------------------------------------------------- /models/llms/gpt-neox.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/gpt-neox.cc -------------------------------------------------------------------------------- /models/llms/gpt2.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/gpt2.cc -------------------------------------------------------------------------------- /models/llms/gptj.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/gptj.cc -------------------------------------------------------------------------------- /models/llms/llama-ggml.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/llama-ggml.cc -------------------------------------------------------------------------------- /models/llms/llama.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/llama.cc -------------------------------------------------------------------------------- /models/llms/mpt.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/mpt.cc -------------------------------------------------------------------------------- /models/llms/replit.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/replit.cc -------------------------------------------------------------------------------- /models/llms/starcoder.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/models/llms/starcoder.cc -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/pyproject.toml -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/scripts/build.sh -------------------------------------------------------------------------------- /scripts/docs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/scripts/docs.py -------------------------------------------------------------------------------- /scripts/release.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/scripts/release.sh -------------------------------------------------------------------------------- /scripts/sync.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/scripts/sync.sh -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/setup.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/tests/conftest.py -------------------------------------------------------------------------------- /tests/test_llm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/tests/test_llm.py -------------------------------------------------------------------------------- /tests/test_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marella/ctransformers/HEAD/tests/test_model.py --------------------------------------------------------------------------------