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

Use new inference model config / API #2208

Merged
merged 2 commits into from
Mar 25, 2023
Merged

Use new inference model config / API #2208

merged 2 commits into from
Mar 25, 2023

Conversation

AbdBarho
Copy link
Collaborator

Blocked by #2207

parent_id,
work_parameters: {
...params,
top_k: params.top_k === null ? null : Math.floor(Math.pow(32000, params.top_k)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tested the top_k here? Andreas suggest an exponential function for this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah nvm I see the config below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah just for info: this works for the custom config where the slider goes between 0 and 1, but for all the presets it computes pow(32000, 50) or similar.

I did not find a clean way of changing this so I changed min and max. Arguably, no more than 1000 is needed, because the sampling probability is already so low it might as well be zero.

const form = useForm<WorkParametersInput>({
defaultValues: modelInfos[0].parameter_configs[0].work_parameters,

console.assert(modelInfos.length > 0, "No model config was found");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can ignore this and assume the backend always returns at least 1 config.

Copy link
Collaborator Author

@AbdBarho AbdBarho Mar 25, 2023

Choose a reason for hiding this comment

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

Yes, this console.assert is there to inform other developers that we expect the array to have at least one. You and I know that, any new person who might look over this might not know this.

@AbdBarho AbdBarho marked this pull request as ready for review March 25, 2023 17:45
@AbdBarho AbdBarho enabled auto-merge (squash) March 25, 2023 17:48
@yk yk requested a review from notmd March 25, 2023 19:18
@AbdBarho AbdBarho merged commit ac7e35e into main Mar 25, 2023
@AbdBarho AbdBarho deleted the use-model-config branch March 25, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants