-
Notifications
You must be signed in to change notification settings - Fork 399
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
outlines.generate.cfg
: AttributeError: 'CFGFSM' object has no attribute 'regex_fsm'
#685
Comments
I have encountered the same issue. I can not even run the example provided in the README with gpt2 model:
|
I'm also running into this. |
Hi, Has anyone had a chance to fix this issue? I am unable to run the example provided in the README and get this same AttributeError. |
I'm also running into this in CFGGuide.
|
also having this error |
I'm running into the same bug, getting
|
Hey, I'm experiencing the same issue too. I decided to use SynCode for grammar guided generation. It's very efficient and works with any Lark grammar. I've linked the repo here: |
@jjdvd234 , does that still work for you? I tried it just now and am getting nonsense outputs with the provided example code (no errors, but clearly it has parsing errors). I'll try again with a llama model...maybe phi model is the issue? |
Describe the issue as clearly as possible:
Discord user pepp discovered a bug in the implementation of
CFGFSM
:CFGFSM.regex_fsm
isn't initialized untilCFGFSM.allowed_token_ids()
is called. IfCFGFSM.next_state()
is called first it results in anAttributeError
.Steps/code to reproduce the bug:
Expected result:
Error message:
Outlines/Python version information:
outlines==0.0.32
Context for the issue:
We need to fix
CFGFSM
so it initializes all instance variables in__init__
The text was updated successfully, but these errors were encountered: