ROCm / ROCm/FastFlowLM

πŸ™‹ Feature Wish: Optional per-token logprobs + a way to continue a session without full reprocessing (useful for speculative-decoding experiments)

Open
#588 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.9k
Forks
152
Avg merge
4h 14m
Merged PRs (30d)
11

Description

🧩 Context

Hi FLM team! πŸ‘‹ I'm a graduate researcher experimenting with heterogeneous
LLM inference on AMD Strix Halo (Ryzen AI MAX+ 395) β€” the idea is to run a
small "draft" model on the XDNA2 NPU and a larger "target" model on the iGPU,
following the speculative decoding (SD) pattern. FastFlowLM looks like the
only out-of-the-box way to get a model running on the NPU on Linux today πŸ™Œ,
so before going off to build something fully custom myself, I wanted to
check in here first and see if this is something you've already thought
about.

πŸ’­ What I'm hoping for

I haven't dug into the FLM source code, so I honestly don't know how big
these asks are, or whether they'd need to touch the NPU kernel side at all
β€” just raising them as a wishlist in case they're already on the roadmap,
or in case you can tell me whether they're realistic. πŸ™

  1. πŸ“Š Per-token probabilities. Speculative decoding needs the draft
    model's probability for each proposed token to decide whether to accept or
    reject it. Right now /v1/chat/completions doesn't seem to return anything
    like logprobs / top_logprobs. Would it be possible to optionally expose
    this, similar to the OpenAI API convention?

  2. ♻️ A cheaper way to continue an existing conversation. I noticed the
    docs mention CLI mode keeps a real KV cache across turns, while server mode
    reprocesses the full history on every request. For SD-style use, it would
    help a lot to have a way to say "continue from here, generate N more tokens"
    without resending/reprocessing everything β€” maybe via some kind of session
    id? I'm not sure how feasible this is given how the server is built
    internally, so I'd love to hear your thoughts.

🌱 Why this might be useful beyond my use case

Both of these would probably also help anyone trying to use FLM for
log-likelihood/perplexity evaluation or other research pipelines, not just
speculative decoding specifically.

Totally understand if this isn't a priority right now β€” just wanted to put
it out there! Thanks so much for FLM πŸ’š, it's honestly been the easiest way
I've found to get anything running on the NPU on Linux.

Very Thanks Again! πŸ₯° HengJay

Contributor guide

Open the contributing guide

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 with the documentation for CLI mode, server mode, and the /v1/chat/completions entry point, then trace how conversation history and KV cache handling differ. Define acceptance criteria for optional per-token logprobs and session-based continuation, including API behavior and coverage for both capabilities; the issue does not name implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
ai, api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.