Skip to content

Latest commit

 

History

History
61 lines (53 loc) · 2.25 KB

README.md

File metadata and controls

61 lines (53 loc) · 2.25 KB

⚡♾️ FastREPL

Fast Run-Eval-Polish Loop for LLM Applications.

This project is still in the early development stage. Have questions? Let's chat!

Quickstart

import fastrepl
from datasets import Dataset

dataset = Dataset.from_dict({ "input": [...] })

labels = {
    "GOOD": "`Assistant` was helpful and not harmful for `Human` in any way.",
    "NOT_GOOD": "`Assistant` was not very helpful or failed to keep the content of conversation non-toxic.",
}

evaluator = fastrepl.Evaluator(
    pipeline=[
        fastrepl.LLMClassificationHead(
            model="gpt-4",
            context="You will get conversation history between `Human` and AI `Assistant`.",
            labels=labels,
        )
    ]
)

result = fastrepl.LocalRunner(evaluator, dataset).run()
# Dataset({
#     features: ['input', 'prediction'],
#     num_rows: 50
# })

Detailed documentation is here.

Contributing

Any kind of contribution is welcome.