Package ai.djl.modality.nlp.generate
Class CausalLMOutput
- java.lang.Object
-
- ai.djl.modality.nlp.generate.CausalLMOutput
-
public class CausalLMOutput extends java.lang.ObjectCausalLMOuput is used to contain multiple output of a language model.
-
-
Constructor Summary
Constructors Constructor Description CausalLMOutput(NDArray logits, NDArray hiddenState, NDList pastKeyValueList)Constructs a newCausalLMOutputintance.CausalLMOutput(NDArray logits, NDList pastKeyValues)Constructs a newCausalLMOutputinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArraygetHiddenState()Returns the value of the allHiddenStates.NDArraygetLogits()Returns the value of the logits.NDListgetPastKeyValuesList()Returns the value of the pastKeyValuesList.voidsetLogits(NDArray logits)Sets the value of the logits.
-
-
-
Method Detail
-
getLogits
public NDArray getLogits()
Returns the value of the logits.- Returns:
- the value of logits
-
setLogits
public void setLogits(NDArray logits)
Sets the value of the logits.- Parameters:
logits- value of logits NDArray
-
getHiddenState
public NDArray getHiddenState()
Returns the value of the allHiddenStates.- Returns:
- the value of allHiddenStates
-
getPastKeyValuesList
public NDList getPastKeyValuesList()
Returns the value of the pastKeyValuesList.- Returns:
- the value of pastKeyValuesList
-
-