Skip to content

Feature Request: Expose Model Internal Reasoning States (logits, attention, token-level trace) #5360

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
tandenghui opened this issue May 13, 2025 · 0 comments
Labels
enhancement New feature or request roadmap

Comments

@tandenghui
Copy link

Hi LocalAI team πŸ‘‹,

I'd like to request a feature that would greatly enhance the interpretability and debuggability of LocalAI models β€” the ability to expose the internal reasoning process during text generation.

Problem:
Currently, LocalAI only returns the final generated output (tokens or text), which limits insight into how the model arrived at its response.

There is no way to access intermediate model states such as:

logprobs or top-k token scores at each decoding step

attention weights per layer/head

hidden states / intermediate token embeddings

any kind of token-level reasoning trace

This makes it hard to:

debug model behavior

understand model uncertainty

build explainable AI systems (e.g. chain-of-thought visualization, step-by-step validation)

evaluate how model biases or hallucinations might arise

@tandenghui tandenghui added the enhancement New feature or request label May 13, 2025
@mudler mudler added the roadmap label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap
Projects
None yet
Development

No branches or pull requests

2 participants