Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama : disambiguate API #9270

Closed
wants to merge 3 commits into from
Closed

llama : disambiguate API #9270

wants to merge 3 commits into from

Conversation

ggerganov
Copy link
Owner

@ggerganov ggerganov commented Sep 2, 2024

fix #9262

Rename functions llama_xxx_type to llama_get_xxx_type

@github-actions github-actions bot added testing Everything test related examples server labels Sep 2, 2024
include/llama.h Outdated
Comment on lines 474 to 477
// DEPRECATED: use the API above
//LLAMA_API enum llama_pooling_type llama_pooling_type(const struct llama_context * ctx);
//LLAMA_API enum llama_vocab_type llama_vocab_type (const struct llama_model * model);
//LLAMA_API enum llama_rope_type llama_rope_type (const struct llama_model * model);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated means that the functions are still available and will be removed soon. This is a breaking API change.

@ggerganov ggerganov added the breaking change Changes that break ABIs, APIs, file formats, or other forms of backwards compatibility. label Sep 2, 2024
@slaren
Copy link
Collaborator

slaren commented Sep 5, 2024

This change breaks the naming convention, which is not great because the API harder to use. However renaming every getter function would break every application, which is also not very good. This may be a case where the solution is worse than the problem.

@ggerganov ggerganov closed this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that break ABIs, APIs, file formats, or other forms of backwards compatibility. examples server testing Everything test related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Please use different name for function and enum type in llama.h
2 participants