From b653605e5450e69456c1e709f7f79089a1c1dd17 Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Tue, 10 Dec 2024 23:28:13 +0100 Subject: [PATCH] feat(trtllm): fix logits retrieval --- backends/trtllm/csrc/ffi.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backends/trtllm/csrc/ffi.hpp b/backends/trtllm/csrc/ffi.hpp index c57f8d18a44..c29a632ee88 100644 --- a/backends/trtllm/csrc/ffi.hpp +++ b/backends/trtllm/csrc/ffi.hpp @@ -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(result.outputTokenIds[0][0]), - result.logProbs.value()[0][0], + logits.back(), result.isFinal, as_finish_reason_t(result.finishReasons[0]), false,