lm-sys / lm-sys/FastChat

Please support top_logprobs via API

Open
#3,264 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

I've noticed that the current implementation supports logprobs (thanks a lot!) but it appears to be different from how OpenAI handles them. I was wondering if it would be possible to enhance the functionality in the following ways:

1. Support for top_logprobs: This would allow users to retrieve the log probabilities for the top tokens directly, which can be immensely useful for applications requiring more nuanced probability assessments.
2. API Endpoint for Specific Token Probabilities: Providing an API method to query the probability of a specific token would be a great addition. This feature would enable more targeted data analysis and could enhance the usability of the API for various use cases.

Implementing these features could greatly increase the API's flexibility and utility for developers and researchers. I would appreciate any consideration you could give to these suggestions, and I am eager to assist with testing or feedback if needed.

Thank you for your time and all the work you do on this project.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current logprobs implementation and the API endpoints that expose it. Review how the API represents token probabilities, then define the behavior needed for top_logprobs and specific-token probability queries; done means both requested capabilities are available through the API with clearly specified responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.