Replies: 1 comment 5 replies
-
I'm definitely of the opinion that we should expose these parameters, but I don't know whether the right way to do so is through guidance itself, environment variables, flags used when compiling llguidance from source (probably not that one), all of the above...? @mmoskal @Harsha-Nori any opinions from you two? We've also discussed having higher defaults to make things work out-of-the-box for most users, where performance- and/or safety-critical deployments should reduce according to their needs. Also @afg1 -- are you using guidance installed from pypi, or are you running on main these days? The substring implementation has been pushed down into rust, and guidance should now (fingers crossed) have some more sensible behaviors around how it decides what is or is not a lexeme. This may help you with some of these errors. We're hoping to have another release relatively soon, but if you can, do give main a try and report back! |
Beta Was this translation helpful? Give feedback.
-
I've been moving some of my code over to the 0.2.0 version of guidance, and I've hit a problem which I don't see in the 0.1.16 version. Namely, the lexer is refusing to do things in the new version which the old one was happy with.
After some creative debugging, I found that the rust lexer is running out of 'fuel' when attempting to select a substring from a paragraph (for example).
I think I understand that the fuel idea is to control how long the longest running lexer is going to be, and I see some default values here: https://github.com/guidance-ai/llguidance/blob/c83edb9527816dfaa8fbc61fe51384a5cba55e48/parser/src/api.rs#L251
Is it possible to tweak these values so I can allow longer running lexer jobs? In my case, I can wait if it means I get a good substring of a paper to use as evidence for something the LLM just generated, but right now it is just crashing almost straight away.
If this is exposed in python that would be great, but if not, do I have to resort to a manually installing llguidance from code with modified values?
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions