private IndexedTensor createTensorRepresentation(List<Long> input, String dimension) {
        int size = input.size();
        TensorType type = new TensorType.Builder(TensorType.Value.FLOAT).indexed(dimension, size).build();
        IndexedTensor.Builder builder = IndexedTensor.Builder.of(type);
        for (int i = 0; i < size; ++i) {
            builder.cell(input.get(i), i);
        }
        return builder.build();
    }
Sparsify the model output tensor.This uses an unrolled custom reduce and is 15-20% faster than the using
generic tensor reduce.

@param modelOutput the model output tensor of type tensorType
@param tensorType the type of the destination tensor
@return A mapped tensor with the terms from the vocab that has a score above the threshold
model-integration/src/main/java/ai/vespa/embedding/SpladeEmbedder.java