Skip to content

When using xcframework to update llama.cpp for iOS I get out of scope errors #12320

Answered by danbev
unpaidcoder asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the references above showing the errors!

These structs and function like llama_grammar_element, are defined in the header src/llama-grammar.h which is considered a private or non public API, and they are therefore not exposed by the xcframework.

Note that the functions llama_grammar_init and llama_grammar_free where renamed in 39fbaf9 and just wanted to mention that incase you go looking for them.

But there is an API that is exposed, and the grammar related functions as well. The sampling and grammar were refactored in #9294 which might help to give some background of the changes.
These functions are available when using the xcframework, for example:

import llama
...

let grammar 

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@danbev
Comment options

danbev Mar 12, 2025
Collaborator

Answer selected by unpaidcoder
@unpaidcoder
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants