ollama / ollama/ollama-python

Inquiry About Token Probability Feature

Open
#268 0 comments 18 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.5k
Forks
1.2k
Avg merge
4m
Merged PRs (30d)
1

Description

I have explored the ollama.generate() method but found that it does not seem to support returning token probabilities directly. Could you please let me know if there is an existing feature or workaround within the Ollama library that allows for extracting the probabilities of the next tokens when generating text?

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 reading the ollama.generate() API and its documented response fields, then check whether the Ollama library or service already exposes next-token probabilities. The issue does not name a file or test; completion would require a decided API scope and a documented, verifiable way to obtain those probabilities.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.