Skip to content

llama : rename batch.logits to batch.output #10004

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danbev
Copy link
Collaborator

@danbev danbev commented Oct 22, 2024

This commit renames the logits field of the llama_batch struct to output.

The motivation for this change (apart from the TODO comment) is that the logits field is actually used to specify that output should be generated. For example, in the case of generating embeddings, setting logits to true can be confusing since the logits are not used when generating embeddings.

@ngxson
Copy link
Collaborator

ngxson commented Oct 22, 2024

(Be careful because this change will break quite many opening PR)

I'm adding breaking change tag because this will change llama_batch, which is part of public API

@ngxson ngxson added the breaking change Changes that break ABIs, APIs, file formats, or other forms of backwards compatibility. label Oct 22, 2024
@github-actions github-actions bot added examples server android Issues specific to Android labels Oct 22, 2024
@danbev danbev force-pushed the rename-logits-output branch from 14a8a06 to 74edb42 Compare October 23, 2024 10:34
This commit renames the `logits` field of the `llama_batch` struct to
`output`.

The motivation for this change (apart from the TODO comment) is that
the `logits` field is actually used to specify that output should be
generated. For example, in the case of generating embeddings, setting
logits to true can be confusing since the logits are not used when
generating embeddings.
@danbev danbev force-pushed the rename-logits-output branch from 8ceda95 to 291a785 Compare February 5, 2025 04:49
@danbev danbev requested a review from ngxson as a code owner February 5, 2025 04:49
Fix incorrectly named field in LibLlama.swift, outputs -> output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Issues specific to Android breaking change Changes that break ABIs, APIs, file formats, or other forms of backwards compatibility. examples server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants