outlines
outlines copied to clipboard
Clean Up Dead `outlines.integrations` Code
What behavior of the library made you think about the improvement?
With all models other than exllamav2 having a single integration implementation via outlines.generate.api.SequenceGeneratorAdapter and outlines.processors, we don't need outlines.integrations.
outlines.integrations.transformershasRegexPrefixAllowedTokensandJSONPrefixAllowedTokenswhich are now handled byoutlines.processorsoutlines.integrations.llamacpphas logits processors which are redundant withoutlines.processorsoutlines.integrations.vllmhas logits processors which are redundant withoutlines.processorsoutlines.integrations.utilshasadapt_tokenizer, useful for FSM construction, andconvert_json_schema_to_str, used for the three model integrations listed above
After the vLLM integration, we no longer need outlines.integrations
How would you like it to behave?
Get rid of outlines/integrations/ and tests/generate/test_integration_*.py
- Remove
outlines.integrations.transformers,outlines.integrations.llamacpp, andoutlines.integrations.vllm - Remove
outlines.integrations.utils, but movedef adapt_tokenizer(...)tooutlines.models.tokenizer
We should do this once #1010 has been merged and then release 0.1.0