Skip to content

Clean Up Dead outlines.integrations Code #1054

@lapp0

Description

@lapp0

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.transformers has RegexPrefixAllowedTokens and JSONPrefixAllowedTokens which are now handled by outlines.processors
  • outlines.integrations.llamacpp has logits processors which are redundant with outlines.processors
  • outlines.integrations.vllm has logits processors which are redundant with outlines.processors
  • outlines.integrations.utils has adapt_tokenizer, useful for FSM construction, and convert_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, and outlines.integrations.vllm
  • Remove outlines.integrations.utils, but move def adapt_tokenizer(...) to outlines.models.tokenizer

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions