-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[discussion] Completion Statistic Metrics #306
Comments
https://github.com/solyarisoftware/prompter.vim looks amazing ! just take a look at it |
@solyarisoftware so here are proposed action items, let me know if I understood it correctly: Add metrics calculation to litellm:
|
does https://github.com/solyarisoftware/prompter.vim use streaming ? @solyarisoftware |
I'm confused - don't we already return the token usage, prompt tokens, completion tokens as part of each completion call?
@solyarisoftware was there a reason you didn't start with litellm? |
Thanks @ishaan-jaff all for feedbacks.
yes, when we come into completion metrics, By the way, I have to apologyze and correct myself in the previous definition of "speed". This is misleading. The completion tokens/second is maybe more precisely defined as "Token Throughput (Token-Per-Millisecond Ratio)".
And also another possible metric is this:
good (expected) question :-) So far I didn't implement streaming completion in prompter.vim, just to take things simple in my alpha release, avoiding visualizations complications (coding the plugin). I never used API completion streaming mode, but I imagine streaming completion is composed by a list of completion "chunck" (events):
So maybe you can apply the token troughput metrics to each chunk, and maybe a mean value.
Right. I'm not critiquing. My proposa now is just to brainstorm WHICH are the common/interesting/useful "derivative" variables on top of I/O variables you mentioned, that's are already available, sure.
That's easy: I already coded the openai APi interface when I discovered LiteLLM :) but I think it make sense to substitute my ugly code with LLM in a near future. |
Thanks for the great feedback @solyarisoftware |
closing due to inactivity |
Hi guys
here just a tinkering with you.
BTW, yesterday I published prompter.vim my vim plugin transforming the vim editor as a LLMs playground. As stated in readme doc, I want to substitute the Azure/openai LLM interface using LiteLLM in a near future.
In my plugin after each completion I print a on-line statistic. Something like
Back to the point of converging on common metrics to measure a completion, obvious variables are:
Input (prompt):
Output (completion):
Now I find interesting some other basic LLMs measurements:
Speed (Tokens / Latency ratio) measured as tokens per second.
I implemented just as https://github.com/solyarisoftware/prompter.vim/blob/master/python/utils.py#L46
If we measure time in seconds, topically the speed is a positive integer, maybe from 1 to n-000...
I'm not totally sure about the practical impacts of having this speed metric, but in theory it has sense, I guess.
Prompt/Completion ratio as the prompt tokens nr. / completion tokens nr.
This metric could measure the length of prompt completion texts, having some practical meaning in vertical application (i'm not fully dure if this metric is really relevant)
many other metric / statistics
So the general proposal is to integrate in LiteLLM a support of these and maybe smarter common metrics to measure /and compare LLMs behavior. I'm thinkg about some statistic function, and some nice (terminal based) pretty printer of these statistics.
But above all: what do you think about the need of these possible metrics as shared satndard in the LLMs community (and afterward in LiteLLM).
Thanks
giorgio
The text was updated successfully, but these errors were encountered: