docstr: Converts a text into vector(s) using the language model only (no prediction head involved).
  
  :param dicts: Samples to run inference on provided as a list of dicts. One dict per sample.
  :type dicts: [dict]
  :param extraction_strategy: Strategy to extract vectors. Choices: 'reduce_mean' (mean sentence vector), 'reduce_max' (max per embedding dim), 'CLS'
  :type extraction_strategy: str
  :return: dict of predictions
docstr_tok: ["Converts","a","text","into","vector","(","s",")","using","the","language","model","only","(","no","prediction","head","involved",")",".",":","param","dicts",":","Samples","to","run","inference","on","provided","as","a","list","of","dicts",".","One","dict","per","sample",".",":","type","dicts",":","[","dict","]",":","param","extraction_strategy",":","Strategy","to","extract","vectors",".","Choices",":","'reduce_mean","'","(","mean","sentence","vector",")",",","'reduce_max","'","(","max","per","embedding","dim",")",",","'CLS'",":","type","extraction_strategy",":","str",":","return",":","dict","of","predictions"]
code: def extract_vectors(self, dicts, extraction_strategy="reduce_mean"):
      """
      Converts a text into vector(s) using the language model only (no prediction head involved).
  
      :param dicts: Samples to run inference on provided as a list of dicts. One dict per sample.
      :type dicts: [dict]
      :param extraction_strategy: Strategy to extract vectors. Choices: 'reduce_mean' (mean sentence vector), 'reduce_max' (max per embedding dim), 'CLS'
      :type extraction_strategy: str
      :return: dict of predictions
      """
  
      preds_all = []
      for d in dicts:
          pred = {}
          pred["context"] = d["text"]
          if extraction_strategy == "reduce_mean":
              pred["vec"] = self.model.get_sentence_vector(d["text"])
          else:
              raise NotImplementedError
          preds_all.append(pred)
  
      return preds_all
  
imports: import logging
  import multiprocessing
  import os
  from functools import partial
  import warnings
  import torch
  from torch.utils.data.sampler import SequentialSampler
  from tqdm import tqdm
  from typing import Generator, List, Union
  from farm.data_handler.dataloader import NamedDataLoader
  from farm.data_handler.processor import Processor, InferenceProcessor, NaturalQuestionsProcessor
  from farm.data_handler.utils import grouper
  from farm.data_handler.inputs import QAInput
  from farm.modeling.adaptive_model import AdaptiveModel, BaseAdaptiveModel, ONNXAdaptiveModel
  from farm.modeling.optimization import optimize_model
  from farm.utils import initialize_device_settings, MLFlowLogger
  from farm.utils import set_all_seeds, calc_chunksize, log_ascii_workers, Benchmarker
  from farm.modeling.predictions import QAPred
label_desc: Use image node_id 3 for calling the FasttextInferencer obj's underlying member method code with example usage: obj.extract_vectors(dicts, extraction_strategy) and returns: preds_all