Closed
Description
Since there was some discussion about splitting llama.cpp
into multiple files, I would like to propose a reorganization of the project files. In short:
- Move ggml files to the ggml directory
- Move llama.cpp files to the llama directory
- Split llama.cpp into multiple files, possibly:
- llama-tokenizer.cpp/h
- llama-sampling.cpp/h
- llama-models.cpp/h
- Possibly move common into examples
Hopefully this will allow:
- Having a more clear separation between ggml and llama.cpp
- First step towards building ggml separately, and sharing the same build scripts in the ggml repository and other projects
- Improve build time of llama.cpp
- Make working on llama.cpp easier
The tree structure would look like this:
├── common
├── examples
├── gguf-py
├── tests
├── ggml
│ ├── ggml-alloc.h
│ ├── ggml-alloc.c
│ ├── ggml-backend-impl.h
│ ├── ggml-backend.c
│ ├── ggml-backend.h
│ ├── ggml-common.h
│ ├── ggml-cuda
│ ├── ggml-cuda.cu
│ ├── ggml-cuda.h
│ ├── ggml-impl.h
│ ├── ggml-kompute.cpp
│ ├── ggml-kompute.h
│ ├── ggml-metal.h
│ ├── ggml-opencl.cpp
│ ├── ggml-opencl.h
│ ├── ggml-quants.c
│ ├── ggml-quants.h
│ ├── ggml-rpc.cpp
│ ├── ggml-rpc.h
│ ├── ggml-sycl.cpp
│ ├── ggml-sycl.h
│ ├── ggml-vulkan.cpp
│ ├── ggml-vulkan.h
│ ├── ggml.c
│ ├── ggml.h
│ ├── sgemm.cpp
│ └── sgemm.h
├── llama
│ ├── llama.cpp
│ ├── llama.h
│ ├── new files: llama-tokenizer.cpp/h, llama-sampling.cpp/h, llama-models.cpp/h, ...
│ ├── unicode-data.cpp
│ ├── unicode-data.h
│ ├── unicode.cpp
│ └── unicode.h
├── CMakeLists.txt
├── Makefile
└── convert-hf-to-gguf.py