Skip to content

Commit

Permalink
Remove the custom sampling loop using SequenceGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Picard committed Feb 25, 2025
1 parent 2637b46 commit 5334689
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 1,191 deletions.
4 changes: 2 additions & 2 deletions outlines/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import outlines

if TYPE_CHECKING:
from outlines.generate.api import SequenceGenerator
from outlines.generate import SequenceGeneratorAdapter
from outlines.templates import Template


Expand All @@ -25,7 +25,7 @@ class Function:
prompt_template: "Template"
schema: Union[str, Callable, object]
model_name: str
generator: Optional["SequenceGenerator"] = None
generator: Optional["SequenceGeneratorAdapter"] = None

@classmethod
def from_github(cls, program_path: str, function_name: str = "fn"):
Expand Down
2 changes: 1 addition & 1 deletion outlines/generate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from outlines.processors import CFGLogitsProcessor, RegexLogitsProcessor
from outlines.types import CFG, Choice, JsonType, List, Regex

from .api import SequenceGenerator
from .api import SequenceGeneratorAdapter
from .cfg import cfg
from .choice import choice
from .format import format
Expand Down
Loading

0 comments on commit 5334689

Please sign in to comment.