class_docstr: `CandidateGenerator` class to be used for prompt lookup generation. This class generates candidates by looking up
  likely continuations in the provided prompt (input_ids) itself.
  Read the following blog post for more information: https://github.com/apoorvumang/prompt-lookup-decoding
  
  Args:
      max_matching_ngram_size (`int`):
          The maximum ngram size to be considered for matching in the prompt
      num_output_tokens (`int`):
          The number of tokens to be output as candidate tokens.
class_docstr_tok: ["`","CandidateGenerator","`","class","to","be","used","for","prompt","lookup","generation",".","This","class","generates","candidates","by","looking","up","likely","continuations","in","the","provided","prompt","(","input_ids",")","itself",".","Read","the","following","blog","post","for","more","information",":","https",":","\/\/github.com\/apoorvumang\/prompt-lookup-decoding","Args",":","max_matching_ngram_size","(","`","int","`",")",":","The","maximum","ngram","size","to","be","considered","for","matching","in","the","prompt","num_output_tokens","(","`","int","`",")",":","The","number","of","tokens","to","be","output","as","candidate","tokens","."]
docstr: Updates the candidate generation strategy based on the outcomes.
  
  Args:
      input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
          Indices of input sequence tokens in the vocabulary. [What are input IDs?](../glossary#input-ids)
      scores (`torch.FloatTensor` of shape `(batch_size, candidate_length, config.vocab_size)`):
          Prediction scores of a language modeling head. These can be logits for each vocabulary when not using
          beam search or log softmax for each vocabulary token when using beam search
      num_matches (`int`):
          The number of matches between the candidate sequences and the model predictions.
docstr_tok: ["Updates","the","candidate","generation","strategy","based","on","the","outcomes",".","Args",":","input_ids","(","`","torch.LongTensor","`","of","shape","`","(","batch_size",",","sequence_length",")","`",")",":","Indices","of","input","sequence","tokens","in","the","vocabulary",".","[","What","are","input","IDs","?","]","(","..","\/glossary","#","input-ids",")","scores","(","`","torch.FloatTensor","`","of","shape","`","(","batch_size",",","candidate_length",",","config.vocab_size",")","`",")",":","Prediction","scores","of","a","language","modeling","head",".","These","can","be","logits","for","each","vocabulary","when","not","using","beam","search","or","log","softmax","for","each","vocabulary","token","when","using","beam","search","num_matches","(","`","int","`",")",":","The","number","of","matches","between","the","candidate","sequences","and","the","model","predictions","."]
code: def update_candidate_strategy(
      self,
      input_ids: torch.LongTensor,
      scores: torch.FloatTensor,
      num_matches: int,
  ):
      """
      Updates the candidate generation strategy based on the outcomes.
  
      Args:
          input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
              Indices of input sequence tokens in the vocabulary. [What are input IDs?](../glossary#input-ids)
          scores (`torch.FloatTensor` of shape `(batch_size, candidate_length, config.vocab_size)`):
              Prediction scores of a language modeling head. These can be logits for each vocabulary when not using
              beam search or log softmax for each vocabulary token when using beam search
          num_matches (`int`):
              The number of matches between the candidate sequences and the model predictions.
      """
      # Currently does nothing
      return
  
file_path: transformers/src/transformers/generation/candidate_generator.py
imports: import copy
  from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the PromptLookupCandidateGenerator obj's underlying member method code with example usage: obj.update_candidate_strategy(input_ids, scores, num_matches) without return types