Tensor embedTokens(List<Integer> tokens, TensorType type) {
        Tensor inputSequence = createTensorRepresentation(tokens, "d1");
        Tensor attentionMask = createAttentionMask(inputSequence);
        Tensor tokenTypeIds = createTokenTypeIds(inputSequence);


        Map<String, Tensor> inputs;
        if (!"".equals(tokenTypeIdsName)) {
            inputs = Map.of(inputIdsName, inputSequence.expand("d0"),
                                            attentionMaskName, attentionMask.expand("d0"),
                                            tokenTypeIdsName, tokenTypeIds.expand("d0"));
        } else {
            inputs = Map.of(inputIdsName, inputSequence.expand("d0"),
                                 attentionMaskName, attentionMask.expand("d0"));
        }
        Map<String, Tensor> outputs = evaluator.evaluate(inputs);

        Tensor tokenEmbeddings = outputs.get(outputName);

        return poolingStrategy.toSentenceEmbedding(type, tokenEmbeddings, attentionMask);
    }
A BERT Base compatible embedder. This embedder uses a WordPiece embedder to
produce a token sequence that is then input to a transformer model. A BERT base
compatible transformer model must have three inputs:

 - A token sequence (input_ids)
 - An attention mask (attention_mask)
 - Token types for cross encoding (token_type_ids)

See bert-base-embedder.def for configurable parameters.

@author lesters
model-integration/src/main/java/ai/vespa/embedding/BertBaseEmbedder.java