-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auto-edit): fix the temperature value regression with the auto-e…
…dit (#6848) ## Context 1. We received multiple reports describing inconsistent model outputs in the "auto-edit" feature. 2. We initially used a temperature value of 0.2. On December 17, we set it to 0 in the [client-side PR](https://github.com/sourcegraph/cody/pull/6363/files)(released December 22 pre-release, December 29 stable) for more consistent generation. 3. The [issue arises in cody-gateway](https://github.com/sourcegraph/sourcegraph/blob/main/cmd/cody-gateway/internal/httpapi/completions/upstream.go#L318), when JSON-marshaling the request, any zero-valued fields (like temperature=0) get dropped before being sent to Fireworks. 4. Because no temperature is passed, [Fireworks defaults to a temperature of 1](https://docs.fireworks.ai/api-reference/post-completions#body-temperature), which is significantly higher than intended and leads to inconsistent outputs. 5. This PR changes the value from 0 to 0.1. To decide the value, we did an offline evaluation on couple of prompts on over ~100 requests and got consistent output for the requests. ## Test plan 1. Fixed the test cases and CI 2. Local testing on the prompt to ensure the output is consistent. --------- Co-authored-by: Tom Ross <tom@umpox.com>
- Loading branch information
1 parent
6e8d30d
commit b585001
Showing
8 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters