Skip to content

Commit

Permalink
feat(trtllm): fix logits retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
mfuntowicz committed Dec 10, 2024
1 parent 60059b6 commit b653605
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backends/trtllm/csrc/ffi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ namespace huggingface::tgi::backends::trtllm {
const auto reqId = r.getRequestId();
if (!r.hasError()) [[likely]] {
const auto result = r.getResult();
const auto logits = result.logProbs.value()[0];
return generation_step_t{
reqId,
static_cast<uint32_t>(result.outputTokenIds[0][0]),
result.logProbs.value()[0][0],
logits.back(),
result.isFinal,
as_finish_reason_t(result.finishReasons[0]),
false,
Expand Down

0 comments on commit b653605

Please sign in to comment.