WIP: Update outlines (and outlines prompts) and transformers versions#256
WIP: Update outlines (and outlines prompts) and transformers versions#256
Conversation
bf92614 to
542d191
Compare
|
Alright so functionally this all seems to work, but when running the integration tests, there are several differences (mostly that makes sense as enough pieces have changed here that I wouldn't expect to get the exact same output). However, it seems like there's some non-determinism even with I need to spend some more time with this to understand what's really going on before feeling confident in merging. Anecdotally it does seem a bit faster now, but if it's not deterministic and doesn't enforce the entire schema what's the point. |
Copy in old outlines.prompt decorator for compatibility
6ffb3cf to
e76e5a5
Compare
|
The problem causing the non-determinsm and invalid regression values was improper handling on the outlines side of vocabulary creation: dottxt-ai/outlines#1831. This was merged recently into outlines main, but we are blocked from directly using this due to vllm dependencies. I've implemented a monkey patch fix we can use for the time being. There was a second bug in outlines here: dottxt-ai/outlines#1817. Same thing with above, we are blocked from the official fix because of vllm. |
dmjoy
left a comment
There was a problem hiding this comment.
@alright-code I think these changes on the whole are fine, I just left a few comments / change requests. I believe the integration test differences are within reason, but before merging I will want to check out this branch and run one or two tests with the latest data and configs to make sure the scores we're getting back are still good.
| 'kdma_values': [{'kdma': 'Moral judgement', 'value': 0.2}]} | ||
| [bold]*CHANGED SCENE TO*: P1[/bold] | ||
| PyTorch version 2.3.1+cu118 available. | ||
| HTTP Request: HEAD https://huggingface.co/roberta-large/resolve/main/config.json "HTTP/1.1 200 OK" |
There was a problem hiding this comment.
There's already some mechanism(s) for filtering out lines during the integration test diff. We probably want to exclude these "HTTP Request" lines as they can be non-deterministic
There was a problem hiding this comment.
Seems like you still might need to re-generate these test files (I see you added the HTTP filter but these lines are still in the output)
tests/data/expected_outputs/integration_tests/pipeline_baseline_adept_1/input_output.json
Show resolved
Hide resolved
…-Kitware/align-system into dev/update-outlines-and-transformers
@eveenhuis @jadie1 @barry-ravichandran FYSA
This is a WIP, but wanted to draw attention to some of the changes that need to be made for the latest outlines version. Specifically:
Theoutlines.pomptdecorate has been removed, now the guidance is to use theoutlines.Template.from_stringfunction.outlines.Template.from_stringwe also need to change how these templates are invoked wherever they're used, and that's scattered around several algorithms; not worth) future templates should strongly considering using this new approach thoughsamplerhas been removed from outlines, instead inference control parameters are just passed through to whatever backend is loading / serving the model (so for determinstic sampling using transformers as the model provider we would setdo_sample=Falsein thegeneration_kwargs)