Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DPO endpoint #1198

Merged
merged 2 commits into from
May 30, 2024
Merged

Add DPO endpoint #1198

merged 2 commits into from
May 30, 2024

Conversation

Josh-XT
Copy link
Owner

@Josh-XT Josh-XT commented May 30, 2024

Added DPO Endpoint

Added a new DPO endpoint /api/agent/{agent_name}/dpo accepts a json body with user_input for the question and injected_memories for a count of how many memories you want to be injected. Default is 10 injected memories.

Endpoint response will be:

{
    "prompt": "The question from user_input as well as context that was injected will be returned here",
    "chosen": "The chosen 'correct' answer will be returned here.",
    "rejected": "An intentionally incorrect answer will be returned here.",
}

More about DPO: https://huggingface.co/docs/trl/main/en/dpo_trainer

Also added more activity logging and better error handling on websearch.

@Josh-XT Josh-XT marked this pull request as ready for review May 30, 2024 15:22
@Josh-XT Josh-XT merged commit 30e8e81 into main May 30, 2024
7 checks passed
@Josh-XT Josh-XT deleted the add-dpo-endpoint branch May 30, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant