private String generateGreedy(String prompt, DecoderOptions options) {
        var generatedTokens = new ArrayList<Integer>();
        generatedTokens.add(0);  // Or target tokens

        // Tokenize
        var inputTokens = tokenize(prompt);  // Or source tokens

        // Evaluate encoder
        var encoderInput = createTensorRepresentation(inputTokens, SEQUENCE_DIMENSION);
        var encoderMask = createAttentionMask(encoderInput).expand(BATCH_DIMENSION);
        var encoderOutput = evaluateEncoder(encoderInput.expand(BATCH_DIMENSION), encoderMask);

        // Greedy search just grabs the next most probable token
        while (generatedTokens.size() < options.getMaxLength()) {  // Todo: add stopping criteria
            var decoderInput = createTensorRepresentation(generatedTokens, SEQUENCE_DIMENSION).expand(BATCH_DIMENSION);
            var logits = evaluateDecoder(decoderInput, encoderMask, encoderOutput);
            var nextToken = findMostProbableToken(
                    logits, generatedTokens.size() - 1, BATCH_DIMENSION, SEQUENCE_DIMENSION);
            generatedTokens.add(nextToken);
        }

        return detokenize(generatedTokens);
    }
Generates text by evaluating an encoder model to encode the prompt, and
repeatedly evaluating a decoding model to generate tokens until some
stopping criteria has been met.

@param prompt  the prompt to generate text from
@param options options for text generation
@return a text generated from the prompt
model-integration/src/main/java/ai/vespa/llm/clients/OnnxEncoderDecoder.java