Skip to content

Add a logic to support max_batch_size_dpo. #305

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

Merged
merged 3 commits into from
May 2, 2025

Conversation

VProv
Copy link
Contributor

@VProv VProv commented May 1, 2025

Have you read the Contributing Guidelines?

Issue #

Describe your changes

Clearly and concisely describe what's in this pull request. Include screenshots, if necessary.

@VProv VProv requested review from artek0chumak and punkerpunker May 1, 2025 11:31
@@ -329,6 +329,7 @@ class FinetuneDownloadResult(BaseModel):

class FinetuneFullTrainingLimits(BaseModel):
max_batch_size: int
max_batch_size_dpo: int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think to make this optional? So we can indenedently publish it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean making it optional only on the python client side?
I don't understand how this would work.
The API have to return the max_batch_size_dpo in the limits, because it is a required parameter for each model.
Client without this parameter will throw errors I think. I can make it optional for the client, and estimate it if it is not provided by the API, but I think this case is not important because I'm going to update the API at the same time as client.
Do you have any other ideas?
The best solution is to make versioning, but we are far from it.

@VProv VProv requested review from timofeev1995 and removed request for punkerpunker May 2, 2025 10:43
Copy link
Contributor

@timofeev1995 timofeev1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! lgtm
if we decide to deploy api first, if changes are made (making the parameter optional) I'd take another look.

@VProv VProv requested a review from artek0chumak May 2, 2025 12:13
@@ -329,8 +329,16 @@ class FinetuneDownloadResult(BaseModel):

class FinetuneFullTrainingLimits(BaseModel):
max_batch_size: int
max_batch_size_dpo: int = -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(optional)
I prefer to have int | None rather than == -1, but it still works

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of problems with type check in our code this way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thank you

@artek0chumak artek0chumak merged commit c09481b into main May 2, 2025
10 checks passed
@artek0chumak artek0chumak deleted the Vprov/update_batch_size_DPO branch May 2, 2025 12:28
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.

3 participants