llama-cpp-python icon indicating copy to clipboard operation
llama-cpp-python copied to clipboard

Update API to match latest llama.cpp version

Open mamei16 opened this issue 8 months ago • 2 comments

This PR updates llama_cpp.py so that it matches the llama.h API changes introduced in the commits: https://github.com/ggml-org/llama.cpp/commit/e0dbec0bc6cd4b6230cda7a6ed1e9dac08d1600b https://github.com/ggml-org/llama.cpp/commit/8fcb563613e20a04dd9791f0a9b8a41086428c09 https://github.com/ggml-org/llama.cpp/commit/00d53800e00bb22a26bf710fa6bd1150e412cc1d https://github.com/ggml-org/llama.cpp/commit/dd373dd3bf81eced3e711fb7cb49123a6105933e https://github.com/ggml-org/llama.cpp/commit/b3de7cac732e7dc0e10e1bb07502a500b0ee9022 https://github.com/ggml-org/llama.cpp/commit/2c3f8b850a4a6cff0f5dda2135c03fc81d33ed8b https://github.com/ggml-org/llama.cpp/commit/e0e912f49b3195ef9d0c51378629ba03c9b972da

I couldn't find any example on how to handle deprecated methods in this project, so I added a @deprecated decorator to the methods in question.

mamei16 avatar Apr 03 '25 16:04 mamei16

@jonathanreichhealthscope Thanks! What do you mean by that?

mamei16 avatar Apr 08 '25 19:04 mamei16

@jonathanreichhealthscope Thanks! What do you mean by that?

Looks like there's a couple of extra API changes, that's what I've put in my comment. For example, the 'llama_load_model_from_file' is now best practice to use, as the former naming convention I think is deprecated.