def embed(self, query_batch):
    """Embeds a batch of queries.

    Args:
      query_batch: a list of Query instances.

    Returns:
      embeds: a [batch_size, embed_dim] float Tensor.
    """
    with profile.Timer('embed_featurize'):
      feature_dicts = [self._featurizer.featurize_query(q) for q in query_batch]

      # Concatenate features into a single dict with the following structure:
      #   input_ids: [batch_size, seq_len] <int32>
      #   input_mask: [batch_size, seq_len] <int32>
      #   segment_ids: [batch_size, seq_len] <int32>
      model_inputs = featurization.batch_feature_dicts(feature_dicts)

    with profile.Timer('embed_tf'):
      return self._model.signatures['projected'](**model_inputs)['default']
Embeds a batch of queries.

    Args:
      query_batch: a list of Query instances.

    Returns:
      embeds: a [batch_size, embed_dim] float Tensor.
    
language/realm/retrieval.py