docstr: Instantiate a OnnxConfig with `use_past` attribute set to True
  
  Args:
      config: The underlying model's config to use when exporting to ONNX
  
  Returns:
      OnnxConfig with `.use_past = True`
docstr_tok: ["Instantiate","a","OnnxConfig","with","`","use_past","`","attribute","set","to","True","Args",":","config",":","The","underlying","model","'s","config","to","use","when","exporting","to","ONNX","Returns",":","OnnxConfig","with","`",".use_past","=","True","`"]
code: def with_past(
      cls, config: "PretrainedConfig", task: str = "default"
  ) -> "OnnxConfigWithPast":
      """
      Instantiate a OnnxConfig with `use_past` attribute set to True
  
      Args:
          config: The underlying model's config to use when exporting to ONNX
  
      Returns:
          OnnxConfig with `.use_past = True`
      """
      return cls(config, task=task, use_past=True)
  
imports: import copy
  import dataclasses
  import warnings
  from abc import ABC, abstractmethod
  from collections import OrderedDict
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Union
  import numpy
  from packaging import version
  from ..utils import TensorType, is_torch_available, is_vision_available, logging
  from .utils import ParameterFormat, compute_effective_axis_dimension, compute_serialized_parameters_size
label_desc: Use image node_id 2 for calling the OnnxConfigWithPast obj's underlying member method code with example usage: obj.with_past(cls, config, task) and returns: cls