Skip to content

Add Applications #1346

Closed
@rlouf

Description

@rlouf

(name to be defined)

Following #1226 and #1220 we will be able to implement the following interface:

from outlines import Application, models

model = models.transformers("gpt2")

def template(a: int) -> str:
    return f"What is 2 times {a}?"

fn = Application(model, template, int)

where fn is a callable object whose arguments are the arguments to the prompt template:

fn(1)
# 2

fn(3)
# 6

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions