You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class AbstractModel(ABC):
|
|
# abstract base class for language models
|
|
def __init__():
|
|
pass
|
|
|
|
@abstractmethod
|
|
def run(self, prompt):
|
|
# generate text using language model
|
|
pass
|
|
|
|
def chat(self, prompt, history):
|
|
pass
|
|
|
|
def __call__(self, task):
|
|
pass
|