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 50, 200, 500 max token counts (PRIME-654) #1137

Conversation

vdavid
Copy link
Contributor

@vdavid vdavid commented Dec 16, 2024

This PR aims to investigate https://linear.app/sourcegraph/issue/PRIME-654/investigate-why-the-fastpathnon-fastpath-diff-decreases-with-longer, and answer the question of whether the back end seems to contribute to our observations there (increased latency diff between SG→CG and direct CG with shorter completions).

It uses the somewhat arbitrary token counts 50, 200, and 500 to simulate single-line, multiline, and long code completions. In all cases, it uses the messages

{"role": "user", "content": "def bubble_sort(arr):"},
{"role": "assistant", "content": "Here is a bubble sort:"}

talking to Claude 3 Haiku (for cost efficiency) at temperature 0.0 and streaming ON.

To fully understand the changes in this PR, see also #1138 which this PR builds on.

Test plan

(I don't intend to merge this.)

Caveat: I was not extremely rigorous in looking into the exact differences between the requests assembled by SG and by the src-cli script. I trusted that we successfully converted the same arguments passed to SG to the format CG needs them. Whitespace in the body and some HTTP headers are probably different, though. This can be tested and improved if needed.

@vdavid vdavid requested a review from a team as a code owner December 16, 2024 12:49
@vdavid vdavid marked this pull request as draft December 16, 2024 12:49
@vdavid vdavid requested review from emidoots and removed request for a team December 16, 2024 12:50
@vdavid
Copy link
Contributor Author

vdavid commented Dec 18, 2024

Closing this in favor of embedded functionality in #1138. It needs three separate CLI runs for the three token counts, and it'll work.

@vdavid vdavid closed this Dec 18, 2024
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