SYMBOL INDEX (30522 symbols across 1110 files) FILE: build_dataset.py function build_instruction_dataset (line 19) | def build_instruction_dataset(data_path: Union[List[str],str], class DataCollatorForSupervisedDataset (line 89) | class DataCollatorForSupervisedDataset(object): method __call__ (line 94) | def __call__(self, instances: Sequence[Dict]) -> Dict[str, torch.Tensor]: FILE: flash_attn_patch.py function forward (line 17) | def forward( function _prepare_decoder_attention_mask (line 105) | def _prepare_decoder_attention_mask( function replace_llama_attn_with_flash_attn (line 112) | def replace_llama_attn_with_flash_attn(): FILE: peft/mapping.py function get_peft_config (line 63) | def get_peft_config(config_dict): function _prepare_prompt_learning_config (line 74) | def _prepare_prompt_learning_config(peft_config, model_config): function _prepare_lora_config (line 116) | def _prepare_lora_config(peft_config, model_config): function get_peft_model (line 129) | def get_peft_model(model, peft_config): FILE: peft/peft_model.py class PeftModel (line 48) | class PeftModel(PushToHubMixin, torch.nn.Module): method __init__ (line 72) | def __init__(self, model, peft_config: PeftConfig): # casualLM, LoraCo... method save_pretrained (line 87) | def save_pretrained(self, save_directory, **kwargs): method from_pretrained (line 120) | def from_pretrained(cls, model, model_id, **kwargs): method _setup_prompt_encoder (line 189) | def _setup_prompt_encoder(self): method get_prompt_embedding_to_save (line 223) | def get_prompt_embedding_to_save(self): method get_prompt (line 234) | def get_prompt(self, batch_size): method print_trainable_parameters (line 268) | def print_trainable_parameters(self): method __getattr__ (line 290) | def __getattr__(self, name: str): method forward (line 297) | def forward(self, *args, **kwargs): # pylint: disable=E0202 method disable_adapter (line 304) | def disable_adapter(self): method get_base_model (line 319) | def get_base_model(self): class PeftModelForSequenceClassification (line 326) | class PeftModelForSequenceClassification(PeftModel): method __init__ (line 352) | def __init__(self, model, peft_config: PeftConfig): method forward (line 364) | def forward( # pylint: disable=W0221 method _prefix_tuning_forward (line 425) | def _prefix_tuning_forward( class PeftModelForCausalLM (line 497) | class PeftModelForCausalLM(PeftModel): method __init__ (line 518) | def __init__(self, model, peft_config: PeftConfig): # casualLM, LoraCo... method forward (line 522) | def forward(# pylint: disable=W0221 method generate (line 584) | def generate(self, **kwargs): method prepare_inputs_for_generation (line 595) | def prepare_inputs_for_generation(self, *args, **kwargs): class PeftModelForSeq2SeqLM (line 613) | class PeftModelForSeq2SeqLM(PeftModel): method __init__ (line 635) | def __init__(self, model, peft_config: PeftConfig): method forward (line 642) | def forward( method generate (line 732) | def generate(self, **kwargs): method prepare_inputs_for_generation (line 771) | def prepare_inputs_for_generation(self, *args, **kwargs): class PeftModelForTokenClassification (line 780) | class PeftModelForTokenClassification(PeftModel): method __init__ (line 806) | def __init__(self, model, peft_config: PeftConfig): method forward (line 818) | def forward( method _prefix_tuning_forward (line 879) | def _prefix_tuning_forward( FILE: peft/tuners/lora.py class LoraConfig (line 32) | class LoraConfig(PeftConfig): method __post_init__ (line 82) | def __post_init__(self): class LoraModel (line 86) | class LoraModel(torch.nn.Module): method __init__ (line 110) | def __init__(self, config, model): # LoraConfig, CasualLM method _find_and_replace (line 118) | def _find_and_replace(self): method _get_submodules (line 161) | def _get_submodules(self, key): method _replace_module (line 167) | def _replace_module(self, parent_module, child_name, new_module, old_m... method __getattr__ (line 181) | def __getattr__(self, name: str): method modules_to_save (line 189) | def modules_to_save(self): method get_peft_config_as_dict (line 192) | def get_peft_config_as_dict(self, inference: bool = False): method _set_adapter_layers (line 198) | def _set_adapter_layers(self, enabled=True): method enable_adapter_layers (line 203) | def enable_adapter_layers(self): method disable_adapter_layers (line 206) | def disable_adapter_layers(self): function mark_only_lora_as_trainable (line 221) | def mark_only_lora_as_trainable(model: nn.Module, bias: str = "none") ->... class LoraLayer (line 239) | class LoraLayer: method __init__ (line 240) | def __init__( class Linear (line 260) | class Linear(nn.Linear, LoraLayer): method __init__ (line 262) | def __init__( method reset_parameters (line 299) | def reset_parameters(self): method train (line 309) | def train(self, mode: bool = True): method eval (line 316) | def eval(self): method cv_squared (line 323) | def cv_squared(self, x): method forward (line 338) | def forward(self, x: torch.Tensor, task_types=None): FILE: peft/tuners/p_tuning.py class PromptEncoderReparameterizationType (line 26) | class PromptEncoderReparameterizationType(str, enum.Enum): class PromptEncoderConfig (line 32) | class PromptEncoderConfig(PromptLearningConfig): method __post_init__ (line 61) | def __post_init__(self): class PromptEncoder (line 67) | class PromptEncoder(torch.nn.Module): method __init__ (line 103) | def __init__(self, config): method forward (line 150) | def forward(self, indices): FILE: peft/tuners/prefix_tuning.py class PrefixTuningConfig (line 25) | class PrefixTuningConfig(PromptLearningConfig): method __post_init__ (line 43) | def __post_init__(self): class PrefixEncoder (line 49) | class PrefixEncoder(torch.nn.Module): method __init__ (line 77) | def __init__(self, config): method forward (line 95) | def forward(self, prefix: torch.Tensor): FILE: peft/tuners/prompt_tuning.py class PromptTuningInit (line 26) | class PromptTuningInit(str, enum.Enum): class PromptTuningConfig (line 32) | class PromptTuningConfig(PromptLearningConfig): method __post_init__ (line 61) | def __post_init__(self): class PromptEmbedding (line 65) | class PromptEmbedding(torch.nn.Module): method __init__ (line 93) | def __init__(self, config, word_embeddings): method forward (line 117) | def forward(self, indices): FILE: peft/utils/config.py class PeftType (line 27) | class PeftType(str, enum.Enum): class TaskType (line 34) | class TaskType(str, enum.Enum): class PeftConfigMixin (line 41) | class PeftConfigMixin(PushToHubMixin): method __dict__ (line 54) | def __dict__(self): method to_dict (line 57) | def to_dict(self): method save_pretrained (line 60) | def save_pretrained(self, save_directory, **kwargs): method from_pretrained (line 84) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method from_json_file (line 113) | def from_json_file(cls, path_json_file, **kwargs): class PeftConfig (line 128) | class PeftConfig(PeftConfigMixin): class PromptLearningConfig (line 145) | class PromptLearningConfig(PeftConfig): FILE: peft/utils/other.py function bloom_model_postprocess_past_key_value (line 20) | def bloom_model_postprocess_past_key_value(past_key_values): function shift_tokens_right (line 39) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _set_trainable (line 60) | def _set_trainable(model): function fsdp_auto_wrap_policy (line 67) | def fsdp_auto_wrap_policy(model): function transpose (line 102) | def transpose(weight, fan_in_fan_out): FILE: peft/utils/save_and_load.py function get_peft_model_state_dict (line 19) | def get_peft_model_state_dict(model, state_dict=None): function set_peft_model_state_dict (line 65) | def set_peft_model_state_dict(model, peft_model_state_dict): FILE: run_loramoe.py class SavePeftModelCallback (line 60) | class SavePeftModelCallback(transformers.TrainerCallback): method save_model (line 61) | def save_model(self, args, state, kwargs): method on_save (line 71) | def on_save(self, args, state, control, **kwargs): method on_train_end (line 75) | def on_train_end(self, args, state, control, **kwargs): function prepare_model_for_kbit_training (line 81) | def prepare_model_for_kbit_training(model, use_gradient_checkpointing=Tr... class ModelArguments (line 122) | class ModelArguments: method __post_init__ (line 191) | def __post_init__(self): class DataTrainingArguments (line 199) | class DataTrainingArguments: class MyTrainingArguments (line 236) | class MyTrainingArguments(TrainingArguments): function main (line 256) | def main(): FILE: transformers/activations.py class PytorchGELUTanh (line 28) | class PytorchGELUTanh(nn.Module): method __init__ (line 37) | def __init__(self): method forward (line 45) | def forward(self, input: Tensor) -> Tensor: class NewGELUActivation (line 49) | class NewGELUActivation(nn.Module): method forward (line 55) | def forward(self, input: Tensor) -> Tensor: class GELUActivation (line 59) | class GELUActivation(nn.Module): method __init__ (line 67) | def __init__(self, use_gelu_python: bool = False): method _gelu_python (line 74) | def _gelu_python(self, input: Tensor) -> Tensor: method forward (line 77) | def forward(self, input: Tensor) -> Tensor: class FastGELUActivation (line 81) | class FastGELUActivation(nn.Module): method forward (line 86) | def forward(self, input: Tensor) -> Tensor: class QuickGELUActivation (line 90) | class QuickGELUActivation(nn.Module): method forward (line 95) | def forward(self, input: Tensor) -> Tensor: class ClippedGELUActivation (line 99) | class ClippedGELUActivation(nn.Module): method __init__ (line 112) | def __init__(self, min: float, max: float): method forward (line 120) | def forward(self, x: Tensor) -> Tensor: class AccurateGELUActivation (line 124) | class AccurateGELUActivation(nn.Module): method __init__ (line 132) | def __init__(self): method forward (line 136) | def forward(self, input: Tensor) -> Tensor: class SiLUActivation (line 140) | class SiLUActivation(nn.Module): method forward (line 149) | def forward(self, input: Tensor) -> Tensor: class MishActivation (line 153) | class MishActivation(nn.Module): method __init__ (line 159) | def __init__(self): method _mish_python (line 166) | def _mish_python(self, input: Tensor) -> Tensor: method forward (line 169) | def forward(self, input: Tensor) -> Tensor: class LinearActivation (line 173) | class LinearActivation(nn.Module): method forward (line 178) | def forward(self, input: Tensor) -> Tensor: class LaplaceActivation (line 182) | class LaplaceActivation(nn.Module): method forward (line 190) | def forward(self, input, mu=0.707107, sigma=0.282095): class ReLUSquaredActivation (line 195) | class ReLUSquaredActivation(nn.Module): method forward (line 200) | def forward(self, input): class ClassInstantier (line 206) | class ClassInstantier(OrderedDict): method __getitem__ (line 207) | def __getitem__(self, key): function get_activation (line 236) | def get_activation(activation_string): FILE: transformers/activations_tf.py function _gelu (line 21) | def _gelu(x): function _gelu_new (line 34) | def _gelu_new(x): function mish (line 52) | def mish(x): function gelu_fast (line 58) | def gelu_fast(x): function quick_gelu (line 66) | def quick_gelu(x): function gelu_10 (line 72) | def gelu_10(x): function glu (line 86) | def glu(x, axis=-1): function approximate_gelu_wrap (line 104) | def approximate_gelu_wrap(x): function get_tf_activation (line 130) | def get_tf_activation(activation_string): FILE: transformers/audio_utils.py function hertz_to_mel (line 25) | def hertz_to_mel(freq: Union[float, np.ndarray], mel_scale: str = "htk")... function mel_to_hertz (line 59) | def mel_to_hertz(mels: Union[float, np.ndarray], mel_scale: str = "htk")... function _create_triangular_filter_bank (line 93) | def _create_triangular_filter_bank(fft_freqs: np.ndarray, filter_freqs: ... function mel_filter_bank (line 115) | def mel_filter_bank( function optimal_fft_length (line 193) | def optimal_fft_length(window_length: int) -> int: function window_function (line 206) | def window_function( function spectrogram (line 267) | def spectrogram( function power_to_db (line 455) | def power_to_db( function amplitude_to_db (line 506) | def amplitude_to_db( function get_mel_filter_banks (line 558) | def get_mel_filter_banks( function fram_wave (line 582) | def fram_wave(waveform: np.array, hop_length: int = 160, fft_window_size... function stft (line 638) | def stft(frames: np.array, windowing_function: np.array, fft_window_size... FILE: transformers/benchmark/benchmark.py class PyTorchBenchmark (line 50) | class PyTorchBenchmark(Benchmark): method framework_version (line 56) | def framework_version(self): method _inference_speed (line 59) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _inference_memory (line 63) | def _inference_memory( method _train_speed (line 69) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _train_memory (line 73) | def _train_memory( method _prepare_inference_func (line 79) | def _prepare_inference_func(self, model_name: str, batch_size: int, se... method _prepare_train_func (line 138) | def _prepare_train_func(self, model_name: str, batch_size: int, sequen... method _measure_speed (line 198) | def _measure_speed(self, func) -> float: method _measure_memory (line 226) | def _measure_memory(self, func: Callable[[], None]) -> [Memory, Memory... FILE: transformers/benchmark/benchmark_args.py class PyTorchBenchmarkArguments (line 35) | class PyTorchBenchmarkArguments(BenchmarkArguments): method __init__ (line 46) | def __init__(self, **kwargs): method _setup_devices (line 78) | def _setup_devices(self) -> Tuple["torch.device", int]: method is_tpu (line 93) | def is_tpu(self): method device_idx (line 97) | def device_idx(self) -> int: method device (line 103) | def device(self) -> "torch.device": method n_gpu (line 108) | def n_gpu(self): method is_gpu (line 113) | def is_gpu(self): FILE: transformers/benchmark/benchmark_args_tf.py class TensorFlowBenchmarkArguments (line 32) | class TensorFlowBenchmarkArguments(BenchmarkArguments): method __init__ (line 43) | def __init__(self, **kwargs): method _setup_tpu (line 79) | def _setup_tpu(self) -> Tuple["tf.distribute.cluster_resolver.TPUClust... method _setup_strategy (line 93) | def _setup_strategy(self) -> Tuple["tf.distribute.Strategy", "tf.distr... method is_tpu (line 113) | def is_tpu(self) -> bool: method strategy (line 118) | def strategy(self) -> "tf.distribute.Strategy": method gpu_list (line 123) | def gpu_list(self): method n_gpu (line 128) | def n_gpu(self) -> int: method is_gpu (line 135) | def is_gpu(self) -> bool: FILE: transformers/benchmark/benchmark_args_utils.py function list_field (line 30) | def list_field(default=None, metadata=None): class BenchmarkArguments (line 35) | class BenchmarkArguments: method __post_init__ (line 135) | def __post_init__(self): method to_json_string (line 143) | def to_json_string(self): method model_names (line 150) | def model_names(self): method do_multi_processing (line 158) | def do_multi_processing(self): FILE: transformers/benchmark/benchmark_tf.py function run_with_tf_optimizations (line 51) | def run_with_tf_optimizations(do_eager_mode: bool, use_xla: bool): function random_input_ids (line 73) | def random_input_ids(batch_size: int, sequence_length: int, vocab_size: ... class TensorFlowBenchmark (line 79) | class TensorFlowBenchmark(Benchmark): method framework_version (line 85) | def framework_version(self): method _inference_speed (line 88) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _train_speed (line 95) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _inference_memory (line 101) | def _inference_memory( method _train_memory (line 112) | def _train_memory( method _prepare_inference_func (line 123) | def _prepare_inference_func(self, model_name: str, batch_size: int, se... method _prepare_train_func (line 164) | def _prepare_train_func(self, model_name: str, batch_size: int, sequen... method _measure_speed (line 213) | def _measure_speed(self, func) -> float: method _measure_memory (line 232) | def _measure_memory(self, func: Callable[[], None]) -> [Memory, Memory... FILE: transformers/benchmark/benchmark_utils.py function separate_process_wrapper_fn (line 76) | def separate_process_wrapper_fn(func: Callable[[], None], do_multi_proce... function is_memory_tracing_enabled (line 112) | def is_memory_tracing_enabled(): class Frame (line 117) | class Frame(NamedTuple): class UsedMemoryState (line 135) | class UsedMemoryState(NamedTuple): class Memory (line 151) | class Memory(NamedTuple): method __repr__ (line 161) | def __repr__(self) -> str: class MemoryState (line 165) | class MemoryState(NamedTuple): class MemorySummary (line 181) | class MemorySummary(NamedTuple): function measure_peak_memory_cpu (line 204) | def measure_peak_memory_cpu(function: Callable[[], None], interval=0.5, ... function start_memory_tracing (line 323) | def start_memory_tracing( function stop_memory_tracing (line 475) | def stop_memory_tracing( function bytes_to_mega_bytes (line 591) | def bytes_to_mega_bytes(memory_amount: int) -> int: class Benchmark (line 596) | class Benchmark(ABC): method __init__ (line 606) | def __init__(self, args: BenchmarkArguments = None, configs: Pretraine... method print_fn (line 633) | def print_fn(self): method framework_version (line 649) | def framework_version(self): method _inference_speed (line 653) | def _inference_speed(self, model_name: str, batch_size: int, sequence_... method _train_speed (line 657) | def _train_speed(self, model_name: str, batch_size: int, sequence_leng... method _inference_memory (line 661) | def _inference_memory( method _train_memory (line 667) | def _train_memory( method inference_speed (line 672) | def inference_speed(self, *args, **kwargs) -> float: method train_speed (line 675) | def train_speed(self, *args, **kwargs) -> float: method inference_memory (line 678) | def inference_memory(self, *args, **kwargs) -> [Memory, Optional[Memor... method train_memory (line 681) | def train_memory(self, *args, **kwargs) -> [Memory, Optional[MemorySum... method run (line 684) | def run(self): method environment_info (line 784) | def environment_info(self): method print_results (line 842) | def print_results(self, result_dict, type_label): method print_memory_trace_statistics (line 864) | def print_memory_trace_statistics(self, summary: MemorySummary): method save_to_csv (line 888) | def save_to_csv(self, result_dict, filename): FILE: transformers/commands/__init__.py class BaseTransformersCLICommand (line 19) | class BaseTransformersCLICommand(ABC): method register_subcommand (line 22) | def register_subcommand(parser: ArgumentParser): method run (line 26) | def run(self): FILE: transformers/commands/add_new_model.py function add_new_model_command_factory (line 37) | def add_new_model_command_factory(args: Namespace): class AddNewModelCommand (line 41) | class AddNewModelCommand(BaseTransformersCLICommand): method register_subcommand (line 43) | def register_subcommand(parser: ArgumentParser): method __init__ (line 52) | def __init__(self, testing: bool, testing_file: str, path=None, *args): method run (line 57) | def run(self): FILE: transformers/commands/add_new_model_like.py class ModelPatterns (line 41) | class ModelPatterns: method __post_init__ (line 86) | def __post_init__(self): function is_empty_line (line 119) | def is_empty_line(line: str) -> bool: function find_indent (line 126) | def find_indent(line: str) -> int: function parse_module_content (line 136) | def parse_module_content(content: str) -> List[str]: function extract_block (line 176) | def extract_block(content: str, indent_level: int = 0) -> str: function add_content_to_text (line 226) | def add_content_to_text( function add_content_to_file (line 284) | def add_content_to_file( function replace_model_patterns (line 322) | def replace_model_patterns( function simplify_replacements (line 388) | def simplify_replacements(replacements): function get_module_from_file (line 425) | def get_module_from_file(module_file: Union[str, os.PathLike]) -> str: function remove_attributes (line 455) | def remove_attributes(obj, target_attr): function duplicate_module (line 495) | def duplicate_module( function filter_framework_files (line 595) | def filter_framework_files( function get_model_files (line 628) | def get_model_files(model_type: str, frameworks: Optional[List[str]] = N... function find_base_model_checkpoint (line 673) | def find_base_model_checkpoint( function get_default_frameworks (line 707) | def get_default_frameworks(): function retrieve_model_classes (line 724) | def retrieve_model_classes(model_type: str, frameworks: Optional[List[st... function retrieve_info_for_model (line 765) | def retrieve_info_for_model(model_type, frameworks: Optional[List[str]] ... function clean_frameworks_in_init (line 850) | def clean_frameworks_in_init( function add_model_to_main_init (line 929) | def add_model_to_main_init( function insert_tokenizer_in_auto_module (line 1018) | def insert_tokenizer_in_auto_module(old_model_patterns: ModelPatterns, n... function add_model_to_auto_classes (line 1080) | def add_model_to_auto_classes( function duplicate_doc_file (line 1173) | def duplicate_doc_file( function create_new_model_like (line 1271) | def create_new_model_like( function add_new_model_like_command_factory (line 1447) | def add_new_model_like_command_factory(args: Namespace): class AddNewModelLikeCommand (line 1451) | class AddNewModelLikeCommand(BaseTransformersCLICommand): method register_subcommand (line 1453) | def register_subcommand(parser: ArgumentParser): method __init__ (line 1463) | def __init__(self, config_file=None, path_to_repo=None, *args): method run (line 1483) | def run(self): function get_user_field (line 1501) | def get_user_field( function convert_to_bool (line 1553) | def convert_to_bool(x: str) -> bool: function get_user_input (line 1564) | def get_user_input(): FILE: transformers/commands/convert.py function convert_command_factory (line 21) | def convert_command_factory(args: Namespace): class ConvertCommand (line 38) | class ConvertCommand(BaseTransformersCLICommand): method register_subcommand (line 40) | def register_subcommand(parser: ArgumentParser): method __init__ (line 67) | def __init__( method run (line 85) | def run(self): FILE: transformers/commands/download.py function download_command_factory (line 20) | def download_command_factory(args): class DownloadCommand (line 24) | class DownloadCommand(BaseTransformersCLICommand): method register_subcommand (line 26) | def register_subcommand(parser: ArgumentParser): method __init__ (line 37) | def __init__(self, model: str, cache: str, force: bool): method run (line 42) | def run(self): FILE: transformers/commands/env.py function info_command_factory (line 26) | def info_command_factory(_): class EnvironmentCommand (line 30) | class EnvironmentCommand(BaseTransformersCLICommand): method register_subcommand (line 32) | def register_subcommand(parser: ArgumentParser): method run (line 36) | def run(self): method format_dict (line 103) | def format_dict(d): FILE: transformers/commands/lfs.py class LfsCommands (line 36) | class LfsCommands(BaseTransformersCLICommand): method register_subcommand (line 55) | def register_subcommand(parser: ArgumentParser): class LfsEnableCommand (line 75) | class LfsEnableCommand: method __init__ (line 76) | def __init__(self, args): method run (line 79) | def run(self): function write_msg (line 98) | def write_msg(msg: Dict): function read_msg (line 105) | def read_msg() -> Optional[Dict]: class FileSlice (line 120) | class FileSlice(AbstractContextManager): method __init__ (line 127) | def __init__(self, filepath: str, seek_from: int, read_limit: int): method __enter__ (line 133) | def __enter__(self): method __len__ (line 138) | def __len__(self): method read (line 142) | def read(self, n=-1): method __iter__ (line 150) | def __iter__(self): method __exit__ (line 153) | def __exit__(self, *args): class LfsUploadCommand (line 157) | class LfsUploadCommand: method __init__ (line 158) | def __init__(self, args): method run (line 161) | def run(self): FILE: transformers/commands/pt_to_tf.py function convert_command_factory (line 57) | def convert_command_factory(args: Namespace): class PTtoTFCommand (line 75) | class PTtoTFCommand(BaseTransformersCLICommand): method register_subcommand (line 77) | def register_subcommand(parser: ArgumentParser): method find_pt_tf_differences (line 140) | def find_pt_tf_differences(pt_outputs, tf_outputs): method __init__ (line 177) | def __init__( method get_inputs (line 199) | def get_inputs(self, pt_model, tf_dummy_inputs, config): method run (line 269) | def run(self): FILE: transformers/commands/run.py function try_infer_format_from_ext (line 25) | def try_infer_format_from_ext(path: str): function run_command_factory (line 39) | def run_command_factory(args): class RunCommand (line 58) | class RunCommand(BaseTransformersCLICommand): method __init__ (line 59) | def __init__(self, nlp: Pipeline, reader: PipelineDataFormat): method register_subcommand (line 64) | def register_subcommand(parser: ArgumentParser): method run (line 95) | def run(self): FILE: transformers/commands/serving.py function Body (line 34) | def Body(*x, **y): function serve_command_factory (line 43) | def serve_command_factory(args: Namespace): class ServeModelInfoResult (line 59) | class ServeModelInfoResult(BaseModel): class ServeTokenizeResult (line 67) | class ServeTokenizeResult(BaseModel): class ServeDeTokenizeResult (line 76) | class ServeDeTokenizeResult(BaseModel): class ServeForwardResult (line 84) | class ServeForwardResult(BaseModel): class ServeCommand (line 92) | class ServeCommand(BaseTransformersCLICommand): method register_subcommand (line 94) | def register_subcommand(parser: ArgumentParser): method __init__ (line 124) | def __init__(self, pipeline: Pipeline, host: str, port: int, workers: ... method run (line 173) | def run(self): method model_info (line 176) | def model_info(self): method tokenize (line 179) | def tokenize(self, text_input: str = Body(None, embed=True), return_id... method detokenize (line 197) | def detokenize( method forward (line 214) | async def forward(self, inputs=Body(None, embed=True)): FILE: transformers/commands/train.py function train_command_factory (line 32) | def train_command_factory(args: Namespace): class TrainCommand (line 41) | class TrainCommand(BaseTransformersCLICommand): method register_subcommand (line 43) | def register_subcommand(parser: ArgumentParser): method __init__ (line 93) | def __init__(self, args: Namespace): method run (line 138) | def run(self): method run_torch (line 143) | def run_torch(self): method run_tf (line 146) | def run_tf(self): FILE: transformers/commands/transformers_cli.py function main (line 30) | def main(): FILE: transformers/commands/user.py class UserCommands (line 25) | class UserCommands(BaseTransformersCLICommand): method register_subcommand (line 27) | def register_subcommand(parser: ArgumentParser): class ANSI (line 56) | class ANSI: method bold (line 67) | def bold(cls, s): method red (line 71) | def red(cls, s): method gray (line 75) | def gray(cls, s): function tabulate (line 79) | def tabulate(rows: List[List[Union[str, int]]], headers: List[str]) -> str: class BaseUserCommand (line 96) | class BaseUserCommand: method __init__ (line 97) | def __init__(self, args): class LoginCommand (line 101) | class LoginCommand(BaseUserCommand): method run (line 102) | def run(self): class WhoamiCommand (line 112) | class WhoamiCommand(BaseUserCommand): method run (line 113) | def run(self): class LogoutCommand (line 135) | class LogoutCommand(BaseUserCommand): method run (line 136) | def run(self): class RepoCreateCommand (line 146) | class RepoCreateCommand(BaseUserCommand): method run (line 147) | def run(self): FILE: transformers/configuration_utils.py class PretrainedConfig (line 49) | class PretrainedConfig(PushToHubMixin): method __setattr__ (line 253) | def __setattr__(self, key, value): method __getattribute__ (line 258) | def __getattribute__(self, key): method __init__ (line 263) | def __init__(self, **kwargs): method name_or_path (line 395) | def name_or_path(self) -> str: method name_or_path (line 399) | def name_or_path(self, value): method use_return_dict (line 403) | def use_return_dict(self) -> bool: method num_labels (line 411) | def num_labels(self) -> int: method num_labels (line 418) | def num_labels(self, num_labels: int): method save_pretrained (line 423) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method from_pretrained (line 470) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method get_config_dict (line 557) | def get_config_dict( method _get_config_dict (line 588) | def _get_config_dict( method from_dict (line 678) | def from_dict(cls, config_dict: Dict[str, Any], **kwargs) -> "Pretrain... method from_json_file (line 732) | def from_json_file(cls, json_file: Union[str, os.PathLike]) -> "Pretra... method _dict_from_json_file (line 748) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method __eq__ (line 753) | def __eq__(self, other): method __repr__ (line 756) | def __repr__(self): method to_diff_dict (line 759) | def to_diff_dict(self) -> Dict[str, Any]: method to_dict (line 798) | def to_dict(self) -> Dict[str, Any]: method to_json_string (line 827) | def to_json_string(self, use_diff: bool = True) -> str: method to_json_file (line 845) | def to_json_file(self, json_file_path: Union[str, os.PathLike], use_di... method update (line 859) | def update(self, config_dict: Dict[str, Any]): method update_from_string (line 869) | def update_from_string(self, update_str: str): method dict_torch_dtype_to_str (line 907) | def dict_torch_dtype_to_str(self, d: Dict[str, Any]) -> None: method register_for_auto_class (line 920) | def register_for_auto_class(cls, auto_class="AutoConfig"): function get_configuration_file (line 946) | def get_configuration_file(configuration_files: List[str]) -> str: FILE: transformers/convert_graph_to_onnx.py class OnnxConverterArgumentParser (line 46) | class OnnxConverterArgumentParser(ArgumentParser): method __init__ (line 51) | def __init__(self): function generate_identified_filename (line 92) | def generate_identified_filename(filename: Path, identifier: str) -> Path: function check_onnxruntime_requirements (line 105) | def check_onnxruntime_requirements(minimum_version: Version): function ensure_valid_input (line 134) | def ensure_valid_input(model, tokens, input_names): function infer_shapes (line 162) | def infer_shapes(nlp: Pipeline, framework: str) -> Tuple[List[str], List... function load_graph_from_args (line 226) | def load_graph_from_args( function convert_pytorch (line 257) | def convert_pytorch(nlp: Pipeline, opset: int, output: Path, use_externa... function convert_tensorflow (line 312) | def convert_tensorflow(nlp: Pipeline, opset: int, output: Path): function convert (line 352) | def convert( function optimize (line 402) | def optimize(onnx_model_path: Path) -> Path: function quantize (line 427) | def quantize(onnx_model_path: Path) -> Path: function verify (line 502) | def verify(path: Path): FILE: transformers/convert_pytorch_checkpoint_to_tf2.py function convert_pt_checkpoint_to_tf (line 304) | def convert_pt_checkpoint_to_tf( function convert_all_pt_checkpoints_to_tf (line 351) | def convert_all_pt_checkpoints_to_tf( FILE: transformers/convert_slow_tokenizer.py class SentencePieceExtractor (line 31) | class SentencePieceExtractor: method __init__ (line 36) | def __init__(self, model: str): method extract (line 43) | def extract(self, vocab_scores=None) -> Tuple[Dict[str, int], List[Tup... function check_number_comma (line 68) | def check_number_comma(piece: str) -> bool: class Converter (line 72) | class Converter: method __init__ (line 73) | def __init__(self, original_tokenizer): method converted (line 76) | def converted(self) -> Tokenizer: class BertConverter (line 80) | class BertConverter(Converter): method converted (line 81) | def converted(self) -> Tokenizer: class SplinterConverter (line 119) | class SplinterConverter(Converter): method converted (line 120) | def converted(self) -> Tokenizer: class FunnelConverter (line 169) | class FunnelConverter(Converter): method converted (line 170) | def converted(self) -> Tokenizer: class MPNetConverter (line 208) | class MPNetConverter(Converter): method converted (line 209) | def converted(self) -> Tokenizer: class OpenAIGPTConverter (line 247) | class OpenAIGPTConverter(Converter): method converted (line 248) | def converted(self) -> Tokenizer: class GPT2Converter (line 274) | class GPT2Converter(Converter): method converted (line 275) | def converted(self) -> Tokenizer: class HerbertConverter (line 309) | class HerbertConverter(Converter): method converted (line 310) | def converted(self) -> Tokenizer: class RobertaConverter (line 340) | class RobertaConverter(Converter): method converted (line 341) | def converted(self) -> Tokenizer: class RoFormerConverter (line 369) | class RoFormerConverter(Converter): method converted (line 370) | def converted(self) -> Tokenizer: class DebertaConverter (line 408) | class DebertaConverter(Converter): method converted (line 409) | def converted(self) -> Tokenizer: class SpmConverter (line 439) | class SpmConverter(Converter): method __init__ (line 440) | def __init__(self, *args): method vocab (line 461) | def vocab(self, proto): method unk_id (line 464) | def unk_id(self, proto): method tokenizer (line 467) | def tokenizer(self, proto): method normalizer (line 492) | def normalizer(self, proto): method pre_tokenizer (line 501) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 504) | def post_processor(self): method decoder (line 507) | def decoder(self, replacement, add_prefix_space): method converted (line 510) | def converted(self) -> Tokenizer: class AlbertConverter (line 532) | class AlbertConverter(SpmConverter): method vocab (line 533) | def vocab(self, proto): method normalizer (line 539) | def normalizer(self, proto): method post_processor (line 555) | def post_processor(self): class BarthezConverter (line 566) | class BarthezConverter(SpmConverter): method unk_id (line 567) | def unk_id(self, proto): method post_processor (line 571) | def post_processor(self): class CamembertConverter (line 582) | class CamembertConverter(SpmConverter): method vocab (line 583) | def vocab(self, proto): method unk_id (line 596) | def unk_id(self, proto): method post_processor (line 600) | def post_processor(self): class DebertaV2Converter (line 611) | class DebertaV2Converter(SpmConverter): method pre_tokenizer (line 612) | def pre_tokenizer(self, replacement, add_prefix_space): method normalizer (line 619) | def normalizer(self, proto): method post_processor (line 632) | def post_processor(self): class MBartConverter (line 643) | class MBartConverter(SpmConverter): method vocab (line 644) | def vocab(self, proto): method unk_id (line 682) | def unk_id(self, proto): method post_processor (line 685) | def post_processor(self): class MBart50Converter (line 696) | class MBart50Converter(SpmConverter): method vocab (line 697) | def vocab(self, proto): method unk_id (line 711) | def unk_id(self, proto): method post_processor (line 714) | def post_processor(self): class NllbConverter (line 725) | class NllbConverter(SpmConverter): method vocab (line 726) | def vocab(self, proto): method unk_id (line 742) | def unk_id(self, proto): method post_processor (line 745) | def post_processor(self): class XLMRobertaConverter (line 756) | class XLMRobertaConverter(SpmConverter): method vocab (line 757) | def vocab(self, proto): method unk_id (line 768) | def unk_id(self, proto): method post_processor (line 772) | def post_processor(self): class XLNetConverter (line 783) | class XLNetConverter(SpmConverter): method vocab (line 784) | def vocab(self, proto): method normalizer (line 790) | def normalizer(self, proto): method post_processor (line 806) | def post_processor(self): class ReformerConverter (line 817) | class ReformerConverter(SpmConverter): class RemBertConverter (line 821) | class RemBertConverter(SpmConverter): method normalizer (line 823) | def normalizer(self, proto): method post_processor (line 839) | def post_processor(self): class BertGenerationConverter (line 850) | class BertGenerationConverter(SpmConverter): class PegasusConverter (line 854) | class PegasusConverter(SpmConverter): method vocab (line 855) | def vocab(self, proto): method unk_id (line 874) | def unk_id(self, proto): method pre_tokenizer (line 877) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 885) | def post_processor(self): class T5Converter (line 893) | class T5Converter(SpmConverter): method vocab (line 894) | def vocab(self, proto): method post_processor (line 900) | def post_processor(self): class WhisperConverter (line 910) | class WhisperConverter(Converter): method converted (line 911) | def converted(self) -> Tokenizer: class BigBirdConverter (line 946) | class BigBirdConverter(SpmConverter): method post_processor (line 947) | def post_processor(self): class CLIPConverter (line 958) | class CLIPConverter(Converter): method converted (line 959) | def converted(self) -> Tokenizer: class LayoutLMv2Converter (line 1001) | class LayoutLMv2Converter(Converter): method converted (line 1002) | def converted(self) -> Tokenizer: class BlenderbotConverter (line 1040) | class BlenderbotConverter(Converter): method converted (line 1041) | def converted(self) -> Tokenizer: class XGLMConverter (line 1069) | class XGLMConverter(SpmConverter): method vocab (line 1070) | def vocab(self, proto): method unk_id (line 1083) | def unk_id(self, proto): method post_processor (line 1087) | def post_processor(self): class LlamaConverter (line 1098) | class LlamaConverter(SpmConverter): method vocab (line 1101) | def vocab(self, proto): method unk_id (line 1110) | def unk_id(self, proto): method decoder (line 1114) | def decoder(self, replacement, add_prefix_space): method tokenizer (line 1124) | def tokenizer(self, proto): method normalizer (line 1149) | def normalizer(self, proto): method pre_tokenizer (line 1157) | def pre_tokenizer(self, replacement, add_prefix_space): method post_processor (line 1160) | def post_processor(self): class MarkupLMConverter (line 1189) | class MarkupLMConverter(Converter): method converted (line 1190) | def converted(self) -> Tokenizer: function convert_slow_tokenizer (line 1282) | def convert_slow_tokenizer(transformer_tokenizer) -> Tokenizer: FILE: transformers/convert_slow_tokenizers_checkpoints_to_fast.py function convert_slow_checkpoint_to_fast (line 34) | def convert_slow_checkpoint_to_fast(tokenizer_name, checkpoint_name, dum... FILE: transformers/convert_tf_hub_seq_to_seq_bert_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 33) | def convert_tf_checkpoint_to_pytorch(tf_hub_path, pytorch_dump_path, is_... FILE: transformers/data/data_collator.py class DataCollatorMixin (line 38) | class DataCollatorMixin: method __call__ (line 39) | def __call__(self, features, return_tensors=None): function default_data_collator (line 52) | def default_data_collator(features: List[InputDataClass], return_tensors... class DefaultDataCollator (line 78) | class DefaultDataCollator(DataCollatorMixin): method __call__ (line 99) | def __call__(self, features: List[Dict[str, Any]], return_tensors=None... function torch_default_data_collator (line 105) | def torch_default_data_collator(features: List[InputDataClass]) -> Dict[... function tf_default_data_collator (line 141) | def tf_default_data_collator(features: List[InputDataClass]) -> Dict[str... function numpy_default_data_collator (line 182) | def numpy_default_data_collator(features: List[InputDataClass]) -> Dict[... class DataCollatorWithPadding (line 215) | class DataCollatorWithPadding: method __call__ (line 248) | def __call__(self, features: List[Dict[str, Any]]) -> Dict[str, Any]: class DataCollatorForTokenClassification (line 266) | class DataCollatorForTokenClassification(DataCollatorMixin): method torch_call (line 302) | def torch_call(self, features): method tf_call (line 341) | def tf_call(self, features): method numpy_call (line 372) | def numpy_call(self, features): function _torch_collate_batch (line 402) | def _torch_collate_batch(examples, tokenizer, pad_to_multiple_of: Option... function _tf_collate_batch (line 438) | def _tf_collate_batch(examples, tokenizer, pad_to_multiple_of: Optional[... function _numpy_collate_batch (line 476) | def _numpy_collate_batch(examples, tokenizer, pad_to_multiple_of: Option... function tolist (line 508) | def tolist(x): class DataCollatorForSeq2Seq (line 517) | class DataCollatorForSeq2Seq: method __call__ (line 559) | def __call__(self, features, return_tensors=None): class DataCollatorForLanguageModeling (line 607) | class DataCollatorForLanguageModeling(DataCollatorMixin): method __post_init__ (line 641) | def __post_init__(self): method tf_bernoulli (line 653) | def tf_bernoulli(shape, probability): method tf_mask_tokens (line 659) | def tf_mask_tokens( method tf_call (line 690) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method torch_call (line 729) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method torch_mask_tokens (line 751) | def torch_mask_tokens(self, inputs: Any, special_tokens_mask: Optional... method numpy_call (line 784) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method numpy_mask_tokens (line 806) | def numpy_mask_tokens(self, inputs: Any, special_tokens_mask: Optional... class DataCollatorForWholeWordMask (line 845) | class DataCollatorForWholeWordMask(DataCollatorForLanguageModeling): method torch_call (line 860) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method tf_call (line 888) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method numpy_call (line 918) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method _whole_word_mask (line 946) | def _whole_word_mask(self, input_tokens: List[str], max_predictions=512): method torch_mask_tokens (line 993) | def torch_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[An... method tf_mask_tokens (line 1033) | def tf_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[Any, ... method numpy_mask_tokens (line 1075) | def numpy_mask_tokens(self, inputs: Any, mask_labels: Any) -> Tuple[An... class DataCollatorForSOP (line 1117) | class DataCollatorForSOP(DataCollatorForLanguageModeling): method __init__ (line 1125) | def __init__(self, *args, **kwargs): method __call__ (line 1132) | def __call__(self, examples: List[Dict[str, Any]]) -> Dict[str, Any]: method mask_tokens (line 1155) | def mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any]: class DataCollatorForPermutationLanguageModeling (line 1200) | class DataCollatorForPermutationLanguageModeling(DataCollatorMixin): method torch_call (line 1213) | def torch_call(self, examples: List[Union[List[int], Any, Dict[str, An... method tf_call (line 1220) | def tf_call(self, examples: List[Union[List[int], Any, Dict[str, Any]]... method numpy_call (line 1227) | def numpy_call(self, examples: List[Union[List[int], Any, Dict[str, An... method torch_mask_tokens (line 1234) | def torch_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: method tf_mask_tokens (line 1333) | def tf_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: method numpy_mask_tokens (line 1440) | def numpy_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]: FILE: transformers/data/datasets/glue.py class GlueDataTrainingArguments (line 36) | class GlueDataTrainingArguments: method __post_init__ (line 61) | def __post_init__(self): class Split (line 65) | class Split(Enum): class GlueDataset (line 71) | class GlueDataset(Dataset): method __init__ (line 80) | def __init__( method __len__ (line 154) | def __len__(self): method __getitem__ (line 157) | def __getitem__(self, i) -> InputFeatures: method get_labels (line 160) | def get_labels(self): FILE: transformers/data/datasets/language_modeling.py class TextDataset (line 40) | class TextDataset(Dataset): method __init__ (line 45) | def __init__( method __len__ (line 106) | def __len__(self): method __getitem__ (line 109) | def __getitem__(self, i) -> torch.Tensor: class LineByLineTextDataset (line 113) | class LineByLineTextDataset(Dataset): method __init__ (line 118) | def __init__(self, tokenizer: PreTrainedTokenizer, file_path: str, blo... method __len__ (line 139) | def __len__(self): method __getitem__ (line 142) | def __getitem__(self, i) -> Dict[str, torch.tensor]: class LineByLineWithRefDataset (line 146) | class LineByLineWithRefDataset(Dataset): method __init__ (line 151) | def __init__(self, tokenizer: PreTrainedTokenizer, file_path: str, blo... method __len__ (line 187) | def __len__(self): method __getitem__ (line 190) | def __getitem__(self, i) -> Dict[str, torch.tensor]: class LineByLineWithSOPTextDataset (line 194) | class LineByLineWithSOPTextDataset(Dataset): method __init__ (line 199) | def __init__(self, tokenizer: PreTrainedTokenizer, file_dir: str, bloc... method create_examples_from_document (line 240) | def create_examples_from_document(self, document, block_size, tokenize... method __len__ (line 339) | def __len__(self): method __getitem__ (line 342) | def __getitem__(self, i) -> Dict[str, torch.tensor]: class TextDatasetForNextSentencePrediction (line 346) | class TextDatasetForNextSentencePrediction(Dataset): method __init__ (line 351) | def __init__( method create_examples_from_document (line 436) | def create_examples_from_document(self, document: List[List[int]], doc... method __len__ (line 526) | def __len__(self): method __getitem__ (line 529) | def __getitem__(self, i): FILE: transformers/data/datasets/squad.py class SquadDataTrainingArguments (line 38) | class SquadDataTrainingArguments: class Split (line 104) | class Split(Enum): class SquadDataset (line 109) | class SquadDataset(Dataset): method __init__ (line 119) | def __init__( method __len__ (line 194) | def __len__(self): method __getitem__ (line 197) | def __getitem__(self, i) -> Dict[str, torch.Tensor]: FILE: transformers/data/metrics/__init__.py function simple_accuracy (line 30) | def simple_accuracy(preds, labels): function acc_and_f1 (line 36) | def acc_and_f1(preds, labels): function pearson_and_spearman (line 48) | def pearson_and_spearman(preds, labels): function glue_compute_metrics (line 60) | def glue_compute_metrics(task_name, preds, labels): function xnli_compute_metrics (line 90) | def xnli_compute_metrics(task_name, preds, labels): FILE: transformers/data/metrics/squad_metrics.py function normalize_answer (line 37) | def normalize_answer(s): function get_tokens (line 57) | def get_tokens(s): function compute_exact (line 63) | def compute_exact(a_gold, a_pred): function compute_f1 (line 67) | def compute_f1(a_gold, a_pred): function get_raw_scores (line 83) | def get_raw_scores(examples, preds): function apply_no_ans_threshold (line 109) | def apply_no_ans_threshold(scores, na_probs, qid_to_has_ans, na_prob_thr... function make_eval_dict (line 120) | def make_eval_dict(exact_scores, f1_scores, qid_list=None): function merge_eval (line 141) | def merge_eval(main_eval, new_eval, prefix): function find_best_thresh_v2 (line 146) | def find_best_thresh_v2(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh_v2 (line 180) | def find_all_best_thresh_v2(main_eval, preds, exact_raw, f1_raw, na_prob... function find_best_thresh (line 191) | def find_best_thresh(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh (line 214) | def find_all_best_thresh(main_eval, preds, exact_raw, f1_raw, na_probs, ... function squad_evaluate (line 224) | def squad_evaluate(examples, preds, no_answer_probs=None, no_answer_prob... function get_final_text (line 255) | def get_final_text(pred_text, orig_text, do_lower_case, verbose_logging=... function _get_best_indexes (line 349) | def _get_best_indexes(logits, n_best_size): function _compute_softmax (line 361) | def _compute_softmax(scores): function compute_predictions_logits (line 384) | def compute_predictions_logits( function compute_predictions_log_probs (line 591) | def compute_predictions_log_probs( FILE: transformers/data/processors/glue.py function glue_convert_examples_to_features (line 41) | def glue_convert_examples_to_features( function _tf_glue_convert_examples_to_features (line 78) | def _tf_glue_convert_examples_to_features( function _glue_convert_examples_to_features (line 109) | def _glue_convert_examples_to_features( class OutputMode (line 164) | class OutputMode(Enum): class MrpcProcessor (line 169) | class MrpcProcessor(DataProcessor): method __init__ (line 172) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 176) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 185) | def get_train_examples(self, data_dir): method get_dev_examples (line 190) | def get_dev_examples(self, data_dir): method get_test_examples (line 194) | def get_test_examples(self, data_dir): method get_labels (line 198) | def get_labels(self): method _create_examples (line 202) | def _create_examples(self, lines, set_type): class MnliProcessor (line 216) | class MnliProcessor(DataProcessor): method __init__ (line 219) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 223) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 232) | def get_train_examples(self, data_dir): method get_dev_examples (line 236) | def get_dev_examples(self, data_dir): method get_test_examples (line 240) | def get_test_examples(self, data_dir): method get_labels (line 244) | def get_labels(self): method _create_examples (line 248) | def _create_examples(self, lines, set_type): class MnliMismatchedProcessor (line 262) | class MnliMismatchedProcessor(MnliProcessor): method __init__ (line 265) | def __init__(self, *args, **kwargs): method get_dev_examples (line 269) | def get_dev_examples(self, data_dir): method get_test_examples (line 273) | def get_test_examples(self, data_dir): class ColaProcessor (line 278) | class ColaProcessor(DataProcessor): method __init__ (line 281) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 285) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 294) | def get_train_examples(self, data_dir): method get_dev_examples (line 298) | def get_dev_examples(self, data_dir): method get_test_examples (line 302) | def get_test_examples(self, data_dir): method get_labels (line 306) | def get_labels(self): method _create_examples (line 310) | def _create_examples(self, lines, set_type): class Sst2Processor (line 325) | class Sst2Processor(DataProcessor): method __init__ (line 328) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 332) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 341) | def get_train_examples(self, data_dir): method get_dev_examples (line 345) | def get_dev_examples(self, data_dir): method get_test_examples (line 349) | def get_test_examples(self, data_dir): method get_labels (line 353) | def get_labels(self): method _create_examples (line 357) | def _create_examples(self, lines, set_type): class StsbProcessor (line 371) | class StsbProcessor(DataProcessor): method __init__ (line 374) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 378) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 387) | def get_train_examples(self, data_dir): method get_dev_examples (line 391) | def get_dev_examples(self, data_dir): method get_test_examples (line 395) | def get_test_examples(self, data_dir): method get_labels (line 399) | def get_labels(self): method _create_examples (line 403) | def _create_examples(self, lines, set_type): class QqpProcessor (line 417) | class QqpProcessor(DataProcessor): method __init__ (line 420) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 424) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 433) | def get_train_examples(self, data_dir): method get_dev_examples (line 437) | def get_dev_examples(self, data_dir): method get_test_examples (line 441) | def get_test_examples(self, data_dir): method get_labels (line 445) | def get_labels(self): method _create_examples (line 449) | def _create_examples(self, lines, set_type): class QnliProcessor (line 469) | class QnliProcessor(DataProcessor): method __init__ (line 472) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 476) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 485) | def get_train_examples(self, data_dir): method get_dev_examples (line 489) | def get_dev_examples(self, data_dir): method get_test_examples (line 493) | def get_test_examples(self, data_dir): method get_labels (line 497) | def get_labels(self): method _create_examples (line 501) | def _create_examples(self, lines, set_type): class RteProcessor (line 515) | class RteProcessor(DataProcessor): method __init__ (line 518) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 522) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 531) | def get_train_examples(self, data_dir): method get_dev_examples (line 535) | def get_dev_examples(self, data_dir): method get_test_examples (line 539) | def get_test_examples(self, data_dir): method get_labels (line 543) | def get_labels(self): method _create_examples (line 547) | def _create_examples(self, lines, set_type): class WnliProcessor (line 561) | class WnliProcessor(DataProcessor): method __init__ (line 564) | def __init__(self, *args, **kwargs): method get_example_from_tensor_dict (line 568) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 577) | def get_train_examples(self, data_dir): method get_dev_examples (line 581) | def get_dev_examples(self, data_dir): method get_test_examples (line 585) | def get_test_examples(self, data_dir): method get_labels (line 589) | def get_labels(self): method _create_examples (line 593) | def _create_examples(self, lines, set_type): FILE: transformers/data/processors/squad.py function _improve_answer_span (line 43) | def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer, ... function _check_is_max_context (line 56) | def _check_is_max_context(doc_spans, cur_span_index, position): function _new_check_is_max_context (line 76) | def _new_check_is_max_context(doc_spans, cur_span_index, position): function _is_whitespace (line 98) | def _is_whitespace(c): function squad_convert_example_to_features (line 104) | def squad_convert_example_to_features( function squad_convert_example_to_features_init (line 311) | def squad_convert_example_to_features_init(tokenizer_for_convert: PreTra... function squad_convert_examples_to_features (line 316) | def squad_convert_examples_to_features( class SquadProcessor (line 541) | class SquadProcessor(DataProcessor): method _get_example_from_tensor_dict (line 550) | def _get_example_from_tensor_dict(self, tensor_dict, evaluate=False): method get_examples_from_dataset (line 574) | def get_examples_from_dataset(self, dataset, evaluate=False): method get_train_examples (line 607) | def get_train_examples(self, data_dir, filename=None): method get_dev_examples (line 629) | def get_dev_examples(self, data_dir, filename=None): method _create_examples (line 650) | def _create_examples(self, input_data, set_type): class SquadV1Processor (line 687) | class SquadV1Processor(SquadProcessor): class SquadV2Processor (line 692) | class SquadV2Processor(SquadProcessor): class SquadExample (line 697) | class SquadExample: method __init__ (line 712) | def __init__( class SquadFeatures (line 760) | class SquadFeatures: method __init__ (line 787) | def __init__( class SquadResult (line 827) | class SquadResult: method __init__ (line 837) | def __init__(self, unique_id, start_logits, end_logits, start_top_inde... FILE: transformers/data/processors/utils.py class InputExample (line 30) | class InputExample: method to_json_string (line 49) | def to_json_string(self): class InputFeatures (line 55) | class InputFeatures: method to_json_string (line 75) | def to_json_string(self): class DataProcessor (line 80) | class DataProcessor: method get_example_from_tensor_dict (line 83) | def get_example_from_tensor_dict(self, tensor_dict): method get_train_examples (line 93) | def get_train_examples(self, data_dir): method get_dev_examples (line 97) | def get_dev_examples(self, data_dir): method get_test_examples (line 101) | def get_test_examples(self, data_dir): method get_labels (line 105) | def get_labels(self): method tfds_map (line 109) | def tfds_map(self, example): method _read_tsv (line 119) | def _read_tsv(cls, input_file, quotechar=None): class SingleSentenceClassificationProcessor (line 125) | class SingleSentenceClassificationProcessor(DataProcessor): method __init__ (line 128) | def __init__(self, labels=None, examples=None, mode="classification", ... method __len__ (line 134) | def __len__(self): method __getitem__ (line 137) | def __getitem__(self, idx): method create_from_csv (line 143) | def create_from_csv( method create_from_examples (line 160) | def create_from_examples(cls, texts_or_text_and_labels, labels=None, *... method add_examples_from_csv (line 165) | def add_examples_from_csv( method add_examples (line 195) | def add_examples( method get_features (line 232) | def get_features( FILE: transformers/data/processors/xnli.py class XnliProcessor (line 28) | class XnliProcessor(DataProcessor): method __init__ (line 34) | def __init__(self, language, train_language=None): method get_train_examples (line 38) | def get_train_examples(self, data_dir): method get_test_examples (line 59) | def get_test_examples(self, data_dir): method get_labels (line 82) | def get_labels(self): FILE: transformers/debug_utils.py class DebugUnderflowOverflow (line 27) | class DebugUnderflowOverflow: method __init__ (line 145) | def __init__(self, model, max_frames_to_save=21, trace_batch_nums=[], ... method save_frame (line 162) | def save_frame(self, frame=None): method expand_frame (line 168) | def expand_frame(self, line): method trace_frames (line 171) | def trace_frames(self): method reset_saved_frames (line 175) | def reset_saved_frames(self): method dump_saved_frames (line 178) | def dump_saved_frames(self): method analyse_model (line 186) | def analyse_model(self): method analyse_variable (line 194) | def analyse_variable(self, var, ctx): method batch_start_frame (line 204) | def batch_start_frame(self): method batch_end_frame (line 208) | def batch_end_frame(self): method create_frame (line 211) | def create_frame(self, module, input, output): method register_forward_hook (line 239) | def register_forward_hook(self): method _register_forward_hook (line 242) | def _register_forward_hook(self, module): method forward_hook (line 245) | def forward_hook(self, module, input, output): function get_abs_min_max (line 293) | def get_abs_min_max(var, ctx): function detect_overflow (line 298) | def detect_overflow(var, ctx): class DebugOption (line 344) | class DebugOption(ExplicitEnum): FILE: transformers/deepspeed.py function is_deepspeed_available (line 32) | def is_deepspeed_available(): class HfDeepSpeedConfig (line 44) | class HfDeepSpeedConfig(DeepSpeedConfig): method __init__ (line 61) | def __init__(self, config_file_or_dict): class HfTrainerDeepSpeedConfig (line 69) | class HfTrainerDeepSpeedConfig(HfDeepSpeedConfig): method __init__ (line 75) | def __init__(self, config_file_or_dict): method dtype (line 80) | def dtype(self): method is_auto (line 85) | def is_auto(self, ds_key_long): method fill_match (line 92) | def fill_match(self, ds_key_long, hf_val, hf_key=None, must_match=True): method trainer_config_process (line 120) | def trainer_config_process(self, args): method trainer_config_finalize (line 178) | def trainer_config_finalize(self, args, model, num_training_steps): function set_hf_deepspeed_config (line 230) | def set_hf_deepspeed_config(hf_deepspeed_config_obj): function unset_hf_deepspeed_config (line 238) | def unset_hf_deepspeed_config(): function is_deepspeed_zero3_enabled (line 244) | def is_deepspeed_zero3_enabled(): function deepspeed_config (line 251) | def deepspeed_config(): function deepspeed_optim_sched (line 258) | def deepspeed_optim_sched(trainer, hf_deepspeed_config, args, num_traini... function deepspeed_init (line 316) | def deepspeed_init(trainer, num_training_steps, inference=False): function deepspeed_load_checkpoint (line 371) | def deepspeed_load_checkpoint(deepspeed_engine, checkpoint_path): FILE: transformers/dependency_versions_check.py function dep_version_check (line 46) | def dep_version_check(pkg, hint=None): FILE: transformers/dynamic_module_utils.py function init_hf_modules (line 40) | def init_hf_modules(): function create_dynamic_module (line 56) | def create_dynamic_module(name: Union[str, os.PathLike]): function get_relative_imports (line 72) | def get_relative_imports(module_file): function get_relative_import_files (line 90) | def get_relative_import_files(module_file): function get_imports (line 119) | def get_imports(filename): function check_imports (line 138) | def check_imports(filename): function get_class_in_module (line 159) | def get_class_in_module(class_name, module_path): function get_cached_module_file (line 168) | def get_cached_module_file( function get_class_from_dynamic_module (line 333) | def get_class_from_dynamic_module( function custom_object_save (line 446) | def custom_object_save(obj, folder, config=None): function _raise_timeout_error (line 519) | def _raise_timeout_error(signum, frame): function resolve_trust_remote_code (line 530) | def resolve_trust_remote_code(trust_remote_code, model_name, has_local_c... FILE: transformers/feature_extraction_sequence_utils.py class SequenceFeatureExtractor (line 29) | class SequenceFeatureExtractor(FeatureExtractionMixin): method __init__ (line 42) | def __init__(self, feature_size: int, sampling_rate: int, padding_valu... method pad (line 52) | def pad( method _pad (line 226) | def _pad( method _truncate (line 298) | def _truncate( method _get_padding_strategies (line 341) | def _get_padding_strategies(self, padding=False, max_length=None): FILE: transformers/feature_extraction_utils.py class BatchFeature (line 60) | class BatchFeature(UserDict): method __init__ (line 75) | def __init__(self, data: Optional[Dict[str, Any]] = None, tensor_type:... method __getitem__ (line 79) | def __getitem__(self, item: str) -> Union[Any]: method __getattr__ (line 89) | def __getattr__(self, item: str): method __getstate__ (line 95) | def __getstate__(self): method __setstate__ (line 98) | def __setstate__(self, state): method keys (line 103) | def keys(self): method values (line 107) | def values(self): method items (line 111) | def items(self): method convert_to_tensors (line 114) | def convert_to_tensors(self, tensor_type: Optional[Union[str, TensorTy... method to (line 187) | def to(self, *args, **kwargs) -> "BatchFeature": class FeatureExtractionMixin (line 232) | class FeatureExtractionMixin(PushToHubMixin): method __init__ (line 240) | def __init__(self, **kwargs): method _set_processor_class (line 252) | def _set_processor_class(self, processor_class: str): method from_pretrained (line 257) | def from_pretrained( method save_pretrained (line 342) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method get_feature_extractor_dict (line 391) | def get_feature_extractor_dict( method from_dict (line 489) | def from_dict(cls, feature_extractor_dict: Dict[str, Any], **kwargs) -... method to_dict (line 525) | def to_dict(self) -> Dict[str, Any]: method from_json_file (line 538) | def from_json_file(cls, json_file: Union[str, os.PathLike]) -> PreTrai... method to_json_string (line 556) | def to_json_string(self) -> str: method to_json_file (line 577) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method __repr__ (line 588) | def __repr__(self): method register_for_auto_class (line 592) | def register_for_auto_class(cls, auto_class="AutoFeatureExtractor"): FILE: transformers/generation/beam_constraints.py class Constraint (line 5) | class Constraint(ABC): method __init__ (line 20) | def __init__(self): method test (line 24) | def test(self): method advance (line 49) | def advance(self): method does_advance (line 61) | def does_advance(self, token_id: int): method update (line 70) | def update(self, token_id: int): method reset (line 95) | def reset(self): method remaining (line 105) | def remaining(self): method copy (line 114) | def copy(self, stateful=False): class PhrasalConstraint (line 129) | class PhrasalConstraint(Constraint): method __init__ (line 138) | def __init__(self, token_ids: List[int]): method advance (line 152) | def advance(self): method does_advance (line 157) | def does_advance(self, token_id: int): method update (line 166) | def update(self, token_id: int): method reset (line 186) | def reset(self): method remaining (line 190) | def remaining(self): method copy (line 193) | def copy(self, stateful=False): class DisjunctiveTrie (line 204) | class DisjunctiveTrie: method __init__ (line 205) | def __init__(self, nested_token_ids: List[List[int]], no_subsets=True): method next_tokens (line 228) | def next_tokens(self, current_seq): method reached_leaf (line 241) | def reached_leaf(self, current_seq): method count_leaves (line 246) | def count_leaves(self, root): method has_subsets (line 253) | def has_subsets(self, trie, nested_token_ids): class DisjunctiveConstraint (line 261) | class DisjunctiveConstraint(Constraint): method __init__ (line 270) | def __init__(self, nested_token_ids: List[List[int]]): method advance (line 292) | def advance(self): method does_advance (line 300) | def does_advance(self, token_id: int): method update (line 308) | def update(self, token_id: int): method reset (line 328) | def reset(self): method remaining (line 332) | def remaining(self): method copy (line 339) | def copy(self, stateful=False): class ConstraintListState (line 350) | class ConstraintListState: method __init__ (line 359) | def __init__(self, constraints: List[Constraint]): method init_state (line 369) | def init_state(self): method get_bank (line 374) | def get_bank(self): method advance (line 382) | def advance(self): method reset (line 417) | def reset(self, token_ids: Optional[List[int]]): method add (line 432) | def add(self, token_id: int): method copy (line 508) | def copy(self, stateful=True): FILE: transformers/generation/beam_search.py class BeamScorer (line 87) | class BeamScorer(ABC): method process (line 95) | def process( method finalize (line 107) | def finalize( class BeamSearchScorer (line 119) | class BeamSearchScorer(BeamScorer): method __init__ (line 158) | def __init__( method is_done (line 202) | def is_done(self) -> bool: method process (line 205) | def process( method finalize (line 302) | def finalize( class ConstrainedBeamSearchScorer (line 394) | class ConstrainedBeamSearchScorer(BeamScorer): method __init__ (line 431) | def __init__( method is_done (line 477) | def is_done(self) -> bool: method make_constraint_states (line 480) | def make_constraint_states(self, n): method check_completes_constraints (line 483) | def check_completes_constraints(self, sequence): method process (line 488) | def process( method step_sentence_constraint (line 631) | def step_sentence_constraint( method finalize (line 772) | def finalize( class BeamHypotheses (line 861) | class BeamHypotheses: method __init__ (line 862) | def __init__(self, num_beams: int, length_penalty: float, early_stoppi... method __len__ (line 879) | def __len__(self): method add (line 885) | def add(self, hyp: torch.LongTensor, sum_logprobs: float, beam_indices... method is_done (line 899) | def is_done(self, best_sum_logprobs: float, cur_len: int) -> bool: FILE: transformers/generation/configuration_utils.py class GenerationConfig (line 38) | class GenerationConfig(PushToHubMixin): method __init__ (line 224) | def __init__(self, **kwargs): method __eq__ (line 302) | def __eq__(self, other): method __repr__ (line 314) | def __repr__(self): method validate (line 317) | def validate(self): method save_pretrained (line 325) | def save_pretrained( method from_pretrained (line 376) | def from_pretrained( method _dict_from_json_file (line 544) | def _dict_from_json_file(cls, json_file: Union[str, os.PathLike]): method from_dict (line 550) | def from_dict(cls, config_dict: Dict[str, Any], **kwargs) -> "Generati... method dict_torch_dtype_to_str (line 583) | def dict_torch_dtype_to_str(self, d: Dict[str, Any]) -> None: method to_diff_dict (line 595) | def to_diff_dict(self) -> Dict[str, Any]: method to_dict (line 618) | def to_dict(self) -> Dict[str, Any]: method to_json_string (line 635) | def to_json_string(self, use_diff: bool = True) -> str: method to_json_file (line 653) | def to_json_file(self, json_file_path: Union[str, os.PathLike], use_di... method from_model_config (line 668) | def from_model_config(cls, model_config: PretrainedConfig) -> "Generat... method update (line 696) | def update(self, **kwargs): FILE: transformers/generation/flax_logits_process.py class FlaxLogitsProcessor (line 50) | class FlaxLogitsProcessor: method __call__ (line 54) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray) -> jnp... class FlaxLogitsWarper (line 61) | class FlaxLogitsWarper: method __call__ (line 65) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray) -> jnp... class FlaxLogitsProcessorList (line 72) | class FlaxLogitsProcessorList(list): method __call__ (line 80) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTemperatureLogitsWarper (line 95) | class FlaxTemperatureLogitsWarper(FlaxLogitsWarper): method __init__ (line 104) | def __init__(self, temperature: float): method __call__ (line 110) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTopPLogitsWarper (line 115) | class FlaxTopPLogitsWarper(FlaxLogitsWarper): method __init__ (line 129) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 137) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxTopKLogitsWarper (line 157) | class FlaxTopKLogitsWarper(FlaxLogitsWarper): method __init__ (line 170) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 177) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForcedBOSTokenLogitsProcessor (line 192) | class FlaxForcedBOSTokenLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 201) | def __init__(self, bos_token_id: int): method __call__ (line 204) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForcedEOSTokenLogitsProcessor (line 214) | class FlaxForcedEOSTokenLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 225) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 229) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxMinLengthLogitsProcessor (line 239) | class FlaxMinLengthLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 250) | def __init__(self, min_length: int, eos_token_id: int): method __call__ (line 260) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxSuppressTokensAtBeginLogitsProcessor (line 269) | class FlaxSuppressTokensAtBeginLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 282) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 286) | def __call__(self, input_ids, scores, cur_len: int): class FlaxSuppressTokensLogitsProcessor (line 294) | class FlaxSuppressTokensLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 304) | def __init__(self, suppress_tokens: list): method __call__ (line 307) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxForceTokensLogitsProcessor (line 313) | class FlaxForceTokensLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 324) | def __init__(self, force_token_map): method __call__ (line 335) | def __call__(self, input_ids: jnp.ndarray, scores: jnp.ndarray, cur_le... class FlaxWhisperTimeStampLogitsProcessor (line 361) | class FlaxWhisperTimeStampLogitsProcessor(FlaxLogitsProcessor): method __init__ (line 378) | def __init__(self, generate_config, model_config, decoder_input_length): method __call__ (line 395) | def __call__(self, input_ids, scores, cur_len): FILE: transformers/generation/flax_utils.py class FlaxGreedySearchOutput (line 55) | class FlaxGreedySearchOutput(ModelOutput): class FlaxSampleOutput (line 69) | class FlaxSampleOutput(ModelOutput): class FlaxBeamSearchOutput (line 83) | class FlaxBeamSearchOutput(ModelOutput): class GreedyState (line 100) | class GreedyState: class SampleState (line 109) | class SampleState: class BeamSearchState (line 119) | class BeamSearchState: class FlaxGenerationMixin (line 129) | class FlaxGenerationMixin: method prepare_inputs_for_generation (line 146) | def prepare_inputs_for_generation(self, *args, **kwargs): method _run_loop_in_debug (line 152) | def _run_loop_in_debug(cond_fn, body_fn, init_state): method _prepare_encoder_decoder_kwargs_for_generation (line 161) | def _prepare_encoder_decoder_kwargs_for_generation(self, input_ids, pa... method _prepare_decoder_input_ids_for_generation (line 170) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 185) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_to_num_beams (line 215) | def _expand_to_num_beams(tensor, num_beams): method _adapt_logits_for_beam_search (line 218) | def _adapt_logits_for_beam_search(self, logits): method _validate_model_class (line 225) | def _validate_model_class(self): method _validate_model_kwargs (line 249) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 267) | def generate( method _get_logits_warper (line 472) | def _get_logits_warper(self, generation_config: GenerationConfig) -> F... method _get_logits_processor (line 488) | def _get_logits_processor( method _merge_criteria_processor_list (line 538) | def _merge_criteria_processor_list( method _greedy_search (line 559) | def _greedy_search( method _sample (line 645) | def _sample( method _beam_search (line 742) | def _beam_search( FILE: transformers/generation/logits_process.py class LogitsProcessor (line 51) | class LogitsProcessor: method __call__ (line 55) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitsWarper (line 62) | class LogitsWarper: method __call__ (line 66) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class LogitsProcessorList (line 73) | class LogitsProcessorList(list): method __call__ (line 81) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MinLengthLogitsProcessor (line 96) | class MinLengthLogitsProcessor(LogitsProcessor): method __init__ (line 107) | def __init__(self, min_length: int, eos_token_id: Union[int, List[int]]): method __call__ (line 119) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MinNewTokensLengthLogitsProcessor (line 127) | class MinNewTokensLengthLogitsProcessor(LogitsProcessor): method __init__ (line 140) | def __init__(self, prompt_length_to_skip: int, min_new_tokens: int, eo... method __call__ (line 157) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TemperatureLogitsWarper (line 166) | class TemperatureLogitsWarper(LogitsWarper): method __init__ (line 175) | def __init__(self, temperature: float): method __call__ (line 181) | def __call__(self, input_ids: torch.Tensor, scores: torch.Tensor) -> t... class RepetitionPenaltyLogitsProcessor (line 186) | class RepetitionPenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 196) | def __init__(self, penalty: float): method __call__ (line 202) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EncoderRepetitionPenaltyLogitsProcessor (line 212) | class EncoderRepetitionPenaltyLogitsProcessor(LogitsProcessor): method __init__ (line 223) | def __init__(self, penalty: float, encoder_input_ids: torch.LongTensor): method __call__ (line 230) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopPLogitsWarper (line 240) | class TopPLogitsWarper(LogitsWarper): method __init__ (line 254) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 263) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TopKLogitsWarper (line 279) | class TopKLogitsWarper(LogitsWarper): method __init__ (line 292) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 299) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class TypicalLogitsWarper (line 307) | class TypicalLogitsWarper(LogitsWarper): method __init__ (line 321) | def __init__(self, mass: float = 0.9, filter_value: float = -float("In... method __call__ (line 330) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EpsilonLogitsWarper (line 355) | class EpsilonLogitsWarper(LogitsWarper): method __init__ (line 370) | def __init__(self, epsilon: float, filter_value: float = -float("Inf")... method __call__ (line 385) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EtaLogitsWarper (line 398) | class EtaLogitsWarper(LogitsWarper): method __init__ (line 409) | def __init__(self, epsilon: float, filter_value: float = -float("Inf")... method __call__ (line 424) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... function _get_ngrams (line 439) | def _get_ngrams(ngram_size: int, prev_input_ids: torch.Tensor, num_hypos... function _get_generated_ngrams (line 450) | def _get_generated_ngrams(banned_ngrams, prev_input_ids, ngram_size, cur... function _calc_banned_ngram_tokens (line 457) | def _calc_banned_ngram_tokens( class NoRepeatNGramLogitsProcessor (line 474) | class NoRepeatNGramLogitsProcessor(LogitsProcessor): method __init__ (line 484) | def __init__(self, ngram_size: int): method __call__ (line 489) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class EncoderNoRepeatNGramLogitsProcessor (line 500) | class EncoderNoRepeatNGramLogitsProcessor(LogitsProcessor): method __init__ (line 512) | def __init__(self, encoder_ngram_size: int, encoder_input_ids: torch.L... method __call__ (line 523) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class NoBadWordsLogitsProcessor (line 541) | class NoBadWordsLogitsProcessor(LogitsProcessor): method __init__ (line 554) | def __init__(self, bad_words_ids: List[List[int]], eos_token_id: Union... method __call__ (line 589) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... method _calc_static_bad_word_mask (line 598) | def _calc_static_bad_word_mask(self, scores: torch.FloatTensor) -> tor... method _tokens_match (line 603) | def _tokens_match(self, prev_tokens: List[int], tokens: List[int]) -> ... method _calc_banned_bad_words_ids (line 613) | def _calc_banned_bad_words_ids(self, prev_input_ids: List[List[int]]) ... method _set_scores_to_inf_for_banned_tokens (line 625) | def _set_scores_to_inf_for_banned_tokens( class PrefixConstrainedLogitsProcessor (line 675) | class PrefixConstrainedLogitsProcessor(LogitsProcessor): method __init__ (line 688) | def __init__(self, prefix_allowed_tokens_fn: Callable[[int, torch.Tens... method __call__ (line 692) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class HammingDiversityLogitsProcessor (line 701) | class HammingDiversityLogitsProcessor(LogitsProcessor): method __init__ (line 719) | def __init__(self, diversity_penalty: float, num_beams: int, num_beam_... method __call__ (line 732) | def __call__( class ForcedBOSTokenLogitsProcessor (line 761) | class ForcedBOSTokenLogitsProcessor(LogitsProcessor): method __init__ (line 770) | def __init__(self, bos_token_id: int): method __call__ (line 773) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ForcedEOSTokenLogitsProcessor (line 782) | class ForcedEOSTokenLogitsProcessor(LogitsProcessor): method __init__ (line 794) | def __init__(self, max_length: int, eos_token_id: Union[int, List[int]]): method __call__ (line 800) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class InfNanRemoveLogitsProcessor (line 810) | class InfNanRemoveLogitsProcessor(LogitsProcessor): method __call__ (line 816) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class ExponentialDecayLengthPenalty (line 826) | class ExponentialDecayLengthPenalty(LogitsProcessor): method __init__ (line 841) | def __init__( method __call__ (line 853) | def __call__(self, input_ids: torch.Tensor, scores: torch.Tensor) -> t... class LogitNormalization (line 861) | class LogitNormalization(LogitsProcessor, LogitsWarper): method __call__ (line 869) | def __call__(self, input_ids: torch.Tensor, scores: torch.Tensor) -> t... class SuppressTokensAtBeginLogitsProcessor (line 874) | class SuppressTokensAtBeginLogitsProcessor(LogitsProcessor): method __init__ (line 881) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 885) | def __call__(self, input_ids, scores): class SuppressTokensLogitsProcessor (line 892) | class SuppressTokensLogitsProcessor(LogitsProcessor): method __init__ (line 896) | def __init__(self, suppress_tokens): method __call__ (line 899) | def __call__(self, input_ids, scores): class ForceTokensLogitsProcessor (line 904) | class ForceTokensLogitsProcessor(LogitsProcessor): method __init__ (line 909) | def __init__(self, force_token_map: List[List[int]]): method __call__ (line 912) | def __call__(self, input_ids, scores): class WhisperTimeStampLogitsProcessor (line 921) | class WhisperTimeStampLogitsProcessor(LogitsProcessor): method __init__ (line 938) | def __init__(self, generate_config): # support for the kwargs method __call__ (line 948) | def __call__(self, input_ids, scores): FILE: transformers/generation/stopping_criteria.py class StoppingCriteria (line 33) | class StoppingCriteria(ABC): method __call__ (line 37) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxLengthCriteria (line 41) | class MaxLengthCriteria(StoppingCriteria): method __init__ (line 51) | def __init__(self, max_length: int): method __call__ (line 55) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxNewTokensCriteria (line 59) | class MaxNewTokensCriteria(StoppingCriteria): method __init__ (line 72) | def __init__(self, start_length: int, max_new_tokens: int): method __call__ (line 84) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class MaxTimeCriteria (line 88) | class MaxTimeCriteria(StoppingCriteria): method __init__ (line 101) | def __init__(self, max_time: float, initial_timestamp: Optional[float]... method __call__ (line 106) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... class StoppingCriteriaList (line 110) | class StoppingCriteriaList(list): method __call__ (line 112) | def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTen... method max_length (line 116) | def max_length(self) -> Optional[int]: function validate_stopping_criteria (line 125) | def validate_stopping_criteria(stopping_criteria: StoppingCriteriaList, ... FILE: transformers/generation/streamers.py class BaseStreamer (line 24) | class BaseStreamer: method put (line 29) | def put(self, value): method end (line 33) | def end(self): class TextStreamer (line 38) | class TextStreamer(BaseStreamer): method __init__ (line 72) | def __init__(self, tokenizer: "AutoTokenizer", skip_prompt: bool = Fal... method put (line 82) | def put(self, value): method end (line 116) | def end(self): method on_finalized_text (line 130) | def on_finalized_text(self, text: str, stream_end: bool = False): method _is_chinese_char (line 134) | def _is_chinese_char(self, cp): class TextIteratorStreamer (line 159) | class TextIteratorStreamer(TextStreamer): method __init__ (line 205) | def __init__( method on_finalized_text (line 213) | def on_finalized_text(self, text: str, stream_end: bool = False): method __iter__ (line 219) | def __iter__(self): method __next__ (line 222) | def __next__(self): FILE: transformers/generation/tf_logits_process.py class TFLogitsProcessor (line 53) | class TFLogitsProcessor: method __call__ (line 57) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFLogitsWarper (line 64) | class TFLogitsWarper: method __call__ (line 68) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFLogitsProcessorList (line 75) | class TFLogitsProcessorList(list): method __call__ (line 83) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFTemperatureLogitsWarper (line 98) | class TFTemperatureLogitsWarper(TFLogitsWarper): method __init__ (line 107) | def __init__(self, temperature: float): method __call__ (line 113) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFTopKLogitsWarper (line 118) | class TFTopKLogitsWarper(TFLogitsWarper): method __init__ (line 131) | def __init__(self, top_k: int, filter_value: float = -float("Inf"), mi... method __call__ (line 138) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFTopPLogitsWarper (line 146) | class TFTopPLogitsWarper(TFLogitsWarper): method __init__ (line 160) | def __init__(self, top_p: float, filter_value: float = -float("Inf"), ... method __call__ (line 168) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFMinLengthLogitsProcessor (line 200) | class TFMinLengthLogitsProcessor(TFLogitsProcessor): method __init__ (line 211) | def __init__(self, min_length: int, eos_token_id: int): method _apply_eos_token_mask (line 221) | def _apply_eos_token_mask(self, scores: tf.Tensor) -> tf.Tensor: method __call__ (line 226) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFRepetitionPenaltyLogitsProcessor (line 236) | class TFRepetitionPenaltyLogitsProcessor(TFLogitsProcessor): method __init__ (line 246) | def __init__(self, penalty: float): method _create_score_penalties (line 252) | def _create_score_penalties(self, input_ids: tf.Tensor, logits: tf.Ten... method __call__ (line 278) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFNoBadWordsLogitsProcessor (line 286) | class TFNoBadWordsLogitsProcessor(TFLogitsProcessor): method __init__ (line 298) | def __init__(self, bad_words_ids: List[List[int]], eos_token_id: int): method _calc_row_banned_bad_tokens (line 322) | def _calc_row_banned_bad_tokens(self, row_input_ids: tf.Tensor) -> tf.... method __call__ (line 362) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFNoRepeatNGramLogitsProcessor (line 383) | class TFNoRepeatNGramLogitsProcessor(TFLogitsProcessor): method __init__ (line 393) | def __init__(self, ngram_size: int): method calc_banned_ngram_tokens (line 398) | def calc_banned_ngram_tokens(self, input_ids, num_hypos, cur_len): method __call__ (line 422) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForcedBOSTokenLogitsProcessor (line 443) | class TFForcedBOSTokenLogitsProcessor(TFLogitsProcessor): method __init__ (line 452) | def __init__(self, bos_token_id: int): method __call__ (line 457) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForcedEOSTokenLogitsProcessor (line 473) | class TFForcedEOSTokenLogitsProcessor(TFLogitsProcessor): method __init__ (line 484) | def __init__(self, max_length: int, eos_token_id: int): method __call__ (line 490) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFSuppressTokensAtBeginLogitsProcessor (line 506) | class TFSuppressTokensAtBeginLogitsProcessor(TFLogitsProcessor): method __init__ (line 513) | def __init__(self, begin_suppress_tokens, begin_index): method __call__ (line 517) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFSuppressTokensLogitsProcessor (line 530) | class TFSuppressTokensLogitsProcessor(TFLogitsProcessor): method __init__ (line 534) | def __init__(self, suppress_tokens): method __call__ (line 537) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... class TFForceTokensLogitsProcessor (line 546) | class TFForceTokensLogitsProcessor(TFLogitsProcessor): method __init__ (line 551) | def __init__(self, force_token_map: List[List[int]]): method __call__ (line 562) | def __call__(self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: i... FILE: transformers/generation/tf_utils.py class TFGreedySearchDecoderOnlyOutput (line 58) | class TFGreedySearchDecoderOnlyOutput(ModelOutput): class TFGreedySearchEncoderDecoderOutput (line 86) | class TFGreedySearchEncoderDecoderOutput(ModelOutput): class TFSampleDecoderOnlyOutput (line 128) | class TFSampleDecoderOnlyOutput(ModelOutput): class TFSampleEncoderDecoderOutput (line 156) | class TFSampleEncoderDecoderOutput(ModelOutput): class TFBeamSearchDecoderOnlyOutput (line 198) | class TFBeamSearchDecoderOnlyOutput(ModelOutput): class TFBeamSearchEncoderDecoderOutput (line 233) | class TFBeamSearchEncoderDecoderOutput(ModelOutput): class TFBeamSampleDecoderOnlyOutput (line 283) | class TFBeamSampleDecoderOnlyOutput(ModelOutput): class TFBeamSampleEncoderDecoderOutput (line 318) | class TFBeamSampleEncoderDecoderOutput(ModelOutput): class TFContrastiveSearchDecoderOnlyOutput (line 367) | class TFContrastiveSearchDecoderOnlyOutput(ModelOutput): class TFContrastiveSearchEncoderDecoderOutput (line 394) | class TFContrastiveSearchEncoderDecoderOutput(ModelOutput): class TFGenerationMixin (line 444) | class TFGenerationMixin: method seed_generator (line 464) | def seed_generator(self): method prepare_inputs_for_generation (line 472) | def prepare_inputs_for_generation(self, *args, **kwargs): method adjust_logits_during_generation (line 477) | def adjust_logits_during_generation( method compute_transition_scores (line 498) | def compute_transition_scores( method _validate_model_class (line 618) | def _validate_model_class(self): method _validate_model_kwargs (line 643) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 666) | def generate( method _prepare_attention_mask_for_generation (line 1048) | def _prepare_attention_mask_for_generation( method _prepare_encoder_decoder_kwargs_for_generation (line 1064) | def _prepare_encoder_decoder_kwargs_for_generation( method _prepare_decoder_input_ids_for_generation (line 1094) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 1133) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_inputs_for_generation (line 1152) | def _expand_inputs_for_generation( method _prepare_model_inputs (line 1190) | def _prepare_model_inputs( method _maybe_initialize_input_ids_for_generation (line 1256) | def _maybe_initialize_input_ids_for_generation( method _extract_past_from_model_output (line 1285) | def _extract_past_from_model_output(outputs: ModelOutput): method _update_model_kwargs_for_generation (line 1295) | def _update_model_kwargs_for_generation( method _update_model_kwargs_for_xla_generation (line 1311) | def _update_model_kwargs_for_xla_generation( method _get_logits_warper (line 1438) | def _get_logits_warper( method _get_logits_processor (line 1460) | def _get_logits_processor( method _merge_criteria_processor_list (line 1515) | def _merge_criteria_processor_list( method greedy_search (line 1536) | def greedy_search( method sample (line 1798) | def sample( method _gather_beams (line 2089) | def _gather_beams(nested, beam_indices, batch_axis=0): method beam_search (line 2109) | def beam_search( method contrastive_search (line 2672) | def contrastive_search( function tf_top_k_top_p_filtering (line 3080) | def tf_top_k_top_p_filtering(logits, top_k=0, top_p=1.0, filter_value=-f... function scatter_values_on_batch_indices (line 3135) | def scatter_values_on_batch_indices(values, batch_indices): function sample_without_replacement (line 3145) | def sample_without_replacement(logits, num_samples): function _ranking_fast (line 3155) | def _ranking_fast( FILE: transformers/generation/utils.py class GreedySearchDecoderOnlyOutput (line 83) | class GreedySearchDecoderOnlyOutput(ModelOutput): class ContrastiveSearchEncoderDecoderOutput (line 111) | class ContrastiveSearchEncoderDecoderOutput(ModelOutput): class ContrastiveSearchDecoderOnlyOutput (line 150) | class ContrastiveSearchDecoderOnlyOutput(ModelOutput): class GreedySearchEncoderDecoderOutput (line 179) | class GreedySearchEncoderDecoderOutput(ModelOutput): class SampleDecoderOnlyOutput (line 221) | class SampleDecoderOnlyOutput(ModelOutput): class SampleEncoderDecoderOutput (line 250) | class SampleEncoderDecoderOutput(ModelOutput): class BeamSearchDecoderOnlyOutput (line 293) | class BeamSearchDecoderOnlyOutput(ModelOutput): class BeamSearchEncoderDecoderOutput (line 328) | class BeamSearchEncoderDecoderOutput(ModelOutput): class BeamSampleDecoderOnlyOutput (line 378) | class BeamSampleDecoderOnlyOutput(ModelOutput): class BeamSampleEncoderDecoderOutput (line 413) | class BeamSampleEncoderDecoderOutput(ModelOutput): class GenerationMixin (line 469) | class GenerationMixin: method prepare_inputs_for_generation (line 493) | def prepare_inputs_for_generation(self, *args, **kwargs): method _prepare_model_inputs (line 498) | def _prepare_model_inputs( method adjust_logits_during_generation (line 562) | def adjust_logits_during_generation(self, logits: torch.FloatTensor, *... method _maybe_initialize_input_ids_for_generation (line 568) | def _maybe_initialize_input_ids_for_generation( method _prepare_attention_mask_for_generation (line 596) | def _prepare_attention_mask_for_generation( method _prepare_encoder_decoder_kwargs_for_generation (line 614) | def _prepare_encoder_decoder_kwargs_for_generation( method _prepare_decoder_input_ids_for_generation (line 646) | def _prepare_decoder_input_ids_for_generation( method _get_decoder_start_token_id (line 691) | def _get_decoder_start_token_id(self, decoder_start_token_id: int = No... method _expand_inputs_for_generation (line 708) | def _expand_inputs_for_generation( method _extract_past_from_model_output (line 734) | def _extract_past_from_model_output(self, outputs: ModelOutput, standa... method _update_model_kwargs_for_generation (line 749) | def _update_model_kwargs_for_generation( method _reorder_cache (line 786) | def _reorder_cache(self, past_key_values, beam_idx): method _get_logits_warper (line 792) | def _get_logits_warper( method _get_logits_processor (line 830) | def _get_logits_processor( method _get_stopping_criteria (line 947) | def _get_stopping_criteria( method _merge_criteria_processor_list (line 958) | def _merge_criteria_processor_list( method compute_transition_scores (line 979) | def compute_transition_scores( method _validate_model_class (line 1100) | def _validate_model_class(self): method _validate_model_kwargs (line 1126) | def _validate_model_kwargs(self, model_kwargs: Dict[str, Any]): method generate (line 1150) | def generate( method contrastive_search (line 1798) | def contrastive_search( method greedy_search (line 2171) | def greedy_search( method sample (line 2430) | def sample( method beam_search (line 2712) | def beam_search( method beam_sample (line 3035) | def beam_sample( method group_beam_search (line 3368) | def group_beam_search( method constrained_beam_search (line 3748) | def constrained_beam_search( method assisted_decoding (line 4073) | def assisted_decoding( function _crop_past_key_values (line 4497) | def _crop_past_key_values(model, past_key_values, maximum_length): function _split_model_outputs (line 4539) | def _split_model_outputs(outputs, new_outputs, cur_len, added_len, is_de... function top_k_top_p_filtering (line 4565) | def top_k_top_p_filtering( function _ranking_fast (line 4600) | def _ranking_fast( FILE: transformers/generation_flax_utils.py class FlaxGenerationMixin (line 22) | class FlaxGenerationMixin(FlaxGenerationMixin): FILE: transformers/generation_tf_utils.py class TFGenerationMixin (line 22) | class TFGenerationMixin(TFGenerationMixin): FILE: transformers/generation_utils.py class GenerationMixin (line 22) | class GenerationMixin(GenerationMixin): FILE: transformers/hf_argparser.py function string_to_bool (line 42) | def string_to_bool(v): function make_choice_type_function (line 55) | def make_choice_type_function(choices: list) -> Callable[[str], Any]: function HfArg (line 70) | def HfArg( class HfArgumentParser (line 117) | class HfArgumentParser(ArgumentParser): method __init__ (line 128) | def __init__(self, dataclass_types: Union[DataClassType, Iterable[Data... method _parse_dataclass_field (line 147) | def _parse_dataclass_field(parser: ArgumentParser, field: dataclasses.... method _add_dataclass_arguments (line 239) | def _add_dataclass_arguments(self, dtype: DataClassType): method parse_args_into_dataclasses (line 273) | def parse_args_into_dataclasses( method parse_dict (line 359) | def parse_dict(self, args: Dict[str, Any], allow_extra_keys: bool = Fa... method parse_json_file (line 387) | def parse_json_file(self, json_file: str, allow_extra_keys: bool = Fal... method parse_yaml_file (line 409) | def parse_yaml_file(self, yaml_file: str, allow_extra_keys: bool = Fal... FILE: transformers/image_processing_utils.py class BatchFeature (line 43) | class BatchFeature(BaseBatchFeature): class ImageProcessingMixin (line 59) | class ImageProcessingMixin(PushToHubMixin): method __init__ (line 67) | def __init__(self, **kwargs): method _set_processor_class (line 79) | def _set_processor_class(self, processor_class: str): method from_pretrained (line 84) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method save_pretrained (line 169) | def save_pretrained(self, save_directory: Union[str, os.PathLike], pus... method get_image_processor_dict (line 218) | def get_image_processor_dict( method from_dict (line 321) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method to_dict (line 365) | def to_dict(self) -> Dict[str, Any]: method from_json_file (line 378) | def from_json_file(cls, json_file: Union[str, os.PathLike]): method to_json_string (line 396) | def to_json_string(self) -> str: method to_json_file (line 417) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method __repr__ (line 428) | def __repr__(self): method register_for_auto_class (line 432) | def register_for_auto_class(cls, auto_class="AutoImageProcessor"): class BaseImageProcessor (line 458) | class BaseImageProcessor(ImageProcessingMixin): method __init__ (line 459) | def __init__(self, **kwargs): method __call__ (line 462) | def __call__(self, images, **kwargs) -> BatchFeature: method preprocess (line 466) | def preprocess(self, images, **kwargs) -> BatchFeature: function is_valid_size_dict (line 473) | def is_valid_size_dict(size_dict): function convert_to_size_dict (line 484) | def convert_to_size_dict( function get_size_dict (line 512) | def get_size_dict( FILE: transformers/image_transforms.py function to_channel_dimension_format (line 54) | def to_channel_dimension_format( function rescale (line 91) | def rescale( function _rescale_for_pil_conversion (line 121) | def _rescale_for_pil_conversion(image): function to_pil_image (line 148) | def to_pil_image( function get_resize_output_image_size (line 197) | def get_resize_output_image_size( function resize (line 261) | def resize( function normalize (line 327) | def normalize( function center_crop (line 390) | def center_crop( function _center_to_corners_format_torch (line 487) | def _center_to_corners_format_torch(bboxes_center: "torch.Tensor") -> "t... function _center_to_corners_format_numpy (line 497) | def _center_to_corners_format_numpy(bboxes_center: np.ndarray) -> np.nda... function _center_to_corners_format_tf (line 507) | def _center_to_corners_format_tf(bboxes_center: "tf.Tensor") -> "tf.Tens... function center_to_corners_format (line 518) | def center_to_corners_format(bboxes_center: TensorType) -> TensorType: function _corners_to_center_format_torch (line 539) | def _corners_to_center_format_torch(bboxes_corners: "torch.Tensor") -> "... function _corners_to_center_format_numpy (line 550) | def _corners_to_center_format_numpy(bboxes_corners: np.ndarray) -> np.nd... function _corners_to_center_format_tf (line 564) | def _corners_to_center_format_tf(bboxes_corners: "tf.Tensor") -> "tf.Ten... function corners_to_center_format (line 578) | def corners_to_center_format(bboxes_corners: TensorType) -> TensorType: function rgb_to_id (line 601) | def rgb_to_id(color): function id_to_rgb (line 612) | def id_to_rgb(id_map): class PaddingMode (line 631) | class PaddingMode(ExplicitEnum): function pad (line 642) | def pad( function convert_to_rgb (line 729) | def convert_to_rgb(image: ImageInput) -> ImageInput: function flip_channel_order (line 747) | def flip_channel_order(image: np.ndarray, data_format: Optional[ChannelD... FILE: transformers/image_utils.py class ChannelDimension (line 62) | class ChannelDimension(ExplicitEnum): function is_pil_image (line 67) | def is_pil_image(img): function is_valid_image (line 71) | def is_valid_image(img): function valid_images (line 81) | def valid_images(imgs): function is_batched (line 93) | def is_batched(img): function make_list_of_images (line 99) | def make_list_of_images(images, expected_ndims: int = 3) -> List[ImageIn... function to_numpy_array (line 138) | def to_numpy_array(img) -> np.ndarray: function infer_channel_dimension_format (line 147) | def infer_channel_dimension_format(image: np.ndarray) -> ChannelDimension: function get_channel_dimension_axis (line 172) | def get_channel_dimension_axis(image: np.ndarray) -> int: function get_image_size (line 191) | def get_image_size(image: np.ndarray, channel_dim: ChannelDimension = No... function is_valid_annotation_coco_detection (line 215) | def is_valid_annotation_coco_detection(annotation: Dict[str, Union[List,... function is_valid_annotation_coco_panoptic (line 231) | def is_valid_annotation_coco_panoptic(annotation: Dict[str, Union[List, ... function valid_coco_detection_annotations (line 248) | def valid_coco_detection_annotations(annotations: Iterable[Dict[str, Uni... function valid_coco_panoptic_annotations (line 252) | def valid_coco_panoptic_annotations(annotations: Iterable[Dict[str, Unio... function load_image (line 256) | def load_image(image: Union[str, "PIL.Image.Image"]) -> "PIL.Image.Image": class ImageFeatureExtractionMixin (line 291) | class ImageFeatureExtractionMixin: method _ensure_format_supported (line 296) | def _ensure_format_supported(self, image): method to_pil_image (line 303) | def to_pil_image(self, image, rescale=None): method convert_rgb (line 333) | def convert_rgb(self, image): method rescale (line 347) | def rescale(self, image: np.ndarray, scale: Union[float, int]) -> np.n... method to_numpy_array (line 354) | def to_numpy_array(self, image, rescale=None, channel_first=True): method expand_dims (line 386) | def expand_dims(self, image): method normalize (line 406) | def normalize(self, image, mean, std, rescale=False): method resize (line 452) | def resize(self, image, size, resample=None, default_to_square=True, m... method center_crop (line 519) | def center_crop(self, image, size): method flip_channel_order (line 594) | def flip_channel_order(self, image): method rotate (line 611) | def rotate(self, image, angle, resample=None, expand=0, center=None, t... FILE: transformers/integrations.py function is_wandb_available (line 78) | def is_wandb_available(): function is_clearml_available (line 89) | def is_clearml_available(): function is_comet_available (line 93) | def is_comet_available(): function is_tensorboard_available (line 97) | def is_tensorboard_available(): function is_optuna_available (line 101) | def is_optuna_available(): function is_ray_available (line 105) | def is_ray_available(): function is_ray_tune_available (line 109) | def is_ray_tune_available(): function is_sigopt_available (line 115) | def is_sigopt_available(): function is_azureml_available (line 119) | def is_azureml_available(): function is_mlflow_available (line 127) | def is_mlflow_available(): function is_dagshub_available (line 133) | def is_dagshub_available(): function is_fairscale_available (line 137) | def is_fairscale_available(): function is_neptune_available (line 141) | def is_neptune_available(): function is_codecarbon_available (line 145) | def is_codecarbon_available(): function is_flytekit_available (line 149) | def is_flytekit_available(): function is_flyte_deck_standard_available (line 153) | def is_flyte_deck_standard_available(): function hp_params (line 159) | def hp_params(trial): function default_hp_search_backend (line 180) | def default_hp_search_backend(): function run_hp_search_optuna (line 189) | def run_hp_search_optuna(trainer, n_trials: int, direction: str, **kwarg... function run_hp_search_ray (line 240) | def run_hp_search_ray(trainer, n_trials: int, direction: str, **kwargs) ... function run_hp_search_sigopt (line 376) | def run_hp_search_sigopt(trainer, n_trials: int, direction: str, **kwarg... function run_hp_search_wandb (line 476) | def run_hp_search_wandb(trainer, n_trials: int, direction: str, **kwargs... function get_available_reporting_integrations (line 545) | def get_available_reporting_integrations(): function rewrite_logs (line 568) | def rewrite_logs(d): class TensorBoardCallback (line 584) | class TensorBoardCallback(TrainerCallback): method __init__ (line 593) | def __init__(self, tb_writer=None): method _init_summary_writer (line 616) | def _init_summary_writer(self, args, log_dir=None): method on_train_begin (line 621) | def on_train_begin(self, args, state, control, **kwargs): method on_log (line 643) | def on_log(self, args, state, control, logs=None, **kwargs): method on_train_end (line 664) | def on_train_end(self, args, state, control, **kwargs): class WandbCallback (line 670) | class WandbCallback(TrainerCallback): method __init__ (line 675) | def __init__(self): method setup (line 695) | def setup(self, args, state, model, **kwargs): method on_train_begin (line 762) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 773) | def on_train_end(self, args, state, control, model=None, tokenizer=Non... method on_log (line 807) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): method on_save (line 816) | def on_save(self, args, state, control, **kwargs): class CometCallback (line 837) | class CometCallback(TrainerCallback): method __init__ (line 842) | def __init__(self): method setup (line 848) | def setup(self, args, state, model): method on_train_begin (line 890) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 894) | def on_log(self, args, state, control, model=None, logs=None, **kwargs): method on_train_end (line 902) | def on_train_end(self, args, state, control, **kwargs): class AzureMLCallback (line 914) | class AzureMLCallback(TrainerCallback): method __init__ (line 919) | def __init__(self, azureml_run=None): method on_init_end (line 924) | def on_init_end(self, args, state, control, **kwargs): method on_log (line 930) | def on_log(self, args, state, control, logs=None, **kwargs): class MLflowCallback (line 937) | class MLflowCallback(TrainerCallback): method __init__ (line 943) | def __init__(self): method setup (line 956) | def setup(self, args, state, model): method on_train_begin (line 1026) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_log (line 1030) | def on_log(self, args, state, control, logs, model=None, **kwargs): method on_train_end (line 1045) | def on_train_end(self, args, state, control, **kwargs): method on_save (line 1050) | def on_save(self, args, state, control, **kwargs): method __del__ (line 1061) | def __del__(self): class DagsHubCallback (line 1072) | class DagsHubCallback(MLflowCallback): method __init__ (line 1077) | def __init__(self): method setup (line 1086) | def setup(self, *args, **kwargs): method on_train_end (line 1113) | def on_train_end(self, args, state, control, **kwargs): class NeptuneMissingConfiguration (line 1121) | class NeptuneMissingConfiguration(Exception): method __init__ (line 1122) | def __init__(self): class NeptuneCallback (line 1132) | class NeptuneCallback(TrainerCallback): method __init__ (line 1168) | def __init__( method _stop_run_if_exists (line 1223) | def _stop_run_if_exists(self): method _initialize_run (line 1229) | def _initialize_run(self, **additional_neptune_kwargs): method _use_initial_run (line 1245) | def _use_initial_run(self): method _ensure_run_with_monitoring (line 1251) | def _ensure_run_with_monitoring(self): method _ensure_at_least_run_without_monitoring (line 1265) | def _ensure_at_least_run_without_monitoring(self): method run (line 1280) | def run(self): method _metadata_namespace (line 1286) | def _metadata_namespace(self): method _log_integration_version (line 1289) | def _log_integration_version(self): method _log_trainer_parameters (line 1292) | def _log_trainer_parameters(self, args): method _log_model_parameters (line 1295) | def _log_model_parameters(self, model): method _log_hyper_param_search_parameters (line 1299) | def _log_hyper_param_search_parameters(self, state): method _log_model_checkpoint (line 1306) | def _log_model_checkpoint(self, source_directory: str, checkpoint: str): method on_init_end (line 1330) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 1338) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 1353) | def on_train_end(self, args, state, control, **kwargs): method __del__ (line 1356) | def __del__(self): method on_save (line 1362) | def on_save(self, args, state, control, **kwargs): method on_evaluate (line 1366) | def on_evaluate(self, args, state, control, metrics=None, **kwargs): method get_run (line 1379) | def get_run(cls, trainer): method on_log (line 1386) | def on_log(self, args, state, control, logs: Optional[Dict[str, float]... class CodeCarbonCallback (line 1399) | class CodeCarbonCallback(TrainerCallback): method __init__ (line 1404) | def __init__(self): method on_init_end (line 1414) | def on_init_end(self, args, state, control, **kwargs): method on_train_begin (line 1419) | def on_train_begin(self, args, state, control, model=None, **kwargs): method on_train_end (line 1423) | def on_train_end(self, args, state, control, **kwargs): class ClearMLCallback (line 1428) | class ClearMLCallback(TrainerCallback): method __init__ (line 1441) | def __init__(self): method setup (line 1454) | def setup(self, args, state, model, tokenizer, **kwargs): method on_train_begin (line 1482) | def on_train_begin(self, args, state, control, model=None, tokenizer=N... method on_train_end (line 1490) | def on_train_end(self, args, state, control, model=None, tokenizer=Non... method on_log (line 1497) | def on_log(self, args, state, control, model=None, tokenizer=None, log... method on_save (line 1539) | def on_save(self, args, state, control, **kwargs): class FlyteCallback (line 1547) | class FlyteCallback(TrainerCallback): method __init__ (line 1574) | def __init__(self, save_log_history: bool = True, sync_checkpoints: bo... method on_save (line 1592) | def on_save(self, args, state, control, **kwargs): method on_train_end (line 1600) | def on_train_end(self, args, state, control, **kwargs): function get_reporting_integration_callbacks (line 1624) | def get_reporting_integration_callbacks(report_to): FILE: transformers/keras_callbacks.py class KerasMetricCallback (line 21) | class KerasMetricCallback(Callback): method __init__ (line 79) | def __init__( method _concatenate_batches (line 145) | def _concatenate_batches(batches, padding_index=-100): method _postprocess_predictions_or_labels (line 163) | def _postprocess_predictions_or_labels(self, inputs): method on_epoch_end (line 185) | def on_epoch_end(self, epoch, logs=None): class PushToHubCallback (line 268) | class PushToHubCallback(Callback): method __init__ (line 315) | def __init__( method on_train_begin (line 352) | def on_train_begin(self, logs=None): method on_train_batch_end (line 357) | def on_train_batch_end(self, batch, logs=None): method on_epoch_end (line 368) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 395) | def on_train_end(self, logs=None): FILE: transformers/kernels/deformable_detr/cpu/ms_deform_attn_cpu.cpp function ms_deform_attn_cpu_forward (line 17) | at::Tensor function ms_deform_attn_cpu_backward (line 29) | std::vector FILE: transformers/kernels/deformable_detr/ms_deform_attn.h function im2col_step (line 27) | int im2col_step) FILE: transformers/kernels/deformable_detr/vision.cpp function PYBIND11_MODULE (line 13) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: transformers/kernels/rwkv/wkv_op.cpp function forward (line 12) | void forward(torch::Tensor &w, torch::Tensor &u, torch::Tensor &k, torch... function forward_bf16 (line 18) | void forward_bf16(torch::Tensor &w, torch::Tensor &u, torch::Tensor &k, ... function forward_with_state (line 24) | void forward_with_state(torch::Tensor &w, torch::Tensor &u, torch::Tenso... function forward_with_state_bf16 (line 30) | void forward_with_state_bf16(torch::Tensor &w, torch::Tensor &u, torch::... function backward (line 36) | void backward(torch::Tensor &w, torch::Tensor &u, torch::Tensor &k, torc... function backward_bf16 (line 42) | void backward_bf16(torch::Tensor &w, torch::Tensor &u, torch::Tensor &k,... function PYBIND11_MODULE (line 50) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 59) | TORCH_LIBRARY(wkv, m) { FILE: transformers/kernels/yoso/fast_lsh_cumulation_torch.cpp function fast_hash (line 7) | std::vector fast_hash( function lsh_cumulation (line 28) | at::Tensor lsh_cumulation( function lsh_weighted_cumulation (line 49) | at::Tensor lsh_weighted_cumulation( function PYBIND11_MODULE (line 124) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: transformers/modelcard.py class ModelCard (line 80) | class ModelCard: method __init__ (line 91) | def __init__(self, **kwargs): method save_pretrained (line 114) | def save_pretrained(self, save_directory_or_file): method from_pretrained (line 126) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method from_dict (line 222) | def from_dict(cls, json_object): method from_json_file (line 227) | def from_json_file(cls, json_file): method __eq__ (line 234) | def __eq__(self, other): method __repr__ (line 237) | def __repr__(self): method to_dict (line 240) | def to_dict(self): method to_json_string (line 245) | def to_json_string(self): method to_json_file (line 249) | def to_json_file(self, json_file_path): function _listify (line 300) | def _listify(obj): function _insert_values_as_list (line 309) | def _insert_values_as_list(metadata, name, values): function infer_metric_tags_from_eval_results (line 321) | def infer_metric_tags_from_eval_results(eval_results): function _insert_value (line 333) | def _insert_value(metadata, name, value): function is_hf_dataset (line 340) | def is_hf_dataset(dataset): function _get_mapping_values (line 349) | def _get_mapping_values(mapping): class TrainingSummary (line 360) | class TrainingSummary: method __post_init__ (line 376) | def __post_init__(self): method create_model_index (line 392) | def create_model_index(self, metric_mapping): method create_metadata (line 455) | def create_metadata(self): method to_model_card (line 468) | def to_model_card(self): method from_trainer (line 549) | def from_trainer( method from_keras (line 627) | def from_keras( function parse_keras_history (line 702) | def parse_keras_history(logs): function parse_log_history (line 737) | def parse_log_history(log_history): function extract_hyperparameters_from_keras (line 799) | def extract_hyperparameters_from_keras(model): function _maybe_round (line 812) | def _maybe_round(v, decimals=4): function _regular_table_line (line 818) | def _regular_table_line(values, col_widths): function _second_table_line (line 823) | def _second_table_line(col_widths): function make_markdown_table (line 828) | def make_markdown_table(lines): function extract_hyperparameters_from_trainer (line 855) | def extract_hyperparameters_from_trainer(trainer): FILE: transformers/modeling_flax_outputs.py class FlaxBaseModelOutput (line 23) | class FlaxBaseModelOutput(ModelOutput): class FlaxBaseModelOutputWithNoAttention (line 49) | class FlaxBaseModelOutputWithNoAttention(ModelOutput): class FlaxBaseModelOutputWithPoolingAndNoAttention (line 67) | class FlaxBaseModelOutputWithPoolingAndNoAttention(ModelOutput): class FlaxImageClassifierOutputWithNoAttention (line 88) | class FlaxImageClassifierOutputWithNoAttention(ModelOutput): class FlaxBaseModelOutputWithPast (line 107) | class FlaxBaseModelOutputWithPast(ModelOutput): class FlaxBaseModelOutputWithPooling (line 137) | class FlaxBaseModelOutputWithPooling(ModelOutput): class FlaxBaseModelOutputWithPoolingAndCrossAttentions (line 168) | class FlaxBaseModelOutputWithPoolingAndCrossAttentions(ModelOutput): class FlaxBaseModelOutputWithPastAndCrossAttentions (line 217) | class FlaxBaseModelOutputWithPastAndCrossAttentions(ModelOutput): class FlaxSeq2SeqModelOutput (line 263) | class FlaxSeq2SeqModelOutput(ModelOutput): class FlaxCausalLMOutputWithCrossAttentions (line 324) | class FlaxCausalLMOutputWithCrossAttentions(ModelOutput): class FlaxMaskedLMOutput (line 365) | class FlaxMaskedLMOutput(ModelOutput): class FlaxSeq2SeqLMOutput (line 394) | class FlaxSeq2SeqLMOutput(ModelOutput): class FlaxNextSentencePredictorOutput (line 451) | class FlaxNextSentencePredictorOutput(ModelOutput): class FlaxSequenceClassifierOutput (line 478) | class FlaxSequenceClassifierOutput(ModelOutput): class FlaxSeq2SeqSequenceClassifierOutput (line 504) | class FlaxSeq2SeqSequenceClassifierOutput(ModelOutput): class FlaxMultipleChoiceModelOutput (line 561) | class FlaxMultipleChoiceModelOutput(ModelOutput): class FlaxTokenClassifierOutput (line 589) | class FlaxTokenClassifierOutput(ModelOutput): class FlaxQuestionAnsweringModelOutput (line 615) | class FlaxQuestionAnsweringModelOutput(ModelOutput): class FlaxSeq2SeqQuestionAnsweringModelOutput (line 644) | class FlaxSeq2SeqQuestionAnsweringModelOutput(ModelOutput): FILE: transformers/modeling_flax_pytorch_utils.py function load_pytorch_checkpoint_in_flax_state_dict (line 41) | def load_pytorch_checkpoint_in_flax_state_dict( function rename_key_and_reshape_tensor (line 69) | def rename_key_and_reshape_tensor( function convert_pytorch_state_dict_to_flax (line 126) | def convert_pytorch_state_dict_to_flax(pt_state_dict, flax_model): function convert_pytorch_sharded_state_dict_to_flax (line 204) | def convert_pytorch_sharded_state_dict_to_flax(shard_filenames, flax_mod... function load_flax_checkpoint_in_pytorch_model (line 284) | def load_flax_checkpoint_in_pytorch_model(model, flax_checkpoint_path): function load_flax_weights_in_pytorch_model (line 302) | def load_flax_weights_in_pytorch_model(pt_model, flax_state): FILE: transformers/modeling_flax_utils.py function quick_gelu (line 61) | def quick_gelu(x): function dtype_byte_size (line 75) | def dtype_byte_size(dtype): function flax_shard_checkpoint (line 92) | def flax_shard_checkpoint(params, max_shard_size="10GB"): class FlaxPreTrainedModel (line 157) | class FlaxPreTrainedModel(PushToHubMixin, FlaxGenerationMixin): method __init__ (line 179) | def __init__( method init_weights (line 230) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method enable_gradient_checkpointing (line 233) | def enable_gradient_checkpointing(self): method _from_config (line 237) | def _from_config(cls, config, **kwargs): method framework (line 244) | def framework(self) -> str: method config (line 251) | def config(self) -> PretrainedConfig: method module (line 255) | def module(self) -> nn.Module: method params (line 259) | def params(self) -> Union[Dict, FrozenDict]: method required_params (line 269) | def required_params(self) -> Set: method params_shape_tree (line 273) | def params_shape_tree(self) -> Dict: method params (line 277) | def params(self, params: Union[Dict, FrozenDict]): method _cast_floating_to (line 295) | def _cast_floating_to(self, params: Union[Dict, FrozenDict], dtype: jn... method to_bf16 (line 319) | def to_bf16(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp32 (line 358) | def to_fp32(self, params: Union[Dict, FrozenDict], mask: Any = None): method to_fp16 (line 385) | def to_fp16(self, params: Union[Dict, FrozenDict], mask: Any = None): method load_flax_sharded_weights (line 425) | def load_flax_sharded_weights(cls, shard_files): method can_generate (line 471) | def can_generate(self) -> bool: method from_pretrained (line 482) | def from_pretrained( method save_pretrained (line 1008) | def save_pretrained( method register_for_auto_class (line 1112) | def register_for_auto_class(cls, auto_class="FlaxAutoModel"): function overwrite_call_docstring (line 1146) | def overwrite_call_docstring(model_class, docstring): function append_call_sample_docstring (line 1155) | def append_call_sample_docstring(model_class, checkpoint, output_type, c... function append_replace_return_docstrings (line 1165) | def append_replace_return_docstrings(model_class, output_type, config_cl... FILE: transformers/modeling_outputs.py class BaseModelOutput (line 25) | class BaseModelOutput(ModelOutput): class BaseModelOutputWithNoAttention (line 51) | class BaseModelOutputWithNoAttention(ModelOutput): class BaseModelOutputWithPooling (line 70) | class BaseModelOutputWithPooling(ModelOutput): class BaseModelOutputWithPoolingAndNoAttention (line 102) | class BaseModelOutputWithPoolingAndNoAttention(ModelOutput): class BaseModelOutputWithPast (line 124) | class BaseModelOutputWithPast(ModelOutput): class BaseModelOutputWithCrossAttentions (line 163) | class BaseModelOutputWithCrossAttentions(ModelOutput): class BaseModelOutputWithPoolingAndCrossAttentions (line 196) | class BaseModelOutputWithPoolingAndCrossAttentions(ModelOutput): class BaseModelOutputWithPastAndCrossAttentions (line 245) | class BaseModelOutputWithPastAndCrossAttentions(ModelOutput): class MoECausalLMOutputWithPast (line 291) | class MoECausalLMOutputWithPast(ModelOutput): class MoEModelOutput (line 340) | class MoEModelOutput(ModelOutput): class MoEModelOutputWithPastAndCrossAttentions (line 372) | class MoEModelOutputWithPastAndCrossAttentions(ModelOutput): class Seq2SeqModelOutput (line 425) | class Seq2SeqModelOutput(ModelOutput): class Seq2SeqMoEModelOutput (line 486) | class Seq2SeqMoEModelOutput(ModelOutput): class CausalLMOutput (line 558) | class CausalLMOutput(ModelOutput): class CausalLMOutputWithPast (line 587) | class CausalLMOutputWithPast(ModelOutput): class CausalLMOutputWithCrossAttentions (line 623) | class CausalLMOutputWithCrossAttentions(ModelOutput): class SequenceClassifierOutputWithPast (line 667) | class SequenceClassifierOutputWithPast(ModelOutput): class MaskedLMOutput (line 703) | class MaskedLMOutput(ModelOutput): class Seq2SeqLMOutput (line 732) | class Seq2SeqLMOutput(ModelOutput): class Seq2SeqMoEOutput (line 792) | class Seq2SeqMoEOutput(ModelOutput): class NextSentencePredictorOutput (line 867) | class NextSentencePredictorOutput(ModelOutput): class SequenceClassifierOutput (line 897) | class SequenceClassifierOutput(ModelOutput): class Seq2SeqSequenceClassifierOutput (line 926) | class Seq2SeqSequenceClassifierOutput(ModelOutput): class MultipleChoiceModelOutput (line 986) | class MultipleChoiceModelOutput(ModelOutput): class TokenClassifierOutput (line 1017) | class TokenClassifierOutput(ModelOutput): class QuestionAnsweringModelOutput (line 1046) | class QuestionAnsweringModelOutput(ModelOutput): class Seq2SeqQuestionAnsweringModelOutput (line 1078) | class Seq2SeqQuestionAnsweringModelOutput(ModelOutput): class SemanticSegmenterOutput (line 1141) | class SemanticSegmenterOutput(ModelOutput): class ImageClassifierOutput (line 1179) | class ImageClassifierOutput(ModelOutput): class ImageClassifierOutputWithNoAttention (line 1207) | class ImageClassifierOutputWithNoAttention(ModelOutput): class DepthEstimatorOutput (line 1228) | class DepthEstimatorOutput(ModelOutput): class ImageSuperResolutionOutput (line 1258) | class ImageSuperResolutionOutput(ModelOutput): class Wav2Vec2BaseModelOutput (line 1286) | class Wav2Vec2BaseModelOutput(ModelOutput): class XVectorOutput (line 1315) | class XVectorOutput(ModelOutput): class BackboneOutput (line 1347) | class BackboneOutput(ModelOutput): class BaseModelOutputWithPoolingAndProjection (line 1374) | class BaseModelOutputWithPoolingAndProjection(ModelOutput): class Seq2SeqSpectrogramOutput (line 1411) | class Seq2SeqSpectrogramOutput(ModelOutput): class Seq2SeqTSModelOutput (line 1471) | class Seq2SeqTSModelOutput(ModelOutput): class Seq2SeqTSPredictionOutput (line 1543) | class Seq2SeqTSPredictionOutput(ModelOutput): class SampleTSPredictionOutput (line 1615) | class SampleTSPredictionOutput(ModelOutput): class MaskedImageModelingOutput (line 1629) | class MaskedImageModelingOutput(ModelOutput): method logits (line 1656) | def logits(self): FILE: transformers/modeling_tf_outputs.py class TFBaseModelOutput (line 27) | class TFBaseModelOutput(ModelOutput): class TFBaseModelOutputWithNoAttention (line 53) | class TFBaseModelOutputWithNoAttention(ModelOutput): class TFBaseModelOutputWithPooling (line 72) | class TFBaseModelOutputWithPooling(ModelOutput): class TFBaseModelOutputWithPoolingAndNoAttention (line 106) | class TFBaseModelOutputWithPoolingAndNoAttention(ModelOutput): class TFBaseModelOutputWithPoolingAndCrossAttentions (line 128) | class TFBaseModelOutputWithPoolingAndCrossAttentions(ModelOutput): class TFBaseModelOutputWithPast (line 176) | class TFBaseModelOutputWithPast(ModelOutput): class TFBaseModelOutputWithCrossAttentions (line 212) | class TFBaseModelOutputWithCrossAttentions(ModelOutput): class TFBaseModelOutputWithPastAndCrossAttentions (line 245) | class TFBaseModelOutputWithPastAndCrossAttentions(ModelOutput): class TFSeq2SeqModelOutput (line 288) | class TFSeq2SeqModelOutput(ModelOutput): class TFCausalLMOutput (line 348) | class TFCausalLMOutput(ModelOutput): class TFCausalLMOutputWithPast (line 377) | class TFCausalLMOutputWithPast(ModelOutput): class TFCausalLMOutputWithCrossAttentions (line 413) | class TFCausalLMOutputWithCrossAttentions(ModelOutput): class TFMaskedLMOutput (line 456) | class TFMaskedLMOutput(ModelOutput): class TFSeq2SeqLMOutput (line 485) | class TFSeq2SeqLMOutput(ModelOutput): class TFNextSentencePredictorOutput (line 544) | class TFNextSentencePredictorOutput(ModelOutput): class TFSequenceClassifierOutput (line 574) | class TFSequenceClassifierOutput(ModelOutput): class TFSeq2SeqSequenceClassifierOutput (line 603) | class TFSeq2SeqSequenceClassifierOutput(ModelOutput): class TFSemanticSegmenterOutput (line 659) | class TFSemanticSegmenterOutput(ModelOutput): class TFSemanticSegmenterOutputWithNoAttention (line 696) | class TFSemanticSegmenterOutputWithNoAttention(ModelOutput): class TFImageClassifierOutput (line 727) | class TFImageClassifierOutput(ModelOutput): class TFMultipleChoiceModelOutput (line 754) | class TFMultipleChoiceModelOutput(ModelOutput): class TFTokenClassifierOutput (line 785) | class TFTokenClassifierOutput(ModelOutput): class TFQuestionAnsweringModelOutput (line 814) | class TFQuestionAnsweringModelOutput(ModelOutput): class TFSeq2SeqQuestionAnsweringModelOutput (line 846) | class TFSeq2SeqQuestionAnsweringModelOutput(ModelOutput): class TFSequenceClassifierOutputWithPast (line 901) | class TFSequenceClassifierOutputWithPast(ModelOutput): class TFImageClassifierOutputWithNoAttention (line 937) | class TFImageClassifierOutputWithNoAttention(ModelOutput): class TFMaskedImageModelingOutput (line 958) | class TFMaskedImageModelingOutput(ModelOutput): method logits (line 985) | def logits(self): FILE: transformers/modeling_tf_pytorch_utils.py class TransposeType (line 31) | class TransposeType(ExplicitEnum): function convert_tf_weight_name_to_pt_weight_name (line 42) | def convert_tf_weight_name_to_pt_weight_name( function apply_transpose (line 114) | def apply_transpose(transpose: TransposeType, weight, match_shape=None, ... function load_pytorch_checkpoint_in_tf2_model (line 156) | def load_pytorch_checkpoint_in_tf2_model( function load_pytorch_model_in_tf2_model (line 200) | def load_pytorch_model_in_tf2_model(tf_model, pt_model, tf_inputs=None, ... function load_pytorch_weights_in_tf2_model (line 209) | def load_pytorch_weights_in_tf2_model( function load_pytorch_state_dict_in_tf2_model (line 241) | def load_pytorch_state_dict_in_tf2_model( function load_tf2_checkpoint_in_pytorch_model (line 410) | def load_tf2_checkpoint_in_pytorch_model( function load_tf2_model_in_pytorch_model (line 451) | def load_tf2_model_in_pytorch_model(pt_model, tf_model, allow_missing_ke... function load_tf2_weights_in_pytorch_model (line 460) | def load_tf2_weights_in_pytorch_model(pt_model, tf_weights, allow_missin... function load_tf2_state_dict_in_pytorch_model (line 478) | def load_tf2_state_dict_in_pytorch_model(pt_model, tf_state_dict, allow_... FILE: transformers/modeling_tf_utils.py function dummy_loss (line 113) | def dummy_loss(y_true, y_pred): class TFModelUtilsMixin (line 121) | class TFModelUtilsMixin: method num_parameters (line 126) | def num_parameters(self, only_trainable: bool = False) -> int: function keras_serializable (line 143) | def keras_serializable(cls): class TFCausalLanguageModelingLoss (line 208) | class TFCausalLanguageModelingLoss: method hf_compute_loss (line 219) | def hf_compute_loss(self, labels, logits): class TFQuestionAnsweringLoss (line 239) | class TFQuestionAnsweringLoss: method hf_compute_loss (line 244) | def hf_compute_loss(self, labels, logits): class TFTokenClassificationLoss (line 254) | class TFTokenClassificationLoss: method hf_compute_loss (line 265) | def hf_compute_loss(self, labels, logits): class TFSequenceClassificationLoss (line 298) | class TFSequenceClassificationLoss: method hf_compute_loss (line 303) | def hf_compute_loss(self, labels, logits): class TFMultipleChoiceLoss (line 317) | class TFMultipleChoiceLoss: method hf_compute_loss (line 320) | def hf_compute_loss(self, labels, logits): class TFMaskedLanguageModelingLoss (line 327) | class TFMaskedLanguageModelingLoss(TFCausalLanguageModelingLoss): class TFNextSentencePredictionLoss (line 339) | class TFNextSentencePredictionLoss: method hf_compute_loss (line 350) | def hf_compute_loss(self, labels, logits): function booleans_processing (line 375) | def booleans_processing(config, **kwargs): function unpack_inputs (line 408) | def unpack_inputs(func): function input_processing (line 452) | def input_processing(func, config, **kwargs): function dtype_byte_size (line 625) | def dtype_byte_size(dtype): function format_weight_name (line 645) | def format_weight_name(name, _prefix=None): function tf_shard_checkpoint (line 653) | def tf_shard_checkpoint(weights, max_shard_size="10GB"): function load_tf_sharded_weights (line 719) | def load_tf_sharded_weights(model, shard_files, ignore_mismatched_sizes=... function load_tf_shard (line 786) | def load_tf_shard(model, model_layer_map, resolved_archive_file, ignore_... function load_tf_weights (line 874) | def load_tf_weights(model, resolved_archive_file, ignore_mismatched_size... function load_tf_weights_from_h5 (line 901) | def load_tf_weights_from_h5(model, resolved_archive_file, ignore_mismatc... function load_tf_weights_from_safetensors (line 1001) | def load_tf_weights_from_safetensors(model, resolved_archive_file, ignor... function init_copy_embeddings (line 1042) | def init_copy_embeddings(old_embeddings, new_num_tokens): class TFPreTrainedModel (line 1082) | class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin, TFGenerationM... method dummy_inputs (line 1117) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method framework (line 1149) | def framework(self) -> str: method build (line 1155) | def build(self, input_shape=None): method __init__ (line 1162) | def __init__(self, config, *inputs, **kwargs): method get_config (line 1181) | def get_config(self): method from_config (line 1185) | def from_config(cls, config, **kwargs): method _from_config (line 1191) | def _from_config(cls, config, **kwargs): method get_head_mask (line 1197) | def get_head_mask(self, head_mask: tf.Tensor | None, num_hidden_layers... method _convert_head_mask_to_5d (line 1218) | def _convert_head_mask_to_5d(self, head_mask, num_hidden_layers): method eager_serving (line 1229) | def eager_serving(self, inputs): method input_signature (line 1243) | def input_signature(self) -> Dict[str, tf.TensorSpec]: method _prune_signature (line 1290) | def _prune_signature(self, signature): method serving_output (line 1295) | def serving_output(self, output): method can_generate (line 1319) | def can_generate(self) -> bool: method get_input_embeddings (line 1331) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _save_checkpoint (line 1345) | def _save_checkpoint(self, checkpoint_dir, epoch): method load_repo_checkpoint (line 1358) | def load_repo_checkpoint(self, repo_path_or_name): method prepare_tf_dataset (line 1412) | def prepare_tf_dataset( method compile (line 1517) | def compile( method compute_loss (line 1571) | def compute_loss(self, *args, **kwargs): method get_label_to_output_name_mapping (line 1585) | def get_label_to_output_name_mapping(self): method train_step (line 1600) | def train_step(self, data): method test_step (line 1708) | def test_step(self, data): method create_model_card (line 1812) | def create_model_card( method set_input_embeddings (line 1872) | def set_input_embeddings(self, value): method get_output_embeddings (line 1892) | def get_output_embeddings(self) -> Union[None, tf.keras.layers.Layer]: method set_output_embeddings (line 1912) | def set_output_embeddings(self, value): method get_output_layer_with_bias (line 1929) | def get_output_layer_with_bias(self) -> Union[None, tf.keras.layers.La... method get_prefix_bias_name (line 1942) | def get_prefix_bias_name(self) -> Union[None, str]: method get_bias (line 1952) | def get_bias(self) -> Union[None, Dict[str, tf.Variable]]: method set_bias (line 1969) | def set_bias(self, value): method get_lm_head (line 1985) | def get_lm_head(self) -> tf.keras.layers.Layer: method resize_token_embeddings (line 1994) | def resize_token_embeddings( method _v2_resized_token_embeddings (line 2027) | def _v2_resized_token_embeddings(self, new_num_tokens: Optional[int] =... method _get_word_embedding_weight (line 2050) | def _get_word_embedding_weight(model, embedding_layer): method _resize_token_embeddings (line 2081) | def _resize_token_embeddings(self, new_num_tokens): method _v2_resize_token_embeddings (line 2104) | def _v2_resize_token_embeddings(self, new_num_tokens): method _get_resized_lm_head_bias (line 2125) | def _get_resized_lm_head_bias(self, old_lm_head_bias, new_num_tokens): method _v2_get_resized_lm_head_bias (line 2178) | def _v2_get_resized_lm_head_bias( method _get_resized_lm_head_decoder (line 2212) | def _get_resized_lm_head_decoder(self, old_lm_head_decoder, new_num_to... method _get_resized_embeddings (line 2250) | def _get_resized_embeddings(self, old_embeddings, new_num_tokens=None)... method _v2_get_resized_embeddings (line 2285) | def _v2_get_resized_embeddings( method prune_heads (line 2332) | def prune_heads(self, heads_to_prune): method save_pretrained (line 2344) | def save_pretrained( method from_pretrained (line 2501) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method push_to_hub (line 3029) | def push_to_hub( method register_for_auto_class (line 3126) | def register_for_auto_class(cls, auto_class="TFAutoModel"): class TFConv1D (line 3152) | class TFConv1D(tf.keras.layers.Layer): method __init__ (line 3169) | def __init__(self, nf, nx, initializer_range=0.02, **kwargs): method build (line 3175) | def build(self, input_shape): method call (line 3181) | def call(self, x): class TFSharedEmbeddings (line 3192) | class TFSharedEmbeddings(tf.keras.layers.Layer): method __init__ (line 3212) | def __init__(self, vocab_size: int, hidden_size: int, initializer_rang... method build (line 3222) | def build(self, input_shape): method get_config (line 3232) | def get_config(self): method call (line 3242) | def call(self, inputs: tf.Tensor, mode: str = "embedding") -> tf.Tensor: method _embedding (line 3274) | def _embedding(self, input_ids): method _linear (line 3278) | def _linear(self, inputs): class TFSequenceSummary (line 3295) | class TFSequenceSummary(tf.keras.layers.Layer): method __init__ (line 3325) | def __init__(self, config: PretrainedConfig, initializer_range: float ... method call (line 3359) | def call(self, inputs, cls_index=None, training=False): function get_initializer (line 3411) | def get_initializer(initializer_range: float = 0.02) -> tf.keras.initial... FILE: transformers/modeling_utils.py function no_init_weights (line 127) | def no_init_weights(_enable=True): class Identity (line 147) | class Identity(nn.Module): method __init__ (line 150) | def __init__(self, *args, **kwargs): method forward (line 153) | def forward(self, input): function get_parameter_device (line 157) | def get_parameter_device(parameter: Union[nn.Module, GenerationMixin, "M... function get_first_parameter_dtype (line 172) | def get_first_parameter_dtype(parameter: Union[nn.Module, GenerationMixi... function get_parameter_dtype (line 190) | def get_parameter_dtype(parameter: Union[nn.Module, GenerationMixin, "Mo... function get_state_dict_float_dtype (line 239) | def get_state_dict_float_dtype(state_dict): function get_state_dict_dtype (line 250) | def get_state_dict_dtype(state_dict): function dtype_byte_size (line 263) | def dtype_byte_size(dtype): function shard_checkpoint (line 283) | def shard_checkpoint( function load_sharded_checkpoint (line 360) | def load_sharded_checkpoint(model, folder, strict=True, prefer_safe=True): function load_state_dict (line 444) | def load_state_dict(checkpoint_file: Union[str, os.PathLike]): function set_initialized_submodules (line 486) | def set_initialized_submodules(model, state_dict_keys): function _load_state_dict_into_model (line 497) | def _load_state_dict_into_model(model_to_load, state_dict, start_prefix): function find_submodule_and_param_name (line 558) | def find_submodule_and_param_name(model, long_key, start_prefix): function _move_model_to_meta (line 581) | def _move_model_to_meta(model, loaded_state_dict_keys, start_prefix): function _load_state_dict_into_meta_model (line 607) | def _load_state_dict_into_meta_model( function _add_variant (line 735) | def _add_variant(weights_name: str, variant: Optional[str] = None) -> str: class ModuleUtilsMixin (line 744) | class ModuleUtilsMixin: method _hook_rss_memory_pre_forward (line 750) | def _hook_rss_memory_pre_forward(module, *args, **kwargs): method _hook_rss_memory_post_forward (line 762) | def _hook_rss_memory_post_forward(module, *args, **kwargs): method add_memory_hooks (line 775) | def add_memory_hooks(self): method reset_memory_hooks_state (line 787) | def reset_memory_hooks_state(self): method device (line 797) | def device(self) -> torch.device: method dtype (line 805) | def dtype(self) -> torch.dtype: method invert_attention_mask (line 811) | def invert_attention_mask(self, encoder_attention_mask: Tensor) -> Ten... method create_extended_attention_mask_for_decoder (line 836) | def create_extended_attention_mask_for_decoder(input_shape, attention_... method get_extended_attention_mask (line 863) | def get_extended_attention_mask( method get_head_mask (line 915) | def get_head_mask( method _convert_head_mask_to_5d (line 942) | def _convert_head_mask_to_5d(self, head_mask, num_hidden_layers): method num_parameters (line 953) | def num_parameters(self, only_trainable: bool = False, exclude_embeddi... method estimate_tokens (line 979) | def estimate_tokens(self, input_dict: Dict[str, Union[torch.Tensor, An... method floating_point_ops (line 1000) | def floating_point_ops( class PreTrainedModel (line 1027) | class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, Push... method dummy_inputs (line 1077) | def dummy_inputs(self) -> Dict[str, torch.Tensor]: method framework (line 1084) | def framework(self) -> str: method __init__ (line 1090) | def __init__(self, config: PretrainedConfig, *inputs, **kwargs): method post_init (line 1104) | def post_init(self): method _backward_compatibility_gradient_checkpointing (line 1112) | def _backward_compatibility_gradient_checkpointing(self): method _from_config (line 1119) | def _from_config(cls, config, **kwargs): method _set_default_torch_dtype (line 1152) | def _set_default_torch_dtype(cls, dtype: torch.dtype) -> torch.dtype: method base_model (line 1179) | def base_model(self) -> nn.Module: method can_generate (line 1185) | def can_generate(self) -> bool: method enable_input_require_grads (line 1197) | def enable_input_require_grads(self): method disable_input_require_grads (line 1208) | def disable_input_require_grads(self): method get_input_embeddings (line 1214) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1227) | def set_input_embeddings(self, value: nn.Module): method get_output_embeddings (line 1240) | def get_output_embeddings(self) -> nn.Module: method _init_weights (line 1249) | def _init_weights(self, module): method _initialize_weights (line 1255) | def _initialize_weights(self, module): method tie_weights (line 1264) | def tie_weights(self): method _tie_encoder_decoder_weights (line 1286) | def _tie_encoder_decoder_weights(encoder: nn.Module, decoder: nn.Modul... method _tie_or_clone_weights (line 1360) | def _tie_or_clone_weights(self, output_embeddings, input_embeddings): method resize_token_embeddings (line 1380) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _resize_token_embeddings (line 1408) | def _resize_token_embeddings(self, new_num_tokens): method _get_resized_embeddings (line 1421) | def _get_resized_embeddings( method _get_resized_lm_head (line 1485) | def _get_resized_lm_head( method resize_position_embeddings (line 1577) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1583) | def get_position_embeddings(self) -> Union[nn.Embedding, Tuple[nn.Embe... method init_weights (line 1589) | def init_weights(self): method prune_heads (line 1606) | def prune_heads(self, heads_to_prune: Dict[int, List[int]]): method gradient_checkpointing_enable (line 1623) | def gradient_checkpointing_enable(self): method gradient_checkpointing_disable (line 1634) | def gradient_checkpointing_disable(self): method is_gradient_checkpointing (line 1645) | def is_gradient_checkpointing(self) -> bool: method save_pretrained (line 1654) | def save_pretrained( method get_memory_footprint (line 1876) | def get_memory_footprint(self, return_buffers=True): method to (line 1894) | def to(self, *args, **kwargs): method half (line 1904) | def half(self, *args): method float (line 1914) | def float(self, *args): method from_pretrained (line 1925) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method _load_pretrained_model (line 2952) | def _load_pretrained_model( method retrieve_modules_from_names (line 3325) | def retrieve_modules_from_names(self, names, add_prefix=False, remove_... method _load_pretrained_model_low_mem (line 3349) | def _load_pretrained_model_low_mem(model, loaded_state_dict_keys, reso... method register_for_auto_class (line 3373) | def register_for_auto_class(cls, auto_class="AutoModel"): method to_bettertransformer (line 3398) | def to_bettertransformer(self) -> "PreTrainedModel": method reverse_bettertransformer (line 3426) | def reverse_bettertransformer(self): class PoolerStartLogits (line 3456) | class PoolerStartLogits(nn.Module): method __init__ (line 3465) | def __init__(self, config: PretrainedConfig): method forward (line 3469) | def forward( class PoolerEndLogits (line 3494) | class PoolerEndLogits(nn.Module): method __init__ (line 3504) | def __init__(self, config: PretrainedConfig): method forward (line 3511) | def forward( class PoolerAnswerClass (line 3563) | class PoolerAnswerClass(nn.Module): method __init__ (line 3572) | def __init__(self, config): method forward (line 3578) | def forward( class SquadHeadOutput (line 3629) | class SquadHeadOutput(ModelOutput): class SQuADHead (line 3659) | class SQuADHead(nn.Module): method __init__ (line 3669) | def __init__(self, config): method forward (line 3679) | def forward( class SequenceSummary (line 3776) | class SequenceSummary(nn.Module): method __init__ (line 3802) | def __init__(self, config: PretrainedConfig): method forward (line 3831) | def forward( function unwrap_model (line 3875) | def unwrap_model(model: nn.Module) -> nn.Module: function expand_device_map (line 3889) | def expand_device_map(device_map, param_names): function get_disk_only_shard_files (line 3899) | def get_disk_only_shard_files(device_map, sharded_metadata): FILE: transformers/models/albert/configuration_albert.py class AlbertConfig (line 36) | class AlbertConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class AlbertOnnxConfig (line 159) | class AlbertOnnxConfig(OnnxConfig): method inputs (line 161) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/albert/convert_albert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, albert_config_f... FILE: transformers/models/albert/modeling_albert.py function load_tf_weights_in_albert (line 68) | def load_tf_weights_in_albert(model, config, tf_checkpoint_path): class AlbertEmbeddings (line 194) | class AlbertEmbeddings(nn.Module): method __init__ (line 199) | def __init__(self, config: AlbertConfig): method forward (line 218) | def forward( class AlbertAttention (line 260) | class AlbertAttention(nn.Module): method __init__ (line 261) | def __init__(self, config: AlbertConfig): method transpose_for_scores (line 290) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method prune_heads (line 295) | def prune_heads(self, heads: List[int]) -> None: method forward (line 313) | def forward( class AlbertLayer (line 372) | class AlbertLayer(nn.Module): method __init__ (line 373) | def __init__(self, config: AlbertConfig): method forward (line 386) | def forward( method ff_chunk (line 406) | def ff_chunk(self, attention_output: torch.Tensor) -> torch.Tensor: class AlbertLayerGroup (line 413) | class AlbertLayerGroup(nn.Module): method __init__ (line 414) | def __init__(self, config: AlbertConfig): method forward (line 419) | def forward( class AlbertTransformer (line 448) | class AlbertTransformer(nn.Module): method __init__ (line 449) | def __init__(self, config: AlbertConfig): method forward (line 456) | def forward( class AlbertPreTrainedModel (line 501) | class AlbertPreTrainedModel(PreTrainedModel): method _init_weights (line 512) | def _init_weights(self, module): class AlbertForPreTrainingOutput (line 530) | class AlbertForPreTrainingOutput(ModelOutput): class AlbertModel (line 633) | class AlbertModel(AlbertPreTrainedModel): method __init__ (line 637) | def __init__(self, config: AlbertConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 653) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 656) | def set_input_embeddings(self, value: nn.Embedding) -> None: method _prune_heads (line 659) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 682) | def forward( class AlbertForPreTraining (line 761) | class AlbertForPreTraining(AlbertPreTrainedModel): method __init__ (line 768) | def __init__(self, config: AlbertConfig): method get_output_embeddings (line 778) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 781) | def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: method get_input_embeddings (line 784) | def get_input_embeddings(self) -> nn.Embedding: method forward (line 789) | def forward( class AlbertMLMHead (line 870) | class AlbertMLMHead(nn.Module): method __init__ (line 871) | def __init__(self, config: AlbertConfig): method forward (line 881) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method _tie_weights (line 891) | def _tie_weights(self) -> None: class AlbertSOPHead (line 896) | class AlbertSOPHead(nn.Module): method __init__ (line 897) | def __init__(self, config: AlbertConfig): method forward (line 903) | def forward(self, pooled_output: torch.Tensor) -> torch.Tensor: class AlbertForMaskedLM (line 913) | class AlbertForMaskedLM(AlbertPreTrainedModel): method __init__ (line 921) | def __init__(self, config): method get_output_embeddings (line 930) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 933) | def set_output_embeddings(self, new_embeddings: nn.Linear) -> None: method get_input_embeddings (line 936) | def get_input_embeddings(self) -> nn.Embedding: method forward (line 941) | def forward( class AlbertForSequenceClassification (line 1032) | class AlbertForSequenceClassification(AlbertPreTrainedModel): method __init__ (line 1033) | def __init__(self, config: AlbertConfig): method forward (line 1053) | def forward( class AlbertForTokenClassification (line 1133) | class AlbertForTokenClassification(AlbertPreTrainedModel): method __init__ (line 1136) | def __init__(self, config: AlbertConfig): method forward (line 1158) | def forward( class AlbertForQuestionAnswering (line 1218) | class AlbertForQuestionAnswering(AlbertPreTrainedModel): method __init__ (line 1221) | def __init__(self, config: AlbertConfig): method forward (line 1241) | def forward( class AlbertForMultipleChoice (line 1323) | class AlbertForMultipleChoice(AlbertPreTrainedModel): method __init__ (line 1324) | def __init__(self, config: AlbertConfig): method forward (line 1340) | def forward( FILE: transformers/models/albert/modeling_flax_albert.py class FlaxAlbertForPreTrainingOutput (line 55) | class FlaxAlbertForPreTrainingOutput(ModelOutput): class FlaxAlbertEmbeddings (line 151) | class FlaxAlbertEmbeddings(nn.Module): method setup (line 157) | def setup(self): method __call__ (line 177) | def __call__(self, input_ids, token_type_ids, position_ids, determinis... class FlaxAlbertSelfAttention (line 192) | class FlaxAlbertSelfAttention(nn.Module): method setup (line 196) | def setup(self): method __call__ (line 226) | def __call__(self, hidden_states, attention_mask, deterministic=True, ... class FlaxAlbertLayer (line 277) | class FlaxAlbertLayer(nn.Module): method setup (line 281) | def setup(self): method __call__ (line 297) | def __call__( class FlaxAlbertLayerCollection (line 321) | class FlaxAlbertLayerCollection(nn.Module): method setup (line 325) | def setup(self): method __call__ (line 330) | def __call__( class FlaxAlbertLayerCollections (line 364) | class FlaxAlbertLayerCollections(nn.Module): method setup (line 369) | def setup(self): method __call__ (line 372) | def __call__( class FlaxAlbertLayerGroups (line 390) | class FlaxAlbertLayerGroups(nn.Module): method setup (line 394) | def setup(self): method __call__ (line 400) | def __call__( class FlaxAlbertEncoder (line 437) | class FlaxAlbertEncoder(nn.Module): method setup (line 441) | def setup(self): method __call__ (line 449) | def __call__( class FlaxAlbertOnlyMLMHead (line 468) | class FlaxAlbertOnlyMLMHead(nn.Module): method setup (line 473) | def setup(self): method __call__ (line 480) | def __call__(self, hidden_states, shared_embedding=None): class FlaxAlbertSOPHead (line 494) | class FlaxAlbertSOPHead(nn.Module): method setup (line 498) | def setup(self): method __call__ (line 502) | def __call__(self, pooled_output, deterministic=True): class FlaxAlbertPreTrainedModel (line 508) | class FlaxAlbertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 518) | def __init__( method init_weights (line 530) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 555) | def __call__( class FlaxAlbertModule (line 603) | class FlaxAlbertModule(nn.Module): method setup (line 608) | def setup(self): method __call__ (line 623) | def __call__( class FlaxAlbertModel (line 677) | class FlaxAlbertModel(FlaxAlbertPreTrainedModel): class FlaxAlbertForPreTrainingModule (line 684) | class FlaxAlbertForPreTrainingModule(nn.Module): method setup (line 688) | def setup(self): method __call__ (line 693) | def __call__( class FlaxAlbertForPreTraining (line 745) | class FlaxAlbertForPreTraining(FlaxAlbertPreTrainedModel): class FlaxAlbertForMaskedLMModule (line 777) | class FlaxAlbertForMaskedLMModule(nn.Module): method setup (line 781) | def setup(self): method __call__ (line 785) | def __call__( class FlaxAlbertForMaskedLM (line 828) | class FlaxAlbertForMaskedLM(FlaxAlbertPreTrainedModel): class FlaxAlbertForSequenceClassificationModule (line 835) | class FlaxAlbertForSequenceClassificationModule(nn.Module): method setup (line 839) | def setup(self): method __call__ (line 852) | def __call__( class FlaxAlbertForSequenceClassification (line 896) | class FlaxAlbertForSequenceClassification(FlaxAlbertPreTrainedModel): class FlaxAlbertForMultipleChoiceModule (line 908) | class FlaxAlbertForMultipleChoiceModule(nn.Module): method setup (line 912) | def setup(self): method __call__ (line 917) | def __call__( class FlaxAlbertForMultipleChoice (line 969) | class FlaxAlbertForMultipleChoice(FlaxAlbertPreTrainedModel): class FlaxAlbertForTokenClassificationModule (line 984) | class FlaxAlbertForTokenClassificationModule(nn.Module): method setup (line 988) | def setup(self): method __call__ (line 998) | def __call__( class FlaxAlbertForTokenClassification (line 1042) | class FlaxAlbertForTokenClassification(FlaxAlbertPreTrainedModel): class FlaxAlbertForQuestionAnsweringModule (line 1054) | class FlaxAlbertForQuestionAnsweringModule(nn.Module): method setup (line 1058) | def setup(self): method __call__ (line 1062) | def __call__( class FlaxAlbertForQuestionAnswering (line 1110) | class FlaxAlbertForQuestionAnswering(FlaxAlbertPreTrainedModel): FILE: transformers/models/albert/modeling_tf_albert.py class TFAlbertPreTrainingLoss (line 80) | class TFAlbertPreTrainingLoss: method hf_compute_loss (line 86) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFAlbertEmbeddings (line 136) | class TFAlbertEmbeddings(tf.keras.layers.Layer): method __init__ (line 139) | def __init__(self, config: AlbertConfig, **kwargs): method build (line 149) | def build(self, input_shape: tf.TensorShape): method call (line 174) | def call( class TFAlbertAttention (line 215) | class TFAlbertAttention(tf.keras.layers.Layer): method __init__ (line 218) | def __init__(self, config: AlbertConfig, **kwargs): method transpose_for_scores (line 250) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 257) | def call( class TFAlbertLayer (line 311) | class TFAlbertLayer(tf.keras.layers.Layer): method __init__ (line 312) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 333) | def call( class TFAlbertLayerGroup (line 360) | class TFAlbertLayerGroup(tf.keras.layers.Layer): method __init__ (line 361) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 368) | def call( class TFAlbertTransformer (line 403) | class TFAlbertTransformer(tf.keras.layers.Layer): method __init__ (line 404) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 420) | def call( class TFAlbertPreTrainedModel (line 461) | class TFAlbertPreTrainedModel(TFPreTrainedModel): class TFAlbertMLMHead (line 471) | class TFAlbertMLMHead(tf.keras.layers.Layer): method __init__ (line 472) | def __init__(self, config: AlbertConfig, input_embeddings: tf.keras.la... method build (line 491) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 499) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 502) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 506) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 509) | def set_bias(self, value: tf.Variable): method call (line 514) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFAlbertMainLayer (line 528) | class TFAlbertMainLayer(tf.keras.layers.Layer): method __init__ (line 531) | def __init__(self, config: AlbertConfig, add_pooling_layer: bool = Tru... method get_input_embeddings (line 549) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 552) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 556) | def _prune_heads(self, heads_to_prune): method call (line 564) | def call( class TFAlbertForPreTrainingOutput (line 655) | class TFAlbertForPreTrainingOutput(ModelOutput): class TFAlbertModel (line 787) | class TFAlbertModel(TFAlbertPreTrainedModel): method __init__ (line 788) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 800) | def call( class TFAlbertForPreTraining (line 836) | class TFAlbertForPreTraining(TFAlbertPreTrainedModel, TFAlbertPreTrainin... method __init__ (line 840) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method get_lm_head (line 849) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 855) | def call( class TFAlbertSOPHead (line 925) | class TFAlbertSOPHead(tf.keras.layers.Layer): method __init__ (line 926) | def __init__(self, config: AlbertConfig, **kwargs): method call (line 936) | def call(self, pooled_output: tf.Tensor, training: bool) -> tf.Tensor: class TFAlbertForMaskedLM (line 944) | class TFAlbertForMaskedLM(TFAlbertPreTrainedModel, TFMaskedLanguageModel... method __init__ (line 948) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method get_lm_head (line 954) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 960) | def call( class TFAlbertForSequenceClassification (line 1046) | class TFAlbertForSequenceClassification(TFAlbertPreTrainedModel, TFSeque... method __init__ (line 1051) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1071) | def call( class TFAlbertForTokenClassification (line 1128) | class TFAlbertForTokenClassification(TFAlbertPreTrainedModel, TFTokenCla... method __init__ (line 1133) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1156) | def call( class TFAlbertForQuestionAnswering (line 1211) | class TFAlbertForQuestionAnswering(TFAlbertPreTrainedModel, TFQuestionAn... method __init__ (line 1215) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1236) | def call( class TFAlbertForMultipleChoice (line 1306) | class TFAlbertForMultipleChoice(TFAlbertPreTrainedModel, TFMultipleChoic... method __init__ (line 1311) | def __init__(self, config: AlbertConfig, *inputs, **kwargs): method call (line 1327) | def call( FILE: transformers/models/albert/tokenization_albert.py class AlbertTokenizer (line 59) | class AlbertTokenizer(PreTrainedTokenizer): method __init__ (line 136) | def __init__( method vocab_size (line 186) | def vocab_size(self): method get_vocab (line 189) | def get_vocab(self): method __getstate__ (line 194) | def __getstate__(self): method __setstate__ (line 199) | def __setstate__(self, d): method preprocess_text (line 209) | def preprocess_text(self, inputs): method _tokenize (line 224) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 244) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 248) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 252) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 271) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 296) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 324) | def create_token_type_ids_from_sequences( method save_vocabulary (line 354) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/albert/tokenization_albert_fast.py class AlbertTokenizerFast (line 72) | class AlbertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 124) | def __init__( method build_inputs_with_special_tokens (line 170) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 195) | def create_token_type_ids_from_sequences( method save_vocabulary (line 225) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/align/configuration_align.py class AlignTextConfig (line 36) | class AlignTextConfig(PretrainedConfig): method __init__ (line 103) | def __init__( method from_pretrained (line 141) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class AlignVisionConfig (line 157) | class AlignVisionConfig(PretrainedConfig): method __init__ (line 231) | def __init__( method from_pretrained (line 282) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class AlignConfig (line 298) | class AlignConfig(PretrainedConfig): method __init__ (line 349) | def __init__( method from_text_vision_configs (line 376) | def from_text_vision_configs(cls, text_config: AlignTextConfig, vision... method to_dict (line 387) | def to_dict(self): FILE: transformers/models/align/convert_align_tf_to_hf.py function preprocess (line 44) | def preprocess(image): function get_align_config (line 50) | def get_align_config(): function prepare_img (line 66) | def prepare_img(): function get_processor (line 72) | def get_processor(): function rename_keys (line 88) | def rename_keys(original_param_names): function replace_params (line 260) | def replace_params(hf_params, tf_params, key_mapping): function convert_align_checkpoint (line 288) | def convert_align_checkpoint(checkpoint_path, pytorch_dump_folder_path, ... FILE: transformers/models/align/modeling_align.py class AlignVisionModelOutput (line 190) | class AlignVisionModelOutput(ModelOutput): class AlignTextModelOutput (line 212) | class AlignTextModelOutput(ModelOutput): class AlignOutput (line 241) | class AlignOutput(ModelOutput): method to_tuple (line 270) | def to_tuple(self) -> Tuple[Any]: function contrastive_loss (line 279) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function align_loss (line 283) | def align_loss(similarity: torch.Tensor) -> torch.Tensor: function round_filters (line 290) | def round_filters(config: AlignVisionConfig, num_channels: int): function correct_pad (line 306) | def correct_pad(kernel_size: Union[int, Tuple], adjust: bool = True): class AlignVisionEmbeddings (line 327) | class AlignVisionEmbeddings(nn.Module): method __init__ (line 332) | def __init__(self, config: AlignVisionConfig): method forward (line 343) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class AlignVisionDepthwiseConv2d (line 353) | class AlignVisionDepthwiseConv2d(nn.Conv2d): method __init__ (line 354) | def __init__( class AlignVisionExpansionLayer (line 380) | class AlignVisionExpansionLayer(nn.Module): method __init__ (line 385) | def __init__(self, config: AlignVisionConfig, in_dim: int, out_dim: in... method forward (line 397) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionDepthwiseLayer (line 407) | class AlignVisionDepthwiseLayer(nn.Module): method __init__ (line 412) | def __init__( method forward (line 434) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionSqueezeExciteLayer (line 447) | class AlignVisionSqueezeExciteLayer(nn.Module): method __init__ (line 452) | def __init__(self, config: AlignVisionConfig, in_dim: int, expand_dim:... method forward (line 473) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionFinalBlockLayer (line 486) | class AlignVisionFinalBlockLayer(nn.Module): method __init__ (line 491) | def __init__( method forward (line 508) | def forward(self, embeddings: torch.FloatTensor, hidden_states: torch.... class AlignVisionBlock (line 519) | class AlignVisionBlock(nn.Module): method __init__ (line 546) | def __init__( method forward (line 587) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class AlignVisionEncoder (line 600) | class AlignVisionEncoder(nn.Module): method __init__ (line 609) | def __init__(self, config: AlignVisionConfig): method forward (line 652) | def forward( class AlignTextEmbeddings (line 675) | class AlignTextEmbeddings(nn.Module): method __init__ (line 678) | def __init__(self, config): method forward (line 695) | def forward( class AlignTextSelfAttention (line 738) | class AlignTextSelfAttention(nn.Module): method __init__ (line 739) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 765) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 770) | def forward( class AlignTextSelfOutput (line 873) | class AlignTextSelfOutput(nn.Module): method __init__ (line 874) | def __init__(self, config): method forward (line 880) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AlignTextAttention (line 888) | class AlignTextAttention(nn.Module): method __init__ (line 889) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 895) | def prune_heads(self, heads): method forward (line 913) | def forward( class AlignTextIntermediate (line 938) | class AlignTextIntermediate(nn.Module): method __init__ (line 939) | def __init__(self, config): method forward (line 947) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AlignTextOutput (line 954) | class AlignTextOutput(nn.Module): method __init__ (line 955) | def __init__(self, config): method forward (line 961) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AlignTextLayer (line 969) | class AlignTextLayer(nn.Module): method __init__ (line 970) | def __init__(self, config): method forward (line 984) | def forward( method feed_forward_chunk (line 1049) | def feed_forward_chunk(self, attention_output): class AlignTextEncoder (line 1056) | class AlignTextEncoder(nn.Module): method __init__ (line 1057) | def __init__(self, config): method forward (line 1063) | def forward( class AlignTextPooler (line 1155) | class AlignTextPooler(nn.Module): method __init__ (line 1156) | def __init__(self, config): method forward (line 1161) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AlignPreTrainedModel (line 1170) | class AlignPreTrainedModel(PreTrainedModel): method _init_weights (line 1181) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1199) | def _set_gradient_checkpointing(self, module, value=False): class AlignTextModel (line 1208) | class AlignTextModel(AlignPreTrainedModel): method __init__ (line 1211) | def __init__(self, config: AlignTextConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 1223) | def get_input_embeddings(self): method set_input_embeddings (line 1226) | def set_input_embeddings(self, value): method forward (line 1231) | def forward( class AlignVisionModel (line 1333) | class AlignVisionModel(AlignPreTrainedModel): method __init__ (line 1337) | def __init__(self, config: AlignVisionConfig): method get_input_embeddings (line 1354) | def get_input_embeddings(self) -> nn.Module: method forward (line 1359) | def forward( class AlignModel (line 1418) | class AlignModel(AlignPreTrainedModel): method __init__ (line 1421) | def __init__(self, config: AlignConfig): method get_text_features (line 1452) | def get_text_features( method get_image_features (line 1505) | def get_image_features( method forward (line 1551) | def forward( FILE: transformers/models/align/processing_align.py class AlignProcessor (line 24) | class AlignProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, image_processor, tokenizer): method __call__ (line 45) | def __call__(self, text=None, images=None, padding="max_length", max_l... method batch_decode (line 104) | def batch_decode(self, *args, **kwargs): method decode (line 111) | def decode(self, *args, **kwargs): method model_input_names (line 119) | def model_input_names(self): FILE: transformers/models/altclip/configuration_altclip.py class AltCLIPTextConfig (line 32) | class AltCLIPTextConfig(PretrainedConfig): method __init__ (line 99) | def __init__( class AltCLIPVisionConfig (line 142) | class AltCLIPVisionConfig(PretrainedConfig): method __init__ (line 196) | def __init__( method from_pretrained (line 230) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class AltCLIPConfig (line 246) | class AltCLIPConfig(PretrainedConfig): method __init__ (line 294) | def __init__( method from_text_vision_configs (line 383) | def from_text_vision_configs(cls, text_config: AltCLIPTextConfig, visi... method to_dict (line 394) | def to_dict(self): FILE: transformers/models/altclip/modeling_altclip.py function contrastive_loss (line 151) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 155) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class AltCLIPOutput (line 163) | class AltCLIPOutput(ModelOutput): method to_tuple (line 193) | def to_tuple(self) -> Tuple[Any]: class AltRobertaEmbeddings (line 201) | class AltRobertaEmbeddings(nn.Module): method __init__ (line 207) | def __init__(self, config): method forward (line 230) | def forward( method create_position_ids_from_inputs_embeds (line 270) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class AltRobertaSelfAttention (line 289) | class AltRobertaSelfAttention(nn.Module): method __init__ (line 290) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 316) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 321) | def forward( class AltRobertaSelfOutput (line 424) | class AltRobertaSelfOutput(nn.Module): method __init__ (line 425) | def __init__(self, config): method forward (line 431) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AltRobertaAttention (line 439) | class AltRobertaAttention(nn.Module): method __init__ (line 440) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 446) | def prune_heads(self, heads): method forward (line 464) | def forward( class AltRobertaIntermediate (line 489) | class AltRobertaIntermediate(nn.Module): method __init__ (line 490) | def __init__(self, config): method forward (line 498) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AltRobertaOutput (line 505) | class AltRobertaOutput(nn.Module): method __init__ (line 506) | def __init__(self, config): method forward (line 512) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class AltRobertaLayer (line 520) | class AltRobertaLayer(nn.Module): method __init__ (line 521) | def __init__(self, config): method forward (line 535) | def forward( method feed_forward_chunk (line 600) | def feed_forward_chunk(self, attention_output): class AltRobertaEncoder (line 607) | class AltRobertaEncoder(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 614) | def forward( class AltRobertaPooler (line 706) | class AltRobertaPooler(nn.Module): method __init__ (line 707) | def __init__(self, config): method forward (line 712) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AltCLIPAttention (line 722) | class AltCLIPAttention(nn.Module): method __init__ (line 725) | def __init__(self, config): method _shape (line 744) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 747) | def forward( class AltCLIPMLP (line 827) | class AltCLIPMLP(nn.Module): method __init__ (line 828) | def __init__(self, config): method forward (line 835) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class AltCLIPEncoderLayer (line 843) | class AltCLIPEncoderLayer(nn.Module): method __init__ (line 844) | def __init__(self, config: AltCLIPConfig): method forward (line 852) | def forward( class AltCLIPEncoder (line 894) | class AltCLIPEncoder(nn.Module): method __init__ (line 903) | def __init__(self, config: AltCLIPConfig): method forward (line 909) | def forward( class AltCLIPVisionEmbeddings (line 998) | class AltCLIPVisionEmbeddings(nn.Module): method __init__ (line 999) | def __init__(self, config: AltCLIPVisionConfig): method forward (line 1021) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class AltCLIPPreTrainedModel (line 1032) | class AltCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 1043) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1090) | def _set_gradient_checkpointing(self, module, value=False): class AltCLIPVisionTransformer (line 1098) | class AltCLIPVisionTransformer(nn.Module): method __init__ (line 1099) | def __init__(self, config: AltCLIPVisionConfig): method forward (line 1111) | def forward( class AltCLIPVisionModel (line 1156) | class AltCLIPVisionModel(AltCLIPPreTrainedModel): method __init__ (line 1160) | def __init__(self, config: AltCLIPVisionConfig): method get_input_embeddings (line 1166) | def get_input_embeddings(self) -> nn.Module: method forward (line 1171) | def forward( class AltRobertaModel (line 1210) | class AltRobertaModel(AltCLIPPreTrainedModel): method __init__ (line 1229) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1241) | def get_input_embeddings(self): method set_input_embeddings (line 1244) | def set_input_embeddings(self, value): method _prune_heads (line 1247) | def _prune_heads(self, heads_to_prune): method forward (line 1256) | def forward( class AltCLIPTextModel (line 1386) | class AltCLIPTextModel(AltCLIPPreTrainedModel): method __init__ (line 1389) | def __init__(self, config): method get_input_embeddings (line 1396) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1399) | def set_input_embeddings(self, value: nn.Embedding) -> None: method resize_token_embeddings (line 1402) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 1407) | def forward( class AltCLIPModel (line 1478) | class AltCLIPModel(AltCLIPPreTrainedModel): method __init__ (line 1481) | def __init__(self, config: AltCLIPConfig): method get_text_features (line 1513) | def get_text_features( method get_image_features (line 1560) | def get_image_features( method forward (line 1607) | def forward( function create_position_ids_from_input_ids (line 1699) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/altclip/processing_altclip.py class AltCLIPProcessor (line 24) | class AltCLIPProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 59) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 112) | def batch_decode(self, *args, **kwargs): method decode (line 119) | def decode(self, *args, **kwargs): method model_input_names (line 127) | def model_input_names(self): FILE: transformers/models/audio_spectrogram_transformer/configuration_audio_spectrogram_transformer.py class ASTConfig (line 31) | class ASTConfig(PretrainedConfig): method __init__ (line 91) | def __init__( FILE: transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py function get_audio_spectrogram_transformer_config (line 35) | def get_audio_spectrogram_transformer_config(model_name): function rename_key (line 70) | def rename_key(name): function convert_state_dict (line 108) | def convert_state_dict(orig_state_dict, config): function remove_keys (line 142) | def remove_keys(state_dict): function convert_audio_spectrogram_transformer_checkpoint (line 154) | def convert_audio_spectrogram_transformer_checkpoint(model_name, pytorch... FILE: transformers/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.py class ASTFeatureExtractor (line 33) | class ASTFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 65) | def __init__( method _extract_fbank_features (line 86) | def _extract_fbank_features( method normalize (line 122) | def normalize(self, input_values: np.ndarray) -> np.ndarray: method __call__ (line 125) | def __call__( FILE: transformers/models/audio_spectrogram_transformer/modeling_audio_spectrogram_transformer.py class ASTEmbeddings (line 54) | class ASTEmbeddings(nn.Module): method __init__ (line 59) | def __init__(self, config: ASTConfig) -> None: method get_shape (line 72) | def get_shape(self, config): method forward (line 80) | def forward(self, input_values: torch.Tensor) -> torch.Tensor: class ASTPatchEmbeddings (line 93) | class ASTPatchEmbeddings(nn.Module): method __init__ (line 99) | def __init__(self, config): method forward (line 110) | def forward(self, input_values: torch.Tensor) -> torch.Tensor: class ASTSelfAttention (line 118) | class ASTSelfAttention(nn.Module): method __init__ (line 119) | def __init__(self, config: ASTConfig) -> None: method transpose_for_scores (line 137) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 142) | def forward( class ASTSelfOutput (line 179) | class ASTSelfOutput(nn.Module): method __init__ (line 185) | def __init__(self, config: ASTConfig) -> None: method forward (line 190) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ASTAttention (line 198) | class ASTAttention(nn.Module): method __init__ (line 199) | def __init__(self, config: ASTConfig) -> None: method prune_heads (line 205) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 223) | def forward( class ASTIntermediate (line 238) | class ASTIntermediate(nn.Module): method __init__ (line 239) | def __init__(self, config: ASTConfig) -> None: method forward (line 247) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ASTOutput (line 255) | class ASTOutput(nn.Module): method __init__ (line 256) | def __init__(self, config: ASTConfig) -> None: method forward (line 261) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ASTLayer (line 271) | class ASTLayer(nn.Module): method __init__ (line 274) | def __init__(self, config: ASTConfig) -> None: method forward (line 284) | def forward( class ASTEncoder (line 314) | class ASTEncoder(nn.Module): method __init__ (line 315) | def __init__(self, config: ASTConfig) -> None: method forward (line 321) | def forward( class ASTPreTrainedModel (line 371) | class ASTPreTrainedModel(PreTrainedModel): method _init_weights (line 383) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 398) | def _set_gradient_checkpointing(self, module: ASTEncoder, value: bool ... class ASTModel (line 445) | class ASTModel(ASTPreTrainedModel): method __init__ (line 446) | def __init__(self, config: ASTConfig): method get_input_embeddings (line 458) | def get_input_embeddings(self) -> ASTPatchEmbeddings: method _prune_heads (line 461) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 477) | def forward( class ASTMLPHead (line 526) | class ASTMLPHead(nn.Module): method __init__ (line 527) | def __init__(self, config: ASTConfig): method forward (line 532) | def forward(self, hidden_state): class ASTForAudioClassification (line 545) | class ASTForAudioClassification(ASTPreTrainedModel): method __init__ (line 546) | def __init__(self, config: ASTConfig) -> None: method forward (line 567) | def forward( FILE: transformers/models/auto/auto_factory.py function _get_model_class (line 374) | def _get_model_class(config, model_mapping): class _BaseAutoModelClass (line 394) | class _BaseAutoModelClass: method __init__ (line 398) | def __init__(self, *args, **kwargs): method from_config (line 406) | def from_config(cls, config, **kwargs): method from_pretrained (line 433) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method register (line 493) | def register(cls, config_class, model_class): class _BaseAutoBackboneClass (line 512) | class _BaseAutoBackboneClass(_BaseAutoModelClass): method _load_timm_backbone_from_pretrained (line 517) | def _load_timm_backbone_from_pretrained(cls, pretrained_model_name_or_... method from_pretrained (line 547) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... function insert_head_doc (line 554) | def insert_head_doc(docstring, head_doc=""): function auto_class_update (line 565) | def auto_class_update(cls, checkpoint_for_example="bert-base-cased", hea... function get_values (line 600) | def get_values(model_mapping): function getattribute_from_module (line 611) | def getattribute_from_module(module, attr): class _LazyAutoMapping (line 631) | class _LazyAutoMapping(OrderedDict): method __init__ (line 640) | def __init__(self, config_mapping, model_mapping): method __len__ (line 647) | def __len__(self): method __getitem__ (line 651) | def __getitem__(self, key): method _load_attr_from_module (line 667) | def _load_attr_from_module(self, model_type, attr): method keys (line 673) | def keys(self): method get (line 681) | def get(self, key, default): method __bool__ (line 687) | def __bool__(self): method values (line 690) | def values(self): method items (line 698) | def items(self): method __iter__ (line 709) | def __iter__(self): method __contains__ (line 712) | def __contains__(self, item): method register (line 720) | def register(self, key, value): FILE: transformers/models/auto/configuration_auto.py function model_type_to_module_name (line 636) | def model_type_to_module_name(key): function config_class_to_model_type (line 645) | def config_class_to_model_type(config): class _LazyConfigMapping (line 657) | class _LazyConfigMapping(OrderedDict): method __init__ (line 662) | def __init__(self, mapping): method __getitem__ (line 667) | def __getitem__(self, key): method keys (line 684) | def keys(self): method values (line 687) | def values(self): method items (line 690) | def items(self): method __iter__ (line 693) | def __iter__(self): method __contains__ (line 696) | def __contains__(self, item): method register (line 699) | def register(self, key, value): class _LazyLoadAllMappings (line 711) | class _LazyLoadAllMappings(OrderedDict): method __init__ (line 720) | def __init__(self, mapping): method _initialize (line 725) | def _initialize(self): method __getitem__ (line 742) | def __getitem__(self, key): method keys (line 746) | def keys(self): method values (line 750) | def values(self): method items (line 754) | def items(self): method __iter__ (line 758) | def __iter__(self): method __contains__ (line 762) | def __contains__(self, item): function _get_class_name (line 770) | def _get_class_name(model_class: Union[str, List[str]]): function _list_model_options (line 776) | def _list_model_options(indent, config_to_class=None, use_model_types=Tr... function replace_list_option_in_docstrings (line 809) | def replace_list_option_in_docstrings(config_to_class=None, use_model_ty... class AutoConfig (line 833) | class AutoConfig: method __init__ (line 841) | def __init__(self): method for_model (line 848) | def for_model(cls, model_type: str, *args, **kwargs): method from_pretrained (line 858) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 973) | def register(model_type, config): FILE: transformers/models/auto/feature_extraction_auto.py function feature_extractor_class_from_name (line 107) | def feature_extractor_class_from_name(class_name: str): function get_feature_extractor_config (line 131) | def get_feature_extractor_config( class AutoFeatureExtractor (line 221) | class AutoFeatureExtractor: method __init__ (line 229) | def __init__(self): method from_pretrained (line 237) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 357) | def register(config_class, feature_extractor_class): FILE: transformers/models/auto/image_processing_auto.py function image_processor_class_from_name (line 114) | def image_processor_class_from_name(class_name: str): function get_image_processor_config (line 138) | def get_image_processor_config( class AutoImageProcessor (line 228) | class AutoImageProcessor: method __init__ (line 236) | def __init__(self): method from_pretrained (line 244) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 382) | def register(config_class, image_processor_class): FILE: transformers/models/auto/modeling_auto.py class AutoModelForMaskGeneration (line 1091) | class AutoModelForMaskGeneration(_BaseAutoModelClass): class AutoModel (line 1095) | class AutoModel(_BaseAutoModelClass): class AutoModelForPreTraining (line 1102) | class AutoModelForPreTraining(_BaseAutoModelClass): class _AutoModelWithLMHead (line 1110) | class _AutoModelWithLMHead(_BaseAutoModelClass): class AutoModelForCausalLM (line 1117) | class AutoModelForCausalLM(_BaseAutoModelClass): class AutoModelForMaskedLM (line 1124) | class AutoModelForMaskedLM(_BaseAutoModelClass): class AutoModelForSeq2SeqLM (line 1131) | class AutoModelForSeq2SeqLM(_BaseAutoModelClass): class AutoModelForSequenceClassification (line 1140) | class AutoModelForSequenceClassification(_BaseAutoModelClass): class AutoModelForQuestionAnswering (line 1149) | class AutoModelForQuestionAnswering(_BaseAutoModelClass): class AutoModelForTableQuestionAnswering (line 1156) | class AutoModelForTableQuestionAnswering(_BaseAutoModelClass): class AutoModelForVisualQuestionAnswering (line 1167) | class AutoModelForVisualQuestionAnswering(_BaseAutoModelClass): class AutoModelForDocumentQuestionAnswering (line 1178) | class AutoModelForDocumentQuestionAnswering(_BaseAutoModelClass): class AutoModelForTokenClassification (line 1189) | class AutoModelForTokenClassification(_BaseAutoModelClass): class AutoModelForMultipleChoice (line 1196) | class AutoModelForMultipleChoice(_BaseAutoModelClass): class AutoModelForNextSentencePrediction (line 1203) | class AutoModelForNextSentencePrediction(_BaseAutoModelClass): class AutoModelForImageClassification (line 1212) | class AutoModelForImageClassification(_BaseAutoModelClass): class AutoModelForZeroShotImageClassification (line 1219) | class AutoModelForZeroShotImageClassification(_BaseAutoModelClass): class AutoModelForImageSegmentation (line 1228) | class AutoModelForImageSegmentation(_BaseAutoModelClass): class AutoModelForSemanticSegmentation (line 1235) | class AutoModelForSemanticSegmentation(_BaseAutoModelClass): class AutoModelForUniversalSegmentation (line 1244) | class AutoModelForUniversalSegmentation(_BaseAutoModelClass): class AutoModelForInstanceSegmentation (line 1253) | class AutoModelForInstanceSegmentation(_BaseAutoModelClass): class AutoModelForObjectDetection (line 1262) | class AutoModelForObjectDetection(_BaseAutoModelClass): class AutoModelForZeroShotObjectDetection (line 1269) | class AutoModelForZeroShotObjectDetection(_BaseAutoModelClass): class AutoModelForDepthEstimation (line 1278) | class AutoModelForDepthEstimation(_BaseAutoModelClass): class AutoModelForVideoClassification (line 1285) | class AutoModelForVideoClassification(_BaseAutoModelClass): class AutoModelForVision2Seq (line 1292) | class AutoModelForVision2Seq(_BaseAutoModelClass): class AutoModelForAudioClassification (line 1299) | class AutoModelForAudioClassification(_BaseAutoModelClass): class AutoModelForCTC (line 1306) | class AutoModelForCTC(_BaseAutoModelClass): class AutoModelForSpeechSeq2Seq (line 1313) | class AutoModelForSpeechSeq2Seq(_BaseAutoModelClass): class AutoModelForAudioFrameClassification (line 1322) | class AutoModelForAudioFrameClassification(_BaseAutoModelClass): class AutoModelForAudioXVector (line 1331) | class AutoModelForAudioXVector(_BaseAutoModelClass): class AutoBackbone (line 1335) | class AutoBackbone(_BaseAutoBackboneClass): class AutoModelForMaskedImageModeling (line 1342) | class AutoModelForMaskedImageModeling(_BaseAutoModelClass): class AutoModelWithLMHead (line 1349) | class AutoModelWithLMHead(_AutoModelWithLMHead): method from_config (line 1351) | def from_config(cls, config): method from_pretrained (line 1361) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... FILE: transformers/models/auto/modeling_flax_auto.py class FlaxAutoModel (line 269) | class FlaxAutoModel(_BaseAutoModelClass): class FlaxAutoModelForPreTraining (line 276) | class FlaxAutoModelForPreTraining(_BaseAutoModelClass): class FlaxAutoModelForCausalLM (line 283) | class FlaxAutoModelForCausalLM(_BaseAutoModelClass): class FlaxAutoModelForMaskedLM (line 290) | class FlaxAutoModelForMaskedLM(_BaseAutoModelClass): class FlaxAutoModelForSeq2SeqLM (line 297) | class FlaxAutoModelForSeq2SeqLM(_BaseAutoModelClass): class FlaxAutoModelForSequenceClassification (line 306) | class FlaxAutoModelForSequenceClassification(_BaseAutoModelClass): class FlaxAutoModelForQuestionAnswering (line 315) | class FlaxAutoModelForQuestionAnswering(_BaseAutoModelClass): class FlaxAutoModelForTokenClassification (line 322) | class FlaxAutoModelForTokenClassification(_BaseAutoModelClass): class FlaxAutoModelForMultipleChoice (line 331) | class FlaxAutoModelForMultipleChoice(_BaseAutoModelClass): class FlaxAutoModelForNextSentencePrediction (line 338) | class FlaxAutoModelForNextSentencePrediction(_BaseAutoModelClass): class FlaxAutoModelForImageClassification (line 347) | class FlaxAutoModelForImageClassification(_BaseAutoModelClass): class FlaxAutoModelForVision2Seq (line 356) | class FlaxAutoModelForVision2Seq(_BaseAutoModelClass): class FlaxAutoModelForSpeechSeq2Seq (line 363) | class FlaxAutoModelForSpeechSeq2Seq(_BaseAutoModelClass): FILE: transformers/models/auto/modeling_tf_auto.py class TFAutoModelForMaskGeneration (line 495) | class TFAutoModelForMaskGeneration(_BaseAutoModelClass): class TFAutoModel (line 499) | class TFAutoModel(_BaseAutoModelClass): class TFAutoModelForAudioClassification (line 506) | class TFAutoModelForAudioClassification(_BaseAutoModelClass): class TFAutoModelForPreTraining (line 515) | class TFAutoModelForPreTraining(_BaseAutoModelClass): class _TFAutoModelWithLMHead (line 523) | class _TFAutoModelWithLMHead(_BaseAutoModelClass): class TFAutoModelForCausalLM (line 530) | class TFAutoModelForCausalLM(_BaseAutoModelClass): class TFAutoModelForMaskedImageModeling (line 537) | class TFAutoModelForMaskedImageModeling(_BaseAutoModelClass): class TFAutoModelForImageClassification (line 546) | class TFAutoModelForImageClassification(_BaseAutoModelClass): class TFAutoModelForZeroShotImageClassification (line 555) | class TFAutoModelForZeroShotImageClassification(_BaseAutoModelClass): class TFAutoModelForSemanticSegmentation (line 564) | class TFAutoModelForSemanticSegmentation(_BaseAutoModelClass): class TFAutoModelForVision2Seq (line 573) | class TFAutoModelForVision2Seq(_BaseAutoModelClass): class TFAutoModelForMaskedLM (line 580) | class TFAutoModelForMaskedLM(_BaseAutoModelClass): class TFAutoModelForSeq2SeqLM (line 587) | class TFAutoModelForSeq2SeqLM(_BaseAutoModelClass): class TFAutoModelForSequenceClassification (line 596) | class TFAutoModelForSequenceClassification(_BaseAutoModelClass): class TFAutoModelForQuestionAnswering (line 605) | class TFAutoModelForQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForDocumentQuestionAnswering (line 612) | class TFAutoModelForDocumentQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForTableQuestionAnswering (line 623) | class TFAutoModelForTableQuestionAnswering(_BaseAutoModelClass): class TFAutoModelForTokenClassification (line 634) | class TFAutoModelForTokenClassification(_BaseAutoModelClass): class TFAutoModelForMultipleChoice (line 643) | class TFAutoModelForMultipleChoice(_BaseAutoModelClass): class TFAutoModelForNextSentencePrediction (line 650) | class TFAutoModelForNextSentencePrediction(_BaseAutoModelClass): class TFAutoModelForSpeechSeq2Seq (line 659) | class TFAutoModelForSpeechSeq2Seq(_BaseAutoModelClass): class TFAutoModelWithLMHead (line 668) | class TFAutoModelWithLMHead(_TFAutoModelWithLMHead): method from_config (line 670) | def from_config(cls, config): method from_pretrained (line 680) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... FILE: transformers/models/auto/processing_auto.py function processor_class_from_name (line 88) | def processor_class_from_name(class_name: str): class AutoProcessor (line 112) | class AutoProcessor: method __init__ (line 120) | def __init__(self): method from_pretrained (line 128) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register (line 303) | def register(config_class, processor_class): FILE: transformers/models/auto/tokenization_auto.py function tokenizer_class_from_name (line 385) | def tokenizer_class_from_name(class_name: str): function get_tokenizer_config (line 413) | def get_tokenizer_config( class AutoTokenizer (line 513) | class AutoTokenizer: method __init__ (line 521) | def __init__(self): method from_pretrained (line 529) | def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwa... method register (line 724) | def register(config_class, slow_tokenizer_class=None, fast_tokenizer_c... FILE: transformers/models/autoformer/configuration_autoformer.py class AutoformerConfig (line 30) | class AutoformerConfig(PretrainedConfig): method __init__ (line 141) | def __init__( method _number_of_features (line 238) | def _number_of_features(self) -> int: FILE: transformers/models/autoformer/modeling_autoformer.py class AutoFormerDecoderOutput (line 47) | class AutoFormerDecoderOutput(ModelOutput): class AutoformerModelOutput (line 96) | class AutoformerModelOutput(ModelOutput): class AutoformerFeatureEmbedder (line 176) | class AutoformerFeatureEmbedder(nn.Module): method __init__ (line 187) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 193) | def forward(self, features: torch.Tensor) -> torch.Tensor: class AutoformerStdScaler (line 211) | class AutoformerStdScaler(nn.Module): method __init__ (line 225) | def __init__(self, dim: int, keepdim: bool = False, minimum_scale: flo... method forward (line 234) | def forward(self, data: torch.Tensor, weights: torch.Tensor) -> Tuple[... class AutoformerMeanScaler (line 245) | class AutoformerMeanScaler(nn.Module): method __init__ (line 261) | def __init__( method forward (line 271) | def forward( class AutoformerNOPScaler (line 303) | class AutoformerNOPScaler(nn.Module): method __init__ (line 314) | def __init__(self, dim: int, keepdim: bool = False): method forward (line 319) | def forward( function weighted_average (line 328) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... function nll (line 353) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... function _make_causal_mask (line 361) | def _make_causal_mask( function _expand_mask (line 379) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class AutoformerSinusoidalPositionalEmbedding (line 394) | class AutoformerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 397) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 402) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 419) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class AutoformerValueEmbedding (line 429) | class AutoformerValueEmbedding(nn.Module): method __init__ (line 430) | def __init__(self, feature_size, d_model): method forward (line 434) | def forward(self, x): class AutoformerSeriesDecompositionLayer (line 441) | class AutoformerSeriesDecompositionLayer(nn.Module): method __init__ (line 448) | def __init__(self, config: AutoformerConfig): method forward (line 453) | def forward(self, x): class AutoformerLayernorm (line 470) | class AutoformerLayernorm(nn.Module): method __init__ (line 476) | def __init__(self, config: AutoformerConfig): method forward (line 480) | def forward(self, x): class AutoformerAttention (line 486) | class AutoformerAttention(nn.Module): method __init__ (line 493) | def __init__( method _shape (line 523) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 526) | def forward( class AutoformerEncoderLayer (line 709) | class AutoformerEncoderLayer(nn.Module): method __init__ (line 710) | def __init__(self, config: AutoformerConfig): method forward (line 729) | def forward( class AutoformerDecoderLayer (line 783) | class AutoformerDecoderLayer(nn.Module): method __init__ (line 784) | def __init__(self, config: AutoformerConfig): method forward (line 827) | def forward( class AutoformerPreTrainedModel (line 930) | class AutoformerPreTrainedModel(PreTrainedModel): method _init_weights (line 936) | def _init_weights(self, module): method _set_gradient_checkpointing (line 949) | def _set_gradient_checkpointing(self, module, value=False): class AutoformerEncoder (line 1103) | class AutoformerEncoder(AutoformerPreTrainedModel): method __init__ (line 1112) | def __init__(self, config: AutoformerConfig): method forward (line 1131) | def forward( class AutoformerDecoder (line 1241) | class AutoformerDecoder(AutoformerPreTrainedModel): method __init__ (line 1249) | def __init__(self, config: AutoformerConfig): method _prepare_decoder_attention_mask (line 1270) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1293) | def forward( class AutoformerModel (line 1494) | class AutoformerModel(AutoformerPreTrainedModel): method __init__ (line 1495) | def __init__(self, config: AutoformerConfig): method _past_length (line 1521) | def _past_length(self) -> int: method get_lagged_subsequences (line 1524) | def get_lagged_subsequences( method create_network_inputs (line 1562) | def create_network_inputs( method get_encoder (line 1662) | def get_encoder(self): method get_decoder (line 1665) | def get_decoder(self): method forward (line 1670) | def forward( class AutoformerForPrediction (line 1830) | class AutoformerForPrediction(AutoformerPreTrainedModel): method __init__ (line 1831) | def __init__(self, config: AutoformerConfig): method output_params (line 1854) | def output_params(self, decoder_output): method get_encoder (line 1857) | def get_encoder(self): method get_decoder (line 1860) | def get_decoder(self): method output_distribution (line 1864) | def output_distribution(self, params, loc=None, scale=None, trailing_n... method forward (line 1872) | def forward( method generate (line 2004) | def generate( FILE: transformers/models/bart/configuration_bart.py class BartConfig (line 35) | class BartConfig(PretrainedConfig): method __init__ (line 114) | def __init__( class BartOnnxConfig (line 185) | class BartOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 187) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 231) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 243) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 311) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 349) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 375) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 399) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py function remove_ignore_keys_ (line 56) | def remove_ignore_keys_(state_dict): function rename_key (line 68) | def rename_key(dct, old, new): function load_xsum_checkpoint (line 73) | def load_xsum_checkpoint(checkpoint_path): function make_linear_from_emb (line 81) | def make_linear_from_emb(emb): function convert_bart_checkpoint (line 89) | def convert_bart_checkpoint(checkpoint_path, pytorch_dump_folder_path, h... FILE: transformers/models/bart/modeling_bart.py function shift_tokens_right (line 74) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 90) | def _make_causal_mask( function _expand_mask (line 107) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BartLearnedPositionalEmbedding (line 121) | class BartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 126) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 132) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class BartAttention (line 143) | class BartAttention(nn.Module): method __init__ (line 146) | def __init__( method _shape (line 173) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 176) | def forward( class BartEncoderLayer (line 297) | class BartEncoderLayer(nn.Module): method __init__ (line 298) | def __init__(self, config: BartConfig): method forward (line 314) | def forward( class BartDecoderLayer (line 365) | class BartDecoderLayer(nn.Module): method __init__ (line 366) | def __init__(self, config: BartConfig): method forward (line 392) | def forward( class BartClassificationHead (line 482) | class BartClassificationHead(nn.Module): method __init__ (line 485) | def __init__( method forward (line 497) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BartPretrainedModel (line 506) | class BartPretrainedModel(PreTrainedModel): method _init_weights (line 514) | def _init_weights(self, module): method _set_gradient_checkpointing (line 525) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 530) | def dummy_inputs(self): class PretrainedBartModel (line 540) | class PretrainedBartModel(BartPretrainedModel): method __init_subclass__ (line 541) | def __init_subclass__(self): class BartEncoder (line 704) | class BartEncoder(BartPretrainedModel): method __init__ (line 714) | def __init__(self, config: BartConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 741) | def get_input_embeddings(self): method set_input_embeddings (line 744) | def set_input_embeddings(self, value): method forward (line 747) | def forward( class BartDecoder (line 881) | class BartDecoder(BartPretrainedModel): method __init__ (line 890) | def __init__(self, config: BartConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 914) | def get_input_embeddings(self): method set_input_embeddings (line 917) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 920) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 943) | def forward( class BartModel (line 1167) | class BartModel(BartPretrainedModel): method __init__ (line 1170) | def __init__(self, config: BartConfig): method get_input_embeddings (line 1182) | def get_input_embeddings(self): method set_input_embeddings (line 1185) | def set_input_embeddings(self, value): method get_encoder (line 1190) | def get_encoder(self): method get_decoder (line 1193) | def get_decoder(self): method forward (line 1203) | def forward( class BartForConditionalGeneration (line 1294) | class BartForConditionalGeneration(BartPretrainedModel): method __init__ (line 1303) | def __init__(self, config: BartConfig): method get_encoder (line 1312) | def get_encoder(self): method get_decoder (line 1315) | def get_decoder(self): method resize_token_embeddings (line 1318) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1323) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1332) | def get_output_embeddings(self): method set_output_embeddings (line 1335) | def set_output_embeddings(self, new_embeddings): method forward (line 1341) | def forward( method prepare_inputs_for_generation (line 1422) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1452) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1456) | def _reorder_cache(past_key_values, beam_idx): class BartForSequenceClassification (line 1473) | class BartForSequenceClassification(BartPretrainedModel): method __init__ (line 1476) | def __init__(self, config: BartConfig, **kwargs): method forward (line 1497) | def forward( class BartForQuestionAnswering (line 1603) | class BartForQuestionAnswering(BartPretrainedModel): method __init__ (line 1606) | def __init__(self, config): method forward (line 1626) | def forward( class BartDecoderWrapper (line 1721) | class BartDecoderWrapper(BartPretrainedModel): method __init__ (line 1727) | def __init__(self, config): method forward (line 1731) | def forward(self, *args, **kwargs): class BartForCausalLM (line 1741) | class BartForCausalLM(BartPretrainedModel): method __init__ (line 1744) | def __init__(self, config): method get_input_embeddings (line 1756) | def get_input_embeddings(self): method set_input_embeddings (line 1759) | def set_input_embeddings(self, value): method get_output_embeddings (line 1762) | def get_output_embeddings(self): method set_output_embeddings (line 1765) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1768) | def set_decoder(self, decoder): method get_decoder (line 1771) | def get_decoder(self): method forward (line 1775) | def forward( method prepare_inputs_for_generation (line 1919) | def prepare_inputs_for_generation( method _reorder_cache (line 1937) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/bart/modeling_flax_bart.py function shift_tokens_right (line 220) | def shift_tokens_right(input_ids: jnp.array, pad_token_id: int, decoder_... class FlaxBartAttention (line 232) | class FlaxBartAttention(nn.Module): method setup (line 241) | def setup(self) -> None: method _split_heads (line 267) | def _split_heads(self, hidden_states): method _merge_heads (line 270) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 274) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 305) | def __call__( class FlaxBartEncoderLayer (line 399) | class FlaxBartEncoderLayer(nn.Module): method setup (line 403) | def setup(self) -> None: method __call__ (line 426) | def __call__( class FlaxBartEncoderLayerCollection (line 456) | class FlaxBartEncoderLayerCollection(nn.Module): method setup (line 460) | def setup(self): method __call__ (line 466) | def __call__( class FlaxBartDecoderLayer (line 509) | class FlaxBartDecoderLayer(nn.Module): method setup (line 513) | def setup(self) -> None: method __call__ (line 546) | def __call__( class FlaxBartDecoderLayerCollection (line 597) | class FlaxBartDecoderLayerCollection(nn.Module): method setup (line 601) | def setup(self): method __call__ (line 607) | def __call__( class FlaxBartClassificationHead (line 666) | class FlaxBartClassificationHead(nn.Module): method setup (line 675) | def setup(self): method __call__ (line 686) | def __call__(self, hidden_states: jnp.ndarray, deterministic: bool): class FlaxBartEncoder (line 695) | class FlaxBartEncoder(nn.Module): method setup (line 700) | def setup(self): method __call__ (line 720) | def __call__( class FlaxBartDecoder (line 760) | class FlaxBartDecoder(nn.Module): method setup (line 765) | def setup(self): method __call__ (line 786) | def __call__( class FlaxBartModule (line 835) | class FlaxBartModule(nn.Module): method setup (line 839) | def setup(self): method _get_encoder_module (line 850) | def _get_encoder_module(self): method _get_decoder_module (line 853) | def _get_decoder_module(self): method __call__ (line 856) | def __call__( class FlaxBartPreTrainedModel (line 905) | class FlaxBartPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 910) | def __init__( method init_weights (line 922) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 958) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1001) | def encode( method decode (line 1064) | def decode( method __call__ (line 1177) | def __call__( class FlaxBartModel (line 1241) | class FlaxBartModel(FlaxBartPreTrainedModel): class FlaxBartForConditionalGenerationModule (line 1250) | class FlaxBartForConditionalGenerationModule(nn.Module): method setup (line 1255) | def setup(self): method _get_encoder_module (line 1265) | def _get_encoder_module(self): method _get_decoder_module (line 1268) | def _get_decoder_module(self): method __call__ (line 1271) | def __call__( class FlaxBartForConditionalGeneration (line 1325) | class FlaxBartForConditionalGeneration(FlaxBartPreTrainedModel): method decode (line 1331) | def decode( method prepare_inputs_for_generation (line 1466) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1497) | def update_inputs_for_generation(self, model_outputs, model_kwargs): class FlaxBartForSequenceClassificationModule (line 1551) | class FlaxBartForSequenceClassificationModule(nn.Module): method setup (line 1556) | def setup(self): method _get_encoder_module (line 1565) | def _get_encoder_module(self): method _get_decoder_module (line 1568) | def _get_decoder_module(self): method __call__ (line 1571) | def __call__( class FlaxBartForSequenceClassification (line 1638) | class FlaxBartForSequenceClassification(FlaxBartPreTrainedModel): class FlaxBartForQuestionAnsweringModule (line 1651) | class FlaxBartForQuestionAnsweringModule(nn.Module): method setup (line 1656) | def setup(self): method _get_encoder_module (line 1662) | def _get_encoder_module(self): method _get_decoder_module (line 1665) | def _get_decoder_module(self): method __call__ (line 1668) | def __call__( class FlaxBartForQuestionAnswering (line 1724) | class FlaxBartForQuestionAnswering(FlaxBartPreTrainedModel): class FlaxBartDecoderPreTrainedModel (line 1737) | class FlaxBartDecoderPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1742) | def __init__( method init_weights (line 1756) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 1779) | def init_cache(self, batch_size, max_length): method __call__ (line 1799) | def __call__( class FlaxBartDecoderWrapper (line 1872) | class FlaxBartDecoderWrapper(nn.Module): method setup (line 1881) | def setup(self): method __call__ (line 1891) | def __call__(self, *args, **kwargs): class FlaxBartForCausalLMModule (line 1895) | class FlaxBartForCausalLMModule(nn.Module): method setup (line 1899) | def setup(self): method __call__ (line 1908) | def __call__( class FlaxBartForCausalLM (line 1960) | class FlaxBartForCausalLM(FlaxBartDecoderPreTrainedModel): method prepare_inputs_for_generation (line 1963) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1984) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/bart/modeling_tf_bart.py function shift_tokens_right (line 66) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 90) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 107) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFBartLearnedPositionalEmbedding (line 120) | class TFBartLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 125) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 131) | def call( class TFBartAttention (line 147) | class TFBartAttention(tf.keras.layers.Layer): method __init__ (line 150) | def __init__( method _shape (line 178) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 181) | def call( class TFBartEncoderLayer (line 300) | class TFBartEncoderLayer(tf.keras.layers.Layer): method __init__ (line 301) | def __init__(self, config: BartConfig, **kwargs): method call (line 315) | def call( class TFBartDecoderLayer (line 356) | class TFBartDecoderLayer(tf.keras.layers.Layer): method __init__ (line 357) | def __init__(self, config: BartConfig, **kwargs): method call (line 384) | def call( class TFBartClassificationHead (line 465) | class TFBartClassificationHead(tf.keras.layers.Layer): method __init__ (line 468) | def __init__(self, inner_dim: int, num_classes: int, pooler_dropout: f... method call (line 474) | def call(self, inputs): class TFBartPretrainedModel (line 483) | class TFBartPretrainedModel(TFPreTrainedModel): method dummy_inputs (line 488) | def dummy_inputs(self): class TFBartEncoder (line 656) | class TFBartEncoder(tf.keras.layers.Layer): method __init__ (line 666) | def __init__(self, config: BartConfig, embed_tokens: Optional[tf.keras... method call (line 685) | def call( class TFBartDecoder (line 808) | class TFBartDecoder(tf.keras.layers.Layer): method __init__ (line 818) | def __init__(self, config: BartConfig, embed_tokens: Optional[tf.keras... method call (line 836) | def call( class TFBartMainLayer (line 1031) | class TFBartMainLayer(tf.keras.layers.Layer): method __init__ (line 1034) | def __init__(self, config: BartConfig, load_weight_prefix=None, **kwar... method get_input_embeddings (line 1049) | def get_input_embeddings(self): method set_input_embeddings (line 1052) | def set_input_embeddings(self, new_embeddings): method call (line 1058) | def call( class TFBartModel (line 1151) | class TFBartModel(TFBartPretrainedModel): method __init__ (line 1154) | def __init__(self, config: BartConfig, load_weight_prefix=None, *input... method get_encoder (line 1159) | def get_encoder(self): method get_decoder (line 1162) | def get_decoder(self): method call (line 1172) | def call( method serving_output (line 1215) | def serving_output(self, output): class BiasLayer (line 1235) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1241) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1248) | def call(self, x): class TFBartForConditionalGeneration (line 1256) | class TFBartForConditionalGeneration(TFBartPretrainedModel, TFCausalLang... method __init__ (line 1260) | def __init__(self, config, load_weight_prefix=None, *inputs, **kwargs): method get_decoder (line 1269) | def get_decoder(self): method get_encoder (line 1272) | def get_encoder(self): method get_output_embeddings (line 1275) | def get_output_embeddings(self): method set_output_embeddings (line 1278) | def set_output_embeddings(self, value): method get_bias (line 1281) | def get_bias(self): method set_bias (line 1284) | def set_bias(self, value): method call (line 1296) | def call( method serving_output (line 1377) | def serving_output(self, output): method prepare_inputs_for_generation (line 1396) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1434) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): class TFBartForSequenceClassification (line 1445) | class TFBartForSequenceClassification(TFBartPretrainedModel, TFSequenceC... method __init__ (line 1446) | def __init__(self, config: BartConfig, load_weight_prefix=None, *input... method call (line 1456) | def call( method serving_output (line 1545) | def serving_output(self, output): FILE: transformers/models/bart/tokenization_bart.py function bytes_to_unicode (line 63) | def bytes_to_unicode(): function get_pairs (line 87) | def get_pairs(word): class BartTokenizer (line 101) | class BartTokenizer(PreTrainedTokenizer): method __init__ (line 184) | def __init__( method vocab_size (line 239) | def vocab_size(self): method get_vocab (line 242) | def get_vocab(self): method bpe (line 245) | def bpe(self, token): method _tokenize (line 287) | def _tokenize(self, text): method _convert_token_to_id (line 297) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 301) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 305) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 311) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 340) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 365) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 392) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 415) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: transformers/models/bart/tokenization_bart_fast.py class BartTokenizerFast (line 70) | class BartTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 156) | def __init__( method mask_token (line 226) | def mask_token(self) -> str: method mask_token (line 241) | def mask_token(self, value): method _batch_encode_plus (line 252) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 263) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 274) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 278) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 285) | def create_token_type_ids_from_sequences( FILE: transformers/models/barthez/tokenization_barthez.py class BarthezTokenizer (line 51) | class BarthezTokenizer(PreTrainedTokenizer): method __init__ (line 126) | def __init__( method build_inputs_with_special_tokens (line 165) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 191) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 218) | def create_token_type_ids_from_sequences( method vocab_size (line 241) | def vocab_size(self): method get_vocab (line 244) | def get_vocab(self): method _tokenize (line 249) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 252) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 260) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 266) | def convert_tokens_to_string(self, tokens): method __getstate__ (line 285) | def __getstate__(self): method __setstate__ (line 290) | def __setstate__(self, d): method save_vocabulary (line 300) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/barthez/tokenization_barthez_fast.py class BarthezTokenizerFast (line 62) | class BarthezTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 119) | def __init__( method build_inputs_with_special_tokens (line 151) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 177) | def create_token_type_ids_from_sequences( method save_vocabulary (line 199) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/bartpho/tokenization_bartpho.py class BartphoTokenizer (line 46) | class BartphoTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method __getstate__ (line 177) | def __getstate__(self): method __setstate__ (line 183) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 193) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 219) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 247) | def create_token_type_ids_from_sequences( method vocab_size (line 273) | def vocab_size(self): method get_vocab (line 276) | def get_vocab(self): method _tokenize (line 281) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 284) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 291) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 295) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 300) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/beit/configuration_beit.py class BeitConfig (line 36) | class BeitConfig(PretrainedConfig): method __init__ (line 120) | def __init__( class BeitOnnxConfig (line 188) | class BeitOnnxConfig(OnnxConfig): method inputs (line 192) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 200) | def atol_for_validation(self) -> float: FILE: transformers/models/beit/convert_beit_unilm_to_pytorch.py function create_rename_keys (line 44) | def create_rename_keys(config, has_lm_head=False, is_semantic=False): function read_in_q_k_v (line 116) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function rename_key (line 158) | def rename_key(dct, old, new): function prepare_img (line 164) | def prepare_img(): function convert_beit_checkpoint (line 171) | def convert_beit_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: transformers/models/beit/feature_extraction_beit.py class BeitFeatureExtractor (line 26) | class BeitFeatureExtractor(BeitImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/beit/image_processing_beit.py class BeitImageProcessor (line 47) | class BeitImageProcessor(BaseImageProcessor): method __init__ (line 92) | def __init__( method reduce_labels (line 132) | def reduce_labels(self) -> bool: method from_dict (line 141) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method resize (line 151) | def resize( method center_crop (line 179) | def center_crop( method rescale (line 201) | def rescale( method normalize (line 221) | def normalize( method reduce_label (line 244) | def reduce_label(self, label: ImageInput) -> np.ndarray: method _preprocess (line 252) | def _preprocess( method _preprocess_image (line 284) | def _preprocess_image( method _preprocess_segmentation_map (line 320) | def _preprocess_segmentation_map( method __call__ (line 356) | def __call__(self, images, segmentation_maps=None, **kwargs): method preprocess (line 361) | def preprocess( method post_process_semantic_segmentation (line 503) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: transformers/models/beit/modeling_beit.py class BeitModelOutputWithPooling (line 68) | class BeitModelOutputWithPooling(BaseModelOutputWithPooling): function drop_path (line 93) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class BeitDropPath (line 113) | class BeitDropPath(nn.Module): method __init__ (line 116) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 120) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 123) | def extra_repr(self) -> str: class BeitEmbeddings (line 129) | class BeitEmbeddings(nn.Module): method __init__ (line 135) | def __init__(self, config: BeitConfig) -> None: method forward (line 151) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class BeitPatchEmbeddings (line 170) | class BeitPatchEmbeddings(nn.Module): method __init__ (line 177) | def __init__(self, config): method forward (line 194) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class BeitSelfAttention (line 209) | class BeitSelfAttention(nn.Module): method __init__ (line 210) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method transpose_for_scores (line 233) | def transpose_for_scores(self, x): method forward (line 238) | def forward( class BeitSelfOutput (line 286) | class BeitSelfOutput(nn.Module): method __init__ (line 292) | def __init__(self, config: BeitConfig) -> None: method forward (line 297) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BeitAttention (line 304) | class BeitAttention(nn.Module): method __init__ (line 305) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method prune_heads (line 311) | def prune_heads(self, heads): method forward (line 329) | def forward( class BeitIntermediate (line 344) | class BeitIntermediate(nn.Module): method __init__ (line 345) | def __init__(self, config: BeitConfig) -> None: method forward (line 353) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitOutput (line 360) | class BeitOutput(nn.Module): method __init__ (line 361) | def __init__(self, config: BeitConfig) -> None: method forward (line 366) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitLayer (line 373) | class BeitLayer(nn.Module): method __init__ (line 376) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method forward (line 394) | def forward( class BeitRelativePositionBias (line 434) | class BeitRelativePositionBias(nn.Module): method __init__ (line 435) | def __init__(self, config: BeitConfig, window_size: tuple) -> None: method forward (line 464) | def forward(self) -> torch.Tensor: class BeitEncoder (line 472) | class BeitEncoder(nn.Module): method __init__ (line 473) | def __init__(self, config: BeitConfig, window_size: Optional[tuple] = ... method forward (line 495) | def forward( class BeitPreTrainedModel (line 548) | class BeitPreTrainedModel(PreTrainedModel): method _init_weights (line 559) | def _init_weights(self, module): method _set_gradient_checkpointing (line 575) | def _set_gradient_checkpointing(self, module, value=False): class BeitModel (line 618) | class BeitModel(BeitPreTrainedModel): method __init__ (line 619) | def __init__(self, config: BeitConfig, add_pooling_layer: bool = True)... method get_input_embeddings (line 634) | def get_input_embeddings(self): method _prune_heads (line 637) | def _prune_heads(self, heads_to_prune): method forward (line 653) | def forward( class BeitPooler (line 707) | class BeitPooler(nn.Module): method __init__ (line 708) | def __init__(self, config: BeitConfig) -> None: method forward (line 714) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BeitForMaskedImageModeling (line 733) | class BeitForMaskedImageModeling(BeitPreTrainedModel): method __init__ (line 734) | def __init__(self, config: BeitConfig) -> None: method forward (line 749) | def forward( class BeitForImageClassification (line 833) | class BeitForImageClassification(BeitPreTrainedModel): method __init__ (line 834) | def __init__(self, config: BeitConfig) -> None: method forward (line 853) | def forward( class BeitConvModule (line 915) | class BeitConvModule(nn.Module): method __init__ (line 923) | def __init__( method forward (line 944) | def forward(self, input: torch.Tensor) -> torch.Tensor: class BeitPyramidPoolingBlock (line 952) | class BeitPyramidPoolingBlock(nn.Module): method __init__ (line 953) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 962) | def forward(self, input: torch.Tensor) -> torch.Tensor: class BeitPyramidPoolingModule (line 969) | class BeitPyramidPoolingModule(nn.Module): method __init__ (line 983) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 995) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class BeitUperHead (line 1006) | class BeitUperHead(nn.Module): method __init__ (line 1014) | def __init__(self, config: BeitConfig) -> None: method psp_forward (line 1052) | def psp_forward(self, inputs): method forward (line 1061) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class BeitFCNHead (line 1091) | class BeitFCNHead(nn.Module): method __init__ (line 1106) | def __init__( method forward (line 1140) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class BeitForSemanticSegmentation (line 1156) | class BeitForSemanticSegmentation(BeitPreTrainedModel): method __init__ (line 1157) | def __init__(self, config: BeitConfig) -> None: method compute_loss (line 1183) | def compute_loss(self, logits, auxiliary_logits, labels): method forward (line 1204) | def forward( FILE: transformers/models/beit/modeling_flax_beit.py class FlaxBeitModelOutputWithPooling (line 45) | class FlaxBeitModelOutputWithPooling(FlaxBaseModelOutputWithPooling): function relative_position_index_init (line 118) | def relative_position_index_init(window_size: Tuple[int, int]) -> jnp.nd... function ones_with_scale (line 142) | def ones_with_scale(key, shape, scale, dtype=jnp.float32): class FlaxBeitDropPath (line 146) | class FlaxBeitDropPath(nn.Module): method __call__ (line 152) | def __call__(self, inputs, deterministic: Optional[bool] = True): class FlaxBeitPatchEmbeddings (line 167) | class FlaxBeitPatchEmbeddings(nn.Module): method setup (line 171) | def setup(self): method __call__ (line 188) | def __call__(self, pixel_values): class FlaxBeitEmbeddings (line 199) | class FlaxBeitEmbeddings(nn.Module): method setup (line 205) | def setup(self): method __call__ (line 217) | def __call__(self, pixel_values, bool_masked_pos=None, deterministic=T... class FlaxBeitRelativePositionBias (line 240) | class FlaxBeitRelativePositionBias(nn.Module): method setup (line 245) | def setup(self): method __call__ (line 256) | def __call__(self): class FlaxBeitSelfAttention (line 263) | class FlaxBeitSelfAttention(nn.Module): method setup (line 268) | def setup(self): method __call__ (line 300) | def __call__( class FlaxBeitSelfOutput (line 348) | class FlaxBeitSelfOutput(nn.Module): method setup (line 352) | def setup(self): method __call__ (line 360) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxBeitAttention (line 366) | class FlaxBeitAttention(nn.Module): method setup (line 371) | def setup(self): method __call__ (line 375) | def __call__( class FlaxBeitIntermediate (line 392) | class FlaxBeitIntermediate(nn.Module): method setup (line 396) | def setup(self): method __call__ (line 404) | def __call__(self, hidden_states): class FlaxBeitOutput (line 411) | class FlaxBeitOutput(nn.Module): method setup (line 415) | def setup(self): method __call__ (line 423) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxBeitLayer (line 430) | class FlaxBeitLayer(nn.Module): method setup (line 436) | def setup(self): method __call__ (line 452) | def __call__( class FlaxBeitLayerCollection (line 491) | class FlaxBeitLayerCollection(nn.Module): method setup (line 498) | def setup(self): method __call__ (line 510) | def __call__( class FlaxBeitEncoder (line 546) | class FlaxBeitEncoder(nn.Module): method setup (line 551) | def setup(self): method __call__ (line 569) | def __call__( class FlaxBeitPreTrainedModel (line 586) | class FlaxBeitPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 597) | def __init__( method init_weights (line 611) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 632) | def __call__( class FlaxBeitPooler (line 669) | class FlaxBeitPooler(nn.Module): method setup (line 673) | def setup(self): method __call__ (line 677) | def __call__(self, hidden_states): class FlaxBeitModule (line 689) | class FlaxBeitModule(nn.Module): method setup (line 694) | def setup(self): method __call__ (line 703) | def __call__( class FlaxBeitModel (line 744) | class FlaxBeitModel(FlaxBeitPreTrainedModel): class FlaxBeitForMaskedImageModelingModule (line 774) | class FlaxBeitForMaskedImageModelingModule(nn.Module): method setup (line 778) | def setup(self): method __call__ (line 789) | def __call__( class FlaxBeitForMaskedImageModeling (line 828) | class FlaxBeitForMaskedImageModeling(FlaxBeitPreTrainedModel): class FlaxBeitForImageClassificationModule (line 863) | class FlaxBeitForImageClassificationModule(nn.Module): method setup (line 867) | def setup(self): method __call__ (line 875) | def __call__( class FlaxBeitForImageClassification (line 915) | class FlaxBeitForImageClassification(FlaxBeitPreTrainedModel): FILE: transformers/models/bert/configuration_bert.py class BertConfig (line 72) | class BertConfig(PretrainedConfig): method __init__ (line 141) | def __init__( class BertOnnxConfig (line 180) | class BertOnnxConfig(OnnxConfig): method inputs (line 182) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py function load_tf2_weights_in_bert (line 42) | def load_tf2_weights_in_bert(model, tf_checkpoint_path, config): function convert_tf2_checkpoint_to_pytorch (line 212) | def convert_tf2_checkpoint_to_pytorch(tf_checkpoint_path, config_path, p... FILE: transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: transformers/models/bert/convert_bert_pytorch_checkpoint_to_original_tf.py function convert_pytorch_checkpoint_to_tf (line 28) | def convert_pytorch_checkpoint_to_tf(model: BertModel, ckpt_dir: str, mo... function main (line 92) | def main(raw_args=None): FILE: transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py function convert_checkpoint_to_pytorch (line 41) | def convert_checkpoint_to_pytorch(tf_checkpoint_path: str, config_path: ... FILE: transformers/models/bert/modeling_bert.py function load_tf_weights_in_bert (line 107) | def load_tf_weights_in_bert(model, config, tf_checkpoint_path): class BertEmbeddings (line 180) | class BertEmbeddings(nn.Module): method __init__ (line 183) | def __init__(self, config): method forward (line 200) | def forward( class BertSelfAttention (line 242) | class BertSelfAttention(nn.Module): method __init__ (line 243) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 269) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 274) | def forward( class BertSelfOutput (line 376) | class BertSelfOutput(nn.Module): method __init__ (line 377) | def __init__(self, config): method forward (line 383) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertAttention (line 390) | class BertAttention(nn.Module): method __init__ (line 391) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 397) | def prune_heads(self, heads): method forward (line 415) | def forward( class BertIntermediate (line 439) | class BertIntermediate(nn.Module): method __init__ (line 440) | def __init__(self, config): method forward (line 448) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertOutput (line 454) | class BertOutput(nn.Module): method __init__ (line 455) | def __init__(self, config): method forward (line 461) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertLayer (line 468) | class BertLayer(nn.Module): method __init__ (line 469) | def __init__(self, config): method forward (line 483) | def forward( method feed_forward_chunk (line 548) | def feed_forward_chunk(self, attention_output): class BertEncoder (line 554) | class BertEncoder(nn.Module): method __init__ (line 555) | def __init__(self, config): method forward (line 561) | def forward( class BertPooler (line 652) | class BertPooler(nn.Module): method __init__ (line 653) | def __init__(self, config): method forward (line 658) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertPredictionHeadTransform (line 667) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 668) | def __init__(self, config): method forward (line 677) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertLMPredictionHead (line 684) | class BertLMPredictionHead(nn.Module): method __init__ (line 685) | def __init__(self, config): method forward (line 698) | def forward(self, hidden_states): class BertOnlyMLMHead (line 704) | class BertOnlyMLMHead(nn.Module): method __init__ (line 705) | def __init__(self, config): method forward (line 709) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BertOnlyNSPHead (line 714) | class BertOnlyNSPHead(nn.Module): method __init__ (line 715) | def __init__(self, config): method forward (line 719) | def forward(self, pooled_output): class BertPreTrainingHeads (line 724) | class BertPreTrainingHeads(nn.Module): method __init__ (line 725) | def __init__(self, config): method forward (line 730) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 736) | class BertPreTrainedModel(PreTrainedModel): method _init_weights (line 748) | def _init_weights(self, module): method _set_gradient_checkpointing (line 764) | def _set_gradient_checkpointing(self, module, value=False): class BertForPreTrainingOutput (line 770) | class BertForPreTrainingOutput(ModelOutput): class BertModel (line 873) | class BertModel(BertPreTrainedModel): method __init__ (line 886) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 898) | def get_input_embeddings(self): method set_input_embeddings (line 901) | def set_input_embeddings(self, value): method _prune_heads (line 904) | def _prune_heads(self, heads_to_prune): method forward (line 918) | def forward( class BertForPreTraining (line 1055) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 1058) | def __init__(self, config): method get_output_embeddings (line 1067) | def get_output_embeddings(self): method set_output_embeddings (line 1070) | def set_output_embeddings(self, new_embeddings): method forward (line 1075) | def forward( class BertLMHeadModel (line 1161) | class BertLMHeadModel(BertPreTrainedModel): method __init__ (line 1165) | def __init__(self, config): method get_output_embeddings (line 1177) | def get_output_embeddings(self): method set_output_embeddings (line 1180) | def set_output_embeddings(self, new_embeddings): method forward (line 1189) | def forward( method prepare_inputs_for_generation (line 1274) | def prepare_inputs_for_generation( method _reorder_cache (line 1293) | def _reorder_cache(self, past_key_values, beam_idx): class BertForMaskedLM (line 1301) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 1305) | def __init__(self, config): method get_output_embeddings (line 1320) | def get_output_embeddings(self): method set_output_embeddings (line 1323) | def set_output_embeddings(self, new_embeddings): method forward (line 1334) | def forward( method prepare_inputs_for_generation (line 1391) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BertForNextSentencePrediction (line 1412) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 1413) | def __init__(self, config): method forward (line 1424) | def forward( class BertForSequenceClassification (line 1517) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 1518) | def __init__(self, config): method forward (line 1541) | def forward( class BertForMultipleChoice (line 1620) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1621) | def __init__(self, config): method forward (line 1640) | def forward( class BertForTokenClassification (line 1714) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1717) | def __init__(self, config): method forward (line 1739) | def forward( class BertForQuestionAnswering (line 1799) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1802) | def __init__(self, config): method forward (line 1822) | def forward( FILE: transformers/models/bert/modeling_flax_bert.py class FlaxBertForPreTrainingOutput (line 62) | class FlaxBertForPreTrainingOutput(ModelOutput): class FlaxBertEmbeddings (line 177) | class FlaxBertEmbeddings(nn.Module): method setup (line 183) | def setup(self): method __call__ (line 205) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxBertSelfAttention (line 220) | class FlaxBertSelfAttention(nn.Module): method setup (line 225) | def setup(self): method _split_heads (line 254) | def _split_heads(self, hidden_states): method _merge_heads (line 257) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 262) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 293) | def __call__( class FlaxBertSelfOutput (line 391) | class FlaxBertSelfOutput(nn.Module): method setup (line 395) | def setup(self): method __call__ (line 404) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxBertAttention (line 411) | class FlaxBertAttention(nn.Module): method setup (line 416) | def setup(self): method __call__ (line 420) | def __call__( class FlaxBertIntermediate (line 453) | class FlaxBertIntermediate(nn.Module): method setup (line 457) | def setup(self): method __call__ (line 465) | def __call__(self, hidden_states): class FlaxBertOutput (line 471) | class FlaxBertOutput(nn.Module): method setup (line 475) | def setup(self): method __call__ (line 484) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxBertLayer (line 491) | class FlaxBertLayer(nn.Module): method setup (line 495) | def setup(self): method __call__ (line 502) | def __call__( class FlaxBertLayerCollection (line 548) | class FlaxBertLayerCollection(nn.Module): method setup (line 553) | def setup(self): method __call__ (line 565) | def __call__( class FlaxBertEncoder (line 629) | class FlaxBertEncoder(nn.Module): method setup (line 634) | def setup(self): method __call__ (line 641) | def __call__( class FlaxBertPooler (line 668) | class FlaxBertPooler(nn.Module): method setup (line 672) | def setup(self): method __call__ (line 679) | def __call__(self, hidden_states): class FlaxBertPredictionHeadTransform (line 685) | class FlaxBertPredictionHeadTransform(nn.Module): method setup (line 689) | def setup(self): method __call__ (line 694) | def __call__(self, hidden_states): class FlaxBertLMPredictionHead (line 700) | class FlaxBertLMPredictionHead(nn.Module): method setup (line 705) | def setup(self): method __call__ (line 710) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBertOnlyMLMHead (line 723) | class FlaxBertOnlyMLMHead(nn.Module): method setup (line 727) | def setup(self): method __call__ (line 730) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBertOnlyNSPHead (line 735) | class FlaxBertOnlyNSPHead(nn.Module): method setup (line 738) | def setup(self): method __call__ (line 741) | def __call__(self, pooled_output): class FlaxBertPreTrainingHeads (line 745) | class FlaxBertPreTrainingHeads(nn.Module): method setup (line 749) | def setup(self): method __call__ (line 753) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): class FlaxBertPreTrainedModel (line 759) | class FlaxBertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 769) | def __init__( method enable_gradient_checkpointing (line 787) | def enable_gradient_checkpointing(self): method init_weights (line 794) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 837) | def init_cache(self, batch_size, max_length): method __call__ (line 857) | def __call__( class FlaxBertModule (line 954) | class FlaxBertModule(nn.Module): method setup (line 960) | def setup(self): method __call__ (line 969) | def __call__( class FlaxBertModel (line 1029) | class FlaxBertModel(FlaxBertPreTrainedModel): class FlaxBertForPreTrainingModule (line 1036) | class FlaxBertForPreTrainingModule(nn.Module): method setup (line 1041) | def setup(self): method __call__ (line 1049) | def __call__( class FlaxBertForPreTraining (line 1104) | class FlaxBertForPreTraining(FlaxBertPreTrainedModel): class FlaxBertForMaskedLMModule (line 1136) | class FlaxBertForMaskedLMModule(nn.Module): method setup (line 1141) | def setup(self): method __call__ (line 1150) | def __call__( class FlaxBertForMaskedLM (line 1195) | class FlaxBertForMaskedLM(FlaxBertPreTrainedModel): class FlaxBertForNextSentencePredictionModule (line 1202) | class FlaxBertForNextSentencePredictionModule(nn.Module): method setup (line 1207) | def setup(self): method __call__ (line 1215) | def __call__( class FlaxBertForNextSentencePrediction (line 1259) | class FlaxBertForNextSentencePrediction(FlaxBertPreTrainedModel): class FlaxBertForSequenceClassificationModule (line 1294) | class FlaxBertForSequenceClassificationModule(nn.Module): method setup (line 1299) | def setup(self): method __call__ (line 1316) | def __call__( class FlaxBertForSequenceClassification (line 1362) | class FlaxBertForSequenceClassification(FlaxBertPreTrainedModel): class FlaxBertForMultipleChoiceModule (line 1374) | class FlaxBertForMultipleChoiceModule(nn.Module): method setup (line 1379) | def setup(self): method __call__ (line 1388) | def __call__( class FlaxBertForMultipleChoice (line 1442) | class FlaxBertForMultipleChoice(FlaxBertPreTrainedModel): class FlaxBertForTokenClassificationModule (line 1454) | class FlaxBertForTokenClassificationModule(nn.Module): method setup (line 1459) | def setup(self): method __call__ (line 1474) | def __call__( class FlaxBertForTokenClassification (line 1520) | class FlaxBertForTokenClassification(FlaxBertPreTrainedModel): class FlaxBertForQuestionAnsweringModule (line 1529) | class FlaxBertForQuestionAnsweringModule(nn.Module): method setup (line 1534) | def setup(self): method __call__ (line 1543) | def __call__( class FlaxBertForQuestionAnswering (line 1593) | class FlaxBertForQuestionAnswering(FlaxBertPreTrainedModel): class FlaxBertForCausalLMModule (line 1605) | class FlaxBertForCausalLMModule(nn.Module): method setup (line 1610) | def setup(self): method __call__ (line 1619) | def __call__( class FlaxBertForCausalLM (line 1677) | class FlaxBertForCausalLM(FlaxBertPreTrainedModel): method prepare_inputs_for_generation (line 1680) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1701) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/bert/modeling_tf_bert.py class TFBertPreTrainingLoss (line 116) | class TFBertPreTrainingLoss: method hf_compute_loss (line 123) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFBertEmbeddings (line 146) | class TFBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 149) | def __init__(self, config: BertConfig, **kwargs): method build (line 159) | def build(self, input_shape: tf.TensorShape): method call (line 183) | def call( class TFBertSelfAttention (line 224) | class TFBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 225) | def __init__(self, config: BertConfig, **kwargs): method transpose_for_scores (line 252) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 259) | def call( class TFBertSelfOutput (line 341) | class TFBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 342) | def __init__(self, config: BertConfig, **kwargs): method call (line 351) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFBertAttention (line 359) | class TFBertAttention(tf.keras.layers.Layer): method __init__ (line 360) | def __init__(self, config: BertConfig, **kwargs): method prune_heads (line 366) | def prune_heads(self, heads): method call (line 369) | def call( class TFBertIntermediate (line 399) | class TFBertIntermediate(tf.keras.layers.Layer): method __init__ (line 400) | def __init__(self, config: BertConfig, **kwargs): method call (line 412) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertOutput (line 419) | class TFBertOutput(tf.keras.layers.Layer): method __init__ (line 420) | def __init__(self, config: BertConfig, **kwargs): method call (line 429) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFBertLayer (line 437) | class TFBertLayer(tf.keras.layers.Layer): method __init__ (line 438) | def __init__(self, config: BertConfig, **kwargs): method call (line 451) | def call( class TFBertEncoder (line 523) | class TFBertEncoder(tf.keras.layers.Layer): method __init__ (line 524) | def __init__(self, config: BertConfig, **kwargs): method call (line 529) | def call( class TFBertPooler (line 592) | class TFBertPooler(tf.keras.layers.Layer): method __init__ (line 593) | def __init__(self, config: BertConfig, **kwargs): method call (line 603) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertPredictionHeadTransform (line 612) | class TFBertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 613) | def __init__(self, config: BertConfig, **kwargs): method call (line 629) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertLMPredictionHead (line 637) | class TFBertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 638) | def __init__(self, config: BertConfig, input_embeddings: tf.keras.laye... method build (line 650) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 655) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 658) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 662) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 665) | def set_bias(self, value: tf.Variable): method call (line 669) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBertMLMHead (line 680) | class TFBertMLMHead(tf.keras.layers.Layer): method __init__ (line 681) | def __init__(self, config: BertConfig, input_embeddings: tf.keras.laye... method call (line 686) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFBertNSPHead (line 692) | class TFBertNSPHead(tf.keras.layers.Layer): method __init__ (line 693) | def __init__(self, config: BertConfig, **kwargs): method call (line 702) | def call(self, pooled_output: tf.Tensor) -> tf.Tensor: class TFBertMainLayer (line 709) | class TFBertMainLayer(tf.keras.layers.Layer): method __init__ (line 712) | def __init__(self, config: BertConfig, add_pooling_layer: bool = True,... method get_input_embeddings (line 722) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 725) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 729) | def _prune_heads(self, heads_to_prune): method call (line 737) | def call( class TFBertPreTrainedModel (line 895) | class TFBertPreTrainedModel(TFPreTrainedModel): class TFBertForPreTrainingOutput (line 906) | class TFBertForPreTrainingOutput(ModelOutput): class TFBertModel (line 1038) | class TFBertModel(TFBertPreTrainedModel): method __init__ (line 1039) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1051) | def call( class TFBertForPreTraining (line 1114) | class TFBertForPreTraining(TFBertPreTrainedModel, TFBertPreTrainingLoss): method __init__ (line 1122) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1129) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1132) | def get_prefix_bias_name(self) -> str: method call (line 1139) | def call( class TFBertForMaskedLM (line 1220) | class TFBertForMaskedLM(TFBertPreTrainedModel, TFMaskedLanguageModelingL... method __init__ (line 1229) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1241) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1244) | def get_prefix_bias_name(self) -> str: method call (line 1257) | def call( class TFBertLMHeadModel (line 1305) | class TFBertLMHeadModel(TFBertPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 1314) | def __init__(self, config: BertConfig, *inputs, **kwargs): method get_lm_head (line 1323) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1326) | def get_prefix_bias_name(self) -> str: method prepare_inputs_for_generation (line 1330) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1348) | def call( class TFBertForNextSentencePrediction (line 1434) | class TFBertForNextSentencePrediction(TFBertPreTrainedModel, TFNextSente... method __init__ (line 1438) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1447) | def call( class TFBertForSequenceClassification (line 1519) | class TFBertForSequenceClassification(TFBertPreTrainedModel, TFSequenceC... method __init__ (line 1524) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1549) | def call( class TFBertForMultipleChoice (line 1605) | class TFBertForMultipleChoice(TFBertPreTrainedModel, TFMultipleChoiceLoss): method __init__ (line 1610) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1626) | def call( class TFBertForTokenClassification (line 1704) | class TFBertForTokenClassification(TFBertPreTrainedModel, TFTokenClassif... method __init__ (line 1715) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1740) | def call( class TFBertForQuestionAnswering (line 1794) | class TFBertForQuestionAnswering(TFBertPreTrainedModel, TFQuestionAnswer... method __init__ (line 1804) | def __init__(self, config: BertConfig, *inputs, **kwargs): method call (line 1827) | def call( FILE: transformers/models/bert/tokenization_bert.py function load_vocab (line 117) | def load_vocab(vocab_file): function whitespace_tokenize (line 128) | def whitespace_tokenize(text): class BertTokenizer (line 137) | class BertTokenizer(PreTrainedTokenizer): method __init__ (line 184) | def __init__( method do_lower_case (line 231) | def do_lower_case(self): method vocab_size (line 235) | def vocab_size(self): method get_vocab (line 238) | def get_vocab(self): method _tokenize (line 241) | def _tokenize(self, text): method _convert_token_to_id (line 254) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 258) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 262) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 267) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 292) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 320) | def create_token_type_ids_from_sequences( method save_vocabulary (line 349) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 370) | class BasicTokenizer(object): method __init__ (line 390) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 398) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 435) | def _run_strip_accents(self, text): method _run_split_on_punc (line 446) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 468) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 481) | def _is_chinese_char(self, cp): method _clean_text (line 505) | def _clean_text(self, text): class WordpieceTokenizer (line 519) | class WordpieceTokenizer(object): method __init__ (line 522) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 527) | def tokenize(self, text): FILE: transformers/models/bert/tokenization_bert_fast.py class BertTokenizerFast (line 161) | class BertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 207) | def __init__( method build_inputs_with_special_tokens (line 249) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 273) | def create_token_type_ids_from_sequences( method save_vocabulary (line 302) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/bert/tokenization_bert_tf.py class TFBertTokenizer (line 11) | class TFBertTokenizer(tf.keras.layers.Layer): method __init__ (line 54) | def __init__( method from_tokenizer (line 100) | def from_tokenizer(cls, tokenizer: "PreTrainedTokenizerBase", **kwargs... method from_pretrained (line 139) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method unpaired_tokenize (line 163) | def unpaired_tokenize(self, texts): method call (line 169) | def call( method get_config (line 241) | def get_config(self): FILE: transformers/models/bert_generation/configuration_bert_generation.py class BertGenerationConfig (line 20) | class BertGenerationConfig(PretrainedConfig): method __init__ (line 85) | def __init__( FILE: transformers/models/bert_generation/modeling_bert_generation.py class BertGenerationSelfOutput (line 46) | class BertGenerationSelfOutput(nn.Module): method __init__ (line 47) | def __init__(self, config): method forward (line 53) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertGenerationSelfAttention (line 61) | class BertGenerationSelfAttention(nn.Module): method __init__ (line 62) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 88) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 93) | def forward( class BertGenerationAttention (line 196) | class BertGenerationAttention(nn.Module): method __init__ (line 197) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 203) | def prune_heads(self, heads): method forward (line 221) | def forward( class BertGenerationIntermediate (line 246) | class BertGenerationIntermediate(nn.Module): method __init__ (line 247) | def __init__(self, config): method forward (line 255) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BertGenerationOutput (line 262) | class BertGenerationOutput(nn.Module): method __init__ (line 263) | def __init__(self, config): method forward (line 269) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BertGenerationLayer (line 277) | class BertGenerationLayer(nn.Module): method __init__ (line 278) | def __init__(self, config): method forward (line 292) | def forward( method feed_forward_chunk (line 357) | def feed_forward_chunk(self, attention_output): class BertEncoder (line 364) | class BertEncoder(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 371) | def forward( function load_tf_weights_in_bert_generation (line 462) | def load_tf_weights_in_bert_generation( class BertGenerationEmbeddings (line 546) | class BertGenerationEmbeddings(nn.Module): method __init__ (line 549) | def __init__(self, config): method forward (line 561) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... class BertGenerationPreTrainedModel (line 582) | class BertGenerationPreTrainedModel(PreTrainedModel): method _init_weights (line 593) | def _init_weights(self, module): method _set_gradient_checkpointing (line 609) | def _set_gradient_checkpointing(self, module, value=False): class BertGenerationEncoder (line 676) | class BertGenerationEncoder(BertGenerationPreTrainedModel): method __init__ (line 693) | def __init__(self, config): method get_input_embeddings (line 703) | def get_input_embeddings(self): method set_input_embeddings (line 706) | def set_input_embeddings(self, value): method _prune_heads (line 709) | def _prune_heads(self, heads_to_prune): method forward (line 723) | def forward( class BertGenerationOnlyLMHead (line 842) | class BertGenerationOnlyLMHead(nn.Module): method __init__ (line 843) | def __init__(self, config): method forward (line 849) | def forward(self, hidden_states): method _tie_weights (line 853) | def _tie_weights(self): class BertGenerationDecoder (line 862) | class BertGenerationDecoder(BertGenerationPreTrainedModel): method __init__ (line 865) | def __init__(self, config): method get_output_embeddings (line 877) | def get_output_embeddings(self): method set_output_embeddings (line 880) | def set_output_embeddings(self, new_embeddings): method forward (line 885) | def forward( method prepare_inputs_for_generation (line 988) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1000) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/bert_generation/tokenization_bert_generation.py class BertGenerationTokenizer (line 43) | class BertGenerationTokenizer(PreTrainedTokenizer): method __init__ (line 86) | def __init__( method vocab_size (line 116) | def vocab_size(self): method get_vocab (line 119) | def get_vocab(self): method __getstate__ (line 124) | def __getstate__(self): method __setstate__ (line 129) | def __setstate__(self, d): method _tokenize (line 139) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 143) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 147) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 152) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 166) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/bert_japanese/tokenization_bert_japanese.py function load_vocab (line 86) | def load_vocab(vocab_file): function whitespace_tokenize (line 98) | def whitespace_tokenize(text): class BertJapaneseTokenizer (line 107) | class BertJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 143) | def __init__( method do_lower_case (line 238) | def do_lower_case(self): method __getstate__ (line 241) | def __getstate__(self): method __setstate__ (line 247) | def __setstate__(self, state): method _tokenize (line 262) | def _tokenize(self, text): method vocab_size (line 276) | def vocab_size(self): method get_vocab (line 281) | def get_vocab(self): method _convert_token_to_id (line 288) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 294) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 300) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 308) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 334) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 363) | def create_token_type_ids_from_sequences( method save_vocabulary (line 392) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class MecabTokenizer (line 425) | class MecabTokenizer: method __init__ (line 428) | def __init__( method tokenize (line 514) | def tokenize(self, text, never_split=None, **kwargs): class SudachiTokenizer (line 533) | class SudachiTokenizer: method __init__ (line 536) | def __init__( method tokenize (line 594) | def tokenize(self, text, never_split=None, **kwargs): class JumanppTokenizer (line 619) | class JumanppTokenizer: method __init__ (line 622) | def __init__( method tokenize (line 659) | def tokenize(self, text, never_split=None, **kwargs): class CharacterTokenizer (line 686) | class CharacterTokenizer: method __init__ (line 689) | def __init__(self, vocab, unk_token, normalize_text=True): method tokenize (line 705) | def tokenize(self, text): class BasicTokenizer (line 733) | class BasicTokenizer(object): method __init__ (line 753) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 761) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 798) | def _run_strip_accents(self, text): method _run_split_on_punc (line 809) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 831) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 844) | def _is_chinese_char(self, cp): method _clean_text (line 868) | def _clean_text(self, text): class WordpieceTokenizer (line 883) | class WordpieceTokenizer(object): method __init__ (line 886) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 891) | def tokenize(self, text): class SentencepieceTokenizer (line 940) | class SentencepieceTokenizer(object): method __init__ (line 945) | def __init__( method preprocess_text (line 964) | def preprocess_text(self, inputs): method tokenize (line 979) | def tokenize(self, text): FILE: transformers/models/bertweet/tokenization_bertweet.py function get_pairs (line 52) | def get_pairs(word): class BertweetTokenizer (line 68) | class BertweetTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 210) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 238) | def create_token_type_ids_from_sequences( method vocab_size (line 263) | def vocab_size(self): method get_vocab (line 266) | def get_vocab(self): method bpe (line 269) | def bpe(self, token): method _tokenize (line 313) | def _tokenize(self, text): method normalizeTweet (line 324) | def normalizeTweet(self, tweet): method normalizeToken (line 358) | def normalizeToken(self, token): method _convert_token_to_id (line 377) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 381) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 385) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 390) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method add_from_file (line 415) | def add_from_file(self, f): function _str_to_unicode (line 617) | def _str_to_unicode(text, encoding=None, errors="strict"): function _replace_html_entities (line 625) | def _replace_html_entities(text, keep=(), remove_illegal=True, encoding=... class TweetTokenizer (line 690) | class TweetTokenizer: method __init__ (line 710) | def __init__(self, preserve_case=True, reduce_len=False, strip_handles... method tokenize (line 715) | def tokenize(self, text): function reduce_lengthening (line 746) | def reduce_lengthening(text): function remove_handles (line 754) | def remove_handles(text): function casual_tokenize (line 770) | def casual_tokenize(text, preserve_case=True, reduce_len=False, strip_ha... FILE: transformers/models/big_bird/configuration_big_bird.py class BigBirdConfig (line 34) | class BigBirdConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class BigBirdOnnxConfig (line 166) | class BigBirdOnnxConfig(OnnxConfig): method inputs (line 168) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/big_bird/convert_bigbird_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, big_bird_config... FILE: transformers/models/big_bird/modeling_big_bird.py function load_tf_weights_in_big_bird (line 83) | def load_tf_weights_in_big_bird(model, tf_checkpoint_path, is_trivia_qa=... class BigBirdEmbeddings (line 244) | class BigBirdEmbeddings(nn.Module): method __init__ (line 248) | def __init__(self, config): method forward (line 269) | def forward( class BigBirdSelfAttention (line 311) | class BigBirdSelfAttention(nn.Module): method __init__ (line 312) | def __init__(self, config): method transpose_for_scores (line 331) | def transpose_for_scores(self, x): method forward (line 336) | def forward( class BigBirdBlockSparseAttention (line 415) | class BigBirdBlockSparseAttention(nn.Module): method __init__ (line 416) | def __init__(self, config, seed=None): method transpose_for_scores (line 439) | def transpose_for_scores(self, x): method forward (line 444) | def forward( method torch_bmm_nd (line 499) | def torch_bmm_nd(inp_1, inp_2, ndim=None): method torch_bmm_nd_transpose (line 507) | def torch_bmm_nd_transpose(inp_1, inp_2, ndim=None): method bigbird_block_sparse_attention (line 514) | def bigbird_block_sparse_attention( method torch_gather_b2 (line 963) | def torch_gather_b2(params, indices): method _create_rand_mask_from_inputs (line 986) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 1023) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 1055) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 1113) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1253) | def _get_single_block_row_attention( class BigBirdSelfOutput (line 1310) | class BigBirdSelfOutput(nn.Module): method __init__ (line 1311) | def __init__(self, config): method forward (line 1317) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BigBirdAttention (line 1324) | class BigBirdAttention(nn.Module): method __init__ (line 1325) | def __init__(self, config, seed=None): method set_attention_type (line 1342) | def set_attention_type(self, value: str): method forward (line 1367) | def forward( class BigBirdIntermediate (line 1413) | class BigBirdIntermediate(nn.Module): method __init__ (line 1414) | def __init__(self, config): method forward (line 1422) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdOutput (line 1429) | class BigBirdOutput(nn.Module): method __init__ (line 1430) | def __init__(self, config): method forward (line 1436) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BigBirdLayer (line 1443) | class BigBirdLayer(nn.Module): method __init__ (line 1444) | def __init__(self, config, seed=None): method set_attention_type (line 1460) | def set_attention_type(self, value: str): method forward (line 1474) | def forward( method feed_forward_chunk (line 1551) | def feed_forward_chunk(self, attention_output): class BigBirdEncoder (line 1557) | class BigBirdEncoder(nn.Module): method __init__ (line 1558) | def __init__(self, config): method set_attention_type (line 1568) | def set_attention_type(self, value: str): method forward (line 1580) | def forward( class BigBirdPredictionHeadTransform (line 1685) | class BigBirdPredictionHeadTransform(nn.Module): method __init__ (line 1686) | def __init__(self, config): method forward (line 1695) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdLMPredictionHead (line 1703) | class BigBirdLMPredictionHead(nn.Module): method __init__ (line 1704) | def __init__(self, config): method forward (line 1717) | def forward(self, hidden_states): class BigBirdOnlyMLMHead (line 1724) | class BigBirdOnlyMLMHead(nn.Module): method __init__ (line 1725) | def __init__(self, config): method forward (line 1729) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BigBirdOnlyNSPHead (line 1735) | class BigBirdOnlyNSPHead(nn.Module): method __init__ (line 1736) | def __init__(self, config): method forward (line 1740) | def forward(self, pooled_output): class BigBirdPreTrainingHeads (line 1746) | class BigBirdPreTrainingHeads(nn.Module): method __init__ (line 1747) | def __init__(self, config): method forward (line 1752) | def forward(self, sequence_output, pooled_output): class BigBirdPreTrainedModel (line 1758) | class BigBirdPreTrainedModel(PreTrainedModel): method _init_weights (line 1770) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1786) | def _set_gradient_checkpointing(self, module, value=False): class BigBirdForPreTrainingOutput (line 1853) | class BigBirdForPreTrainingOutput(ModelOutput): class BigBirdForQuestionAnsweringModelOutput (line 1887) | class BigBirdForQuestionAnsweringModelOutput(ModelOutput): class BigBirdModel (line 1925) | class BigBirdModel(BigBirdPreTrainedModel): method __init__ (line 1938) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1965) | def get_input_embeddings(self): method set_input_embeddings (line 1968) | def set_input_embeddings(self, value): method set_attention_type (line 1971) | def set_attention_type(self, value: str): method forward (line 1988) | def forward( method create_masks_for_block_sparse_attn (line 2182) | def create_masks_for_block_sparse_attn(attention_mask: torch.Tensor, b... method _pad_to_block_size (line 2219) | def _pad_to_block_size( class BigBirdForPreTraining (line 2263) | class BigBirdForPreTraining(BigBirdPreTrainedModel): method __init__ (line 2266) | def __init__(self, config): method get_output_embeddings (line 2275) | def get_output_embeddings(self): method set_output_embeddings (line 2278) | def set_output_embeddings(self, new_embeddings): method forward (line 2283) | def forward( class BigBirdForMaskedLM (line 2369) | class BigBirdForMaskedLM(BigBirdPreTrainedModel): method __init__ (line 2372) | def __init__(self, config): method get_output_embeddings (line 2387) | def get_output_embeddings(self): method set_output_embeddings (line 2390) | def set_output_embeddings(self, new_embeddings): method forward (line 2395) | def forward( method prepare_inputs_for_generation (line 2494) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BigBirdForCausalLM (line 2513) | class BigBirdForCausalLM(BigBirdPreTrainedModel): method __init__ (line 2521) | def __init__(self, config): method get_output_embeddings (line 2533) | def get_output_embeddings(self): method set_output_embeddings (line 2536) | def set_output_embeddings(self, new_embeddings): method forward (line 2545) | def forward( method prepare_inputs_for_generation (line 2627) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 2640) | def _reorder_cache(self, past_key_values, beam_idx): class BigBirdClassificationHead (line 2649) | class BigBirdClassificationHead(nn.Module): method __init__ (line 2652) | def __init__(self, config): method forward (line 2663) | def forward(self, features, **kwargs): class BigBirdForSequenceClassification (line 2680) | class BigBirdForSequenceClassification(BigBirdPreTrainedModel): method __init__ (line 2681) | def __init__(self, config): method forward (line 2693) | def forward( class BigBirdForMultipleChoice (line 2808) | class BigBirdForMultipleChoice(BigBirdPreTrainedModel): method __init__ (line 2809) | def __init__(self, config): method forward (line 2827) | def forward( class BigBirdForTokenClassification (line 2901) | class BigBirdForTokenClassification(BigBirdPreTrainedModel): method __init__ (line 2902) | def __init__(self, config): method forward (line 2922) | def forward( class BigBirdForQuestionAnsweringHead (line 2975) | class BigBirdForQuestionAnsweringHead(nn.Module): method __init__ (line 2978) | def __init__(self, config): method forward (line 2985) | def forward(self, encoder_output): class BigBirdForQuestionAnswering (line 3000) | class BigBirdForQuestionAnswering(BigBirdPreTrainedModel): method __init__ (line 3001) | def __init__(self, config, add_pooling_layer=False): method forward (line 3016) | def forward( method prepare_question_mask (line 3153) | def prepare_question_mask(q_lengths: torch.Tensor, maxlen: int): FILE: transformers/models/big_bird/modeling_flax_big_bird.py class FlaxBigBirdForPreTrainingOutput (line 59) | class FlaxBigBirdForPreTrainingOutput(ModelOutput): class FlaxBigBirdForQuestionAnsweringModelOutput (line 89) | class FlaxBigBirdForQuestionAnsweringModelOutput(ModelOutput): class FlaxBigBirdEmbeddings (line 193) | class FlaxBigBirdEmbeddings(nn.Module): method setup (line 200) | def setup(self): method __call__ (line 222) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxBigBirdSelfAttention (line 241) | class FlaxBigBirdSelfAttention(nn.Module): method setup (line 246) | def setup(self): method _split_heads (line 275) | def _split_heads(self, hidden_states): method _merge_heads (line 278) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 283) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 314) | def __call__( class FlaxBigBirdBlockSparseAttention (line 412) | class FlaxBigBirdBlockSparseAttention(nn.Module): method setup (line 417) | def setup(self): method transpose_for_scores (line 438) | def transpose_for_scores(x, n_heads, head_size): method __call__ (line 443) | def __call__( method create_masks_for_block_sparse_attn (line 487) | def create_masks_for_block_sparse_attn(attention_mask, block_size: int): method bigbird_block_sparse_attention (line 524) | def bigbird_block_sparse_attention( method jax_gather (line 869) | def jax_gather(params, indices, batch_dims=2): method _create_rand_mask_from_inputs (line 886) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 924) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 957) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 1030) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1183) | def _get_single_block_row_attention( class FlaxBigBirdSelfOutput (line 1242) | class FlaxBigBirdSelfOutput(nn.Module): method setup (line 1246) | def setup(self): method __call__ (line 1255) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxBigBirdAttention (line 1262) | class FlaxBigBirdAttention(nn.Module): method setup (line 1268) | def setup(self): method __call__ (line 1281) | def __call__( class FlaxBigBirdIntermediate (line 1323) | class FlaxBigBirdIntermediate(nn.Module): method setup (line 1327) | def setup(self): method __call__ (line 1335) | def __call__(self, hidden_states): class FlaxBigBirdOutput (line 1342) | class FlaxBigBirdOutput(nn.Module): method setup (line 1346) | def setup(self): method __call__ (line 1355) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxBigBirdLayer (line 1362) | class FlaxBigBirdLayer(nn.Module): method setup (line 1367) | def setup(self): method __call__ (line 1377) | def __call__( class FlaxBigBirdLayerCollection (line 1423) | class FlaxBigBirdLayerCollection(nn.Module): method setup (line 1428) | def setup(self): method __call__ (line 1442) | def __call__( class FlaxBigBirdEncoder (line 1507) | class FlaxBigBirdEncoder(nn.Module): method setup (line 1512) | def setup(self): method __call__ (line 1519) | def __call__( class FlaxBigBirdPredictionHeadTransform (line 1547) | class FlaxBigBirdPredictionHeadTransform(nn.Module): method setup (line 1551) | def setup(self): method __call__ (line 1556) | def __call__(self, hidden_states): class FlaxBigBirdLMPredictionHead (line 1563) | class FlaxBigBirdLMPredictionHead(nn.Module): method setup (line 1568) | def setup(self): method __call__ (line 1573) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBigBirdOnlyMLMHead (line 1587) | class FlaxBigBirdOnlyMLMHead(nn.Module): method setup (line 1591) | def setup(self): method __call__ (line 1594) | def __call__(self, hidden_states, shared_embedding=None): class FlaxBigBirdPreTrainingHeads (line 1599) | class FlaxBigBirdPreTrainingHeads(nn.Module): method setup (line 1603) | def setup(self): method __call__ (line 1607) | def __call__(self, hidden_states, pooled_output, shared_embedding=None): class FlaxBigBirdPreTrainedModel (line 1613) | class FlaxBigBirdPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1623) | def __init__( method enable_gradient_checkpointing (line 1642) | def enable_gradient_checkpointing(self): method init_weights (line 1649) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 1698) | def init_cache(self, batch_size, max_length): method __call__ (line 1718) | def __call__( class FlaxBigBirdModule (line 1819) | class FlaxBigBirdModule(nn.Module): method setup (line 1825) | def setup(self): method __call__ (line 1836) | def __call__( class FlaxBigBirdModel (line 1890) | class FlaxBigBirdModel(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForPreTrainingModule (line 1898) | class FlaxBigBirdForPreTrainingModule(nn.Module): method setup (line 1903) | def setup(self): method __call__ (line 1911) | def __call__( class FlaxBigBirdForPreTraining (line 1967) | class FlaxBigBirdForPreTraining(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForMaskedLMModule (line 2000) | class FlaxBigBirdForMaskedLMModule(nn.Module): method setup (line 2005) | def setup(self): method __call__ (line 2014) | def __call__( class FlaxBigBirdForMaskedLM (line 2060) | class FlaxBigBirdForMaskedLM(FlaxBigBirdPreTrainedModel): class FlaxBigBirdClassificationHead (line 2067) | class FlaxBigBirdClassificationHead(nn.Module): method setup (line 2073) | def setup(self): method __call__ (line 2083) | def __call__(self, features, deterministic=True): class FlaxBigBirdForSequenceClassificationModule (line 2093) | class FlaxBigBirdForSequenceClassificationModule(nn.Module): method setup (line 2098) | def setup(self): method __call__ (line 2104) | def __call__( class FlaxBigBirdForSequenceClassification (line 2150) | class FlaxBigBirdForSequenceClassification(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForMultipleChoiceModule (line 2163) | class FlaxBigBirdForMultipleChoiceModule(nn.Module): method setup (line 2168) | def setup(self): method __call__ (line 2177) | def __call__( class FlaxBigBirdForMultipleChoice (line 2231) | class FlaxBigBirdForMultipleChoice(FlaxBigBirdPreTrainedModel): method __init__ (line 2234) | def __init__( class FlaxBigBirdForTokenClassificationModule (line 2262) | class FlaxBigBirdForTokenClassificationModule(nn.Module): method setup (line 2267) | def setup(self): method __call__ (line 2282) | def __call__( class FlaxBigBirdForTokenClassification (line 2329) | class FlaxBigBirdForTokenClassification(FlaxBigBirdPreTrainedModel): class FlaxBigBirdForQuestionAnsweringHead (line 2341) | class FlaxBigBirdForQuestionAnsweringHead(nn.Module): method setup (line 2345) | def setup(self): method __call__ (line 2351) | def __call__(self, encoder_output, deterministic=True): class FlaxBigBirdForQuestionAnsweringModule (line 2359) | class FlaxBigBirdForQuestionAnsweringModule(nn.Module): method setup (line 2365) | def setup(self): method __call__ (line 2375) | def __call__( class FlaxBigBirdForQuestionAnswering (line 2432) | class FlaxBigBirdForQuestionAnswering(FlaxBigBirdPreTrainedModel): method __call__ (line 2436) | def __call__( method prepare_question_mask (line 2511) | def prepare_question_mask(q_lengths, maxlen: int): class FlaxBigBirdForCausalLMModule (line 2526) | class FlaxBigBirdForCausalLMModule(nn.Module): method setup (line 2531) | def setup(self): method __call__ (line 2540) | def __call__( class FlaxBigBirdForCausalLM (line 2599) | class FlaxBigBirdForCausalLM(FlaxBigBirdPreTrainedModel): method prepare_inputs_for_generation (line 2602) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 2623) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/big_bird/tokenization_big_bird.py class BigBirdTokenizer (line 52) | class BigBirdTokenizer(PreTrainedTokenizer): method __init__ (line 105) | def __init__( method vocab_size (line 148) | def vocab_size(self): method get_vocab (line 151) | def get_vocab(self): method __getstate__ (line 156) | def __getstate__(self): method __setstate__ (line 161) | def __setstate__(self, d): method _tokenize (line 171) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 175) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 179) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 184) | def convert_tokens_to_string(self, tokens): method _decode (line 203) | def _decode( method save_vocabulary (line 251) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 268) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 293) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 320) | def create_token_type_ids_from_sequences( FILE: transformers/models/big_bird/tokenization_big_bird_fast.py class BigBirdTokenizerFast (line 68) | class BigBirdTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 116) | def __init__( method build_inputs_with_special_tokens (line 155) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 180) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 211) | def create_token_type_ids_from_sequences( method save_vocabulary (line 241) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/bigbird_pegasus/configuration_bigbird_pegasus.py class BigBirdPegasusConfig (line 43) | class BigBirdPegasusConfig(PretrainedConfig): method __init__ (line 131) | def __init__( class BigBirdPegasusOnnxConfig (line 201) | class BigBirdPegasusOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 203) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 247) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 259) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 327) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 365) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 391) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 415) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: transformers/models/bigbird_pegasus/convert_bigbird_pegasus_tf_to_pytorch.py function rename_state_dict_key (line 83) | def rename_state_dict_key(k, patterns): function convert_bigbird_pegasus (line 89) | def convert_bigbird_pegasus(tf_weights: dict, config_update: dict) -> Bi... function get_tf_weights_as_numpy (line 145) | def get_tf_weights_as_numpy(path) -> Dict: function convert_bigbird_pegasus_ckpt_to_pytorch (line 158) | def convert_bigbird_pegasus_ckpt_to_pytorch(ckpt_path: str, save_dir: st... FILE: transformers/models/bigbird_pegasus/modeling_bigbird_pegasus.py function shift_tokens_right (line 65) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 82) | def _make_causal_mask( function _expand_mask (line 99) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BigBirdPegasusLearnedPositionalEmbedding (line 113) | class BigBirdPegasusLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 118) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 121) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BigBirdPegasusSelfAttention (line 131) | class BigBirdPegasusSelfAttention(nn.Module): method __init__ (line 132) | def __init__(self, config): method transpose_for_scores (line 151) | def transpose_for_scores(self, x): method forward (line 156) | def forward( class BigBirdPegasusBlockSparseAttention (line 236) | class BigBirdPegasusBlockSparseAttention(nn.Module): method __init__ (line 237) | def __init__(self, config, seed=None): method transpose_for_scores (line 260) | def transpose_for_scores(self, x): method forward (line 265) | def forward( method torch_bmm_nd (line 320) | def torch_bmm_nd(inp_1, inp_2, ndim=None): method torch_bmm_nd_transpose (line 328) | def torch_bmm_nd_transpose(inp_1, inp_2, ndim=None): method bigbird_block_sparse_attention (line 335) | def bigbird_block_sparse_attention( method torch_gather_b2 (line 784) | def torch_gather_b2(params, indices): method _create_rand_mask_from_inputs (line 807) | def _create_rand_mask_from_inputs( method _get_rand_attn_plan (line 844) | def _get_rand_attn_plan(from_seq_length, from_block_size, num_rand_blo... method _bigbird_block_rand_mask (line 876) | def _bigbird_block_rand_mask( method _bigbird_block_rand_mask_with_head (line 934) | def _bigbird_block_rand_mask_with_head( method _get_single_block_row_attention (line 1074) | def _get_single_block_row_attention( class BigBirdPegasusEncoderAttention (line 1130) | class BigBirdPegasusEncoderAttention(nn.Module): method __init__ (line 1131) | def __init__(self, config, seed=None): method set_attention_type (line 1149) | def set_attention_type(self, value: str): method forward (line 1175) | def forward( class BigBirdPegasusDecoderAttention (line 1210) | class BigBirdPegasusDecoderAttention(nn.Module): method __init__ (line 1213) | def __init__( method _shape (line 1240) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 1243) | def forward( class BigBirdPegasusEncoderLayer (line 1364) | class BigBirdPegasusEncoderLayer(nn.Module): method __init__ (line 1365) | def __init__(self, config: BigBirdPegasusConfig, seed=None): method forward (line 1378) | def forward( method set_attention_type (line 1439) | def set_attention_type(self, value: str): class BigBirdPegasusDecoderLayer (line 1451) | class BigBirdPegasusDecoderLayer(nn.Module): method __init__ (line 1452) | def __init__(self, config: BigBirdPegasusConfig): method forward (line 1480) | def forward( class BigBirdPegasusClassificationHead (line 1571) | class BigBirdPegasusClassificationHead(nn.Module): method __init__ (line 1574) | def __init__( method forward (line 1586) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BigBirdPegasusPreTrainedModel (line 1595) | class BigBirdPegasusPreTrainedModel(PreTrainedModel): method _init_weights (line 1602) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1613) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 1618) | def dummy_inputs(self): class BigBirdPegasusEncoder (line 1770) | class BigBirdPegasusEncoder(BigBirdPegasusPreTrainedModel): method __init__ (line 1780) | def __init__(self, config: BigBirdPegasusConfig, embed_tokens: Optiona... method forward (line 1810) | def forward( method set_attention_type (line 1995) | def set_attention_type(self, value: str): method create_masks_for_block_sparse_attn (line 2008) | def create_masks_for_block_sparse_attn(attention_mask: torch.Tensor, b... method _pad_to_block_size (line 2045) | def _pad_to_block_size(self, hidden_states: torch.Tensor, attention_ma... class BigBirdPegasusDecoder (line 2070) | class BigBirdPegasusDecoder(BigBirdPegasusPreTrainedModel): method __init__ (line 2079) | def __init__(self, config: BigBirdPegasusConfig, embed_tokens: Optiona... method get_input_embeddings (line 2103) | def get_input_embeddings(self): method set_input_embeddings (line 2106) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 2110) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 2133) | def forward( class BigBirdPegasusModel (line 2355) | class BigBirdPegasusModel(BigBirdPegasusPreTrainedModel): method __init__ (line 2358) | def __init__(self, config: BigBirdPegasusConfig): method get_input_embeddings (line 2370) | def get_input_embeddings(self): method set_input_embeddings (line 2373) | def set_input_embeddings(self, value): method get_encoder (line 2378) | def get_encoder(self): method get_decoder (line 2381) | def get_decoder(self): method forward (line 2392) | def forward( class BigBirdPegasusForConditionalGeneration (line 2485) | class BigBirdPegasusForConditionalGeneration(BigBirdPegasusPreTrainedMod... method __init__ (line 2494) | def __init__(self, config: BigBirdPegasusConfig): method get_encoder (line 2503) | def get_encoder(self): method get_decoder (line 2506) | def get_decoder(self): method resize_token_embeddings (line 2509) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 2514) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 2523) | def get_output_embeddings(self): method set_output_embeddings (line 2526) | def set_output_embeddings(self, new_embeddings): method forward (line 2532) | def forward( method prepare_inputs_for_generation (line 2613) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2643) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2647) | def _reorder_cache(past_key_values, beam_idx): class BigBirdPegasusForSequenceClassification (line 2664) | class BigBirdPegasusForSequenceClassification(BigBirdPegasusPreTrainedMo... method __init__ (line 2667) | def __init__(self, config: BigBirdPegasusConfig, **kwargs): method forward (line 2687) | def forward( class BigBirdPegasusForQuestionAnswering (line 2793) | class BigBirdPegasusForQuestionAnswering(BigBirdPegasusPreTrainedModel): method __init__ (line 2796) | def __init__(self, config): method forward (line 2815) | def forward( class BigBirdPegasusDecoderWrapper (line 2911) | class BigBirdPegasusDecoderWrapper(BigBirdPegasusPreTrainedModel): method __init__ (line 2917) | def __init__(self, config): method forward (line 2921) | def forward(self, *args, **kwargs): class BigBirdPegasusForCausalLM (line 2925) | class BigBirdPegasusForCausalLM(BigBirdPegasusPreTrainedModel): method __init__ (line 2928) | def __init__(self, config): method get_input_embeddings (line 2940) | def get_input_embeddings(self): method set_input_embeddings (line 2943) | def set_input_embeddings(self, value): method get_output_embeddings (line 2946) | def get_output_embeddings(self): method set_output_embeddings (line 2949) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2952) | def set_decoder(self, decoder): method get_decoder (line 2955) | def get_decoder(self): method forward (line 2959) | def forward( method prepare_inputs_for_generation (line 3101) | def prepare_inputs_for_generation( method _reorder_cache (line 3119) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/biogpt/configuration_biogpt.py class BioGptConfig (line 29) | class BioGptConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: transformers/models/biogpt/convert_biogpt_original_pytorch_checkpoint_to_pytorch.py class Dictionary (line 37) | class Dictionary: method __init__ (line 40) | def __init__( method __eq__ (line 62) | def __eq__(self, other): method __getitem__ (line 65) | def __getitem__(self, idx): method __len__ (line 70) | def __len__(self): method __contains__ (line 74) | def __contains__(self, sym): method load (line 78) | def load(cls, f): method add_symbol (line 91) | def add_symbol(self, word, n=1, overwrite=False): method _load_meta (line 104) | def _load_meta(self, lines): method add_from_file (line 107) | def add_from_file(self, f): function rewrite_dict_keys (line 147) | def rewrite_dict_keys(d): function convert_biogpt_checkpoint_to_pytorch (line 159) | def convert_biogpt_checkpoint_to_pytorch(biogpt_checkpoint_path, pytorch... FILE: transformers/models/biogpt/modeling_biogpt.py function _make_causal_mask (line 58) | def _make_causal_mask( function _expand_mask (line 76) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BioGptLearnedPositionalEmbedding (line 91) | class BioGptLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 96) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 102) | def forward(self, attention_mask: torch.LongTensor, past_key_values_le... class BioGptAttention (line 116) | class BioGptAttention(nn.Module): method __init__ (line 119) | def __init__( method _shape (line 146) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 149) | def forward( class BioGptDecoderLayer (line 270) | class BioGptDecoderLayer(nn.Module): method __init__ (line 271) | def __init__(self, config: BioGptConfig): method forward (line 291) | def forward( class BioGptPreTrainedModel (line 354) | class BioGptPreTrainedModel(PreTrainedModel): method _init_weights (line 364) | def _init_weights(self, module): method _set_gradient_checkpointing (line 380) | def _set_gradient_checkpointing(self, module, value=False): class BioGptModel (line 454) | class BioGptModel(BioGptPreTrainedModel): method __init__ (line 455) | def __init__(self, config: BioGptConfig): method get_input_embeddings (line 474) | def get_input_embeddings(self): method set_input_embeddings (line 477) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 481) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 510) | def forward( class BioGptForCausalLM (line 648) | class BioGptForCausalLM(BioGptPreTrainedModel): method __init__ (line 651) | def __init__(self, config): method get_output_embeddings (line 660) | def get_output_embeddings(self): method set_output_embeddings (line 663) | def set_output_embeddings(self, new_embeddings): method forward (line 672) | def forward( method prepare_inputs_for_generation (line 729) | def prepare_inputs_for_generation( method _reorder_cache (line 752) | def _reorder_cache(past_key_values, beam_idx): class BioGptForTokenClassification (line 766) | class BioGptForTokenClassification(BioGptPreTrainedModel): method __init__ (line 767) | def __init__(self, config): method forward (line 787) | def forward( class BioGptForSequenceClassification (line 866) | class BioGptForSequenceClassification(BioGptPreTrainedModel): method __init__ (line 867) | def __init__(self, config: BioGptConfig): method forward (line 882) | def forward( method get_input_embeddings (line 970) | def get_input_embeddings(self): method set_input_embeddings (line 973) | def set_input_embeddings(self, value): FILE: transformers/models/biogpt/tokenization_biogpt.py function get_pairs (line 43) | def get_pairs(word): class BioGptTokenizer (line 56) | class BioGptTokenizer(PreTrainedTokenizer): method __init__ (line 104) | def __init__( method vocab_size (line 149) | def vocab_size(self): method get_vocab (line 153) | def get_vocab(self): method moses_tokenize (line 156) | def moses_tokenize(self, text, lang): method moses_detokenize (line 164) | def moses_detokenize(self, tokens, lang): method bpe (line 170) | def bpe(self, token): method _tokenize (line 214) | def _tokenize(self, text, bypass_tokenizer=False): method _convert_token_to_id (line 228) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 232) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 236) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 245) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 269) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 296) | def create_token_type_ids_from_sequences( method save_vocabulary (line 326) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 354) | def __getstate__(self): method __setstate__ (line 359) | def __setstate__(self, d): FILE: transformers/models/bit/configuration_bit.py class BitConfig (line 29) | class BitConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 92) | def __init__( FILE: transformers/models/bit/convert_bit_to_pytorch.py function get_config (line 39) | def get_config(model_name): function rename_key (line 61) | def rename_key(name): function prepare_img (line 77) | def prepare_img(): function convert_bit_checkpoint (line 84) | def convert_bit_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: transformers/models/bit/image_processing_bit.py class BitImageProcessor (line 51) | class BitImageProcessor(BaseImageProcessor): method __init__ (line 91) | def __init__( method resize (line 124) | def resize( method center_crop (line 152) | def center_crop( method rescale (line 176) | def rescale( method normalize (line 196) | def normalize( method preprocess (line 219) | def preprocess( FILE: transformers/models/bit/modeling_bit.py function get_padding_value (line 65) | def get_padding_value(padding=None, kernel_size=7, stride=1, dilation=1)... class WeightStandardizedConv2d (line 106) | class WeightStandardizedConv2d(nn.Conv2d): method __init__ (line 113) | def __init__( method forward (line 142) | def forward(self, hidden_state): class BitGroupNormActivation (line 154) | class BitGroupNormActivation(nn.GroupNorm): method __init__ (line 159) | def __init__(self, config, num_channels, eps=1e-5, affine=True, apply_... method forward (line 166) | def forward(self, hidden_state): class DynamicPad2d (line 172) | class DynamicPad2d(nn.Module): method __init__ (line 178) | def __init__(self, kernel_size, stride, dilation, value=0): method __call__ (line 200) | def __call__(self, input): class BitMaxPool2d (line 223) | class BitMaxPool2d(nn.MaxPool2d): method __init__ (line 226) | def __init__( method forward (line 245) | def forward(self, hidden_states): class BitEmbeddings (line 252) | class BitEmbeddings(nn.Module): method __init__ (line 257) | def __init__(self, config: BitConfig): method forward (line 284) | def forward(self, pixel_values: Tensor) -> Tensor: function drop_path (line 303) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class BitDropPath (line 324) | class BitDropPath(nn.Module): method __init__ (line 327) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 331) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 334) | def extra_repr(self) -> str: function make_div (line 338) | def make_div(value, divisor=8): class BitPreActivationBottleneckLayer (line 346) | class BitPreActivationBottleneckLayer(nn.Module): method __init__ (line 354) | def __init__( method forward (line 398) | def forward(self, hidden_states): class BitBottleneckLayer (line 414) | class BitBottleneckLayer(nn.Module): method __init__ (line 417) | def __init__( method forward (line 466) | def forward(self, hidden_states): class BitDownsampleConv (line 487) | class BitDownsampleConv(nn.Module): method __init__ (line 488) | def __init__( method forward (line 506) | def forward(self, x): class BitStage (line 510) | class BitStage(nn.Module): method __init__ (line 515) | def __init__( method _get_updated_hyperparameters (line 561) | def _get_updated_hyperparameters(self, layer_idx, stride, layer_dropout): method forward (line 577) | def forward(self, input: Tensor) -> Tensor: class BitEncoder (line 584) | class BitEncoder(nn.Module): method __init__ (line 585) | def __init__(self, config: BitConfig): method _get_updated_hyperparameters (line 623) | def _get_updated_hyperparameters(self, stage_idx, current_stride, curr... method forward (line 631) | def forward( class BitPreTrainedModel (line 654) | class BitPreTrainedModel(PreTrainedModel): method _init_weights (line 665) | def _init_weights(self, module): method _set_gradient_checkpointing (line 672) | def _set_gradient_checkpointing(self, module, value=False): class BitModel (line 706) | class BitModel(BitPreTrainedModel): method __init__ (line 707) | def __init__(self, config): method forward (line 732) | def forward( class BitForImageClassification (line 769) | class BitForImageClassification(BitPreTrainedModel): method __init__ (line 770) | def __init__(self, config): method forward (line 789) | def forward( class BitBackbone (line 845) | class BitBackbone(BitPreTrainedModel, BackboneMixin): method __init__ (line 846) | def __init__(self, config): method forward (line 858) | def forward( FILE: transformers/models/blenderbot/configuration_blenderbot.py class BlenderbotConfig (line 36) | class BlenderbotConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class BlenderbotOnnxConfig (line 172) | class BlenderbotOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 174) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 216) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 228) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 285) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 322) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 349) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 374) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method fill_with_past_key_values_ (line 382) | def fill_with_past_key_values_(self, inputs_or_outputs: Mapping[str, M... FILE: transformers/models/blenderbot/convert_blenderbot_original_pytorch_checkpoint_to_pytorch.py function rename_state_dict_key (line 42) | def rename_state_dict_key(k): function rename_layernorm_keys (line 60) | def rename_layernorm_keys(sd): function convert_parlai_checkpoint (line 78) | def convert_parlai_checkpoint(checkpoint_path, pytorch_dump_folder_path,... FILE: transformers/models/blenderbot/modeling_blenderbot.py function shift_tokens_right (line 63) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 80) | def _make_causal_mask( function _expand_mask (line 98) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BlenderbotLearnedPositionalEmbedding (line 112) | class BlenderbotLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 117) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 120) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BlenderbotAttention (line 130) | class BlenderbotAttention(nn.Module): method __init__ (line 133) | def __init__( method _shape (line 160) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 163) | def forward( class BlenderbotEncoderLayer (line 285) | class BlenderbotEncoderLayer(nn.Module): method __init__ (line 286) | def __init__(self, config: BlenderbotConfig): method forward (line 302) | def forward( class BlenderbotDecoderLayer (line 354) | class BlenderbotDecoderLayer(nn.Module): method __init__ (line 355) | def __init__(self, config: BlenderbotConfig): method forward (line 381) | def forward( class BlenderbotPreTrainedModel (line 471) | class BlenderbotPreTrainedModel(PreTrainedModel): method _init_weights (line 476) | def _init_weights(self, module): method _set_gradient_checkpointing (line 487) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 492) | def dummy_inputs(self): class BlenderbotEncoder (line 643) | class BlenderbotEncoder(BlenderbotPreTrainedModel): method __init__ (line 653) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[nn... method forward (line 680) | def forward( class BlenderbotDecoder (line 814) | class BlenderbotDecoder(BlenderbotPreTrainedModel): method __init__ (line 823) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[nn... method get_input_embeddings (line 847) | def get_input_embeddings(self): method set_input_embeddings (line 850) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 854) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 877) | def forward( class BlenderbotModel (line 1099) | class BlenderbotModel(BlenderbotPreTrainedModel): method __init__ (line 1102) | def __init__(self, config: BlenderbotConfig): method from_pretrained (line 1115) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method get_input_embeddings (line 1127) | def get_input_embeddings(self): method set_input_embeddings (line 1130) | def set_input_embeddings(self, value): method get_encoder (line 1135) | def get_encoder(self): method get_decoder (line 1138) | def get_decoder(self): method forward (line 1143) | def forward( class BlenderbotForConditionalGeneration (line 1239) | class BlenderbotForConditionalGeneration(BlenderbotPreTrainedModel): method __init__ (line 1250) | def __init__(self, config: BlenderbotConfig): method from_pretrained (line 1260) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method get_encoder (line 1274) | def get_encoder(self): method get_decoder (line 1277) | def get_decoder(self): method resize_token_embeddings (line 1280) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1285) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1294) | def get_output_embeddings(self): method set_output_embeddings (line 1297) | def set_output_embeddings(self, new_embeddings): method forward (line 1303) | def forward( method prepare_inputs_for_generation (line 1381) | def prepare_inputs_for_generation( method _reorder_cache (line 1410) | def _reorder_cache(past_key_values, beam_idx): class BlenderbotDecoderWrapper (line 1421) | class BlenderbotDecoderWrapper(BlenderbotPreTrainedModel): method __init__ (line 1427) | def __init__(self, config): method forward (line 1431) | def forward(self, *args, **kwargs): class BlenderbotForCausalLM (line 1436) | class BlenderbotForCausalLM(BlenderbotPreTrainedModel): method __init__ (line 1439) | def __init__(self, config): method get_input_embeddings (line 1451) | def get_input_embeddings(self): method set_input_embeddings (line 1454) | def set_input_embeddings(self, value): method get_output_embeddings (line 1457) | def get_output_embeddings(self): method set_output_embeddings (line 1460) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1463) | def set_decoder(self, decoder): method get_decoder (line 1466) | def get_decoder(self): method forward (line 1470) | def forward( method prepare_inputs_for_generation (line 1616) | def prepare_inputs_for_generation( method _reorder_cache (line 1634) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/blenderbot/modeling_flax_blenderbot.py function shift_tokens_right (line 208) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... class FlaxBlenderbotAttention (line 221) | class FlaxBlenderbotAttention(nn.Module): method setup (line 230) | def setup(self) -> None: method _split_heads (line 256) | def _split_heads(self, hidden_states): method _merge_heads (line 259) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 263) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 294) | def __call__( class FlaxBlenderbotEncoderLayer (line 389) | class FlaxBlenderbotEncoderLayer(nn.Module): method setup (line 393) | def setup(self) -> None: method __call__ (line 416) | def __call__( class FlaxBlenderbotEncoderLayerCollection (line 446) | class FlaxBlenderbotEncoderLayerCollection(nn.Module): method setup (line 450) | def setup(self): method __call__ (line 457) | def __call__( class FlaxBlenderbotDecoderLayer (line 501) | class FlaxBlenderbotDecoderLayer(nn.Module): method setup (line 505) | def setup(self) -> None: method __call__ (line 538) | def __call__( class FlaxBlenderbotDecoderLayerCollection (line 590) | class FlaxBlenderbotDecoderLayerCollection(nn.Module): method setup (line 594) | def setup(self): method __call__ (line 601) | def __call__( class FlaxBlenderbotEncoder (line 660) | class FlaxBlenderbotEncoder(nn.Module): method setup (line 665) | def setup(self): method __call__ (line 681) | def __call__( class FlaxBlenderbotDecoder (line 729) | class FlaxBlenderbotDecoder(nn.Module): method setup (line 734) | def setup(self): method __call__ (line 751) | def __call__( class FlaxBlenderbotModule (line 809) | class FlaxBlenderbotModule(nn.Module): method setup (line 813) | def setup(self): method _get_encoder_module (line 824) | def _get_encoder_module(self): method _get_decoder_module (line 827) | def _get_decoder_module(self): method __call__ (line 830) | def __call__( class FlaxBlenderbotPreTrainedModel (line 879) | class FlaxBlenderbotPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 884) | def __init__( method init_weights (line 896) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 932) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 975) | def encode( method decode (line 1040) | def decode( method __call__ (line 1153) | def __call__( class FlaxBlenderbotModel (line 1217) | class FlaxBlenderbotModel(FlaxBlenderbotPreTrainedModel): class FlaxBlenderbotForConditionalGenerationModule (line 1227) | class FlaxBlenderbotForConditionalGenerationModule(nn.Module): method setup (line 1232) | def setup(self): method _get_encoder_module (line 1242) | def _get_encoder_module(self): method _get_decoder_module (line 1245) | def _get_decoder_module(self): method __call__ (line 1248) | def __call__( class FlaxBlenderbotForConditionalGeneration (line 1302) | class FlaxBlenderbotForConditionalGeneration(FlaxBlenderbotPreTrainedMod... method decode (line 1308) | def decode( method prepare_inputs_for_generation (line 1443) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1474) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/blenderbot/modeling_tf_blenderbot.py function shift_tokens_right (line 65) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 90) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 108) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFBlenderbotLearnedPositionalEmbedding (line 121) | class TFBlenderbotLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 126) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 129) | def call( class TFBlenderbotAttention (line 142) | class TFBlenderbotAttention(tf.keras.layers.Layer): method __init__ (line 145) | def __init__( method _shape (line 173) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 176) | def call( class TFBlenderbotEncoderLayer (line 296) | class TFBlenderbotEncoderLayer(tf.keras.layers.Layer): method __init__ (line 297) | def __init__(self, config: BlenderbotConfig, **kwargs): method call (line 311) | def call( class TFBlenderbotDecoderLayer (line 353) | class TFBlenderbotDecoderLayer(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: BlenderbotConfig, **kwargs): method call (line 381) | def call( class TFBlenderbotPreTrainedModel (line 462) | class TFBlenderbotPreTrainedModel(TFPreTrainedModel): class TFBlenderbotEncoder (line 616) | class TFBlenderbotEncoder(tf.keras.layers.Layer): method __init__ (line 626) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[tf... method get_embed_tokens (line 644) | def get_embed_tokens(self): method set_embed_tokens (line 647) | def set_embed_tokens(self, embed_tokens): method call (line 651) | def call( class TFBlenderbotDecoder (line 781) | class TFBlenderbotDecoder(tf.keras.layers.Layer): method __init__ (line 791) | def __init__(self, config: BlenderbotConfig, embed_tokens: Optional[tf... method get_embed_tokens (line 808) | def get_embed_tokens(self): method set_embed_tokens (line 811) | def set_embed_tokens(self, embed_tokens): method call (line 815) | def call( class TFBlenderbotMainLayer (line 1011) | class TFBlenderbotMainLayer(tf.keras.layers.Layer): method __init__ (line 1014) | def __init__(self, config: BlenderbotConfig, **kwargs): method get_input_embeddings (line 1030) | def get_input_embeddings(self): method set_input_embeddings (line 1033) | def set_input_embeddings(self, new_embeddings): method call (line 1039) | def call( class TFBlenderbotModel (line 1122) | class TFBlenderbotModel(TFBlenderbotPreTrainedModel): method __init__ (line 1123) | def __init__(self, config: BlenderbotConfig, *inputs, **kwargs): method get_encoder (line 1128) | def get_encoder(self): method get_decoder (line 1131) | def get_decoder(self): method from_pretrained (line 1135) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method call (line 1157) | def call( method serving_output (line 1201) | def serving_output(self, output): class BiasLayer (line 1222) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1228) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1235) | def call(self, x): class TFBlenderbotForConditionalGeneration (line 1243) | class TFBlenderbotForConditionalGeneration(TFBlenderbotPreTrainedModel, ... method __init__ (line 1249) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1258) | def get_decoder(self): method get_encoder (line 1261) | def get_encoder(self): method get_output_embeddings (line 1264) | def get_output_embeddings(self): method set_output_embeddings (line 1267) | def set_output_embeddings(self, value): method get_bias (line 1270) | def get_bias(self): method set_bias (line 1273) | def set_bias(self, value): method from_pretrained (line 1282) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method call (line 1301) | def call( method serving_output (line 1382) | def serving_output(self, output): method prepare_inputs_for_generation (line 1402) | def prepare_inputs_for_generation( FILE: transformers/models/blenderbot/tokenization_blenderbot.py function bytes_to_unicode (line 53) | def bytes_to_unicode(): function get_pairs (line 78) | def get_pairs(word): class BlenderbotTokenizer (line 92) | class BlenderbotTokenizer(PreTrainedTokenizer): method __init__ (line 177) | def __init__( method vocab_size (line 233) | def vocab_size(self): method get_vocab (line 237) | def get_vocab(self): method bpe (line 241) | def bpe(self, token): method _tokenize (line 284) | def _tokenize(self, text): method _convert_token_to_id (line 295) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 300) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 305) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 312) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_special_tokens_mask (line 342) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 370) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 394) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method build_inputs_with_special_tokens (line 400) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... method _build_conversation_input_ids (line 416) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/blenderbot/tokenization_blenderbot_fast.py class BlenderbotTokenizerFast (line 50) | class BlenderbotTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 138) | def __init__( method mask_token (line 208) | def mask_token(self) -> str: method mask_token (line 223) | def mask_token(self, value): method _batch_encode_plus (line 235) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 245) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 256) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_token_type_ids_from_sequences (line 261) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 284) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... method _build_conversation_input_ids (line 300) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/blenderbot_small/configuration_blenderbot_small.py class BlenderbotSmallConfig (line 36) | class BlenderbotSmallConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class BlenderbotSmallOnnxConfig (line 171) | class BlenderbotSmallOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 173) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 217) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 229) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 297) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 335) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 361) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 385) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: transformers/models/blenderbot_small/modeling_blenderbot_small.py function shift_tokens_right (line 59) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 76) | def _make_causal_mask( function _expand_mask (line 94) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class BlenderbotSmallLearnedPositionalEmbedding (line 109) | class BlenderbotSmallLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 114) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 117) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class BlenderbotSmallAttention (line 127) | class BlenderbotSmallAttention(nn.Module): method __init__ (line 130) | def __init__( method _shape (line 157) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 160) | def forward( class BlenderbotSmallEncoderLayer (line 282) | class BlenderbotSmallEncoderLayer(nn.Module): method __init__ (line 283) | def __init__(self, config: BlenderbotSmallConfig): method forward (line 299) | def forward( class BlenderbotSmallDecoderLayer (line 351) | class BlenderbotSmallDecoderLayer(nn.Module): method __init__ (line 352) | def __init__(self, config: BlenderbotSmallConfig): method forward (line 378) | def forward( class BlenderbotSmallPreTrainedModel (line 468) | class BlenderbotSmallPreTrainedModel(PreTrainedModel): method _init_weights (line 473) | def _init_weights(self, module): method _set_gradient_checkpointing (line 484) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 489) | def dummy_inputs(self): class BlenderbotSmallEncoder (line 640) | class BlenderbotSmallEncoder(BlenderbotSmallPreTrainedModel): method __init__ (line 650) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method forward (line 677) | def forward( class BlenderbotSmallDecoder (line 809) | class BlenderbotSmallDecoder(BlenderbotSmallPreTrainedModel): method __init__ (line 818) | def __init__(self, config: BlenderbotSmallConfig, embed_tokens: Option... method get_input_embeddings (line 842) | def get_input_embeddings(self): method set_input_embeddings (line 845) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 849) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 872) | def forward( class BlenderbotSmallModel (line 1093) | class BlenderbotSmallModel(BlenderbotSmallPreTrainedModel): method __init__ (line 1096) | def __init__(self, config: BlenderbotSmallConfig): method get_input_embeddings (line 1108) | def get_input_embeddings(self): method set_input_embeddings (line 1111) | def set_input_embeddings(self, value): method get_encoder (line 1116) | def get_encoder(self): method get_decoder (line 1119) | def get_decoder(self): method forward (line 1124) | def forward( class BlenderbotSmallForConditionalGeneration (line 1221) | class BlenderbotSmallForConditionalGeneration(BlenderbotSmallPreTrainedM... method __init__ (line 1232) | def __init__(self, config: BlenderbotSmallConfig): method get_encoder (line 1241) | def get_encoder(self): method get_decoder (line 1244) | def get_decoder(self): method resize_token_embeddings (line 1247) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1252) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1261) | def get_output_embeddings(self): method set_output_embeddings (line 1264) | def set_output_embeddings(self, new_embeddings): method forward (line 1270) | def forward( method prepare_inputs_for_generation (line 1348) | def prepare_inputs_for_generation( method _reorder_cache (line 1377) | def _reorder_cache(past_key_values, beam_idx): class BlenderbotSmallDecoderWrapper (line 1388) | class BlenderbotSmallDecoderWrapper(BlenderbotSmallPreTrainedModel): method __init__ (line 1394) | def __init__(self, config): method forward (line 1398) | def forward(self, *args, **kwargs): class BlenderbotSmallForCausalLM (line 1403) | class BlenderbotSmallForCausalLM(BlenderbotSmallPreTrainedModel): method __init__ (line 1406) | def __init__(self, config): method get_input_embeddings (line 1418) | def get_input_embeddings(self): method set_input_embeddings (line 1421) | def set_input_embeddings(self, value): method get_output_embeddings (line 1424) | def get_output_embeddings(self): method set_output_embeddings (line 1427) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1430) | def set_decoder(self, decoder): method get_decoder (line 1433) | def get_decoder(self): method forward (line 1437) | def forward( method prepare_inputs_for_generation (line 1583) | def prepare_inputs_for_generation( method _reorder_cache (line 1601) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py function shift_tokens_right (line 219) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxBlenderbotSmallAttention (line 232) | class FlaxBlenderbotSmallAttention(nn.Module): method setup (line 241) | def setup(self) -> None: method _split_heads (line 267) | def _split_heads(self, hidden_states): method _merge_heads (line 270) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 274) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 305) | def __call__( class FlaxBlenderbotSmallEncoderLayer (line 400) | class FlaxBlenderbotSmallEncoderLayer(nn.Module): method setup (line 404) | def setup(self) -> None: method __call__ (line 427) | def __call__( class FlaxBlenderbotSmallEncoderLayerCollection (line 458) | class FlaxBlenderbotSmallEncoderLayerCollection(nn.Module): method setup (line 462) | def setup(self): method __call__ (line 469) | def __call__( class FlaxBlenderbotSmallDecoderLayer (line 513) | class FlaxBlenderbotSmallDecoderLayer(nn.Module): method setup (line 517) | def setup(self) -> None: method __call__ (line 550) | def __call__( class FlaxBlenderbotSmallDecoderLayerCollection (line 602) | class FlaxBlenderbotSmallDecoderLayerCollection(nn.Module): method setup (line 606) | def setup(self): method __call__ (line 613) | def __call__( class FlaxBlenderbotSmallEncoder (line 672) | class FlaxBlenderbotSmallEncoder(nn.Module): method setup (line 677) | def setup(self): method __call__ (line 693) | def __call__( class FlaxBlenderbotSmallDecoder (line 733) | class FlaxBlenderbotSmallDecoder(nn.Module): method setup (line 738) | def setup(self): method __call__ (line 755) | def __call__( class FlaxBlenderbotSmallModule (line 806) | class FlaxBlenderbotSmallModule(nn.Module): method setup (line 810) | def setup(self): method _get_encoder_module (line 821) | def _get_encoder_module(self): method _get_decoder_module (line 824) | def _get_decoder_module(self): method __call__ (line 827) | def __call__( class FlaxBlenderbotSmallPreTrainedModel (line 876) | class FlaxBlenderbotSmallPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 881) | def __init__( method init_weights (line 893) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 929) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 972) | def encode( method decode (line 1037) | def decode( method __call__ (line 1149) | def __call__( class FlaxBlenderbotSmallModel (line 1213) | class FlaxBlenderbotSmallModel(FlaxBlenderbotSmallPreTrainedModel): class FlaxBlenderbotSmallForConditionalGenerationModule (line 1223) | class FlaxBlenderbotSmallForConditionalGenerationModule(nn.Module): method setup (line 1228) | def setup(self): method _get_encoder_module (line 1238) | def _get_encoder_module(self): method _get_decoder_module (line 1241) | def _get_decoder_module(self): method __call__ (line 1244) | def __call__( class FlaxBlenderbotSmallForConditionalGeneration (line 1299) | class FlaxBlenderbotSmallForConditionalGeneration(FlaxBlenderbotSmallPre... method decode (line 1305) | def decode( method prepare_inputs_for_generation (line 1440) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1471) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 89) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 107) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFBlenderbotSmallLearnedPositionalEmbedding (line 121) | class TFBlenderbotSmallLearnedPositionalEmbedding(tf.keras.layers.Embedd... method __init__ (line 126) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 129) | def call( class TFBlenderbotSmallAttention (line 142) | class TFBlenderbotSmallAttention(tf.keras.layers.Layer): method __init__ (line 145) | def __init__( method _shape (line 173) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 176) | def call( class TFBlenderbotSmallEncoderLayer (line 296) | class TFBlenderbotSmallEncoderLayer(tf.keras.layers.Layer): method __init__ (line 297) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method call (line 311) | def call( class TFBlenderbotSmallDecoderLayer (line 353) | class TFBlenderbotSmallDecoderLayer(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method call (line 381) | def call( class TFBlenderbotSmallPreTrainedModel (line 462) | class TFBlenderbotSmallPreTrainedModel(TFPreTrainedModel): class TFBlenderbotSmallEncoder (line 620) | class TFBlenderbotSmallEncoder(tf.keras.layers.Layer): method __init__ (line 630) | def __init__( method get_embed_tokens (line 650) | def get_embed_tokens(self): method set_embed_tokens (line 653) | def set_embed_tokens(self, embed_tokens): method call (line 657) | def call( class TFBlenderbotSmallDecoder (line 786) | class TFBlenderbotSmallDecoder(tf.keras.layers.Layer): method __init__ (line 796) | def __init__( method get_embed_tokens (line 815) | def get_embed_tokens(self): method set_embed_tokens (line 818) | def set_embed_tokens(self, embed_tokens): method call (line 822) | def call( class TFBlenderbotSmallMainLayer (line 1019) | class TFBlenderbotSmallMainLayer(tf.keras.layers.Layer): method __init__ (line 1022) | def __init__(self, config: BlenderbotSmallConfig, **kwargs): method get_input_embeddings (line 1038) | def get_input_embeddings(self): method set_input_embeddings (line 1041) | def set_input_embeddings(self, new_embeddings): method call (line 1047) | def call( class TFBlenderbotSmallModel (line 1130) | class TFBlenderbotSmallModel(TFBlenderbotSmallPreTrainedModel): method __init__ (line 1131) | def __init__(self, config: BlenderbotSmallConfig, *inputs, **kwargs): method get_encoder (line 1136) | def get_encoder(self): method get_decoder (line 1139) | def get_decoder(self): method call (line 1149) | def call( method serving_output (line 1193) | def serving_output(self, output): class BiasLayer (line 1214) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1220) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1227) | def call(self, x): class TFBlenderbotSmallForConditionalGeneration (line 1235) | class TFBlenderbotSmallForConditionalGeneration(TFBlenderbotSmallPreTrai... method __init__ (line 1241) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1250) | def get_decoder(self): method get_encoder (line 1253) | def get_encoder(self): method get_output_embeddings (line 1256) | def get_output_embeddings(self): method set_output_embeddings (line 1259) | def set_output_embeddings(self, value): method get_bias (line 1262) | def get_bias(self): method set_bias (line 1265) | def set_bias(self, value): method call (line 1277) | def call( method serving_output (line 1359) | def serving_output(self, output): method prepare_inputs_for_generation (line 1379) | def prepare_inputs_for_generation( FILE: transformers/models/blenderbot_small/tokenization_blenderbot_small.py function get_pairs (line 53) | def get_pairs(word): class BlenderbotSmallTokenizer (line 69) | class BlenderbotSmallTokenizer(PreTrainedTokenizer): method __init__ (line 99) | def __init__( method vocab_size (line 121) | def vocab_size(self) -> int: method get_vocab (line 124) | def get_vocab(self) -> Dict: method bpe (line 127) | def bpe(self, token: str) -> str: method _tokenize (line 187) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 197) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 202) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 206) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 211) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py class BlenderbotSmallTokenizerFast (line 52) | class BlenderbotSmallTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 66) | def __init__( method build_inputs_with_special_tokens (line 91) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 98) | def create_token_type_ids_from_sequences( FILE: transformers/models/blip/configuration_blip.py class BlipTextConfig (line 47) | class BlipTextConfig(PretrainedConfig): method __init__ (line 115) | def __init__( method from_pretrained (line 163) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BlipVisionConfig (line 179) | class BlipVisionConfig(PretrainedConfig): method __init__ (line 230) | def __init__( method from_pretrained (line 262) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BlipConfig (line 278) | class BlipConfig(PretrainedConfig): method __init__ (line 328) | def __init__( method from_text_vision_configs (line 359) | def from_text_vision_configs(cls, text_config: BlipTextConfig, vision_... method to_dict (line 370) | def to_dict(self): FILE: transformers/models/blip/convert_blip_original_pytorch_to_hf.py function load_demo_image (line 39) | def load_demo_image(image_size, device): function rename_key (line 54) | def rename_key(key): function convert_blip_checkpoint (line 82) | def convert_blip_checkpoint(pytorch_dump_folder_path, config_path=None): FILE: transformers/models/blip/image_processing_blip.py class BlipImageProcessor (line 43) | class BlipImageProcessor(BaseImageProcessor): method __init__ (line 80) | def __init__( method resize (line 107) | def resize( method rescale (line 140) | def rescale( method normalize (line 160) | def normalize( method preprocess (line 183) | def preprocess( FILE: transformers/models/blip/modeling_blip.py function contrastive_loss (line 57) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function blip_loss (line 62) | def blip_loss(similarity: torch.Tensor) -> torch.Tensor: class BlipForConditionalGenerationModelOutput (line 69) | class BlipForConditionalGenerationModelOutput(ModelOutput): class BlipTextVisionModelOutput (line 105) | class BlipTextVisionModelOutput(ModelOutput): class BlipImageTextMatchingModelOutput (line 138) | class BlipImageTextMatchingModelOutput(ModelOutput): class BlipOutput (line 181) | class BlipOutput(ModelOutput): method to_tuple (line 210) | def to_tuple(self) -> Tuple[Any]: class BlipVisionEmbeddings (line 217) | class BlipVisionEmbeddings(nn.Module): method __init__ (line 218) | def __init__(self, config: BlipVisionConfig): method forward (line 238) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class BlipTextEmbeddings (line 251) | class BlipTextEmbeddings(nn.Module): method __init__ (line 252) | def __init__(self, config: BlipTextConfig): method forward (line 262) | def forward( class BlipAttention (line 282) | class BlipAttention(nn.Module): method __init__ (line 285) | def __init__(self, config): method _shape (line 303) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 306) | def forward( class BlipMLP (line 352) | class BlipMLP(nn.Module): method __init__ (line 353) | def __init__(self, config): method forward (line 360) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipEncoderLayer (line 367) | class BlipEncoderLayer(nn.Module): method __init__ (line 368) | def __init__(self, config: BlipConfig): method forward (line 376) | def forward( class BlipPreTrainedModel (line 415) | class BlipPreTrainedModel(PreTrainedModel): method _init_weights (line 426) | def _init_weights(self, module): method _set_gradient_checkpointing (line 455) | def _set_gradient_checkpointing(self, module, value=False): class BlipEncoder (line 558) | class BlipEncoder(nn.Module): method __init__ (line 568) | def __init__(self, config: BlipConfig): method forward (line 574) | def forward( class BlipVisionModel (line 650) | class BlipVisionModel(BlipPreTrainedModel): method __init__ (line 654) | def __init__(self, config: BlipVisionConfig): method forward (line 667) | def forward( method get_input_embeddings (line 712) | def get_input_embeddings(self): class BlipModel (line 717) | class BlipModel(BlipPreTrainedModel): method __init__ (line 720) | def __init__(self, config: BlipConfig): method get_text_features (line 753) | def get_text_features( method get_image_features (line 791) | def get_image_features( method forward (line 829) | def forward( class BlipForConditionalGeneration (line 930) | class BlipForConditionalGeneration(BlipPreTrainedModel): method __init__ (line 935) | def __init__(self, config: BlipConfig): method get_input_embeddings (line 948) | def get_input_embeddings(self) -> nn.Module: method forward (line 953) | def forward( method generate (line 1023) | def generate( class BlipForQuestionAnswering (line 1102) | class BlipForQuestionAnswering(BlipPreTrainedModel): method __init__ (line 1106) | def __init__(self, config: BlipConfig): method get_input_embeddings (line 1121) | def get_input_embeddings(self) -> nn.Module: method forward (line 1126) | def forward( method generate (line 1237) | def generate( class BlipForImageTextRetrieval (line 1324) | class BlipForImageTextRetrieval(BlipPreTrainedModel): method __init__ (line 1327) | def __init__(self, config: BlipConfig): method get_input_embeddings (line 1357) | def get_input_embeddings(self) -> nn.Module: method forward (line 1362) | def forward( FILE: transformers/models/blip/modeling_blip_text.py class BlipTextEmbeddings (line 45) | class BlipTextEmbeddings(nn.Module): method __init__ (line 48) | def __init__(self, config): method forward (line 64) | def forward( class BlipTextSelfAttention (line 96) | class BlipTextSelfAttention(nn.Module): method __init__ (line 97) | def __init__(self, config, is_cross_attention): method save_attn_gradients (line 124) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 127) | def get_attn_gradients(self): method save_attention_map (line 130) | def save_attention_map(self, attention_map): method get_attention_map (line 133) | def get_attention_map(self): method transpose_for_scores (line 136) | def transpose_for_scores(self, x): method forward (line 141) | def forward( class BlipTextSelfOutput (line 223) | class BlipTextSelfOutput(nn.Module): method __init__ (line 224) | def __init__(self, config): method forward (line 230) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BlipTextAttention (line 238) | class BlipTextAttention(nn.Module): method __init__ (line 239) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 245) | def prune_heads(self, heads): method forward (line 263) | def forward( class BlipTextIntermediate (line 288) | class BlipTextIntermediate(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 297) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipTextOutput (line 304) | class BlipTextOutput(nn.Module): method __init__ (line 305) | def __init__(self, config): method forward (line 311) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BlipTextLayer (line 318) | class BlipTextLayer(nn.Module): method __init__ (line 319) | def __init__(self, config, layer_num): method forward (line 331) | def forward( method feed_forward_chunk (line 375) | def feed_forward_chunk(self, attention_output): class BlipTextEncoder (line 382) | class BlipTextEncoder(nn.Module): method __init__ (line 383) | def __init__(self, config): method forward (line 389) | def forward( class BlipTextPooler (line 481) | class BlipTextPooler(nn.Module): method __init__ (line 482) | def __init__(self, config): method forward (line 487) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipTextPredictionHeadTransform (line 497) | class BlipTextPredictionHeadTransform(nn.Module): method __init__ (line 498) | def __init__(self, config): method forward (line 507) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BlipTextLMPredictionHead (line 515) | class BlipTextLMPredictionHead(nn.Module): method __init__ (line 516) | def __init__(self, config): method forward (line 529) | def forward(self, hidden_states): class BlipTextOnlyMLMHead (line 536) | class BlipTextOnlyMLMHead(nn.Module): method __init__ (line 537) | def __init__(self, config): method forward (line 541) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class BlipTextPreTrainedModel (line 547) | class BlipTextPreTrainedModel(PreTrainedModel): method _init_weights (line 557) | def _init_weights(self, module): class BlipTextModel (line 571) | class BlipTextModel(BlipTextPreTrainedModel): method __init__ (line 580) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 590) | def get_input_embeddings(self): method set_input_embeddings (line 593) | def set_input_embeddings(self, value): method _prune_heads (line 597) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 605) | def get_extended_attention_mask( method forward (line 670) | def forward( class BlipTextLMHeadModel (line 810) | class BlipTextLMHeadModel(BlipTextPreTrainedModel): method __init__ (line 814) | def __init__(self, config): method get_output_embeddings (line 820) | def get_output_embeddings(self): method set_output_embeddings (line 823) | def set_output_embeddings(self, new_embeddings): method forward (line 826) | def forward( method prepare_inputs_for_generation (line 916) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 935) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/blip/modeling_tf_blip.py function contrastive_loss (line 63) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function blip_loss (line 72) | def blip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFBlipForConditionalGenerationModelOutput (line 79) | class TFBlipForConditionalGenerationModelOutput(ModelOutput): class TFBlipTextVisionModelOutput (line 115) | class TFBlipTextVisionModelOutput(ModelOutput): class TFBlipImageTextMatchingModelOutput (line 148) | class TFBlipImageTextMatchingModelOutput(ModelOutput): class TFBlipOutput (line 191) | class TFBlipOutput(ModelOutput): method to_tuple (line 220) | def to_tuple(self) -> Tuple[Any]: class TFBlipVisionEmbeddings (line 227) | class TFBlipVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 228) | def __init__(self, config: BlipVisionConfig, **kwargs): method build (line 247) | def build(self, input_shape): method call (line 263) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFBlipTextEmbeddings (line 278) | class TFBlipTextEmbeddings(tf.keras.layers.Layer): method __init__ (line 279) | def __init__(self, config: BlipTextConfig, **kwargs): method build (line 286) | def build(self, input_shape: tf.TensorShape = None): method call (line 305) | def call( class TFBlipAttention (line 336) | class TFBlipAttention(tf.keras.layers.Layer): method __init__ (line 339) | def __init__(self, config, **kwargs): method call (line 361) | def call( class TFBlipMLP (line 406) | class TFBlipMLP(tf.keras.layers.Layer): method __init__ (line 407) | def __init__(self, config: BlipConfig, **kwargs): method call (line 422) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBlipEncoderLayer (line 429) | class TFBlipEncoderLayer(tf.keras.layers.Layer): method __init__ (line 430) | def __init__(self, config: BlipConfig, **kwargs): method call (line 438) | def call( class TFBlipPreTrainedModel (line 479) | class TFBlipPreTrainedModel(TFPreTrainedModel): class TFBlipEncoder (line 558) | class TFBlipEncoder(tf.keras.layers.Layer): method __init__ (line 569) | def __init__(self, config: BlipConfig, **kwargs): method call (line 575) | def call( class TFBlipVisionModel (line 639) | class TFBlipVisionModel(TFBlipPreTrainedModel): method __init__ (line 643) | def __init__(self, config: BlipVisionConfig, *args, **kwargs): method serving_output (line 651) | def serving_output(self, output: TFBaseModelOutputWithPooling) -> TFBa... method call (line 665) | def call( method get_input_embeddings (line 714) | def get_input_embeddings(self): class TFBlipMainLayer (line 718) | class TFBlipMainLayer(tf.keras.layers.Layer): method __init__ (line 721) | def __init__(self, config: BlipConfig, *args, **kwargs): method build (line 761) | def build(self, input_shape=None): method call (line 771) | def call( class TFBlipModel (line 843) | class TFBlipModel(TFBlipPreTrainedModel): method __init__ (line 848) | def __init__(self, config: BlipConfig, *inputs, **kwargs): method serving_output (line 853) | def serving_output(self, output: TFBlipOutput) -> TFBlipOutput: method call (line 864) | def call( method get_text_features (line 914) | def get_text_features( method get_image_features (line 952) | def get_image_features( class TFBlipForConditionalGeneration (line 998) | class TFBlipForConditionalGeneration(TFBlipPreTrainedModel): method __init__ (line 1003) | def __init__(self, config: BlipConfig, *args, **kwargs): method get_input_embeddings (line 1013) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method call (line 1019) | def call( method generate (line 1088) | def generate( class TFBlipForQuestionAnswering (line 1170) | class TFBlipForQuestionAnswering(TFBlipPreTrainedModel): method __init__ (line 1174) | def __init__(self, config: BlipConfig, *args, **kwargs): method get_input_embeddings (line 1186) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _shift_right (line 1190) | def _shift_right(self, input_ids): method call (line 1216) | def call( method generate (line 1325) | def generate( class TFBlipForImageTextRetrieval (line 1412) | class TFBlipForImageTextRetrieval(TFBlipPreTrainedModel): method __init__ (line 1415) | def __init__(self, config: BlipConfig, *args, **kwargs): method get_input_embeddings (line 1452) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method call (line 1458) | def call( FILE: transformers/models/blip/modeling_tf_blip_text.py class TFBlipTextEmbeddings (line 77) | class TFBlipTextEmbeddings(tf.keras.layers.Layer): method __init__ (line 80) | def __init__(self, config, **kwargs): method call (line 105) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFBlipTextSelfAttention (line 131) | class TFBlipTextSelfAttention(tf.keras.layers.Layer): method __init__ (line 132) | def __init__(self, config, is_cross_attention, **kwargs): method transpose_for_scores (line 163) | def transpose_for_scores(self, x): method call (line 171) | def call( class TFBlipTextSelfOutput (line 253) | class TFBlipTextSelfOutput(tf.keras.layers.Layer): method __init__ (line 254) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 263) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFBlipTextAttention (line 272) | class TFBlipTextAttention(tf.keras.layers.Layer): method __init__ (line 273) | def __init__(self, config, is_cross_attention=False, **kwargs): method call (line 279) | def call( class TFBlipTextIntermediate (line 306) | class TFBlipTextIntermediate(tf.keras.layers.Layer): method __init__ (line 307) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 319) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBlipTextOutput (line 326) | class TFBlipTextOutput(tf.keras.layers.Layer): method __init__ (line 327) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 336) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFBlipTextLayer (line 344) | class TFBlipTextLayer(tf.keras.layers.Layer): method __init__ (line 345) | def __init__(self, config, **kwargs): method call (line 356) | def call( class TFBlipTextEncoder (line 405) | class TFBlipTextEncoder(tf.keras.layers.Layer): method __init__ (line 408) | def __init__(self, config, name=None, **kwargs): method call (line 414) | def call( class TFBlipTextPooler (line 485) | class TFBlipTextPooler(tf.keras.layers.Layer): method __init__ (line 486) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 496) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBlipTextPredictionHeadTransform (line 506) | class TFBlipTextPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 507) | def __init__(self, config: BlipTextConfig, **kwargs): method call (line 523) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFBlipTextLMPredictionHead (line 531) | class TFBlipTextLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 532) | def __init__(self, config, **kwargs): method build (line 546) | def build(self, input_shape=None): method call (line 550) | def call(self, hidden_states): class TFBlipTextOnlyMLMHead (line 556) | class TFBlipTextOnlyMLMHead(tf.keras.layers.Layer): method __init__ (line 557) | def __init__(self, config, **kwargs): method call (line 561) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFBlipTextPreTrainedModel (line 567) | class TFBlipTextPreTrainedModel(TFPreTrainedModel): class TFBlipTextModel (line 579) | class TFBlipTextModel(TFBlipTextPreTrainedModel): method __init__ (line 588) | def __init__(self, config, add_pooling_layer=True, name=None, **kwargs): method get_input_embeddings (line 596) | def get_input_embeddings(self): method set_input_embeddings (line 599) | def set_input_embeddings(self, value): method get_extended_attention_mask (line 603) | def get_extended_attention_mask( method call (line 669) | def call( class TFBlipTextLMHeadModel (line 806) | class TFBlipTextLMHeadModel(TFBlipTextPreTrainedModel): method __init__ (line 810) | def __init__(self, config, **kwargs): method get_output_embeddings (line 816) | def get_output_embeddings(self): method set_output_embeddings (line 819) | def set_output_embeddings(self, new_embeddings): method call (line 824) | def call( method prepare_inputs_for_generation (line 920) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 939) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/blip/processing_blip.py class BlipProcessor (line 26) | class BlipProcessor(ProcessorMixin): method __init__ (line 43) | def __init__(self, image_processor, tokenizer): method __call__ (line 48) | def __call__( method batch_decode (line 130) | def batch_decode(self, *args, **kwargs): method decode (line 137) | def decode(self, *args, **kwargs): method model_input_names (line 145) | def model_input_names(self): FILE: transformers/models/blip_2/configuration_blip_2.py class Blip2VisionConfig (line 34) | class Blip2VisionConfig(PretrainedConfig): method __init__ (line 90) | def __init__( method from_pretrained (line 128) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Blip2QFormerConfig (line 144) | class Blip2QFormerConfig(PretrainedConfig): method __init__ (line 209) | def __init__( method from_pretrained (line 248) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class Blip2Config (line 264) | class Blip2Config(PretrainedConfig): method __init__ (line 320) | def __init__(self, vision_config=None, qformer_config=None, text_confi... method from_vision_qformer_text_configs (line 350) | def from_vision_qformer_text_configs( method to_dict (line 372) | def to_dict(self): FILE: transformers/models/blip_2/convert_blip_2_original_to_pytorch.py function load_demo_image (line 44) | def load_demo_image(): function create_rename_keys (line 52) | def create_rename_keys(config): function rename_key (line 85) | def rename_key(dct, old, new): function read_in_q_v_bias (line 90) | def read_in_q_v_bias(state_dict, config): function get_blip2_config (line 101) | def get_blip2_config(model_name, eos_token_id): function convert_blip2_checkpoint (line 122) | def convert_blip2_checkpoint(model_name, pytorch_dump_folder_path=None, ... FILE: transformers/models/blip_2/modeling_blip_2.py class Blip2ForConditionalGenerationModelOutput (line 57) | class Blip2ForConditionalGenerationModelOutput(ModelOutput): method to_tuple (line 80) | def to_tuple(self) -> Tuple[Any]: class Blip2VisionEmbeddings (line 90) | class Blip2VisionEmbeddings(nn.Module): method __init__ (line 91) | def __init__(self, config: Blip2VisionConfig): method forward (line 111) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class Blip2Attention (line 123) | class Blip2Attention(nn.Module): method __init__ (line 126) | def __init__(self, config): method _shape (line 156) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 159) | def forward( class Blip2MLP (line 209) | class Blip2MLP(nn.Module): method __init__ (line 210) | def __init__(self, config): method forward (line 217) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Blip2EncoderLayer (line 225) | class Blip2EncoderLayer(nn.Module): method __init__ (line 226) | def __init__(self, config: Blip2Config): method forward (line 234) | def forward( class Blip2PreTrainedModel (line 273) | class Blip2PreTrainedModel(PreTrainedModel): method _init_weights (line 292) | def _init_weights(self, module): method _set_gradient_checkpointing (line 312) | def _set_gradient_checkpointing(self, module, value=False): class Blip2Encoder (line 430) | class Blip2Encoder(nn.Module): method __init__ (line 440) | def __init__(self, config: Blip2Config): method forward (line 446) | def forward( class Blip2VisionModel (line 523) | class Blip2VisionModel(Blip2PreTrainedModel): method __init__ (line 527) | def __init__(self, config: Blip2VisionConfig): method forward (line 540) | def forward( method get_input_embeddings (line 585) | def get_input_embeddings(self): class Blip2QFormerMultiHeadAttention (line 589) | class Blip2QFormerMultiHeadAttention(nn.Module): method __init__ (line 590) | def __init__(self, config, is_cross_attention=False): method save_attn_gradients (line 618) | def save_attn_gradients(self, attn_gradients): method get_attn_gradients (line 621) | def get_attn_gradients(self): method save_attention_map (line 624) | def save_attention_map(self, attention_map): method get_attention_map (line 627) | def get_attention_map(self): method transpose_for_scores (line 630) | def transpose_for_scores(self, x): method forward (line 635) | def forward( class Blip2QFormerSelfOutput (line 722) | class Blip2QFormerSelfOutput(nn.Module): method __init__ (line 723) | def __init__(self, config): method forward (line 729) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Blip2QFormerAttention (line 736) | class Blip2QFormerAttention(nn.Module): method __init__ (line 737) | def __init__(self, config, is_cross_attention=False): method prune_heads (line 743) | def prune_heads(self, heads): method forward (line 761) | def forward( class Blip2QFormerIntermediate (line 786) | class Blip2QFormerIntermediate(nn.Module): method __init__ (line 787) | def __init__(self, config): method forward (line 795) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Blip2QFormerOutput (line 802) | class Blip2QFormerOutput(nn.Module): method __init__ (line 803) | def __init__(self, config): method forward (line 809) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Blip2QFormerLayer (line 816) | class Blip2QFormerLayer(nn.Module): method __init__ (line 817) | def __init__(self, config, layer_idx): method forward (line 834) | def forward( method feed_forward_chunk (line 905) | def feed_forward_chunk(self, attention_output): method feed_forward_chunk_query (line 910) | def feed_forward_chunk_query(self, attention_output): class Blip2QFormerEncoder (line 916) | class Blip2QFormerEncoder(nn.Module): method __init__ (line 917) | def __init__(self, config): method forward (line 925) | def forward( class Blip2QFormerModel (line 1018) | class Blip2QFormerModel(Blip2PreTrainedModel): method __init__ (line 1023) | def __init__(self, config: Blip2QFormerConfig): method get_input_embeddings (line 1034) | def get_input_embeddings(self): method set_input_embeddings (line 1037) | def set_input_embeddings(self, value): method _prune_heads (line 1040) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 1048) | def get_extended_attention_mask( method forward (line 1093) | def forward( class Blip2Model (line 1218) | class Blip2Model(Blip2PreTrainedModel): method __init__ (line 1222) | def __init__(self, config: Blip2Config): method get_input_embeddings (line 1240) | def get_input_embeddings(self): method set_input_embeddings (line 1243) | def set_input_embeddings(self, value): method set_output_embeddings (line 1246) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1249) | def get_output_embeddings(self) -> nn.Module: method get_encoder (line 1252) | def get_encoder(self): method get_decoder (line 1255) | def get_decoder(self): method _tie_weights (line 1258) | def _tie_weights(self): method get_text_features (line 1264) | def get_text_features( method get_image_features (line 1327) | def get_image_features( method get_qformer_features (line 1375) | def get_qformer_features( method forward (line 1438) | def forward( class Blip2ForConditionalGeneration (line 1573) | class Blip2ForConditionalGeneration(Blip2PreTrainedModel): method __init__ (line 1577) | def __init__(self, config: Blip2Config): method get_input_embeddings (line 1595) | def get_input_embeddings(self): method set_input_embeddings (line 1598) | def set_input_embeddings(self, value): method set_output_embeddings (line 1601) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1604) | def get_output_embeddings(self) -> nn.Module: method get_encoder (line 1607) | def get_encoder(self): method get_decoder (line 1610) | def get_decoder(self): method _tie_weights (line 1613) | def _tie_weights(self): method _preprocess_accelerate (line 1618) | def _preprocess_accelerate(self): method forward (line 1640) | def forward( method generate (line 1799) | def generate( FILE: transformers/models/blip_2/processing_blip_2.py class Blip2Processor (line 26) | class Blip2Processor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor, tokenizer): method __call__ (line 50) | def __call__( method batch_decode (line 133) | def batch_decode(self, *args, **kwargs): method decode (line 141) | def decode(self, *args, **kwargs): method model_input_names (line 150) | def model_input_names(self): FILE: transformers/models/bloom/configuration_bloom.py class BloomConfig (line 42) | class BloomConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class BloomOnnxConfig (line 152) | class BloomOnnxConfig(OnnxConfigWithPast): method __init__ (line 155) | def __init__( method inputs (line 168) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 180) | def num_layers(self) -> int: method num_attention_heads (line 184) | def num_attention_heads(self) -> int: method atol_for_validation (line 188) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 191) | def generate_dummy_inputs( method default_onnx_opset (line 241) | def default_onnx_opset(self) -> int: FILE: transformers/models/bloom/convert_bloom_original_checkpoint_to_pytorch.py function layer_name_mapping (line 51) | def layer_name_mapping(key, file): function get_dtype_size (line 71) | def get_dtype_size(dtype): function convert_bloom_checkpoint_to_pytorch (line 81) | def convert_bloom_checkpoint_to_pytorch( FILE: transformers/models/bloom/modeling_bloom.py function _make_causal_mask (line 56) | def _make_causal_mask( function _expand_mask (line 75) | def _expand_mask(mask: torch.Tensor, tgt_length: int) -> torch.BoolTensor: function build_alibi_tensor (line 86) | def build_alibi_tensor(attention_mask: torch.Tensor, num_heads: int, dty... function dropout_add (line 130) | def dropout_add(x: torch.Tensor, residual: torch.Tensor, prob: float, tr... function bloom_gelu_forward (line 149) | def bloom_gelu_forward(x: torch.Tensor) -> torch.Tensor: function bloom_gelu_back (line 161) | def bloom_gelu_back(g: torch.Tensor, x: torch.Tensor) -> torch.Tensor: class GeLUFunction (line 179) | class GeLUFunction(torch.autograd.Function): method forward (line 181) | def forward(ctx, input: torch.Tensor) -> torch.Tensor: method backward (line 186) | def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor: class BloomGelu (line 192) | class BloomGelu(nn.Module): method __init__ (line 201) | def __init__(self): method forward (line 204) | def forward(self, x: torch.Tensor) -> torch.Tensor: class BloomAttention (line 211) | class BloomAttention(nn.Module): method __init__ (line 212) | def __init__(self, config: BloomConfig): method _split_heads (line 238) | def _split_heads(self, fused_qkv: torch.Tensor) -> Tuple[torch.Tensor,... method _merge_heads (line 254) | def _merge_heads(self, x: torch.Tensor) -> torch.Tensor: method forward (line 279) | def forward( class BloomMLP (line 371) | class BloomMLP(nn.Module): method __init__ (line 372) | def __init__(self, config: BloomConfig): method forward (line 383) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class BloomBlock (line 402) | class BloomBlock(nn.Module): method __init__ (line 403) | def __init__(self, config: BloomConfig): method forward (line 417) | def forward( class BloomPreTrainedModel (line 473) | class BloomPreTrainedModel(PreTrainedModel): method __init__ (line 486) | def __init__(self, *inputs, **kwargs): method _init_weights (line 489) | def _init_weights(self, module: nn.Module): method _set_gradient_checkpointing (line 505) | def _set_gradient_checkpointing(self, module: nn.Module, value: bool =... method _convert_to_standard_cache (line 510) | def _convert_to_standard_cache( method _convert_to_bloom_cache (line 530) | def _convert_to_bloom_cache( class BloomModel (line 623) | class BloomModel(BloomPreTrainedModel): method __init__ (line 624) | def __init__(self, config: BloomConfig): method build_alibi_tensor (line 645) | def build_alibi_tensor(self, attention_mask: torch.Tensor, num_heads: ... method get_input_embeddings (line 648) | def get_input_embeddings(self): method _prepare_attn_mask (line 651) | def _prepare_attn_mask( method set_input_embeddings (line 673) | def set_input_embeddings(self, new_embeddings: torch.Tensor): method forward (line 682) | def forward( class BloomForCausalLM (line 828) | class BloomForCausalLM(BloomPreTrainedModel): method __init__ (line 831) | def __init__(self, config: BloomConfig): method get_output_embeddings (line 839) | def get_output_embeddings(self): method set_output_embeddings (line 842) | def set_output_embeddings(self, new_embeddings: torch.Tensor): method prepare_inputs_for_generation (line 845) | def prepare_inputs_for_generation( method forward (line 882) | def forward( method _reorder_cache (line 955) | def _reorder_cache( class BloomForSequenceClassification (line 996) | class BloomForSequenceClassification(BloomPreTrainedModel): method __init__ (line 999) | def __init__(self, config: BloomConfig): method forward (line 1014) | def forward( class BloomForTokenClassification (line 1124) | class BloomForTokenClassification(BloomPreTrainedModel): method __init__ (line 1127) | def __init__(self, config: BloomConfig): method forward (line 1150) | def forward( class BloomForQuestionAnswering (line 1227) | class BloomForQuestionAnswering(BloomPreTrainedModel): method __init__ (line 1230) | def __init__(self, config): method forward (line 1239) | def forward( FILE: transformers/models/bloom/tokenization_bloom_fast.py class BloomTokenizerFast (line 49) | class BloomTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 108) | def __init__( method _batch_encode_plus (line 141) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 151) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 162) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 166) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/bort/convert_bort_original_gluonnlp_checkpoint_to_pytorch.py function convert_bort_checkpoint_to_pytorch (line 55) | def convert_bort_checkpoint_to_pytorch(bort_checkpoint_path: str, pytorc... FILE: transformers/models/bridgetower/configuration_bridgetower.py class BridgeTowerVisionConfig (line 35) | class BridgeTowerVisionConfig(PretrainedConfig): method __init__ (line 79) | def __init__( method from_pretrained (line 106) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BridgeTowerTextConfig (line 121) | class BridgeTowerTextConfig(PretrainedConfig): method __init__ (line 189) | def __init__( method from_pretrained (line 235) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class BridgeTowerConfig (line 250) | class BridgeTowerConfig(PretrainedConfig): method __init__ (line 305) | def __init__( method from_text_vision_configs (line 351) | def from_text_vision_configs( method to_dict (line 361) | def to_dict(self): FILE: transformers/models/bridgetower/image_processing_bridgetower.py function max_across_indices (line 46) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function make_pixel_mask (line 54) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function get_max_height_width (line 71) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function get_resize_output_image_size (line 87) | def get_resize_output_image_size( class BridgeTowerImageProcessor (line 114) | class BridgeTowerImageProcessor(BaseImageProcessor): method __init__ (line 159) | def __init__( method resize (line 194) | def resize( method rescale (line 231) | def rescale( method center_crop (line 251) | def center_crop( method normalize (line 274) | def normalize( method _pad_image (line 297) | def _pad_image( method pad (line 318) | def pad( method pad_and_create_pixel_mask (line 356) | def pad_and_create_pixel_mask( method preprocess (line 391) | def preprocess( FILE: transformers/models/bridgetower/modeling_bridgetower.py class BridgeTowerModelOutput (line 132) | class BridgeTowerModelOutput(ModelOutput): class BridgeTowerContrastiveOutput (line 164) | class BridgeTowerContrastiveOutput(ModelOutput): class BridgeTowerResidualAttention (line 197) | class BridgeTowerResidualAttention(nn.Module): method __init__ (line 198) | def __init__(self, config): method attention (line 215) | def attention(self, hidden_state: torch.Tensor, attention_mask: torch.... method forward (line 232) | def forward(self, hidden_state: torch.Tensor, attention_mask: torch.Te... class BridgeTowerTransformer (line 241) | class BridgeTowerTransformer(nn.Module): method __init__ (line 242) | def __init__(self, config): method forward (line 256) | def forward(self, hidden_state: torch.Tensor, attention_mask: Optional... class BridgeTowerVisionEmbeddings (line 268) | class BridgeTowerVisionEmbeddings(nn.Module): method __init__ (line 269) | def __init__(self, config: BridgeTowerVisionConfig): method forward (line 291) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class BridgeTowerVisionTransformer (line 302) | class BridgeTowerVisionTransformer(nn.Module): method __init__ (line 303) | def __init__(self, config): method forward (line 316) | def forward(self, pixel_values: torch.Tensor, attention_mask): method forward_pre (line 338) | def forward_pre(self, pixel_values: torch.Tensor): method forward_post (line 345) | def forward_post(self, hidden_state: torch.Tensor): class BridgeTowerLinkTower (line 351) | class BridgeTowerLinkTower(nn.Module): method __init__ (line 352) | def __init__(self, config): method forward (line 365) | def forward(self, hidden_states, cross_modal_hidden_states, attention_... class BridgeTowerSelfOutput (line 377) | class BridgeTowerSelfOutput(nn.Module): method __init__ (line 378) | def __init__(self, config): method forward (line 384) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BridgeTowerIntermediate (line 392) | class BridgeTowerIntermediate(nn.Module): method __init__ (line 393) | def __init__(self, config): method forward (line 401) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BridgeTowerOutput (line 408) | class BridgeTowerOutput(nn.Module): method __init__ (line 409) | def __init__(self, config): method forward (line 415) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class BridgeTowerPooler (line 423) | class BridgeTowerPooler(nn.Module): method __init__ (line 424) | def __init__(self, config): method forward (line 429) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class BridgeTowerSelfAttention (line 439) | class BridgeTowerSelfAttention(nn.Module): method __init__ (line 440) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 466) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 471) | def forward( class BridgeTowerAttention (line 574) | class BridgeTowerAttention(nn.Module): method __init__ (line 575) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 581) | def prune_heads(self, heads): method forward (line 599) | def forward( class BridgeTowerBertCrossLayer (line 623) | class BridgeTowerBertCrossLayer(nn.Module): method __init__ (line 624) | def __init__(self, config): method forward (line 635) | def forward( method feed_forward_chunk (line 679) | def feed_forward_chunk(self, attention_output): class BridgeTowerTextLayer (line 685) | class BridgeTowerTextLayer(nn.Module): method __init__ (line 686) | def __init__(self, config): method forward (line 700) | def forward( method feed_forward_chunk (line 765) | def feed_forward_chunk(self, attention_output): class BridgeTowerTextEncoder (line 772) | class BridgeTowerTextEncoder(nn.Module): method __init__ (line 773) | def __init__(self, config): method forward (line 779) | def forward( class BridgeTowerTextEmbeddings (line 871) | class BridgeTowerTextEmbeddings(nn.Module): method __init__ (line 877) | def __init__(self, config): method forward (line 900) | def forward( method create_position_ids_from_inputs_embeds (line 940) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): function create_position_ids_from_input_ids (line 959) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class BridgeTowerPreTrainedModel (line 975) | class BridgeTowerPreTrainedModel(PreTrainedModel): method _init_weights (line 987) | def _init_weights(self, module): class BridgeTowerVisionModel (line 1014) | class BridgeTowerVisionModel(BridgeTowerPreTrainedModel): method __init__ (line 1017) | def __init__(self, config): method dtype (line 1022) | def dtype(self): method forward (line 1025) | def forward(self, image, image_mask=None): class BridgeTowerTextModel (line 1029) | class BridgeTowerTextModel(BridgeTowerPreTrainedModel): method __init__ (line 1049) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1061) | def get_input_embeddings(self): method set_input_embeddings (line 1064) | def set_input_embeddings(self, value): method _prune_heads (line 1067) | def _prune_heads(self, heads_to_prune): method forward (line 1076) | def forward( class BridgeTowerModel (line 1211) | class BridgeTowerModel(BridgeTowerPreTrainedModel): method __init__ (line 1212) | def __init__(self, config): method forward (line 1270) | def forward( method get_cls_features (line 1494) | def get_cls_features(self, text_features, image_features): class BridgeTowerPredictionHeadTransform (line 1501) | class BridgeTowerPredictionHeadTransform(nn.Module): method __init__ (line 1502) | def __init__(self, config): method forward (line 1511) | def forward(self, hidden_states): class BridgeTowerMLMHead (line 1518) | class BridgeTowerMLMHead(nn.Module): method __init__ (line 1519) | def __init__(self, config, weight=None): method forward (line 1528) | def forward(self, x): class BridgeTowerITMHead (line 1534) | class BridgeTowerITMHead(nn.Module): method __init__ (line 1535) | def __init__(self, hidden_size): method forward (line 1539) | def forward(self, x): class BridgeTowerForMaskedLM (line 1550) | class BridgeTowerForMaskedLM(BridgeTowerPreTrainedModel): method __init__ (line 1551) | def __init__(self, config): method get_output_embeddings (line 1560) | def get_output_embeddings(self): method set_output_embeddings (line 1563) | def set_output_embeddings(self, new_embeddings): method forward (line 1568) | def forward( class BridgeTowerForImageAndTextRetrieval (line 1657) | class BridgeTowerForImageAndTextRetrieval(BridgeTowerPreTrainedModel): method __init__ (line 1658) | def __init__(self, config): method forward (line 1670) | def forward( class BridgeTowerContrastiveHead (line 1752) | class BridgeTowerContrastiveHead(nn.Module): method __init__ (line 1753) | def __init__(self, hidden_size, embed_size): method forward (line 1757) | def forward(self, x): class BridgeTowerForContrastiveLearning (line 1768) | class BridgeTowerForContrastiveLearning(BridgeTowerPreTrainedModel): method __init__ (line 1769) | def __init__(self, config): method forward (line 1784) | def forward( FILE: transformers/models/bridgetower/processing_bridgetower.py class BridgeTowerProcessor (line 26) | class BridgeTowerProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor, tokenizer): method __call__ (line 48) | def __call__( method batch_decode (line 100) | def batch_decode(self, *args, **kwargs): method decode (line 107) | def decode(self, *args, **kwargs): method model_input_names (line 115) | def model_input_names(self): FILE: transformers/models/byt5/convert_byt5_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: transformers/models/byt5/tokenization_byt5.py class ByT5Tokenizer (line 28) | class ByT5Tokenizer(PreTrainedTokenizer): method __init__ (line 63) | def __init__( method vocab_size (line 115) | def vocab_size(self): method get_special_tokens_mask (line 118) | def get_special_tokens_mask( method _add_eos_if_not_present (line 146) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 157) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 179) | def build_inputs_with_special_tokens( method _tokenize (line 205) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 210) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 222) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 230) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 249) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/camembert/configuration_camembert.py class CamembertConfig (line 39) | class CamembertConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class CamembertOnnxConfig (line 150) | class CamembertOnnxConfig(OnnxConfig): method inputs (line 152) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/camembert/modeling_camembert.py class CamembertEmbeddings (line 79) | class CamembertEmbeddings(nn.Module): method __init__ (line 85) | def __init__(self, config): method forward (line 108) | def forward( method create_position_ids_from_inputs_embeds (line 148) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class CamembertSelfAttention (line 167) | class CamembertSelfAttention(nn.Module): method __init__ (line 168) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 194) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 199) | def forward( class CamembertSelfOutput (line 302) | class CamembertSelfOutput(nn.Module): method __init__ (line 303) | def __init__(self, config): method forward (line 309) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CamembertAttention (line 317) | class CamembertAttention(nn.Module): method __init__ (line 318) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 324) | def prune_heads(self, heads): method forward (line 342) | def forward( class CamembertIntermediate (line 367) | class CamembertIntermediate(nn.Module): method __init__ (line 368) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CamembertOutput (line 383) | class CamembertOutput(nn.Module): method __init__ (line 384) | def __init__(self, config): method forward (line 390) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CamembertLayer (line 398) | class CamembertLayer(nn.Module): method __init__ (line 399) | def __init__(self, config): method forward (line 413) | def forward( method feed_forward_chunk (line 478) | def feed_forward_chunk(self, attention_output): class CamembertEncoder (line 485) | class CamembertEncoder(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 492) | def forward( class CamembertPooler (line 584) | class CamembertPooler(nn.Module): method __init__ (line 585) | def __init__(self, config): method forward (line 590) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CamembertPreTrainedModel (line 599) | class CamembertPreTrainedModel(PreTrainedModel): method _init_weights (line 610) | def _init_weights(self, module): method _set_gradient_checkpointing (line 626) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 630) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class CamembertClassificationHead (line 691) | class CamembertClassificationHead(nn.Module): method __init__ (line 694) | def __init__(self, config): method forward (line 703) | def forward(self, features, **kwargs): class CamembertLMHead (line 714) | class CamembertLMHead(nn.Module): method __init__ (line 717) | def __init__(self, config): method forward (line 726) | def forward(self, features, **kwargs): method _tie_weights (line 736) | def _tie_weights(self): class CamembertModel (line 749) | class CamembertModel(CamembertPreTrainedModel): method __init__ (line 769) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 781) | def get_input_embeddings(self): method set_input_embeddings (line 784) | def set_input_embeddings(self, value): method _prune_heads (line 787) | def _prune_heads(self, heads_to_prune): method forward (line 802) | def forward( class CamembertForMaskedLM (line 937) | class CamembertForMaskedLM(CamembertPreTrainedModel): method __init__ (line 942) | def __init__(self, config): method get_output_embeddings (line 960) | def get_output_embeddings(self): method set_output_embeddings (line 963) | def set_output_embeddings(self, new_embeddings): method forward (line 975) | def forward( class CamembertForSequenceClassification (line 1043) | class CamembertForSequenceClassification(CamembertPreTrainedModel): method __init__ (line 1046) | def __init__(self, config): method forward (line 1065) | def forward( class CamembertForMultipleChoice (line 1145) | class CamembertForMultipleChoice(CamembertPreTrainedModel): method __init__ (line 1148) | def __init__(self, config): method forward (line 1166) | def forward( class CamembertForTokenClassification (line 1242) | class CamembertForTokenClassification(CamembertPreTrainedModel): method __init__ (line 1246) | def __init__(self, config): method forward (line 1268) | def forward( class CamembertForQuestionAnswering (line 1331) | class CamembertForQuestionAnswering(CamembertPreTrainedModel): method __init__ (line 1335) | def __init__(self, config): method forward (line 1353) | def forward( class CamembertForCausalLM (line 1432) | class CamembertForCausalLM(CamembertPreTrainedModel): method __init__ (line 1437) | def __init__(self, config): method get_output_embeddings (line 1452) | def get_output_embeddings(self): method set_output_embeddings (line 1455) | def set_output_embeddings(self, new_embeddings): method forward (line 1460) | def forward( method prepare_inputs_for_generation (line 1566) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1578) | def _reorder_cache(self, past_key_values, beam_idx): function create_position_ids_from_input_ids (line 1586) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/camembert/modeling_tf_camembert.py class TFCamembertEmbeddings (line 171) | class TFCamembertEmbeddings(tf.keras.layers.Layer): method __init__ (line 176) | def __init__(self, config, **kwargs): method build (line 187) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 211) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 225) | def call( class TFCamembertPooler (line 272) | class TFCamembertPooler(tf.keras.layers.Layer): method __init__ (line 273) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 283) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFCamembertSelfAttention (line 293) | class TFCamembertSelfAttention(tf.keras.layers.Layer): method __init__ (line 294) | def __init__(self, config: CamembertConfig, **kwargs): method transpose_for_scores (line 321) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 328) | def call( class TFCamembertSelfOutput (line 411) | class TFCamembertSelfOutput(tf.keras.layers.Layer): method __init__ (line 412) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 421) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFCamembertAttention (line 430) | class TFCamembertAttention(tf.keras.layers.Layer): method __init__ (line 431) | def __init__(self, config: CamembertConfig, **kwargs): method prune_heads (line 437) | def prune_heads(self, heads): method call (line 440) | def call( class TFCamembertIntermediate (line 471) | class TFCamembertIntermediate(tf.keras.layers.Layer): method __init__ (line 472) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 484) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFCamembertOutput (line 492) | class TFCamembertOutput(tf.keras.layers.Layer): method __init__ (line 493) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 502) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFCamembertLayer (line 511) | class TFCamembertLayer(tf.keras.layers.Layer): method __init__ (line 512) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 525) | def call( class TFCamembertEncoder (line 598) | class TFCamembertEncoder(tf.keras.layers.Layer): method __init__ (line 599) | def __init__(self, config: CamembertConfig, **kwargs): method call (line 604) | def call( class TFCamembertMainLayer (line 669) | class TFCamembertMainLayer(tf.keras.layers.Layer): method __init__ (line 672) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 689) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 693) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 698) | def _prune_heads(self, heads_to_prune): method call (line 707) | def call( class TFCamembertPreTrainedModel (line 865) | class TFCamembertPreTrainedModel(TFPreTrainedModel): class TFCamembertModel (line 880) | class TFCamembertModel(TFCamembertPreTrainedModel): method __init__ (line 881) | def __init__(self, config, *inputs, **kwargs): method call (line 892) | def call( class TFCamembertLMHead (line 950) | class TFCamembertLMHead(tf.keras.layers.Layer): method __init__ (line 953) | def __init__(self, config, input_embeddings, **kwargs): method build (line 968) | def build(self, input_shape): method get_output_embeddings (line 973) | def get_output_embeddings(self): method set_output_embeddings (line 976) | def set_output_embeddings(self, value): method get_bias (line 980) | def get_bias(self): method set_bias (line 983) | def set_bias(self, value): method call (line 987) | def call(self, hidden_states): class TFCamembertForMaskedLM (line 1007) | class TFCamembertForMaskedLM(TFCamembertPreTrainedModel, TFMaskedLanguag... method __init__ (line 1011) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1017) | def get_lm_head(self): method get_prefix_bias_name (line 1020) | def get_prefix_bias_name(self): method call (line 1034) | def call( class TFCamembertClassificationHead (line 1085) | class TFCamembertClassificationHead(tf.keras.layers.Layer): method __init__ (line 1088) | def __init__(self, config, **kwargs): method call (line 1104) | def call(self, features, training=False): class TFCamembertForSequenceClassification (line 1121) | class TFCamembertForSequenceClassification(TFCamembertPreTrainedModel, T... method __init__ (line 1125) | def __init__(self, config, *inputs, **kwargs): method call (line 1141) | def call( class TFCamembertForTokenClassification (line 1198) | class TFCamembertForTokenClassification(TFCamembertPreTrainedModel, TFTo... method __init__ (line 1203) | def __init__(self, config, *inputs, **kwargs): method call (line 1225) | def call( class TFCamembertForMultipleChoice (line 1282) | class TFCamembertForMultipleChoice(TFCamembertPreTrainedModel, TFMultipl... method __init__ (line 1287) | def __init__(self, config, *inputs, **kwargs): method call (line 1305) | def call( class TFCamembertForQuestionAnswering (line 1375) | class TFCamembertForQuestionAnswering(TFCamembertPreTrainedModel, TFQues... method __init__ (line 1379) | def __init__(self, config, *inputs, **kwargs): method call (line 1397) | def call( class TFCamembertForCausalLM (line 1464) | class TFCamembertForCausalLM(TFCamembertPreTrainedModel, TFCausalLanguag... method __init__ (line 1468) | def __init__(self, config: CamembertConfig, *inputs, **kwargs): method get_lm_head (line 1477) | def get_lm_head(self): method get_prefix_bias_name (line 1480) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1485) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1504) | def call( FILE: transformers/models/camembert/tokenization_camembert.py class CamembertTokenizer (line 45) | class CamembertTokenizer(PreTrainedTokenizer): method __init__ (line 120) | def __init__( method build_inputs_with_special_tokens (line 161) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 187) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 214) | def create_token_type_ids_from_sequences( method vocab_size (line 238) | def vocab_size(self): method get_vocab (line 241) | def get_vocab(self): method _tokenize (line 246) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 249) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 258) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 264) | def convert_tokens_to_string(self, tokens): method __getstate__ (line 283) | def __getstate__(self): method __setstate__ (line 288) | def __setstate__(self, d): method save_vocabulary (line 298) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/camembert/tokenization_camembert_fast.py class CamembertTokenizerFast (line 53) | class CamembertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 111) | def __init__( method build_inputs_with_special_tokens (line 145) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 171) | def create_token_type_ids_from_sequences( method save_vocabulary (line 194) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/canine/configuration_canine.py class CanineConfig (line 29) | class CanineConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: transformers/models/canine/convert_canine_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, pytorch_dump_pa... FILE: transformers/models/canine/modeling_canine.py class CanineModelOutputWithPooling (line 66) | class CanineModelOutputWithPooling(ModelOutput): function load_tf_weights_in_canine (line 100) | def load_tf_weights_in_canine(model, config, tf_checkpoint_path): class CanineEmbeddings (line 197) | class CanineEmbeddings(nn.Module): method __init__ (line 200) | def __init__(self, config): method _hash_bucket_tensors (line 222) | def _hash_bucket_tensors(self, input_ids, num_hashes: int, num_buckets... method _embed_hash_buckets (line 245) | def _embed_hash_buckets(self, input_ids, embedding_size: int, num_hash... method forward (line 259) | def forward( class CharactersToMolecules (line 296) | class CharactersToMolecules(nn.Module): method __init__ (line 299) | def __init__(self, config): method forward (line 314) | def forward(self, char_encoding: torch.Tensor) -> torch.Tensor: class ConvProjection (line 342) | class ConvProjection(nn.Module): method __init__ (line 348) | def __init__(self, config): method forward (line 363) | def forward( class CanineSelfAttention (line 400) | class CanineSelfAttention(nn.Module): method __init__ (line 401) | def __init__(self, config): method transpose_for_scores (line 423) | def transpose_for_scores(self, x): method forward (line 428) | def forward( class CanineSelfOutput (line 500) | class CanineSelfOutput(nn.Module): method __init__ (line 501) | def __init__(self, config): method forward (line 507) | def forward( class CanineAttention (line 516) | class CanineAttention(nn.Module): method __init__ (line 533) | def __init__( method prune_heads (line 566) | def prune_heads(self, heads): method forward (line 584) | def forward( class CanineIntermediate (line 659) | class CanineIntermediate(nn.Module): method __init__ (line 660) | def __init__(self, config): method forward (line 668) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class CanineOutput (line 674) | class CanineOutput(nn.Module): method __init__ (line 675) | def __init__(self, config): method forward (line 681) | def forward(self, hidden_states: Tuple[torch.FloatTensor], input_tenso... class CanineLayer (line 688) | class CanineLayer(nn.Module): method __init__ (line 689) | def __init__( method forward (line 716) | def forward( method feed_forward_chunk (line 740) | def feed_forward_chunk(self, attention_output): class CanineEncoder (line 746) | class CanineEncoder(nn.Module): method __init__ (line 747) | def __init__( method forward (line 777) | def forward( class CaninePooler (line 828) | class CaninePooler(nn.Module): method __init__ (line 829) | def __init__(self, config): method forward (line 834) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CaninePredictionHeadTransform (line 843) | class CaninePredictionHeadTransform(nn.Module): method __init__ (line 844) | def __init__(self, config): method forward (line 853) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CanineLMPredictionHead (line 860) | class CanineLMPredictionHead(nn.Module): method __init__ (line 861) | def __init__(self, config): method forward (line 874) | def forward(self, hidden_states: Tuple[torch.FloatTensor]) -> torch.Fl... class CanineOnlyMLMHead (line 880) | class CanineOnlyMLMHead(nn.Module): method __init__ (line 881) | def __init__(self, config): method forward (line 885) | def forward( class CaninePreTrainedModel (line 893) | class CaninePreTrainedModel(PreTrainedModel): method _init_weights (line 905) | def _init_weights(self, module): method _set_gradient_checkpointing (line 921) | def _set_gradient_checkpointing(self, module, value=False): class CanineModel (line 991) | class CanineModel(CaninePreTrainedModel): method __init__ (line 992) | def __init__(self, config, add_pooling_layer=True): method _prune_heads (line 1022) | def _prune_heads(self, heads_to_prune): method _create_3d_attention_mask_from_input_mask (line 1030) | def _create_3d_attention_mask_from_input_mask(self, from_tensor, to_ma... method _downsample_attention_mask (line 1057) | def _downsample_attention_mask(self, char_attention_mask: torch.Tensor... method _repeat_molecules (line 1074) | def _repeat_molecules(self, molecules: torch.Tensor, char_seq_length: ... method forward (line 1105) | def forward( class CanineForSequenceClassification (line 1268) | class CanineForSequenceClassification(CaninePreTrainedModel): method __init__ (line 1269) | def __init__(self, config): method forward (line 1286) | def forward( class CanineForMultipleChoice (line 1365) | class CanineForMultipleChoice(CaninePreTrainedModel): method __init__ (line 1366) | def __init__(self, config): method forward (line 1382) | def forward( class CanineForTokenClassification (line 1456) | class CanineForTokenClassification(CaninePreTrainedModel): method __init__ (line 1457) | def __init__(self, config): method forward (line 1470) | def forward( class CanineForQuestionAnswering (line 1562) | class CanineForQuestionAnswering(CaninePreTrainedModel): method __init__ (line 1563) | def __init__(self, config): method forward (line 1581) | def forward( FILE: transformers/models/canine/tokenization_canine.py class CanineTokenizer (line 63) | class CanineTokenizer(PreTrainedTokenizer): method __init__ (line 79) | def __init__( method vocab_size (line 126) | def vocab_size(self) -> int: method _tokenize (line 129) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 133) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 140) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 152) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 155) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 182) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 210) | def create_token_type_ids_from_sequences( method save_vocabulary (line 242) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/chinese_clip/configuration_chinese_clip.py class ChineseCLIPTextConfig (line 41) | class ChineseCLIPTextConfig(PretrainedConfig): method __init__ (line 107) | def __init__( method from_pretrained (line 146) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ChineseCLIPVisionConfig (line 162) | class ChineseCLIPVisionConfig(PretrainedConfig): method __init__ (line 215) | def __init__( method from_pretrained (line 249) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ChineseCLIPConfig (line 265) | class ChineseCLIPConfig(PretrainedConfig): method __init__ (line 315) | def __init__( method from_text_vision_configs (line 405) | def from_text_vision_configs( method to_dict (line 416) | def to_dict(self): class ChineseCLIPOnnxConfig (line 430) | class ChineseCLIPOnnxConfig(OnnxConfig): method inputs (line 432) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 442) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 453) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 456) | def generate_dummy_inputs( method default_onnx_opset (line 472) | def default_onnx_opset(self) -> int: FILE: transformers/models/chinese_clip/convert_chinese_clip_original_pytorch_to_hf.py function copy_attn_layer (line 23) | def copy_attn_layer(hf_attn_layer, pt_weights, prefix): function copy_mlp (line 43) | def copy_mlp(hf_mlp, pt_weights, prefix): function copy_linear (line 48) | def copy_linear(hf_linear, pt_weights, prefix): function copy_layer (line 53) | def copy_layer(hf_layer, pt_weights, prefix): function copy_layers (line 65) | def copy_layers(hf_layers, pt_weights, prefix): function copy_text_model_and_projection (line 70) | def copy_text_model_and_projection(hf_model, pt_weights): function copy_vision_model_and_projection (line 79) | def copy_vision_model_and_projection(hf_model, pt_weights): function convert_chinese_clip_checkpoint (line 97) | def convert_chinese_clip_checkpoint(checkpoint_path, pytorch_dump_folder... FILE: transformers/models/chinese_clip/feature_extraction_chinese_clip.py class ChineseCLIPFeatureExtractor (line 26) | class ChineseCLIPFeatureExtractor(ChineseCLIPImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/chinese_clip/image_processing_chinese_clip.py class ChineseCLIPImageProcessor (line 51) | class ChineseCLIPImageProcessor(BaseImageProcessor): method __init__ (line 91) | def __init__( method resize (line 124) | def resize( method center_crop (line 152) | def center_crop( method rescale (line 174) | def rescale( method normalize (line 194) | def normalize( method preprocess (line 217) | def preprocess( FILE: transformers/models/chinese_clip/modeling_chinese_clip.py function contrastive_loss (line 59) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function chinese_clip_loss (line 63) | def chinese_clip_loss(similarity: torch.Tensor) -> torch.Tensor: class ChineseCLIPOutput (line 70) | class ChineseCLIPOutput(ModelOutput): method to_tuple (line 101) | def to_tuple(self) -> Tuple[Any]: class ChineseCLIPTextEmbeddings (line 109) | class ChineseCLIPTextEmbeddings(nn.Module): method __init__ (line 112) | def __init__(self, config): method forward (line 129) | def forward( class ChineseCLIPVisionEmbeddings (line 172) | class ChineseCLIPVisionEmbeddings(nn.Module): method __init__ (line 173) | def __init__(self, config: ChineseCLIPVisionConfig): method forward (line 195) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ChineseCLIPTextSelfAttention (line 207) | class ChineseCLIPTextSelfAttention(nn.Module): method __init__ (line 208) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 234) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 239) | def forward( class ChineseCLIPTextSelfOutput (line 342) | class ChineseCLIPTextSelfOutput(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 349) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ChineseCLIPTextAttention (line 357) | class ChineseCLIPTextAttention(nn.Module): method __init__ (line 358) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 364) | def prune_heads(self, heads): method forward (line 382) | def forward( class ChineseCLIPVisionAttention (line 406) | class ChineseCLIPVisionAttention(nn.Module): method __init__ (line 409) | def __init__(self, config): method _shape (line 428) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 431) | def forward( class ChineseCLIPTextIntermediate (line 491) | class ChineseCLIPTextIntermediate(nn.Module): method __init__ (line 492) | def __init__(self, config): method forward (line 500) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ChineseCLIPTextOutput (line 507) | class ChineseCLIPTextOutput(nn.Module): method __init__ (line 508) | def __init__(self, config): method forward (line 514) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ChineseCLIPVisionMLP (line 522) | class ChineseCLIPVisionMLP(nn.Module): method __init__ (line 523) | def __init__(self, config): method forward (line 530) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ChineseCLIPTextLayer (line 538) | class ChineseCLIPTextLayer(nn.Module): method __init__ (line 539) | def __init__(self, config): method forward (line 553) | def forward( method feed_forward_chunk (line 618) | def feed_forward_chunk(self, attention_output): class ChineseCLIPVisionLayer (line 624) | class ChineseCLIPVisionLayer(nn.Module): method __init__ (line 625) | def __init__(self, config: ChineseCLIPConfig): method forward (line 633) | def forward( class ChineseCLIPTextPooler (line 668) | class ChineseCLIPTextPooler(nn.Module): method __init__ (line 669) | def __init__(self, config): method forward (line 674) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ChineseCLIPPreTrainedModel (line 683) | class ChineseCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 694) | def _init_weights(self, module): method _set_gradient_checkpointing (line 743) | def _set_gradient_checkpointing(self, module, value=False): class ChineseCLIPTextEncoder (line 870) | class ChineseCLIPTextEncoder(nn.Module): method __init__ (line 871) | def __init__(self, config): method forward (line 877) | def forward( class ChineseCLIPVisionEncoder (line 968) | class ChineseCLIPVisionEncoder(nn.Module): method __init__ (line 977) | def __init__(self, config: ChineseCLIPConfig): method forward (line 983) | def forward( class ChineseCLIPVisionTransformer (line 1051) | class ChineseCLIPVisionTransformer(nn.Module): method __init__ (line 1052) | def __init__(self, config: ChineseCLIPVisionConfig): method forward (line 1064) | def forward( class ChineseCLIPTextModel (line 1112) | class ChineseCLIPTextModel(ChineseCLIPPreTrainedModel): method __init__ (line 1127) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1139) | def get_input_embeddings(self): method set_input_embeddings (line 1142) | def set_input_embeddings(self, value): method _prune_heads (line 1145) | def _prune_heads(self, heads_to_prune): method forward (line 1159) | def forward( class ChineseCLIPVisionModel (line 1293) | class ChineseCLIPVisionModel(ChineseCLIPPreTrainedModel): method __init__ (line 1297) | def __init__(self, config: ChineseCLIPVisionConfig): method get_input_embeddings (line 1303) | def get_input_embeddings(self) -> nn.Module: method forward (line 1308) | def forward( class ChineseCLIPModel (line 1348) | class ChineseCLIPModel(ChineseCLIPPreTrainedModel): method __init__ (line 1351) | def __init__(self, config: ChineseCLIPConfig): method get_text_features (line 1384) | def get_text_features( method get_image_features (line 1434) | def get_image_features( method forward (line 1485) | def forward( FILE: transformers/models/chinese_clip/processing_chinese_clip.py class ChineseCLIPProcessor (line 25) | class ChineseCLIPProcessor(ProcessorMixin): method __init__ (line 43) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 61) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 114) | def batch_decode(self, *args, **kwargs): method decode (line 121) | def decode(self, *args, **kwargs): method model_input_names (line 129) | def model_input_names(self): method feature_extractor_class (line 135) | def feature_extractor_class(self): FILE: transformers/models/clap/configuration_clap.py class ClapTextConfig (line 33) | class ClapTextConfig(PretrainedConfig): method __init__ (line 107) | def __init__( method from_pretrained (line 154) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ClapAudioConfig (line 170) | class ClapAudioConfig(PretrainedConfig): method __init__ (line 260) | def __init__( method from_pretrained (line 322) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class ClapConfig (line 338) | class ClapConfig(PretrainedConfig): method __init__ (line 391) | def __init__( method from_text_audio_configs (line 428) | def from_text_audio_configs(cls, text_config: ClapTextConfig, audio_co... method to_dict (line 439) | def to_dict(self): FILE: transformers/models/clap/convert_clap_original_pytorch_to_hf.py function init_clap (line 41) | def init_clap(checkpoint_path, enable_fusion=False): function rename_state_dict (line 54) | def rename_state_dict(state_dict): function convert_clap_checkpoint (line 97) | def convert_clap_checkpoint(checkpoint_path, pytorch_dump_folder_path, c... FILE: transformers/models/clap/feature_extraction_clap.py class ClapFeatureExtractor (line 33) | class ClapFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 85) | def __init__( method to_dict (line 138) | def to_dict(self) -> Dict[str, Any]: method _np_extract_fbank_features (line 154) | def _np_extract_fbank_features(self, waveform: np.array, mel_filters: ... method _random_mel_fusion (line 176) | def _random_mel_fusion(self, mel, total_frames, chunk_frames): method _get_input_mel (line 201) | def _get_input_mel(self, waveform: np.array, max_length, truncation, p... method __call__ (line 259) | def __call__( FILE: transformers/models/clap/modeling_clap.py function interpolate (line 56) | def interpolate(hidden_states, ratio): function window_partition (line 73) | def window_partition(hidden_states, window_size): function window_reverse (line 94) | def window_reverse(windows, window_size, height, width): function create_position_ids_from_input_ids (line 114) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... function contrastive_loss (line 132) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: class ClapTextModelOutput (line 139) | class ClapTextModelOutput(ModelOutput): class ClapAudioModelOutput (line 168) | class ClapAudioModelOutput(ModelOutput): class ClapOutput (line 198) | class ClapOutput(ModelOutput): method to_tuple (line 227) | def to_tuple(self) -> Tuple[Any]: class ClapDropPath (line 235) | class ClapDropPath(nn.Module): method __init__ (line 241) | def __init__(self, drop_prob=None): method forward (line 245) | def forward(self, hidden_states): class ClapAudioAFFBlock (line 260) | class ClapAudioAFFBlock(nn.Module): method __init__ (line 266) | def __init__(self, config: ClapAudioConfig): method forward (line 290) | def forward(self, hidden_states, residual): class ClapAudioPatchEmbed (line 300) | class ClapAudioPatchEmbed(nn.Module): method __init__ (line 306) | def __init__(self, config: ClapAudioConfig): method forward (line 348) | def forward(self, hidden_states, is_longer_idx=None): class ClapAudioSelfAttention (line 399) | class ClapAudioSelfAttention(nn.Module): method __init__ (line 400) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 437) | def transpose_for_scores(self, x): method forward (line 442) | def forward( class ClapAudioSelfOutput (line 500) | class ClapAudioSelfOutput(nn.Module): method __init__ (line 501) | def __init__(self, config, dim): method forward (line 506) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ClapAudioAttention (line 514) | class ClapAudioAttention(nn.Module): method __init__ (line 515) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 521) | def prune_heads(self, heads): method forward (line 539) | def forward( class ClapAudioIntermediate (line 553) | class ClapAudioIntermediate(nn.Module): method __init__ (line 554) | def __init__(self, config, dim): method forward (line 562) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapAudioOutput (line 569) | class ClapAudioOutput(nn.Module): method __init__ (line 570) | def __init__(self, config, dim): method forward (line 575) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapAudioLayer (line 582) | class ClapAudioLayer(nn.Module): method __init__ (line 583) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 596) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 602) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 630) | def maybe_pad(self, hidden_states, height, width): method forward (line 637) | def forward( class ClapAudioStage (line 706) | class ClapAudioStage(nn.Module): method __init__ (line 707) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 732) | def forward( class ClapAudioPatchMerging (line 766) | class ClapAudioPatchMerging(nn.Module): method __init__ (line 779) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 786) | def maybe_pad(self, input_feature, height, width): method forward (line 794) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class ClapAudioEncoder (line 820) | class ClapAudioEncoder(nn.Module): method __init__ (line 821) | def __init__(self, config): method reshape_mel2img (line 861) | def reshape_mel2img(self, normalized_input_features): method forward (line 897) | def forward( class ClapProjectionLayer (line 1132) | class ClapProjectionLayer(nn.Module): method __init__ (line 1133) | def __init__(self, config: Union[ClapAudioConfig, ClapTextConfig]): method forward (line 1143) | def forward(self, hidden_states): class ClapTextEmbeddings (line 1151) | class ClapTextEmbeddings(nn.Module): method __init__ (line 1157) | def __init__(self, config): method forward (line 1180) | def forward( method create_position_ids_from_inputs_embeds (line 1220) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class ClapTextSelfAttention (line 1239) | class ClapTextSelfAttention(nn.Module): method __init__ (line 1240) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 1266) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 1271) | def forward( class ClapTextSelfOutput (line 1374) | class ClapTextSelfOutput(nn.Module): method __init__ (line 1375) | def __init__(self, config): method forward (line 1381) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ClapTextAttention (line 1389) | class ClapTextAttention(nn.Module): method __init__ (line 1390) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 1396) | def prune_heads(self, heads): method forward (line 1414) | def forward( class ClapTextIntermediate (line 1439) | class ClapTextIntermediate(nn.Module): method __init__ (line 1440) | def __init__(self, config): method forward (line 1448) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapTextOutput (line 1455) | class ClapTextOutput(nn.Module): method __init__ (line 1456) | def __init__(self, config): method forward (line 1462) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ClapTextLayer (line 1470) | class ClapTextLayer(nn.Module): method __init__ (line 1471) | def __init__(self, config): method forward (line 1485) | def forward( method feed_forward_chunk (line 1550) | def feed_forward_chunk(self, attention_output): class ClapTextEncoder (line 1557) | class ClapTextEncoder(nn.Module): method __init__ (line 1558) | def __init__(self, config): method forward (line 1564) | def forward( class ClapTextPooler (line 1656) | class ClapTextPooler(nn.Module): method __init__ (line 1657) | def __init__(self, config): method forward (line 1662) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ClapPreTrainedModel (line 1671) | class ClapPreTrainedModel(PreTrainedModel): method _init_weights (line 1682) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1704) | def _set_gradient_checkpointing(self, module, value=False): class ClapAudioModel (line 1709) | class ClapAudioModel(ClapPreTrainedModel): method __init__ (line 1713) | def __init__(self, config: ClapAudioConfig): method get_input_embeddings (line 1719) | def get_input_embeddings(self) -> nn.Module: method forward (line 1724) | def forward( class ClapTextModel (line 1767) | class ClapTextModel(ClapPreTrainedModel): method __init__ (line 1787) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1799) | def get_input_embeddings(self): method set_input_embeddings (line 1802) | def set_input_embeddings(self, value): method forward (line 1806) | def forward( class ClapModel (line 1937) | class ClapModel(ClapPreTrainedModel): method __init__ (line 1941) | def __init__(self, config: ClapConfig): method get_text_features (line 1974) | def get_text_features( method get_audio_features (line 2022) | def get_audio_features( method forward (line 2069) | def forward( class ClapTextModelWithProjection (line 2171) | class ClapTextModelWithProjection(ClapPreTrainedModel): method __init__ (line 2174) | def __init__(self, config: ClapTextConfig): method get_input_embeddings (line 2181) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 2184) | def set_input_embeddings(self, value): method forward (line 2189) | def forward( class ClapAudioModelWithProjection (line 2247) | class ClapAudioModelWithProjection(ClapPreTrainedModel): method __init__ (line 2251) | def __init__(self, config: ClapAudioConfig): method get_input_embeddings (line 2258) | def get_input_embeddings(self) -> nn.Module: method forward (line 2263) | def forward( FILE: transformers/models/clap/processing_clap.py class ClapProcessor (line 23) | class ClapProcessor(ProcessorMixin): method __init__ (line 39) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 42) | def __call__(self, text=None, audios=None, return_tensors=None, **kwar... method batch_decode (line 98) | def batch_decode(self, *args, **kwargs): method decode (line 105) | def decode(self, *args, **kwargs): method model_input_names (line 113) | def model_input_names(self): FILE: transformers/models/clip/configuration_clip.py class CLIPTextConfig (line 40) | class CLIPTextConfig(PretrainedConfig): method __init__ (line 94) | def __init__( method from_pretrained (line 129) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPVisionConfig (line 145) | class CLIPVisionConfig(PretrainedConfig): method __init__ (line 198) | def __init__( method from_pretrained (line 232) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPConfig (line 248) | class CLIPConfig(PretrainedConfig): method __init__ (line 297) | def __init__( method from_text_vision_configs (line 386) | def from_text_vision_configs(cls, text_config: CLIPTextConfig, vision_... method to_dict (line 397) | def to_dict(self): class CLIPOnnxConfig (line 411) | class CLIPOnnxConfig(OnnxConfig): method inputs (line 413) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 423) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 434) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 437) | def generate_dummy_inputs( method default_onnx_opset (line 453) | def default_onnx_opset(self) -> int: FILE: transformers/models/clip/convert_clip_original_pytorch_to_hf.py function copy_attn_layer (line 24) | def copy_attn_layer(hf_attn_layer, pt_attn_layer): function copy_mlp (line 44) | def copy_mlp(hf_mlp, pt_mlp): function copy_linear (line 49) | def copy_linear(hf_linear, pt_linear): function copy_layer (line 54) | def copy_layer(hf_layer, pt_layer): function copy_layers (line 66) | def copy_layers(hf_layers, pt_layers): function copy_encoder (line 71) | def copy_encoder(hf_encoder, pt_model): function copy_text_model_and_projection (line 83) | def copy_text_model_and_projection(hf_model, pt_model): function copy_vison_model_and_projection (line 91) | def copy_vison_model_and_projection(hf_model, pt_model): function convert_clip_checkpoint (line 109) | def convert_clip_checkpoint(checkpoint_path, pytorch_dump_folder_path, c... FILE: transformers/models/clip/feature_extraction_clip.py class CLIPFeatureExtractor (line 26) | class CLIPFeatureExtractor(CLIPImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/clip/image_processing_clip.py class CLIPImageProcessor (line 51) | class CLIPImageProcessor(BaseImageProcessor): method __init__ (line 91) | def __init__( method resize (line 124) | def resize( method center_crop (line 152) | def center_crop( method rescale (line 176) | def rescale( method normalize (line 196) | def normalize( method preprocess (line 219) | def preprocess( FILE: transformers/models/clip/modeling_clip.py function _expand_mask (line 49) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 65) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 69) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class CLIPVisionModelOutput (line 76) | class CLIPVisionModelOutput(ModelOutput): class CLIPTextModelOutput (line 105) | class CLIPTextModelOutput(ModelOutput): class CLIPOutput (line 134) | class CLIPOutput(ModelOutput): method to_tuple (line 163) | def to_tuple(self) -> Tuple[Any]: class CLIPVisionEmbeddings (line 170) | class CLIPVisionEmbeddings(nn.Module): method __init__ (line 171) | def __init__(self, config: CLIPVisionConfig): method forward (line 193) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class CLIPTextEmbeddings (line 204) | class CLIPTextEmbeddings(nn.Module): method __init__ (line 205) | def __init__(self, config: CLIPTextConfig): method forward (line 215) | def forward( class CLIPAttention (line 235) | class CLIPAttention(nn.Module): method __init__ (line 238) | def __init__(self, config): method _shape (line 257) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 260) | def forward( class CLIPMLP (line 339) | class CLIPMLP(nn.Module): method __init__ (line 340) | def __init__(self, config): method forward (line 347) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CLIPEncoderLayer (line 354) | class CLIPEncoderLayer(nn.Module): method __init__ (line 355) | def __init__(self, config: CLIPConfig): method forward (line 363) | def forward( class CLIPPreTrainedModel (line 404) | class CLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 415) | def _init_weights(self, module): method _set_gradient_checkpointing (line 468) | def _set_gradient_checkpointing(self, module, value=False): class CLIPEncoder (line 573) | class CLIPEncoder(nn.Module): method __init__ (line 582) | def __init__(self, config: CLIPConfig): method forward (line 588) | def forward( function _make_causal_mask (line 677) | def _make_causal_mask( class CLIPTextTransformer (line 694) | class CLIPTextTransformer(nn.Module): method __init__ (line 695) | def __init__(self, config: CLIPTextConfig): method forward (line 705) | def forward( class CLIPTextModel (line 775) | class CLIPTextModel(CLIPPreTrainedModel): method __init__ (line 780) | def __init__(self, config: CLIPTextConfig): method get_input_embeddings (line 786) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 789) | def set_input_embeddings(self, value): method forward (line 794) | def forward( class CLIPVisionTransformer (line 832) | class CLIPVisionTransformer(nn.Module): method __init__ (line 833) | def __init__(self, config: CLIPVisionConfig): method forward (line 845) | def forward( class CLIPVisionModel (line 894) | class CLIPVisionModel(CLIPPreTrainedModel): method __init__ (line 898) | def __init__(self, config: CLIPVisionConfig): method get_input_embeddings (line 904) | def get_input_embeddings(self) -> nn.Module: method forward (line 909) | def forward( class CLIPModel (line 949) | class CLIPModel(CLIPPreTrainedModel): method __init__ (line 952) | def __init__(self, config: CLIPConfig): method get_text_features (line 985) | def get_text_features( method get_image_features (line 1032) | def get_image_features( method forward (line 1082) | def forward( class CLIPTextModelWithProjection (line 1180) | class CLIPTextModelWithProjection(CLIPPreTrainedModel): method __init__ (line 1185) | def __init__(self, config: CLIPTextConfig): method get_input_embeddings (line 1195) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1198) | def set_input_embeddings(self, value): method forward (line 1203) | def forward( class CLIPVisionModelWithProjection (line 1261) | class CLIPVisionModelWithProjection(CLIPPreTrainedModel): method __init__ (line 1265) | def __init__(self, config: CLIPVisionConfig): method get_input_embeddings (line 1275) | def get_input_embeddings(self) -> nn.Module: method forward (line 1280) | def forward( FILE: transformers/models/clip/modeling_flax_clip.py class FlaxCLIPOutput (line 159) | class FlaxCLIPOutput(ModelOutput): method to_tuple (line 187) | def to_tuple(self) -> Tuple[Any]: class FlaxCLIPVisionEmbeddings (line 194) | class FlaxCLIPVisionEmbeddings(nn.Module): method setup (line 198) | def setup(self): method __call__ (line 220) | def __call__(self, pixel_values): class FlaxCLIPTextEmbeddings (line 232) | class FlaxCLIPTextEmbeddings(nn.Module): method setup (line 236) | def setup(self): method __call__ (line 247) | def __call__(self, input_ids, position_ids): class FlaxCLIPAttention (line 255) | class FlaxCLIPAttention(nn.Module): method setup (line 259) | def setup(self): method _split_heads (line 280) | def _split_heads(self, hidden_states): method _merge_heads (line 283) | def _merge_heads(self, hidden_states): method __call__ (line 286) | def __call__( class FlaxCLIPMLP (line 346) | class FlaxCLIPMLP(nn.Module): method setup (line 350) | def setup(self): method __call__ (line 359) | def __call__(self, hidden_states): class FlaxCLIPEncoderLayer (line 366) | class FlaxCLIPEncoderLayer(nn.Module): method setup (line 370) | def setup(self): method __call__ (line 376) | def __call__( class FlaxCLIPLayerCollection (line 408) | class FlaxCLIPLayerCollection(nn.Module): method setup (line 412) | def setup(self): method __call__ (line 418) | def __call__( class FlaxCLIPEncoder (line 455) | class FlaxCLIPEncoder(nn.Module): method setup (line 459) | def setup(self): method __call__ (line 462) | def __call__( class FlaxCLIPTextTransformer (line 481) | class FlaxCLIPTextTransformer(nn.Module): method setup (line 485) | def setup(self): method __call__ (line 490) | def __call__( class FlaxCLIPVisionTransformer (line 535) | class FlaxCLIPVisionTransformer(nn.Module): method setup (line 539) | def setup(self): method __call__ (line 545) | def __call__( class FlaxCLIPTextPreTrainedModel (line 585) | class FlaxCLIPTextPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 589) | def __init__( method init_weights (line 601) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 622) | def __call__( class FlaxCLIPVisionPreTrainedModel (line 664) | class FlaxCLIPVisionPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 669) | def __init__( method init_weights (line 683) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 702) | def __call__( class FlaxCLIPPreTrainedModel (line 736) | class FlaxCLIPPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 740) | def __init__( method init_weights (line 754) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 777) | def __call__( method get_text_features (line 822) | def get_text_features( method get_image_features (line 889) | def get_image_features( class FlaxCLIPTextModule (line 941) | class FlaxCLIPTextModule(nn.Module): method setup (line 945) | def setup(self): method __call__ (line 948) | def __call__( class FlaxCLIPTextModel (line 969) | class FlaxCLIPTextModel(FlaxCLIPTextPreTrainedModel): class FlaxCLIPVisionModule (line 998) | class FlaxCLIPVisionModule(nn.Module): method setup (line 1002) | def setup(self): method __call__ (line 1005) | def __call__( class FlaxCLIPVisionModel (line 1022) | class FlaxCLIPVisionModel(FlaxCLIPVisionPreTrainedModel): class FlaxCLIPModule (line 1056) | class FlaxCLIPModule(nn.Module): method setup (line 1060) | def setup(self): method __call__ (line 1088) | def __call__( class FlaxCLIPModel (line 1148) | class FlaxCLIPModel(FlaxCLIPPreTrainedModel): FILE: transformers/models/clip/modeling_tf_clip.py function _expand_mask (line 63) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function contrastive_loss (line 78) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function clip_loss (line 86) | def clip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFCLIPOutput (line 93) | class TFCLIPOutput(ModelOutput): method to_tuple (line 123) | def to_tuple(self) -> Tuple[Any]: class TFCLIPVisionEmbeddings (line 130) | class TFCLIPVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 131) | def __init__(self, config: CLIPVisionConfig, **kwargs): method build (line 154) | def build(self, input_shape: tf.TensorShape = None): method call (line 174) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFCLIPTextEmbeddings (line 199) | class TFCLIPTextEmbeddings(tf.keras.layers.Layer): method __init__ (line 200) | def __init__(self, config: CLIPTextConfig, **kwargs): method build (line 207) | def build(self, input_shape: tf.TensorShape = None): method call (line 226) | def call( class TFCLIPAttention (line 257) | class TFCLIPAttention(tf.keras.layers.Layer): method __init__ (line 260) | def __init__(self, config: CLIPConfig, **kwargs): method transpose_for_scores (line 295) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 302) | def call( class TFCLIPMLP (line 356) | class TFCLIPMLP(tf.keras.layers.Layer): method __init__ (line 357) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 373) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFCLIPEncoderLayer (line 380) | class TFCLIPEncoderLayer(tf.keras.layers.Layer): method __init__ (line 381) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 390) | def call( class TFCLIPEncoder (line 432) | class TFCLIPEncoder(tf.keras.layers.Layer): method __init__ (line 441) | def __init__(self, config: CLIPConfig, **kwargs): method call (line 446) | def call( class TFCLIPTextTransformer (line 487) | class TFCLIPTextTransformer(tf.keras.layers.Layer): method __init__ (line 488) | def __init__(self, config: CLIPTextConfig, **kwargs): method call (line 497) | def call( method _build_causal_attention_mask (line 552) | def _build_causal_attention_mask(self, batch_size, seq_length, dtype=t... class TFCLIPTextMainLayer (line 572) | class TFCLIPTextMainLayer(tf.keras.layers.Layer): method __init__ (line 575) | def __init__(self, config: CLIPTextConfig, **kwargs): method get_input_embeddings (line 580) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 583) | def set_input_embeddings(self, value: tf.Variable): method call (line 588) | def call( class TFCLIPVisionTransformer (line 619) | class TFCLIPVisionTransformer(tf.keras.layers.Layer): method __init__ (line 620) | def __init__(self, config: CLIPVisionConfig, **kwargs): method call (line 628) | def call( class TFCLIPVisionMainLayer (line 665) | class TFCLIPVisionMainLayer(tf.keras.layers.Layer): method __init__ (line 668) | def __init__(self, config: CLIPVisionConfig, **kwargs): method get_input_embeddings (line 673) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method call (line 677) | def call( class TFCLIPMainLayer (line 700) | class TFCLIPMainLayer(tf.keras.layers.Layer): method __init__ (line 703) | def __init__(self, config: CLIPConfig, **kwargs): method build (line 742) | def build(self, input_shape: tf.TensorShape = None): method get_text_features (line 753) | def get_text_features( method get_image_features (line 787) | def get_image_features( method call (line 812) | def call( class TFCLIPPreTrainedModel (line 887) | class TFCLIPPreTrainedModel(TFPreTrainedModel): class TFCLIPTextModel (line 1041) | class TFCLIPTextModel(TFCLIPPreTrainedModel): method __init__ (line 1044) | def __init__(self, config: CLIPTextConfig, *inputs, **kwargs): method call (line 1052) | def call( class TFCLIPVisionModel (line 1093) | class TFCLIPVisionModel(TFCLIPPreTrainedModel): method __init__ (line 1097) | def __init__(self, config: CLIPVisionConfig, *inputs, **kwargs): method call (line 1105) | def call( class TFCLIPModel (line 1148) | class TFCLIPModel(TFCLIPPreTrainedModel): method __init__ (line 1151) | def __init__(self, config: CLIPConfig, *inputs, **kwargs): method get_text_features (line 1158) | def get_text_features( method get_image_features (line 1198) | def get_image_features( method call (line 1241) | def call( method serving_output (line 1292) | def serving_output(self, output: TFCLIPOutput) -> TFCLIPOutput: FILE: transformers/models/clip/processing_clip.py class CLIPProcessor (line 25) | class CLIPProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 59) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 112) | def batch_decode(self, *args, **kwargs): method decode (line 119) | def decode(self, *args, **kwargs): method model_input_names (line 127) | def model_input_names(self): method feature_extractor_class (line 133) | def feature_extractor_class(self): method feature_extractor (line 141) | def feature_extractor(self): FILE: transformers/models/clip/tokenization_clip.py function bytes_to_unicode (line 56) | def bytes_to_unicode(): function get_pairs (line 80) | def get_pairs(word): function whitespace_clean (line 94) | def whitespace_clean(text): function whitespace_tokenize (line 101) | def whitespace_tokenize(text): class BasicTokenizer (line 111) | class BasicTokenizer(object): method __init__ (line 131) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 139) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 176) | def _run_strip_accents(self, text): method _run_split_on_punc (line 187) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 209) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 222) | def _is_chinese_char(self, cp): method _clean_text (line 246) | def _clean_text(self, text): class CLIPTokenizer (line 260) | class CLIPTokenizer(PreTrainedTokenizer): method __init__ (line 289) | def __init__( method vocab_size (line 340) | def vocab_size(self): method get_vocab (line 343) | def get_vocab(self): method build_inputs_with_special_tokens (line 346) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 373) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 401) | def create_token_type_ids_from_sequences( method bpe (line 424) | def bpe(self, token): method _tokenize (line 466) | def _tokenize(self, text): method _convert_token_to_id (line 481) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 485) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 489) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 496) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/clip/tokenization_clip_fast.py class CLIPTokenizerFast (line 50) | class CLIPTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 78) | def __init__( method _wrap_decode_method_backend_tokenizer (line 113) | def _wrap_decode_method_backend_tokenizer(self): method build_inputs_with_special_tokens (line 123) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 150) | def create_token_type_ids_from_sequences( method save_vocabulary (line 173) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/clipseg/configuration_clipseg.py class CLIPSegTextConfig (line 32) | class CLIPSegTextConfig(PretrainedConfig): method __init__ (line 86) | def __init__( method from_pretrained (line 119) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPSegVisionConfig (line 135) | class CLIPSegVisionConfig(PretrainedConfig): method __init__ (line 188) | def __init__( method from_pretrained (line 220) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class CLIPSegConfig (line 236) | class CLIPSegConfig(PretrainedConfig): method __init__ (line 303) | def __init__( method from_text_vision_configs (line 413) | def from_text_vision_configs(cls, text_config: CLIPSegTextConfig, visi... method to_dict (line 424) | def to_dict(self): FILE: transformers/models/clipseg/convert_clipseg_original_pytorch_to_hf.py function get_clipseg_config (line 35) | def get_clipseg_config(model_name): function rename_key (line 51) | def rename_key(name): function convert_state_dict (line 114) | def convert_state_dict(orig_state_dict, config): function prepare_img (line 161) | def prepare_img(): function convert_clipseg_checkpoint (line 167) | def convert_clipseg_checkpoint(model_name, checkpoint_path, pytorch_dump... FILE: transformers/models/clipseg/modeling_clipseg.py function _expand_mask (line 51) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 67) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clipseg_loss (line 72) | def clipseg_loss(similarity: torch.Tensor) -> torch.Tensor: class CLIPSegOutput (line 80) | class CLIPSegOutput(ModelOutput): method to_tuple (line 110) | def to_tuple(self) -> Tuple[Any]: class CLIPSegDecoderOutput (line 118) | class CLIPSegDecoderOutput(ModelOutput): class CLIPSegImageSegmentationOutput (line 138) | class CLIPSegImageSegmentationOutput(ModelOutput): method to_tuple (line 155) | def to_tuple(self) -> Tuple[Any]: class CLIPSegVisionEmbeddings (line 162) | class CLIPSegVisionEmbeddings(nn.Module): method __init__ (line 164) | def __init__(self, config: CLIPSegVisionConfig): method interpolate_position_embeddings (line 186) | def interpolate_position_embeddings(self, new_size): method forward (line 205) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class CLIPSegTextEmbeddings (line 224) | class CLIPSegTextEmbeddings(nn.Module): method __init__ (line 225) | def __init__(self, config: CLIPSegTextConfig): method forward (line 235) | def forward( class CLIPSegAttention (line 256) | class CLIPSegAttention(nn.Module): method __init__ (line 259) | def __init__(self, config): method _shape (line 278) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 281) | def forward( class CLIPSegMLP (line 361) | class CLIPSegMLP(nn.Module): method __init__ (line 362) | def __init__(self, config): method forward (line 369) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CLIPSegEncoderLayer (line 377) | class CLIPSegEncoderLayer(nn.Module): method __init__ (line 378) | def __init__(self, config: CLIPSegConfig): method forward (line 386) | def forward( class CLIPSegPreTrainedModel (line 427) | class CLIPSegPreTrainedModel(PreTrainedModel): method _init_weights (line 438) | def _init_weights(self, module): method _set_gradient_checkpointing (line 481) | def _set_gradient_checkpointing(self, module, value=False): class CLIPSegEncoder (line 583) | class CLIPSegEncoder(nn.Module): method __init__ (line 592) | def __init__(self, config: CLIPSegConfig): method forward (line 598) | def forward( function _make_causal_mask (line 687) | def _make_causal_mask( class CLIPSegTextTransformer (line 704) | class CLIPSegTextTransformer(nn.Module): method __init__ (line 706) | def __init__(self, config: CLIPSegTextConfig): method forward (line 717) | def forward( class CLIPSegTextModel (line 783) | class CLIPSegTextModel(CLIPSegPreTrainedModel): method __init__ (line 788) | def __init__(self, config: CLIPSegTextConfig): method get_input_embeddings (line 794) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 797) | def set_input_embeddings(self, value): method forward (line 802) | def forward( class CLIPSegVisionTransformer (line 838) | class CLIPSegVisionTransformer(nn.Module): method __init__ (line 840) | def __init__(self, config: CLIPSegVisionConfig): method forward (line 853) | def forward( class CLIPSegVisionModel (line 898) | class CLIPSegVisionModel(CLIPSegPreTrainedModel): method __init__ (line 902) | def __init__(self, config: CLIPSegVisionConfig): method get_input_embeddings (line 908) | def get_input_embeddings(self) -> nn.Module: method forward (line 913) | def forward( class CLIPSegModel (line 951) | class CLIPSegModel(CLIPSegPreTrainedModel): method __init__ (line 954) | def __init__(self, config: CLIPSegConfig): method get_text_features (line 987) | def get_text_features( method get_image_features (line 1034) | def get_image_features( method forward (line 1084) | def forward( class CLIPSegDecoderLayer (line 1176) | class CLIPSegDecoderLayer(nn.Module): method __init__ (line 1183) | def __init__(self, config: CLIPSegConfig): method forward (line 1191) | def forward( class CLIPSegDecoder (line 1233) | class CLIPSegDecoder(CLIPSegPreTrainedModel): method __init__ (line 1234) | def __init__(self, config: CLIPSegConfig): method forward (line 1276) | def forward( class CLIPSegForImageSegmentation (line 1339) | class CLIPSegForImageSegmentation(CLIPSegPreTrainedModel): method __init__ (line 1342) | def __init__(self, config: CLIPSegConfig): method get_conditional_embeddings (line 1355) | def get_conditional_embeddings( method forward (line 1386) | def forward( FILE: transformers/models/clipseg/processing_clipseg.py class CLIPSegProcessor (line 25) | class CLIPSegProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 59) | def __call__(self, text=None, images=None, visual_prompt=None, return_... method batch_decode (line 132) | def batch_decode(self, *args, **kwargs): method decode (line 139) | def decode(self, *args, **kwargs): method feature_extractor_class (line 147) | def feature_extractor_class(self): method feature_extractor (line 155) | def feature_extractor(self): FILE: transformers/models/codegen/configuration_codegen.py class CodeGenConfig (line 44) | class CodeGenConfig(PretrainedConfig): method __init__ (line 107) | def __init__( class CodeGenOnnxConfig (line 154) | class CodeGenOnnxConfig(OnnxConfigWithPast): method __init__ (line 155) | def __init__( method inputs (line 168) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 179) | def num_layers(self) -> int: method num_attention_heads (line 183) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 186) | def generate_dummy_inputs( method default_onnx_opset (line 231) | def default_onnx_opset(self) -> int: FILE: transformers/models/codegen/modeling_codegen.py function create_sinusoidal_positions (line 55) | def create_sinusoidal_positions(num_pos: int, dim: int) -> torch.Tensor: function rotate_every_two (line 62) | def rotate_every_two(x: torch.Tensor) -> torch.Tensor: function apply_rotary_pos_emb (line 70) | def apply_rotary_pos_emb(tensor: torch.Tensor, sin: torch.Tensor, cos: t... class CodeGenAttention (line 76) | class CodeGenAttention(nn.Module): method __init__ (line 77) | def __init__(self, config): method _split_heads (line 107) | def _split_heads(self, x, n_head, dim_head, mp_num): method _merge_heads (line 112) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 125) | def _attn( method forward (line 166) | def forward( class CodeGenMLP (line 245) | class CodeGenMLP(nn.Module): method __init__ (line 246) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 256) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class CodeGenBlock (line 265) | class CodeGenBlock(nn.Module): method __init__ (line 266) | def __init__(self, config): method forward (line 273) | def forward( class CodeGenPreTrainedModel (line 308) | class CodeGenPreTrainedModel(PreTrainedModel): method __init__ (line 320) | def __init__(self, *inputs, **kwargs): method _init_weights (line 323) | def _init_weights(self, module): method _set_gradient_checkpointing (line 339) | def _set_gradient_checkpointing(self, module, value=False): class CodeGenModel (line 409) | class CodeGenModel(CodeGenPreTrainedModel): method __init__ (line 410) | def __init__(self, config): method get_input_embeddings (line 426) | def get_input_embeddings(self): method set_input_embeddings (line 429) | def set_input_embeddings(self, new_embeddings): method forward (line 438) | def forward( class CodeGenForCausalLM (line 602) | class CodeGenForCausalLM(CodeGenPreTrainedModel): method __init__ (line 605) | def __init__(self, config): method get_output_embeddings (line 613) | def get_output_embeddings(self): method set_output_embeddings (line 616) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 619) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 652) | def forward( method _reorder_cache (line 721) | def _reorder_cache( FILE: transformers/models/codegen/tokenization_codegen.py function bytes_to_unicode (line 60) | def bytes_to_unicode(): function get_pairs (line 84) | def get_pairs(word): class CodeGenTokenizer (line 98) | class CodeGenTokenizer(PreTrainedTokenizer): method __init__ (line 153) | def __init__( method vocab_size (line 199) | def vocab_size(self): method get_vocab (line 202) | def get_vocab(self): method bpe (line 205) | def bpe(self, token): method build_inputs_with_special_tokens (line 247) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method _tokenize (line 260) | def _tokenize(self, text): method _convert_token_to_id (line 270) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 274) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 278) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 284) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 313) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method decode (line 319) | def decode( method truncate (line 363) | def truncate(self, completion, truncate_before_pattern): FILE: transformers/models/codegen/tokenization_codegen_fast.py class CodeGenTokenizerFast (line 63) | class CodeGenTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 122) | def __init__( method _batch_encode_plus (line 163) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 172) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 182) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method decode (line 186) | def decode( method truncate (line 231) | def truncate(self, completion, truncate_before_pattern): FILE: transformers/models/conditional_detr/configuration_conditional_detr.py class ConditionalDetrConfig (line 37) | class ConditionalDetrConfig(PretrainedConfig): method __init__ (line 145) | def __init__( method num_attention_heads (line 234) | def num_attention_heads(self) -> int: method hidden_size (line 238) | def hidden_size(self) -> int: class ConditionalDetrOnnxConfig (line 242) | class ConditionalDetrOnnxConfig(OnnxConfig): method inputs (line 246) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 255) | def atol_for_validation(self) -> float: method default_onnx_opset (line 259) | def default_onnx_opset(self) -> int: FILE: transformers/models/conditional_detr/convert_conditional_detr_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 178) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 183) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 195) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 215) | def prepare_img(): function convert_conditional_detr_checkpoint (line 223) | def convert_conditional_detr_checkpoint(model_name, pytorch_dump_folder_... FILE: transformers/models/conditional_detr/feature_extraction_conditional_detr.py class ConditionalDetrFeatureExtractor (line 26) | class ConditionalDetrFeatureExtractor(ConditionalDetrImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/conditional_detr/image_processing_conditional_detr.py class AnnotionFormat (line 86) | class AnnotionFormat(ExplicitEnum): function get_size_with_aspect_ratio (line 95) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 127) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 151) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 176) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 190) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 205) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 213) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 229) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function convert_coco_poly_to_mask (line 246) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 281) | def prepare_coco_detection_annotation(image, target, return_segmentation... function masks_to_boxes (line 334) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 369) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 407) | def get_segmentation_image( function get_mask_area (line 433) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 443) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 452) | def post_process_panoptic_sample( function resize_annotation (line 539) | def resize_annotation( function binary_mask_to_rle (line 591) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 614) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 636) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 665) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 684) | def compute_segments( class ConditionalDetrImageProcessor (line 744) | class ConditionalDetrImageProcessor(BaseImageProcessor): method __init__ (line 782) | def __init__( method max_size (line 825) | def max_size(self): method from_dict (line 834) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 848) | def prepare_annotation( method prepare (line 874) | def prepare(self, image, target, return_segmentation_masks=False, mask... method convert_coco_poly_to_mask (line 884) | def convert_coco_poly_to_mask(self, *args, **kwargs): method prepare_coco_detection (line 891) | def prepare_coco_detection(self, *args, **kwargs): method prepare_coco_panoptic (line 898) | def prepare_coco_panoptic(self, *args, **kwargs): method resize (line 905) | def resize( method resize_annotation (line 939) | def resize_annotation( method rescale (line 953) | def rescale( method normalize (line 962) | def normalize( method normalize_annotation (line 975) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method pad_and_create_pixel_mask (line 983) | def pad_and_create_pixel_mask( method _pad_image (line 1017) | def _pad_image( method pad (line 1039) | def pad( method preprocess (line 1078) | def preprocess( method post_process (line 1284) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 1330) | def post_process_object_detection( method post_process_semantic_segmentation (line 1389) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... method post_process_instance_segmentation (line 1438) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1523) | def post_process_panoptic_segmentation( FILE: transformers/models/conditional_detr/modeling_conditional_detr.py class ConditionalDetrDecoderOutput (line 65) | class ConditionalDetrDecoderOutput(BaseModelOutputWithCrossAttentions): class ConditionalDetrModelOutput (line 97) | class ConditionalDetrModelOutput(Seq2SeqModelOutput): class ConditionalDetrObjectDetectionOutput (line 140) | class ConditionalDetrObjectDetectionOutput(ModelOutput): class ConditionalDetrSegmentationOutput (line 204) | class ConditionalDetrSegmentationOutput(ModelOutput): class ConditionalDetrFrozenBatchNorm2d (line 274) | class ConditionalDetrFrozenBatchNorm2d(nn.Module): method __init__ (line 282) | def __init__(self, n): method _load_from_state_dict (line 289) | def _load_from_state_dict( method forward (line 300) | def forward(self, x): function replace_batch_norm (line 314) | def replace_batch_norm(m, name=""): class ConditionalDetrConvEncoder (line 330) | class ConditionalDetrConvEncoder(nn.Module): method __init__ (line 338) | def __init__(self, config): method forward (line 377) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class ConditionalDetrConvModel (line 390) | class ConditionalDetrConvModel(nn.Module): method __init__ (line 395) | def __init__(self, conv_encoder, position_embedding): method forward (line 400) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 412) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class ConditionalDetrSinePositionEmbedding (line 427) | class ConditionalDetrSinePositionEmbedding(nn.Module): method __init__ (line 433) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 444) | def forward(self, pixel_values, pixel_mask): class ConditionalDetrLearnedPositionEmbedding (line 465) | class ConditionalDetrLearnedPositionEmbedding(nn.Module): method __init__ (line 470) | def __init__(self, embedding_dim=256): method forward (line 475) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 489) | def build_position_encoding(config): function gen_sine_position_embeddings (line 503) | def gen_sine_position_embeddings(pos_tensor): function inverse_sigmoid (line 517) | def inverse_sigmoid(x, eps=1e-5): class DetrAttention (line 525) | class DetrAttention(nn.Module): method __init__ (line 532) | def __init__( method _shape (line 557) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 560) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 563) | def forward( class ConditionalDetrAttention (line 656) | class ConditionalDetrAttention(nn.Module): method __init__ (line 664) | def __init__( method _qk_shape (line 693) | def _qk_shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method _v_shape (line 696) | def _v_shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 699) | def forward( class ConditionalDetrEncoderLayer (line 774) | class ConditionalDetrEncoderLayer(nn.Module): method __init__ (line 775) | def __init__(self, config: ConditionalDetrConfig): method forward (line 791) | def forward( class ConditionalDetrDecoderLayer (line 844) | class ConditionalDetrDecoderLayer(nn.Module): method __init__ (line 845) | def __init__(self, config: ConditionalDetrConfig): method forward (line 886) | def forward( class ConditionalDetrClassificationHead (line 1016) | class ConditionalDetrClassificationHead(nn.Module): method __init__ (line 1019) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 1025) | def forward(self, hidden_states: torch.Tensor): class MLP (line 1035) | class MLP(nn.Module): method __init__ (line 1044) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1050) | def forward(self, x): class ConditionalDetrPreTrainedModel (line 1057) | class ConditionalDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1062) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1085) | def _set_gradient_checkpointing(self, module, value=False): class ConditionalDetrEncoder (line 1146) | class ConditionalDetrEncoder(ConditionalDetrPreTrainedModel): method __init__ (line 1161) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1174) | def forward( class ConditionalDetrDecoder (line 1255) | class ConditionalDetrDecoder(ConditionalDetrPreTrainedModel): method __init__ (line 1270) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1290) | def forward( class ConditionalDetrModel (line 1477) | class ConditionalDetrModel(ConditionalDetrPreTrainedModel): method __init__ (line 1478) | def __init__(self, config: ConditionalDetrConfig): method get_encoder (line 1497) | def get_encoder(self): method get_decoder (line 1500) | def get_decoder(self): method freeze_backbone (line 1503) | def freeze_backbone(self): method unfreeze_backbone (line 1507) | def unfreeze_backbone(self): method forward (line 1513) | def forward( class ConditionalDetrForObjectDetection (line 1646) | class ConditionalDetrForObjectDetection(ConditionalDetrPreTrainedModel): method __init__ (line 1647) | def __init__(self, config: ConditionalDetrConfig): method _set_aux_loss (line 1666) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1674) | def forward( class ConditionalDetrForSegmentation (line 1834) | class ConditionalDetrForSegmentation(ConditionalDetrPreTrainedModel): method __init__ (line 1835) | def __init__(self, config: ConditionalDetrConfig): method forward (line 1858) | def forward( function _expand (line 2068) | def _expand(tensor, length: int): class ConditionalDetrMaskHeadSmallConv (line 2073) | class ConditionalDetrMaskHeadSmallConv(nn.Module): method __init__ (line 2078) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 2112) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class ConditionalDetrMHAttentionMap (line 2154) | class ConditionalDetrMHAttentionMap(nn.Module): method __init__ (line 2157) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 2168) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 2183) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2203) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class ConditionalDetrLoss (line 2234) | class ConditionalDetrLoss(nn.Module): method __init__ (line 2252) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2260) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2295) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2311) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2336) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2370) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2377) | def _get_target_permutation_idx(self, indices): method get_loss (line 2384) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2396) | def forward(self, outputs, targets): class ConditionalDetrMLPPredictionHead (line 2442) | class ConditionalDetrMLPPredictionHead(nn.Module): method __init__ (line 2451) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2457) | def forward(self, x): class ConditionalDetrHungarianMatcher (line 2464) | class ConditionalDetrHungarianMatcher(nn.Module): method __init__ (line 2481) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2492) | def forward(self, outputs, targets): function _upcast (line 2545) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2554) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2571) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2588) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2613) | def _max_by_axis(the_list): class NestedTensor (line 2623) | class NestedTensor(object): method __init__ (line 2624) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2628) | def to(self, device): method decompose (line 2637) | def decompose(self): method __repr__ (line 2640) | def __repr__(self): function nested_tensor_from_tensor_list (line 2645) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: transformers/models/convbert/configuration_convbert.py class ConvBertConfig (line 37) | class ConvBertConfig(PretrainedConfig): method __init__ (line 101) | def __init__( class ConvBertOnnxConfig (line 152) | class ConvBertOnnxConfig(OnnxConfig): method inputs (line 154) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/convbert/convert_convbert_original_tf1_checkpoint_to_pytorch_and_tf2.py function convert_orig_tf1_checkpoint_to_pytorch (line 26) | def convert_orig_tf1_checkpoint_to_pytorch(tf_checkpoint_path, convbert_... FILE: transformers/models/convbert/modeling_convbert.py function load_tf_weights_in_convbert (line 56) | def load_tf_weights_in_convbert(model, config, tf_checkpoint_path): class ConvBertEmbeddings (line 180) | class ConvBertEmbeddings(nn.Module): method __init__ (line 183) | def __init__(self, config): method forward (line 199) | def forward( class ConvBertPreTrainedModel (line 238) | class ConvBertPreTrainedModel(PreTrainedModel): method _init_weights (line 251) | def _init_weights(self, module): method _set_gradient_checkpointing (line 267) | def _set_gradient_checkpointing(self, module, value=False): class SeparableConv1D (line 272) | class SeparableConv1D(nn.Module): method __init__ (line 275) | def __init__(self, config, input_filters, output_filters, kernel_size,... method forward (line 291) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertSelfAttention (line 298) | class ConvBertSelfAttention(nn.Module): method __init__ (line 299) | def __init__(self, config): method transpose_for_scores (line 338) | def transpose_for_scores(self, x): method forward (line 343) | def forward( class ConvBertSelfOutput (line 426) | class ConvBertSelfOutput(nn.Module): method __init__ (line 427) | def __init__(self, config): method forward (line 433) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ConvBertAttention (line 440) | class ConvBertAttention(nn.Module): method __init__ (line 441) | def __init__(self, config): method prune_heads (line 447) | def prune_heads(self, heads): method forward (line 465) | def forward( class GroupedLinearLayer (line 485) | class GroupedLinearLayer(nn.Module): method __init__ (line 486) | def __init__(self, input_size, output_size, num_groups): method forward (line 496) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertIntermediate (line 507) | class ConvBertIntermediate(nn.Module): method __init__ (line 508) | def __init__(self, config): method forward (line 521) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertOutput (line 527) | class ConvBertOutput(nn.Module): method __init__ (line 528) | def __init__(self, config): method forward (line 539) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ConvBertLayer (line 546) | class ConvBertLayer(nn.Module): method __init__ (line 547) | def __init__(self, config): method forward (line 561) | def forward( method feed_forward_chunk (line 601) | def feed_forward_chunk(self, attention_output): class ConvBertEncoder (line 607) | class ConvBertEncoder(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 614) | def forward( class ConvBertPredictionHeadTransform (line 682) | class ConvBertPredictionHeadTransform(nn.Module): method __init__ (line 683) | def __init__(self, config): method forward (line 692) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ConvBertModel (line 767) | class ConvBertModel(ConvBertPreTrainedModel): method __init__ (line 770) | def __init__(self, config): method get_input_embeddings (line 782) | def get_input_embeddings(self): method set_input_embeddings (line 785) | def set_input_embeddings(self, value): method _prune_heads (line 788) | def _prune_heads(self, heads_to_prune): method forward (line 802) | def forward( class ConvBertGeneratorPredictions (line 864) | class ConvBertGeneratorPredictions(nn.Module): method __init__ (line 867) | def __init__(self, config): method forward (line 873) | def forward(self, generator_hidden_states: torch.FloatTensor) -> torch... class ConvBertForMaskedLM (line 882) | class ConvBertForMaskedLM(ConvBertPreTrainedModel): method __init__ (line 885) | def __init__(self, config): method get_output_embeddings (line 895) | def get_output_embeddings(self): method set_output_embeddings (line 898) | def set_output_embeddings(self, word_embeddings): method forward (line 907) | def forward( class ConvBertClassificationHead (line 962) | class ConvBertClassificationHead(nn.Module): method __init__ (line 965) | def __init__(self, config): method forward (line 976) | def forward(self, hidden_states: torch.Tensor, **kwargs) -> torch.Tensor: class ConvBertForSequenceClassification (line 993) | class ConvBertForSequenceClassification(ConvBertPreTrainedModel): method __init__ (line 996) | def __init__(self, config): method forward (line 1012) | def forward( class ConvBertForMultipleChoice (line 1090) | class ConvBertForMultipleChoice(ConvBertPreTrainedModel): method __init__ (line 1093) | def __init__(self, config): method forward (line 1111) | def forward( class ConvBertForTokenClassification (line 1185) | class ConvBertForTokenClassification(ConvBertPreTrainedModel): method __init__ (line 1188) | def __init__(self, config): method forward (line 1208) | def forward( class ConvBertForQuestionAnswering (line 1268) | class ConvBertForQuestionAnswering(ConvBertPreTrainedModel): method __init__ (line 1271) | def __init__(self, config): method forward (line 1287) | def forward( FILE: transformers/models/convbert/modeling_tf_convbert.py class TFConvBertEmbeddings (line 71) | class TFConvBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 74) | def __init__(self, config: ConvBertConfig, **kwargs): method build (line 84) | def build(self, input_shape: tf.TensorShape): method call (line 109) | def call( class TFConvBertSelfAttention (line 150) | class TFConvBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 151) | def __init__(self, config, **kwargs): method transpose_for_scores (line 212) | def transpose_for_scores(self, x, batch_size): method call (line 217) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFConvBertSelfOutput (line 301) | class TFConvBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 302) | def __init__(self, config, **kwargs): method call (line 311) | def call(self, hidden_states, input_tensor, training=False): class TFConvBertAttention (line 319) | class TFConvBertAttention(tf.keras.layers.Layer): method __init__ (line 320) | def __init__(self, config, **kwargs): method prune_heads (line 326) | def prune_heads(self, heads): method call (line 329) | def call(self, input_tensor, attention_mask, head_mask, output_attenti... class GroupedLinearLayer (line 339) | class GroupedLinearLayer(tf.keras.layers.Layer): method __init__ (line 340) | def __init__(self, input_size, output_size, num_groups, kernel_initial... method build (line 349) | def build(self, input_shape=None): method call (line 362) | def call(self, hidden_states): class TFConvBertIntermediate (line 372) | class TFConvBertIntermediate(tf.keras.layers.Layer): method __init__ (line 373) | def __init__(self, config, **kwargs): method call (line 393) | def call(self, hidden_states): class TFConvBertOutput (line 400) | class TFConvBertOutput(tf.keras.layers.Layer): method __init__ (line 401) | def __init__(self, config, **kwargs): method call (line 419) | def call(self, hidden_states, input_tensor, training=False): class TFConvBertLayer (line 427) | class TFConvBertLayer(tf.keras.layers.Layer): method __init__ (line 428) | def __init__(self, config, **kwargs): method call (line 435) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFConvBertEncoder (line 447) | class TFConvBertEncoder(tf.keras.layers.Layer): method __init__ (line 448) | def __init__(self, config, **kwargs): method call (line 453) | def call( class TFConvBertPredictionHeadTransform (line 490) | class TFConvBertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 491) | def __init__(self, config, **kwargs): method call (line 505) | def call(self, hidden_states): class TFConvBertMainLayer (line 514) | class TFConvBertMainLayer(tf.keras.layers.Layer): method __init__ (line 517) | def __init__(self, config, **kwargs): method get_input_embeddings (line 528) | def get_input_embeddings(self): method set_input_embeddings (line 531) | def set_input_embeddings(self, value): method _prune_heads (line 535) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 542) | def get_extended_attention_mask(self, attention_mask, input_shape, dty... method get_head_mask (line 563) | def get_head_mask(self, head_mask): method call (line 572) | def call( class TFConvBertPreTrainedModel (line 620) | class TFConvBertPreTrainedModel(TFPreTrainedModel): class TFConvBertModel (line 732) | class TFConvBertModel(TFConvBertPreTrainedModel): method __init__ (line 733) | def __init__(self, config, *inputs, **kwargs): method call (line 745) | def call( class TFConvBertMaskedLMHead (line 774) | class TFConvBertMaskedLMHead(tf.keras.layers.Layer): method __init__ (line 775) | def __init__(self, config, input_embeddings, **kwargs): method build (line 782) | def build(self, input_shape): method get_output_embeddings (line 787) | def get_output_embeddings(self): method set_output_embeddings (line 790) | def set_output_embeddings(self, value): method get_bias (line 794) | def get_bias(self): method set_bias (line 797) | def set_bias(self, value): method call (line 801) | def call(self, hidden_states): class TFConvBertGeneratorPredictions (line 811) | class TFConvBertGeneratorPredictions(tf.keras.layers.Layer): method __init__ (line 812) | def __init__(self, config, **kwargs): method call (line 818) | def call(self, generator_hidden_states, training=False): class TFConvBertForMaskedLM (line 827) | class TFConvBertForMaskedLM(TFConvBertPreTrainedModel, TFMaskedLanguageM... method __init__ (line 828) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 842) | def get_lm_head(self): method get_prefix_bias_name (line 845) | def get_prefix_bias_name(self): method call (line 855) | def call( class TFConvBertClassificationHead (line 905) | class TFConvBertClassificationHead(tf.keras.layers.Layer): method __init__ (line 908) | def __init__(self, config, **kwargs): method call (line 924) | def call(self, hidden_states, **kwargs): class TFConvBertForSequenceClassification (line 941) | class TFConvBertForSequenceClassification(TFConvBertPreTrainedModel, TFS... method __init__ (line 942) | def __init__(self, config, *inputs, **kwargs): method call (line 955) | def call( class TFConvBertForMultipleChoice (line 1010) | class TFConvBertForMultipleChoice(TFConvBertPreTrainedModel, TFMultipleC... method __init__ (line 1011) | def __init__(self, config, *inputs, **kwargs): method call (line 1031) | def call( class TFConvBertForTokenClassification (line 1103) | class TFConvBertForTokenClassification(TFConvBertPreTrainedModel, TFToke... method __init__ (line 1104) | def __init__(self, config, *inputs, **kwargs): method call (line 1124) | def call( class TFConvBertForQuestionAnswering (line 1178) | class TFConvBertForQuestionAnswering(TFConvBertPreTrainedModel, TFQuesti... method __init__ (line 1179) | def __init__(self, config, *inputs, **kwargs): method call (line 1195) | def call( FILE: transformers/models/convbert/tokenization_convbert.py function load_vocab (line 54) | def load_vocab(vocab_file): function whitespace_tokenize (line 66) | def whitespace_tokenize(text): class ConvBertTokenizer (line 76) | class ConvBertTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method do_lower_case (line 170) | def do_lower_case(self): method vocab_size (line 174) | def vocab_size(self): method get_vocab (line 177) | def get_vocab(self): method _tokenize (line 180) | def _tokenize(self, text): method _convert_token_to_id (line 193) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 197) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 201) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 206) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 231) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 259) | def create_token_type_ids_from_sequences( method save_vocabulary (line 288) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 310) | class BasicTokenizer(object): method __init__ (line 330) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 338) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 375) | def _run_strip_accents(self, text): method _run_split_on_punc (line 386) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 408) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 421) | def _is_chinese_char(self, cp): method _clean_text (line 445) | def _clean_text(self, text): class WordpieceTokenizer (line 460) | class WordpieceTokenizer(object): method __init__ (line 463) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 468) | def tokenize(self, text): FILE: transformers/models/convbert/tokenization_convbert_fast.py class ConvBertTokenizerFast (line 55) | class ConvBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 101) | def __init__( method build_inputs_with_special_tokens (line 143) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 167) | def create_token_type_ids_from_sequences( method save_vocabulary (line 196) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/convnext/configuration_convnext.py class ConvNextConfig (line 36) | class ConvNextConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 92) | def __init__( class ConvNextOnnxConfig (line 128) | class ConvNextOnnxConfig(OnnxConfig): method inputs (line 132) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 140) | def atol_for_validation(self) -> float: FILE: transformers/models/convnext/convert_convnext_to_pytorch.py function get_convnext_config (line 37) | def get_convnext_config(checkpoint_url): function rename_key (line 82) | def rename_key(name): function prepare_img (line 115) | def prepare_img(): function convert_convnext_checkpoint (line 122) | def convert_convnext_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: transformers/models/convnext/feature_extraction_convnext.py class ConvNextFeatureExtractor (line 26) | class ConvNextFeatureExtractor(ConvNextImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/convnext/image_processing_convnext.py class ConvNextImageProcessor (line 50) | class ConvNextImageProcessor(BaseImageProcessor): method __init__ (line 88) | def __init__( method resize (line 116) | def resize( method rescale (line 161) | def rescale( method normalize (line 181) | def normalize( method preprocess (line 204) | def preprocess( FILE: transformers/models/convnext/modeling_convnext.py function drop_path (line 64) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class ConvNextDropPath (line 85) | class ConvNextDropPath(nn.Module): method __init__ (line 88) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 92) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 95) | def extra_repr(self) -> str: class ConvNextLayerNorm (line 99) | class ConvNextLayerNorm(nn.Module): method __init__ (line 105) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 115) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNextEmbeddings (line 129) | class ConvNextEmbeddings(nn.Module): method __init__ (line 134) | def __init__(self, config): method forward (line 142) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ConvNextLayer (line 153) | class ConvNextLayer(nn.Module): method __init__ (line 167) | def __init__(self, config, dim, drop_path=0): method forward (line 181) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextStage (line 197) | class ConvNextStage(nn.Module): method __init__ (line 208) | def __init__(self, config, in_channels, out_channels, kernel_size=2, s... method forward (line 223) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextEncoder (line 229) | class ConvNextEncoder(nn.Module): method __init__ (line 230) | def __init__(self, config): method forward (line 250) | def forward( class ConvNextPreTrainedModel (line 276) | class ConvNextPreTrainedModel(PreTrainedModel): method _init_weights (line 287) | def _init_weights(self, module): method _set_gradient_checkpointing (line 299) | def _set_gradient_checkpointing(self, module, value=False): class ConvNextModel (line 333) | class ConvNextModel(ConvNextPreTrainedModel): method __init__ (line 334) | def __init__(self, config): method forward (line 355) | def forward( class ConvNextForImageClassification (line 399) | class ConvNextForImageClassification(ConvNextPreTrainedModel): method __init__ (line 400) | def __init__(self, config): method forward (line 421) | def forward( class ConvNextBackbone (line 481) | class ConvNextBackbone(ConvNextPreTrainedModel, BackboneMixin): method __init__ (line 482) | def __init__(self, config): method forward (line 501) | def forward( FILE: transformers/models/convnext/modeling_tf_convnext.py class TFConvNextDropPath (line 47) | class TFConvNextDropPath(tf.keras.layers.Layer): method __init__ (line 53) | def __init__(self, drop_path, **kwargs): method call (line 57) | def call(self, x, training=None): class TFConvNextEmbeddings (line 67) | class TFConvNextEmbeddings(tf.keras.layers.Layer): method __init__ (line 72) | def __init__(self, config, **kwargs): method call (line 85) | def call(self, pixel_values): class TFConvNextLayer (line 105) | class TFConvNextLayer(tf.keras.layers.Layer): method __init__ (line 120) | def __init__(self, config, dim, drop_path=0.0, **kwargs): method build (line 158) | def build(self, input_shape: tf.TensorShape = None): method call (line 172) | def call(self, hidden_states, training=False): class TFConvNextStage (line 187) | class TFConvNextStage(tf.keras.layers.Layer): method __init__ (line 198) | def __init__( method call (line 236) | def call(self, hidden_states): class TFConvNextEncoder (line 244) | class TFConvNextEncoder(tf.keras.layers.Layer): method __init__ (line 245) | def __init__(self, config, **kwargs): method call (line 266) | def call(self, hidden_states, output_hidden_states=False, return_dict=... class TFConvNextMainLayer (line 285) | class TFConvNextMainLayer(tf.keras.layers.Layer): method __init__ (line 288) | def __init__(self, config: ConvNextConfig, add_pooling_layer: bool = T... method call (line 300) | def call( class TFConvNextPreTrainedModel (line 344) | class TFConvNextPreTrainedModel(TFPreTrainedModel): class TFConvNextModel (line 416) | class TFConvNextModel(TFConvNextPreTrainedModel): method __init__ (line 417) | def __init__(self, config, *inputs, add_pooling_layer=True, **kwargs): method call (line 424) | def call( class TFConvNextForImageClassification (line 483) | class TFConvNextForImageClassification(TFConvNextPreTrainedModel, TFSequ... method __init__ (line 484) | def __init__(self, config: ConvNextConfig, *inputs, **kwargs): method call (line 501) | def call( FILE: transformers/models/convnextv2/configuration_convnextv2.py class ConvNextV2Config (line 30) | class ConvNextV2Config(BackboneConfigMixin, PretrainedConfig): method __init__ (line 84) | def __init__( FILE: transformers/models/convnextv2/convert_convnextv2_to_pytorch.py function get_convnextv2_config (line 37) | def get_convnextv2_config(checkpoint_url): function rename_key (line 82) | def rename_key(name): function prepare_img (line 117) | def prepare_img(): function convert_preprocessor (line 123) | def convert_preprocessor(checkpoint_url): function convert_convnextv2_checkpoint (line 144) | def convert_convnextv2_checkpoint(checkpoint_url, pytorch_dump_folder_pa... FILE: transformers/models/convnextv2/modeling_convnextv2.py function drop_path (line 64) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class ConvNextV2DropPath (line 85) | class ConvNextV2DropPath(nn.Module): method __init__ (line 88) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 92) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 95) | def extra_repr(self) -> str: class ConvNextV2GRN (line 99) | class ConvNextV2GRN(nn.Module): method __init__ (line 102) | def __init__(self, dim: int): method forward (line 107) | def forward(self, hidden_states: torch.FloatTensor) -> torch.FloatTensor: class ConvNextV2LayerNorm (line 117) | class ConvNextV2LayerNorm(nn.Module): method __init__ (line 123) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 133) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNextV2Embeddings (line 148) | class ConvNextV2Embeddings(nn.Module): method __init__ (line 153) | def __init__(self, config): method forward (line 161) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class ConvNextV2Layer (line 172) | class ConvNextV2Layer(nn.Module): method __init__ (line 186) | def __init__(self, config, dim, drop_path=0): method forward (line 198) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextV2Stage (line 216) | class ConvNextV2Stage(nn.Module): method __init__ (line 227) | def __init__(self, config, in_channels, out_channels, kernel_size=2, s... method forward (line 242) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class ConvNextV2Encoder (line 249) | class ConvNextV2Encoder(nn.Module): method __init__ (line 250) | def __init__(self, config): method forward (line 270) | def forward( class ConvNextV2PreTrainedModel (line 297) | class ConvNextV2PreTrainedModel(PreTrainedModel): method _init_weights (line 308) | def _init_weights(self, module): method _set_gradient_checkpointing (line 320) | def _set_gradient_checkpointing(self, module, value=False): class ConvNextV2Model (line 354) | class ConvNextV2Model(ConvNextV2PreTrainedModel): method __init__ (line 355) | def __init__(self, config): method forward (line 376) | def forward( class ConvNextV2ForImageClassification (line 421) | class ConvNextV2ForImageClassification(ConvNextV2PreTrainedModel): method __init__ (line 422) | def __init__(self, config): method forward (line 443) | def forward( class ConvNextV2Backbone (line 504) | class ConvNextV2Backbone(ConvNextV2PreTrainedModel, BackboneMixin): method __init__ (line 505) | def __init__(self, config): method forward (line 524) | def forward( FILE: transformers/models/cpm/tokenization_cpm.py class CpmTokenizer (line 38) | class CpmTokenizer(PreTrainedTokenizer): method __init__ (line 41) | def __init__( method vocab_size (line 162) | def vocab_size(self): method get_vocab (line 166) | def get_vocab(self): method __getstate__ (line 172) | def __getstate__(self): method __setstate__ (line 178) | def __setstate__(self, d): method preprocess_text (line 189) | def preprocess_text(self, inputs): method _tokenize (line 205) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 226) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 231) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 236) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 242) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 268) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 297) | def create_token_type_ids_from_sequences( method save_vocabulary (line 328) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _decode (line 345) | def _decode(self, *args, **kwargs): FILE: transformers/models/cpm/tokenization_cpm_fast.py class CpmTokenizerFast (line 38) | class CpmTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 41) | def __init__( method build_inputs_with_special_tokens (line 157) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 183) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _batch_encode_plus (line 233) | def _batch_encode_plus(self, batch_text_or_text_pairs, *args, **kwargs): method _decode (line 240) | def _decode(self, *args, **kwargs): FILE: transformers/models/cpmant/configuration_cpmant.py class CpmAntConfig (line 29) | class CpmAntConfig(PretrainedConfig): method __init__ (line 89) | def __init__( FILE: transformers/models/cpmant/modeling_cpmant.py class CpmAntLayerNorm (line 45) | class CpmAntLayerNorm(nn.Module): method __init__ (line 50) | def __init__(self, config: CpmAntConfig): method forward (line 57) | def forward(self, hidden_states: torch.Tensor): class CpmAntAttention (line 70) | class CpmAntAttention(nn.Module): method __init__ (line 71) | def __init__(self, config: CpmAntConfig): method forward (line 90) | def forward( class CpmAntSelfAttentionBlock (line 174) | class CpmAntSelfAttentionBlock(nn.Module): method __init__ (line 175) | def __init__(self, config: CpmAntConfig): method forward (line 184) | def forward( class CpmAntDenseGatedACT (line 223) | class CpmAntDenseGatedACT(nn.Module): method __init__ (line 224) | def __init__(self, config: CpmAntConfig): method forward (line 230) | def forward(self, hidden_states: torch.Tensor): class CpmAntFeedForward (line 243) | class CpmAntFeedForward(nn.Module): method __init__ (line 244) | def __init__(self, config: CpmAntConfig): method forward (line 254) | def forward(self, hidden_states: torch.Tensor): class CpmAntFFNBlock (line 269) | class CpmAntFFNBlock(nn.Module): method __init__ (line 270) | def __init__(self, config: CpmAntConfig): method forward (line 279) | def forward( class CpmAntTransformerBlock (line 296) | class CpmAntTransformerBlock(nn.Module): method __init__ (line 297) | def __init__(self, config: CpmAntConfig): method forward (line 302) | def forward( class CpmAntEncoder (line 343) | class CpmAntEncoder(nn.Module): method __init__ (line 344) | def __init__(self, config: CpmAntConfig): method forward (line 351) | def forward( class CpmAntIntermediate (line 409) | class CpmAntIntermediate(nn.Module): method __init__ (line 410) | def __init__(self, config): method forward (line 418) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class CpmAntSegmentPositionEmbedding (line 424) | class CpmAntSegmentPositionEmbedding(nn.Module): method __init__ (line 425) | def __init__(self, config: CpmAntConfig): method forward (line 440) | def forward( method _segment_relative_position_bucket (line 492) | def _segment_relative_position_bucket(self, query_segment, key_segment): method _position_bucket (line 495) | def _position_bucket(self, relative_position, num_buckets=32, max_dist... class CpmAntOutput (line 517) | class CpmAntOutput(nn.Module): method __init__ (line 518) | def __init__(self, config): method forward (line 524) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class CpmAntPreTrainedModel (line 531) | class CpmAntPreTrainedModel(PreTrainedModel): method _init_weights (line 542) | def _init_weights(self, module): method _set_gradient_checkpointing (line 560) | def _set_gradient_checkpointing(self, module, value=False): class CpmAntModel (line 604) | class CpmAntModel(CpmAntPreTrainedModel): method __init__ (line 605) | def __init__(self, config: CpmAntConfig): method get_input_embeddings (line 618) | def get_input_embeddings(self): method set_input_embeddings (line 621) | def set_input_embeddings(self, embeddings, **kwargs): method _prepare_attention_mask (line 624) | def _prepare_attention_mask(self, input_ids, span, context, length): method forward (line 648) | def forward( class CpmAntForCausalLM (line 751) | class CpmAntForCausalLM(CpmAntPreTrainedModel): method __init__ (line 754) | def __init__(self, config: CpmAntConfig): method forward (line 770) | def forward( method get_input_embeddings (line 851) | def get_input_embeddings(self): method set_input_embeddings (line 854) | def set_input_embeddings(self, embeddings): method get_output_embeddings (line 857) | def get_output_embeddings(self): method set_output_embeddings (line 860) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 863) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method _reorder_cache (line 875) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/cpmant/tokenization_cpmant.py function load_vocab (line 45) | def load_vocab(vocab_file): class WordpieceTokenizer (line 56) | class WordpieceTokenizer(object): method __init__ (line 57) | def __init__(self, vocab, unk_token="", max_input_chars_per_word=... method tokenize (line 62) | def tokenize(self, token): class CpmAntTokenizer (line 88) | class CpmAntTokenizer(PreTrainedTokenizer): method __init__ (line 119) | def __init__( method bod_token_id (line 161) | def bod_token_id(self): method eod_token_id (line 165) | def eod_token_id(self): method newline_id (line 169) | def newline_id(self): method vocab_size (line 173) | def vocab_size(self) -> int: method get_vocab (line 176) | def get_vocab(self): method _tokenize (line 179) | def _tokenize(self, text): method _decode (line 186) | def _decode(self, token_ids, **kwargs): method check (line 194) | def check(self, token): method convert_tokens_to_string (line 197) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _convert_token_to_id (line 200) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 204) | def _convert_id_to_token(self, index): method save_vocabulary (line 208) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 235) | def build_inputs_with_special_tokens(self, token_ids_0: List[int], tok... method get_special_tokens_mask (line 253) | def get_special_tokens_mask( FILE: transformers/models/ctrl/configuration_ctrl.py class CTRLConfig (line 26) | class CTRLConfig(PretrainedConfig): method __init__ (line 87) | def __init__( FILE: transformers/models/ctrl/modeling_ctrl.py function angle_defn (line 42) | def angle_defn(pos, i, d_model_size): function positional_encoding (line 47) | def positional_encoding(position, d_model_size, dtype): function scaled_dot_product_attention (line 62) | def scaled_dot_product_attention(q, k, v, mask, attention_mask=None, hea... class MultiHeadAttention (line 88) | class MultiHeadAttention(nn.Module): method __init__ (line 89) | def __init__(self, d_model_size, num_heads): method prune_heads (line 103) | def prune_heads(self, heads): method split_into_heads (line 120) | def split_into_heads(self, x, batch_size): method forward (line 124) | def forward( function point_wise_feed_forward_network (line 167) | def point_wise_feed_forward_network(d_model_size, dff): class EncoderLayer (line 171) | class EncoderLayer(nn.Module): method __init__ (line 172) | def __init__(self, d_model_size, num_heads, dff, rate=0.1): method forward (line 184) | def forward( class CTRLPreTrainedModel (line 212) | class CTRLPreTrainedModel(PreTrainedModel): method _init_weights (line 221) | def _init_weights(self, module): class CTRLModel (line 319) | class CTRLModel(CTRLPreTrainedModel): method __init__ (line 320) | def __init__(self, config): method get_input_embeddings (line 339) | def get_input_embeddings(self): method set_input_embeddings (line 342) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 345) | def _prune_heads(self, heads_to_prune): method forward (line 354) | def forward( class CTRLLMHeadModel (line 511) | class CTRLLMHeadModel(CTRLPreTrainedModel): method __init__ (line 514) | def __init__(self, config): method get_output_embeddings (line 522) | def get_output_embeddings(self): method set_output_embeddings (line 525) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 528) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 537) | def forward( method _reorder_cache (line 627) | def _reorder_cache( class CTRLForSequenceClassification (line 653) | class CTRLForSequenceClassification(CTRLPreTrainedModel): method __init__ (line 654) | def __init__(self, config): method forward (line 665) | def forward( FILE: transformers/models/ctrl/modeling_tf_ctrl.py function angle_defn (line 54) | def angle_defn(pos, i, d_model_size): function positional_encoding (line 59) | def positional_encoding(position, d_model_size): function scaled_dot_product_attention (line 70) | def scaled_dot_product_attention(q, k, v, mask, attention_mask=None, hea... class TFMultiHeadAttention (line 96) | class TFMultiHeadAttention(tf.keras.layers.Layer): method __init__ (line 97) | def __init__(self, d_model_size, num_heads, output_attentions=False, *... method split_into_heads (line 111) | def split_into_heads(self, x, batch_size): method call (line 115) | def call(self, v, k, q, mask, layer_past, attention_mask, head_mask, u... class TFPointWiseFeedForwardLayer (line 149) | class TFPointWiseFeedForwardLayer(tf.keras.layers.Layer): method __init__ (line 150) | def __init__(self, d_model_size, dff, **kwargs): method call (line 156) | def call(self, inputs, trainable=False): class TFEncoderLayer (line 163) | class TFEncoderLayer(tf.keras.layers.Layer): method __init__ (line 164) | def __init__( method call (line 182) | def call(self, x, mask, layer_past, attention_mask, head_mask, use_cac... class TFCTRLMainLayer (line 210) | class TFCTRLMainLayer(tf.keras.layers.Layer): method __init__ (line 213) | def __init__(self, config, **kwargs): method get_input_embeddings (line 246) | def get_input_embeddings(self): method set_input_embeddings (line 249) | def set_input_embeddings(self, value): method _prune_heads (line 253) | def _prune_heads(self, heads_to_prune): method call (line 260) | def call( class TFCTRLPreTrainedModel (line 401) | class TFCTRLPreTrainedModel(TFPreTrainedModel): class TFCTRLModel (line 524) | class TFCTRLModel(TFCTRLPreTrainedModel): method __init__ (line 525) | def __init__(self, config, *inputs, **kwargs): method call (line 536) | def call( class TFCTRLLMHead (line 568) | class TFCTRLLMHead(tf.keras.layers.Layer): method __init__ (line 569) | def __init__(self, config, input_embeddings, **kwargs): method build (line 579) | def build(self, input_shape=None): method get_output_embeddings (line 583) | def get_output_embeddings(self): method set_output_embeddings (line 586) | def set_output_embeddings(self, value): method get_bias (line 590) | def get_bias(self): method set_bias (line 593) | def set_bias(self, value): method call (line 597) | def call(self, hidden_states): class TFCTRLLMHeadModel (line 610) | class TFCTRLLMHeadModel(TFCTRLPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 611) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 619) | def get_lm_head(self): method get_prefix_bias_name (line 622) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 626) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 640) | def call( class TFCTRLForSequenceClassification (line 715) | class TFCTRLForSequenceClassification(TFCTRLPreTrainedModel, TFSequenceC... method __init__ (line 716) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 727) | def get_output_embeddings(self): method call (line 737) | def call( FILE: transformers/models/ctrl/tokenization_ctrl.py function get_pairs (line 103) | def get_pairs(word): class CTRLTokenizer (line 119) | class CTRLTokenizer(PreTrainedTokenizer): method __init__ (line 141) | def __init__(self, vocab_file, merges_file, unk_token="", **kwargs): method vocab_size (line 154) | def vocab_size(self): method get_vocab (line 157) | def get_vocab(self): method bpe (line 160) | def bpe(self, token): method _tokenize (line 204) | def _tokenize(self, text): method _convert_token_to_id (line 214) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 218) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 222) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 227) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/cvt/configuration_cvt.py class CvtConfig (line 29) | class CvtConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: transformers/models/cvt/convert_cvt_original_pytorch_checkpoint_to_pytorch.py function embeddings (line 30) | def embeddings(idx): function attention (line 65) | def attention(idx, cnt): function cls_token (line 257) | def cls_token(idx): function final (line 266) | def final(): function convert_cvt_checkpoint (line 278) | def convert_cvt_checkpoint(cvt_model, image_size, cvt_file_name, pytorch... FILE: transformers/models/cvt/modeling_cvt.py class BaseModelOutputWithCLSToken (line 60) | class BaseModelOutputWithCLSToken(ModelOutput): function drop_path (line 81) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class CvtDropPath (line 102) | class CvtDropPath(nn.Module): method __init__ (line 105) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 109) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 112) | def extra_repr(self) -> str: class CvtEmbeddings (line 116) | class CvtEmbeddings(nn.Module): method __init__ (line 121) | def __init__(self, patch_size, num_channels, embed_dim, stride, paddin... method forward (line 128) | def forward(self, pixel_values): class CvtConvEmbeddings (line 134) | class CvtConvEmbeddings(nn.Module): method __init__ (line 139) | def __init__(self, patch_size, num_channels, embed_dim, stride, padding): method forward (line 146) | def forward(self, pixel_values): class CvtSelfAttentionConvProjection (line 159) | class CvtSelfAttentionConvProjection(nn.Module): method __init__ (line 160) | def __init__(self, embed_dim, kernel_size, padding, stride): method forward (line 173) | def forward(self, hidden_state): class CvtSelfAttentionLinearProjection (line 179) | class CvtSelfAttentionLinearProjection(nn.Module): method forward (line 180) | def forward(self, hidden_state): class CvtSelfAttentionProjection (line 188) | class CvtSelfAttentionProjection(nn.Module): method __init__ (line 189) | def __init__(self, embed_dim, kernel_size, padding, stride, projection... method forward (line 195) | def forward(self, hidden_state): class CvtSelfAttention (line 201) | class CvtSelfAttention(nn.Module): method __init__ (line 202) | def __init__( method rearrange_for_multi_head_attention (line 243) | def rearrange_for_multi_head_attention(self, hidden_state): method forward (line 249) | def forward(self, hidden_state, height, width): class CvtSelfOutput (line 282) | class CvtSelfOutput(nn.Module): method __init__ (line 288) | def __init__(self, embed_dim, drop_rate): method forward (line 293) | def forward(self, hidden_state, input_tensor): class CvtAttention (line 299) | class CvtAttention(nn.Module): method __init__ (line 300) | def __init__( method prune_heads (line 332) | def prune_heads(self, heads): method forward (line 350) | def forward(self, hidden_state, height, width): class CvtIntermediate (line 356) | class CvtIntermediate(nn.Module): method __init__ (line 357) | def __init__(self, embed_dim, mlp_ratio): method forward (line 362) | def forward(self, hidden_state): class CvtOutput (line 368) | class CvtOutput(nn.Module): method __init__ (line 369) | def __init__(self, embed_dim, mlp_ratio, drop_rate): method forward (line 374) | def forward(self, hidden_state, input_tensor): class CvtLayer (line 381) | class CvtLayer(nn.Module): method __init__ (line 386) | def __init__( method forward (line 425) | def forward(self, hidden_state, height, width): class CvtStage (line 447) | class CvtStage(nn.Module): method __init__ (line 448) | def __init__(self, config, stage): method forward (line 488) | def forward(self, hidden_state): class CvtEncoder (line 508) | class CvtEncoder(nn.Module): method __init__ (line 509) | def __init__(self, config): method forward (line 516) | def forward(self, pixel_values, output_hidden_states=False, return_dic... class CvtPreTrainedModel (line 536) | class CvtPreTrainedModel(PreTrainedModel): method _init_weights (line 546) | def _init_weights(self, module): class CvtModel (line 590) | class CvtModel(CvtPreTrainedModel): method __init__ (line 591) | def __init__(self, config, add_pooling_layer=True): method _prune_heads (line 597) | def _prune_heads(self, heads_to_prune): method forward (line 613) | def forward( class CvtForImageClassification (line 651) | class CvtForImageClassification(CvtPreTrainedModel): method __init__ (line 652) | def __init__(self, config): method forward (line 673) | def forward( FILE: transformers/models/cvt/modeling_tf_cvt.py class TFBaseModelOutputWithCLSToken (line 63) | class TFBaseModelOutputWithCLSToken(ModelOutput): class TFCvtDropPath (line 83) | class TFCvtDropPath(tf.keras.layers.Layer): method __init__ (line 89) | def __init__(self, drop_prob: float, **kwargs): method call (line 93) | def call(self, x: tf.Tensor, training=None): class TFCvtEmbeddings (line 103) | class TFCvtEmbeddings(tf.keras.layers.Layer): method __init__ (line 106) | def __init__( method call (line 127) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFCvtConvEmbeddings (line 133) | class TFCvtConvEmbeddings(tf.keras.layers.Layer): method __init__ (line 136) | def __init__(self, config: CvtConfig, patch_size: int, embed_dim: int,... method call (line 152) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFCvtSelfAttentionConvProjection (line 169) | class TFCvtSelfAttentionConvProjection(tf.keras.layers.Layer): method __init__ (line 172) | def __init__(self, config: CvtConfig, embed_dim: int, kernel_size: int... method call (line 188) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFCvtSelfAttentionLinearProjection (line 194) | class TFCvtSelfAttentionLinearProjection(tf.keras.layers.Layer): method call (line 197) | def call(self, hidden_state: tf.Tensor) -> tf.Tensor: class TFCvtSelfAttentionProjection (line 205) | class TFCvtSelfAttentionProjection(tf.keras.layers.Layer): method __init__ (line 208) | def __init__( method call (line 225) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFCvtSelfAttention (line 231) | class TFCvtSelfAttention(tf.keras.layers.Layer): method __init__ (line 237) | def __init__( method rearrange_for_multi_head_attention (line 310) | def rearrange_for_multi_head_attention(self, hidden_state: tf.Tensor) ... method call (line 317) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... class TFCvtSelfOutput (line 352) | class TFCvtSelfOutput(tf.keras.layers.Layer): method __init__ (line 355) | def __init__(self, config: CvtConfig, embed_dim: int, drop_rate: float... method call (line 362) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFCvtAttention (line 368) | class TFCvtAttention(tf.keras.layers.Layer): method __init__ (line 371) | def __init__( method prune_heads (line 406) | def prune_heads(self, heads): method call (line 409) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... class TFCvtIntermediate (line 415) | class TFCvtIntermediate(tf.keras.layers.Layer): method __init__ (line 418) | def __init__(self, config: CvtConfig, embed_dim: int, mlp_ratio: int, ... method call (line 427) | def call(self, hidden_state: tf.Tensor) -> tf.Tensor: class TFCvtOutput (line 432) | class TFCvtOutput(tf.keras.layers.Layer): method __init__ (line 437) | def __init__(self, config: CvtConfig, embed_dim: int, drop_rate: int, ... method call (line 444) | def call(self, hidden_state: tf.Tensor, input_tensor: tf.Tensor, train... class TFCvtLayer (line 451) | class TFCvtLayer(tf.keras.layers.Layer): method __init__ (line 458) | def __init__( method call (line 506) | def call(self, hidden_state: tf.Tensor, height: int, width: int, train... class TFCvtStage (line 524) | class TFCvtStage(tf.keras.layers.Layer): method __init__ (line 536) | def __init__(self, config: CvtConfig, stage: int, **kwargs): method call (line 582) | def call(self, hidden_state: tf.Tensor, training: bool = False): class TFCvtEncoder (line 607) | class TFCvtEncoder(tf.keras.layers.Layer): method __init__ (line 618) | def __init__(self, config: CvtConfig, **kwargs): method call (line 625) | def call( class TFCvtMainLayer (line 660) | class TFCvtMainLayer(tf.keras.layers.Layer): method __init__ (line 665) | def __init__(self, config: CvtConfig, **kwargs): method call (line 671) | def call( class TFCvtPreTrainedModel (line 700) | class TFCvtPreTrainedModel(TFPreTrainedModel): class TFCvtModel (line 762) | class TFCvtModel(TFCvtPreTrainedModel): method __init__ (line 763) | def __init__(self, config: CvtConfig, *inputs, **kwargs): method call (line 771) | def call( class TFCvtForImageClassification (line 826) | class TFCvtForImageClassification(TFCvtPreTrainedModel, TFSequenceClassi... method __init__ (line 827) | def __init__(self, config: CvtConfig, *inputs, **kwargs): method call (line 847) | def call( FILE: transformers/models/data2vec/configuration_data2vec_audio.py class Data2VecAudioConfig (line 31) | class Data2VecAudioConfig(PretrainedConfig): method __init__ (line 171) | def __init__( method inputs_to_logits_ratio (line 286) | def inputs_to_logits_ratio(self): FILE: transformers/models/data2vec/configuration_data2vec_text.py class Data2VecTextConfig (line 31) | class Data2VecTextConfig(PretrainedConfig): method __init__ (line 100) | def __init__( class Data2VecTextOnnxConfig (line 141) | class Data2VecTextOnnxConfig(OnnxConfig): method inputs (line 143) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/data2vec/configuration_data2vec_vision.py class Data2VecVisionConfig (line 35) | class Data2VecVisionConfig(PretrainedConfig): method __init__ (line 116) | def __init__( class Data2VecVisionOnnxConfig (line 182) | class Data2VecVisionOnnxConfig(OnnxConfig): method inputs (line 186) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 194) | def atol_for_validation(self) -> float: FILE: transformers/models/data2vec/convert_data2vec_audio_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 58) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 87) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function access_by_string (line 145) | def access_by_string(module, path): function set_weights (line 150) | def set_weights(full_name, module, fsq_value, hf_weight_path): function load_conv_layer (line 160) | def load_conv_layer(full_name, value, feature_extractor, unused_weights): function load_pos_conv_layer (line 178) | def load_pos_conv_layer(full_name, value, pos_conv_embeddings, unused_we... function convert_wav2vec2_checkpoint (line 195) | def convert_wav2vec2_checkpoint( FILE: transformers/models/data2vec/convert_data2vec_text_original_pytorch_checkpoint_to_pytorch.py function convert_data2vec_checkpoint_to_pytorch (line 56) | def convert_data2vec_checkpoint_to_pytorch( FILE: transformers/models/data2vec/convert_data2vec_vision_original_pytorch_checkpoint_to_pytorch.py function create_rename_keys (line 18) | def create_rename_keys(config, has_lm_head=False, is_semantic=False, hf_... function read_in_q_k_v (line 97) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function get_args (line 139) | def get_args(): function load_beit_model (line 150) | def load_beit_model(args, is_finetuned, is_large): function main (line 255) | def main(): FILE: transformers/models/data2vec/modeling_data2vec_audio.py function _compute_mask_indices (line 69) | def _compute_mask_indices( class Data2VecAudioConvLayer (line 188) | class Data2VecAudioConvLayer(nn.Module): method __init__ (line 189) | def __init__(self, config, layer_id=0): method forward (line 204) | def forward(self, hidden_states): class Data2VecAudioPadLayer (line 216) | class Data2VecAudioPadLayer(nn.Module): method __init__ (line 217) | def __init__(self, num_conv_pos_embeddings): method forward (line 221) | def forward(self, hidden_states): class Data2VecAudioPositionalConvLayer (line 227) | class Data2VecAudioPositionalConvLayer(nn.Module): method __init__ (line 228) | def __init__(self, config): method forward (line 243) | def forward(self, hidden_states): class Data2VecAudioPositionalConvEmbedding (line 254) | class Data2VecAudioPositionalConvEmbedding(nn.Module): method __init__ (line 255) | def __init__(self, config): method forward (line 261) | def forward(self, hidden_states): class Data2VecAudioFeatureEncoder (line 269) | class Data2VecAudioFeatureEncoder(nn.Module): method __init__ (line 272) | def __init__(self, config): method _freeze_parameters (line 281) | def _freeze_parameters(self): method forward (line 287) | def forward(self, input_values): class Data2VecAudioFeatureProjection (line 314) | class Data2VecAudioFeatureProjection(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 321) | def forward(self, hidden_states): class Data2VecAudioAttention (line 330) | class Data2VecAudioAttention(nn.Module): method __init__ (line 333) | def __init__( method _shape (line 360) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 363) | def forward( class Data2VecAudioFeedForward (line 485) | class Data2VecAudioFeedForward(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 499) | def forward(self, hidden_states): class Data2VecAudioEncoderLayer (line 510) | class Data2VecAudioEncoderLayer(nn.Module): method __init__ (line 511) | def __init__(self, config): method forward (line 524) | def forward(self, hidden_states, attention_mask=None, output_attention... class Data2VecAudioEncoder (line 545) | class Data2VecAudioEncoder(nn.Module): method __init__ (line 546) | def __init__(self, config): method forward (line 555) | def forward( class Data2VecAudioAdapter (line 633) | class Data2VecAudioAdapter(nn.Module): method __init__ (line 634) | def __init__(self, config): method forward (line 647) | def forward(self, hidden_states): class Data2VecAudioAdapterLayer (line 665) | class Data2VecAudioAdapterLayer(nn.Module): method __init__ (line 666) | def __init__(self, config): method forward (line 676) | def forward(self, hidden_states): class Data2VecAudioPreTrainedModel (line 683) | class Data2VecAudioPreTrainedModel(PreTrainedModel): method _init_weights (line 695) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 721) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 745) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 765) | def _set_gradient_checkpointing(self, module, value=False): class Data2VecAudioModel (line 831) | class Data2VecAudioModel(Data2VecAudioPreTrainedModel): method __init__ (line 832) | def __init__(self, config: Data2VecAudioConfig): method freeze_feature_encoder (line 849) | def freeze_feature_encoder(self): method _mask_hidden_states (line 856) | def _mask_hidden_states( method forward (line 910) | def forward( class Data2VecAudioForCTC (line 967) | class Data2VecAudioForCTC(Data2VecAudioPreTrainedModel): method __init__ (line 968) | def __init__(self, config): method freeze_feature_extractor (line 989) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1001) | def freeze_feature_encoder(self): method forward (line 1017) | def forward( class Data2VecAudioForSequenceClassification (line 1096) | class Data2VecAudioForSequenceClassification(Data2VecAudioPreTrainedModel): method __init__ (line 1097) | def __init__(self, config): method freeze_feature_extractor (line 1114) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1126) | def freeze_feature_encoder(self): method freeze_base_model (line 1133) | def freeze_base_model(self): method forward (line 1149) | def forward( class Data2VecAudioForAudioFrameClassification (line 1217) | class Data2VecAudioForAudioFrameClassification(Data2VecAudioPreTrainedMo... method __init__ (line 1218) | def __init__(self, config): method freeze_feature_extractor (line 1235) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1247) | def freeze_feature_encoder(self): method freeze_base_model (line 1254) | def freeze_base_model(self): method forward (line 1270) | def forward( class AMSoftmaxLoss (line 1325) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1326) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1334) | def forward(self, hidden_states, labels): class TDNNLayer (line 1349) | class TDNNLayer(nn.Module): method __init__ (line 1350) | def __init__(self, config, layer_id=0): method forward (line 1360) | def forward(self, hidden_states): class Data2VecAudioForXVector (line 1381) | class Data2VecAudioForXVector(Data2VecAudioPreTrainedModel): method __init__ (line 1382) | def __init__(self, config): method freeze_feature_extractor (line 1401) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1413) | def freeze_feature_encoder(self): method freeze_base_model (line 1420) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1428) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1451) | def forward( FILE: transformers/models/data2vec/modeling_data2vec_text.py class Data2VecTextForTextEmbeddings (line 65) | class Data2VecTextForTextEmbeddings(nn.Module): method __init__ (line 71) | def __init__(self, config): method forward (line 94) | def forward( method create_position_ids_from_inputs_embeds (line 134) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class Data2VecTextSelfAttention (line 153) | class Data2VecTextSelfAttention(nn.Module): method __init__ (line 154) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 180) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 185) | def forward( class Data2VecTextSelfOutput (line 288) | class Data2VecTextSelfOutput(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 295) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecTextAttention (line 303) | class Data2VecTextAttention(nn.Module): method __init__ (line 304) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 310) | def prune_heads(self, heads): method forward (line 328) | def forward( class Data2VecTextIntermediate (line 353) | class Data2VecTextIntermediate(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecTextOutput (line 369) | class Data2VecTextOutput(nn.Module): method __init__ (line 370) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecTextLayer (line 384) | class Data2VecTextLayer(nn.Module): method __init__ (line 385) | def __init__(self, config): method forward (line 399) | def forward( method feed_forward_chunk (line 464) | def feed_forward_chunk(self, attention_output): class Data2VecTextEncoder (line 471) | class Data2VecTextEncoder(nn.Module): method __init__ (line 472) | def __init__(self, config): method forward (line 478) | def forward( class Data2VecTextPooler (line 570) | class Data2VecTextPooler(nn.Module): method __init__ (line 571) | def __init__(self, config): method forward (line 576) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecTextPreTrainedModel (line 585) | class Data2VecTextPreTrainedModel(PreTrainedModel): method _init_weights (line 596) | def _init_weights(self, module): method _set_gradient_checkpointing (line 614) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 618) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class Data2VecTextModel (line 701) | class Data2VecTextModel(Data2VecTextPreTrainedModel): method __init__ (line 719) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 731) | def get_input_embeddings(self): method set_input_embeddings (line 734) | def set_input_embeddings(self, value): method _prune_heads (line 737) | def _prune_heads(self, heads_to_prune): method forward (line 752) | def forward( class Data2VecTextForCausalLM (line 885) | class Data2VecTextForCausalLM(Data2VecTextPreTrainedModel): method __init__ (line 890) | def __init__(self, config): method get_output_embeddings (line 905) | def get_output_embeddings(self): method set_output_embeddings (line 908) | def set_output_embeddings(self, new_embeddings): method forward (line 913) | def forward( method prepare_inputs_for_generation (line 1019) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1031) | def _reorder_cache(self, past_key_values, beam_idx): class Data2VecTextForMaskedLM (line 1039) | class Data2VecTextForMaskedLM(Data2VecTextPreTrainedModel): method __init__ (line 1044) | def __init__(self, config): method get_output_embeddings (line 1062) | def get_output_embeddings(self): method set_output_embeddings (line 1065) | def set_output_embeddings(self, new_embeddings): method forward (line 1075) | def forward( class Data2VecTextLMHead (line 1136) | class Data2VecTextLMHead(nn.Module): method __init__ (line 1139) | def __init__(self, config): method forward (line 1148) | def forward(self, features, **kwargs): method _tie_weights (line 1158) | def _tie_weights(self): class Data2VecTextForSequenceClassification (line 1174) | class Data2VecTextForSequenceClassification(Data2VecTextPreTrainedModel): method __init__ (line 1177) | def __init__(self, config): method forward (line 1194) | def forward( class Data2VecTextForMultipleChoice (line 1273) | class Data2VecTextForMultipleChoice(Data2VecTextPreTrainedModel): method __init__ (line 1276) | def __init__(self, config): method forward (line 1294) | def forward( class Data2VecTextForTokenClassification (line 1369) | class Data2VecTextForTokenClassification(Data2VecTextPreTrainedModel): method __init__ (line 1373) | def __init__(self, config): method forward (line 1393) | def forward( class Data2VecTextClassificationHead (line 1449) | class Data2VecTextClassificationHead(nn.Module): method __init__ (line 1452) | def __init__(self, config): method forward (line 1461) | def forward(self, features, **kwargs): class Data2VecTextForQuestionAnswering (line 1478) | class Data2VecTextForQuestionAnswering(Data2VecTextPreTrainedModel): method __init__ (line 1482) | def __init__(self, config): method forward (line 1498) | def forward( function create_position_ids_from_input_ids (line 1573) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/data2vec/modeling_data2vec_vision.py class Data2VecVisionModelOutputWithPooling (line 68) | class Data2VecVisionModelOutputWithPooling(BaseModelOutputWithPooling): function drop_path (line 94) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class Data2VecVisionDropPath (line 115) | class Data2VecVisionDropPath(nn.Module): method __init__ (line 118) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 122) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 125) | def extra_repr(self) -> str: class Data2VecVisionEmbeddings (line 130) | class Data2VecVisionEmbeddings(nn.Module): method __init__ (line 136) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 152) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class Data2VecVisionPatchEmbeddings (line 172) | class Data2VecVisionPatchEmbeddings(nn.Module): method __init__ (line 179) | def __init__(self, config): method forward (line 196) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class Data2VecVisionSelfAttention (line 212) | class Data2VecVisionSelfAttention(nn.Module): method __init__ (line 213) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method transpose_for_scores (line 236) | def transpose_for_scores(self, x): method forward (line 241) | def forward( class Data2VecVisionSelfOutput (line 290) | class Data2VecVisionSelfOutput(nn.Module): method __init__ (line 296) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 301) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Data2VecVisionAttention (line 309) | class Data2VecVisionAttention(nn.Module): method __init__ (line 310) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method prune_heads (line 316) | def prune_heads(self, heads): method forward (line 334) | def forward( class Data2VecVisionIntermediate (line 350) | class Data2VecVisionIntermediate(nn.Module): method __init__ (line 351) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 359) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionOutput (line 367) | class Data2VecVisionOutput(nn.Module): method __init__ (line 368) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 373) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionLayer (line 381) | class Data2VecVisionLayer(nn.Module): method __init__ (line 384) | def __init__( method forward (line 404) | def forward( class Data2VecVisionRelativePositionBias (line 445) | class Data2VecVisionRelativePositionBias(nn.Module): method __init__ (line 446) | def __init__(self, config: Data2VecVisionConfig, window_size: tuple) -... method forward (line 475) | def forward(self) -> torch.Tensor: class Data2VecVisionEncoder (line 484) | class Data2VecVisionEncoder(nn.Module): method __init__ (line 485) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method forward (line 507) | def forward( class Data2VecVisionPreTrainedModel (line 561) | class Data2VecVisionPreTrainedModel(PreTrainedModel): method _init_weights (line 572) | def _init_weights(self, module): method _set_gradient_checkpointing (line 588) | def _set_gradient_checkpointing(self, module, value=False): class Data2VecVisionModel (line 632) | class Data2VecVisionModel(Data2VecVisionPreTrainedModel): method __init__ (line 633) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 648) | def get_input_embeddings(self): method _prune_heads (line 651) | def _prune_heads(self, heads_to_prune): method forward (line 667) | def forward( class Data2VecVisionPooler (line 722) | class Data2VecVisionPooler(nn.Module): method __init__ (line 723) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 729) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionForImageClassification (line 749) | class Data2VecVisionForImageClassification(Data2VecVisionPreTrainedModel): method __init__ (line 750) | def __init__(self, config: Data2VecVisionConfig) -> None: method forward (line 769) | def forward( class Data2VecVisionConvModule (line 832) | class Data2VecVisionConvModule(nn.Module): method __init__ (line 840) | def __init__( method forward (line 861) | def forward(self, input: torch.Tensor) -> torch.Tensor: class Data2VecVisionPyramidPoolingBlock (line 870) | class Data2VecVisionPyramidPoolingBlock(nn.Module): method __init__ (line 871) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 880) | def forward(self, input: torch.Tensor) -> torch.Tensor: class Data2VecVisionPyramidPoolingModule (line 888) | class Data2VecVisionPyramidPoolingModule(nn.Module): method __init__ (line 902) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 916) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class Data2VecVisionUperHead (line 928) | class Data2VecVisionUperHead(nn.Module): method __init__ (line 936) | def __init__(self, config: Data2VecVisionConfig) -> None: method psp_forward (line 974) | def psp_forward(self, inputs): method forward (line 983) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionFCNHead (line 1014) | class Data2VecVisionFCNHead(nn.Module): method __init__ (line 1029) | def __init__( method forward (line 1067) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class Data2VecVisionForSemanticSegmentation (line 1084) | class Data2VecVisionForSemanticSegmentation(Data2VecVisionPreTrainedModel): method __init__ (line 1085) | def __init__(self, config: Data2VecVisionConfig) -> None: method compute_loss (line 1111) | def compute_loss(self, logits, auxiliary_logits, labels): method forward (line 1132) | def forward( FILE: transformers/models/data2vec/modeling_tf_data2vec_vision.py class TFData2VecVisionModelOutputWithPooling (line 74) | class TFData2VecVisionModelOutputWithPooling(TFBaseModelOutputWithPooling): class TFData2VecVisionDropPath (line 104) | class TFData2VecVisionDropPath(tf.keras.layers.Layer): method __init__ (line 110) | def __init__(self, drop_path, **kwargs): method call (line 114) | def call(self, x, training=None): class TFData2VecVisionEmbeddings (line 124) | class TFData2VecVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 130) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method build (line 140) | def build(self, input_shape: tf.TensorShape): method call (line 169) | def call(self, pixel_values: tf.Tensor, bool_masked_pos: tf.Tensor | N... class TFData2VecVisionPatchEmbeddings (line 191) | class TFData2VecVisionPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 196) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 224) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFData2VecVisionSelfAttention (line 252) | class TFData2VecVisionSelfAttention(tf.keras.layers.Layer): method __init__ (line 253) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method transpose_for_scores (line 288) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 295) | def call( class TFData2VecVisionSelfOutput (line 348) | class TFData2VecVisionSelfOutput(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 362) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, gamm... class TFData2VecVisionAttention (line 369) | class TFData2VecVisionAttention(tf.keras.layers.Layer): method __init__ (line 370) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method prune_heads (line 376) | def prune_heads(self, heads): method call (line 379) | def call( class TFData2VecVisionIntermediate (line 403) | class TFData2VecVisionIntermediate(tf.keras.layers.Layer): method __init__ (line 404) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 416) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionOutput (line 423) | class TFData2VecVisionOutput(tf.keras.layers.Layer): method __init__ (line 424) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 432) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFData2VecVisionLayer (line 439) | class TFData2VecVisionLayer(tf.keras.layers.Layer): method __init__ (line 442) | def __init__( method build (line 467) | def build(self, input_shape: tf.TensorShape = None): method call (line 488) | def call( class TFData2VecVisionRelativePositionBias (line 533) | class TFData2VecVisionRelativePositionBias(tf.keras.layers.Layer): method __init__ (line 534) | def __init__(self, config: Data2VecVisionConfig, window_size: tuple, *... method build (line 545) | def build(self, input_shape): method get_position_index (line 556) | def get_position_index(self): method call (line 584) | def call(self, inputs=None) -> tf.Tensor: class TFData2VecVisionEncoder (line 589) | class TFData2VecVisionEncoder(tf.keras.layers.Layer): method __init__ (line 590) | def __init__(self, config: Data2VecVisionConfig, window_size: Optional... method call (line 612) | def call( class TFData2VecVisionMainLayer (line 655) | class TFData2VecVisionMainLayer(tf.keras.layers.Layer): method __init__ (line 658) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 678) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _prune_heads (line 681) | def _prune_heads(self, heads_to_prune): method call (line 689) | def call( class TFData2VecVisionPooler (line 745) | class TFData2VecVisionPooler(tf.keras.layers.Layer): method __init__ (line 746) | def __init__(self, config: Data2VecVisionConfig, **kwargs): method call (line 754) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionPreTrainedModel (line 766) | class TFData2VecVisionPreTrainedModel(TFPreTrainedModel): class TFData2VecVisionModel (line 852) | class TFData2VecVisionModel(TFData2VecVisionPreTrainedModel): method __init__ (line 853) | def __init__(self, config: Data2VecVisionConfig, add_pooling_layer: bo... method get_input_embeddings (line 861) | def get_input_embeddings(self): method call (line 873) | def call( class TFData2VecVisionForImageClassification (line 907) | class TFData2VecVisionForImageClassification(TFData2VecVisionPreTrainedM... method __init__ (line 908) | def __init__(self, config: Data2VecVisionConfig, *inputs, **kwargs): method call (line 929) | def call( class TFData2VecVisionConvModule (line 972) | class TFData2VecVisionConvModule(tf.keras.layers.Layer): method __init__ (line 980) | def __init__( method call (line 1001) | def call(self, input: tf.Tensor) -> tf.Tensor: class TFAdaptiveAvgPool1D (line 1010) | class TFAdaptiveAvgPool1D(tf.keras.layers.Layer): method __init__ (line 1011) | def __init__(self, output_dim, mode="dense", **kwargs): method build (line 1017) | def build(self, input_shape): method call (line 1050) | def call(self, inputs): method get_config (line 1059) | def get_config(self): class TFAdaptiveAvgPool2D (line 1065) | class TFAdaptiveAvgPool2D(tf.keras.layers.Layer): method __init__ (line 1066) | def __init__(self, output_shape, mode="dense", **kwargs): method call (line 1072) | def call(self, inputs): method get_config (line 1085) | def get_config(self): class TFData2VecVisionPyramidPoolingModule (line 1091) | class TFData2VecVisionPyramidPoolingModule(tf.keras.layers.Layer): method __init__ (line 1103) | def __init__(self, pool_scales: Tuple[int, ...], channels: int, **kwar... method call (line 1118) | def call(self, x: tf.Tensor) -> List[tf.Tensor]: class TFData2VecVisionUperHead (line 1132) | class TFData2VecVisionUperHead(tf.keras.layers.Layer): method __init__ (line 1140) | def __init__(self, config: Data2VecVisionConfig, **kwargs) -> None: method psp_forward (line 1166) | def psp_forward(self, inputs): method call (line 1175) | def call(self, encoder_hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionFCNHead (line 1201) | class TFData2VecVisionFCNHead(tf.keras.layers.Layer): method __init__ (line 1215) | def __init__( method call (line 1261) | def call(self, encoder_hidden_states: tf.Tensor) -> tf.Tensor: class TFData2VecVisionForSemanticSegmentation (line 1279) | class TFData2VecVisionForSemanticSegmentation(TFData2VecVisionPreTrained... method __init__ (line 1280) | def __init__(self, config: Data2VecVisionConfig, *inputs, **kwargs) ->... method compute_loss (line 1303) | def compute_loss(self, logits, auxiliary_logits, labels): method call (line 1335) | def call( FILE: transformers/models/deberta/configuration_deberta.py class DebertaConfig (line 40) | class DebertaConfig(PretrainedConfig): method __init__ (line 110) | def __init__( class DebertaOnnxConfig (line 164) | class DebertaOnnxConfig(OnnxConfig): method inputs (line 166) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 179) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 182) | def generate_dummy_inputs( FILE: transformers/models/deberta/modeling_deberta.py class ContextPooler (line 66) | class ContextPooler(nn.Module): method __init__ (line 67) | def __init__(self, config): method forward (line 73) | def forward(self, hidden_states): method output_dim (line 84) | def output_dim(self): class XSoftmax (line 88) | class XSoftmax(torch.autograd.Function): method forward (line 117) | def forward(self, input, mask, dim): method backward (line 128) | def backward(self, grad_output): method symbolic (line 134) | def symbolic(g, self, mask, dim): class DropoutContext (line 151) | class DropoutContext(object): method __init__ (line 152) | def __init__(self): function get_mask (line 159) | def get_mask(input, local_context): class XDropout (line 178) | class XDropout(torch.autograd.Function): method forward (line 182) | def forward(ctx, input, local_ctx): method backward (line 192) | def backward(ctx, grad_output): method symbolic (line 200) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 217) | class StableDropout(nn.Module): method __init__ (line 225) | def __init__(self, drop_prob): method forward (line 231) | def forward(self, x): method clear_context (line 242) | def clear_context(self): method init_context (line 246) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 254) | def get_context(self): class DebertaLayerNorm (line 266) | class DebertaLayerNorm(nn.Module): method __init__ (line 269) | def __init__(self, size, eps=1e-12): method forward (line 275) | def forward(self, hidden_states): class DebertaSelfOutput (line 286) | class DebertaSelfOutput(nn.Module): method __init__ (line 287) | def __init__(self, config): method forward (line 293) | def forward(self, hidden_states, input_tensor): class DebertaAttention (line 300) | class DebertaAttention(nn.Module): method __init__ (line 301) | def __init__(self, config): method forward (line 307) | def forward( class DebertaIntermediate (line 337) | class DebertaIntermediate(nn.Module): method __init__ (line 338) | def __init__(self, config): method forward (line 346) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DebertaOutput (line 352) | class DebertaOutput(nn.Module): method __init__ (line 353) | def __init__(self, config): method forward (line 360) | def forward(self, hidden_states, input_tensor): class DebertaLayer (line 367) | class DebertaLayer(nn.Module): method __init__ (line 368) | def __init__(self, config): method forward (line 374) | def forward( class DebertaEncoder (line 401) | class DebertaEncoder(nn.Module): method __init__ (line 404) | def __init__(self, config): method get_rel_embedding (line 415) | def get_rel_embedding(self): method get_attention_mask (line 419) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 428) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 434) | def forward( function build_relative_position (line 508) | def build_relative_position(query_size, key_size, device): function c2p_dynamic_expand (line 534) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 539) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 544) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): class DisentangledSelfAttention (line 548) | class DisentangledSelfAttention(nn.Module): method __init__ (line 559) | def __init__(self, config): method transpose_for_scores (line 594) | def transpose_for_scores(self, x): method forward (line 599) | def forward( method disentangled_att_bias (line 690) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class DebertaEmbeddings (line 742) | class DebertaEmbeddings(nn.Module): method __init__ (line 745) | def __init__(self, config): method forward (line 769) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class DebertaPreTrainedModel (line 816) | class DebertaPreTrainedModel(PreTrainedModel): method _init_weights (line 828) | def _init_weights(self, module): method _set_gradient_checkpointing (line 841) | def _set_gradient_checkpointing(self, module, value=False): class DebertaModel (line 911) | class DebertaModel(DebertaPreTrainedModel): method __init__ (line 912) | def __init__(self, config): method get_input_embeddings (line 922) | def get_input_embeddings(self): method set_input_embeddings (line 925) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 928) | def _prune_heads(self, heads_to_prune): method forward (line 941) | def forward( class DebertaForMaskedLM (line 1022) | class DebertaForMaskedLM(DebertaPreTrainedModel): method __init__ (line 1026) | def __init__(self, config): method get_output_embeddings (line 1035) | def get_output_embeddings(self): method set_output_embeddings (line 1038) | def set_output_embeddings(self, new_embeddings): method forward (line 1050) | def forward( class DebertaPredictionHeadTransform (line 1103) | class DebertaPredictionHeadTransform(nn.Module): method __init__ (line 1104) | def __init__(self, config): method forward (line 1113) | def forward(self, hidden_states): class DebertaLMPredictionHead (line 1121) | class DebertaLMPredictionHead(nn.Module): method __init__ (line 1122) | def __init__(self, config): method forward (line 1135) | def forward(self, hidden_states): class DebertaOnlyMLMHead (line 1142) | class DebertaOnlyMLMHead(nn.Module): method __init__ (line 1143) | def __init__(self, config): method forward (line 1147) | def forward(self, sequence_output): class DebertaForSequenceClassification (line 1159) | class DebertaForSequenceClassification(DebertaPreTrainedModel): method __init__ (line 1160) | def __init__(self, config): method get_input_embeddings (line 1178) | def get_input_embeddings(self): method set_input_embeddings (line 1181) | def set_input_embeddings(self, new_embeddings): method forward (line 1190) | def forward( class DebertaForTokenClassification (line 1277) | class DebertaForTokenClassification(DebertaPreTrainedModel): method __init__ (line 1280) | def __init__(self, config): method forward (line 1297) | def forward( class DebertaForQuestionAnswering (line 1352) | class DebertaForQuestionAnswering(DebertaPreTrainedModel): method __init__ (line 1355) | def __init__(self, config): method forward (line 1375) | def forward( FILE: transformers/models/deberta/modeling_tf_deberta.py class TFDebertaContextPooler (line 61) | class TFDebertaContextPooler(tf.keras.layers.Layer): method __init__ (line 62) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 68) | def call(self, hidden_states, training: bool = False): method output_dim (line 78) | def output_dim(self) -> int: class TFDebertaXSoftmax (line 82) | class TFDebertaXSoftmax(tf.keras.layers.Layer): method __init__ (line 92) | def __init__(self, axis=-1, **kwargs): method call (line 96) | def call(self, inputs: tf.Tensor, mask: tf.Tensor): class TFDebertaStableDropout (line 104) | class TFDebertaStableDropout(tf.keras.layers.Layer): method __init__ (line 112) | def __init__(self, drop_prob, **kwargs): method xdropout (line 117) | def xdropout(self, inputs): method call (line 138) | def call(self, inputs: tf.Tensor, training: tf.Tensor = False): class TFDebertaLayerNorm (line 144) | class TFDebertaLayerNorm(tf.keras.layers.Layer): method __init__ (line 147) | def __init__(self, size, eps=1e-12, **kwargs): method build (line 152) | def build(self, input_shape): method call (line 157) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFDebertaSelfOutput (line 164) | class TFDebertaSelfOutput(tf.keras.layers.Layer): method __init__ (line 165) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 171) | def call(self, hidden_states, input_tensor, training: bool = False): class TFDebertaAttention (line 178) | class TFDebertaAttention(tf.keras.layers.Layer): method __init__ (line 179) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 185) | def call( class TFDebertaIntermediate (line 215) | class TFDebertaIntermediate(tf.keras.layers.Layer): method __init__ (line 216) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 228) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaOutput (line 235) | class TFDebertaOutput(tf.keras.layers.Layer): method __init__ (line 236) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 245) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDebertaLayer (line 253) | class TFDebertaLayer(tf.keras.layers.Layer): method __init__ (line 254) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 261) | def call( class TFDebertaEncoder (line 290) | class TFDebertaEncoder(tf.keras.layers.Layer): method __init__ (line 291) | def __init__(self, config: DebertaConfig, **kwargs): method build (line 302) | def build(self, input_shape): method get_rel_embedding (line 311) | def get_rel_embedding(self): method get_attention_mask (line 315) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 325) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method call (line 331) | def call( function build_relative_position (line 392) | def build_relative_position(query_size, key_size): function c2p_dynamic_expand (line 416) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 426) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 436) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function torch_gather (line 441) | def torch_gather(x, indices, gather_axis): class TFDebertaDisentangledSelfAttention (line 465) | class TFDebertaDisentangledSelfAttention(tf.keras.layers.Layer): method __init__ (line 476) | def __init__(self, config: DebertaConfig, **kwargs): method build (line 532) | def build(self, input_shape): method transpose_for_scores (line 541) | def transpose_for_scores(self, tensor: tf.Tensor) -> tf.Tensor: method call (line 549) | def call( method disentangled_att_bias (line 660) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class TFDebertaEmbeddings (line 716) | class TFDebertaEmbeddings(tf.keras.layers.Layer): method __init__ (line 719) | def __init__(self, config, **kwargs): method build (line 733) | def build(self, input_shape: tf.TensorShape): method call (line 763) | def call( class TFDebertaPredictionHeadTransform (line 819) | class TFDebertaPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 820) | def __init__(self, config: DebertaConfig, **kwargs): method call (line 835) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaLMPredictionHead (line 843) | class TFDebertaLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 844) | def __init__(self, config: DebertaConfig, input_embeddings: tf.keras.l... method build (line 856) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 861) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 864) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 868) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 871) | def set_bias(self, value: tf.Variable): method call (line 875) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaOnlyMLMHead (line 886) | class TFDebertaOnlyMLMHead(tf.keras.layers.Layer): method __init__ (line 887) | def __init__(self, config: DebertaConfig, input_embeddings: tf.keras.l... method call (line 891) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFDebertaMainLayer (line 898) | class TFDebertaMainLayer(tf.keras.layers.Layer): method __init__ (line 901) | def __init__(self, config: DebertaConfig, **kwargs): method get_input_embeddings (line 909) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 912) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 916) | def _prune_heads(self, heads_to_prune): method call (line 924) | def call( class TFDebertaPreTrainedModel (line 981) | class TFDebertaPreTrainedModel(TFPreTrainedModel): class TFDebertaModel (line 1081) | class TFDebertaModel(TFDebertaPreTrainedModel): method __init__ (line 1082) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1094) | def call( class TFDebertaForMaskedLM (line 1122) | class TFDebertaForMaskedLM(TFDebertaPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1123) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method get_lm_head (line 1135) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1145) | def call( class TFDebertaForSequenceClassification (line 1198) | class TFDebertaForSequenceClassification(TFDebertaPreTrainedModel, TFSeq... method __init__ (line 1199) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1223) | def call( class TFDebertaForTokenClassification (line 1279) | class TFDebertaForTokenClassification(TFDebertaPreTrainedModel, TFTokenC... method __init__ (line 1280) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1298) | def call( class TFDebertaForQuestionAnswering (line 1350) | class TFDebertaForQuestionAnswering(TFDebertaPreTrainedModel, TFQuestion... method __init__ (line 1351) | def __init__(self, config: DebertaConfig, *inputs, **kwargs): method call (line 1368) | def call( FILE: transformers/models/deberta/tokenization_deberta.py function bytes_to_unicode (line 73) | def bytes_to_unicode(): function get_pairs (line 98) | def get_pairs(word): class DebertaTokenizer (line 112) | class DebertaTokenizer(PreTrainedTokenizer): method __init__ (line 182) | def __init__( method vocab_size (line 241) | def vocab_size(self): method get_vocab (line 245) | def get_vocab(self): method bpe (line 249) | def bpe(self, token): method build_inputs_with_special_tokens (line 291) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 316) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 343) | def create_token_type_ids_from_sequences( method _tokenize (line 374) | def _tokenize(self, text): method _convert_token_to_id (line 385) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 390) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 395) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 402) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 431) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 438) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/deberta/tokenization_deberta_fast.py class DebertaTokenizerFast (line 74) | class DebertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 145) | def __init__( method mask_token (line 187) | def mask_token(self) -> str: method mask_token (line 202) | def mask_token(self, value): method build_inputs_with_special_tokens (line 211) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 236) | def create_token_type_ids_from_sequences( method _batch_encode_plus (line 267) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 277) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 288) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 293) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/deberta_v2/configuration_deberta_v2.py class DebertaV2Config (line 42) | class DebertaV2Config(PretrainedConfig): method __init__ (line 112) | def __init__( class DebertaV2OnnxConfig (line 165) | class DebertaV2OnnxConfig(OnnxConfig): method inputs (line 167) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 180) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 183) | def generate_dummy_inputs( FILE: transformers/models/deberta_v2/modeling_deberta_v2.py class ContextPooler (line 56) | class ContextPooler(nn.Module): method __init__ (line 57) | def __init__(self, config): method forward (line 63) | def forward(self, hidden_states): method output_dim (line 74) | def output_dim(self): class XSoftmax (line 79) | class XSoftmax(torch.autograd.Function): method forward (line 108) | def forward(self, input, mask, dim): method backward (line 119) | def backward(self, grad_output): method symbolic (line 125) | def symbolic(g, self, mask, dim): class DropoutContext (line 143) | class DropoutContext(object): method __init__ (line 144) | def __init__(self): function get_mask (line 152) | def get_mask(input, local_context): class XDropout (line 172) | class XDropout(torch.autograd.Function): method forward (line 176) | def forward(ctx, input, local_ctx): method backward (line 186) | def backward(ctx, grad_output): method symbolic (line 194) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 212) | class StableDropout(nn.Module): method __init__ (line 220) | def __init__(self, drop_prob): method forward (line 226) | def forward(self, x): method clear_context (line 237) | def clear_context(self): method init_context (line 241) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 249) | def get_context(self): class DebertaV2SelfOutput (line 262) | class DebertaV2SelfOutput(nn.Module): method __init__ (line 263) | def __init__(self, config): method forward (line 269) | def forward(self, hidden_states, input_tensor): class DebertaV2Attention (line 277) | class DebertaV2Attention(nn.Module): method __init__ (line 278) | def __init__(self, config): method forward (line 284) | def forward( class DebertaV2Intermediate (line 314) | class DebertaV2Intermediate(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 323) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DebertaV2Output (line 330) | class DebertaV2Output(nn.Module): method __init__ (line 331) | def __init__(self, config): method forward (line 338) | def forward(self, hidden_states, input_tensor): class DebertaV2Layer (line 346) | class DebertaV2Layer(nn.Module): method __init__ (line 347) | def __init__(self, config): method forward (line 353) | def forward( class ConvLayer (line 380) | class ConvLayer(nn.Module): method __init__ (line 381) | def __init__(self, config): method forward (line 393) | def forward(self, hidden_states, residual_states, input_mask): class DebertaV2Encoder (line 416) | class DebertaV2Encoder(nn.Module): method __init__ (line 419) | def __init__(self, config): method get_rel_embedding (line 446) | def get_rel_embedding(self): method get_attention_mask (line 452) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 461) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 473) | def forward( function make_log_bucket_position (line 555) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 570) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 602) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 608) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 614) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): class DisentangledSelfAttention (line 618) | class DisentangledSelfAttention(nn.Module): method __init__ (line 629) | def __init__(self, config): method transpose_for_scores (line 667) | def transpose_for_scores(self, x, attention_heads): method forward (line 672) | def forward( method disentangled_attention_bias (line 756) | def disentangled_attention_bias(self, query_layer, key_layer, relative... class DebertaV2Embeddings (line 840) | class DebertaV2Embeddings(nn.Module): method __init__ (line 843) | def __init__(self, config): method forward (line 867) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class DebertaV2PreTrainedModel (line 915) | class DebertaV2PreTrainedModel(PreTrainedModel): method _init_weights (line 927) | def _init_weights(self, module): method _set_gradient_checkpointing (line 940) | def _set_gradient_checkpointing(self, module, value=False): class DebertaV2Model (line 1011) | class DebertaV2Model(DebertaV2PreTrainedModel): method __init__ (line 1012) | def __init__(self, config): method get_input_embeddings (line 1022) | def get_input_embeddings(self): method set_input_embeddings (line 1025) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 1028) | def _prune_heads(self, heads_to_prune): method forward (line 1041) | def forward( class DebertaV2ForMaskedLM (line 1122) | class DebertaV2ForMaskedLM(DebertaV2PreTrainedModel): method __init__ (line 1126) | def __init__(self, config): method get_output_embeddings (line 1135) | def get_output_embeddings(self): method set_output_embeddings (line 1138) | def set_output_embeddings(self, new_embeddings): method forward (line 1149) | def forward( class DebertaV2PredictionHeadTransform (line 1202) | class DebertaV2PredictionHeadTransform(nn.Module): method __init__ (line 1203) | def __init__(self, config): method forward (line 1212) | def forward(self, hidden_states): class DebertaV2LMPredictionHead (line 1220) | class DebertaV2LMPredictionHead(nn.Module): method __init__ (line 1221) | def __init__(self, config): method forward (line 1234) | def forward(self, hidden_states): class DebertaV2OnlyMLMHead (line 1241) | class DebertaV2OnlyMLMHead(nn.Module): method __init__ (line 1242) | def __init__(self, config): method forward (line 1246) | def forward(self, sequence_output): class DebertaV2ForSequenceClassification (line 1258) | class DebertaV2ForSequenceClassification(DebertaV2PreTrainedModel): method __init__ (line 1259) | def __init__(self, config): method get_input_embeddings (line 1277) | def get_input_embeddings(self): method set_input_embeddings (line 1280) | def set_input_embeddings(self, new_embeddings): method forward (line 1290) | def forward( class DebertaV2ForTokenClassification (line 1378) | class DebertaV2ForTokenClassification(DebertaV2PreTrainedModel): method __init__ (line 1381) | def __init__(self, config): method forward (line 1398) | def forward( class DebertaV2ForQuestionAnswering (line 1453) | class DebertaV2ForQuestionAnswering(DebertaV2PreTrainedModel): method __init__ (line 1456) | def __init__(self, config): method forward (line 1475) | def forward( class DebertaV2ForMultipleChoice (line 1555) | class DebertaV2ForMultipleChoice(DebertaV2PreTrainedModel): method __init__ (line 1556) | def __init__(self, config): method get_input_embeddings (line 1573) | def get_input_embeddings(self): method set_input_embeddings (line 1576) | def set_input_embeddings(self, new_embeddings): method forward (line 1585) | def forward( FILE: transformers/models/deberta_v2/modeling_tf_deberta_v2.py class TFDebertaV2ContextPooler (line 61) | class TFDebertaV2ContextPooler(tf.keras.layers.Layer): method __init__ (line 62) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 68) | def call(self, hidden_states, training: bool = False): method output_dim (line 78) | def output_dim(self) -> int: class TFDebertaV2XSoftmax (line 83) | class TFDebertaV2XSoftmax(tf.keras.layers.Layer): method __init__ (line 93) | def __init__(self, axis=-1, **kwargs): method call (line 97) | def call(self, inputs: tf.Tensor, mask: tf.Tensor): class TFDebertaV2StableDropout (line 106) | class TFDebertaV2StableDropout(tf.keras.layers.Layer): method __init__ (line 114) | def __init__(self, drop_prob, **kwargs): method xdropout (line 119) | def xdropout(self, inputs): method call (line 140) | def call(self, inputs: tf.Tensor, training: tf.Tensor = False): class TFDebertaV2SelfOutput (line 147) | class TFDebertaV2SelfOutput(tf.keras.layers.Layer): method __init__ (line 148) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 154) | def call(self, hidden_states, input_tensor, training: bool = False): class TFDebertaV2Attention (line 162) | class TFDebertaV2Attention(tf.keras.layers.Layer): method __init__ (line 163) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 169) | def call( class TFDebertaV2Intermediate (line 200) | class TFDebertaV2Intermediate(tf.keras.layers.Layer): method __init__ (line 201) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 213) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2Output (line 221) | class TFDebertaV2Output(tf.keras.layers.Layer): method __init__ (line 222) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 231) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDebertaV2Layer (line 240) | class TFDebertaV2Layer(tf.keras.layers.Layer): method __init__ (line 241) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 248) | def call( class TFDebertaV2ConvLayer (line 277) | class TFDebertaV2ConvLayer(tf.keras.layers.Layer): method __init__ (line 278) | def __init__(self, config: DebertaV2Config, **kwargs): method build (line 289) | def build(self, input_shape): method call (line 301) | def call( class TFDebertaV2Encoder (line 332) | class TFDebertaV2Encoder(tf.keras.layers.Layer): method __init__ (line 333) | def __init__(self, config: DebertaV2Config, **kwargs): method build (line 357) | def build(self, input_shape): method get_rel_embedding (line 366) | def get_rel_embedding(self): method get_attention_mask (line 372) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 382) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method call (line 393) | def call( function make_log_bucket_position (line 454) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 470) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 498) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 508) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 518) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function take_along_axis (line 523) | def take_along_axis(x, indices): class TFDebertaV2DisentangledSelfAttention (line 542) | class TFDebertaV2DisentangledSelfAttention(tf.keras.layers.Layer): method __init__ (line 553) | def __init__(self, config: DebertaV2Config, **kwargs): method transpose_for_scores (line 615) | def transpose_for_scores(self, tensor: tf.Tensor, attention_heads: int... method call (line 626) | def call( method disentangled_att_bias (line 715) | def disentangled_att_bias(self, query_layer, key_layer, relative_pos, ... class TFDebertaV2Embeddings (line 806) | class TFDebertaV2Embeddings(tf.keras.layers.Layer): method __init__ (line 809) | def __init__(self, config, **kwargs): method build (line 823) | def build(self, input_shape: tf.TensorShape): method call (line 853) | def call( class TFDebertaV2PredictionHeadTransform (line 910) | class TFDebertaV2PredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 911) | def __init__(self, config: DebertaV2Config, **kwargs): method call (line 926) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2LMPredictionHead (line 935) | class TFDebertaV2LMPredictionHead(tf.keras.layers.Layer): method __init__ (line 936) | def __init__(self, config: DebertaV2Config, input_embeddings: tf.keras... method build (line 948) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 953) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 956) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 960) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 963) | def set_bias(self, value: tf.Variable): method call (line 967) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDebertaV2OnlyMLMHead (line 979) | class TFDebertaV2OnlyMLMHead(tf.keras.layers.Layer): method __init__ (line 980) | def __init__(self, config: DebertaV2Config, input_embeddings: tf.keras... method call (line 984) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFDebertaV2MainLayer (line 991) | class TFDebertaV2MainLayer(tf.keras.layers.Layer): method __init__ (line 994) | def __init__(self, config: DebertaV2Config, **kwargs): method get_input_embeddings (line 1002) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 1005) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 1009) | def _prune_heads(self, heads_to_prune): method call (line 1017) | def call( class TFDebertaV2PreTrainedModel (line 1075) | class TFDebertaV2PreTrainedModel(TFPreTrainedModel): class TFDebertaV2Model (line 1176) | class TFDebertaV2Model(TFDebertaV2PreTrainedModel): method __init__ (line 1177) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1189) | def call( class TFDebertaV2ForMaskedLM (line 1218) | class TFDebertaV2ForMaskedLM(TFDebertaV2PreTrainedModel, TFMaskedLanguag... method __init__ (line 1219) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method get_lm_head (line 1231) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1241) | def call( class TFDebertaV2ForSequenceClassification (line 1295) | class TFDebertaV2ForSequenceClassification(TFDebertaV2PreTrainedModel, T... method __init__ (line 1296) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1320) | def call( class TFDebertaV2ForTokenClassification (line 1377) | class TFDebertaV2ForTokenClassification(TFDebertaV2PreTrainedModel, TFTo... method __init__ (line 1378) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1396) | def call( class TFDebertaV2ForQuestionAnswering (line 1449) | class TFDebertaV2ForQuestionAnswering(TFDebertaV2PreTrainedModel, TFQues... method __init__ (line 1450) | def __init__(self, config: DebertaV2Config, *inputs, **kwargs): method call (line 1467) | def call( FILE: transformers/models/deberta_v2/tokenization_deberta_v2.py class DebertaV2Tokenizer (line 56) | class DebertaV2Tokenizer(PreTrainedTokenizer): method __init__ (line 110) | def __init__( method vocab_size (line 154) | def vocab_size(self): method vocab (line 158) | def vocab(self): method get_vocab (line 161) | def get_vocab(self): method _tokenize (line 166) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 172) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 176) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 180) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 208) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 234) | def create_token_type_ids_from_sequences(self, token_ids_0, token_ids_... method prepare_for_tokenization (line 261) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method save_vocabulary (line 267) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class SPMTokenizer (line 271) | class SPMTokenizer: method __init__ (line 296) | def __init__( method __getstate__ (line 321) | def __getstate__(self): method __setstate__ (line 326) | def __setstate__(self, d): method tokenize (line 336) | def tokenize(self, text): method convert_ids_to_tokens (line 339) | def convert_ids_to_tokens(self, ids): method decode (line 345) | def decode(self, tokens, start=-1, end=-1, raw_text=None): method add_special_token (line 377) | def add_special_token(self, token): method part_of_whole_word (line 385) | def part_of_whole_word(self, token, is_bos=False): method pad (line 397) | def pad(self): method bos (line 400) | def bos(self): method eos (line 403) | def eos(self): method unk (line 406) | def unk(self): method mask (line 409) | def mask(self): method sym (line 412) | def sym(self, id): method id (line 415) | def id(self, sym): method _encode_as_pieces (line 418) | def _encode_as_pieces(self, text): method split_to_words (line 427) | def split_to_words(self, text): method _run_strip_accents (line 463) | def _run_strip_accents(self, text): method _run_split_on_punc (line 474) | def _run_split_on_punc(self, text): method save_pretrained (line 494) | def save_pretrained(self, path: str, filename_prefix: str = None): function _is_whitespace (line 504) | def _is_whitespace(char): function _is_control (line 516) | def _is_control(char): function _is_punctuation (line 528) | def _is_punctuation(char): function convert_to_unicode (line 543) | def convert_to_unicode(text): FILE: transformers/models/deberta_v2/tokenization_deberta_v2_fast.py class DebertaV2TokenizerFast (line 63) | class DebertaV2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 118) | def __init__( method build_inputs_with_special_tokens (line 153) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 177) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 203) | def create_token_type_ids_from_sequences(self, token_ids_0, token_ids_... method save_vocabulary (line 230) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/decision_transformer/configuration_decision_transformer.py class DecisionTransformerConfig (line 31) | class DecisionTransformerConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: transformers/models/decision_transformer/modeling_decision_transformer.py function load_tf_weights_in_gpt2 (line 53) | def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path): class DecisionTransformerGPT2Attention (line 111) | class DecisionTransformerGPT2Attention(nn.Module): method __init__ (line 112) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method prune_heads (line 155) | def prune_heads(self, heads): method _attn (line 170) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 210) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 262) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 270) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 278) | def forward( class DecisionTransformerGPT2MLP (line 333) | class DecisionTransformerGPT2MLP(nn.Module): method __init__ (line 334) | def __init__(self, intermediate_size, config): method forward (line 342) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class DecisionTransformerGPT2Block (line 351) | class DecisionTransformerGPT2Block(nn.Module): method __init__ (line 352) | def __init__(self, config, layer_idx=None): method forward (line 369) | def forward( class DecisionTransformerGPT2PreTrainedModel (line 431) | class DecisionTransformerGPT2PreTrainedModel(PreTrainedModel): method __init__ (line 443) | def __init__(self, *inputs, **kwargs): method _init_weights (line 446) | def _init_weights(self, module): method _set_gradient_checkpointing (line 473) | def _set_gradient_checkpointing(self, module, value=False): class DecisionTransformerGPT2Model (line 478) | class DecisionTransformerGPT2Model(DecisionTransformerGPT2PreTrainedModel): method __init__ (line 481) | def __init__(self, config): method get_input_embeddings (line 503) | def get_input_embeddings(self): method set_input_embeddings (line 506) | def set_input_embeddings(self, new_embeddings): method forward (line 510) | def forward( class DecisionTransformerOutput (line 706) | class DecisionTransformerOutput(ModelOutput): class DecisionTransformerPreTrainedModel (line 740) | class DecisionTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 753) | def _init_weights(self, module): class DecisionTransformerModel (line 800) | class DecisionTransformerModel(DecisionTransformerPreTrainedModel): method __init__ (line 808) | def __init__(self, config): method forward (line 835) | def forward( FILE: transformers/models/deformable_detr/configuration_deformable_detr.py class DeformableDetrConfig (line 30) | class DeformableDetrConfig(PretrainedConfig): method __init__ (line 152) | def __init__( method num_attention_heads (line 257) | def num_attention_heads(self) -> int: method hidden_size (line 261) | def hidden_size(self) -> int: FILE: transformers/models/deformable_detr/convert_deformable_detr_to_pytorch.py function rename_key (line 35) | def rename_key(orig_key): function read_in_q_k_v (line 64) | def read_in_q_k_v(state_dict): function prepare_img (line 80) | def prepare_img(): function convert_deformable_detr_checkpoint (line 88) | def convert_deformable_detr_checkpoint( FILE: transformers/models/deformable_detr/feature_extraction_deformable_detr.py class DeformableDetrFeatureExtractor (line 26) | class DeformableDetrFeatureExtractor(DeformableDetrImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/deformable_detr/image_processing_deformable_detr.py class AnnotionFormat (line 85) | class AnnotionFormat(ExplicitEnum): function get_size_with_aspect_ratio (line 94) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 126) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 150) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 175) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 189) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 204) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 212) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 228) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function convert_coco_poly_to_mask (line 245) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 280) | def prepare_coco_detection_annotation(image, target, return_segmentation... function masks_to_boxes (line 333) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 368) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 406) | def get_segmentation_image( function get_mask_area (line 432) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 442) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 451) | def post_process_panoptic_sample( function resize_annotation (line 537) | def resize_annotation( function binary_mask_to_rle (line 589) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 612) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 634) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 663) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 682) | def compute_segments( class DeformableDetrImageProcessor (line 742) | class DeformableDetrImageProcessor(BaseImageProcessor): method __init__ (line 780) | def __init__( method max_size (line 823) | def max_size(self): method from_dict (line 832) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 846) | def prepare_annotation( method prepare (line 872) | def prepare(self, image, target, return_segmentation_masks=None, masks... method convert_coco_poly_to_mask (line 882) | def convert_coco_poly_to_mask(self, *args, **kwargs): method prepare_coco_detection (line 889) | def prepare_coco_detection(self, *args, **kwargs): method prepare_coco_panoptic (line 896) | def prepare_coco_panoptic(self, *args, **kwargs): method resize (line 903) | def resize( method resize_annotation (line 937) | def resize_annotation( method rescale (line 951) | def rescale( method normalize (line 960) | def normalize( method normalize_annotation (line 973) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method pad_and_create_pixel_mask (line 981) | def pad_and_create_pixel_mask( method _pad_image (line 1015) | def _pad_image( method pad (line 1037) | def pad( method preprocess (line 1076) | def preprocess( method post_process (line 1282) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 1327) | def post_process_object_detection( FILE: transformers/models/deformable_detr/load_custom.py function load_cuda_kernels (line 20) | def load_cuda_kernels(): FILE: transformers/models/deformable_detr/modeling_deformable_detr.py class MultiScaleDeformableAttentionFunction (line 68) | class MultiScaleDeformableAttentionFunction(Function): method forward (line 70) | def forward( method backward (line 95) | def backward(context, grad_output): class DeformableDetrDecoderOutput (line 134) | class DeformableDetrDecoderOutput(ModelOutput): class DeformableDetrModelOutput (line 171) | class DeformableDetrModelOutput(ModelOutput): class DeformableDetrObjectDetectionOutput (line 229) | class DeformableDetrObjectDetectionOutput(ModelOutput): function _get_clones (line 308) | def _get_clones(module, N): function inverse_sigmoid (line 312) | def inverse_sigmoid(x, eps=1e-5): class DeformableDetrFrozenBatchNorm2d (line 320) | class DeformableDetrFrozenBatchNorm2d(nn.Module): method __init__ (line 328) | def __init__(self, n): method _load_from_state_dict (line 335) | def _load_from_state_dict( method forward (line 346) | def forward(self, x): function replace_batch_norm (line 360) | def replace_batch_norm(m, name=""): class DeformableDetrConvEncoder (line 375) | class DeformableDetrConvEncoder(nn.Module): method __init__ (line 383) | def __init__(self, config): method forward (line 423) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DeformableDetrConvModel (line 436) | class DeformableDetrConvModel(nn.Module): method __init__ (line 441) | def __init__(self, conv_encoder, position_embedding): method forward (line 446) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 458) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DeformableDetrSinePositionEmbedding (line 472) | class DeformableDetrSinePositionEmbedding(nn.Module): method __init__ (line 478) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 489) | def forward(self, pixel_values, pixel_mask): class DeformableDetrLearnedPositionEmbedding (line 511) | class DeformableDetrLearnedPositionEmbedding(nn.Module): method __init__ (line 516) | def __init__(self, embedding_dim=256): method forward (line 521) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 535) | def build_position_encoding(config): function multi_scale_deformable_attention (line 548) | def multi_scale_deformable_attention( class DeformableDetrMultiscaleDeformableAttention (line 587) | class DeformableDetrMultiscaleDeformableAttention(nn.Module): method __init__ (line 592) | def __init__(self, config: DeformableDetrConfig, num_heads: int, n_poi... method _reset_parameters (line 623) | def _reset_parameters(self): method with_pos_embed (line 643) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 646) | def forward( class DeformableDetrMultiheadAttention (line 720) | class DeformableDetrMultiheadAttention(nn.Module): method __init__ (line 727) | def __init__( method _shape (line 751) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 754) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 757) | def forward( class DeformableDetrEncoderLayer (line 837) | class DeformableDetrEncoderLayer(nn.Module): method __init__ (line 838) | def __init__(self, config: DeformableDetrConfig): method forward (line 852) | def forward( class DeformableDetrDecoderLayer (line 922) | class DeformableDetrDecoderLayer(nn.Module): method __init__ (line 923) | def __init__(self, config: DeformableDetrConfig): method forward (line 950) | def forward( class DeformableDetrClassificationHead (line 1034) | class DeformableDetrClassificationHead(nn.Module): method __init__ (line 1037) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 1043) | def forward(self, hidden_states: torch.Tensor): class DeformableDetrPreTrainedModel (line 1052) | class DeformableDetrPreTrainedModel(PreTrainedModel): method _init_weights (line 1057) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1081) | def _set_gradient_checkpointing(self, module, value=False): class DeformableDetrEncoder (line 1141) | class DeformableDetrEncoder(DeformableDetrPreTrainedModel): method __init__ (line 1152) | def __init__(self, config: DeformableDetrConfig): method get_reference_points (line 1162) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1192) | def forward( class DeformableDetrDecoder (line 1271) | class DeformableDetrDecoder(DeformableDetrPreTrainedModel): method __init__ (line 1286) | def __init__(self, config: DeformableDetrConfig): method forward (line 1300) | def forward( class DeformableDetrModel (line 1467) | class DeformableDetrModel(DeformableDetrPreTrainedModel): method __init__ (line 1468) | def __init__(self, config: DeformableDetrConfig): method get_encoder (line 1525) | def get_encoder(self): method get_decoder (line 1528) | def get_decoder(self): method freeze_backbone (line 1531) | def freeze_backbone(self): method unfreeze_backbone (line 1535) | def unfreeze_backbone(self): method get_valid_ratio (line 1539) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 1550) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 1567) | def gen_encoder_output_proposals(self, enc_output, padding_mask, spati... method forward (line 1618) | def forward( class DeformableDetrForObjectDetection (line 1824) | class DeformableDetrForObjectDetection(DeformableDetrPreTrainedModel): method __init__ (line 1828) | def __init__(self, config: DeformableDetrConfig): method _set_aux_loss (line 1870) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1878) | def forward( function dice_loss (line 2049) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2069) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DeformableDetrLoss (line 2100) | class DeformableDetrLoss(nn.Module): method __init__ (line 2117) | def __init__(self, matcher, num_classes, focal_alpha, losses): method loss_labels (line 2125) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2160) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2176) | def loss_boxes(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2201) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2208) | def _get_target_permutation_idx(self, indices): method get_loss (line 2214) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2224) | def forward(self, outputs, targets): class DeformableDetrMLPPredictionHead (line 2282) | class DeformableDetrMLPPredictionHead(nn.Module): method __init__ (line 2291) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2297) | def forward(self, x): class DeformableDetrHungarianMatcher (line 2303) | class DeformableDetrHungarianMatcher(nn.Module): method __init__ (line 2320) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2331) | def forward(self, outputs, targets): function _upcast (line 2384) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2393) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2410) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2427) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2452) | def _max_by_axis(the_list): class NestedTensor (line 2462) | class NestedTensor(object): method __init__ (line 2463) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2467) | def to(self, device): method decompose (line 2476) | def decompose(self): method __repr__ (line 2479) | def __repr__(self): function nested_tensor_from_tensor_list (line 2484) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: transformers/models/deit/configuration_deit.py class DeiTConfig (line 37) | class DeiTConfig(PretrainedConfig): method __init__ (line 96) | def __init__( class DeiTOnnxConfig (line 132) | class DeiTOnnxConfig(OnnxConfig): method inputs (line 136) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 144) | def atol_for_validation(self) -> float: FILE: transformers/models/deit/convert_deit_timm_to_pytorch.py function create_rename_keys (line 37) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 93) | def read_in_q_k_v(state_dict, config, base_model=False): function rename_key (line 119) | def rename_key(dct, old, new): function prepare_img (line 125) | def prepare_img(): function convert_deit_checkpoint (line 132) | def convert_deit_checkpoint(deit_name, pytorch_dump_folder_path): FILE: transformers/models/deit/feature_extraction_deit.py class DeiTFeatureExtractor (line 26) | class DeiTFeatureExtractor(DeiTImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/deit/image_processing_deit.py class DeiTImageProcessor (line 43) | class DeiTImageProcessor(BaseImageProcessor): method __init__ (line 79) | def __init__( method resize (line 110) | def resize( method center_crop (line 138) | def center_crop( method rescale (line 162) | def rescale( method normalize (line 182) | def normalize( method preprocess (line 205) | def preprocess( FILE: transformers/models/deit/modeling_deit.py class DeiTEmbeddings (line 68) | class DeiTEmbeddings(nn.Module): method __init__ (line 73) | def __init__(self, config: DeiTConfig, use_mask_token: bool = False) -... method forward (line 84) | def forward(self, pixel_values: torch.Tensor, bool_masked_pos: Optiona... class DeiTPatchEmbeddings (line 102) | class DeiTPatchEmbeddings(nn.Module): method __init__ (line 109) | def __init__(self, config): method forward (line 124) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class DeiTSelfAttention (line 139) | class DeiTSelfAttention(nn.Module): method __init__ (line 140) | def __init__(self, config: DeiTConfig) -> None: method transpose_for_scores (line 158) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 163) | def forward( class DeiTSelfOutput (line 200) | class DeiTSelfOutput(nn.Module): method __init__ (line 206) | def __init__(self, config: DeiTConfig) -> None: method forward (line 211) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DeiTAttention (line 219) | class DeiTAttention(nn.Module): method __init__ (line 220) | def __init__(self, config: DeiTConfig) -> None: method prune_heads (line 226) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 244) | def forward( class DeiTIntermediate (line 259) | class DeiTIntermediate(nn.Module): method __init__ (line 260) | def __init__(self, config: DeiTConfig) -> None: method forward (line 268) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DeiTOutput (line 276) | class DeiTOutput(nn.Module): method __init__ (line 277) | def __init__(self, config: DeiTConfig) -> None: method forward (line 282) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DeiTLayer (line 292) | class DeiTLayer(nn.Module): method __init__ (line 295) | def __init__(self, config: DeiTConfig) -> None: method forward (line 305) | def forward( class DeiTEncoder (line 335) | class DeiTEncoder(nn.Module): method __init__ (line 336) | def __init__(self, config: DeiTConfig) -> None: method forward (line 342) | def forward( class DeiTPreTrainedModel (line 392) | class DeiTPreTrainedModel(PreTrainedModel): method _init_weights (line 404) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 418) | def _set_gradient_checkpointing(self, module: DeiTEncoder, value: bool... class DeiTModel (line 461) | class DeiTModel(DeiTPreTrainedModel): method __init__ (line 462) | def __init__(self, config: DeiTConfig, add_pooling_layer: bool = True,... method get_input_embeddings (line 475) | def get_input_embeddings(self) -> DeiTPatchEmbeddings: method _prune_heads (line 478) | def _prune_heads(self, heads_to_prune): method forward (line 494) | def forward( class DeiTPooler (line 554) | class DeiTPooler(nn.Module): method __init__ (line 555) | def __init__(self, config: DeiTConfig): method forward (line 560) | def forward(self, hidden_states): class DeiTForMaskedImageModeling (line 581) | class DeiTForMaskedImageModeling(DeiTPreTrainedModel): method __init__ (line 582) | def __init__(self, config: DeiTConfig) -> None: method forward (line 601) | def forward( class DeiTForImageClassification (line 693) | class DeiTForImageClassification(DeiTPreTrainedModel): method __init__ (line 694) | def __init__(self, config: DeiTConfig) -> None: method forward (line 708) | def forward( class DeiTForImageClassificationWithTeacherOutput (line 801) | class DeiTForImageClassificationWithTeacherOutput(ModelOutput): class DeiTForImageClassificationWithTeacher (line 843) | class DeiTForImageClassificationWithTeacher(DeiTPreTrainedModel): method __init__ (line 844) | def __init__(self, config: DeiTConfig) -> None: method forward (line 868) | def forward( FILE: transformers/models/deit/modeling_tf_deit.py class TFDeiTForImageClassificationWithTeacherOutput (line 74) | class TFDeiTForImageClassificationWithTeacherOutput(ModelOutput): class TFDeiTEmbeddings (line 104) | class TFDeiTEmbeddings(tf.keras.layers.Layer): method __init__ (line 109) | def __init__(self, config: DeiTConfig, use_mask_token: bool = False, *... method build (line 116) | def build(self, input_shape: tf.TensorShape): method call (line 146) | def call( class TFDeiTPatchEmbeddings (line 167) | class TFDeiTPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 174) | def __init__(self, config: DeiTConfig, **kwargs) -> None: method call (line 191) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFDeiTSelfAttention (line 208) | class TFDeiTSelfAttention(tf.keras.layers.Layer): method __init__ (line 209) | def __init__(self, config: DeiTConfig, **kwargs): method transpose_for_scores (line 234) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 241) | def call( class TFDeiTSelfOutput (line 284) | class TFDeiTSelfOutput(tf.keras.layers.Layer): method __init__ (line 290) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 298) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDeiTAttention (line 306) | class TFDeiTAttention(tf.keras.layers.Layer): method __init__ (line 307) | def __init__(self, config: DeiTConfig, **kwargs): method prune_heads (line 313) | def prune_heads(self, heads): method call (line 316) | def call( class TFDeiTIntermediate (line 335) | class TFDeiTIntermediate(tf.keras.layers.Layer): method __init__ (line 336) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 348) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDeiTOutput (line 356) | class TFDeiTOutput(tf.keras.layers.Layer): method __init__ (line 357) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 365) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFDeiTLayer (line 373) | class TFDeiTLayer(tf.keras.layers.Layer): method __init__ (line 376) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 390) | def call( class TFDeiTEncoder (line 424) | class TFDeiTEncoder(tf.keras.layers.Layer): method __init__ (line 425) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 430) | def call( class TFDeiTMainLayer (line 470) | class TFDeiTMainLayer(tf.keras.layers.Layer): method __init__ (line 473) | def __init__( method get_input_embeddings (line 485) | def get_input_embeddings(self) -> TFDeiTPatchEmbeddings: method _prune_heads (line 488) | def _prune_heads(self, heads_to_prune): method get_head_mask (line 495) | def get_head_mask(self, head_mask): method call (line 504) | def call( class TFDeiTPreTrainedModel (line 561) | class TFDeiTPreTrainedModel(TFPreTrainedModel): class TFDeiTModel (line 610) | class TFDeiTModel(TFDeiTPreTrainedModel): method __init__ (line 611) | def __init__( method call (line 629) | def call( class TFDeiTPooler (line 652) | class TFDeiTPooler(tf.keras.layers.Layer): method __init__ (line 653) | def __init__(self, config: DeiTConfig, **kwargs): method call (line 663) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFDeitPixelShuffle (line 672) | class TFDeitPixelShuffle(tf.keras.layers.Layer): method __init__ (line 675) | def __init__(self, upscale_factor: int, **kwargs) -> None: method call (line 681) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFDeitDecoder (line 698) | class TFDeitDecoder(tf.keras.layers.Layer): method __init__ (line 699) | def __init__(self, config: DeiTConfig, **kwargs) -> None: method call (line 706) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: class TFDeiTForMaskedImageModeling (line 718) | class TFDeiTForMaskedImageModeling(TFDeiTPreTrainedModel): method __init__ (line 719) | def __init__(self, config: DeiTConfig) -> None: method call (line 728) | def call( class TFDeiTForImageClassification (line 833) | class TFDeiTForImageClassification(TFDeiTPreTrainedModel, TFSequenceClas... method __init__ (line 834) | def __init__(self, config: DeiTConfig): method call (line 850) | def call( class TFDeiTForImageClassificationWithTeacher (line 935) | class TFDeiTForImageClassificationWithTeacher(TFDeiTPreTrainedModel): method __init__ (line 936) | def __init__(self, config: DeiTConfig) -> None: method call (line 962) | def call( FILE: transformers/models/deta/configuration_deta.py class DetaConfig (line 31) | class DetaConfig(PretrainedConfig): method __init__ (line 134) | def __init__( method num_attention_heads (line 227) | def num_attention_heads(self) -> int: method hidden_size (line 231) | def hidden_size(self) -> int: method to_dict (line 234) | def to_dict(self): FILE: transformers/models/deta/convert_deta_resnet_to_pytorch.py function get_deta_config (line 37) | def get_deta_config(): function create_rename_keys (line 61) | def create_rename_keys(config): function rename_key (line 185) | def rename_key(dct, old, new): function read_in_decoder_q_k_v (line 190) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 209) | def prepare_img(): function convert_deta_checkpoint (line 217) | def convert_deta_checkpoint(model_name, pytorch_dump_folder_path, push_t... FILE: transformers/models/deta/convert_deta_swin_to_pytorch.py function get_deta_config (line 37) | def get_deta_config(model_name): function create_rename_keys (line 76) | def create_rename_keys(config): function rename_key (line 160) | def rename_key(dct, old, new): function read_in_swin_q_k_v (line 166) | def read_in_swin_q_k_v(state_dict, backbone_config): function read_in_decoder_q_k_v (line 191) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 210) | def prepare_img(): function convert_deta_checkpoint (line 218) | def convert_deta_checkpoint(model_name, pytorch_dump_folder_path, push_t... FILE: transformers/models/deta/image_processing_deta.py class AnnotionFormat (line 77) | class AnnotionFormat(ExplicitEnum): function get_size_with_aspect_ratio (line 86) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 118) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 142) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 167) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 181) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 196) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 204) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 220) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function convert_coco_poly_to_mask (line 237) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 272) | def prepare_coco_detection_annotation(image, target, return_segmentation... function masks_to_boxes (line 325) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 360) | def prepare_coco_panoptic_annotation( function resize_annotation (line 398) | def resize_annotation( class DetaImageProcessor (line 449) | class DetaImageProcessor(BaseImageProcessor): method __init__ (line 486) | def __init__( method prepare_annotation (line 519) | def prepare_annotation( method prepare (line 545) | def prepare(self, image, target, return_segmentation_masks=None, masks... method convert_coco_poly_to_mask (line 555) | def convert_coco_poly_to_mask(self, *args, **kwargs): method prepare_coco_detection (line 562) | def prepare_coco_detection(self, *args, **kwargs): method prepare_coco_panoptic (line 569) | def prepare_coco_panoptic(self, *args, **kwargs): method resize (line 575) | def resize( method resize_annotation (line 601) | def resize_annotation( method rescale (line 615) | def rescale( method normalize (line 624) | def normalize( method normalize_annotation (line 637) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method pad_and_create_pixel_mask (line 645) | def pad_and_create_pixel_mask( method _pad_image (line 679) | def _pad_image( method pad (line 701) | def pad( method preprocess (line 739) | def preprocess( method post_process_object_detection (line 936) | def post_process_object_detection( FILE: transformers/models/deta/modeling_deta.py class DetaDecoderOutput (line 70) | class DetaDecoderOutput(ModelOutput): class DetaModelOutput (line 108) | class DetaModelOutput(ModelOutput): class DetaObjectDetectionOutput (line 167) | class DetaObjectDetectionOutput(ModelOutput): function _get_clones (line 246) | def _get_clones(module, N): function inverse_sigmoid (line 250) | def inverse_sigmoid(x, eps=1e-5): class DetaFrozenBatchNorm2d (line 258) | class DetaFrozenBatchNorm2d(nn.Module): method __init__ (line 266) | def __init__(self, n): method _load_from_state_dict (line 273) | def _load_from_state_dict( method forward (line 284) | def forward(self, x): function replace_batch_norm (line 298) | def replace_batch_norm(m, name=""): class DetaBackboneWithPositionalEncodings (line 313) | class DetaBackboneWithPositionalEncodings(nn.Module): method __init__ (line 320) | def __init__(self, config): method forward (line 337) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): function _expand_mask (line 359) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DetaSinePositionEmbedding (line 374) | class DetaSinePositionEmbedding(nn.Module): method __init__ (line 380) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 391) | def forward(self, pixel_values, pixel_mask): class DetaLearnedPositionEmbedding (line 413) | class DetaLearnedPositionEmbedding(nn.Module): method __init__ (line 418) | def __init__(self, embedding_dim=256): method forward (line 423) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 437) | def build_position_encoding(config): function multi_scale_deformable_attention (line 451) | def multi_scale_deformable_attention( class DetaMultiscaleDeformableAttention (line 490) | class DetaMultiscaleDeformableAttention(nn.Module): method __init__ (line 495) | def __init__(self, embed_dim: int, num_heads: int, n_levels: int, n_po... method _reset_parameters (line 524) | def _reset_parameters(self): method with_pos_embed (line 544) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 547) | def forward( class DetaMultiheadAttention (line 606) | class DetaMultiheadAttention(nn.Module): method __init__ (line 613) | def __init__( method _shape (line 637) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 640) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 643) | def forward( class DetaEncoderLayer (line 723) | class DetaEncoderLayer(nn.Module): method __init__ (line 724) | def __init__(self, config: DetaConfig): method forward (line 741) | def forward( class DetaDecoderLayer (line 811) | class DetaDecoderLayer(nn.Module): method __init__ (line 812) | def __init__(self, config: DetaConfig): method forward (line 840) | def forward( class DetaClassificationHead (line 924) | class DetaClassificationHead(nn.Module): method __init__ (line 927) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 933) | def forward(self, hidden_states: torch.Tensor): class DetaPreTrainedModel (line 943) | class DetaPreTrainedModel(PreTrainedModel): method _init_weights (line 948) | def _init_weights(self, module): method _set_gradient_checkpointing (line 972) | def _set_gradient_checkpointing(self, module, value=False): class DetaEncoder (line 1032) | class DetaEncoder(DetaPreTrainedModel): method __init__ (line 1043) | def __init__(self, config: DetaConfig): method get_reference_points (line 1053) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1083) | def forward( class DetaDecoder (line 1163) | class DetaDecoder(DetaPreTrainedModel): method __init__ (line 1178) | def __init__(self, config: DetaConfig): method forward (line 1192) | def forward( class DetaModel (line 1359) | class DetaModel(DetaPreTrainedModel): method __init__ (line 1360) | def __init__(self, config: DetaConfig): method get_encoder (line 1425) | def get_encoder(self): method get_decoder (line 1429) | def get_decoder(self): method freeze_backbone (line 1433) | def freeze_backbone(self): method unfreeze_backbone (line 1438) | def unfreeze_backbone(self): method get_valid_ratio (line 1443) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 1455) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 1472) | def gen_encoder_output_proposals(self, enc_output, padding_mask, spati... method forward (line 1526) | def forward( class DetaForObjectDetection (line 1776) | class DetaForObjectDetection(DetaPreTrainedModel): method __init__ (line 1781) | def __init__(self, config: DetaConfig): method _set_aux_loss (line 1823) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1831) | def forward( function dice_loss (line 2007) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 2027) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DetaLoss (line 2058) | class DetaLoss(nn.Module): method __init__ (line 2075) | def __init__( method loss_labels (line 2099) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 2134) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2150) | def loss_boxes(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2175) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2182) | def _get_target_permutation_idx(self, indices): method get_loss (line 2189) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2199) | def forward(self, outputs, targets): class DetaMLPPredictionHead (line 2264) | class DetaMLPPredictionHead(nn.Module): method __init__ (line 2273) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2279) | def forward(self, x): class DetaHungarianMatcher (line 2286) | class DetaHungarianMatcher(nn.Module): method __init__ (line 2303) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2314) | def forward(self, outputs, targets): function _upcast (line 2367) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2376) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2393) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2410) | def generalized_box_iou(boxes1, boxes2): function nonzero_tuple (line 2435) | def nonzero_tuple(x): class DetaMatcher (line 2449) | class DetaMatcher(object): method __init__ (line 2462) | def __init__(self, thresholds: List[float], labels: List[int], allow_l... method __call__ (line 2497) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 2538) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): function subsample_labels (line 2559) | def subsample_labels(labels: torch.Tensor, num_samples: int, positive_fr... function sample_topk_per_gt (line 2602) | def sample_topk_per_gt(pr_inds, gt_inds, iou, k): class DetaStage2Assigner (line 2617) | class DetaStage2Assigner(nn.Module): method __init__ (line 2618) | def __init__(self, num_queries, max_k=4): method _sample_proposals (line 2626) | def _sample_proposals(self, matched_idxs: torch.Tensor, matched_labels... method forward (line 2662) | def forward(self, outputs, targets, return_cost_matrix=False): method postprocess_indices (line 2691) | def postprocess_indices(self, pr_inds, gt_inds, iou): class DetaStage1Assigner (line 2696) | class DetaStage1Assigner(nn.Module): method __init__ (line 2697) | def __init__(self, t_low=0.3, t_high=0.7, max_k=4): method _subsample_labels (line 2708) | def _subsample_labels(self, label): method forward (line 2723) | def forward(self, outputs, targets): method postprocess_indices (line 2753) | def postprocess_indices(self, pr_inds, gt_inds, iou): FILE: transformers/models/detr/configuration_detr.py class DetrConfig (line 37) | class DetrConfig(PretrainedConfig): method __init__ (line 143) | def __init__( method num_attention_heads (line 232) | def num_attention_heads(self) -> int: method hidden_size (line 236) | def hidden_size(self) -> int: method from_backbone_config (line 240) | def from_backbone_config(cls, backbone_config: PretrainedConfig, **kwa... method to_dict (line 251) | def to_dict(self) -> Dict[str, any]: class DetrOnnxConfig (line 263) | class DetrOnnxConfig(OnnxConfig): method inputs (line 267) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 276) | def atol_for_validation(self) -> float: method default_onnx_opset (line 280) | def default_onnx_opset(self) -> int: FILE: transformers/models/detr/convert_detr_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 111) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 116) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 128) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 172) | def prepare_img(): function convert_detr_checkpoint (line 180) | def convert_detr_checkpoint(model_name, pytorch_dump_folder_path): FILE: transformers/models/detr/convert_detr_to_pytorch.py function get_detr_config (line 35) | def get_detr_config(model_name): function create_rename_keys (line 62) | def create_rename_keys(config): function rename_key (line 232) | def rename_key(state_dict, old, new): function read_in_q_k_v (line 237) | def read_in_q_k_v(state_dict, is_panoptic=False): function prepare_img (line 281) | def prepare_img(): function convert_detr_checkpoint (line 289) | def convert_detr_checkpoint(model_name, pytorch_dump_folder_path=None, p... FILE: transformers/models/detr/feature_extraction_detr.py class DetrFeatureExtractor (line 26) | class DetrFeatureExtractor(DetrImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/detr/image_processing_detr.py class AnnotionFormat (line 85) | class AnnotionFormat(ExplicitEnum): function get_size_with_aspect_ratio (line 93) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 124) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 147) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 171) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 184) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 199) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 207) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 223) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function convert_coco_poly_to_mask (line 240) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 275) | def prepare_coco_detection_annotation(image, target, return_segmentation... function masks_to_boxes (line 327) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 361) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 398) | def get_segmentation_image( function get_mask_area (line 423) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 432) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function post_process_panoptic_sample (line 440) | def post_process_panoptic_sample( function resize_annotation (line 525) | def resize_annotation( function binary_mask_to_rle (line 577) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 600) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 621) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 649) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 667) | def compute_segments( class DetrImageProcessor (line 727) | class DetrImageProcessor(BaseImageProcessor): method __init__ (line 764) | def __init__( method max_size (line 806) | def max_size(self): method from_dict (line 814) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 827) | def prepare_annotation( method prepare (line 852) | def prepare(self, image, target, return_segmentation_masks=None, masks... method convert_coco_poly_to_mask (line 861) | def convert_coco_poly_to_mask(self, *args, **kwargs): method prepare_coco_detection (line 867) | def prepare_coco_detection(self, *args, **kwargs): method prepare_coco_panoptic (line 873) | def prepare_coco_panoptic(self, *args, **kwargs): method resize (line 879) | def resize( method resize_annotation (line 912) | def resize_annotation( method rescale (line 925) | def rescale( method normalize (line 933) | def normalize( method normalize_annotation (line 945) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method pad_and_create_pixel_mask (line 952) | def pad_and_create_pixel_mask( method _pad_image (line 985) | def _pad_image( method pad (line 1006) | def pad( method preprocess (line 1044) | def preprocess( method post_process (line 1251) | def post_process(self, outputs, target_sizes): method post_process_segmentation (line 1292) | def post_process_segmentation(self, outputs, target_sizes, threshold=0... method post_process_instance (line 1337) | def post_process_instance(self, results, outputs, orig_target_sizes, m... method post_process_panoptic (line 1384) | def post_process_panoptic(self, outputs, processed_sizes, target_sizes... method post_process_object_detection (line 1522) | def post_process_object_detection( method post_process_semantic_segmentation (line 1575) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... method post_process_instance_segmentation (line 1623) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1707) | def post_process_panoptic_segmentation( FILE: transformers/models/detr/modeling_detr.py class DetrDecoderOutput (line 65) | class DetrDecoderOutput(BaseModelOutputWithCrossAttentions): class DetrModelOutput (line 95) | class DetrModelOutput(Seq2SeqModelOutput): class DetrObjectDetectionOutput (line 135) | class DetrObjectDetectionOutput(ModelOutput): class DetrSegmentationOutput (line 198) | class DetrSegmentationOutput(ModelOutput): class DetrFrozenBatchNorm2d (line 269) | class DetrFrozenBatchNorm2d(nn.Module): method __init__ (line 277) | def __init__(self, n): method _load_from_state_dict (line 284) | def _load_from_state_dict( method forward (line 295) | def forward(self, x): function replace_batch_norm (line 308) | def replace_batch_norm(m, name=""): class DetrConvEncoder (line 323) | class DetrConvEncoder(nn.Module): method __init__ (line 331) | def __init__(self, config): method forward (line 370) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class DetrConvModel (line 382) | class DetrConvModel(nn.Module): method __init__ (line 387) | def __init__(self, conv_encoder, position_embedding): method forward (line 392) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 403) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DetrSinePositionEmbedding (line 417) | class DetrSinePositionEmbedding(nn.Module): method __init__ (line 423) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 434) | def forward(self, pixel_values, pixel_mask): class DetrLearnedPositionEmbedding (line 454) | class DetrLearnedPositionEmbedding(nn.Module): method __init__ (line 459) | def __init__(self, embedding_dim=256): method forward (line 464) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 477) | def build_position_encoding(config): class DetrAttention (line 490) | class DetrAttention(nn.Module): method __init__ (line 497) | def __init__( method _shape (line 522) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 525) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 528) | def forward( class DetrEncoderLayer (line 621) | class DetrEncoderLayer(nn.Module): method __init__ (line 622) | def __init__(self, config: DetrConfig): method forward (line 638) | def forward( class DetrDecoderLayer (line 691) | class DetrDecoderLayer(nn.Module): method __init__ (line 692) | def __init__(self, config: DetrConfig): method forward (line 718) | def forward( class DetrClassificationHead (line 798) | class DetrClassificationHead(nn.Module): method __init__ (line 801) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 807) | def forward(self, hidden_states: torch.Tensor): class DetrPreTrainedModel (line 816) | class DetrPreTrainedModel(PreTrainedModel): method _init_weights (line 821) | def _init_weights(self, module): method _set_gradient_checkpointing (line 844) | def _set_gradient_checkpointing(self, module, value=False): class DetrEncoder (line 903) | class DetrEncoder(DetrPreTrainedModel): method __init__ (line 918) | def __init__(self, config: DetrConfig): method forward (line 931) | def forward( class DetrDecoder (line 1012) | class DetrDecoder(DetrPreTrainedModel): method __init__ (line 1027) | def __init__(self, config: DetrConfig): method forward (line 1040) | def forward( class DetrModel (line 1200) | class DetrModel(DetrPreTrainedModel): method __init__ (line 1201) | def __init__(self, config: DetrConfig): method get_encoder (line 1220) | def get_encoder(self): method get_decoder (line 1223) | def get_decoder(self): method freeze_backbone (line 1226) | def freeze_backbone(self): method unfreeze_backbone (line 1230) | def unfreeze_backbone(self): method forward (line 1236) | def forward( class DetrForObjectDetection (line 1368) | class DetrForObjectDetection(DetrPreTrainedModel): method __init__ (line 1369) | def __init__(self, config: DetrConfig): method _set_aux_loss (line 1388) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1396) | def forward( class DetrForSegmentation (line 1542) | class DetrForSegmentation(DetrPreTrainedModel): method __init__ (line 1543) | def __init__(self, config: DetrConfig): method forward (line 1566) | def forward( function _expand (line 1768) | def _expand(tensor, length: int): class DetrMaskHeadSmallConv (line 1773) | class DetrMaskHeadSmallConv(nn.Module): method __init__ (line 1778) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 1812) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class DetrMHAttentionMap (line 1853) | class DetrMHAttentionMap(nn.Module): method __init__ (line 1856) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 1867) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 1881) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1900) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class DetrLoss (line 1932) | class DetrLoss(nn.Module): method __init__ (line 1957) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 1968) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1990) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 2005) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 2029) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 2062) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 2068) | def _get_target_permutation_idx(self, indices): method get_loss (line 2074) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 2085) | def forward(self, outputs, targets): class DetrMLPPredictionHead (line 2131) | class DetrMLPPredictionHead(nn.Module): method __init__ (line 2140) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 2146) | def forward(self, x): class DetrHungarianMatcher (line 2153) | class DetrHungarianMatcher(nn.Module): method __init__ (line 2170) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 2181) | def forward(self, outputs, targets): function _upcast (line 2234) | def _upcast(t: Tensor) -> Tensor: function box_area (line 2242) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 2259) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 2275) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 2300) | def _max_by_axis(the_list): class NestedTensor (line 2309) | class NestedTensor(object): method __init__ (line 2310) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 2314) | def to(self, device): method decompose (line 2323) | def decompose(self): method __repr__ (line 2326) | def __repr__(self): function nested_tensor_from_tensor_list (line 2330) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: transformers/models/dialogpt/convert_dialogpt_original_pytorch_checkpoint_to_pytorch.py function convert_dialogpt_checkpoint (line 29) | def convert_dialogpt_checkpoint(checkpoint_path: str, pytorch_dump_folde... FILE: transformers/models/dinat/configuration_dinat.py class DinatConfig (line 30) | class DinatConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 104) | def __init__( FILE: transformers/models/dinat/modeling_dinat.py function natten2dqkrpb (line 50) | def natten2dqkrpb(*args, **kwargs): function natten2dav (line 53) | def natten2dav(*args, **kwargs): class DinatEncoderOutput (line 81) | class DinatEncoderOutput(ModelOutput): class DinatModelOutput (line 115) | class DinatModelOutput(ModelOutput): class DinatImageClassifierOutput (line 152) | class DinatImageClassifierOutput(ModelOutput): class DinatEmbeddings (line 188) | class DinatEmbeddings(nn.Module): method __init__ (line 193) | def __init__(self, config): method forward (line 201) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class DinatPatchEmbeddings (line 211) | class DinatPatchEmbeddings(nn.Module): method __init__ (line 218) | def __init__(self, config): method forward (line 235) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> torch.... class DinatDownsampler (line 248) | class DinatDownsampler(nn.Module): method __init__ (line 259) | def __init__(self, dim: int, norm_layer: nn.Module = nn.LayerNorm) -> ... method forward (line 265) | def forward(self, input_feature: torch.Tensor) -> torch.Tensor: function drop_path (line 272) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class DinatDropPath (line 293) | class DinatDropPath(nn.Module): method __init__ (line 296) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 300) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 303) | def extra_repr(self) -> str: class NeighborhoodAttention (line 307) | class NeighborhoodAttention(nn.Module): method __init__ (line 308) | def __init__(self, config, dim, num_heads, kernel_size, dilation): method transpose_for_scores (line 331) | def transpose_for_scores(self, x): method forward (line 336) | def forward( class NeighborhoodAttentionOutput (line 371) | class NeighborhoodAttentionOutput(nn.Module): method __init__ (line 372) | def __init__(self, config, dim): method forward (line 377) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NeighborhoodAttentionModule (line 384) | class NeighborhoodAttentionModule(nn.Module): method __init__ (line 385) | def __init__(self, config, dim, num_heads, kernel_size, dilation): method prune_heads (line 392) | def prune_heads(self, heads): method forward (line 411) | def forward( class DinatIntermediate (line 423) | class DinatIntermediate(nn.Module): method __init__ (line 424) | def __init__(self, config, dim): method forward (line 432) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DinatOutput (line 439) | class DinatOutput(nn.Module): method __init__ (line 440) | def __init__(self, config, dim): method forward (line 445) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DinatLayer (line 451) | class DinatLayer(nn.Module): method __init__ (line 452) | def __init__(self, config, dim, num_heads, dilation, drop_path_rate=0.0): method maybe_pad (line 472) | def maybe_pad(self, hidden_states, height, width): method forward (line 483) | def forward( class DinatStage (line 522) | class DinatStage(nn.Module): method __init__ (line 523) | def __init__(self, config, dim, depth, num_heads, dilations, drop_path... method forward (line 549) | def forward( class DinatEncoder (line 570) | class DinatEncoder(nn.Module): method __init__ (line 571) | def __init__(self, config): method forward (line 592) | def forward( class DinatPreTrainedModel (line 641) | class DinatPreTrainedModel(PreTrainedModel): method _init_weights (line 651) | def _init_weights(self, module): method _set_gradient_checkpointing (line 663) | def _set_gradient_checkpointing(self, module: DinatEncoder, value: boo... class DinatModel (line 700) | class DinatModel(DinatPreTrainedModel): method __init__ (line 701) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 719) | def get_input_embeddings(self): method _prune_heads (line 722) | def _prune_heads(self, heads_to_prune): method forward (line 738) | def forward( class DinatForImageClassification (line 792) | class DinatForImageClassification(DinatPreTrainedModel): method __init__ (line 793) | def __init__(self, config): method forward (line 816) | def forward( class DinatBackbone (line 883) | class DinatBackbone(DinatPreTrainedModel, BackboneMixin): method __init__ (line 884) | def __init__(self, config): method get_input_embeddings (line 903) | def get_input_embeddings(self): method forward (line 908) | def forward( FILE: transformers/models/distilbert/configuration_distilbert.py class DistilBertConfig (line 45) | class DistilBertConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class DistilBertOnnxConfig (line 142) | class DistilBertOnnxConfig(OnnxConfig): method inputs (line 144) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/distilbert/modeling_distilbert.py function create_sinusoidal_embeddings (line 72) | def create_sinusoidal_embeddings(n_pos: int, dim: int, out: torch.Tensor): function _create_sinusoidal_embeddings (line 83) | def _create_sinusoidal_embeddings(n_pos: int, dim: int, out: torch.Tensor): class Embeddings (line 91) | class Embeddings(nn.Module): method __init__ (line 92) | def __init__(self, config: PretrainedConfig): method forward (line 107) | def forward(self, input_ids: torch.Tensor, input_embeds: Optional[torc... class MultiHeadSelfAttention (line 141) | class MultiHeadSelfAttention(nn.Module): method __init__ (line 142) | def __init__(self, config: PretrainedConfig): method prune_heads (line 162) | def prune_heads(self, heads: List[int]): method forward (line 178) | def forward( class FFN (line 243) | class FFN(nn.Module): method __init__ (line 244) | def __init__(self, config: PretrainedConfig): method forward (line 253) | def forward(self, input: torch.Tensor) -> torch.Tensor: method ff_chunk (line 256) | def ff_chunk(self, input: torch.Tensor) -> torch.Tensor: class TransformerBlock (line 264) | class TransformerBlock(nn.Module): method __init__ (line 265) | def __init__(self, config: PretrainedConfig): method forward (line 278) | def forward( class Transformer (line 322) | class Transformer(nn.Module): method __init__ (line 323) | def __init__(self, config: PretrainedConfig): method forward (line 328) | def forward( class DistilBertPreTrainedModel (line 386) | class DistilBertPreTrainedModel(PreTrainedModel): method _init_weights (line 396) | def _init_weights(self, module: nn.Module): class DistilBertModel (line 470) | class DistilBertModel(DistilBertPreTrainedModel): method __init__ (line 471) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 480) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 486) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_input_embeddings (line 528) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 531) | def set_input_embeddings(self, new_embeddings: nn.Embedding): method _prune_heads (line 534) | def _prune_heads(self, heads_to_prune: Dict[int, List[List[int]]]): method forward (line 548) | def forward( class DistilBertForMaskedLM (line 597) | class DistilBertForMaskedLM(DistilBertPreTrainedModel): method __init__ (line 600) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 615) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 621) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_output_embeddings (line 635) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 638) | def set_output_embeddings(self, new_embeddings: nn.Module): method forward (line 647) | def forward( class DistilBertForSequenceClassification (line 704) | class DistilBertForSequenceClassification(DistilBertPreTrainedModel): method __init__ (line 705) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 718) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 724) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 744) | def forward( class DistilBertForQuestionAnswering (line 821) | class DistilBertForQuestionAnswering(DistilBertPreTrainedModel): method __init__ (line 822) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 835) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 841) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 861) | def forward( class DistilBertForTokenClassification (line 939) | class DistilBertForTokenClassification(DistilBertPreTrainedModel): method __init__ (line 940) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 951) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 957) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 977) | def forward( class DistilBertForMultipleChoice (line 1033) | class DistilBertForMultipleChoice(DistilBertPreTrainedModel): method __init__ (line 1034) | def __init__(self, config: PretrainedConfig): method get_position_embeddings (line 1045) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1051) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1069) | def forward( FILE: transformers/models/distilbert/modeling_flax_distilbert.py function get_angles (line 95) | def get_angles(pos, i, d_model): function positional_encoding (line 100) | def positional_encoding(position, d_model): class FlaxEmbeddings (line 115) | class FlaxEmbeddings(nn.Module): method setup (line 121) | def setup(self): method __call__ (line 138) | def __call__(self, input_ids, deterministic: bool = True): class FlaxMultiHeadSelfAttention (line 160) | class FlaxMultiHeadSelfAttention(nn.Module): method setup (line 164) | def setup(self): method __call__ (line 193) | def __call__( class FlaxFFN (line 243) | class FlaxFFN(nn.Module): method setup (line 247) | def setup(self): method __call__ (line 264) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxTransformerBlock (line 272) | class FlaxTransformerBlock(nn.Module): method setup (line 276) | def setup(self): method __call__ (line 287) | def __call__( class FlaxTransformer (line 319) | class FlaxTransformer(nn.Module): method setup (line 323) | def setup(self): method __call__ (line 328) | def __call__( class FlaxTransformerEncoder (line 370) | class FlaxTransformerEncoder(nn.Module): method setup (line 374) | def setup(self): method __call__ (line 377) | def __call__( class FlaxDistilBertLMDecoder (line 396) | class FlaxDistilBertLMDecoder(nn.Module): method setup (line 401) | def setup(self): method __call__ (line 404) | def __call__(self, inputs, kernel): class FlaxDistilBertPreTrainedModel (line 413) | class FlaxDistilBertPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 423) | def __init__( method init_weights (line 435) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 456) | def __call__( class FlaxDistilBertModule (line 494) | class FlaxDistilBertModule(nn.Module): method setup (line 498) | def setup(self): method __call__ (line 502) | def __call__( class FlaxDistilBertModel (line 532) | class FlaxDistilBertModel(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForMaskedLMModule (line 539) | class FlaxDistilBertForMaskedLMModule(nn.Module): method setup (line 543) | def setup(self): method __call__ (line 563) | def __call__( class FlaxDistilBertForMaskedLM (line 605) | class FlaxDistilBertForMaskedLM(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForSequenceClassificationModule (line 612) | class FlaxDistilBertForSequenceClassificationModule(nn.Module): method setup (line 616) | def setup(self): method __call__ (line 629) | def __call__( class FlaxDistilBertForSequenceClassification (line 672) | class FlaxDistilBertForSequenceClassification(FlaxDistilBertPreTrainedMo... class FlaxDistilBertForMultipleChoiceModule (line 684) | class FlaxDistilBertForMultipleChoiceModule(nn.Module): method setup (line 688) | def setup(self): method __call__ (line 701) | def __call__( class FlaxDistilBertForMultipleChoice (line 751) | class FlaxDistilBertForMultipleChoice(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForTokenClassificationModule (line 766) | class FlaxDistilBertForTokenClassificationModule(nn.Module): method setup (line 770) | def setup(self): method __call__ (line 775) | def __call__( class FlaxDistilBertForTokenClassification (line 816) | class FlaxDistilBertForTokenClassification(FlaxDistilBertPreTrainedModel): class FlaxDistilBertForQuestionAnsweringModule (line 828) | class FlaxDistilBertForQuestionAnsweringModule(nn.Module): method setup (line 832) | def setup(self): method __call__ (line 838) | def __call__( class FlaxDistilBertForQuestionAnswering (line 885) | class FlaxDistilBertForQuestionAnswering(FlaxDistilBertPreTrainedModel): FILE: transformers/models/distilbert/modeling_tf_distilbert.py class TFEmbeddings (line 75) | class TFEmbeddings(tf.keras.layers.Layer): method __init__ (line 78) | def __init__(self, config, **kwargs): method build (line 87) | def build(self, input_shape: tf.TensorShape): method call (line 104) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFMultiHeadSelfAttention (line 130) | class TFMultiHeadSelfAttention(tf.keras.layers.Layer): method __init__ (line 131) | def __init__(self, config, **kwargs): method prune_heads (line 156) | def prune_heads(self, heads): method call (line 159) | def call(self, query, key, value, mask, head_mask, output_attentions, ... class TFFFN (line 216) | class TFFFN(tf.keras.layers.Layer): method __init__ (line 217) | def __init__(self, config, **kwargs): method call (line 228) | def call(self, input, training=False): class TFTransformerBlock (line 236) | class TFTransformerBlock(tf.keras.layers.Layer): method __init__ (line 237) | def __init__(self, config, **kwargs): method call (line 257) | def call(self, x, attn_mask, head_mask, output_attentions, training=Fa... class TFTransformer (line 285) | class TFTransformer(tf.keras.layers.Layer): method __init__ (line 286) | def __init__(self, config, **kwargs): method call (line 294) | def call(self, x, attn_mask, head_mask, output_attentions, output_hidd... class TFDistilBertMainLayer (line 341) | class TFDistilBertMainLayer(tf.keras.layers.Layer): method __init__ (line 344) | def __init__(self, config, **kwargs): method get_input_embeddings (line 356) | def get_input_embeddings(self): method set_input_embeddings (line 359) | def set_input_embeddings(self, value): method _prune_heads (line 363) | def _prune_heads(self, heads_to_prune): method call (line 367) | def call( class TFDistilBertPreTrainedModel (line 417) | class TFDistilBertPreTrainedModel(TFPreTrainedModel): class TFDistilBertModel (line 516) | class TFDistilBertModel(TFDistilBertPreTrainedModel): method __init__ (line 517) | def __init__(self, config, *inputs, **kwargs): method call (line 528) | def call( class TFDistilBertLMHead (line 552) | class TFDistilBertLMHead(tf.keras.layers.Layer): method __init__ (line 553) | def __init__(self, config, input_embeddings, **kwargs): method build (line 563) | def build(self, input_shape): method get_output_embeddings (line 568) | def get_output_embeddings(self): method set_output_embeddings (line 571) | def set_output_embeddings(self, value): method get_bias (line 575) | def get_bias(self): method set_bias (line 578) | def set_bias(self, value): method call (line 582) | def call(self, hidden_states): class TFDistilBertForMaskedLM (line 596) | class TFDistilBertForMaskedLM(TFDistilBertPreTrainedModel, TFMaskedLangu... method __init__ (line 597) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 609) | def get_lm_head(self): method get_prefix_bias_name (line 612) | def get_prefix_bias_name(self): method call (line 623) | def call( class TFDistilBertForSequenceClassification (line 678) | class TFDistilBertForSequenceClassification(TFDistilBertPreTrainedModel,... method __init__ (line 679) | def __init__(self, config, *inputs, **kwargs): method call (line 702) | def call( class TFDistilBertForTokenClassification (line 757) | class TFDistilBertForTokenClassification(TFDistilBertPreTrainedModel, TF... method __init__ (line 758) | def __init__(self, config, *inputs, **kwargs): method call (line 775) | def call( class TFDistilBertForMultipleChoice (line 825) | class TFDistilBertForMultipleChoice(TFDistilBertPreTrainedModel, TFMulti... method __init__ (line 826) | def __init__(self, config, *inputs, **kwargs): method call (line 850) | def call( class TFDistilBertForQuestionAnswering (line 919) | class TFDistilBertForQuestionAnswering(TFDistilBertPreTrainedModel, TFQu... method __init__ (line 920) | def __init__(self, config, *inputs, **kwargs): method call (line 937) | def call( FILE: transformers/models/distilbert/tokenization_distilbert.py function load_vocab (line 68) | def load_vocab(vocab_file): function whitespace_tokenize (line 80) | def whitespace_tokenize(text): class DistilBertTokenizer (line 89) | class DistilBertTokenizer(PreTrainedTokenizer): method __init__ (line 137) | def __init__( method do_lower_case (line 185) | def do_lower_case(self): method vocab_size (line 190) | def vocab_size(self): method get_vocab (line 194) | def get_vocab(self): method _tokenize (line 198) | def _tokenize(self, text): method _convert_token_to_id (line 212) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 217) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 222) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 228) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 254) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 283) | def create_token_type_ids_from_sequences( method save_vocabulary (line 313) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 335) | class BasicTokenizer(object): method __init__ (line 355) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 363) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 400) | def _run_strip_accents(self, text): method _run_split_on_punc (line 411) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 433) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 446) | def _is_chinese_char(self, cp): method _clean_text (line 470) | def _clean_text(self, text): class WordpieceTokenizer (line 485) | class WordpieceTokenizer(object): method __init__ (line 488) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 493) | def tokenize(self, text): FILE: transformers/models/distilbert/tokenization_distilbert_fast.py class DistilBertTokenizerFast (line 84) | class DistilBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 131) | def __init__( method build_inputs_with_special_tokens (line 174) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 199) | def create_token_type_ids_from_sequences( method save_vocabulary (line 229) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/dit/convert_dit_unilm_to_pytorch.py function create_rename_keys (line 37) | def create_rename_keys(config, has_lm_head=False, is_semantic=False): function read_in_q_k_v (line 92) | def read_in_q_k_v(state_dict, config, has_lm_head=False, is_semantic=Fal... function rename_key (line 121) | def rename_key(dct, old, new): function prepare_img (line 127) | def prepare_img(): function convert_dit_checkpoint (line 134) | def convert_dit_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: transformers/models/donut/configuration_donut_swin.py class DonutSwinConfig (line 29) | class DonutSwinConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: transformers/models/donut/convert_donut_to_pytorch.py function get_configs (line 35) | def get_configs(model): function rename_key (line 62) | def rename_key(name): function convert_state_dict (line 95) | def convert_state_dict(orig_state_dict, model): function convert_donut_checkpoint (line 135) | def convert_donut_checkpoint(model_name, pytorch_dump_folder_path=None, ... FILE: transformers/models/donut/feature_extraction_donut.py class DonutFeatureExtractor (line 26) | class DonutFeatureExtractor(DonutImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/donut/image_processing_donut.py class DonutImageProcessor (line 52) | class DonutImageProcessor(BaseImageProcessor): method __init__ (line 91) | def __init__( method align_long_axis (line 126) | def align_long_axis( method rotate_image (line 154) | def rotate_image(self, *args, **kwargs): method pad_image (line 160) | def pad_image( method pad (line 199) | def pad(self, *args, **kwargs): method thumbnail (line 203) | def thumbnail( method resize (line 244) | def resize( method rescale (line 272) | def rescale( method normalize (line 292) | def normalize( method preprocess (line 315) | def preprocess( FILE: transformers/models/donut/modeling_donut_swin.py class DonutSwinEncoderOutput (line 59) | class DonutSwinEncoderOutput(ModelOutput): class DonutSwinModelOutput (line 93) | class DonutSwinModelOutput(ModelOutput): function window_partition (line 129) | def window_partition(input_feature, window_size): function window_reverse (line 142) | def window_reverse(windows, window_size, height, width): class DonutSwinEmbeddings (line 153) | class DonutSwinEmbeddings(nn.Module): method __init__ (line 158) | def __init__(self, config, use_mask_token=False): method forward (line 174) | def forward( class DonutSwinPatchEmbeddings (line 196) | class DonutSwinPatchEmbeddings(nn.Module): method __init__ (line 203) | def __init__(self, config): method maybe_pad (line 218) | def maybe_pad(self, pixel_values, height, width): method forward (line 227) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class DonutSwinPatchMerging (line 244) | class DonutSwinPatchMerging(nn.Module): method __init__ (line 257) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 264) | def maybe_pad(self, input_feature, height, width): method forward (line 272) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... function drop_path (line 299) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class DonutSwinDropPath (line 320) | class DonutSwinDropPath(nn.Module): method __init__ (line 323) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 327) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 330) | def extra_repr(self) -> str: class DonutSwinSelfAttention (line 335) | class DonutSwinSelfAttention(nn.Module): method __init__ (line 336) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 373) | def transpose_for_scores(self, x): method forward (line 378) | def forward( class DonutSwinSelfOutput (line 436) | class DonutSwinSelfOutput(nn.Module): method __init__ (line 437) | def __init__(self, config, dim): method forward (line 442) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DonutSwinAttention (line 450) | class DonutSwinAttention(nn.Module): method __init__ (line 451) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 457) | def prune_heads(self, heads): method forward (line 475) | def forward( class DonutSwinIntermediate (line 489) | class DonutSwinIntermediate(nn.Module): method __init__ (line 490) | def __init__(self, config, dim): method forward (line 498) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DonutSwinOutput (line 505) | class DonutSwinOutput(nn.Module): method __init__ (line 506) | def __init__(self, config, dim): method forward (line 511) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DonutSwinLayer (line 518) | class DonutSwinLayer(nn.Module): method __init__ (line 519) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 532) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 538) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 566) | def maybe_pad(self, hidden_states, height, width): method forward (line 573) | def forward( class DonutSwinStage (line 642) | class DonutSwinStage(nn.Module): method __init__ (line 643) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 668) | def forward( class DonutSwinEncoder (line 702) | class DonutSwinEncoder(nn.Module): method __init__ (line 703) | def __init__(self, config, grid_size): method forward (line 725) | def forward( class DonutSwinPreTrainedModel (line 806) | class DonutSwinPreTrainedModel(PreTrainedModel): method _init_weights (line 817) | def _init_weights(self, module): method _set_gradient_checkpointing (line 829) | def _set_gradient_checkpointing(self, module, value=False): class DonutSwinModel (line 871) | class DonutSwinModel(DonutSwinPreTrainedModel): method __init__ (line 872) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 886) | def get_input_embeddings(self): method _prune_heads (line 889) | def _prune_heads(self, heads_to_prune): method forward (line 905) | def forward( FILE: transformers/models/donut/processing_donut.py class DonutProcessor (line 25) | class DonutProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 63) | def __call__(self, *args, **kwargs): method batch_decode (line 96) | def batch_decode(self, *args, **kwargs): method decode (line 103) | def decode(self, *args, **kwargs): method as_target_processor (line 111) | def as_target_processor(self): method token2json (line 126) | def token2json(self, tokens, is_inner_value=False, added_vocab=None): method feature_extractor_class (line 177) | def feature_extractor_class(self): method feature_extractor (line 185) | def feature_extractor(self): FILE: transformers/models/dpr/configuration_dpr.py class DPRConfig (line 45) | class DPRConfig(PretrainedConfig): method __init__ (line 112) | def __init__( FILE: transformers/models/dpr/convert_dpr_original_checkpoint_to_pytorch.py function load_states_from_checkpoint (line 30) | def load_states_from_checkpoint(model_file: str) -> CheckpointState: class DPRState (line 36) | class DPRState: method __init__ (line 37) | def __init__(self, src_file: Path): method load_dpr_model (line 40) | def load_dpr_model(self): method from_type (line 44) | def from_type(comp_type: str, *args, **kwargs) -> "DPRState": class DPRContextEncoderState (line 55) | class DPRContextEncoderState(DPRState): method load_dpr_model (line 56) | def load_dpr_model(self): class DPRQuestionEncoderState (line 73) | class DPRQuestionEncoderState(DPRState): method load_dpr_model (line 74) | def load_dpr_model(self): class DPRReaderState (line 91) | class DPRReaderState(DPRState): method load_dpr_model (line 92) | def load_dpr_model(self): function convert (line 108) | def convert(comp_type: str, src_file: Path, dest_dir: Path): FILE: transformers/models/dpr/modeling_dpr.py class DPRContextEncoderOutput (line 62) | class DPRContextEncoderOutput(ModelOutput): class DPRQuestionEncoderOutput (line 90) | class DPRQuestionEncoderOutput(ModelOutput): class DPRReaderOutput (line 118) | class DPRReaderOutput(ModelOutput): class DPRPreTrainedModel (line 150) | class DPRPreTrainedModel(PreTrainedModel): method _init_weights (line 151) | def _init_weights(self, module): method _set_gradient_checkpointing (line 167) | def _set_gradient_checkpointing(self, module, value=False): class DPREncoder (line 172) | class DPREncoder(DPRPreTrainedModel): method __init__ (line 175) | def __init__(self, config: DPRConfig): method forward (line 186) | def forward( method embeddings_size (line 222) | def embeddings_size(self) -> int: class DPRSpanPredictor (line 228) | class DPRSpanPredictor(DPRPreTrainedModel): method __init__ (line 231) | def __init__(self, config: DPRConfig): method forward (line 239) | def forward( class DPRPretrainedContextEncoder (line 290) | class DPRPretrainedContextEncoder(DPRPreTrainedModel): class DPRPretrainedQuestionEncoder (line 303) | class DPRPretrainedQuestionEncoder(DPRPreTrainedModel): class DPRPretrainedReader (line 316) | class DPRPretrainedReader(DPRPreTrainedModel): class DPRContextEncoder (line 446) | class DPRContextEncoder(DPRPretrainedContextEncoder): method __init__ (line 447) | def __init__(self, config: DPRConfig): method forward (line 456) | def forward( class DPRQuestionEncoder (line 527) | class DPRQuestionEncoder(DPRPretrainedQuestionEncoder): method __init__ (line 528) | def __init__(self, config: DPRConfig): method forward (line 537) | def forward( class DPRReader (line 608) | class DPRReader(DPRPretrainedReader): method __init__ (line 609) | def __init__(self, config: DPRConfig): method forward (line 618) | def forward( FILE: transformers/models/dpr/modeling_tf_dpr.py class TFDPRContextEncoderOutput (line 62) | class TFDPRContextEncoderOutput(ModelOutput): class TFDPRQuestionEncoderOutput (line 90) | class TFDPRQuestionEncoderOutput(ModelOutput): class TFDPRReaderOutput (line 118) | class TFDPRReaderOutput(ModelOutput): class TFDPREncoderLayer (line 150) | class TFDPREncoderLayer(tf.keras.layers.Layer): method __init__ (line 153) | def __init__(self, config: DPRConfig, **kwargs): method call (line 169) | def call( method embeddings_size (line 207) | def embeddings_size(self) -> int: class TFDPRSpanPredictorLayer (line 213) | class TFDPRSpanPredictorLayer(tf.keras.layers.Layer): method __init__ (line 216) | def __init__(self, config: DPRConfig, **kwargs): method call (line 229) | def call( class TFDPRSpanPredictor (line 277) | class TFDPRSpanPredictor(TFPreTrainedModel): method __init__ (line 280) | def __init__(self, config: DPRConfig, **kwargs): method call (line 285) | def call( class TFDPREncoder (line 309) | class TFDPREncoder(TFPreTrainedModel): method __init__ (line 312) | def __init__(self, config: DPRConfig, **kwargs): method call (line 318) | def call( class TFDPRPretrainedContextEncoder (line 346) | class TFDPRPretrainedContextEncoder(TFPreTrainedModel): class TFDPRPretrainedQuestionEncoder (line 356) | class TFDPRPretrainedQuestionEncoder(TFPreTrainedModel): class TFDPRPretrainedReader (line 366) | class TFDPRPretrainedReader(TFPreTrainedModel): class TFDPRContextEncoder (line 526) | class TFDPRContextEncoder(TFDPRPretrainedContextEncoder): method __init__ (line 527) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 531) | def get_input_embeddings(self): method call (line 541) | def call( class TFDPRQuestionEncoder (line 607) | class TFDPRQuestionEncoder(TFDPRPretrainedQuestionEncoder): method __init__ (line 608) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 612) | def get_input_embeddings(self): method call (line 622) | def call( class TFDPRReader (line 687) | class TFDPRReader(TFDPRPretrainedReader): method __init__ (line 688) | def __init__(self, config: DPRConfig, *args, **kwargs): method get_input_embeddings (line 692) | def get_input_embeddings(self): method call (line 702) | def call( FILE: transformers/models/dpr/tokenization_dpr.py class DPRContextEncoderTokenizer (line 113) | class DPRContextEncoderTokenizer(BertTokenizer): class DPRQuestionEncoderTokenizer (line 129) | class DPRQuestionEncoderTokenizer(BertTokenizer): class CustomDPRReaderTokenizerMixin (line 222) | class CustomDPRReaderTokenizerMixin: method __call__ (line 223) | def __call__( method decode_best_spans (line 282) | def decode_best_spans( method _get_best_spans (line 358) | def _get_best_spans( class DPRReaderTokenizer (line 397) | class DPRReaderTokenizer(CustomDPRReaderTokenizerMixin, BertTokenizer): FILE: transformers/models/dpr/tokenization_dpr_fast.py class DPRContextEncoderTokenizerFast (line 114) | class DPRContextEncoderTokenizerFast(BertTokenizerFast): class DPRQuestionEncoderTokenizerFast (line 131) | class DPRQuestionEncoderTokenizerFast(BertTokenizerFast): class CustomDPRReaderTokenizerMixin (line 223) | class CustomDPRReaderTokenizerMixin: method __call__ (line 224) | def __call__( method decode_best_spans (line 282) | def decode_best_spans( method _get_best_spans (line 358) | def _get_best_spans( class DPRReaderTokenizerFast (line 395) | class DPRReaderTokenizerFast(CustomDPRReaderTokenizerMixin, BertTokenize... FILE: transformers/models/dpt/configuration_dpt.py class DPTConfig (line 32) | class DPTConfig(PretrainedConfig): method __init__ (line 125) | def __init__( method to_dict (line 220) | def to_dict(self): FILE: transformers/models/dpt/convert_dpt_hybrid_to_pytorch.py function get_dpt_config (line 35) | def get_dpt_config(checkpoint_url): function remove_ignore_keys_ (line 74) | def remove_ignore_keys_(state_dict): function rename_key (line 80) | def rename_key(name): function read_in_q_k_v (line 193) | def read_in_q_k_v(state_dict, config): function prepare_img (line 214) | def prepare_img(): function convert_dpt_checkpoint (line 221) | def convert_dpt_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: transformers/models/dpt/convert_dpt_to_pytorch.py function get_dpt_config (line 35) | def get_dpt_config(checkpoint_url): function remove_ignore_keys_ (line 62) | def remove_ignore_keys_(state_dict): function rename_key (line 68) | def rename_key(name): function read_in_q_k_v (line 161) | def read_in_q_k_v(state_dict, config): function prepare_img (line 182) | def prepare_img(): function convert_dpt_checkpoint (line 189) | def convert_dpt_checkpoint(checkpoint_url, pytorch_dump_folder_path, pus... FILE: transformers/models/dpt/feature_extraction_dpt.py class DPTFeatureExtractor (line 26) | class DPTFeatureExtractor(DPTImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/dpt/image_processing_dpt.py function get_resize_output_image_size (line 50) | def get_resize_output_image_size( class DPTImageProcessor (line 88) | class DPTImageProcessor(BaseImageProcessor): method __init__ (line 123) | def __init__( method resize (line 151) | def resize( method rescale (line 194) | def rescale( method normalize (line 214) | def normalize( method preprocess (line 237) | def preprocess( method post_process_semantic_segmentation (line 342) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: transformers/models/dpt/modeling_dpt.py class BaseModelOutputWithIntermediateActivations (line 66) | class BaseModelOutputWithIntermediateActivations(ModelOutput): class BaseModelOutputWithPoolingAndIntermediateActivations (line 83) | class BaseModelOutputWithPoolingAndIntermediateActivations(ModelOutput): class DPTViTHybridEmbeddings (line 118) | class DPTViTHybridEmbeddings(nn.Module): method __init__ (line 125) | def __init__(self, config, feature_size=None): method _resize_pos_embed (line 161) | def _resize_pos_embed(self, posemb, grid_size_height, grid_size_width,... method forward (line 175) | def forward( class DPTViTEmbeddings (line 219) | class DPTViTEmbeddings(nn.Module): method __init__ (line 225) | def __init__(self, config): method _resize_pos_embed (line 235) | def _resize_pos_embed(self, posemb, grid_size_height, grid_size_width,... method forward (line 249) | def forward(self, pixel_values, return_dict=False): class DPTViTPatchEmbeddings (line 277) | class DPTViTPatchEmbeddings(nn.Module): method __init__ (line 283) | def __init__(self, config): method forward (line 298) | def forward(self, pixel_values): class DPTViTSelfAttention (line 309) | class DPTViTSelfAttention(nn.Module): method __init__ (line 310) | def __init__(self, config: DPTConfig) -> None: method transpose_for_scores (line 328) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 333) | def forward( class DPTViTSelfOutput (line 370) | class DPTViTSelfOutput(nn.Module): method __init__ (line 376) | def __init__(self, config: DPTConfig) -> None: method forward (line 381) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DPTViTAttention (line 388) | class DPTViTAttention(nn.Module): method __init__ (line 389) | def __init__(self, config: DPTConfig) -> None: method prune_heads (line 396) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 415) | def forward( class DPTViTIntermediate (line 430) | class DPTViTIntermediate(nn.Module): method __init__ (line 431) | def __init__(self, config: DPTConfig) -> None: method forward (line 439) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class DPTViTOutput (line 447) | class DPTViTOutput(nn.Module): method __init__ (line 448) | def __init__(self, config: DPTConfig) -> None: method forward (line 453) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class DPTViTLayer (line 463) | class DPTViTLayer(nn.Module): method __init__ (line 466) | def __init__(self, config: DPTConfig) -> None: method forward (line 476) | def forward( class DPTViTEncoder (line 506) | class DPTViTEncoder(nn.Module): method __init__ (line 507) | def __init__(self, config: DPTConfig) -> None: method forward (line 513) | def forward( class DPTReassembleStage (line 563) | class DPTReassembleStage(nn.Module): method __init__ (line 579) | def __init__(self, config): method _init_reassemble_dpt_hybrid (line 591) | def _init_reassemble_dpt_hybrid(self, config): method _init_reassemble_dpt (line 616) | def _init_reassemble_dpt(self, config): method forward (line 627) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class DPTReassembleLayer (line 662) | class DPTReassembleLayer(nn.Module): method __init__ (line 663) | def __init__(self, config, channels, factor): method forward (line 677) | def forward(self, hidden_state): class DPTFeatureFusionStage (line 683) | class DPTFeatureFusionStage(nn.Module): method __init__ (line 684) | def __init__(self, config): method forward (line 690) | def forward(self, hidden_states): class DPTPreActResidualLayer (line 706) | class DPTPreActResidualLayer(nn.Module): method __init__ (line 715) | def __init__(self, config): method forward (line 743) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class DPTFeatureFusionLayer (line 761) | class DPTFeatureFusionLayer(nn.Module): method __init__ (line 771) | def __init__(self, config, align_corners=True): method forward (line 781) | def forward(self, hidden_state, residual=None): class DPTPreTrainedModel (line 798) | class DPTPreTrainedModel(PreTrainedModel): method _init_weights (line 809) | def _init_weights(self, module): method _set_gradient_checkpointing (line 821) | def _set_gradient_checkpointing(self, module, value=False): class DPTModel (line 864) | class DPTModel(DPTPreTrainedModel): method __init__ (line 865) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 882) | def get_input_embeddings(self): method _prune_heads (line 888) | def _prune_heads(self, heads_to_prune): method forward (line 904) | def forward( class DPTViTPooler (line 955) | class DPTViTPooler(nn.Module): method __init__ (line 956) | def __init__(self, config: DPTConfig): method forward (line 961) | def forward(self, hidden_states): class DPTNeck (line 970) | class DPTNeck(nn.Module): method __init__ (line 982) | def __init__(self, config): method forward (line 995) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class DPTDepthEstimationHead (line 1013) | class DPTDepthEstimationHead(nn.Module): method __init__ (line 1020) | def __init__(self, config): method forward (line 1035) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class DPTForDepthEstimation (line 1052) | class DPTForDepthEstimation(DPTPreTrainedModel): method __init__ (line 1053) | def __init__(self, config): method forward (line 1069) | def forward( class DPTSemanticSegmentationHead (line 1170) | class DPTSemanticSegmentationHead(nn.Module): method __init__ (line 1171) | def __init__(self, config): method forward (line 1186) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class DPTAuxiliaryHead (line 1195) | class DPTAuxiliaryHead(nn.Module): method __init__ (line 1196) | def __init__(self, config): method forward (line 1208) | def forward(self, hidden_states): class DPTForSemanticSegmentation (line 1220) | class DPTForSemanticSegmentation(DPTPreTrainedModel): method __init__ (line 1221) | def __init__(self, config): method forward (line 1238) | def forward( FILE: transformers/models/efficientformer/configuration_efficientformer.py class EfficientFormerConfig (line 32) | class EfficientFormerConfig(PretrainedConfig): method __init__ (line 114) | def __init__( FILE: transformers/models/efficientformer/convert_efficientformer_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 38) | def rename_key(old_name, num_meta4D_last_stage): function convert_torch_checkpoint (line 107) | def convert_torch_checkpoint(checkpoint, num_meta4D_last_stage): function prepare_img (line 116) | def prepare_img(): function convert_efficientformer_checkpoint (line 123) | def convert_efficientformer_checkpoint( FILE: transformers/models/efficientformer/image_processing_efficientformer.py class EfficientFormerImageProcessor (line 46) | class EfficientFormerImageProcessor(BaseImageProcessor): method __init__ (line 85) | def __init__( method resize (line 116) | def resize( method center_crop (line 154) | def center_crop( method rescale (line 178) | def rescale( method normalize (line 200) | def normalize( method preprocess (line 229) | def preprocess( FILE: transformers/models/efficientformer/modeling_efficientformer.py class EfficientFormerPatchEmbeddings (line 59) | class EfficientFormerPatchEmbeddings(nn.Module): method __init__ (line 65) | def __init__(self, config: EfficientFormerConfig, num_channels: int, e... method forward (line 78) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class EfficientFormerSelfAttention (line 91) | class EfficientFormerSelfAttention(nn.Module): method __init__ (line 92) | def __init__(self, dim: int, key_dim: int, num_heads: int, attention_r... method train (line 119) | def train(self, mode=True): method forward (line 126) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerConvStem (line 155) | class EfficientFormerConvStem(nn.Module): method __init__ (line 156) | def __init__(self, config: EfficientFormerConfig, out_channels: int): method forward (line 167) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class EfficientFormerPooling (line 176) | class EfficientFormerPooling(nn.Module): method __init__ (line 177) | def __init__(self, pool_size: int): method forward (line 181) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EfficientFormerDenseMlp (line 186) | class EfficientFormerDenseMlp(nn.Module): method __init__ (line 187) | def __init__( method forward (line 203) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EfficientFormerConvMlp (line 213) | class EfficientFormerConvMlp(nn.Module): method __init__ (line 214) | def __init__( method forward (line 234) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: function drop_path (line 249) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class EfficientFormerDropPath (line 270) | class EfficientFormerDropPath(nn.Module): method __init__ (line 273) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 277) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 280) | def extra_repr(self) -> str: class EfficientFormerFlat (line 284) | class EfficientFormerFlat(nn.Module): method __init__ (line 285) | def __init__(self): method forward (line 288) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerMeta3D (line 293) | class EfficientFormerMeta3D(nn.Module): method __init__ (line 294) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method forward (line 317) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerMeta3DLayers (line 338) | class EfficientFormerMeta3DLayers(nn.Module): method __init__ (line 339) | def __init__(self, config: EfficientFormerConfig): method forward (line 349) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerMeta4D (line 368) | class EfficientFormerMeta4D(nn.Module): method __init__ (line 369) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method forward (line 384) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerMeta4DLayers (line 400) | class EfficientFormerMeta4DLayers(nn.Module): method __init__ (line 401) | def __init__(self, config: EfficientFormerConfig, stage_idx: int): method forward (line 417) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerIntermediateStage (line 423) | class EfficientFormerIntermediateStage(nn.Module): method __init__ (line 424) | def __init__(self, config: EfficientFormerConfig, index: int): method forward (line 428) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class EfficientFormerLastStage (line 433) | class EfficientFormerLastStage(nn.Module): method __init__ (line 434) | def __init__(self, config: EfficientFormerConfig): method forward (line 440) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class EfficientFormerEncoder (line 448) | class EfficientFormerEncoder(nn.Module): method __init__ (line 449) | def __init__(self, config: EfficientFormerConfig): method forward (line 469) | def forward( class EfficientFormerPreTrainedModel (line 505) | class EfficientFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 516) | def _init_weights(self, module: nn.Module): class EfficientFormerModel (line 557) | class EfficientFormerModel(EfficientFormerPreTrainedModel): method __init__ (line 558) | def __init__(self, config: EfficientFormerConfig): method forward (line 577) | def forward( class EfficientFormerForImageClassification (line 619) | class EfficientFormerForImageClassification(EfficientFormerPreTrainedMod... method __init__ (line 620) | def __init__(self, config: EfficientFormerConfig): method forward (line 641) | def forward( class EfficientFormerForImageClassificationWithTeacherOutput (line 704) | class EfficientFormerForImageClassificationWithTeacherOutput(ModelOutput): class EfficientFormerForImageClassificationWithTeacher (line 749) | class EfficientFormerForImageClassificationWithTeacher(EfficientFormerPr... method __init__ (line 750) | def __init__(self, config: EfficientFormerConfig): method forward (line 773) | def forward( FILE: transformers/models/efficientformer/modeling_tf_efficientformer.py class TFEfficientFormerPatchEmbeddings (line 67) | class TFEfficientFormerPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 73) | def __init__( method call (line 94) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFEfficientFormerSelfAttention (line 104) | class TFEfficientFormerSelfAttention(tf.keras.layers.Layer): method __init__ (line 105) | def __init__( method build (line 134) | def build(self, input_shape: tf.TensorShape) -> None: method call (line 165) | def call( class TFEfficientFormerConvStem (line 202) | class TFEfficientFormerConvStem(tf.keras.layers.Layer): method __init__ (line 203) | def __init__(self, config: EfficientFormerConfig, out_channels: int, *... method call (line 229) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFEfficientFormerPooling (line 237) | class TFEfficientFormerPooling(tf.keras.layers.Layer): method __init__ (line 238) | def __init__(self, pool_size: int, **kwargs): method call (line 242) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFEfficientFormerDenseMlp (line 248) | class TFEfficientFormerDenseMlp(tf.keras.layers.Layer): method __init__ (line 249) | def __init__( method call (line 271) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFEfficientFormerConvMlp (line 281) | class TFEfficientFormerConvMlp(tf.keras.layers.Layer): method __init__ (line 282) | def __init__( method call (line 322) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFEfficientFormerDropPath (line 334) | class TFEfficientFormerDropPath(tf.keras.layers.Layer): method __init__ (line 340) | def __init__(self, drop_path, **kwargs): method call (line 344) | def call(self, x, training=None): class TFEfficientFormerFlat (line 354) | class TFEfficientFormerFlat(tf.keras.layers.Layer): method __init__ (line 355) | def __init__(self, **kwargs): method call (line 358) | def call(self, hidden_states: tf.Tensor) -> Tuple[tf.Tensor]: class TFEfficientFormerMeta3D (line 364) | class TFEfficientFormerMeta3D(tf.keras.layers.Layer): method __init__ (line 365) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method build (line 393) | def build(self, input_shape: tf.TensorShape): method call (line 412) | def call( class TFEfficientFormerMeta3DLayers (line 446) | class TFEfficientFormerMeta3DLayers(tf.keras.layers.Layer): method __init__ (line 447) | def __init__(self, config: EfficientFormerConfig, **kwargs): method call (line 458) | def call( class TFEfficientFormerMeta4D (line 480) | class TFEfficientFormerMeta4D(tf.keras.layers.Layer): method __init__ (line 481) | def __init__(self, config: EfficientFormerConfig, dim: int, drop_path:... method build (line 498) | def build(self, input_shape: tf.TensorShape): method call (line 517) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> Tu... class TFEfficientFormerMeta4DLayers (line 541) | class TFEfficientFormerMeta4DLayers(tf.keras.layers.Layer): method __init__ (line 542) | def __init__(self, config: EfficientFormerConfig, stage_idx: int, **kw... method call (line 558) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> Tu... class TFEfficientFormerIntermediateStage (line 564) | class TFEfficientFormerIntermediateStage(tf.keras.layers.Layer): method __init__ (line 565) | def __init__(self, config: EfficientFormerConfig, index: int, **kwargs): method call (line 569) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> Tu... class TFEfficientFormerLastStage (line 574) | class TFEfficientFormerLastStage(tf.keras.layers.Layer): method __init__ (line 575) | def __init__(self, config: EfficientFormerConfig, **kwargs): method call (line 581) | def call( class TFEfficientFormerEncoder (line 593) | class TFEfficientFormerEncoder(tf.keras.layers.Layer): method __init__ (line 594) | def __init__(self, config: EfficientFormerConfig, **kwargs): method call (line 624) | def call( class TFEfficientFormerMainLayer (line 663) | class TFEfficientFormerMainLayer(tf.keras.layers.Layer): method __init__ (line 666) | def __init__(self, config: EfficientFormerConfig, **kwargs) -> None: method call (line 675) | def call( class TFEfficientFormerPreTrainedModel (line 732) | class TFEfficientFormerPreTrainedModel(TFPreTrainedModel): class TFEfficientFormerModel (line 775) | class TFEfficientFormerModel(TFEfficientFormerPreTrainedModel): method __init__ (line 776) | def __init__(self, config: EfficientFormerConfig, **kwargs) -> None: method call (line 790) | def call( class TFEfficientFormerForImageClassification (line 815) | class TFEfficientFormerForImageClassification(TFEfficientFormerPreTraine... method __init__ (line 816) | def __init__(self, config: EfficientFormerConfig): method call (line 837) | def call( class TFEfficientFormerForImageClassificationWithTeacherOutput (line 878) | class TFEfficientFormerForImageClassificationWithTeacherOutput(ModelOutp... class TFEfficientFormerForImageClassificationWithTeacher (line 920) | class TFEfficientFormerForImageClassificationWithTeacher(TFEfficientForm... method __init__ (line 921) | def __init__(self, config: EfficientFormerConfig) -> None: method call (line 947) | def call( FILE: transformers/models/efficientnet/configuration_efficientnet.py class EfficientNetConfig (line 34) | class EfficientNetConfig(PretrainedConfig): method __init__ (line 105) | def __init__( class EfficientNetOnnxConfig (line 156) | class EfficientNetOnnxConfig(OnnxConfig): method inputs (line 160) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 168) | def atol_for_validation(self) -> float: FILE: transformers/models/efficientnet/convert_efficientnet_to_pytorch.py function get_efficientnet_config (line 122) | def get_efficientnet_config(model_name): function prepare_img (line 143) | def prepare_img(): function convert_image_processor (line 149) | def convert_image_processor(model_name): function rename_keys (line 161) | def rename_keys(original_param_names): function replace_params (line 229) | def replace_params(hf_params, tf_params, key_mapping): function convert_efficientnet_checkpoint (line 250) | def convert_efficientnet_checkpoint(model_name, pytorch_dump_folder_path... FILE: transformers/models/efficientnet/image_processing_efficientnet.py class EfficientNetImageProcessor (line 43) | class EfficientNetImageProcessor(BaseImageProcessor): method __init__ (line 84) | def __init__( method resize (line 119) | def resize( method center_crop (line 147) | def center_crop( method rescale (line 171) | def rescale( method normalize (line 201) | def normalize( method preprocess (line 224) | def preprocess( FILE: transformers/models/efficientnet/modeling_efficientnet.py function round_filters (line 86) | def round_filters(config: EfficientNetConfig, num_channels: int): function correct_pad (line 101) | def correct_pad(kernel_size: Union[int, Tuple], adjust: bool = True): class EfficientNetEmbeddings (line 121) | class EfficientNetEmbeddings(nn.Module): method __init__ (line 126) | def __init__(self, config: EfficientNetConfig): method forward (line 137) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class EfficientNetDepthwiseConv2d (line 146) | class EfficientNetDepthwiseConv2d(nn.Conv2d): method __init__ (line 147) | def __init__( class EfficientNetExpansionLayer (line 172) | class EfficientNetExpansionLayer(nn.Module): method __init__ (line 177) | def __init__(self, config: EfficientNetConfig, in_dim: int, out_dim: i... method forward (line 189) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetDepthwiseLayer (line 198) | class EfficientNetDepthwiseLayer(nn.Module): method __init__ (line 203) | def __init__( method forward (line 225) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetSqueezeExciteLayer (line 237) | class EfficientNetSqueezeExciteLayer(nn.Module): method __init__ (line 242) | def __init__(self, config: EfficientNetConfig, in_dim: int, expand_dim... method forward (line 263) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetFinalBlockLayer (line 276) | class EfficientNetFinalBlockLayer(nn.Module): method __init__ (line 281) | def __init__( method forward (line 298) | def forward(self, embeddings: torch.FloatTensor, hidden_states: torch.... class EfficientNetBlock (line 309) | class EfficientNetBlock(nn.Module): method __init__ (line 336) | def __init__( method forward (line 377) | def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor: class EfficientNetEncoder (line 390) | class EfficientNetEncoder(nn.Module): method __init__ (line 399) | def __init__(self, config: EfficientNetConfig): method forward (line 454) | def forward( class EfficientNetPreTrainedModel (line 480) | class EfficientNetPreTrainedModel(PreTrainedModel): method _init_weights (line 491) | def _init_weights(self, module): method _set_gradient_checkpointing (line 503) | def _set_gradient_checkpointing(self, module, value=False): class EfficientNetModel (line 512) | class EfficientNetModel(EfficientNetPreTrainedModel): method __init__ (line 513) | def __init__(self, config: EfficientNetConfig): method forward (line 538) | def forward( class EfficientNetForImageClassification (line 582) | class EfficientNetForImageClassification(EfficientNetPreTrainedModel): method __init__ (line 583) | def __init__(self, config): method forward (line 603) | def forward( FILE: transformers/models/electra/configuration_electra.py class ElectraConfig (line 44) | class ElectraConfig(PretrainedConfig): method __init__ (line 135) | def __init__( class ElectraOnnxConfig (line 185) | class ElectraOnnxConfig(OnnxConfig): method inputs (line 187) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/electra/convert_electra_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: transformers/models/electra/modeling_electra.py function load_tf_weights_in_electra (line 67) | def load_tf_weights_in_electra(model, config, tf_checkpoint_path, discri... class ElectraEmbeddings (line 149) | class ElectraEmbeddings(nn.Module): method __init__ (line 152) | def __init__(self, config): method forward (line 171) | def forward( class ElectraSelfAttention (line 214) | class ElectraSelfAttention(nn.Module): method __init__ (line 215) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 241) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 246) | def forward( class ElectraSelfOutput (line 349) | class ElectraSelfOutput(nn.Module): method __init__ (line 350) | def __init__(self, config): method forward (line 356) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ElectraAttention (line 364) | class ElectraAttention(nn.Module): method __init__ (line 365) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 371) | def prune_heads(self, heads): method forward (line 389) | def forward( class ElectraIntermediate (line 414) | class ElectraIntermediate(nn.Module): method __init__ (line 415) | def __init__(self, config): method forward (line 423) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ElectraOutput (line 430) | class ElectraOutput(nn.Module): method __init__ (line 431) | def __init__(self, config): method forward (line 437) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ElectraLayer (line 445) | class ElectraLayer(nn.Module): method __init__ (line 446) | def __init__(self, config): method forward (line 460) | def forward( method feed_forward_chunk (line 525) | def feed_forward_chunk(self, attention_output): class ElectraEncoder (line 532) | class ElectraEncoder(nn.Module): method __init__ (line 533) | def __init__(self, config): method forward (line 539) | def forward( class ElectraDiscriminatorPredictions (line 630) | class ElectraDiscriminatorPredictions(nn.Module): method __init__ (line 633) | def __init__(self, config): method forward (line 640) | def forward(self, discriminator_hidden_states): class ElectraGeneratorPredictions (line 648) | class ElectraGeneratorPredictions(nn.Module): method __init__ (line 651) | def __init__(self, config): method forward (line 657) | def forward(self, generator_hidden_states): class ElectraPreTrainedModel (line 665) | class ElectraPreTrainedModel(PreTrainedModel): method _init_weights (line 679) | def _init_weights(self, module): method _set_gradient_checkpointing (line 695) | def _set_gradient_checkpointing(self, module, value=False): class ElectraForPreTrainingOutput (line 701) | class ElectraForPreTrainingOutput(ModelOutput): class ElectraModel (line 813) | class ElectraModel(ElectraPreTrainedModel): method __init__ (line 814) | def __init__(self, config): method get_input_embeddings (line 826) | def get_input_embeddings(self): method set_input_embeddings (line 829) | def set_input_embeddings(self, value): method _prune_heads (line 832) | def _prune_heads(self, heads_to_prune): method forward (line 846) | def forward( class ElectraClassificationHead (line 935) | class ElectraClassificationHead(nn.Module): method __init__ (line 938) | def __init__(self, config): method forward (line 947) | def forward(self, features, **kwargs): class ElectraForSequenceClassification (line 964) | class ElectraForSequenceClassification(ElectraPreTrainedModel): method __init__ (line 965) | def __init__(self, config): method forward (line 983) | def forward( class ElectraForPreTraining (line 1062) | class ElectraForPreTraining(ElectraPreTrainedModel): method __init__ (line 1063) | def __init__(self, config): method forward (line 1073) | def forward( class ElectraForMaskedLM (line 1168) | class ElectraForMaskedLM(ElectraPreTrainedModel): method __init__ (line 1171) | def __init__(self, config): method get_output_embeddings (line 1181) | def get_output_embeddings(self): method set_output_embeddings (line 1184) | def set_output_embeddings(self, word_embeddings): method forward (line 1196) | def forward( class ElectraForTokenClassification (line 1259) | class ElectraForTokenClassification(ElectraPreTrainedModel): method __init__ (line 1260) | def __init__(self, config): method forward (line 1281) | def forward( class ElectraForQuestionAnswering (line 1340) | class ElectraForQuestionAnswering(ElectraPreTrainedModel): method __init__ (line 1344) | def __init__(self, config): method forward (line 1364) | def forward( class ElectraForMultipleChoice (line 1448) | class ElectraForMultipleChoice(ElectraPreTrainedModel): method __init__ (line 1449) | def __init__(self, config): method forward (line 1465) | def forward( class ElectraForCausalLM (line 1535) | class ElectraForCausalLM(ElectraPreTrainedModel): method __init__ (line 1538) | def __init__(self, config): method get_output_embeddings (line 1550) | def get_output_embeddings(self): method set_output_embeddings (line 1553) | def set_output_embeddings(self, new_embeddings): method forward (line 1558) | def forward( method prepare_inputs_for_generation (line 1663) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1676) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/electra/modeling_flax_electra.py class FlaxElectraForPreTrainingOutput (line 60) | class FlaxElectraForPreTrainingOutput(ModelOutput): class FlaxElectraEmbeddings (line 146) | class FlaxElectraEmbeddings(nn.Module): method setup (line 152) | def setup(self): method __call__ (line 172) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxElectraSelfAttention (line 188) | class FlaxElectraSelfAttention(nn.Module): method setup (line 193) | def setup(self): method _split_heads (line 222) | def _split_heads(self, hidden_states): method _merge_heads (line 225) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 230) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 261) | def __call__( class FlaxElectraSelfOutput (line 360) | class FlaxElectraSelfOutput(nn.Module): method setup (line 364) | def setup(self): method __call__ (line 373) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxElectraAttention (line 381) | class FlaxElectraAttention(nn.Module): method setup (line 386) | def setup(self): method __call__ (line 390) | def __call__( class FlaxElectraIntermediate (line 424) | class FlaxElectraIntermediate(nn.Module): method setup (line 428) | def setup(self): method __call__ (line 436) | def __call__(self, hidden_states): class FlaxElectraOutput (line 443) | class FlaxElectraOutput(nn.Module): method setup (line 447) | def setup(self): method __call__ (line 456) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxElectraLayer (line 464) | class FlaxElectraLayer(nn.Module): method setup (line 468) | def setup(self): method __call__ (line 475) | def __call__( class FlaxElectraLayerCollection (line 522) | class FlaxElectraLayerCollection(nn.Module): method setup (line 527) | def setup(self): method __call__ (line 540) | def __call__( class FlaxElectraEncoder (line 605) | class FlaxElectraEncoder(nn.Module): method setup (line 610) | def setup(self): method __call__ (line 617) | def __call__( class FlaxElectraGeneratorPredictions (line 644) | class FlaxElectraGeneratorPredictions(nn.Module): method setup (line 648) | def setup(self): method __call__ (line 652) | def __call__(self, hidden_states): class FlaxElectraDiscriminatorPredictions (line 659) | class FlaxElectraDiscriminatorPredictions(nn.Module): method setup (line 665) | def setup(self): method __call__ (line 669) | def __call__(self, hidden_states): class FlaxElectraPreTrainedModel (line 676) | class FlaxElectraPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 686) | def __init__( method enable_gradient_checkpointing (line 700) | def enable_gradient_checkpointing(self): method init_weights (line 708) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 751) | def init_cache(self, batch_size, max_length): method __call__ (line 771) | def __call__( class FlaxElectraModule (line 868) | class FlaxElectraModule(nn.Module): method setup (line 873) | def setup(self): method __call__ (line 881) | def __call__( class FlaxElectraModel (line 920) | class FlaxElectraModel(FlaxElectraPreTrainedModel): class FlaxElectraTiedDense (line 927) | class FlaxElectraTiedDense(nn.Module): method setup (line 933) | def setup(self): method __call__ (line 936) | def __call__(self, x, kernel): class FlaxElectraForMaskedLMModule (line 949) | class FlaxElectraForMaskedLMModule(nn.Module): method setup (line 954) | def setup(self): method __call__ (line 964) | def __call__( class FlaxElectraForMaskedLM (line 1007) | class FlaxElectraForMaskedLM(FlaxElectraPreTrainedModel): class FlaxElectraForPreTrainingModule (line 1014) | class FlaxElectraForPreTrainingModule(nn.Module): method setup (line 1019) | def setup(self): method __call__ (line 1025) | def __call__( class FlaxElectraForPreTraining (line 1071) | class FlaxElectraForPreTraining(FlaxElectraPreTrainedModel): class FlaxElectraForTokenClassificationModule (line 1102) | class FlaxElectraForTokenClassificationModule(nn.Module): method setup (line 1107) | def setup(self): method __call__ (line 1119) | def __call__( class FlaxElectraForTokenClassification (line 1166) | class FlaxElectraForTokenClassification(FlaxElectraPreTrainedModel): function identity (line 1178) | def identity(x, **kwargs): class FlaxElectraSequenceSummary (line 1182) | class FlaxElectraSequenceSummary(nn.Module): method setup (line 1202) | def setup(self): method __call__ (line 1226) | def __call__(self, hidden_states, cls_index=None, deterministic: bool ... class FlaxElectraForMultipleChoiceModule (line 1248) | class FlaxElectraForMultipleChoiceModule(nn.Module): method setup (line 1253) | def setup(self): method __call__ (line 1260) | def __call__( class FlaxElectraForMultipleChoice (line 1313) | class FlaxElectraForMultipleChoice(FlaxElectraPreTrainedModel): class FlaxElectraForQuestionAnsweringModule (line 1329) | class FlaxElectraForQuestionAnsweringModule(nn.Module): method setup (line 1334) | def setup(self): method __call__ (line 1340) | def __call__( class FlaxElectraForQuestionAnswering (line 1388) | class FlaxElectraForQuestionAnswering(FlaxElectraPreTrainedModel): class FlaxElectraClassificationHead (line 1400) | class FlaxElectraClassificationHead(nn.Module): method setup (line 1406) | def setup(self): method __call__ (line 1416) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxElectraForSequenceClassificationModule (line 1426) | class FlaxElectraForSequenceClassificationModule(nn.Module): method setup (line 1431) | def setup(self): method __call__ (line 1437) | def __call__( class FlaxElectraForSequenceClassification (line 1481) | class FlaxElectraForSequenceClassification(FlaxElectraPreTrainedModel): class FlaxElectraForCausalLMModule (line 1493) | class FlaxElectraForCausalLMModule(nn.Module): method setup (line 1498) | def setup(self): method __call__ (line 1508) | def __call__( class FlaxElectraForCausalLM (line 1565) | class FlaxElectraForCausalLM(FlaxElectraPreTrainedModel): method prepare_inputs_for_generation (line 1568) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1589) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/electra/modeling_tf_electra.py class TFElectraSelfAttention (line 79) | class TFElectraSelfAttention(tf.keras.layers.Layer): method __init__ (line 80) | def __init__(self, config: ElectraConfig, **kwargs): method transpose_for_scores (line 107) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 114) | def call( class TFElectraSelfOutput (line 197) | class TFElectraSelfOutput(tf.keras.layers.Layer): method __init__ (line 198) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 207) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFElectraAttention (line 216) | class TFElectraAttention(tf.keras.layers.Layer): method __init__ (line 217) | def __init__(self, config: ElectraConfig, **kwargs): method prune_heads (line 223) | def prune_heads(self, heads): method call (line 226) | def call( class TFElectraIntermediate (line 257) | class TFElectraIntermediate(tf.keras.layers.Layer): method __init__ (line 258) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 270) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFElectraOutput (line 278) | class TFElectraOutput(tf.keras.layers.Layer): method __init__ (line 279) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 288) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFElectraLayer (line 297) | class TFElectraLayer(tf.keras.layers.Layer): method __init__ (line 298) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 311) | def call( class TFElectraEncoder (line 384) | class TFElectraEncoder(tf.keras.layers.Layer): method __init__ (line 385) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 390) | def call( class TFElectraPooler (line 454) | class TFElectraPooler(tf.keras.layers.Layer): method __init__ (line 455) | def __init__(self, config: ElectraConfig, **kwargs): method call (line 465) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFElectraEmbeddings (line 475) | class TFElectraEmbeddings(tf.keras.layers.Layer): method __init__ (line 478) | def __init__(self, config: ElectraConfig, **kwargs): method build (line 488) | def build(self, input_shape: tf.TensorShape): method call (line 513) | def call( class TFElectraDiscriminatorPredictions (line 554) | class TFElectraDiscriminatorPredictions(tf.keras.layers.Layer): method __init__ (line 555) | def __init__(self, config, **kwargs): method call (line 562) | def call(self, discriminator_hidden_states, training=False): class TFElectraGeneratorPredictions (line 570) | class TFElectraGeneratorPredictions(tf.keras.layers.Layer): method __init__ (line 571) | def __init__(self, config, **kwargs): method call (line 577) | def call(self, generator_hidden_states, training=False): class TFElectraPreTrainedModel (line 585) | class TFElectraPreTrainedModel(TFPreTrainedModel): class TFElectraMainLayer (line 599) | class TFElectraMainLayer(tf.keras.layers.Layer): method __init__ (line 602) | def __init__(self, config, **kwargs): method get_input_embeddings (line 615) | def get_input_embeddings(self): method set_input_embeddings (line 618) | def set_input_embeddings(self, value): method _prune_heads (line 622) | def _prune_heads(self, heads_to_prune): method get_extended_attention_mask (line 629) | def get_extended_attention_mask(self, attention_mask, input_shape, dty... method get_head_mask (line 678) | def get_head_mask(self, head_mask): method call (line 687) | def call( class TFElectraForPreTrainingOutput (line 786) | class TFElectraForPreTrainingOutput(ModelOutput): class TFElectraModel (line 911) | class TFElectraModel(TFElectraPreTrainedModel): method __init__ (line 912) | def __init__(self, config, *inputs, **kwargs): method call (line 924) | def call( class TFElectraForPreTraining (line 990) | class TFElectraForPreTraining(TFElectraPreTrainedModel): method __init__ (line 991) | def __init__(self, config, **kwargs): method call (line 1000) | def call( class TFElectraMaskedLMHead (line 1053) | class TFElectraMaskedLMHead(tf.keras.layers.Layer): method __init__ (line 1054) | def __init__(self, config, input_embeddings, **kwargs): method build (line 1061) | def build(self, input_shape): method get_output_embeddings (line 1066) | def get_output_embeddings(self): method set_output_embeddings (line 1069) | def set_output_embeddings(self, value): method get_bias (line 1073) | def get_bias(self): method set_bias (line 1076) | def set_bias(self, value): method call (line 1080) | def call(self, hidden_states): class TFElectraForMaskedLM (line 1099) | class TFElectraForMaskedLM(TFElectraPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1100) | def __init__(self, config, **kwargs): method get_lm_head (line 1114) | def get_lm_head(self): method get_prefix_bias_name (line 1117) | def get_prefix_bias_name(self): method call (line 1131) | def call( class TFElectraClassificationHead (line 1181) | class TFElectraClassificationHead(tf.keras.layers.Layer): method __init__ (line 1184) | def __init__(self, config, **kwargs): method call (line 1200) | def call(self, inputs, **kwargs): class TFElectraForSequenceClassification (line 1218) | class TFElectraForSequenceClassification(TFElectraPreTrainedModel, TFSeq... method __init__ (line 1219) | def __init__(self, config, *inputs, **kwargs): method call (line 1234) | def call( class TFElectraForMultipleChoice (line 1289) | class TFElectraForMultipleChoice(TFElectraPreTrainedModel, TFMultipleCho... method __init__ (line 1290) | def __init__(self, config, *inputs, **kwargs): method call (line 1308) | def call( class TFElectraForTokenClassification (line 1382) | class TFElectraForTokenClassification(TFElectraPreTrainedModel, TFTokenC... method __init__ (line 1383) | def __init__(self, config, **kwargs): method call (line 1404) | def call( class TFElectraForQuestionAnswering (line 1459) | class TFElectraForQuestionAnswering(TFElectraPreTrainedModel, TFQuestion... method __init__ (line 1460) | def __init__(self, config, *inputs, **kwargs): method call (line 1480) | def call( FILE: transformers/models/electra/tokenization_electra.py function load_vocab (line 71) | def load_vocab(vocab_file): function whitespace_tokenize (line 83) | def whitespace_tokenize(text): class ElectraTokenizer (line 93) | class ElectraTokenizer(PreTrainedTokenizer): method __init__ (line 140) | def __init__( method do_lower_case (line 187) | def do_lower_case(self): method vocab_size (line 191) | def vocab_size(self): method get_vocab (line 194) | def get_vocab(self): method _tokenize (line 197) | def _tokenize(self, text): method _convert_token_to_id (line 210) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 214) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 218) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 223) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 248) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 276) | def create_token_type_ids_from_sequences( method save_vocabulary (line 305) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 327) | class BasicTokenizer(object): method __init__ (line 347) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 355) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 392) | def _run_strip_accents(self, text): method _run_split_on_punc (line 403) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 425) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 438) | def _is_chinese_char(self, cp): method _clean_text (line 462) | def _clean_text(self, text): class WordpieceTokenizer (line 477) | class WordpieceTokenizer(object): method __init__ (line 480) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 485) | def tokenize(self, text): FILE: transformers/models/electra/tokenization_electra_fast.py class ElectraTokenizerFast (line 88) | class ElectraTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 134) | def __init__( method build_inputs_with_special_tokens (line 176) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 200) | def create_token_type_ids_from_sequences( method save_vocabulary (line 229) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/encoder_decoder/configuration_encoder_decoder.py class EncoderDecoderConfig (line 26) | class EncoderDecoderConfig(PretrainedConfig): method __init__ (line 75) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 92) | def from_encoder_decoder_configs( method to_dict (line 108) | def to_dict(self): FILE: transformers/models/encoder_decoder/modeling_encoder_decoder.py function shift_tokens_right (line 151) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class EncoderDecoderModel (line 170) | class EncoderDecoderModel(PreTrainedModel): method __init__ (line 182) | def __init__( method tie_weights (line 259) | def tie_weights(self): method _set_gradient_checkpointing (line 268) | def _set_gradient_checkpointing(self, module, value=False): method get_encoder (line 273) | def get_encoder(self): method get_decoder (line 276) | def get_decoder(self): method get_input_embeddings (line 279) | def get_input_embeddings(self): method get_output_embeddings (line 282) | def get_output_embeddings(self): method set_output_embeddings (line 285) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 289) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 390) | def from_encoder_decoder_pretrained( method forward (line 541) | def forward( method prepare_decoder_input_ids_from_labels (line 665) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 668) | def prepare_inputs_for_generation( method resize_token_embeddings (line 683) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 690) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/encoder_decoder/modeling_flax_encoder_decoder.py class FlaxEncoderDecoderModule (line 207) | class FlaxEncoderDecoderModule(nn.Module): method setup (line 211) | def setup(self): method _get_encoder_module (line 237) | def _get_encoder_module(self): method _get_projection_module (line 240) | def _get_projection_module(self): method _get_decoder_module (line 243) | def _get_decoder_module(self): method __call__ (line 246) | def __call__( class FlaxEncoderDecoderModel (line 302) | class FlaxEncoderDecoderModel(FlaxPreTrainedModel): method __init__ (line 313) | def __init__( method init_weights (line 342) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 387) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 430) | def encode( method decode (line 504) | def decode( method __call__ (line 629) | def __call__( method prepare_inputs_for_generation (line 721) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 754) | def update_inputs_for_generation(self, model_outputs, model_kwargs): method from_encoder_decoder_pretrained (line 760) | def from_encoder_decoder_pretrained( FILE: transformers/models/encoder_decoder/modeling_tf_encoder_decoder.py function shift_tokens_right (line 166) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... class TFEncoderDecoderModel (line 193) | class TFEncoderDecoderModel(TFPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 204) | def __init__( method get_encoder (line 278) | def get_encoder(self): method get_decoder (line 281) | def get_decoder(self): method get_input_embeddings (line 284) | def get_input_embeddings(self): method get_output_embeddings (line 287) | def get_output_embeddings(self): method set_output_embeddings (line 290) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 294) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 323) | def from_encoder_decoder_pretrained( method call (line 472) | def call( method prepare_inputs_for_generation (line 631) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 651) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method resize_token_embeddings (line 654) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 661) | def _reorder_cache(self, past, beam_idx): FILE: transformers/models/ernie/configuration_ernie.py class ErnieConfig (line 41) | class ErnieConfig(PretrainedConfig): method __init__ (line 114) | def __init__( class ErnieOnnxConfig (line 157) | class ErnieOnnxConfig(OnnxConfig): method inputs (line 159) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/ernie/modeling_ernie.py class ErnieEmbeddings (line 74) | class ErnieEmbeddings(nn.Module): method __init__ (line 77) | def __init__(self, config): method forward (line 97) | def forward( class ErnieSelfAttention (line 149) | class ErnieSelfAttention(nn.Module): method __init__ (line 150) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 176) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 181) | def forward( class ErnieSelfOutput (line 284) | class ErnieSelfOutput(nn.Module): method __init__ (line 285) | def __init__(self, config): method forward (line 291) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ErnieAttention (line 299) | class ErnieAttention(nn.Module): method __init__ (line 300) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 306) | def prune_heads(self, heads): method forward (line 324) | def forward( class ErnieIntermediate (line 349) | class ErnieIntermediate(nn.Module): method __init__ (line 350) | def __init__(self, config): method forward (line 358) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieOutput (line 365) | class ErnieOutput(nn.Module): method __init__ (line 366) | def __init__(self, config): method forward (line 372) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ErnieLayer (line 380) | class ErnieLayer(nn.Module): method __init__ (line 381) | def __init__(self, config): method forward (line 395) | def forward( method feed_forward_chunk (line 460) | def feed_forward_chunk(self, attention_output): class ErnieEncoder (line 467) | class ErnieEncoder(nn.Module): method __init__ (line 468) | def __init__(self, config): method forward (line 474) | def forward( class ErniePooler (line 566) | class ErniePooler(nn.Module): method __init__ (line 567) | def __init__(self, config): method forward (line 572) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErniePredictionHeadTransform (line 582) | class ErniePredictionHeadTransform(nn.Module): method __init__ (line 583) | def __init__(self, config): method forward (line 592) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieLMPredictionHead (line 600) | class ErnieLMPredictionHead(nn.Module): method __init__ (line 601) | def __init__(self, config): method forward (line 614) | def forward(self, hidden_states): class ErnieOnlyMLMHead (line 621) | class ErnieOnlyMLMHead(nn.Module): method __init__ (line 622) | def __init__(self, config): method forward (line 626) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class ErnieOnlyNSPHead (line 632) | class ErnieOnlyNSPHead(nn.Module): method __init__ (line 633) | def __init__(self, config): method forward (line 637) | def forward(self, pooled_output): class ErniePreTrainingHeads (line 643) | class ErniePreTrainingHeads(nn.Module): method __init__ (line 644) | def __init__(self, config): method forward (line 649) | def forward(self, sequence_output, pooled_output): class ErniePreTrainedModel (line 655) | class ErniePreTrainedModel(PreTrainedModel): method _init_weights (line 666) | def _init_weights(self, module): method _set_gradient_checkpointing (line 682) | def _set_gradient_checkpointing(self, module, value=False): class ErnieForPreTrainingOutput (line 689) | class ErnieForPreTrainingOutput(ModelOutput): class ErnieModel (line 797) | class ErnieModel(ErniePreTrainedModel): method __init__ (line 811) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 824) | def get_input_embeddings(self): method set_input_embeddings (line 828) | def set_input_embeddings(self, value): method _prune_heads (line 832) | def _prune_heads(self, heads_to_prune): method forward (line 846) | def forward( class ErnieForPreTraining (line 985) | class ErnieForPreTraining(ErniePreTrainedModel): method __init__ (line 989) | def __init__(self, config): method get_output_embeddings (line 999) | def get_output_embeddings(self): method set_output_embeddings (line 1003) | def set_output_embeddings(self, new_embeddings): method forward (line 1008) | def forward( class ErnieForCausalLM (line 1096) | class ErnieForCausalLM(ErniePreTrainedModel): method __init__ (line 1101) | def __init__(self, config): method get_output_embeddings (line 1114) | def get_output_embeddings(self): method set_output_embeddings (line 1118) | def set_output_embeddings(self, new_embeddings): method forward (line 1127) | def forward( method prepare_inputs_for_generation (line 1215) | def prepare_inputs_for_generation( method _reorder_cache (line 1235) | def _reorder_cache(self, past_key_values, beam_idx): class ErnieForMaskedLM (line 1243) | class ErnieForMaskedLM(ErniePreTrainedModel): method __init__ (line 1248) | def __init__(self, config): method get_output_embeddings (line 1264) | def get_output_embeddings(self): method set_output_embeddings (line 1268) | def set_output_embeddings(self, new_embeddings): method forward (line 1279) | def forward( method prepare_inputs_for_generation (line 1339) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class ErnieForNextSentencePrediction (line 1360) | class ErnieForNextSentencePrediction(ErniePreTrainedModel): method __init__ (line 1362) | def __init__(self, config): method forward (line 1373) | def forward( class ErnieForSequenceClassification (line 1468) | class ErnieForSequenceClassification(ErniePreTrainedModel): method __init__ (line 1470) | def __init__(self, config): method forward (line 1486) | def forward( class ErnieForMultipleChoice (line 1567) | class ErnieForMultipleChoice(ErniePreTrainedModel): method __init__ (line 1569) | def __init__(self, config): method forward (line 1588) | def forward( class ErnieForTokenClassification (line 1664) | class ErnieForTokenClassification(ErniePreTrainedModel): method __init__ (line 1668) | def __init__(self, config): method forward (line 1683) | def forward( class ErnieForQuestionAnswering (line 1745) | class ErnieForQuestionAnswering(ErniePreTrainedModel): method __init__ (line 1749) | def __init__(self, config): method forward (line 1760) | def forward( FILE: transformers/models/ernie_m/configuration_ernie_m.py class ErnieMConfig (line 31) | class ErnieMConfig(PretrainedConfig): method __init__ (line 84) | def __init__( FILE: transformers/models/ernie_m/modeling_ernie_m.py class ErnieMEmbeddings (line 55) | class ErnieMEmbeddings(nn.Module): method __init__ (line 58) | def __init__(self, config): method forward (line 69) | def forward( class ErnieMSelfAttention (line 97) | class ErnieMSelfAttention(nn.Module): method __init__ (line 98) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 124) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 129) | def forward( class ErnieMAttention (line 231) | class ErnieMAttention(nn.Module): method __init__ (line 232) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 238) | def prune_heads(self, heads): method forward (line 256) | def forward( class ErnieMEncoderLayer (line 280) | class ErnieMEncoderLayer(nn.Module): method __init__ (line 281) | def __init__(self, config): method forward (line 300) | def forward( class ErnieMEncoder (line 343) | class ErnieMEncoder(nn.Module): method __init__ (line 344) | def __init__(self, config): method forward (line 349) | def forward( class ErnieMPooler (line 391) | class ErnieMPooler(nn.Module): method __init__ (line 392) | def __init__(self, config): method forward (line 397) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ErnieMPreTrainedModel (line 406) | class ErnieMPreTrainedModel(PreTrainedModel): method _init_weights (line 417) | def _init_weights(self, module): method _set_gradient_checkpointing (line 433) | def _set_gradient_checkpointing(self, module, value=False): class ErnieMModel (line 500) | class ErnieMModel(ErnieMPreTrainedModel): method __init__ (line 501) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 509) | def get_input_embeddings(self): method set_input_embeddings (line 512) | def set_input_embeddings(self, value): method _prune_heads (line 515) | def _prune_heads(self, heads_to_prune): method forward (line 530) | def forward( class ErnieMForSequenceClassification (line 614) | class ErnieMForSequenceClassification(ErnieMPreTrainedModel): method __init__ (line 616) | def __init__(self, config): method forward (line 638) | def forward( class ErnieMForMultipleChoice (line 716) | class ErnieMForMultipleChoice(ErnieMPreTrainedModel): method __init__ (line 718) | def __init__(self, config): method forward (line 737) | def forward( class ErnieMForTokenClassification (line 806) | class ErnieMForTokenClassification(ErnieMPreTrainedModel): method __init__ (line 808) | def __init__(self, config): method forward (line 829) | def forward( class ErnieMForQuestionAnswering (line 887) | class ErnieMForQuestionAnswering(ErnieMPreTrainedModel): method __init__ (line 889) | def __init__(self, config): method forward (line 906) | def forward( class ErnieMForInformationExtraction (line 985) | class ErnieMForInformationExtraction(ErnieMPreTrainedModel): method __init__ (line 986) | def __init__(self, config): method forward (line 995) | def forward( FILE: transformers/models/ernie_m/tokenization_ernie_m.py class ErnieMTokenizer (line 62) | class ErnieMTokenizer(PreTrainedTokenizer): method __init__ (line 97) | def __init__( method get_offset_mapping (line 139) | def get_offset_mapping(self, text): method vocab_size (line 172) | def vocab_size(self): method get_vocab (line 175) | def get_vocab(self): method __getstate__ (line 178) | def __getstate__(self): method __setstate__ (line 183) | def __setstate__(self, d): method clean_text (line 193) | def clean_text(self, text): method _tokenize (line 197) | def _tokenize(self, text, enable_sampling=False, nbest_size=64, alpha=... method convert_tokens_to_string (line 240) | def convert_tokens_to_string(self, tokens): method convert_ids_to_string (line 245) | def convert_ids_to_string(self, ids): method _convert_token_to_id (line 254) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 258) | def _convert_id_to_token(self, index): method build_inputs_with_special_tokens (line 262) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method build_offset_mapping_with_special_tokens (line 284) | def build_offset_mapping_with_special_tokens(self, offset_mapping_0, o... method get_special_tokens_mask (line 305) | def get_special_tokens_mask(self, token_ids_0, token_ids_1=None, alrea... method create_token_type_ids_from_sequences (line 334) | def create_token_type_ids_from_sequences( method is_ch_char (line 358) | def is_ch_char(self, char): method is_alpha (line 366) | def is_alpha(self, char): method is_punct (line 374) | def is_punct(self, char): method is_whitespace (line 382) | def is_whitespace(self, char): method load_vocab (line 394) | def load_vocab(self, filepath): method save_vocabulary (line 403) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/esm/configuration_esm.py class EsmConfig (line 33) | class EsmConfig(PretrainedConfig): method __init__ (line 102) | def __init__( method to_dict (line 160) | def to_dict(self): class EsmFoldConfig (line 174) | class EsmFoldConfig: method __post_init__ (line 188) | def __post_init__(self): method to_dict (line 194) | def to_dict(self): class TrunkConfig (line 207) | class TrunkConfig: method __post_init__ (line 221) | def __post_init__(self): method to_dict (line 259) | def to_dict(self): class StructureModuleConfig (line 272) | class StructureModuleConfig: method to_dict (line 323) | def to_dict(self): function get_default_vocab_list (line 327) | def get_default_vocab_list(): FILE: transformers/models/esm/convert_esm.py function get_esmfold_tokenizer (line 78) | def get_esmfold_tokenizer(): function transfer_and_check_weights (line 88) | def transfer_and_check_weights(original_module, our_module): function convert_esm_checkpoint_to_pytorch (line 96) | def convert_esm_checkpoint_to_pytorch( FILE: transformers/models/esm/modeling_esm.py function rotate_half (line 51) | def rotate_half(x): function apply_rotary_pos_emb (line 56) | def apply_rotary_pos_emb(x, cos, sin): function gelu (line 63) | def gelu(x): function symmetrize (line 70) | def symmetrize(x): function average_product_correct (line 75) | def average_product_correct(x): class RotaryEmbedding (line 87) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 94) | def __init__(self, dim: int): method _update_cos_sin_tables (line 105) | def _update_cos_sin_tables(self, x, seq_dimension=2): method forward (line 121) | def forward(self, q: torch.Tensor, k: torch.Tensor) -> Tuple[torch.Ten... class EsmContactPredictionHead (line 130) | class EsmContactPredictionHead(nn.Module): method __init__ (line 133) | def __init__( method forward (line 145) | def forward(self, tokens, attentions): class EsmEmbeddings (line 165) | class EsmEmbeddings(nn.Module): method __init__ (line 170) | def __init__(self, config): method forward (line 190) | def forward( method create_position_ids_from_inputs_embeds (line 235) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class EsmSelfAttention (line 253) | class EsmSelfAttention(nn.Module): method __init__ (line 254) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 283) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 288) | def forward( class EsmSelfOutput (line 391) | class EsmSelfOutput(nn.Module): method __init__ (line 392) | def __init__(self, config): method forward (line 397) | def forward(self, hidden_states, input_tensor): class EsmAttention (line 404) | class EsmAttention(nn.Module): method __init__ (line 405) | def __init__(self, config): method prune_heads (line 412) | def prune_heads(self, heads): method forward (line 430) | def forward( class EsmIntermediate (line 455) | class EsmIntermediate(nn.Module): method __init__ (line 456) | def __init__(self, config): method forward (line 460) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EsmOutput (line 466) | class EsmOutput(nn.Module): method __init__ (line 467) | def __init__(self, config): method forward (line 472) | def forward(self, hidden_states, input_tensor): class EsmLayer (line 479) | class EsmLayer(nn.Module): method __init__ (line 480) | def __init__(self, config): method forward (line 495) | def forward( method feed_forward_chunk (line 558) | def feed_forward_chunk(self, attention_output): class EsmEncoder (line 565) | class EsmEncoder(nn.Module): method __init__ (line 566) | def __init__(self, config): method forward (line 573) | def forward( class EsmPooler (line 668) | class EsmPooler(nn.Module): method __init__ (line 669) | def __init__(self, config): method forward (line 674) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EsmPreTrainedModel (line 683) | class EsmPreTrainedModel(PreTrainedModel): method _init_weights (line 694) | def _init_weights(self, module): class EsmModel (line 773) | class EsmModel(EsmPreTrainedModel): method __init__ (line 789) | def __init__(self, config, add_pooling_layer=True): method _set_gradient_checkpointing (line 805) | def _set_gradient_checkpointing(self, module, value=False): method get_input_embeddings (line 809) | def get_input_embeddings(self): method set_input_embeddings (line 812) | def set_input_embeddings(self, value): method _prune_heads (line 815) | def _prune_heads(self, heads_to_prune): method forward (line 829) | def forward( method predict_contacts (line 949) | def predict_contacts(self, tokens, attention_mask): class EsmForMaskedLM (line 962) | class EsmForMaskedLM(EsmPreTrainedModel): method __init__ (line 966) | def __init__(self, config): method get_output_embeddings (line 980) | def get_output_embeddings(self): method set_output_embeddings (line 983) | def set_output_embeddings(self, new_embeddings): method forward (line 993) | def forward( method predict_contacts (line 1050) | def predict_contacts(self, tokens, attention_mask): class EsmLMHead (line 1054) | class EsmLMHead(nn.Module): method __init__ (line 1057) | def __init__(self, config): method forward (line 1065) | def forward(self, features, **kwargs): class EsmForSequenceClassification (line 1082) | class EsmForSequenceClassification(EsmPreTrainedModel): method __init__ (line 1085) | def __init__(self, config): method forward (line 1101) | def forward( class EsmForTokenClassification (line 1178) | class EsmForTokenClassification(EsmPreTrainedModel): method __init__ (line 1182) | def __init__(self, config): method forward (line 1198) | def forward( class EsmClassificationHead (line 1251) | class EsmClassificationHead(nn.Module): method __init__ (line 1254) | def __init__(self, config): method forward (line 1260) | def forward(self, features, **kwargs): function create_position_ids_from_input_ids (line 1270) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/esm/modeling_esmfold.py class EsmForProteinFoldingOutput (line 60) | class EsmForProteinFoldingOutput(ModelOutput): function is_fp16_enabled (line 173) | def is_fp16_enabled(): function is_deepspeed_initialized (line 181) | def is_deepspeed_initialized(): function collate_dense_tensors (line 194) | def collate_dense_tensors(samples: List[torch.Tensor], pad_v: float = 0)... function flatten_final_dims (line 217) | def flatten_final_dims(t: torch.Tensor, no_dims: int): function permute_final_dims (line 221) | def permute_final_dims(tensor: torch.Tensor, inds: List[int]): function dict_multimap (line 227) | def dict_multimap(fn, dicts): function trunc_normal_init_ (line 240) | def trunc_normal_init_(weights, scale=1.0, fan="fan_in"): function ipa_point_weights_init_ (line 261) | def ipa_point_weights_init_(weights): class EsmFoldLinear (line 267) | class EsmFoldLinear(nn.Linear): method __init__ (line 274) | def __init__( class EsmFoldLayerNorm (line 313) | class EsmFoldLayerNorm(nn.Module): method __init__ (line 314) | def __init__(self, c_in, eps=1e-5): method forward (line 323) | def forward(self, x): function softmax_no_cast (line 335) | def softmax_no_cast(t: torch.Tensor, dim: int = -1) -> torch.Tensor: class EsmFoldAttention (line 349) | class EsmFoldAttention(nn.Module): method __init__ (line 354) | def __init__( method _prep_qkv (line 401) | def _prep_qkv(self, q_x: torch.Tensor, kv_x: torch.Tensor) -> Tuple[to... method _wrap_up (line 421) | def _wrap_up(self, o: torch.Tensor, q_x: torch.Tensor) -> torch.Tensor: method forward (line 437) | def forward( class EsmFoldTriangleAttention (line 501) | class EsmFoldTriangleAttention(nn.Module): method __init__ (line 502) | def __init__(self, c_in, c_hidden, no_heads, starting=True, inf=1e9): method _chunk (line 527) | def _chunk( method forward (line 551) | def forward( class EsmFoldTriangleMultiplicativeUpdate (line 611) | class EsmFoldTriangleMultiplicativeUpdate(nn.Module): method __init__ (line 616) | def __init__(self, config, _outgoing=True): method _combine_projections (line 633) | def _combine_projections( method _inference_forward (line 659) | def _inference_forward( method forward (line 886) | def forward( class EsmFoldPreTrainedModel (line 940) | class EsmFoldPreTrainedModel(EsmPreTrainedModel): method _init_weights (line 947) | def _init_weights(self, module): class EsmFoldSelfAttention (line 992) | class EsmFoldSelfAttention(nn.Module): method __init__ (line 993) | def __init__(self, embed_dim, num_heads, head_width, gated=False): method forward (line 1013) | def forward(self, x, mask=None, bias=None, indices=None): class EsmFoldDropout (line 1054) | class EsmFoldDropout(nn.Module): method __init__ (line 1059) | def __init__(self, r: float, batch_dim: Union[int, List[int]]): method forward (line 1068) | def forward(self, x: torch.Tensor) -> torch.Tensor: class EsmFoldSequenceToPair (line 1076) | class EsmFoldSequenceToPair(nn.Module): method __init__ (line 1077) | def __init__(self, sequence_state_dim, inner_dim, pairwise_state_dim): method forward (line 1087) | def forward(self, sequence_state): class EsmFoldPairToSequence (line 1114) | class EsmFoldPairToSequence(nn.Module): method __init__ (line 1115) | def __init__(self, pairwise_state_dim, num_heads): method forward (line 1121) | def forward(self, pairwise_state): class EsmFoldResidueMLP (line 1135) | class EsmFoldResidueMLP(nn.Module): method __init__ (line 1136) | def __init__(self, embed_dim, inner_dim, dropout=0): method forward (line 1147) | def forward(self, x): class EsmFoldTriangularSelfAttentionBlock (line 1151) | class EsmFoldTriangularSelfAttentionBlock(nn.Module): method __init__ (line 1152) | def __init__(self, config): method forward (line 1186) | def forward(self, sequence_state, pairwise_state, mask=None, chunk_siz... class EsmCategoricalMixture (line 1255) | class EsmCategoricalMixture: method __init__ (line 1256) | def __init__(self, param, bins=50, start=0, end=1): method log_prob (line 1262) | def log_prob(self, true): method mean (line 1270) | def mean(self): function categorical_lddt (line 1274) | def categorical_lddt(logits, bins=50): function get_axial_mask (line 1279) | def get_axial_mask(mask): class EsmFoldRelativePosition (line 1301) | class EsmFoldRelativePosition(nn.Module): method __init__ (line 1302) | def __init__(self, config): method forward (line 1310) | def forward(self, residue_index, mask=None): class EsmFoldAngleResnetBlock (line 1337) | class EsmFoldAngleResnetBlock(nn.Module): method __init__ (line 1338) | def __init__(self, config): method forward (line 1346) | def forward(self, a: torch.Tensor) -> torch.Tensor: class EsmFoldAngleResnet (line 1357) | class EsmFoldAngleResnet(nn.Module): method __init__ (line 1362) | def __init__(self, config): method forward (line 1378) | def forward(self, s: torch.Tensor, s_initial: torch.Tensor) -> Tuple[t... class EsmFoldInvariantPointAttention (line 1422) | class EsmFoldInvariantPointAttention(nn.Module): method __init__ (line 1427) | def __init__(self, config): method forward (line 1462) | def forward( class EsmFoldBackboneUpdate (line 1619) | class EsmFoldBackboneUpdate(nn.Module): method __init__ (line 1624) | def __init__(self, config): method forward (line 1629) | def forward(self, s: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class EsmFoldStructureModuleTransitionLayer (line 1642) | class EsmFoldStructureModuleTransitionLayer(nn.Module): method __init__ (line 1643) | def __init__(self, config): method forward (line 1652) | def forward(self, s): class EsmFoldStructureModuleTransition (line 1665) | class EsmFoldStructureModuleTransition(nn.Module): method __init__ (line 1666) | def __init__(self, config): method forward (line 1678) | def forward(self, s): class EsmFoldStructureModule (line 1688) | class EsmFoldStructureModule(nn.Module): method __init__ (line 1689) | def __init__(self, config): method forward (line 1713) | def forward( method _init_residue_constants (line 1826) | def _init_residue_constants(self, float_dtype, device): method torsion_angles_to_frames (line 1871) | def torsion_angles_to_frames(self, r, alpha, f): method frames_and_literature_positions_to_atom14_pos (line 1877) | def frames_and_literature_positions_to_atom14_pos(self, r, f): # [*, ... class EsmFoldingTrunk (line 1890) | class EsmFoldingTrunk(nn.Module): method __init__ (line 1891) | def __init__(self, config): method set_chunk_size (line 1914) | def set_chunk_size(self, chunk_size): method forward (line 1921) | def forward(self, seq_feats, pair_feats, true_aa, residx, mask, no_rec... method distogram (line 1987) | def distogram(coords, min_bin, max_bin, num_bins): class EsmForProteinFolding (line 2020) | class EsmForProteinFolding(EsmPreTrainedModel): method __init__ (line 2021) | def __init__(self, config): method _af2_to_esm_from_vocab_list (line 2077) | def _af2_to_esm_from_vocab_list(vocab_list: List[str]) -> torch.Tensor: method forward (line 2084) | def forward( method af2_idx_to_esm_idx (line 2208) | def af2_idx_to_esm_idx(self, aa, mask): method compute_language_model_representations (line 2215) | def compute_language_model_representations(self, esmaa: torch.Tensor) ... method bert_mask (line 2240) | def bert_mask(self, aa, esmaa, mask, pattern): method infer (line 2250) | def infer( method output_to_pdb (line 2290) | def output_to_pdb(output: Dict) -> List[str]: method infer_pdb (line 2311) | def infer_pdb(self, seqs, *args, **kwargs) -> str: method infer_pdbs (line 2317) | def infer_pdbs(self, seqs: List[str], *args, **kwargs) -> List[str]: FILE: transformers/models/esm/modeling_tf_esm.py function rotate_half (line 64) | def rotate_half(x): function apply_rotary_pos_emb (line 69) | def apply_rotary_pos_emb(x, cos, sin): function symmetrize (line 76) | def symmetrize(x): function average_product_correct (line 81) | def average_product_correct(x): class TFRotaryEmbedding (line 93) | class TFRotaryEmbedding(Layer): method __init__ (line 100) | def __init__(self, dim: int, name=None): method build (line 110) | def build(self, input_shape): method _compute_cos_sin (line 119) | def _compute_cos_sin(self, x, seq_dimension=2): method call (line 128) | def call(self, q: tf.Tensor, k: tf.Tensor) -> Tuple[tf.Tensor, tf.Tens... class TFEsmContactPredictionHead (line 137) | class TFEsmContactPredictionHead(Layer): method __init__ (line 140) | def __init__( method build (line 152) | def build(self, input_shape): method call (line 157) | def call(self, tokens, attentions): class TFEsmEmbeddings (line 174) | class TFEsmEmbeddings(Layer): method __init__ (line 179) | def __init__(self, config, name=None): method call (line 209) | def call( method create_position_ids_from_inputs_embeds (line 254) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class TFEsmSelfAttention (line 272) | class TFEsmSelfAttention(Layer): method __init__ (line 273) | def __init__(self, config, position_embedding_type=None, name=None): method transpose_for_scores (line 310) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 315) | def call( class TFEsmSelfOutput (line 419) | class TFEsmSelfOutput(Layer): method __init__ (line 420) | def __init__(self, config, name=None): method call (line 427) | def call(self, hidden_states, input_tensor, training=False): class TFEsmAttention (line 434) | class TFEsmAttention(Layer): method __init__ (line 435) | def __init__(self, config, name=None): method prune_heads (line 442) | def prune_heads(self, heads): method call (line 445) | def call( class TFEsmIntermediate (line 472) | class TFEsmIntermediate(tf.keras.layers.Layer): method __init__ (line 473) | def __init__(self, config: EsmConfig, **kwargs): method call (line 482) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFEsmOutput (line 488) | class TFEsmOutput(Layer): method __init__ (line 489) | def __init__(self, config, name=None): method call (line 496) | def call(self, hidden_states, input_tensor, training=False): class TFEsmLayer (line 503) | class TFEsmLayer(Layer): method __init__ (line 504) | def __init__(self, config, name=None): method call (line 519) | def call( class TFEsmEncoder (line 590) | class TFEsmEncoder(Layer): method __init__ (line 591) | def __init__(self, config, name=None): method call (line 597) | def call( class TFEsmPooler (line 670) | class TFEsmPooler(Layer): method __init__ (line 671) | def __init__(self, config: EsmConfig, **kwargs): method call (line 681) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFEsmPreTrainedModel (line 690) | class TFEsmPreTrainedModel(TFPreTrainedModel): class TFEsmMainLayer (line 761) | class TFEsmMainLayer(Layer): method __init__ (line 776) | def __init__(self, config, add_pooling_layer=True, name=None, **kwargs): method build (line 790) | def build(self, input_shape): method get_input_embeddings (line 795) | def get_input_embeddings(self): method set_input_embeddings (line 798) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 802) | def _prune_heads(self, heads_to_prune): method call (line 805) | def call( method predict_contacts (line 958) | def predict_contacts(self, tokens, attention_mask): class TFEsmModel (line 975) | class TFEsmModel(TFEsmPreTrainedModel): method __init__ (line 976) | def __init__(self, config: EsmConfig, add_pooling_layer=True, *inputs,... method call (line 988) | def call( method predict_contacts (line 1041) | def predict_contacts(self, tokens, attention_mask): class TFEsmForMaskedLM (line 1046) | class TFEsmForMaskedLM(TFEsmPreTrainedModel, TFMaskedLanguageModelingLoss): method __init__ (line 1050) | def __init__(self, config): method get_output_embeddings (line 1067) | def get_output_embeddings(self): method set_output_embeddings (line 1070) | def set_output_embeddings(self, new_embeddings): method get_lm_head (line 1073) | def get_lm_head(self): method call (line 1084) | def call( method predict_contacts (line 1140) | def predict_contacts(self, tokens, attention_mask): class TFEsmLMHead (line 1144) | class TFEsmLMHead(Layer): method __init__ (line 1147) | def __init__(self, config, name=None): method build (line 1165) | def build(self, input_shape): method get_bias (line 1171) | def get_bias(self): method call (line 1174) | def call(self, features): class TFEsmForSequenceClassification (line 1194) | class TFEsmForSequenceClassification(TFEsmPreTrainedModel, TFSequenceCla... method __init__ (line 1197) | def __init__(self, config): method call (line 1212) | def call( class TFEsmForTokenClassification (line 1268) | class TFEsmForTokenClassification(TFEsmPreTrainedModel, TFTokenClassific... method __init__ (line 1272) | def __init__(self, config): method call (line 1287) | def call( class TFEsmClassificationHead (line 1337) | class TFEsmClassificationHead(Layer): method __init__ (line 1340) | def __init__(self, config, name=None): method call (line 1356) | def call(self, features, training=False): function create_position_ids_from_input_ids (line 1365) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/esm/openfold_utils/chunk_utils.py function _fetch_dims (line 24) | def _fetch_dims(tree: Union[dict, list, tuple, torch.Tensor]) -> List[Tu... function _flat_idx_to_idx (line 41) | def _flat_idx_to_idx(flat_idx: int, dims: Tuple[int, ...]) -> Tuple[int,... function _get_minimal_slice_set (line 51) | def _get_minimal_slice_set( function _chunk_slice (line 166) | def _chunk_slice(t: torch.Tensor, flat_start: int, flat_end: int, no_bat... function chunk_layer (line 194) | def chunk_layer( class ChunkSizeTuner (line 314) | class ChunkSizeTuner: method __init__ (line 315) | def __init__( method _determine_favorable_chunk_size (line 325) | def _determine_favorable_chunk_size(self, fn: Callable, args: tuple, m... method _compare_arg_caches (line 356) | def _compare_arg_caches(self, ac1: Iterable, ac2: Iterable) -> bool: method tune_chunk_size (line 371) | def tune_chunk_size( FILE: transformers/models/esm/openfold_utils/data_transforms.py function make_atom14_masks (line 25) | def make_atom14_masks(protein: Dict[str, torch.Tensor]) -> Dict[str, tor... function make_atom14_masks_np (line 90) | def make_atom14_masks_np(batch: Dict[str, torch.Tensor]) -> Dict[str, np... FILE: transformers/models/esm/openfold_utils/feats.py function pseudo_beta_fn (line 28) | def pseudo_beta_fn(aatype: torch.Tensor, all_atom_positions: torch.Tenso... function pseudo_beta_fn (line 33) | def pseudo_beta_fn( function pseudo_beta_fn (line 39) | def pseudo_beta_fn(aatype, all_atom_positions, all_atom_masks): function atom14_to_atom37 (line 60) | def atom14_to_atom37(atom14: torch.Tensor, batch: Dict[str, torch.Tensor... function build_template_angle_feat (line 73) | def build_template_angle_feat(template_feats: Dict[str, torch.Tensor]) -... function build_template_pair_feat (line 91) | def build_template_pair_feat( function build_extra_msa_feat (line 152) | def build_extra_msa_feat(batch: Dict[str, torch.Tensor]) -> torch.Tensor: function torsion_angles_to_frames (line 162) | def torsion_angles_to_frames( function frames_and_literature_positions_to_atom14_pos (line 224) | def frames_and_literature_positions_to_atom14_pos( FILE: transformers/models/esm/openfold_utils/loss.py function _calculate_bin_centers (line 21) | def _calculate_bin_centers(boundaries: torch.Tensor) -> torch.Tensor: function _calculate_expected_aligned_error (line 28) | def _calculate_expected_aligned_error( function compute_predicted_aligned_error (line 39) | def compute_predicted_aligned_error( function compute_tm (line 74) | def compute_tm( FILE: transformers/models/esm/openfold_utils/protein.py class Protein (line 33) | class Protein: function from_proteinnet_string (line 70) | def from_proteinnet_string(proteinnet_str: str) -> Protein: function get_pdb_headers (line 120) | def get_pdb_headers(prot: Protein, chain_id: int = 0) -> List[str]: function add_pdb_headers (line 140) | def add_pdb_headers(prot: Protein, pdb_str: str) -> str: function to_pdb (line 190) | def to_pdb(prot: Protein) -> str: function ideal_atom_mask (line 283) | def ideal_atom_mask(prot: Protein) -> np.ndarray: function from_prediction (line 298) | def from_prediction( FILE: transformers/models/esm/openfold_utils/residue_constants.py function map_structure_with_atom_order (line 387) | def map_structure_with_atom_order(in_list: list, first_call: bool = True... function load_stereo_chemical_props (line 402) | def load_stereo_chemical_props() -> ( function sequence_to_onehot (line 606) | def sequence_to_onehot(sequence: str, mapping: Mapping[str, int], map_un... function _make_standard_atom_mask (line 752) | def _make_standard_atom_mask() -> np.ndarray: function chi_angle_atom (line 770) | def chi_angle_atom(atom_index: int) -> np.ndarray: function _make_rigid_transformation_4x4 (line 812) | def _make_rigid_transformation_4x4(ex: np.ndarray, ey: np.ndarray, trans... function _make_rigid_group_constants (line 841) | def _make_rigid_group_constants() -> None: function make_atom14_dists_bounds (line 915) | def make_atom14_dists_bounds( function _make_atom14_ambiguity_feats (line 967) | def _make_atom14_ambiguity_feats() -> None: function aatype_to_str_sequence (line 982) | def aatype_to_str_sequence(aatype: Sequence[int]) -> str: FILE: transformers/models/esm/openfold_utils/rigid_utils.py function rot_matmul (line 25) | def rot_matmul(a: torch.Tensor, b: torch.Tensor) -> torch.Tensor: function rot_vec_mul (line 56) | def rot_vec_mul(r: torch.Tensor, t: torch.Tensor) -> torch.Tensor: function identity_rot_mats (line 78) | def identity_rot_mats( function identity_trans (line 93) | def identity_trans( function identity_quats (line 104) | def identity_quats( function _to_mat (line 123) | def _to_mat(pairs: List[Tuple[str, int]]) -> np.ndarray: function quat_to_rot (line 144) | def quat_to_rot(quat: torch.Tensor) -> torch.Tensor: function rot_to_quat (line 167) | def rot_to_quat(rot: torch.Tensor) -> torch.Tensor: function _get_quat (line 223) | def _get_quat(quat_key: str, dtype: torch.dtype, device: torch.device) -... function quat_multiply (line 227) | def quat_multiply(quat1: torch.Tensor, quat2: torch.Tensor) -> torch.Ten... function quat_multiply_by_vec (line 234) | def quat_multiply_by_vec(quat: torch.Tensor, vec: torch.Tensor) -> torch... function invert_rot_mat (line 241) | def invert_rot_mat(rot_mat: torch.Tensor) -> torch.Tensor: function invert_quat (line 245) | def invert_quat(quat: torch.Tensor) -> torch.Tensor: class Rotation (line 252) | class Rotation: method __init__ (line 260) | def __init__( method identity (line 295) | def identity( method __getitem__ (line 335) | def __getitem__(self, index: Any) -> Rotation: method __mul__ (line 358) | def __mul__(self, right: torch.Tensor) -> Rotation: method __rmul__ (line 380) | def __rmul__(self, left: torch.Tensor) -> Rotation: method shape (line 395) | def shape(self) -> torch.Size: method dtype (line 412) | def dtype(self) -> torch.dtype: method device (line 427) | def device(self) -> torch.device: method requires_grad (line 442) | def requires_grad(self) -> bool: method get_rot_mats (line 456) | def get_rot_mats(self) -> torch.Tensor: method get_quats (line 470) | def get_quats(self) -> torch.Tensor: method get_cur_rot (line 486) | def get_cur_rot(self) -> torch.Tensor: method compose_q_update_vec (line 502) | def compose_q_update_vec(self, q_update_vec: torch.Tensor, normalize_q... method compose_r (line 524) | def compose_r(self, r: Rotation) -> Rotation: method compose_q (line 539) | def compose_q(self, r: Rotation, normalize_quats: bool = True) -> Rota... method apply (line 557) | def apply(self, pts: torch.Tensor) -> torch.Tensor: method invert_apply (line 570) | def invert_apply(self, pts: torch.Tensor) -> torch.Tensor: method invert (line 584) | def invert(self) -> Rotation: method unsqueeze (line 604) | def unsqueeze(self, dim: int) -> Rotation: method cat (line 626) | def cat(rs: Sequence[Rotation], dim: int) -> Rotation: method map_tensor_fn (line 648) | def map_tensor_fn(self, fn: Callable[[torch.Tensor], torch.Tensor]) ->... method cuda (line 670) | def cuda(self) -> Rotation: method to (line 684) | def to(self, device: Optional[torch.device], dtype: Optional[torch.dty... method detach (line 710) | def detach(self) -> Rotation: class Rigid (line 729) | class Rigid: method __init__ (line 736) | def __init__(self, rots: Optional[Rotation], trans: Optional[torch.Ten... method identity (line 786) | def identity( method __getitem__ (line 813) | def __getitem__(self, index: Any) -> Rigid: method __mul__ (line 838) | def __mul__(self, right: torch.Tensor) -> Rigid: method __rmul__ (line 856) | def __rmul__(self, left: torch.Tensor) -> Rigid: method shape (line 869) | def shape(self) -> torch.Size: method device (line 879) | def device(self) -> torch.device: method get_rots (line 888) | def get_rots(self) -> Rotation: method get_trans (line 897) | def get_trans(self) -> torch.Tensor: method compose_q_update_vec (line 906) | def compose_q_update_vec(self, q_update_vec: torch.Tensor) -> Rigid: method compose (line 924) | def compose(self, r: Rigid) -> Rigid: method apply (line 938) | def apply(self, pts: torch.Tensor) -> torch.Tensor: method invert_apply (line 950) | def invert_apply(self, pts: torch.Tensor) -> torch.Tensor: method invert (line 962) | def invert(self) -> Rigid: method map_tensor_fn (line 974) | def map_tensor_fn(self, fn: Callable[[torch.Tensor], torch.Tensor]) ->... method to_tensor_4x4 (line 990) | def to_tensor_4x4(self) -> torch.Tensor: method from_tensor_4x4 (line 1004) | def from_tensor_4x4(t: torch.Tensor) -> Rigid: method to_tensor_7 (line 1021) | def to_tensor_7(self) -> torch.Tensor: method from_tensor_7 (line 1036) | def from_tensor_7(t: torch.Tensor, normalize_quats: bool = False) -> R... method from_3_points (line 1047) | def from_3_points( method unsqueeze (line 1087) | def unsqueeze(self, dim: int) -> Rigid: method cat (line 1104) | def cat(ts: Sequence[Rigid], dim: int) -> Rigid: method apply_rot_fn (line 1121) | def apply_rot_fn(self, fn: Callable[[Rotation], Rotation]) -> Rigid: method apply_trans_fn (line 1132) | def apply_trans_fn(self, fn: Callable[[torch.Tensor], torch.Tensor]) -... method scale_translation (line 1144) | def scale_translation(self, trans_scale_factor: float) -> Rigid: method stop_rot_gradient (line 1156) | def stop_rot_gradient(self) -> Rigid: method make_transform_from_reference (line 1166) | def make_transform_from_reference( method cuda (line 1235) | def cuda(self) -> Rigid: FILE: transformers/models/esm/openfold_utils/tensor_utils.py function add (line 24) | def add(m1: torch.Tensor, m2: torch.Tensor, inplace: bool) -> torch.Tensor: function permute_final_dims (line 35) | def permute_final_dims(tensor: torch.Tensor, inds: List[int]) -> torch.T... function flatten_final_dims (line 41) | def flatten_final_dims(t: torch.Tensor, no_dims: int) -> torch.Tensor: function masked_mean (line 45) | def masked_mean(mask: torch.Tensor, value: torch.Tensor, dim: int, eps: ... function pts_to_distogram (line 50) | def pts_to_distogram( function dict_multimap (line 58) | def dict_multimap(fn: Callable[[list], Any], dicts: List[dict]) -> dict: function one_hot (line 71) | def one_hot(x: torch.Tensor, v_bins: torch.Tensor) -> torch.Tensor: function batched_gather (line 78) | def batched_gather(data: torch.Tensor, inds: torch.Tensor, dim: int = 0,... function dict_map (line 97) | def dict_map( function tree_map (line 111) | def tree_map(fn: Callable[[T], Any], tree: T, leaf_type: Type[T]) -> Any: function tree_map (line 116) | def tree_map(fn: Callable[[T], Any], tree: dict, leaf_type: Type[T]) -> ... function tree_map (line 121) | def tree_map(fn: Callable[[T], Any], tree: list, leaf_type: Type[T]) -> ... function tree_map (line 126) | def tree_map(fn: Callable[[T], Any], tree: tuple, leaf_type: Type[T]) ->... function tree_map (line 130) | def tree_map(fn, tree, leaf_type): FILE: transformers/models/esm/tokenization_esm.py function load_vocab_file (line 41) | def load_vocab_file(vocab_file): class EsmTokenizer (line 47) | class EsmTokenizer(PreTrainedTokenizer): method __init__ (line 57) | def __init__( method _convert_id_to_token (line 79) | def _convert_id_to_token(self, index: int) -> str: method _convert_token_to_id (line 82) | def _convert_token_to_id(self, token: str) -> int: method _tokenize (line 85) | def _tokenize(self, text, **kwargs): method get_vocab_size (line 88) | def get_vocab_size(self, with_added_tokens=False): method get_vocab (line 91) | def get_vocab(self): method token_to_id (line 94) | def token_to_id(self, token: str) -> int: method id_to_token (line 97) | def id_to_token(self, index: int) -> str: method build_inputs_with_special_tokens (line 100) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 114) | def get_special_tokens_mask( method save_vocabulary (line 145) | def save_vocabulary(self, save_directory, filename_prefix): method vocab_size (line 152) | def vocab_size(self) -> int: method _add_tokens (line 155) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... FILE: transformers/models/flaubert/configuration_flaubert.py class FlaubertConfig (line 34) | class FlaubertConfig(PretrainedConfig): method __init__ (line 146) | def __init__( class FlaubertOnnxConfig (line 226) | class FlaubertOnnxConfig(OnnxConfig): method inputs (line 228) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/flaubert/modeling_flaubert.py function create_sinusoidal_embeddings (line 65) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 74) | def get_masks(slen, lengths, causal, padding_mask=None): class MultiHeadAttention (line 100) | class MultiHeadAttention(nn.Module): method __init__ (line 103) | def __init__(self, n_heads, dim, config): method prune_heads (line 117) | def prune_heads(self, heads): method forward (line 132) | def forward(self, input, mask, kv=None, cache=None, head_mask=None, ou... class TransformerFFN (line 197) | class TransformerFFN(nn.Module): method __init__ (line 198) | def __init__(self, in_dim, dim_hidden, out_dim, config): method forward (line 207) | def forward(self, input): method ff_chunk (line 210) | def ff_chunk(self, input): class FlaubertPredLayer (line 298) | class FlaubertPredLayer(nn.Module): method __init__ (line 303) | def __init__(self, config): method forward (line 321) | def forward(self, x, y=None): class FlaubertPreTrainedModel (line 341) | class FlaubertPreTrainedModel(PreTrainedModel): method __init__ (line 351) | def __init__(self, *inputs, **kwargs): method dummy_inputs (line 355) | def dummy_inputs(self): method _init_weights (line 364) | def _init_weights(self, module): class FlaubertModel (line 381) | class FlaubertModel(FlaubertPreTrainedModel): method __init__ (line 384) | def __init__(self, config): # , dico, is_encoder, with_output): method get_input_embeddings (line 461) | def get_input_embeddings(self): method set_input_embeddings (line 465) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 469) | def _prune_heads(self, heads_to_prune): method forward (line 483) | def forward( class FlaubertWithLMHeadModel (line 656) | class FlaubertWithLMHeadModel(FlaubertPreTrainedModel): method __init__ (line 659) | def __init__(self, config): method get_output_embeddings (line 667) | def get_output_embeddings(self): method set_output_embeddings (line 670) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 673) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method forward (line 693) | def forward( class FlaubertForSequenceClassification (line 754) | class FlaubertForSequenceClassification(FlaubertPreTrainedModel): method __init__ (line 755) | def __init__(self, config): method forward (line 772) | def forward( class FlaubertForTokenClassification (line 857) | class FlaubertForTokenClassification(FlaubertPreTrainedModel): method __init__ (line 858) | def __init__(self, config): method forward (line 875) | def forward( class FlaubertForQuestionAnsweringSimple (line 942) | class FlaubertForQuestionAnsweringSimple(FlaubertPreTrainedModel): method __init__ (line 943) | def __init__(self, config): method forward (line 958) | def forward( class FlaubertForQuestionAnsweringOutput (line 1048) | class FlaubertForQuestionAnsweringOutput(ModelOutput): class FlaubertForQuestionAnswering (line 1091) | class FlaubertForQuestionAnswering(FlaubertPreTrainedModel): method __init__ (line 1092) | def __init__(self, config): method forward (line 1103) | def forward( class FlaubertForMultipleChoice (line 1213) | class FlaubertForMultipleChoice(FlaubertPreTrainedModel): method __init__ (line 1214) | def __init__(self, config, *inputs, **kwargs): method forward (line 1232) | def forward( FILE: transformers/models/flaubert/modeling_tf_flaubert.py function get_masks (line 190) | def get_masks(slen, lengths, causal, padding_mask=None): class TFFlaubertPreTrainedModel (line 219) | class TFFlaubertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 229) | def dummy_inputs(self): class TFFlaubertModel (line 247) | class TFFlaubertModel(TFFlaubertPreTrainedModel): method __init__ (line 248) | def __init__(self, config, *inputs, **kwargs): method call (line 259) | def call( class TFFlaubertMultiHeadAttention (line 295) | class TFFlaubertMultiHeadAttention(tf.keras.layers.Layer): method __init__ (line 298) | def __init__(self, n_heads, dim, config, **kwargs): method prune_heads (line 313) | def prune_heads(self, heads): method call (line 316) | def call(self, input, mask, kv, cache, head_mask, output_attentions, t... class TFFlaubertTransformerFFN (line 388) | class TFFlaubertTransformerFFN(tf.keras.layers.Layer): method __init__ (line 389) | def __init__(self, in_dim, dim_hidden, out_dim, config, **kwargs): method call (line 397) | def call(self, input, training=False): class TFFlaubertMainLayer (line 407) | class TFFlaubertMainLayer(tf.keras.layers.Layer): method __init__ (line 410) | def __init__(self, config, **kwargs): method build (line 457) | def build(self, input_shape): method get_input_embeddings (line 475) | def get_input_embeddings(self): method set_input_embeddings (line 478) | def set_input_embeddings(self, value): method call (line 483) | def call( class TFFlaubertPredLayer (line 680) | class TFFlaubertPredLayer(tf.keras.layers.Layer): method __init__ (line 685) | def __init__(self, config, input_embeddings, **kwargs): method build (line 704) | def build(self, input_shape): method get_output_embeddings (line 710) | def get_output_embeddings(self): method set_output_embeddings (line 713) | def set_output_embeddings(self, value): method get_bias (line 717) | def get_bias(self): method set_bias (line 720) | def set_bias(self, value): method call (line 724) | def call(self, hidden_states): class TFFlaubertWithLMHeadModelOutput (line 732) | class TFFlaubertWithLMHeadModelOutput(ModelOutput): class TFFlaubertWithLMHeadModel (line 764) | class TFFlaubertWithLMHeadModel(TFFlaubertPreTrainedModel): method __init__ (line 765) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 772) | def get_lm_head(self): method get_prefix_bias_name (line 775) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 779) | def prepare_inputs_for_generation(self, inputs, **kwargs): method call (line 800) | def call( class TFFlaubertForSequenceClassification (line 850) | class TFFlaubertForSequenceClassification(TFFlaubertPreTrainedModel, TFS... method __init__ (line 851) | def __init__(self, config, *inputs, **kwargs): method call (line 865) | def call( class TFFlaubertForQuestionAnsweringSimple (line 929) | class TFFlaubertForQuestionAnsweringSimple(TFFlaubertPreTrainedModel, TF... method __init__ (line 930) | def __init__(self, config, *inputs, **kwargs): method call (line 944) | def call( class TFFlaubertForTokenClassification (line 1021) | class TFFlaubertForTokenClassification(TFFlaubertPreTrainedModel, TFToke... method __init__ (line 1022) | def __init__(self, config, *inputs, **kwargs): method call (line 1039) | def call( class TFFlaubertForMultipleChoice (line 1102) | class TFFlaubertForMultipleChoice(TFFlaubertPreTrainedModel, TFMultipleC... method __init__ (line 1103) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1113) | def dummy_inputs(self): method call (line 1140) | def call( FILE: transformers/models/flaubert/tokenization_flaubert.py function convert_to_unicode (line 77) | def convert_to_unicode(text): function get_pairs (line 94) | def get_pairs(word): function replace_unicode_punct (line 108) | def replace_unicode_punct(text): function remove_non_printing_char (line 152) | def remove_non_printing_char(text): class FlaubertTokenizer (line 165) | class FlaubertTokenizer(PreTrainedTokenizer): method __init__ (line 223) | def __init__( method do_lower_case (line 308) | def do_lower_case(self): method moses_punct_norm (line 312) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 321) | def moses_tokenize(self, text, lang): method moses_pipeline (line 330) | def moses_pipeline(self, text, lang): method ja_tokenize (line 337) | def ja_tokenize(self, text): method vocab_size (line 360) | def vocab_size(self): method get_vocab (line 364) | def get_vocab(self): method bpe (line 368) | def bpe(self, token): method preprocess_text (line 412) | def preprocess_text(self, text): method _tokenize (line 422) | def _tokenize(self, text, bypass_tokenizer=False): method _convert_token_to_id (line 460) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 465) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 470) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 476) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 504) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 533) | def create_token_type_ids_from_sequences( method save_vocabulary (line 563) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 592) | def __getstate__(self): method __setstate__ (line 598) | def __setstate__(self, d): FILE: transformers/models/flava/configuration_flava.py class FlavaImageConfig (line 32) | class FlavaImageConfig(PretrainedConfig): method __init__ (line 95) | def __init__( method from_pretrained (line 133) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaTextConfig (line 149) | class FlavaTextConfig(PretrainedConfig): method __init__ (line 222) | def __init__( method from_pretrained (line 260) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaMultimodalConfig (line 276) | class FlavaMultimodalConfig(PretrainedConfig): method __init__ (line 331) | def __init__( method from_pretrained (line 361) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaImageCodebookConfig (line 377) | class FlavaImageCodebookConfig(PretrainedConfig): method __init__ (line 423) | def __init__( method from_pretrained (line 444) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class FlavaConfig (line 460) | class FlavaConfig(PretrainedConfig): method __init__ (line 533) | def __init__( method from_configs (line 736) | def from_configs( method to_dict (line 760) | def to_dict(self): FILE: transformers/models/flava/convert_dalle_to_flava_codebook.py function rreplace (line 24) | def rreplace(s, old, new, occurrence): function count_parameters (line 29) | def count_parameters(state_dict): function upgrade_state_dict (line 34) | def upgrade_state_dict(state_dict): function convert_dalle_checkpoint (line 57) | def convert_dalle_checkpoint(checkpoint_path, pytorch_dump_folder_path, ... FILE: transformers/models/flava/convert_flava_original_pytorch_to_hf.py function count_parameters (line 25) | def count_parameters(state_dict): function upgrade_state_dict (line 30) | def upgrade_state_dict(state_dict, codebook_state_dict): function convert_flava_checkpoint (line 62) | def convert_flava_checkpoint(checkpoint_path, codebook_path, pytorch_dum... FILE: transformers/models/flava/feature_extraction_flava.py class FlavaFeatureExtractor (line 26) | class FlavaFeatureExtractor(FlavaImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/flava/image_processing_flava.py class FlavaMaskingGenerator (line 55) | class FlavaMaskingGenerator: method __init__ (line 56) | def __init__( method __repr__ (line 78) | def __repr__(self): method get_shape (line 90) | def get_shape(self): method _mask (line 93) | def _mask(self, mask, max_mask_patches): method __call__ (line 117) | def __call__(self): class FlavaImageProcessor (line 133) | class FlavaImageProcessor(BaseImageProcessor): method __init__ (line 223) | def __init__( method from_dict (line 303) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method masking_generator (line 316) | def masking_generator( method resize (line 334) | def resize( method center_crop (line 362) | def center_crop( method rescale (line 386) | def rescale( method normalize (line 406) | def normalize( method map_pixels (line 429) | def map_pixels(self, image: np.ndarray) -> np.ndarray: method _preprocess_image (line 432) | def _preprocess_image( method preprocess (line 480) | def preprocess( FILE: transformers/models/flava/modeling_flava.py class FlavaModelOutput (line 70) | class FlavaModelOutput(ModelOutput): method to_tuple (line 100) | def to_tuple(self) -> Tuple[Any]: class FlavaLosses (line 108) | class FlavaLosses(ModelOutput): method all_none (line 135) | def all_none(self) -> bool: class FlavaForPreTrainingOutput (line 145) | class FlavaForPreTrainingOutput(ModelOutput): method to_tuple (line 232) | def to_tuple(self) -> Tuple[Any]: class FlavaImageEmbeddings (line 246) | class FlavaImageEmbeddings(nn.Module): method __init__ (line 251) | def __init__(self, config: FlavaImageConfig, use_mask_token: bool = Fa... method interpolate_pos_encoding (line 268) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 303) | def forward( class PatchEmbeddings (line 339) | class PatchEmbeddings(nn.Module): method __init__ (line 344) | def __init__( method forward (line 363) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class FlavaTextEmbeddings (line 375) | class FlavaTextEmbeddings(nn.Module): method __init__ (line 378) | def __init__(self, config): method forward (line 395) | def forward( class FlavaSelfAttention (line 430) | class FlavaSelfAttention(nn.Module): method __init__ (line 431) | def __init__(self, config: FlavaPossibleConfigs) -> None: method transpose_for_scores (line 449) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 454) | def forward( class FlavaSelfOutput (line 499) | class FlavaSelfOutput(nn.Module): method __init__ (line 505) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 510) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FlavaAttention (line 517) | class FlavaAttention(nn.Module): method __init__ (line 518) | def __init__(self, config: FlavaPossibleConfigs) -> None: method prune_heads (line 524) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 542) | def forward( class FlavaIntermediate (line 559) | class FlavaIntermediate(nn.Module): method __init__ (line 560) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 569) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FlavaOutput (line 576) | class FlavaOutput(nn.Module): method __init__ (line 577) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 583) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FlavaLayer (line 592) | class FlavaLayer(nn.Module): method __init__ (line 595) | def __init__(self, config: FlavaPossibleConfigs) -> None: method forward (line 607) | def forward( class FlavaEncoder (line 638) | class FlavaEncoder(nn.Module): method __init__ (line 639) | def __init__(self, config: FlavaConfig) -> None: method forward (line 645) | def forward( class FlavaPooler (line 695) | class FlavaPooler(nn.Module): method __init__ (line 696) | def __init__(self, config: FlavaPossibleConfigs): method forward (line 701) | def forward(self, hidden_states: torch.Tensor): class FlavaPreTrainedModel (line 854) | class FlavaPreTrainedModel(PreTrainedModel): method _init_weights (line 864) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 880) | def _set_gradient_checkpointing(self, module: FlavaEncoder, value: boo... class FlavaImageModel (line 889) | class FlavaImageModel(FlavaPreTrainedModel): method __init__ (line 895) | def __init__(self, config: FlavaImageConfig, add_pooling_layer: bool =... method get_input_embeddings (line 908) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 911) | def set_input_embeddings(self, value: nn.Module): method _prune_heads (line 914) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 930) | def forward( class FlavaTextModel (line 988) | class FlavaTextModel(FlavaPreTrainedModel): method __init__ (line 993) | def __init__(self, config: FlavaTextConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 1005) | def get_input_embeddings(self) -> PatchEmbeddings: method set_input_embeddings (line 1008) | def set_input_embeddings(self, value: nn.Module): method _prune_heads (line 1011) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 1025) | def forward( class FlavaMultimodalModel (line 1093) | class FlavaMultimodalModel(FlavaPreTrainedModel): method __init__ (line 1099) | def __init__(self, config: FlavaMultimodalConfig, add_pooling_layer=Tr... method _prune_heads (line 1113) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 1129) | def forward( class FlavaModel (line 1191) | class FlavaModel(FlavaPreTrainedModel): method __init__ (line 1194) | def __init__(self, config: FlavaConfig): method get_text_features (line 1238) | def get_text_features( method get_image_features (line 1284) | def get_image_features( method forward (line 1339) | def forward( class FlavaImageCodebookResPath (line 1443) | class FlavaImageCodebookResPath(nn.Module): method __init__ (line 1444) | def __init__(self, in_size: int, out_size: int, **kwargs): method forward (line 1460) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebookBlock (line 1464) | class FlavaImageCodebookBlock(nn.Module): method __init__ (line 1465) | def __init__(self, in_size: int, out_size: int, num_layers: int, **kwa... method forward (line 1477) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebookLayerGroup (line 1481) | class FlavaImageCodebookLayerGroup(nn.Module): method __init__ (line 1482) | def __init__(self, num_blocks: int, num_layers: int, in_size: int, out... method forward (line 1496) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FlavaImageCodebook (line 1509) | class FlavaImageCodebook(FlavaPreTrainedModel): method __init__ (line 1515) | def __init__( method get_codebook_indices (line 1559) | def get_codebook_indices(self, pixel_values: torch.Tensor) -> torch.Te... method get_codebook_probs (line 1589) | def get_codebook_probs(self, pixel_values: torch.Tensor) -> torch.Tensor: method forward (line 1593) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class FlavaPredictionHeadTransform (line 1630) | class FlavaPredictionHeadTransform(nn.Module): method __init__ (line 1631) | def __init__(self, config): method forward (line 1640) | def forward(self, hidden_states): class FlavaMaskedPredictionHead (line 1647) | class FlavaMaskedPredictionHead(nn.Module): method __init__ (line 1648) | def __init__(self, config, weight=None): method forward (line 1660) | def forward(self, x): class FlavaITMHead (line 1666) | class FlavaITMHead(nn.Module): method __init__ (line 1667) | def __init__(self, config): method forward (line 1673) | def forward(self, x): class FlavaGlobalContrastiveHead (line 1679) | class FlavaGlobalContrastiveHead(nn.Module): method __init__ (line 1680) | def __init__(self, config): method forward (line 1685) | def forward(self, image_embeddings, text_embeddings, logit_scale): class FlavaForPreTraining (line 1725) | class FlavaForPreTraining(FlavaPreTrainedModel): method __init__ (line 1734) | def __init__(self, config: FlavaConfig, image_codebook: Optional[nn.Mo... method _resize_to_2d (line 1764) | def _resize_to_2d(self, x: torch.Tensor): method forward (line 1773) | def forward( FILE: transformers/models/flava/processing_flava.py class FlavaProcessor (line 28) | class FlavaProcessor(ProcessorMixin): method __init__ (line 43) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 61) | def __call__( method batch_decode (line 129) | def batch_decode(self, *args, **kwargs): method decode (line 136) | def decode(self, *args, **kwargs): method model_input_names (line 144) | def model_input_names(self): method feature_extractor_class (line 150) | def feature_extractor_class(self): method feature_extractor (line 158) | def feature_extractor(self): FILE: transformers/models/fnet/configuration_fnet.py class FNetConfig (line 30) | class FNetConfig(PretrainedConfig): method __init__ (line 89) | def __init__( FILE: transformers/models/fnet/convert_fnet_original_flax_checkpoint_to_pytorch.py function convert_flax_checkpoint_to_pytorch (line 30) | def convert_flax_checkpoint_to_pytorch(flax_checkpoint_path, fnet_config... FILE: transformers/models/fnet/modeling_fnet.py function _two_dim_matmul (line 70) | def _two_dim_matmul(x, matrix_dim_one, matrix_dim_two): function two_dim_matmul (line 79) | def two_dim_matmul(x, matrix_dim_one, matrix_dim_two): function fftn (line 84) | def fftn(x): class FNetEmbeddings (line 100) | class FNetEmbeddings(nn.Module): method __init__ (line 103) | def __init__(self, config): method forward (line 123) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class FNetBasicFourierTransform (line 159) | class FNetBasicFourierTransform(nn.Module): method __init__ (line 160) | def __init__(self, config): method _init_fourier_transform (line 164) | def _init_fourier_transform(self, config): method forward (line 187) | def forward(self, hidden_states): class FNetBasicOutput (line 197) | class FNetBasicOutput(nn.Module): method __init__ (line 198) | def __init__(self, config): method forward (line 202) | def forward(self, hidden_states, input_tensor): class FNetFourierTransform (line 207) | class FNetFourierTransform(nn.Module): method __init__ (line 208) | def __init__(self, config): method forward (line 213) | def forward(self, hidden_states): class FNetIntermediate (line 221) | class FNetIntermediate(nn.Module): method __init__ (line 222) | def __init__(self, config): method forward (line 230) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetOutput (line 237) | class FNetOutput(nn.Module): method __init__ (line 238) | def __init__(self, config): method forward (line 244) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class FNetLayer (line 251) | class FNetLayer(nn.Module): method __init__ (line 252) | def __init__(self, config): method forward (line 260) | def forward(self, hidden_states): method feed_forward_chunk (line 272) | def feed_forward_chunk(self, fourier_output): class FNetEncoder (line 278) | class FNetEncoder(nn.Module): method __init__ (line 279) | def __init__(self, config): method forward (line 285) | def forward(self, hidden_states, output_hidden_states=False, return_di... class FNetPooler (line 316) | class FNetPooler(nn.Module): method __init__ (line 317) | def __init__(self, config): method forward (line 322) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetPredictionHeadTransform (line 332) | class FNetPredictionHeadTransform(nn.Module): method __init__ (line 333) | def __init__(self, config): method forward (line 342) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class FNetLMPredictionHead (line 349) | class FNetLMPredictionHead(nn.Module): method __init__ (line 350) | def __init__(self, config): method forward (line 361) | def forward(self, hidden_states): method _tie_weights (line 366) | def _tie_weights(self): class FNetOnlyMLMHead (line 371) | class FNetOnlyMLMHead(nn.Module): method __init__ (line 372) | def __init__(self, config): method forward (line 376) | def forward(self, sequence_output): class FNetOnlyNSPHead (line 382) | class FNetOnlyNSPHead(nn.Module): method __init__ (line 383) | def __init__(self, config): method forward (line 387) | def forward(self, pooled_output): class FNetPreTrainingHeads (line 393) | class FNetPreTrainingHeads(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 399) | def forward(self, sequence_output, pooled_output): class FNetPreTrainedModel (line 405) | class FNetPreTrainedModel(PreTrainedModel): method _init_weights (line 416) | def _init_weights(self, module): method _set_gradient_checkpointing (line 433) | def _set_gradient_checkpointing(self, module, value=False): class FNetForPreTrainingOutput (line 439) | class FNetForPreTrainingOutput(ModelOutput): class FNetModel (line 514) | class FNetModel(FNetPreTrainedModel): method __init__ (line 522) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 534) | def get_input_embeddings(self): method set_input_embeddings (line 537) | def set_input_embeddings(self, value): method forward (line 546) | def forward( class FNetForPreTraining (line 623) | class FNetForPreTraining(FNetPreTrainedModel): method __init__ (line 626) | def __init__(self, config): method get_output_embeddings (line 635) | def get_output_embeddings(self): method set_output_embeddings (line 638) | def set_output_embeddings(self, new_embeddings): method forward (line 643) | def forward( class FNetForMaskedLM (line 717) | class FNetForMaskedLM(FNetPreTrainedModel): method __init__ (line 720) | def __init__(self, config): method get_output_embeddings (line 729) | def get_output_embeddings(self): method set_output_embeddings (line 732) | def set_output_embeddings(self, new_embeddings): method forward (line 741) | def forward( class FNetForNextSentencePrediction (line 787) | class FNetForNextSentencePrediction(FNetPreTrainedModel): method __init__ (line 788) | def __init__(self, config): method forward (line 799) | def forward( class FNetForSequenceClassification (line 882) | class FNetForSequenceClassification(FNetPreTrainedModel): method __init__ (line 883) | def __init__(self, config): method forward (line 900) | def forward( class FNetForMultipleChoice (line 967) | class FNetForMultipleChoice(FNetPreTrainedModel): method __init__ (line 968) | def __init__(self, config): method forward (line 984) | def forward( class FNetForTokenClassification (line 1046) | class FNetForTokenClassification(FNetPreTrainedModel): method __init__ (line 1047) | def __init__(self, config): method forward (line 1065) | def forward( class FNetForQuestionAnswering (line 1115) | class FNetForQuestionAnswering(FNetPreTrainedModel): method __init__ (line 1116) | def __init__(self, config): method forward (line 1133) | def forward( FILE: transformers/models/fnet/tokenization_fnet.py class FNetTokenizer (line 47) | class FNetTokenizer(PreTrainedTokenizer): method __init__ (line 104) | def __init__( method vocab_size (line 150) | def vocab_size(self): method get_vocab (line 153) | def get_vocab(self): method __getstate__ (line 158) | def __getstate__(self): method __setstate__ (line 163) | def __setstate__(self, d): method preprocess_text (line 173) | def preprocess_text(self, inputs): method _tokenize (line 188) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 208) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 212) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 216) | def convert_tokens_to_string(self, tokens): method _decode (line 235) | def _decode( method build_inputs_with_special_tokens (line 283) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 308) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 336) | def create_token_type_ids_from_sequences( method save_vocabulary (line 365) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/fnet/tokenization_fnet_fast.py class FNetTokenizerFast (line 54) | class FNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 95) | def __init__( method build_inputs_with_special_tokens (line 137) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 162) | def create_token_type_ids_from_sequences( method save_vocabulary (line 192) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/focalnet/configuration_focalnet.py class FocalNetConfig (line 29) | class FocalNetConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 109) | def __init__( FILE: transformers/models/focalnet/convert_focalnet_to_hf_format.py function get_focalnet_config (line 30) | def get_focalnet_config(model_name): function rename_key (line 90) | def rename_key(name): function convert_focalnet_checkpoint (line 123) | def convert_focalnet_checkpoint(model_name, pytorch_dump_folder_path, pu... FILE: transformers/models/focalnet/modeling_focalnet.py class FocalNetEncoderOutput (line 64) | class FocalNetEncoderOutput(ModelOutput): class FocalNetModelOutput (line 91) | class FocalNetModelOutput(ModelOutput): class FocalNetMaskedImageModelingOutput (line 120) | class FocalNetMaskedImageModelingOutput(ModelOutput): class FocalNetImageClassifierOutput (line 149) | class FocalNetImageClassifierOutput(ModelOutput): class FocalNetEmbeddings (line 177) | class FocalNetEmbeddings(nn.Module): method __init__ (line 182) | def __init__(self, config, use_mask_token=False): method forward (line 200) | def forward( class FocalNetPatchEmbeddings (line 217) | class FocalNetPatchEmbeddings(nn.Module): method __init__ (line 218) | def __init__( method maybe_pad (line 260) | def maybe_pad(self, pixel_values, height, width): method forward (line 269) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... function drop_path (line 289) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class FocalNetDropPath (line 310) | class FocalNetDropPath(nn.Module): method __init__ (line 313) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 317) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 320) | def extra_repr(self) -> str: class FocalNetModulation (line 324) | class FocalNetModulation(nn.Module): method __init__ (line 325) | def __init__(self, config, index, dim, focal_factor=2, bias=True, proj... method forward (line 358) | def forward(self, hidden_state): class FocalNetMlp (line 395) | class FocalNetMlp(nn.Module): method __init__ (line 396) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 405) | def forward(self, hidden_state): class FocalNetLayer (line 414) | class FocalNetLayer(nn.Module): method __init__ (line 430) | def __init__(self, config, index, dim, input_resolution, drop_path=0.0): method forward (line 462) | def forward(self, hidden_state, input_dimensions): class FocalNetStage (line 483) | class FocalNetStage(nn.Module): method __init__ (line 484) | def __init__(self, config, index, input_resolution): method forward (line 528) | def forward(self, hidden_states: torch.Tensor, input_dimensions: Tuple... class FocalNetEncoder (line 549) | class FocalNetEncoder(nn.Module): method __init__ (line 550) | def __init__(self, config, grid_size): method forward (line 568) | def forward( class FocalNetPreTrainedModel (line 639) | class FocalNetPreTrainedModel(PreTrainedModel): method _init_weights (line 650) | def _init_weights(self, module): method _set_gradient_checkpointing (line 662) | def _set_gradient_checkpointing(self, module, value=False): class FocalNetModel (line 696) | class FocalNetModel(FocalNetPreTrainedModel): method __init__ (line 697) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 712) | def get_input_embeddings(self): method forward (line 723) | def forward( class FocalNetForMaskedImageModeling (line 786) | class FocalNetForMaskedImageModeling(FocalNetPreTrainedModel): method __init__ (line 787) | def __init__(self, config): method forward (line 806) | def forward( class FocalNetForImageClassification (line 894) | class FocalNetForImageClassification(FocalNetPreTrainedModel): method __init__ (line 896) | def __init__(self, config): method forward (line 917) | def forward( class FocalNetBackbone (line 983) | class FocalNetBackbone(FocalNetPreTrainedModel, BackboneMixin): method __init__ (line 984) | def __init__(self, config: FocalNetConfig): method forward (line 996) | def forward( FILE: transformers/models/fsmt/configuration_fsmt.py class DecoderConfig (line 29) | class DecoderConfig(PretrainedConfig): method __init__ (line 35) | def __init__(self, vocab_size=0, bos_token_id=0): class FSMTConfig (line 41) | class FSMTConfig(PretrainedConfig): method __init__ (line 141) | def __init__( method to_dict (line 220) | def to_dict(self): FILE: transformers/models/fsmt/convert_fsmt_original_pytorch_checkpoint_to_pytorch.py function rewrite_dict_keys (line 78) | def rewrite_dict_keys(d): function convert_fsmt_checkpoint_to_pytorch (line 90) | def convert_fsmt_checkpoint_to_pytorch(fsmt_checkpoint_path, pytorch_dum... FILE: transformers/models/fsmt/modeling_fsmt.py function invert_mask (line 300) | def invert_mask(attention_mask): function triu_onnx (line 306) | def triu_onnx(x, diagonal=0): function _prepare_fsmt_decoder_inputs (line 317) | def _prepare_fsmt_decoder_inputs( class PretrainedFSMTModel (line 343) | class PretrainedFSMTModel(PreTrainedModel): method _init_weights (line 347) | def _init_weights(self, module): method dummy_inputs (line 361) | def dummy_inputs(self): function _make_linear_from_emb (line 371) | def _make_linear_from_emb(emb): function _check_shapes (line 379) | def _check_shapes(shape_1, shape2): function shift_tokens_right (line 384) | def shift_tokens_right(input_ids, pad_token_id): function make_padding_mask (line 397) | def make_padding_mask(input_ids, padding_idx=1): class EncoderLayer (line 408) | class EncoderLayer(nn.Module): method __init__ (line 409) | def __init__(self, config: FSMTConfig): method forward (line 421) | def forward(self, x, encoder_padding_mask, layer_head_mask, output_att... class FSMTEncoder (line 457) | class FSMTEncoder(nn.Module): method __init__ (line 465) | def __init__(self, config: FSMTConfig, embed_tokens): method forward (line 480) | def forward( class DecoderLayer (line 578) | class DecoderLayer(nn.Module): method __init__ (line 579) | def __init__(self, config: FSMTConfig): method forward (line 604) | def forward( class FSMTDecoder (line 666) | class FSMTDecoder(nn.Module): method __init__ (line 675) | def __init__(self, config: FSMTConfig, embed_tokens: nn.Embedding): method forward (line 700) | def forward( function _reorder_buffer (line 849) | def _reorder_buffer(attn_cache, new_order): class Attention (line 856) | class Attention(nn.Module): method __init__ (line 859) | def __init__( method _shape (line 882) | def _shape(self, tensor, seq_len, bsz): method forward (line 885) | def forward( method _use_saved_state (line 990) | def _use_saved_state(self, k, v, saved_state, key_padding_mask, static... function fill_with_neg_inf (line 1022) | def fill_with_neg_inf(t): function _get_shape (line 1028) | def _get_shape(t): class FSMTModel (line 1036) | class FSMTModel(PretrainedFSMTModel): method __init__ (line 1039) | def __init__(self, config: FSMTConfig): method get_encoder (line 1052) | def get_encoder(self): method get_decoder (line 1055) | def get_decoder(self): method forward (line 1064) | def forward( method get_input_embeddings (line 1156) | def get_input_embeddings(self): method set_input_embeddings (line 1159) | def set_input_embeddings(self, value): method get_output_embeddings (line 1162) | def get_output_embeddings(self): method set_output_embeddings (line 1165) | def set_output_embeddings(self, value): class FSMTForConditionalGeneration (line 1172) | class FSMTForConditionalGeneration(PretrainedFSMTModel): method __init__ (line 1184) | def __init__(self, config: FSMTConfig): method forward (line 1195) | def forward( method prepare_inputs_for_generation (line 1269) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1293) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1297) | def _reorder_cache(past_key_values, beam_idx): method get_encoder (line 1307) | def get_encoder(self): method get_decoder (line 1310) | def get_decoder(self): method get_output_embeddings (line 1313) | def get_output_embeddings(self): method set_output_embeddings (line 1316) | def set_output_embeddings(self, value): class SinusoidalPositionalEmbedding (line 1320) | class SinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 1331) | def __init__(self, num_positions, embedding_dim, padding_idx): method make_weight (line 1334) | def make_weight(self, num_positions, embedding_dim, padding_idx): method get_embedding (line 1347) | def get_embedding(num_embeddings, embedding_dim, padding_idx): method make_positions (line 1367) | def make_positions(tensor, padding_idx: int): method forward (line 1380) | def forward( FILE: transformers/models/fsmt/tokenization_fsmt.py function get_pairs (line 57) | def get_pairs(word): function replace_unicode_punct (line 70) | def replace_unicode_punct(text): function remove_non_printing_char (line 113) | def remove_non_printing_char(text): class FSMTTokenizer (line 135) | class FSMTTokenizer(PreTrainedTokenizer): method __init__ (line 187) | def __init__( method get_vocab (line 255) | def get_vocab(self) -> Dict[str, int]: method vocab_size (line 260) | def vocab_size(self) -> int: method moses_punct_norm (line 263) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 269) | def moses_tokenize(self, text, lang): method moses_detokenize (line 277) | def moses_detokenize(self, tokens, lang): method moses_pipeline (line 283) | def moses_pipeline(self, text, lang): method src_vocab_size (line 290) | def src_vocab_size(self): method tgt_vocab_size (line 294) | def tgt_vocab_size(self): method get_src_vocab (line 297) | def get_src_vocab(self): method get_tgt_vocab (line 300) | def get_tgt_vocab(self): method bpe (line 303) | def bpe(self, token): method _tokenize (line 347) | def _tokenize(self, text, lang="en", bypass_tokenizer=False): method _convert_token_to_id (line 386) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 390) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 394) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 404) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 430) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 458) | def create_token_type_ids_from_sequences( method save_vocabulary (line 491) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 527) | def __getstate__(self): method __setstate__ (line 532) | def __setstate__(self, d): FILE: transformers/models/funnel/configuration_funnel.py class FunnelConfig (line 41) | class FunnelConfig(PretrainedConfig): method __init__ (line 105) | def __init__( method num_hidden_layers (line 164) | def num_hidden_layers(self): method num_hidden_layers (line 168) | def num_hidden_layers(self, value): method num_blocks (line 174) | def num_blocks(self): method num_blocks (line 178) | def num_blocks(self, value): FILE: transformers/models/funnel/convert_funnel_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: transformers/models/funnel/modeling_funnel.py function load_tf_weights_in_funnel (line 68) | def load_tf_weights_in_funnel(model, config, tf_checkpoint_path): class FunnelEmbeddings (line 158) | class FunnelEmbeddings(nn.Module): method __init__ (line 159) | def __init__(self, config: FunnelConfig) -> None: method forward (line 165) | def forward( class FunnelAttentionStructure (line 175) | class FunnelAttentionStructure(nn.Module): method __init__ (line 182) | def __init__(self, config: FunnelConfig) -> None: method init_attention_inputs (line 191) | def init_attention_inputs( method token_type_ids_to_mat (line 211) | def token_type_ids_to_mat(self, token_type_ids: torch.Tensor) -> torch... method get_position_embeds (line 219) | def get_position_embeds( method stride_pool_pos (line 299) | def stride_pool_pos(self, pos_id: torch.Tensor, block_index: int): method relative_pos (line 314) | def relative_pos(self, pos: torch.Tensor, stride: int, pooled_pos=None... method stride_pool (line 328) | def stride_pool( method pool_tensor (line 361) | def pool_tensor( method pre_attention_pooling (line 399) | def pre_attention_pooling( method post_attention_pooling (line 421) | def post_attention_pooling(self, attention_inputs: Tuple[torch.Tensor]... function _relative_shift_gather (line 435) | def _relative_shift_gather(positional_attn: torch.Tensor, context_len: i... class FunnelRelMultiheadAttention (line 451) | class FunnelRelMultiheadAttention(nn.Module): method __init__ (line 452) | def __init__(self, config: FunnelConfig, block_index: int) -> None: method relative_positional_attention (line 475) | def relative_positional_attention(self, position_embeds, q_head, conte... method relative_token_type_attention (line 517) | def relative_token_type_attention(self, token_type_mat, q_head, cls_ma... method forward (line 541) | def forward( class FunnelPositionwiseFFN (line 595) | class FunnelPositionwiseFFN(nn.Module): method __init__ (line 596) | def __init__(self, config: FunnelConfig) -> None: method forward (line 605) | def forward(self, hidden: torch.Tensor) -> torch.Tensor: class FunnelLayer (line 614) | class FunnelLayer(nn.Module): method __init__ (line 615) | def __init__(self, config: FunnelConfig, block_index: int) -> None: method forward (line 620) | def forward( class FunnelEncoder (line 633) | class FunnelEncoder(nn.Module): method __init__ (line 634) | def __init__(self, config: FunnelConfig) -> None: method forward (line 645) | def forward( function upsample (line 696) | def upsample( class FunnelDecoder (line 718) | class FunnelDecoder(nn.Module): method __init__ (line 719) | def __init__(self, config: FunnelConfig) -> None: method forward (line 725) | def forward( class FunnelDiscriminatorPredictions (line 767) | class FunnelDiscriminatorPredictions(nn.Module): method __init__ (line 770) | def __init__(self, config: FunnelConfig) -> None: method forward (line 776) | def forward(self, discriminator_hidden_states: torch.Tensor) -> torch.... class FunnelPreTrainedModel (line 783) | class FunnelPreTrainedModel(PreTrainedModel): method _init_weights (line 793) | def _init_weights(self, module): class FunnelClassificationHead (line 818) | class FunnelClassificationHead(nn.Module): method __init__ (line 819) | def __init__(self, config: FunnelConfig, n_labels: int) -> None: method forward (line 825) | def forward(self, hidden: torch.Tensor) -> torch.Tensor: class FunnelForPreTrainingOutput (line 833) | class FunnelForPreTrainingOutput(ModelOutput): class FunnelBaseModel (line 926) | class FunnelBaseModel(FunnelPreTrainedModel): method __init__ (line 927) | def __init__(self, config: FunnelConfig) -> None: method get_input_embeddings (line 936) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 939) | def set_input_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 948) | def forward( class FunnelModel (line 1002) | class FunnelModel(FunnelPreTrainedModel): method __init__ (line 1003) | def __init__(self, config: FunnelConfig) -> None: method get_input_embeddings (line 1013) | def get_input_embeddings(self) -> nn.Embedding: method set_input_embeddings (line 1016) | def set_input_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 1025) | def forward( class FunnelForPreTraining (line 1109) | class FunnelForPreTraining(FunnelPreTrainedModel): method __init__ (line 1110) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1120) | def forward( class FunnelForMaskedLM (line 1192) | class FunnelForMaskedLM(FunnelPreTrainedModel): method __init__ (line 1195) | def __init__(self, config: FunnelConfig) -> None: method get_output_embeddings (line 1204) | def get_output_embeddings(self) -> nn.Linear: method set_output_embeddings (line 1207) | def set_output_embeddings(self, new_embeddings: nn.Embedding) -> None: method forward (line 1217) | def forward( class FunnelForSequenceClassification (line 1273) | class FunnelForSequenceClassification(FunnelPreTrainedModel): method __init__ (line 1274) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1290) | def forward( class FunnelForMultipleChoice (line 1365) | class FunnelForMultipleChoice(FunnelPreTrainedModel): method __init__ (line 1366) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1380) | def forward( class FunnelForTokenClassification (line 1448) | class FunnelForTokenClassification(FunnelPreTrainedModel): method __init__ (line 1449) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1466) | def forward( class FunnelForQuestionAnswering (line 1521) | class FunnelForQuestionAnswering(FunnelPreTrainedModel): method __init__ (line 1522) | def __init__(self, config: FunnelConfig) -> None: method forward (line 1538) | def forward( FILE: transformers/models/funnel/modeling_tf_funnel.py class TFFunnelEmbeddings (line 80) | class TFFunnelEmbeddings(tf.keras.layers.Layer): method __init__ (line 83) | def __init__(self, config, **kwargs): method build (line 93) | def build(self, input_shape): method call (line 103) | def call(self, input_ids=None, inputs_embeds=None, training=False): class TFFunnelAttentionStructure (line 123) | class TFFunnelAttentionStructure: method __init__ (line 130) | def __init__(self, config): method init_attention_inputs (line 145) | def init_attention_inputs(self, inputs_embeds, attention_mask=None, to... method token_type_ids_to_mat (line 160) | def token_type_ids_to_mat(self, token_type_ids): method get_position_embeds (line 168) | def get_position_embeds(self, seq_len, training=False): method stride_pool_pos (line 251) | def stride_pool_pos(self, pos_id, block_index): method relative_pos (line 266) | def relative_pos(self, pos, stride, pooled_pos=None, shift=1): method stride_pool (line 280) | def stride_pool(self, tensor, axis): method pool_tensor (line 307) | def pool_tensor(self, tensor, mode="mean", stride=2): method pre_attention_pooling (line 335) | def pre_attention_pooling(self, output, attention_inputs): method post_attention_pooling (line 355) | def post_attention_pooling(self, attention_inputs): function _relative_shift_gather (line 369) | def _relative_shift_gather(positional_attn, context_len, shift): class TFFunnelRelMultiheadAttention (line 385) | class TFFunnelRelMultiheadAttention(tf.keras.layers.Layer): method __init__ (line 386) | def __init__(self, config, block_index, **kwargs): method build (line 410) | def build(self, input_shape): method relative_positional_attention (line 431) | def relative_positional_attention(self, position_embeds, q_head, conte... method relative_token_type_attention (line 477) | def relative_token_type_attention(self, token_type_mat, q_head, cls_ma... method call (line 504) | def call(self, query, key, value, attention_inputs, output_attentions=... class TFFunnelPositionwiseFFN (line 550) | class TFFunnelPositionwiseFFN(tf.keras.layers.Layer): method __init__ (line 551) | def __init__(self, config, **kwargs): method call (line 561) | def call(self, hidden, training=False): class TFFunnelLayer (line 570) | class TFFunnelLayer(tf.keras.layers.Layer): method __init__ (line 571) | def __init__(self, config, block_index, **kwargs): method call (line 576) | def call(self, query, key, value, attention_inputs, output_attentions=... class TFFunnelEncoder (line 584) | class TFFunnelEncoder(tf.keras.layers.Layer): method __init__ (line 585) | def __init__(self, config, **kwargs): method call (line 596) | def call( function upsample (line 654) | def upsample(x, stride, target_len, separate_cls=True, truncate_seq=False): class TFFunnelDecoder (line 674) | class TFFunnelDecoder(tf.keras.layers.Layer): method __init__ (line 675) | def __init__(self, config, **kwargs): method call (line 683) | def call( class TFFunnelBaseLayer (line 730) | class TFFunnelBaseLayer(tf.keras.layers.Layer): method __init__ (line 735) | def __init__(self, config, **kwargs): method get_input_embeddings (line 746) | def get_input_embeddings(self): method set_input_embeddings (line 749) | def set_input_embeddings(self, value): method _prune_heads (line 753) | def _prune_heads(self, heads_to_prune): method call (line 757) | def call( class TFFunnelMainLayer (line 800) | class TFFunnelMainLayer(tf.keras.layers.Layer): method __init__ (line 805) | def __init__(self, config, **kwargs): method get_input_embeddings (line 818) | def get_input_embeddings(self): method set_input_embeddings (line 821) | def set_input_embeddings(self, value): method _prune_heads (line 825) | def _prune_heads(self, heads_to_prune): method call (line 829) | def call( class TFFunnelDiscriminatorPredictions (line 899) | class TFFunnelDiscriminatorPredictions(tf.keras.layers.Layer): method __init__ (line 902) | def __init__(self, config, **kwargs): method call (line 909) | def call(self, discriminator_hidden_states): class TFFunnelMaskedLMHead (line 916) | class TFFunnelMaskedLMHead(tf.keras.layers.Layer): method __init__ (line 917) | def __init__(self, config, input_embeddings, **kwargs): method build (line 923) | def build(self, input_shape): method get_output_embeddings (line 928) | def get_output_embeddings(self): method set_output_embeddings (line 931) | def set_output_embeddings(self, value): method get_bias (line 935) | def get_bias(self): method set_bias (line 938) | def set_bias(self, value): method call (line 942) | def call(self, hidden_states, training=False): class TFFunnelClassificationHead (line 952) | class TFFunnelClassificationHead(tf.keras.layers.Layer): method __init__ (line 953) | def __init__(self, config, n_labels, **kwargs): method call (line 962) | def call(self, hidden, training=False): class TFFunnelPreTrainedModel (line 969) | class TFFunnelPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 979) | def dummy_inputs(self): class TFFunnelForPreTrainingOutput (line 985) | class TFFunnelForPreTrainingOutput(ModelOutput): class TFFunnelBaseModel (line 1107) | class TFFunnelBaseModel(TFFunnelPreTrainedModel): method __init__ (line 1108) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1119) | def call( method serving_output (line 1141) | def serving_output(self, output): class TFFunnelModel (line 1155) | class TFFunnelModel(TFFunnelPreTrainedModel): method __init__ (line 1156) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1167) | def call( method serving_output (line 1189) | def serving_output(self, output): class TFFunnelForPreTraining (line 1205) | class TFFunnelForPreTraining(TFFunnelPreTrainedModel): method __init__ (line 1206) | def __init__(self, config: FunnelConfig, **kwargs) -> None: method call (line 1215) | def call( method serving_output (line 1264) | def serving_output(self, output): class TFFunnelForMaskedLM (line 1273) | class TFFunnelForMaskedLM(TFFunnelPreTrainedModel, TFMaskedLanguageModel... method __init__ (line 1274) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method get_lm_head (line 1280) | def get_lm_head(self) -> TFFunnelMaskedLMHead: method get_prefix_bias_name (line 1283) | def get_prefix_bias_name(self) -> str: method call (line 1294) | def call( method serving_output (line 1338) | def serving_output(self, output: TFMaskedLMOutput) -> TFMaskedLMOutput: class TFFunnelForSequenceClassification (line 1351) | class TFFunnelForSequenceClassification(TFFunnelPreTrainedModel, TFSeque... method __init__ (line 1352) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1366) | def call( method serving_output (line 1411) | def serving_output(self, output: TFSequenceClassifierOutput) -> TFSequ... class TFFunnelForMultipleChoice (line 1426) | class TFFunnelForMultipleChoice(TFFunnelPreTrainedModel, TFMultipleChoic... method __init__ (line 1427) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method dummy_inputs (line 1434) | def dummy_inputs(self): method call (line 1444) | def call( method serving_output (line 1506) | def serving_output(self, output: TFMultipleChoiceModelOutput) -> TFMul... class TFFunnelForTokenClassification (line 1521) | class TFFunnelForTokenClassification(TFFunnelPreTrainedModel, TFTokenCla... method __init__ (line 1522) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1539) | def call( method serving_output (line 1583) | def serving_output(self, output: TFTokenClassifierOutput) -> TFTokenCl... class TFFunnelForQuestionAnswering (line 1598) | class TFFunnelForQuestionAnswering(TFFunnelPreTrainedModel, TFQuestionAn... method __init__ (line 1599) | def __init__(self, config: FunnelConfig, *inputs, **kwargs) -> None: method call (line 1615) | def call( method serving_output (line 1673) | def serving_output(self, output: TFQuestionAnsweringModelOutput) -> TF... FILE: transformers/models/funnel/tokenization_funnel.py function load_vocab (line 70) | def load_vocab(vocab_file): function whitespace_tokenize (line 82) | def whitespace_tokenize(text): class FunnelTokenizer (line 91) | class FunnelTokenizer(PreTrainedTokenizer): method __init__ (line 143) | def __init__( method do_lower_case (line 195) | def do_lower_case(self): method vocab_size (line 200) | def vocab_size(self): method get_vocab (line 204) | def get_vocab(self): method _tokenize (line 208) | def _tokenize(self, text): method _convert_token_to_id (line 222) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 227) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 232) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 238) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 264) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 292) | def create_token_type_ids_from_sequences( method save_vocabulary (line 322) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 344) | class BasicTokenizer(object): method __init__ (line 364) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 372) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 409) | def _run_strip_accents(self, text): method _run_split_on_punc (line 420) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 442) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 455) | def _is_chinese_char(self, cp): method _clean_text (line 479) | def _clean_text(self, text): class WordpieceTokenizer (line 494) | class WordpieceTokenizer(object): method __init__ (line 497) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 502) | def tokenize(self, text): FILE: transformers/models/funnel/tokenization_funnel_fast.py class FunnelTokenizerFast (line 94) | class FunnelTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 145) | def __init__( method build_inputs_with_special_tokens (line 196) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 220) | def create_token_type_ids_from_sequences( method save_vocabulary (line 250) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/git/configuration_git.py class GitVisionConfig (line 31) | class GitVisionConfig(PretrainedConfig): method __init__ (line 81) | def __init__( method from_pretrained (line 111) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GitConfig (line 127) | class GitConfig(PretrainedConfig): method __init__ (line 192) | def __init__( method to_dict (line 241) | def to_dict(self): FILE: transformers/models/git/convert_git_to_pytorch.py function get_git_config (line 46) | def get_git_config(model_name): function create_rename_keys (line 71) | def create_rename_keys(config, prefix=""): function rename_key (line 155) | def rename_key(dct, old, new): function read_in_q_k_v (line 161) | def read_in_q_k_v(state_dict, config, prefix=""): function prepare_img (line 185) | def prepare_img(model_name): function prepare_video (line 196) | def prepare_video(): function convert_git_checkpoint (line 223) | def convert_git_checkpoint(model_name, pytorch_dump_folder_path, push_to... FILE: transformers/models/git/modeling_git.py class GitVisionModelOutput (line 55) | class GitVisionModelOutput(ModelOutput): function _expand_mask (line 84) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class GitEmbeddings (line 98) | class GitEmbeddings(nn.Module): method __init__ (line 101) | def __init__(self, config): method forward (line 114) | def forward( class GitSelfAttention (line 144) | class GitSelfAttention(nn.Module): method __init__ (line 145) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 172) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 177) | def forward( class GitSelfOutput (line 270) | class GitSelfOutput(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 277) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class GitAttention (line 284) | class GitAttention(nn.Module): method __init__ (line 286) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 293) | def prune_heads(self, heads): method forward (line 311) | def forward( class GitIntermediate (line 334) | class GitIntermediate(nn.Module): method __init__ (line 335) | def __init__(self, config): method forward (line 343) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class GitOutput (line 350) | class GitOutput(nn.Module): method __init__ (line 351) | def __init__(self, config): method forward (line 357) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class GitLayer (line 364) | class GitLayer(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 373) | def forward( method feed_forward_chunk (line 408) | def feed_forward_chunk(self, attention_output): class GitEncoder (line 414) | class GitEncoder(nn.Module): method __init__ (line 416) | def __init__(self, config): method forward (line 422) | def forward( class GitPreTrainedModel (line 504) | class GitPreTrainedModel(PreTrainedModel): method _init_weights (line 515) | def _init_weights(self, module): method _set_gradient_checkpointing (line 535) | def _set_gradient_checkpointing(self, module, value=False): class GitVisionEmbeddings (line 605) | class GitVisionEmbeddings(nn.Module): method __init__ (line 606) | def __init__(self, config: GitVisionConfig): method forward (line 628) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class GitVisionMLP (line 640) | class GitVisionMLP(nn.Module): method __init__ (line 641) | def __init__(self, config): method forward (line 648) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class GitVisionAttention (line 656) | class GitVisionAttention(nn.Module): method __init__ (line 659) | def __init__(self, config): method _shape (line 678) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 681) | def forward( class GitVisionEncoderLayer (line 761) | class GitVisionEncoderLayer(nn.Module): method __init__ (line 762) | def __init__(self, config: GitVisionConfig): method forward (line 770) | def forward( class GitVisionEncoder (line 812) | class GitVisionEncoder(nn.Module): method __init__ (line 821) | def __init__(self, config: GitVisionConfig): method forward (line 827) | def forward( class GitVisionTransformer (line 931) | class GitVisionTransformer(nn.Module): method __init__ (line 933) | def __init__(self, config: GitVisionConfig): method forward (line 945) | def forward( class GitVisionModel (line 993) | class GitVisionModel(GitPreTrainedModel): method __init__ (line 998) | def __init__(self, config: GitVisionConfig): method get_input_embeddings (line 1004) | def get_input_embeddings(self) -> nn.Module: method forward (line 1009) | def forward( class GitProjection (line 1047) | class GitProjection(nn.Module): method __init__ (line 1048) | def __init__(self, config: GitConfig): method forward (line 1056) | def forward(self, embeddings: torch.Tensor) -> torch.Tensor: class GitModel (line 1065) | class GitModel(GitPreTrainedModel): method __init__ (line 1066) | def __init__(self, config): method get_input_embeddings (line 1085) | def get_input_embeddings(self): method set_input_embeddings (line 1088) | def set_input_embeddings(self, value): method _prune_heads (line 1091) | def _prune_heads(self, heads_to_prune): method _generate_future_mask (line 1099) | def _generate_future_mask(self, size: int, dtype: torch.dtype, device:... method create_attention_mask (line 1105) | def create_attention_mask(self, tgt, memory, tgt_mask, past_key_values... method forward (line 1157) | def forward( class GitForCausalLM (line 1326) | class GitForCausalLM(GitPreTrainedModel): method __init__ (line 1327) | def __init__(self, config): method get_output_embeddings (line 1336) | def get_output_embeddings(self): method set_output_embeddings (line 1339) | def set_output_embeddings(self, new_embeddings): method forward (line 1344) | def forward( method prepare_inputs_for_generation (line 1534) | def prepare_inputs_for_generation( method _reorder_cache (line 1554) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/git/processing_git.py class GitProcessor (line 23) | class GitProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, image_processor, tokenizer): method __call__ (line 44) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 97) | def batch_decode(self, *args, **kwargs): method decode (line 104) | def decode(self, *args, **kwargs): method model_input_names (line 112) | def model_input_names(self): FILE: transformers/models/glpn/configuration_glpn.py class GLPNConfig (line 29) | class GLPNConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: transformers/models/glpn/convert_glpn_to_pytorch.py function rename_keys (line 34) | def rename_keys(state_dict): function read_in_k_v (line 99) | def read_in_k_v(state_dict, config): function prepare_img (line 118) | def prepare_img(): function convert_glpn_checkpoint (line 126) | def convert_glpn_checkpoint(checkpoint_path, pytorch_dump_folder_path, p... FILE: transformers/models/glpn/feature_extraction_glpn.py class GLPNFeatureExtractor (line 26) | class GLPNFeatureExtractor(GLPNImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/glpn/image_processing_glpn.py class GLPNImageProcessor (line 38) | class GLPNImageProcessor(BaseImageProcessor): method __init__ (line 58) | def __init__( method resize (line 72) | def resize( method rescale (line 104) | def rescale( method preprocess (line 126) | def preprocess( FILE: transformers/models/glpn/modeling_glpn.py function drop_path (line 56) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class GLPNDropPath (line 77) | class GLPNDropPath(nn.Module): method __init__ (line 80) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 84) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 87) | def extra_repr(self) -> str: class GLPNOverlapPatchEmbeddings (line 92) | class GLPNOverlapPatchEmbeddings(nn.Module): method __init__ (line 95) | def __init__(self, patch_size, stride, num_channels, hidden_size): method forward (line 107) | def forward(self, pixel_values): class GLPNEfficientSelfAttention (line 118) | class GLPNEfficientSelfAttention(nn.Module): method __init__ (line 122) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method transpose_for_scores (line 149) | def transpose_for_scores(self, hidden_states): method forward (line 154) | def forward( class GLPNSelfOutput (line 200) | class GLPNSelfOutput(nn.Module): method __init__ (line 201) | def __init__(self, config, hidden_size): method forward (line 206) | def forward(self, hidden_states, input_tensor): class GLPNAttention (line 213) | class GLPNAttention(nn.Module): method __init__ (line 214) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method prune_heads (line 225) | def prune_heads(self, heads): method forward (line 243) | def forward(self, hidden_states, height, width, output_attentions=False): class GLPNDWConv (line 252) | class GLPNDWConv(nn.Module): method __init__ (line 253) | def __init__(self, dim=768): method forward (line 257) | def forward(self, hidden_states, height, width): class GLPNMixFFN (line 267) | class GLPNMixFFN(nn.Module): method __init__ (line 268) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 280) | def forward(self, hidden_states, height, width): class GLPNLayer (line 291) | class GLPNLayer(nn.Module): method __init__ (line 294) | def __init__(self, config, hidden_size, num_attention_heads, drop_path... method forward (line 308) | def forward(self, hidden_states, height, width, output_attentions=False): class GLPNEncoder (line 334) | class GLPNEncoder(nn.Module): method __init__ (line 335) | def __init__(self, config): method forward (line 383) | def forward( class GLPNPreTrainedModel (line 422) | class GLPNPreTrainedModel(PreTrainedModel): method _init_weights (line 433) | def _init_weights(self, module): class GLPNModel (line 483) | class GLPNModel(GLPNPreTrainedModel): method __init__ (line 485) | def __init__(self, config): method _prune_heads (line 495) | def _prune_heads(self, heads_to_prune): method forward (line 512) | def forward( class GLPNSelectiveFeatureFusion (line 543) | class GLPNSelectiveFeatureFusion(nn.Module): method __init__ (line 549) | def __init__(self, in_channel=64): method forward (line 570) | def forward(self, local_features, global_features): class GLPNDecoderStage (line 587) | class GLPNDecoderStage(nn.Module): method __init__ (line 588) | def __init__(self, in_channels, out_channels): method forward (line 595) | def forward(self, hidden_state, residual=None): class GLPNDecoder (line 607) | class GLPNDecoder(nn.Module): method __init__ (line 608) | def __init__(self, config): method forward (line 622) | def forward(self, hidden_states: List[torch.Tensor]) -> List[torch.Ten... class SiLogLoss (line 634) | class SiLogLoss(nn.Module): method __init__ (line 643) | def __init__(self, lambd=0.5): method forward (line 647) | def forward(self, pred, target): class GLPNDepthEstimationHead (line 655) | class GLPNDepthEstimationHead(nn.Module): method __init__ (line 656) | def __init__(self, config): method forward (line 668) | def forward(self, hidden_states: List[torch.Tensor]) -> torch.Tensor: class GLPNForDepthEstimation (line 684) | class GLPNForDepthEstimation(GLPNPreTrainedModel): method __init__ (line 685) | def __init__(self, config): method forward (line 697) | def forward( FILE: transformers/models/gpt2/configuration_gpt2.py class GPT2Config (line 37) | class GPT2Config(PretrainedConfig): method __init__ (line 140) | def __init__( class GPT2OnnxConfig (line 195) | class GPT2OnnxConfig(OnnxConfigWithPast): method __init__ (line 196) | def __init__( method inputs (line 209) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 220) | def num_layers(self) -> int: method num_attention_heads (line 224) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 227) | def generate_dummy_inputs( method default_onnx_opset (line 272) | def default_onnx_opset(self) -> int: FILE: transformers/models/gpt2/convert_gpt2_original_tf_checkpoint_to_pytorch.py function convert_gpt2_checkpoint_to_pytorch (line 29) | def convert_gpt2_checkpoint_to_pytorch(gpt2_checkpoint_path, gpt2_config... FILE: transformers/models/gpt2/modeling_flax_gpt2.py class FlaxConv1D (line 110) | class FlaxConv1D(nn.Module): method __call__ (line 117) | def __call__(self, inputs): class FlaxGPT2Attention (line 129) | class FlaxGPT2Attention(nn.Module): method setup (line 135) | def setup(self): method _split_heads (line 155) | def _split_heads(self, hidden_states): method _merge_heads (line 158) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 162) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 193) | def __call__( class FlaxGPT2MLP (line 282) | class FlaxGPT2MLP(nn.Module): method setup (line 287) | def setup(self): method __call__ (line 294) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPT2Block (line 302) | class FlaxGPT2Block(nn.Module): method setup (line 306) | def setup(self): method __call__ (line 322) | def __call__( class FlaxGPT2PreTrainedModel (line 380) | class FlaxGPT2PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 390) | def __init__( method init_weights (line 402) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 437) | def init_cache(self, batch_size, max_length): method __call__ (line 457) | def __call__( class FlaxGPT2BlockCollection (line 535) | class FlaxGPT2BlockCollection(nn.Module): method setup (line 539) | def setup(self): method __call__ (line 544) | def __call__( class FlaxGPT2Module (line 587) | class FlaxGPT2Module(nn.Module): method setup (line 591) | def setup(self): method __call__ (line 610) | def __call__( class FlaxGPT2Model (line 665) | class FlaxGPT2Model(FlaxGPT2PreTrainedModel): class FlaxGPT2LMHeadModule (line 677) | class FlaxGPT2LMHeadModule(nn.Module): method setup (line 681) | def setup(self): method __call__ (line 690) | def __call__( class FlaxGPT2LMHeadModel (line 742) | class FlaxGPT2LMHeadModel(FlaxGPT2PreTrainedModel): method prepare_inputs_for_generation (line 745) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 766) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/gpt2/modeling_gpt2.py function load_tf_weights_in_gpt2 (line 67) | def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path): class GPT2Attention (line 124) | class GPT2Attention(nn.Module): method __init__ (line 125) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method prune_heads (line 168) | def prune_heads(self, heads): method _attn (line 183) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 223) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 275) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 283) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 291) | def forward( class GPT2MLP (line 345) | class GPT2MLP(nn.Module): method __init__ (line 346) | def __init__(self, intermediate_size, config): method forward (line 354) | def forward(self, hidden_states: Optional[Tuple[torch.FloatTensor]]) -... class GPT2Block (line 362) | class GPT2Block(nn.Module): method __init__ (line 363) | def __init__(self, config, layer_idx=None): method forward (line 378) | def forward( class GPT2PreTrainedModel (line 440) | class GPT2PreTrainedModel(PreTrainedModel): method __init__ (line 454) | def __init__(self, *inputs, **kwargs): method _init_weights (line 457) | def _init_weights(self, module): method _set_gradient_checkpointing (line 484) | def _set_gradient_checkpointing(self, module, value=False): class GPT2DoubleHeadsModelOutput (line 490) | class GPT2DoubleHeadsModelOutput(ModelOutput): class GPT2Model (line 670) | class GPT2Model(GPT2PreTrainedModel): method __init__ (line 674) | def __init__(self, config): method parallelize (line 695) | def parallelize(self, device_map=None): method deparallelize (line 722) | def deparallelize(self): method get_input_embeddings (line 738) | def get_input_embeddings(self): method set_input_embeddings (line 741) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 744) | def _prune_heads(self, heads_to_prune): method forward (line 757) | def forward( class GPT2LMHeadModel (line 959) | class GPT2LMHeadModel(GPT2PreTrainedModel): method __init__ (line 963) | def __init__(self, config): method parallelize (line 976) | def parallelize(self, device_map=None): method deparallelize (line 995) | def deparallelize(self): method get_output_embeddings (line 1006) | def get_output_embeddings(self): method set_output_embeddings (line 1009) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1012) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 1055) | def forward( method _reorder_cache (line 1129) | def _reorder_cache( class GPT2DoubleHeadsModel (line 1152) | class GPT2DoubleHeadsModel(GPT2PreTrainedModel): method __init__ (line 1156) | def __init__(self, config): method parallelize (line 1171) | def parallelize(self, device_map=None): method deparallelize (line 1191) | def deparallelize(self): method get_output_embeddings (line 1203) | def get_output_embeddings(self): method set_output_embeddings (line 1206) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1209) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 1240) | def forward( method _reorder_cache (line 1352) | def _reorder_cache( class GPT2ForSequenceClassification (line 1381) | class GPT2ForSequenceClassification(GPT2PreTrainedModel): method __init__ (line 1385) | def __init__(self, config): method forward (line 1404) | def forward( class GPT2ForTokenClassification (line 1507) | class GPT2ForTokenClassification(GPT2PreTrainedModel): method __init__ (line 1508) | def __init__(self, config): method forward (line 1539) | def forward( class GPT2ForQuestionAnswering (line 1605) | class GPT2ForQuestionAnswering(GPT2PreTrainedModel): method __init__ (line 1609) | def __init__(self, config): method forward (line 1630) | def forward( FILE: transformers/models/gpt2/modeling_tf_gpt2.py class TFAttention (line 70) | class TFAttention(tf.keras.layers.Layer): method __init__ (line 71) | def __init__(self, nx, config, scale=False, is_cross_attention=False, ... method prune_heads (line 95) | def prune_heads(self, heads): method causal_attention_mask (line 99) | def causal_attention_mask(nd, ns, dtype): method _attn (line 109) | def _attn(self, q, k, v, attention_mask, head_mask, output_attentions,... method merge_heads (line 142) | def merge_heads(self, x): method split_heads (line 148) | def split_heads(self, x): method call (line 154) | def call( class TFMLP (line 206) | class TFMLP(tf.keras.layers.Layer): method __init__ (line 207) | def __init__(self, n_state, config, **kwargs): method call (line 215) | def call(self, x, training=False): class TFBlock (line 222) | class TFBlock(tf.keras.layers.Layer): method __init__ (line 223) | def __init__(self, config, scale=False, **kwargs): method call (line 239) | def call( class TFGPT2MainLayer (line 301) | class TFGPT2MainLayer(tf.keras.layers.Layer): method __init__ (line 304) | def __init__(self, config, *inputs, **kwargs): method get_input_embeddings (line 334) | def get_input_embeddings(self): method set_input_embeddings (line 337) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 340) | def _prune_heads(self, heads_to_prune): method call (line 347) | def call( class TFGPT2PreTrainedModel (line 513) | class TFGPT2PreTrainedModel(TFPreTrainedModel): class TFGPT2DoubleHeadsModelOutput (line 526) | class TFGPT2DoubleHeadsModelOutput(ModelOutput): class TFGPT2Model (line 675) | class TFGPT2Model(TFGPT2PreTrainedModel): method __init__ (line 676) | def __init__(self, config, *inputs, **kwargs): method call (line 687) | def call( class TFGPT2LMHeadModel (line 752) | class TFGPT2LMHeadModel(TFGPT2PreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 753) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 757) | def get_output_embeddings(self): method set_output_embeddings (line 760) | def set_output_embeddings(self, value): method prepare_inputs_for_generation (line 763) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 795) | def call( class TFGPT2DoubleHeadsModel (line 886) | class TFGPT2DoubleHeadsModel(TFGPT2PreTrainedModel): method __init__ (line 887) | def __init__(self, config, *inputs, **kwargs): method call (line 898) | def call( method input_signature (line 998) | def input_signature(self): class TFGPT2ForSequenceClassification (line 1021) | class TFGPT2ForSequenceClassification(TFGPT2PreTrainedModel, TFSequenceC... method __init__ (line 1022) | def __init__(self, config, *inputs, **kwargs): method call (line 1040) | def call( FILE: transformers/models/gpt2/tokenization_gpt2.py function bytes_to_unicode (line 66) | def bytes_to_unicode(): function get_pairs (line 90) | def get_pairs(word): class GPT2Tokenizer (line 104) | class GPT2Tokenizer(PreTrainedTokenizer): method __init__ (line 159) | def __init__( method vocab_size (line 205) | def vocab_size(self): method get_vocab (line 208) | def get_vocab(self): method bpe (line 211) | def bpe(self, token): method build_inputs_with_special_tokens (line 253) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 266) | def get_special_tokens_mask( method _tokenize (line 298) | def _tokenize(self, text): method _convert_token_to_id (line 308) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 312) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 316) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 322) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 351) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 357) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/gpt2/tokenization_gpt2_fast.py class GPT2TokenizerFast (line 70) | class GPT2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 129) | def __init__( method _batch_encode_plus (line 161) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 170) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 180) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 184) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/gpt2/tokenization_gpt2_tf.py class TFGPT2Tokenizer (line 11) | class TFGPT2Tokenizer(tf.keras.layers.Layer): method __init__ (line 27) | def __init__(self, vocab: Dict[str, int], merges: List[str], max_lengt... method from_tokenizer (line 36) | def from_tokenizer(cls, tokenizer: GPT2Tokenizer, *args, **kwargs): method from_pretrained (line 56) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method from_config (line 74) | def from_config(cls, config): method get_config (line 82) | def get_config(self): method call (line 90) | def call(self, x, max_length: int = None): FILE: transformers/models/gpt_bigcode/configuration_gpt_bigcode.py class GPTBigCodeConfig (line 28) | class GPTBigCodeConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: transformers/models/gpt_bigcode/modeling_gpt_bigcode.py function upcast_masked_softmax (line 56) | def upcast_masked_softmax( function upcast_softmax (line 67) | def upcast_softmax(x: torch.Tensor, scale: float, softmax_dtype: torch.d... function masked_softmax (line 75) | def masked_softmax(x: torch.Tensor, mask: torch.Tensor, mask_value: torc... class GPTBigCodeAttention (line 81) | class GPTBigCodeAttention(nn.Module): method __init__ (line 82) | def __init__(self, config, is_cross_attention=False, layer_idx=None): method _get_mask_value (line 122) | def _get_mask_value(self, device, dtype): method _attn (line 128) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 205) | def forward( class GPTBigCodeMLP (line 265) | class GPTBigCodeMLP(nn.Module): method __init__ (line 266) | def __init__(self, intermediate_size, config): method forward (line 275) | def forward(self, hidden_states: Optional[Tuple[torch.Tensor]]) -> tor... class GPTBigCodeBlock (line 283) | class GPTBigCodeBlock(nn.Module): method __init__ (line 284) | def __init__(self, config, layer_idx=None): method forward (line 301) | def forward( class GPTBigCodePreTrainedModel (line 365) | class GPTBigCodePreTrainedModel(PreTrainedModel): method __init__ (line 377) | def __init__(self, *inputs, **kwargs): method _init_weights (line 380) | def _init_weights(self, module): method _set_gradient_checkpointing (line 408) | def _set_gradient_checkpointing(self, module, value=False): class GPTBigCodeModel (line 502) | class GPTBigCodeModel(GPTBigCodePreTrainedModel): method __init__ (line 505) | def __init__(self, config): method get_input_embeddings (line 527) | def get_input_embeddings(self): method set_input_embeddings (line 530) | def set_input_embeddings(self, new_embeddings): method forward (line 539) | def forward( class GPTBigCodeForCausalLM (line 724) | class GPTBigCodeForCausalLM(GPTBigCodePreTrainedModel): method __init__ (line 727) | def __init__(self, config): method get_output_embeddings (line 735) | def get_output_embeddings(self): method set_output_embeddings (line 738) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 741) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 784) | def forward( method _reorder_cache (line 851) | def _reorder_cache( class GPTBigCodeForSequenceClassification (line 877) | class GPTBigCodeForSequenceClassification(GPTBigCodePreTrainedModel): method __init__ (line 880) | def __init__(self, config): method forward (line 890) | def forward( class GPTBigCodeForTokenClassification (line 995) | class GPTBigCodeForTokenClassification(GPTBigCodePreTrainedModel): method __init__ (line 996) | def __init__(self, config): method forward (line 1014) | def forward( FILE: transformers/models/gpt_neo/configuration_gpt_neo.py class GPTNeoConfig (line 34) | class GPTNeoConfig(PretrainedConfig): method __init__ (line 104) | def __init__( method expand_attention_types_params (line 161) | def expand_attention_types_params(attention_types): function custom_unfold (line 169) | def custom_unfold(input, dimension, size, step): function custom_get_block_length_and_num_blocks (line 191) | def custom_get_block_length_and_num_blocks(seq_length, window_size): class GPTNeoOnnxConfig (line 206) | class GPTNeoOnnxConfig(OnnxConfigWithPast): method inputs (line 208) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_attention_heads (line 219) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 222) | def generate_dummy_inputs( method default_onnx_opset (line 267) | def default_onnx_opset(self) -> int: FILE: transformers/models/gpt_neo/convert_gpt_neo_mesh_tf_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 28) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: transformers/models/gpt_neo/modeling_flax_gpt_neo.py class FlaxGPTNeoSelfAttention (line 108) | class FlaxGPTNeoSelfAttention(nn.Module): method setup (line 113) | def setup(self): method _split_heads (line 141) | def _split_heads(self, hidden_states): method _merge_heads (line 144) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 148) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 179) | def __call__( class FlaxGPTNeoAttention (line 249) | class FlaxGPTNeoAttention(nn.Module): method setup (line 254) | def setup(self): method __call__ (line 258) | def __call__( class FlaxGPTNeoMLP (line 275) | class FlaxGPTNeoMLP(nn.Module): method setup (line 280) | def setup(self): method __call__ (line 288) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPTNeoBlock (line 296) | class FlaxGPTNeoBlock(nn.Module): method setup (line 301) | def setup(self): method __call__ (line 310) | def __call__( class FlaxGPTNeoPreTrainedModel (line 340) | class FlaxGPTNeoPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 350) | def __init__( method init_weights (line 362) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 382) | def init_cache(self, batch_size, max_length): method __call__ (line 402) | def __call__( class FlaxGPTNeoBlockCollection (line 472) | class FlaxGPTNeoBlockCollection(nn.Module): method setup (line 476) | def setup(self): method __call__ (line 482) | def __call__( class FlaxGPTNeoModule (line 517) | class FlaxGPTNeoModule(nn.Module): method setup (line 521) | def setup(self): method __call__ (line 538) | def __call__( class FlaxGPTNeoModel (line 591) | class FlaxGPTNeoModel(FlaxGPTNeoPreTrainedModel): class FlaxGPTNeoForCausalLMModule (line 598) | class FlaxGPTNeoForCausalLMModule(nn.Module): method setup (line 602) | def setup(self): method __call__ (line 611) | def __call__( class FlaxGPTNeoForCausalLM (line 654) | class FlaxGPTNeoForCausalLM(FlaxGPTNeoPreTrainedModel): method prepare_inputs_for_generation (line 657) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 678) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/gpt_neo/modeling_gpt_neo.py function load_tf_weights_in_gpt_neo (line 53) | def load_tf_weights_in_gpt_neo(model, config, gpt_neo_checkpoint_path): class GPTNeoSelfAttention (line 133) | class GPTNeoSelfAttention(nn.Module): method __init__ (line 134) | def __init__(self, config, attention_type): method _split_heads (line 168) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 176) | def _merge_heads(self, tensor, num_heads, attn_head_size): method _attn (line 184) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method forward (line 215) | def forward( class GPTNeoAttention (line 256) | class GPTNeoAttention(nn.Module): method __init__ (line 257) | def __init__(self, config, layer_id=0): method forward (line 271) | def forward( class GPTNeoMLP (line 290) | class GPTNeoMLP(nn.Module): method __init__ (line 291) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 299) | def forward(self, hidden_states): class GPTNeoBlock (line 307) | class GPTNeoBlock(nn.Module): method __init__ (line 308) | def __init__(self, config, layer_id): method forward (line 317) | def forward( class GPTNeoPreTrainedModel (line 355) | class GPTNeoPreTrainedModel(PreTrainedModel): method __init__ (line 368) | def __init__(self, *inputs, **kwargs): method _init_weights (line 371) | def _init_weights(self, module): method _set_gradient_checkpointing (line 387) | def _set_gradient_checkpointing(self, module, value=False): class GPTNeoModel (line 477) | class GPTNeoModel(GPTNeoPreTrainedModel): method __init__ (line 478) | def __init__(self, config): method get_input_embeddings (line 492) | def get_input_embeddings(self): method set_input_embeddings (line 495) | def set_input_embeddings(self, new_embeddings): method forward (line 504) | def forward( class GPTNeoForCausalLM (line 665) | class GPTNeoForCausalLM(GPTNeoPreTrainedModel): method __init__ (line 673) | def __init__(self, config): method get_output_embeddings (line 681) | def get_output_embeddings(self): method set_output_embeddings (line 684) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 687) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 721) | def forward( method _reorder_cache (line 792) | def _reorder_cache( class GPTNeoForSequenceClassification (line 821) | class GPTNeoForSequenceClassification(GPTNeoPreTrainedModel): method __init__ (line 824) | def __init__(self, config): method forward (line 839) | def forward( class GPTNeoForTokenClassification (line 941) | class GPTNeoForTokenClassification(GPTNeoPreTrainedModel): method __init__ (line 942) | def __init__(self, config): method forward (line 960) | def forward( class GPTNeoForQuestionAnswering (line 1026) | class GPTNeoForQuestionAnswering(GPTNeoPreTrainedModel): method __init__ (line 1029) | def __init__(self, config): method forward (line 1045) | def forward( FILE: transformers/models/gpt_neox/configuration_gpt_neox.py class GPTNeoXConfig (line 29) | class GPTNeoXConfig(PretrainedConfig): method __init__ (line 92) | def __init__( FILE: transformers/models/gpt_neox/modeling_gpt_neox.py class GPTNeoXPreTrainedModel (line 55) | class GPTNeoXPreTrainedModel(PreTrainedModel): method _init_weights (line 67) | def _init_weights(self, module): method _set_gradient_checkpointing (line 81) | def _set_gradient_checkpointing(self, module, value=False): class GPTNeoXAttention (line 86) | class GPTNeoXAttention(nn.Module): method __init__ (line 87) | def __init__(self, config): method forward (line 112) | def forward( method _split_heads (line 176) | def _split_heads(cls, tensor, num_attention_heads, attn_head_size): method _merge_heads (line 189) | def _merge_heads(cls, tensor, num_attention_heads, attn_head_size): method _attn (line 200) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): function attention_mask_func (line 247) | def attention_mask_func(attention_scores, ltor_mask): class RotaryEmbedding (line 252) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 253) | def __init__(self, dim, max_position_embeddings, base=10000, device=No... method forward (line 267) | def forward(self, x, seq_len=None): function rotate_half (line 281) | def rotate_half(x): function apply_rotary_pos_emb (line 288) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class GPTNeoXMLP (line 298) | class GPTNeoXMLP(nn.Module): method __init__ (line 299) | def __init__(self, config): method forward (line 305) | def forward(self, hidden_states): class GPTNeoXLayer (line 312) | class GPTNeoXLayer(nn.Module): method __init__ (line 313) | def __init__(self, config): method forward (line 321) | def forward( class GPTNeoXModel (line 421) | class GPTNeoXModel(GPTNeoXPreTrainedModel): method __init__ (line 422) | def __init__(self, config): method get_input_embeddings (line 435) | def get_input_embeddings(self): method set_input_embeddings (line 438) | def set_input_embeddings(self, value): method forward (line 448) | def forward( class GPTNeoXForCausalLM (line 598) | class GPTNeoXForCausalLM(GPTNeoXPreTrainedModel): method __init__ (line 601) | def __init__(self, config): method get_output_embeddings (line 610) | def get_output_embeddings(self): method set_output_embeddings (line 613) | def set_output_embeddings(self, new_embeddings): method forward (line 618) | def forward( method prepare_inputs_for_generation (line 711) | def prepare_inputs_for_generation( method _reorder_cache (line 748) | def _reorder_cache(self, past_key_values, beam_idx): class GPTNeoXForSequenceClassification (line 772) | class GPTNeoXForSequenceClassification(GPTNeoXPreTrainedModel): method __init__ (line 775) | def __init__(self, config): method forward (line 790) | def forward( class GPTNeoXForTokenClassification (line 884) | class GPTNeoXForTokenClassification(GPTNeoXPreTrainedModel): method __init__ (line 885) | def __init__(self, config): method forward (line 903) | def forward( class GPTNeoXForQuestionAnswering (line 968) | class GPTNeoXForQuestionAnswering(GPTNeoXPreTrainedModel): method __init__ (line 971) | def __init__(self, config): method forward (line 987) | def forward( FILE: transformers/models/gpt_neox/tokenization_gpt_neox_fast.py class GPTNeoXTokenizerFast (line 44) | class GPTNeoXTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 102) | def __init__( method save_vocabulary (line 132) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _build_conversation_input_ids (line 136) | def _build_conversation_input_ids(self, conversation: "Conversation") ... FILE: transformers/models/gpt_neox_japanese/configuration_gpt_neox_japanese.py class GPTNeoXJapaneseConfig (line 28) | class GPTNeoXJapaneseConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py class GPTNeoXJapanesePreTrainedModel (line 43) | class GPTNeoXJapanesePreTrainedModel(PreTrainedModel): method _init_weights (line 55) | def _init_weights(self, module): method _set_gradient_checkpointing (line 69) | def _set_gradient_checkpointing(self, module, value=False): class GPTNeoXJapaneseAttention (line 74) | class GPTNeoXJapaneseAttention(nn.Module): method __init__ (line 75) | def __init__(self, config, use_bias=False): method forward (line 95) | def forward( method _split_heads (line 160) | def _split_heads(cls, tensor, num_attention_heads, attn_head_size): method _merge_heads (line 173) | def _merge_heads(cls, tensor, num_attention_heads, attn_head_size): method _create_causal_mask (line 184) | def _create_causal_mask(self, key_length, query_length): method _attn (line 192) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): class RotaryEmbedding (line 242) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 243) | def __init__(self, dim, max_position_embeddings, base=10000, device=No... method forward (line 257) | def forward(self, x, seq_len=None): function rotate_half (line 271) | def rotate_half(x): function apply_rotary_pos_emb (line 278) | def apply_rotary_pos_emb(q, k, cos, sin, offset: int = 0): function bias_dropout_add (line 286) | def bias_dropout_add(x: Tensor, bias: Tensor, residual: Optional[Tensor]... class GPTNeoXJapaneseMLP (line 307) | class GPTNeoXJapaneseMLP(nn.Module): method __init__ (line 308) | def __init__(self, config): method forward (line 316) | def forward(self, hidden_states): class GPTNeoXJapaneseLayer (line 323) | class GPTNeoXJapaneseLayer(nn.Module): method __init__ (line 324) | def __init__(self, config, layer_number): method forward (line 334) | def forward( class GPTNeoXJapaneseModel (line 439) | class GPTNeoXJapaneseModel(GPTNeoXJapanesePreTrainedModel): method __init__ (line 440) | def __init__(self, config): method get_input_embeddings (line 453) | def get_input_embeddings(self): method set_input_embeddings (line 456) | def set_input_embeddings(self, value): method forward (line 461) | def forward( class GPTNeoXJapaneseForCausalLM (line 593) | class GPTNeoXJapaneseForCausalLM(GPTNeoXJapanesePreTrainedModel): method __init__ (line 596) | def __init__(self, config): method get_output_embeddings (line 606) | def get_output_embeddings(self): method set_output_embeddings (line 609) | def set_output_embeddings(self, new_embeddings): method forward (line 614) | def forward( method prepare_inputs_for_generation (line 707) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 720) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/gpt_neox_japanese/tokenization_gpt_neox_japanese.py function load_vocab_and_emoji (line 50) | def load_vocab_and_emoji(vocab_file, emoji_file): class GPTNeoXJapaneseTokenizer (line 70) | class GPTNeoXJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 123) | def __init__( method vocab_size (line 159) | def vocab_size(self): method get_vocab (line 163) | def get_vocab(self): method _tokenize (line 166) | def _tokenize(self, text): method _convert_token_to_id (line 169) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 173) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 177) | def convert_tokens_to_string(self, tokens): method _build_conversation_input_ids (line 182) | def _build_conversation_input_ids(self, conversation: "Conversation") ... method save_vocabulary (line 192) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class SubWordJapaneseTokenizer (line 223) | class SubWordJapaneseTokenizer(object): method __init__ (line 247) | def __init__(self, vocab, ids_to_tokens, emoji): method __len__ (line 268) | def __len__(self): method clean_text (line 271) | def clean_text(self, content): method tokenize (line 283) | def tokenize(self, text, clean=False): method convert_id_to_token (line 350) | def convert_id_to_token(self, index, breakline="\n"): FILE: transformers/models/gpt_sw3/convert_megatron_to_pytorch.py function recursive_print (line 25) | def recursive_print(name, val, spaces=0): function fix_query_key_value_ordering (line 45) | def fix_query_key_value_ordering(param, num_splits, num_heads, hidden_si... function convert_megatron_checkpoint (line 61) | def convert_megatron_checkpoint(sd_megatron, config): function copy_config (line 116) | def copy_config(config_hf, config_megatron): function main (line 147) | def main(args): FILE: transformers/models/gpt_sw3/tokenization_gpt_sw3.py class GPTSw3Tokenizer (line 42) | class GPTSw3Tokenizer(PreTrainedTokenizer): method __init__ (line 108) | def __init__( method __getstate__ (line 172) | def __getstate__(self): method __setstate__ (line 178) | def __setstate__(self, d): method vocab_size (line 190) | def vocab_size(self) -> int: method preprocess_text (line 193) | def preprocess_text(self, text: str) -> str: method _tokenize (line 208) | def _tokenize(self, text: str, **kwargs) -> List[str]: method _convert_token_to_id (line 212) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 216) | def _convert_id_to_token(self, index: int) -> str: method clean_up_tokenization (line 221) | def clean_up_tokenization(out_string: str) -> str: method convert_tokens_to_string (line 225) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method get_vocab (line 246) | def get_vocab(self) -> Dict[str, int]: method save_vocabulary (line 252) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method encode_fast (line 269) | def encode_fast( method decode_fast (line 302) | def decode_fast(self, token_ids: Union[int, List[int]]) -> str: FILE: transformers/models/gptj/configuration_gptj.py class GPTJConfig (line 33) | class GPTJConfig(PretrainedConfig): method __init__ (line 96) | def __init__( class GPTJOnnxConfig (line 141) | class GPTJOnnxConfig(OnnxConfigWithPast): method __init__ (line 142) | def __init__( method inputs (line 155) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 166) | def num_layers(self) -> int: method num_attention_heads (line 170) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 173) | def generate_dummy_inputs( method default_onnx_opset (line 218) | def default_onnx_opset(self) -> int: FILE: transformers/models/gptj/modeling_flax_gptj.py function create_sinusoidal_positions (line 109) | def create_sinusoidal_positions(num_pos, dim): function rotate_every_two (line 122) | def rotate_every_two(tensor): function apply_rotary_pos_emb (line 128) | def apply_rotary_pos_emb(tensor, sincos): class FlaxGPTJAttention (line 135) | class FlaxGPTJAttention(nn.Module): method setup (line 141) | def setup(self): method _split_heads (line 167) | def _split_heads(self, hidden_states): method _merge_heads (line 170) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 174) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 205) | def __call__( class FlaxGPTJMLP (line 294) | class FlaxGPTJMLP(nn.Module): method setup (line 299) | def setup(self): method __call__ (line 309) | def __call__(self, hidden_states, deterministic: bool = True): class FlaxGPTJBlock (line 317) | class FlaxGPTJBlock(nn.Module): method setup (line 321) | def setup(self): method __call__ (line 330) | def __call__( class FlaxGPTJPreTrainedModel (line 358) | class FlaxGPTJPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 368) | def __init__( method init_weights (line 380) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 415) | def init_cache(self, batch_size, max_length): method __call__ (line 435) | def __call__( class FlaxGPTJBlockCollection (line 505) | class FlaxGPTJBlockCollection(nn.Module): method setup (line 509) | def setup(self): method __call__ (line 514) | def __call__( class FlaxGPTJModule (line 551) | class FlaxGPTJModule(nn.Module): method setup (line 555) | def setup(self): method __call__ (line 567) | def __call__( class FlaxGPTJModel (line 616) | class FlaxGPTJModel(FlaxGPTJPreTrainedModel): class FlaxGPTJForCausalLMModule (line 628) | class FlaxGPTJForCausalLMModule(nn.Module): method setup (line 632) | def setup(self): method __call__ (line 640) | def __call__( class FlaxGPTJForCausalLM (line 682) | class FlaxGPTJForCausalLM(FlaxGPTJPreTrainedModel): method prepare_inputs_for_generation (line 685) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 706) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/gptj/modeling_gptj.py function create_sinusoidal_positions (line 58) | def create_sinusoidal_positions(num_pos: int, dim: int) -> torch.Tensor: function get_embed_positions (line 65) | def get_embed_positions(embed_positions, position_ids): function rotate_every_two (line 69) | def rotate_every_two(x: torch.Tensor) -> torch.Tensor: function apply_rotary_pos_emb (line 76) | def apply_rotary_pos_emb(tensor: torch.Tensor, sin: torch.Tensor, cos: t... class GPTJAttention (line 82) | class GPTJAttention(nn.Module): method __init__ (line 83) | def __init__(self, config): method _split_heads (line 117) | def _split_heads(self, tensor, num_attention_heads, attn_head_size, ro... method _merge_heads (line 132) | def _merge_heads(self, tensor, num_attention_heads, attn_head_size): method _attn (line 145) | def _attn( method _get_embed_positions (line 187) | def _get_embed_positions(self, position_ids): method forward (line 194) | def forward( class GPTJMLP (line 270) | class GPTJMLP(nn.Module): method __init__ (line 271) | def __init__(self, intermediate_size, config): # in MLP: intermediate... method forward (line 281) | def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch... class GPTJBlock (line 289) | class GPTJBlock(nn.Module): method __init__ (line 290) | def __init__(self, config): method forward (line 297) | def forward( class GPTJPreTrainedModel (line 332) | class GPTJPreTrainedModel(PreTrainedModel): method __init__ (line 345) | def __init__(self, *inputs, **kwargs): method _init_weights (line 348) | def _init_weights(self, module): method _set_gradient_checkpointing (line 364) | def _set_gradient_checkpointing(self, module, value=False): class GPTJModel (line 482) | class GPTJModel(GPTJPreTrainedModel): method __init__ (line 483) | def __init__(self, config): method parallelize (line 502) | def parallelize(self, device_map=None): method deparallelize (line 528) | def deparallelize(self): method get_input_embeddings (line 543) | def get_input_embeddings(self): method set_input_embeddings (line 546) | def set_input_embeddings(self, new_embeddings): method forward (line 556) | def forward( class GPTJForCausalLM (line 736) | class GPTJForCausalLM(GPTJPreTrainedModel): method __init__ (line 739) | def __init__(self, config): method parallelize (line 752) | def parallelize(self, device_map=None): method deparallelize (line 771) | def deparallelize(self): method get_output_embeddings (line 782) | def get_output_embeddings(self): method set_output_embeddings (line 785) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 788) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 831) | def forward( method _reorder_cache (line 905) | def _reorder_cache( class GPTJForSequenceClassification (line 934) | class GPTJForSequenceClassification(GPTJPreTrainedModel): method __init__ (line 937) | def __init__(self, config): method forward (line 957) | def forward( class GPTJForQuestionAnswering (line 1060) | class GPTJForQuestionAnswering(GPTJPreTrainedModel): method __init__ (line 1063) | def __init__(self, config): method forward (line 1083) | def forward( FILE: transformers/models/gptj/modeling_tf_gptj.py function create_sinusoidal_positions (line 63) | def create_sinusoidal_positions(num_pos: int, dim: int) -> tf.Tensor: function rotate_every_two (line 71) | def rotate_every_two(x: tf.Tensor) -> tf.Tensor: function apply_rotary_pos_emb (line 78) | def apply_rotary_pos_emb(tensor: tf.Tensor, sincos: tf.Tensor) -> tf.Ten... class TFGPTJAttention (line 85) | class TFGPTJAttention(tf.keras.layers.Layer): method __init__ (line 86) | def __init__(self, config: GPTJConfig, **kwargs): method get_causal_mask (line 136) | def get_causal_mask(self, key_length, query_length) -> tf.Tensor: method get_masked_bias (line 140) | def get_masked_bias(dtype: tf.DType) -> tf.Tensor: method _split_heads (line 143) | def _split_heads(self, hidden_states: tf.Tensor, rotary: bool) -> tf.T... method _merge_heads (line 157) | def _merge_heads(self, hidden_states: tf.Tensor) -> tf.Tensor: method _attn (line 170) | def _attn( method call (line 207) | def call( class TFGPTJMLP (line 271) | class TFGPTJMLP(tf.keras.layers.Layer): method __init__ (line 272) | def __init__(self, intermediate_size: int, config: GPTJConfig, **kwargs): method call (line 286) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFGPTJBlock (line 294) | class TFGPTJBlock(tf.keras.layers.Layer): method __init__ (line 295) | def __init__(self, config: GPTJConfig, **kwargs): method call (line 302) | def call( class TFGPTJMainLayer (line 337) | class TFGPTJMainLayer(tf.keras.layers.Layer): method __init__ (line 340) | def __init__(self, config: GPTJConfig, *inputs, **kwargs): method get_input_embeddings (line 361) | def get_input_embeddings(self): method set_input_embeddings (line 364) | def set_input_embeddings(self, value: tf.Tensor): method _prune_heads (line 368) | def _prune_heads(self, heads_to_prune): method call (line 375) | def call( class TFGPTJPreTrainedModel (line 504) | class TFGPTJPreTrainedModel(TFPreTrainedModel): class TFGPTJModel (line 625) | class TFGPTJModel(TFGPTJPreTrainedModel): method __init__ (line 626) | def __init__(self, config, *inputs, **kwargs): method call (line 637) | def call( class TFGPTJForCausalLM (line 682) | class TFGPTJForCausalLM(TFGPTJPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 683) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 690) | def get_output_embeddings(self): method set_output_embeddings (line 693) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 696) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 728) | def call( class TFGPTJForSequenceClassification (line 803) | class TFGPTJForSequenceClassification(TFGPTJPreTrainedModel, TFSequenceC... method __init__ (line 806) | def __init__(self, config, *inputs, **kwargs): method call (line 824) | def call( class TFGPTJForQuestionAnswering (line 919) | class TFGPTJForQuestionAnswering(TFGPTJPreTrainedModel, TFQuestionAnswer... method __init__ (line 922) | def __init__(self, config, *inputs, **kwargs): method call (line 937) | def call( FILE: transformers/models/gptsan_japanese/configuration_gptsan_japanese.py class GPTSanJapaneseConfig (line 29) | class GPTSanJapaneseConfig(PretrainedConfig): method __init__ (line 100) | def __init__( FILE: transformers/models/gptsan_japanese/convert_gptsan_tf_checkpoint_to_pytorch.py function convert_tf_gptsan_to_pt (line 28) | def convert_tf_gptsan_to_pt(args): FILE: transformers/models/gptsan_japanese/modeling_gptsan_japanese.py function router_z_loss_func (line 54) | def router_z_loss_func(router_logits: torch.Tensor) -> float: function load_balancing_loss_func (line 75) | def load_balancing_loss_func(router_probs: torch.Tensor, expert_indices:... class GPTSanJapaneseDenseActDense (line 114) | class GPTSanJapaneseDenseActDense(nn.Module): method __init__ (line 124) | def __init__(self, config: GPTSanJapaneseConfig, ext_layer=False): method forward (line 132) | def forward(self, hidden_states): class GPTSanJapaneseTop1Router (line 149) | class GPTSanJapaneseTop1Router(nn.Module): method __init__ (line 160) | def __init__(self, config: GPTSanJapaneseConfig): method _compute_router_probabilities (line 169) | def _compute_router_probabilities(self, hidden_states: torch.Tensor) -... method _cast_classifier (line 211) | def _cast_classifier(self): method forward (line 219) | def forward(self, hidden_states: torch.Tensor) -> Tuple: class GPTSanJapaneseSparseMLP (line 252) | class GPTSanJapaneseSparseMLP(nn.Module): method __init__ (line 257) | def __init__(self, config: GPTSanJapaneseConfig, expert_class: nn.Modu... method forward (line 267) | def forward(self, hidden_states): class GPTSanJapaneseLayerSparseFF (line 295) | class GPTSanJapaneseLayerSparseFF(nn.Module): method __init__ (line 305) | def __init__(self, config: GPTSanJapaneseConfig): method forward (line 311) | def forward(self, hidden_states, output_router_logits): class GPTSanJapaneseLayerDenseFF (line 332) | class GPTSanJapaneseLayerDenseFF(nn.Module): method __init__ (line 342) | def __init__(self, config: GPTSanJapaneseConfig): method forward (line 348) | def forward(self, hidden_states): class GPTSanJapaneseAttention (line 363) | class GPTSanJapaneseAttention(nn.Module): method __init__ (line 366) | def __init__( method _shape (line 393) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 396) | def forward( class GPTSanJapaneseLayerSelfAttention (line 517) | class GPTSanJapaneseLayerSelfAttention(nn.Module): method __init__ (line 522) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 532) | def forward( class GPTSanJapaneseBlock (line 603) | class GPTSanJapaneseBlock(nn.Module): method __init__ (line 608) | def __init__(self, config, ext_layer=False): method forward (line 613) | def forward( class GPTSanJapanesePreTrainedModel (line 685) | class GPTSanJapanesePreTrainedModel(PreTrainedModel): method dummy_inputs (line 698) | def dummy_inputs(self): method _init_weights (line 707) | def _init_weights(self, module): method _set_gradient_checkpointing (line 762) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 767) | def _shift_right(self, input_ids): class GPTSanJapaneseModel (line 868) | class GPTSanJapaneseModel(GPTSanJapanesePreTrainedModel): method __init__ (line 869) | def __init__(self, config: GPTSanJapaneseConfig): method get_input_embeddings (line 896) | def get_input_embeddings(self): method set_input_embeddings (line 899) | def set_input_embeddings(self, new_embeddings): method forward (line 903) | def forward( class GPTSanJapaneseForConditionalGeneration (line 1113) | class GPTSanJapaneseForConditionalGeneration(GPTSanJapanesePreTrainedMod... method __init__ (line 1116) | def __init__(self, config: GPTSanJapaneseConfig): method forward (line 1125) | def forward( method prepare_inputs_for_generation (line 1282) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1312) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method resize_token_embeddings (line 1316) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1322) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_input_embeddings (line 1331) | def get_input_embeddings(self): method set_input_embeddings (line 1334) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1338) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1342) | def get_output_embeddings(self): method _unpack_router_logits (line 1346) | def _unpack_router_logits(self, router_outputs): FILE: transformers/models/gptsan_japanese/tokenization_gptsan_japanese.py function load_vocab_and_emoji (line 58) | def load_vocab_and_emoji(vocab_file, emoji_file): class GPTSanJapaneseTokenizer (line 78) | class GPTSanJapaneseTokenizer(PreTrainedTokenizer): method __init__ (line 161) | def __init__( method vocab_size (line 200) | def vocab_size(self): method get_vocab (line 205) | def get_vocab(self): method _tokenize (line 209) | def _tokenize(self, text): method _convert_token_to_id (line 213) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 218) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 222) | def convert_tokens_to_string(self, tokens): method _build_conversation_input_ids (line 262) | def _build_conversation_input_ids(self, conversation: "Conversation") ... method save_vocabulary (line 273) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_token_type_ids_from_sequences (line 303) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 339) | def prepare_for_tokenization(self, text, prefix_text=None, add_sep_tok... method _batch_encode_plus (line 351) | def _batch_encode_plus( class SubWordJapaneseTokenizer (line 400) | class SubWordJapaneseTokenizer(object): method __init__ (line 429) | def __init__(self, vocab, ids_to_tokens, emoji): method __len__ (line 451) | def __len__(self): method clean_text (line 455) | def clean_text(self, content): method tokenize (line 468) | def tokenize(self, text, clean=False): method convert_id_to_token (line 535) | def convert_id_to_token(self, index): FILE: transformers/models/graphormer/collating_graphormer.py function convert_to_single_emb (line 19) | def convert_to_single_emb(x, offset: int = 512): function preprocess_item (line 26) | def preprocess_item(item, keep_features=True): class GraphormerDataCollator (line 73) | class GraphormerDataCollator: method __init__ (line 74) | def __init__(self, spatial_pos_max=20, on_the_fly_processing=False): method __call__ (line 81) | def __call__(self, features: List[dict]) -> Dict[str, Any]: FILE: transformers/models/graphormer/configuration_graphormer.py class GraphormerConfig (line 30) | class GraphormerConfig(PretrainedConfig): method __init__ (line 133) | def __init__( FILE: transformers/models/graphormer/modeling_graphormer.py function quant_noise (line 47) | def quant_noise(module: nn.Module, p: float, block_size: int): class LayerDropModuleList (line 139) | class LayerDropModuleList(nn.ModuleList): method __init__ (line 166) | def __init__(self, p: float, modules: Optional[Iterable[nn.Module]] = ... method __iter__ (line 170) | def __iter__(self) -> Iterator[nn.Module]: class GraphormerGraphNodeFeature (line 177) | class GraphormerGraphNodeFeature(nn.Module): method __init__ (line 182) | def __init__(self, config: GraphormerConfig): method forward (line 197) | def forward( class GraphormerGraphAttnBias (line 218) | class GraphormerGraphAttnBias(nn.Module): method __init__ (line 223) | def __init__(self, config: GraphormerConfig): method forward (line 243) | def forward( class GraphormerMultiheadAttention (line 300) | class GraphormerMultiheadAttention(nn.Module): method __init__ (line 306) | def __init__(self, config: GraphormerConfig): method reset_parameters (line 351) | def reset_parameters(self): method forward (line 367) | def forward( method apply_sparse_mask (line 486) | def apply_sparse_mask(self, attn_weights: torch.Tensor, tgt_len: int, ... class GraphormerGraphEncoderLayer (line 490) | class GraphormerGraphEncoderLayer(nn.Module): method __init__ (line 491) | def __init__(self, config: GraphormerConfig) -> None: method build_fc (line 529) | def build_fc( method forward (line 534) | def forward( class GraphormerGraphEncoder (line 577) | class GraphormerGraphEncoder(nn.Module): method __init__ (line 578) | def __init__(self, config: GraphormerConfig): method forward (line 625) | def forward( class GraphormerDecoderHead (line 694) | class GraphormerDecoderHead(nn.Module): method __init__ (line 695) | def __init__(self, embedding_dim: int, num_classes: int): method forward (line 702) | def forward(self, input_nodes: torch.Tensor, **unused) -> torch.Tensor: class GraphormerPreTrainedModel (line 708) | class GraphormerPreTrainedModel(PreTrainedModel): method normal_ (line 721) | def normal_(self, data: torch.Tensor): method init_graphormer_params (line 726) | def init_graphormer_params(self, module: Union[nn.Linear, nn.Embedding... method _init_weights (line 743) | def _init_weights( method _set_gradient_checkpointing (line 777) | def _set_gradient_checkpointing(self, module, value=False): class GraphormerModel (line 782) | class GraphormerModel(GraphormerPreTrainedModel): method __init__ (line 790) | def __init__(self, config: GraphormerConfig): method reset_output_layer_parameters (line 808) | def reset_output_layer_parameters(self): method forward (line 811) | def forward( method max_nodes (line 848) | def max_nodes(self): class GraphormerForGraphClassification (line 853) | class GraphormerForGraphClassification(GraphormerPreTrainedModel): method __init__ (line 865) | def __init__(self, config: GraphormerConfig): method forward (line 876) | def forward( FILE: transformers/models/groupvit/configuration_groupvit.py class GroupViTTextConfig (line 39) | class GroupViTTextConfig(PretrainedConfig): method __init__ (line 94) | def __init__( method from_pretrained (line 129) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GroupViTVisionConfig (line 145) | class GroupViTVisionConfig(PretrainedConfig): method __init__ (line 203) | def __init__( method from_pretrained (line 252) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class GroupViTConfig (line 268) | class GroupViTConfig(PretrainedConfig): method __init__ (line 297) | def __init__( method from_text_vision_configs (line 395) | def from_text_vision_configs(cls, text_config: GroupViTTextConfig, vis... method to_dict (line 406) | def to_dict(self): class GroupViTOnnxConfig (line 420) | class GroupViTOnnxConfig(OnnxConfig): method inputs (line 422) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 432) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 443) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 446) | def generate_dummy_inputs( method default_onnx_opset (line 462) | def default_onnx_opset(self) -> int: FILE: transformers/models/groupvit/convert_groupvit_nvlab_to_hf.py function rename_key (line 31) | def rename_key(name): function convert_state_dict (line 87) | def convert_state_dict(orig_state_dict, config): function prepare_img (line 150) | def prepare_img(): function convert_groupvit_checkpoint (line 157) | def convert_groupvit_checkpoint( FILE: transformers/models/groupvit/modeling_groupvit.py function _expand_mask (line 52) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 68) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function groupvit_loss (line 73) | def groupvit_loss(similarity: torch.Tensor) -> torch.Tensor: function hard_softmax (line 79) | def hard_softmax(logits: torch.Tensor, dim: int): function gumbel_softmax (line 89) | def gumbel_softmax(logits: torch.Tensor, tau: float = 1, hard: bool = Fa... function resize_attention_map (line 111) | def resize_attention_map(attentions, height, width, align_corners=False): function get_grouping_from_attentions (line 141) | def get_grouping_from_attentions(attentions, hw_shape): class GroupViTCrossAttentionLayer (line 170) | class GroupViTCrossAttentionLayer(nn.Module): method __init__ (line 171) | def __init__(self, config: GroupViTVisionConfig): method forward (line 178) | def forward(self, query, key): class GroupViTAssignAttention (line 186) | class GroupViTAssignAttention(nn.Module): method __init__ (line 187) | def __init__(self, config: GroupViTVisionConfig): method get_attn (line 197) | def get_attn(self, attn, gumbel=True, hard=True): method forward (line 208) | def forward(self, query, key): class GroupViTTokenAssign (line 234) | class GroupViTTokenAssign(nn.Module): method __init__ (line 235) | def __init__(self, config: GroupViTVisionConfig, num_group_token, num_... method project_group_token (line 256) | def project_group_token(self, group_tokens): method forward (line 269) | def forward(self, image_tokens, group_tokens): class GroupViTModelOutput (line 290) | class GroupViTModelOutput(ModelOutput): method to_tuple (line 333) | def to_tuple(self) -> Tuple[Any]: class GroupViTPatchEmbeddings (line 340) | class GroupViTPatchEmbeddings(nn.Module): method __init__ (line 345) | def __init__( method forward (line 362) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class GroupViTVisionEmbeddings (line 374) | class GroupViTVisionEmbeddings(nn.Module): method __init__ (line 375) | def __init__(self, config: GroupViTVisionConfig): method interpolate_pos_encoding (line 390) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 424) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class GroupViTTextEmbeddings (line 444) | class GroupViTTextEmbeddings(nn.Module): method __init__ (line 445) | def __init__(self, config: GroupViTTextConfig): method forward (line 455) | def forward( class GroupViTStage (line 475) | class GroupViTStage(nn.Module): method __init__ (line 478) | def __init__( method with_group_token (line 514) | def with_group_token(self): method split_x (line 517) | def split_x(self, x): method concat_x (line 523) | def concat_x(self, x: torch.Tensor, group_token: Optional[torch.Tensor... method forward (line 528) | def forward( class GroupViTMLP (line 570) | class GroupViTMLP(nn.Module): method __init__ (line 571) | def __init__( method forward (line 587) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class GroupViTMixerMLP (line 594) | class GroupViTMixerMLP(GroupViTMLP): method forward (line 595) | def forward(self, x): class GroupViTAttention (line 600) | class GroupViTAttention(nn.Module): method __init__ (line 603) | def __init__(self, config): method _shape (line 622) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 625) | def forward( class GroupViTEncoderLayer (line 711) | class GroupViTEncoderLayer(nn.Module): method __init__ (line 712) | def __init__(self, config: GroupViTConfig): method forward (line 720) | def forward( class GroupViTPreTrainedModel (line 761) | class GroupViTPreTrainedModel(PreTrainedModel): method _init_weights (line 772) | def _init_weights(self, module): method _set_gradient_checkpointing (line 807) | def _set_gradient_checkpointing(self, module, value=False): class GroupViTVisionEncoder (line 908) | class GroupViTVisionEncoder(nn.Module): method __init__ (line 909) | def __init__(self, config: GroupViTVisionConfig) -> None: method forward (line 926) | def forward( class GroupViTTextEncoder (line 966) | class GroupViTTextEncoder(nn.Module): method __init__ (line 975) | def __init__(self, config: GroupViTTextConfig): method forward (line 981) | def forward( function _make_causal_mask (line 1070) | def _make_causal_mask( class GroupViTTextTransformer (line 1088) | class GroupViTTextTransformer(nn.Module): method __init__ (line 1089) | def __init__(self, config: GroupViTTextConfig): method forward (line 1099) | def forward( class GroupViTTextModel (line 1165) | class GroupViTTextModel(GroupViTPreTrainedModel): method __init__ (line 1168) | def __init__(self, config: GroupViTTextConfig): method get_input_embeddings (line 1174) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1177) | def set_input_embeddings(self, value): method forward (line 1182) | def forward( class GroupViTVisionTransformer (line 1218) | class GroupViTVisionTransformer(nn.Module): method __init__ (line 1219) | def __init__(self, config: GroupViTVisionConfig): method forward (line 1230) | def forward( class GroupViTVisionModel (line 1276) | class GroupViTVisionModel(GroupViTPreTrainedModel): method __init__ (line 1280) | def __init__(self, config: GroupViTVisionConfig): method get_input_embeddings (line 1286) | def get_input_embeddings(self) -> GroupViTPatchEmbeddings: method forward (line 1291) | def forward( class GroupViTModel (line 1329) | class GroupViTModel(GroupViTPreTrainedModel): method __init__ (line 1332) | def __init__(self, config: GroupViTConfig): method get_text_features (line 1376) | def get_text_features( method get_image_features (line 1423) | def get_image_features( method forward (line 1473) | def forward( FILE: transformers/models/groupvit/modeling_tf_groupvit.py function _expand_mask (line 78) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): function contrastive_loss (line 93) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function groupvit_loss (line 102) | def groupvit_loss(similarity: tf.Tensor) -> tf.Tensor: function hard_softmax (line 108) | def hard_softmax(logits: tf.Tensor, dim: int) -> tf.Tensor: function gumbel_softmax (line 125) | def gumbel_softmax(logits: tf.Tensor, tau: float = 1, hard: bool = False... function resize_attention_map (line 150) | def resize_attention_map(attentions: tf.Tensor, height: int, width: int,... function get_grouping_from_attentions (line 188) | def get_grouping_from_attentions(attentions: Tuple[tf.Tensor], hw_shape:... class TFGroupViTModelOutput (line 217) | class TFGroupViTModelOutput(ModelOutput): method to_tuple (line 260) | def to_tuple(self) -> Tuple[Any]: class TFGroupViTCrossAttentionLayer (line 267) | class TFGroupViTCrossAttentionLayer(tf.keras.layers.Layer): method __init__ (line 268) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method call (line 275) | def call(self, query: tf.Tensor, key: tf.Tensor, training: bool = Fals... class TFGroupViTAssignAttention (line 283) | class TFGroupViTAssignAttention(tf.keras.layers.Layer): method __init__ (line 284) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method get_attn (line 294) | def get_attn(self, attn: tf.Tensor, gumbel: bool = True, hard: bool = ... method call (line 305) | def call(self, query: tf.Tensor, key: tf.Tensor, training: bool = False): class TFGroupViTTokenAssign (line 331) | class TFGroupViTTokenAssign(tf.keras.layers.Layer): method __init__ (line 332) | def __init__(self, config: GroupViTVisionConfig, num_group_token: int,... method project_group_token (line 357) | def project_group_token(self, group_tokens: tf.Tensor) -> tf.Tensor: method call (line 370) | def call(self, image_tokens: tf.Tensor, group_tokens: tf.Tensor, train... class TFGroupViTPatchEmbeddings (line 391) | class TFGroupViTPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 398) | def __init__(self, config: GroupViTConfig, **kwargs): method call (line 426) | def call( class TFGroupViTVisionEmbeddings (line 462) | class TFGroupViTVisionEmbeddings(tf.keras.layers.Layer): method __init__ (line 468) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method build (line 476) | def build(self, input_shape: tf.TensorShape): method interpolate_pos_encoding (line 487) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method call (line 514) | def call( class TFGroupViTTextEmbeddings (line 533) | class TFGroupViTTextEmbeddings(tf.keras.layers.Layer): method __init__ (line 534) | def __init__(self, config: GroupViTTextConfig, **kwargs): method build (line 541) | def build(self, input_shape: tf.TensorShape = None): method call (line 560) | def call( class TFGroupViTStage (line 591) | class TFGroupViTStage(tf.keras.layers.Layer): method __init__ (line 594) | def __init__( method build (line 629) | def build(self, input_shape: tf.TensorShape): method with_group_token (line 642) | def with_group_token(self): method split_x (line 645) | def split_x(self, x: tf.Tensor) -> tf.Tensor: method concat_x (line 651) | def concat_x(self, x: tf.Tensor, group_token: tf.Tensor | None = None)... method call (line 656) | def call( class TFGroupViTMLP (line 706) | class TFGroupViTMLP(tf.keras.layers.Layer): method __init__ (line 707) | def __init__( method call (line 724) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFGroupViTMixerMLP (line 731) | class TFGroupViTMixerMLP(TFGroupViTMLP): method call (line 732) | def call(self, x, training: bool = False): class TFGroupViTAttention (line 738) | class TFGroupViTAttention(tf.keras.layers.Layer): method __init__ (line 741) | def __init__(self, config: GroupViTConfig, **kwargs): method transpose_for_scores (line 776) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 783) | def call( class TFGroupViTEncoderLayer (line 846) | class TFGroupViTEncoderLayer(tf.keras.layers.Layer): method __init__ (line 847) | def __init__(self, config: GroupViTConfig, **kwargs): method call (line 856) | def call( class TFGroupViTTextEncoder (line 899) | class TFGroupViTTextEncoder(tf.keras.layers.Layer): method __init__ (line 900) | def __init__(self, config: GroupViTTextConfig, **kwargs): method call (line 905) | def call( class TFGroupViTVisionEncoder (line 943) | class TFGroupViTVisionEncoder(tf.keras.layers.Layer): method __init__ (line 944) | def __init__(self, config: GroupViTVisionConfig, **kwargs) -> None: method call (line 959) | def call( class TFGroupViTTextTransformer (line 995) | class TFGroupViTTextTransformer(tf.keras.layers.Layer): method __init__ (line 996) | def __init__(self, config: GroupViTTextConfig, **kwargs): method call (line 1005) | def call( method _build_causal_attention_mask (line 1060) | def _build_causal_attention_mask(self, batch_size, seq_length, dtype=t... class TFGroupViTVisionTransformer (line 1080) | class TFGroupViTVisionTransformer(tf.keras.layers.Layer): method __init__ (line 1081) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method call (line 1088) | def call( class TFGroupViTTextMainLayer (line 1124) | class TFGroupViTTextMainLayer(tf.keras.layers.Layer): method __init__ (line 1127) | def __init__(self, config: GroupViTTextConfig, **kwargs): method get_input_embeddings (line 1132) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 1135) | def set_input_embeddings(self, value: tf.Variable): method call (line 1140) | def call( class TFGroupViTVisionMainLayer (line 1173) | class TFGroupViTVisionMainLayer(tf.keras.layers.Layer): method __init__ (line 1176) | def __init__(self, config: GroupViTVisionConfig, **kwargs): method get_input_embeddings (line 1181) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method call (line 1185) | def call( class TFGroupViTMainLayer (line 1209) | class TFGroupViTMainLayer(tf.keras.layers.Layer): method __init__ (line 1212) | def __init__(self, config: GroupViTConfig, **kwargs): method build (line 1253) | def build(self, input_shape: tf.TensorShape): method get_text_features (line 1264) | def get_text_features( method get_image_features (line 1300) | def get_image_features( method call (line 1327) | def call( class TFGroupViTPreTrainedModel (line 1454) | class TFGroupViTPreTrainedModel(TFPreTrainedModel): class TFGroupViTTextModel (line 1601) | class TFGroupViTTextModel(TFGroupViTPreTrainedModel): method __init__ (line 1605) | def __init__(self, config: GroupViTTextConfig, *inputs, **kwargs): method call (line 1613) | def call( class TFGroupViTVisionModel (line 1654) | class TFGroupViTVisionModel(TFGroupViTPreTrainedModel): method __init__ (line 1658) | def __init__(self, config: GroupViTVisionConfig, *inputs, **kwargs): method call (line 1666) | def call( class TFGroupViTModel (line 1709) | class TFGroupViTModel(TFGroupViTPreTrainedModel): method __init__ (line 1712) | def __init__(self, config: GroupViTConfig, *inputs, **kwargs): method get_text_features (line 1719) | def get_text_features( method get_image_features (line 1760) | def get_image_features( method call (line 1804) | def call( method serving_output (line 1858) | def serving_output(self, output: TFGroupViTModelOutput) -> TFGroupViTM... FILE: transformers/models/herbert/tokenization_herbert.py function get_pairs (line 46) | def get_pairs(word): function replace_unicode_punct (line 60) | def replace_unicode_punct(text): function remove_non_printing_char (line 104) | def remove_non_printing_char(text): function whitespace_tokenize (line 118) | def whitespace_tokenize(text): class BasicTokenizer (line 128) | class BasicTokenizer(object): method __init__ (line 148) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 156) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 193) | def _run_strip_accents(self, text): method _run_split_on_punc (line 204) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 226) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 239) | def _is_chinese_char(self, cp): method _clean_text (line 263) | def _clean_text(self, text): class HerbertTokenizer (line 277) | class HerbertTokenizer(PreTrainedTokenizer): method __init__ (line 297) | def __init__( method do_lower_case (line 383) | def do_lower_case(self): method moses_punct_norm (line 387) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 396) | def moses_tokenize(self, text, lang): method moses_pipeline (line 405) | def moses_pipeline(self, text, lang): method ja_tokenize (line 412) | def ja_tokenize(self, text): method vocab_size (line 435) | def vocab_size(self): method get_vocab (line 439) | def get_vocab(self): method bpe (line 443) | def bpe(self, token): method _tokenize (line 487) | def _tokenize(self, text): method _convert_token_to_id (line 498) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 503) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 508) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 514) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 542) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 571) | def create_token_type_ids_from_sequences( method save_vocabulary (line 601) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 630) | def __getstate__(self): method __setstate__ (line 636) | def __setstate__(self, d): FILE: transformers/models/herbert/tokenization_herbert_fast.py class HerbertTokenizerFast (line 40) | class HerbertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 65) | def __init__( method build_inputs_with_special_tokens (line 89) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 116) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 143) | def create_token_type_ids_from_sequences( method save_vocabulary (line 171) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/hubert/configuration_hubert.py class HubertConfig (line 32) | class HubertConfig(PretrainedConfig): method __init__ (line 162) | def __init__( method inputs_to_logits_ratio (line 259) | def inputs_to_logits_ratio(self): FILE: transformers/models/hubert/convert_distilhubert_original_s3prl_checkpoint_to_pytorch.py function set_recursively (line 45) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 73) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 117) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 157) | def convert_config(model): function convert_hubert_checkpoint (line 191) | def convert_hubert_checkpoint(pytorch_dump_folder_path, config_path=None): FILE: transformers/models/hubert/convert_hubert_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 58) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 86) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 130) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_hubert_checkpoint (line 171) | def convert_hubert_checkpoint( FILE: transformers/models/hubert/convert_hubert_original_s3prl_checkpoint_to_pytorch.py function convert_s3prl_checkpoint (line 32) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: transformers/models/hubert/modeling_hubert.py function _compute_mask_indices (line 68) | def _compute_mask_indices( class HubertNoLayerNormConvLayer (line 188) | class HubertNoLayerNormConvLayer(nn.Module): method __init__ (line 189) | def __init__(self, config, layer_id=0): method forward (line 203) | def forward(self, hidden_states): class HubertLayerNormConvLayer (line 210) | class HubertLayerNormConvLayer(nn.Module): method __init__ (line 211) | def __init__(self, config, layer_id=0): method forward (line 226) | def forward(self, hidden_states): class HubertGroupNormConvLayer (line 238) | class HubertGroupNormConvLayer(nn.Module): method __init__ (line 239) | def __init__(self, config, layer_id=0): method forward (line 255) | def forward(self, hidden_states): class HubertPositionalConvEmbedding (line 263) | class HubertPositionalConvEmbedding(nn.Module): method __init__ (line 264) | def __init__(self, config): method forward (line 291) | def forward(self, hidden_states): class HubertSamePadLayer (line 303) | class HubertSamePadLayer(nn.Module): method __init__ (line 304) | def __init__(self, num_conv_pos_embeddings): method forward (line 308) | def forward(self, hidden_states): class HubertFeatureEncoder (line 315) | class HubertFeatureEncoder(nn.Module): method __init__ (line 318) | def __init__(self, config): method _freeze_parameters (line 335) | def _freeze_parameters(self): method forward (line 340) | def forward(self, input_values): class HubertFeatureExtractor (line 366) | class HubertFeatureExtractor(HubertFeatureEncoder): method __init__ (line 367) | def __init__(self, config): class HubertFeatureProjection (line 377) | class HubertFeatureProjection(nn.Module): method __init__ (line 378) | def __init__(self, config): method forward (line 386) | def forward(self, hidden_states): class HubertAttention (line 396) | class HubertAttention(nn.Module): method __init__ (line 399) | def __init__( method _shape (line 426) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 429) | def forward( class HubertFeedForward (line 551) | class HubertFeedForward(nn.Module): method __init__ (line 552) | def __init__(self, config): method forward (line 565) | def forward(self, hidden_states): class HubertEncoderLayer (line 576) | class HubertEncoderLayer(nn.Module): method __init__ (line 577) | def __init__(self, config): method forward (line 590) | def forward(self, hidden_states, attention_mask=None, output_attention... class HubertAttnAdapterLayer (line 611) | class HubertAttnAdapterLayer(nn.Module): method __init__ (line 612) | def __init__(self, config): method forward (line 626) | def forward(self, hidden_states: torch.FloatTensor): class HubertEncoderLayerStableLayerNorm (line 637) | class HubertEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 638) | def __init__(self, config): method forward (line 656) | def forward( class HubertEncoder (line 683) | class HubertEncoder(nn.Module): method __init__ (line 684) | def __init__(self, config): method forward (line 693) | def forward( class HubertEncoderStableLayerNorm (line 771) | class HubertEncoderStableLayerNorm(nn.Module): method __init__ (line 772) | def __init__(self, config): method forward (line 783) | def forward( class HubertPreTrainedModel (line 862) | class HubertPreTrainedModel(PreTrainedModel): method _init_weights (line 874) | def _init_weights(self, module): method _set_gradient_checkpointing (line 899) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 903) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 918) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class HubertModel (line 992) | class HubertModel(HubertPreTrainedModel): method __init__ (line 993) | def __init__(self, config: HubertConfig): method _mask_hidden_states (line 1011) | def _mask_hidden_states( method forward (line 1059) | def forward( class HubertForCTC (line 1136) | class HubertForCTC(HubertPreTrainedModel): method __init__ (line 1137) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1165) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1177) | def freeze_feature_encoder(self): method forward (line 1192) | def forward( class HubertForSequenceClassification (line 1272) | class HubertForSequenceClassification(HubertPreTrainedModel): method __init__ (line 1273) | def __init__(self, config): method freeze_feature_extractor (line 1290) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1302) | def freeze_feature_encoder(self): method freeze_base_model (line 1309) | def freeze_base_model(self): method forward (line 1326) | def forward( FILE: transformers/models/hubert/modeling_tf_hubert.py function _sample_without_replacement (line 56) | def _sample_without_replacement(distribution, num_samples): function _scatter_values_on_batch_indices (line 67) | def _scatter_values_on_batch_indices(values, batch_indices, output_shape): function _compute_mask_indices (line 83) | def _compute_mask_indices( function _expand_mask (line 158) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFHubertGroupNorm (line 172) | class TFHubertGroupNorm(tf.keras.layers.Layer): method __init__ (line 177) | def __init__( method build (line 207) | def build(self, input_shape): method call (line 218) | def call(self, inputs): method get_config (line 234) | def get_config(self): method compute_output_shape (line 251) | def compute_output_shape(self, input_shape): method _reshape_into_groups (line 254) | def _reshape_into_groups(self, inputs, input_shape, tensor_input_shape): method _apply_normalization (line 266) | def _apply_normalization(self, reshaped_inputs, input_shape): method _get_reshaped_weights (line 289) | def _get_reshaped_weights(self, input_shape): method _check_if_input_shape_is_none (line 300) | def _check_if_input_shape_is_none(self, input_shape): method _set_number_of_groups_for_instance_norm (line 311) | def _set_number_of_groups_for_instance_norm(self, input_shape): method _check_size_of_dimensions (line 317) | def _check_size_of_dimensions(self, input_shape): method _check_axis (line 337) | def _check_axis(self): method _create_input_spec (line 343) | def _create_input_spec(self, input_shape): method _add_gamma_weight (line 347) | def _add_gamma_weight(self, input_shape): method _add_beta_weight (line 362) | def _add_beta_weight(self, input_shape): method _create_broadcast_shape (line 377) | def _create_broadcast_shape(self, input_shape): class TFHubertWeightNormConv1D (line 389) | class TFHubertWeightNormConv1D(tf.keras.layers.Conv1D): method __init__ (line 392) | def __init__(self, filters, kernel_size, groups, explicit_padding, **k... method _init_norm (line 407) | def _init_norm(self): method _normalize_kernel (line 412) | def _normalize_kernel(self): method build (line 417) | def build(self, input_shape): method call (line 436) | def call(self, inputs): class TFHubertNoLayerNormConvLayer (line 450) | class TFHubertNoLayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 451) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 465) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertLayerNormConvLayer (line 472) | class TFHubertLayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 473) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 488) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertGroupNormConvLayer (line 496) | class TFHubertGroupNormConvLayer(tf.keras.layers.Layer): method __init__ (line 497) | def __init__(self, config: HubertConfig, layer_id: int = 0, **kwargs: ... method call (line 512) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertPositionalConvEmbedding (line 520) | class TFHubertPositionalConvEmbedding(tf.keras.layers.Layer): method __init__ (line 521) | def __init__(self, config: HubertConfig, **kwargs: Any) -> None: method call (line 533) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFHubertSamePadLayer (line 541) | class TFHubertSamePadLayer(tf.keras.layers.Layer): method __init__ (line 542) | def __init__(self, num_conv_pos_embeddings, **kwargs): method call (line 546) | def call(self, hidden_states): class TFHubertFeatureEncoder (line 552) | class TFHubertFeatureEncoder(tf.keras.layers.Layer): method __init__ (line 553) | def __init__(self, config: HubertConfig, **kwargs: Any) -> None: method call (line 572) | def call(self, input_values): class TFHubertFeatureExtractor (line 579) | class TFHubertFeatureExtractor(TFHubertFeatureEncoder): method __init__ (line 580) | def __init__(self, config, **kwargs): class TFHubertFeatureProjection (line 590) | class TFHubertFeatureProjection(tf.keras.layers.Layer): method __init__ (line 591) | def __init__(self, config: HubertConfig, **kwargs): method call (line 603) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFHubertAttention (line 611) | class TFHubertAttention(tf.keras.layers.Layer): method __init__ (line 614) | def __init__( method _shape (line 642) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 645) | def call( class TFHubertFeedForward (line 765) | class TFHubertFeedForward(tf.keras.layers.Layer): method __init__ (line 766) | def __init__(self, config: HubertConfig, **kwargs): method call (line 787) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFHubertEncoderLayer (line 798) | class TFHubertEncoderLayer(tf.keras.layers.Layer): method __init__ (line 799) | def __init__(self, config: HubertConfig, **kwargs): method call (line 815) | def call( class TFHubertEncoderLayerStableLayerNorm (line 842) | class TFHubertEncoderLayerStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 843) | def __init__(self, config: HubertConfig, **kwargs): method call (line 859) | def call( class TFHubertEncoder (line 884) | class TFHubertEncoder(tf.keras.layers.Layer): method __init__ (line 885) | def __init__(self, config: HubertConfig, **kwargs): method call (line 893) | def call( class TFHubertEncoderStableLayerNorm (line 950) | class TFHubertEncoderStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 951) | def __init__(self, config: HubertConfig, **kwargs): method call (line 961) | def call( class TFHubertMainLayer (line 1018) | class TFHubertMainLayer(tf.keras.layers.Layer): method __init__ (line 1021) | def __init__(self, config: HubertConfig, **kwargs): method build (line 1032) | def build(self, input_shape: tf.TensorShape): method _get_feat_extract_output_lengths (line 1039) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _mask_hidden_states (line 1054) | def _mask_hidden_states(self, hidden_states: tf.Tensor, mask_time_indi... method call (line 1099) | def call( class TFHubertPreTrainedModel (line 1149) | class TFHubertPreTrainedModel(TFPreTrainedModel): method input_signature (line 1160) | def input_signature(self): method __init__ (line 1167) | def __init__(self, config, *inputs, **kwargs): class TFHubertModel (line 1277) | class TFHubertModel(TFHubertPreTrainedModel): method __init__ (line 1278) | def __init__(self, config: HubertConfig, *inputs, **kwargs): method call (line 1286) | def call( class TFHubertForCTC (line 1351) | class TFHubertForCTC(TFHubertPreTrainedModel): method __init__ (line 1352) | def __init__(self, config: HubertConfig, *inputs, **kwargs): method freeze_feature_extractor (line 1359) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1371) | def freeze_feature_encoder(self): method call (line 1381) | def call( FILE: transformers/models/ibert/configuration_ibert.py class IBertConfig (line 37) | class IBertConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class IBertOnnxConfig (line 134) | class IBertOnnxConfig(OnnxConfig): method inputs (line 136) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/ibert/modeling_ibert.py class IBertEmbeddings (line 57) | class IBertEmbeddings(nn.Module): method __init__ (line 62) | def __init__(self, config): method forward (line 112) | def forward( method create_position_ids_from_inputs_embeds (line 159) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class IBertSelfAttention (line 177) | class IBertSelfAttention(nn.Module): method __init__ (line 178) | def __init__(self, config): method transpose_for_scores (line 236) | def transpose_for_scores(self, x): method forward (line 241) | def forward( class IBertSelfOutput (line 319) | class IBertSelfOutput(nn.Module): method __init__ (line 320) | def __init__(self, config): method forward (line 349) | def forward(self, hidden_states, hidden_states_scaling_factor, input_t... class IBertAttention (line 366) | class IBertAttention(nn.Module): method __init__ (line 367) | def __init__(self, config): method prune_heads (line 374) | def prune_heads(self, heads): method forward (line 392) | def forward( class IBertIntermediate (line 415) | class IBertIntermediate(nn.Module): method __init__ (line 416) | def __init__(self, config): method forward (line 436) | def forward(self, hidden_states, hidden_states_scaling_factor): class IBertOutput (line 449) | class IBertOutput(nn.Module): method __init__ (line 450) | def __init__(self, config): method forward (line 479) | def forward(self, hidden_states, hidden_states_scaling_factor, input_t... class IBertLayer (line 496) | class IBertLayer(nn.Module): method __init__ (line 497) | def __init__(self, config): method forward (line 510) | def forward( method feed_forward_chunk (line 537) | def feed_forward_chunk(self, attention_output, attention_output_scalin... class IBertEncoder (line 554) | class IBertEncoder(nn.Module): method __init__ (line 555) | def __init__(self, config): method forward (line 561) | def forward( class IBertPooler (line 618) | class IBertPooler(nn.Module): method __init__ (line 619) | def __init__(self, config): method forward (line 625) | def forward(self, hidden_states): class IBertPreTrainedModel (line 634) | class IBertPreTrainedModel(PreTrainedModel): method _init_weights (line 643) | def _init_weights(self, module): method resize_token_embeddings (line 659) | def resize_token_embeddings(self, new_num_tokens=None): class IBertModel (line 733) | class IBertModel(IBertPreTrainedModel): method __init__ (line 745) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 758) | def get_input_embeddings(self): method set_input_embeddings (line 761) | def set_input_embeddings(self, value): method _prune_heads (line 764) | def _prune_heads(self, heads_to_prune): method forward (line 778) | def forward( class IBertForMaskedLM (line 856) | class IBertForMaskedLM(IBertPreTrainedModel): method __init__ (line 860) | def __init__(self, config): method get_output_embeddings (line 869) | def get_output_embeddings(self): method set_output_embeddings (line 872) | def set_output_embeddings(self, new_embeddings): method forward (line 882) | def forward( class IBertLMHead (line 936) | class IBertLMHead(nn.Module): method __init__ (line 939) | def __init__(self, config): method forward (line 948) | def forward(self, features, **kwargs): method _tie_weights (line 958) | def _tie_weights(self): class IBertForSequenceClassification (line 970) | class IBertForSequenceClassification(IBertPreTrainedModel): method __init__ (line 973) | def __init__(self, config): method forward (line 989) | def forward( class IBertForMultipleChoice (line 1065) | class IBertForMultipleChoice(IBertPreTrainedModel): method __init__ (line 1068) | def __init__(self, config): method forward (line 1084) | def forward( class IBertForTokenClassification (line 1157) | class IBertForTokenClassification(IBertPreTrainedModel): method __init__ (line 1161) | def __init__(self, config): method forward (line 1178) | def forward( class IBertClassificationHead (line 1231) | class IBertClassificationHead(nn.Module): method __init__ (line 1234) | def __init__(self, config): method forward (line 1240) | def forward(self, features, **kwargs): class IBertForQuestionAnswering (line 1257) | class IBertForQuestionAnswering(IBertPreTrainedModel): method __init__ (line 1261) | def __init__(self, config): method forward (line 1277) | def forward( function create_position_ids_from_input_ids (line 1352) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/ibert/quant_modules.py class QuantEmbedding (line 31) | class QuantEmbedding(nn.Module): method __init__ (line 44) | def __init__( method forward (line 77) | def forward(self, x, positions=None, incremental_state=None): class QuantAct (line 114) | class QuantAct(nn.Module): method __init__ (line 131) | def __init__(self, activation_bit, act_range_momentum=0.95, per_channe... method __repr__ (line 150) | def __repr__(self): method forward (line 157) | def forward( class QuantLinear (line 220) | class QuantLinear(nn.Module): method __init__ (line 235) | def __init__( method __repr__ (line 257) | def __repr__(self): method forward (line 262) | def forward(self, x, prev_act_scaling_factor=None): class IntGELU (line 300) | class IntGELU(nn.Module): method __init__ (line 311) | def __init__(self, quant_mode=True, force_dequant="none"): method int_erf (line 327) | def int_erf(self, x_int, scaling_factor): method forward (line 342) | def forward(self, x, scaling_factor=None): class IntSoftmax (line 357) | class IntSoftmax(nn.Module): method __init__ (line 370) | def __init__(self, output_bit, quant_mode=False, force_dequant="none"): method int_polynomial (line 387) | def int_polynomial(self, x_int, scaling_factor): method int_exp (line 395) | def int_exp(self, x_int, scaling_factor): method forward (line 407) | def forward(self, x, scaling_factor): class IntLayerNorm (line 428) | class IntLayerNorm(nn.Module): method __init__ (line 441) | def __init__(self, normalized_shape, eps, output_bit=8, quant_mode=Fal... method set_shift (line 460) | def set_shift(self, y_int): method overflow_fallback (line 469) | def overflow_fallback(self, y_int): method forward (line 480) | def forward(self, x, scaling_factor=None): function get_percentile_min_max (line 529) | def get_percentile_min_max(input, lower_percentile, upper_percentile, ou... function linear_quantize (line 565) | def linear_quantize(input, scale, zero_point, inplace=False): function symmetric_linear_quantization_params (line 600) | def symmetric_linear_quantization_params(num_bits, saturation_min, satur... class SymmetricQuantFunction (line 632) | class SymmetricQuantFunction(Function): method forward (line 638) | def forward(ctx, x, k, percentile_mode, scale): method backward (line 664) | def backward(ctx, grad_output): class floor_ste (line 677) | class floor_ste(Function): method forward (line 683) | def forward(ctx, x): method backward (line 687) | def backward(ctx, grad_output): class round_ste (line 691) | class round_ste(Function): method forward (line 697) | def forward(ctx, x): method backward (line 701) | def backward(ctx, grad_output): function batch_frexp (line 705) | def batch_frexp(inputs, max_bit=31): class FixedPointMul (line 739) | class FixedPointMul(Function): method forward (line 763) | def forward( method backward (line 816) | def backward(ctx, grad_output): FILE: transformers/models/imagegpt/configuration_imagegpt.py class ImageGPTConfig (line 37) | class ImageGPTConfig(PretrainedConfig): method __init__ (line 110) | def __init__( class ImageGPTOnnxConfig (line 152) | class ImageGPTOnnxConfig(OnnxConfig): method inputs (line 154) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 161) | def generate_dummy_inputs( FILE: transformers/models/imagegpt/convert_imagegpt_original_tf2_to_pytorch.py function convert_imagegpt_checkpoint_to_pytorch (line 29) | def convert_imagegpt_checkpoint_to_pytorch(imagegpt_checkpoint_path, mod... FILE: transformers/models/imagegpt/feature_extraction_imagegpt.py class ImageGPTFeatureExtractor (line 26) | class ImageGPTFeatureExtractor(ImageGPTImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/imagegpt/image_processing_imagegpt.py function squared_euclidean_distance (line 41) | def squared_euclidean_distance(a, b): function color_quantize (line 50) | def color_quantize(x, clusters): class ImageGPTImageProcessor (line 56) | class ImageGPTImageProcessor(BaseImageProcessor): method __init__ (line 82) | def __init__( method resize (line 103) | def resize( method normalize (line 131) | def normalize( method preprocess (line 149) | def preprocess( FILE: transformers/models/imagegpt/modeling_imagegpt.py function load_tf_weights_in_imagegpt (line 53) | def load_tf_weights_in_imagegpt(model, config, imagegpt_checkpoint_path): class ImageGPTLayerNorm (line 161) | class ImageGPTLayerNorm(nn.Module): method __init__ (line 162) | def __init__(self, hidden_size: Tuple[int], eps: float = 1e-5): method forward (line 167) | def forward(self, tensor: torch.Tensor) -> tuple: class ImageGPTAttention (line 176) | class ImageGPTAttention(nn.Module): method __init__ (line 177) | def __init__(self, config, is_cross_attention: Optional[bool] = False,... method prune_heads (line 219) | def prune_heads(self, heads): method _attn (line 234) | def _attn(self, query, key, value, attention_mask=None, head_mask=None): method _upcast_and_reordered_attn (line 272) | def _upcast_and_reordered_attn(self, query, key, value, attention_mask... method _split_heads (line 324) | def _split_heads(self, tensor, num_heads, attn_head_size): method _merge_heads (line 332) | def _merge_heads(self, tensor, num_heads, attn_head_size): method forward (line 340) | def forward( class ImageGPTMLP (line 394) | class ImageGPTMLP(nn.Module): method __init__ (line 395) | def __init__(self, intermediate_size, config): method forward (line 403) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ImageGPTBlock (line 411) | class ImageGPTBlock(nn.Module): method __init__ (line 412) | def __init__(self, config, layer_idx=None): method forward (line 427) | def forward( class ImageGPTPreTrainedModel (line 486) | class ImageGPTPreTrainedModel(PreTrainedModel): method __init__ (line 498) | def __init__(self, *inputs, **kwargs): method _init_weights (line 501) | def _init_weights(self, module): method _set_gradient_checkpointing (line 527) | def _set_gradient_checkpointing(self, module, value=False): class ImageGPTModel (line 615) | class ImageGPTModel(ImageGPTPreTrainedModel): method __init__ (line 618) | def __init__(self, config: ImageGPTConfig): method get_input_embeddings (line 637) | def get_input_embeddings(self): method set_input_embeddings (line 640) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 643) | def _prune_heads(self, heads_to_prune): method forward (line 652) | def forward( class ImageGPTForCausalImageModeling (line 895) | class ImageGPTForCausalImageModeling(ImageGPTPreTrainedModel): method __init__ (line 898) | def __init__(self, config: ImageGPTConfig): method get_output_embeddings (line 909) | def get_output_embeddings(self): method set_output_embeddings (line 912) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 915) | def prepare_inputs_for_generation(self, input_ids: torch.Tensor, past_... method forward (line 945) | def forward( method _reorder_cache (line 1065) | def _reorder_cache( class ImageGPTForImageClassification (line 1086) | class ImageGPTForImageClassification(ImageGPTPreTrainedModel): method __init__ (line 1089) | def __init__(self, config: ImageGPTConfig): method forward (line 1100) | def forward( FILE: transformers/models/informer/configuration_informer.py class InformerConfig (line 33) | class InformerConfig(PretrainedConfig): method __init__ (line 143) | def __init__( method _number_of_features (line 245) | def _number_of_features(self) -> int: FILE: transformers/models/informer/modeling_informer.py class InformerFeatureEmbedder (line 50) | class InformerFeatureEmbedder(nn.Module): method __init__ (line 61) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 67) | def forward(self, features: torch.Tensor) -> torch.Tensor: class InformerStdScaler (line 85) | class InformerStdScaler(nn.Module): method __init__ (line 99) | def __init__(self, dim: int, keepdim: bool = False, minimum_scale: flo... method forward (line 108) | def forward(self, data: torch.Tensor, weights: torch.Tensor) -> Tuple[... class InformerMeanScaler (line 119) | class InformerMeanScaler(nn.Module): method __init__ (line 135) | def __init__( method forward (line 145) | def forward( class InformerNOPScaler (line 177) | class InformerNOPScaler(nn.Module): method __init__ (line 188) | def __init__(self, dim: int, keepdim: bool = False): method forward (line 193) | def forward( function weighted_average (line 202) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... function nll (line 227) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... function _make_causal_mask (line 235) | def _make_causal_mask( function _expand_mask (line 253) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class InformerSinusoidalPositionalEmbedding (line 268) | class InformerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 271) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 276) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 293) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class InformerValueEmbedding (line 303) | class InformerValueEmbedding(nn.Module): method __init__ (line 304) | def __init__(self, feature_size, d_model): method forward (line 308) | def forward(self, x): class InformerAttention (line 313) | class InformerAttention(nn.Module): method __init__ (line 316) | def __init__( method _shape (line 343) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 346) | def forward( class InformerProbSparseAttention (line 467) | class InformerProbSparseAttention(nn.Module): method __init__ (line 472) | def __init__( method _shape (line 501) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 504) | def forward( class InformerConvLayer (line 685) | class InformerConvLayer(nn.Module): method __init__ (line 686) | def __init__(self, c_in): method forward (line 699) | def forward(self, x): class InformerEncoderLayer (line 708) | class InformerEncoderLayer(nn.Module): method __init__ (line 709) | def __init__(self, config: InformerConfig): method forward (line 733) | def forward( class InformerDecoderLayer (line 784) | class InformerDecoderLayer(nn.Module): method __init__ (line 785) | def __init__(self, config: InformerConfig): method forward (line 820) | def forward( class InformerPreTrainedModel (line 910) | class InformerPreTrainedModel(PreTrainedModel): method _init_weights (line 916) | def _init_weights(self, module): method _set_gradient_checkpointing (line 927) | def _set_gradient_checkpointing(self, module, value=False): class InformerEncoder (line 1103) | class InformerEncoder(InformerPreTrainedModel): method __init__ (line 1112) | def __init__(self, config: InformerConfig): method forward (line 1139) | def forward( class InformerDecoder (line 1256) | class InformerDecoder(InformerPreTrainedModel): method __init__ (line 1264) | def __init__(self, config: InformerConfig): method _prepare_decoder_attention_mask (line 1282) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1305) | def forward( class InformerModel (line 1503) | class InformerModel(InformerPreTrainedModel): method __init__ (line 1504) | def __init__(self, config: InformerConfig): method _past_length (line 1528) | def _past_length(self) -> int: method get_lagged_subsequences (line 1531) | def get_lagged_subsequences( method create_network_inputs (line 1563) | def create_network_inputs( method get_encoder (line 1635) | def get_encoder(self): method get_decoder (line 1638) | def get_decoder(self): method forward (line 1643) | def forward( class InformerForPrediction (line 1765) | class InformerForPrediction(InformerPreTrainedModel): method __init__ (line 1766) | def __init__(self, config: InformerConfig): method output_params (line 1789) | def output_params(self, dec_output): method get_encoder (line 1792) | def get_encoder(self): method get_decoder (line 1795) | def get_decoder(self): method output_distribution (line 1799) | def output_distribution(self, params, loc=None, scale=None, trailing_n... method forward (line 1807) | def forward( method generate (line 1938) | def generate( FILE: transformers/models/jukebox/configuration_jukebox.py function full_dense_attention (line 118) | def full_dense_attention(layer): function raw_column_previous_row_attention (line 122) | def raw_column_previous_row_attention(layer): function large_separated_enc_dec_w_lyrics (line 126) | def large_separated_enc_dec_w_lyrics(layer): function enc_dec_with_lyrics (line 130) | def enc_dec_with_lyrics(layer): class JukeboxPriorConfig (line 144) | class JukeboxPriorConfig(PretrainedConfig): method __init__ (line 260) | def __init__( method from_pretrained (line 353) | def from_pretrained( method to_dict (line 370) | def to_dict(self): class JukeboxVQVAEConfig (line 383) | class JukeboxVQVAEConfig(PretrainedConfig): method __init__ (line 440) | def __init__( method from_pretrained (line 488) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class JukeboxConfig (line 504) | class JukeboxConfig(PretrainedConfig): method __init__ (line 562) | def __init__( method from_configs (line 609) | def from_configs(cls, prior_configs: List[JukeboxPriorConfig], vqvae_c... method to_dict (line 620) | def to_dict(self): FILE: transformers/models/jukebox/convert_jukebox.py function replace_key (line 50) | def replace_key(key): function fix_jukebox_keys (line 96) | def fix_jukebox_keys(state_dict, model_state_dict, key_prefix, mapping): function convert_openai_checkpoint (line 213) | def convert_openai_checkpoint(model_name=None, pytorch_dump_folder_path=... FILE: transformers/models/jukebox/modeling_jukebox.py function filter_logits (line 43) | def filter_logits(logits, top_k=0, top_p=0.0, filter_value=-float("Inf")): function get_relevant_lyric_tokens (line 81) | def get_relevant_lyric_tokens(full_tokens, max_n_lyric_tokens, total_len... function get_starts (line 115) | def get_starts(total_length, n_ctx, hop_length): function get_alignment (line 125) | def get_alignment(music_tokens, labels, prior, config): function save_temp_audio (line 182) | def save_temp_audio(fname, lvl, metas, aud): function get_mask (line 193) | def get_mask(mask, query_length, key_value_length, blocks, spread, devic... class JukeboxConv1D (line 220) | class JukeboxConv1D(nn.Module): method __init__ (line 221) | def __init__(self, input_width, output_width): method forward (line 230) | def forward(self, hidden_states): class JukeboxResConv1DBlock (line 241) | class JukeboxResConv1DBlock(nn.Module): method __init__ (line 242) | def __init__(self, config, conv_width, depth=1, res_scale=1.0): method forward (line 253) | def forward(self, hidden_states): class JukeboxResnet1D (line 262) | class JukeboxResnet1D(nn.Module): method __init__ (line 263) | def __init__(self, config, conv_width, n_depth, reverse_dilation=False): method forward (line 277) | def forward(self, hidden_states): class JukeboxEncoderConvBlock (line 283) | class JukeboxEncoderConvBlock(nn.Module): method __init__ (line 284) | def __init__(self, config, embed_dim, hidden_dim, depth, down_t, strid... method forward (line 296) | def forward(self, hidden_states): class JukeboxEncoder (line 303) | class JukeboxEncoder(nn.Module): method __init__ (line 304) | def __init__(self, config, width, depth, levels, downs_t, strides_t): method forward (line 317) | def forward(self, hidden_states): class JukeboxDecoderConvBock (line 329) | class JukeboxDecoderConvBock(nn.Module): method __init__ (line 330) | def __init__(self, config, embed_dim, hidden_dim, depth, down_t, strid... method forward (line 348) | def forward(self, hidden_states): class JukeboxDecoder (line 355) | class JukeboxDecoder(nn.Module): method __init__ (line 356) | def __init__(self, config, hidden_dim, depth, levels, downs_t, strides... method forward (line 367) | def forward(self, hidden_states, all_levels=True): class JukeboxBottleneckBlock (line 382) | class JukeboxBottleneckBlock(nn.Module): method __init__ (line 383) | def __init__(self, config: JukeboxVQVAEConfig): method _tile (line 394) | def _tile(self, hidden_states): method init_codebook (line 403) | def init_codebook(self, hidden_states): method update_codebook (line 411) | def update_codebook(self, hidden_states, latent_states): method preprocess (line 441) | def preprocess(self, hidden_states): method postprocess (line 458) | def postprocess(self, latent_states, dequantised_states, x_shape): method quantise (line 464) | def quantise(self, latent_states): method dequantise (line 476) | def dequantise(self, music_tokens): method encode (line 480) | def encode(self, latent_states): method decode (line 493) | def decode(self, music_tokens): method forward (line 505) | def forward(self, hidden_states, update_codebook=True): class JukeboxBottleneck (line 536) | class JukeboxBottleneck(nn.Module): method __init__ (line 537) | def __init__(self, config, levels): method encode (line 544) | def encode(self, raw_audio): method decode (line 550) | def decode(self, music_tokens, start_level=0, end_level=None): method forward (line 558) | def forward(self, input_audio): class JukeboxVQVAE (line 602) | class JukeboxVQVAE(PreTrainedModel): method _init_weights (line 607) | def _init_weights(self, module): method __init__ (line 624) | def __init__(self, config: JukeboxVQVAEConfig): method _decode (line 663) | def _decode(self, music_tokens, start_level=0, end_level=None): method decode (line 674) | def decode(self, music_tokens, start_level=0, end_level=None, bs_chunk... method _encode (line 697) | def _encode(self, raw_audio, start_level=0, end_level=None): method encode (line 710) | def encode(self, input_audio, start_level=0, end_level=None, bs_chunks... method sample (line 733) | def sample(self, n_samples): method forward (line 740) | def forward(self, raw_audio: torch.FloatTensor) -> Tuple[torch.Tensor,... class JukeboxMLP (line 788) | class JukeboxMLP(nn.Module): method __init__ (line 789) | def __init__(self, config): method forward (line 800) | def forward(self, hidden_states): class JukeboxLayerNorm (line 808) | class JukeboxLayerNorm(FusedLayerNorm): method __init__ (line 809) | def __init__(self, normalized_shape, eps=1e-5, elementwise_affine=True): method forward (line 814) | def forward(self, input): class JukeboxAttention (line 821) | class JukeboxAttention(nn.Module): method __init__ (line 822) | def __init__(self, config, n_ctx, attn_func="dense_attn"): method _attn (line 876) | def _attn(self, query_states, key_states, value_states, sample): method merge_heads (line 910) | def merge_heads(self, hidden_states): method split_heads (line 915) | def split_heads(self, hidden_states, is_key=False): method dense_attn (line 927) | def dense_attn(self, query, key, value, sample): method block_attn (line 935) | def block_attn(self, query, key, value, sample): method transpose_block_attn (line 951) | def transpose_block_attn(self, query, key, value, sample): method prev_block_attn (line 980) | def prev_block_attn(self, query, key, value, sample): method summary_attn (line 1017) | def summary_attn(self, query, key, value, sample): method summary_spread_attn (line 1036) | def summary_spread_attn(self, query, key, value, sample): method prime_attn (line 1054) | def prime_attn(self, query, key, value, sample): method factored_qkv (line 1060) | def factored_qkv(self, hidden_states, last_encoder_hidden_states=None,... method prime_qkv (line 1083) | def prime_qkv(self, hidden_states, last_encoder_hidden_states=None, sa... method decode_qkv (line 1097) | def decode_qkv(self, hidden_states, last_encoder_hidden_states=None, s... method forward (line 1111) | def forward(self, hidden_states, last_encoder_hidden_states=None, samp... method _encoder_len (line 1125) | def _encoder_len(self): method _offset (line 1130) | def _offset(self, curr_ctx): method _pad_to_block_ctx (line 1135) | def _pad_to_block_ctx(self, hidden_states, query=False): method _cache_len (line 1145) | def _cache_len(self): method _suff_cache_len (line 1148) | def _suff_cache_len(self): method _slice_cache (line 1166) | def _slice_cache(self, start, end=None): method _append_cache (line 1170) | def _append_cache(self, key, value): method del_cache (line 1186) | def del_cache(self): class JukeboxBlock (line 1195) | class JukeboxBlock(nn.Module): method __init__ (line 1196) | def __init__(self, config, n_ctx, attn_func="dense_attn"): method forward (line 1207) | def forward(self, hidden_states, last_encoder_hidden_states, sample=Fa... class JukeboxLayerStack (line 1221) | class JukeboxLayerStack(nn.Module): method __init__ (line 1222) | def __init__(self, config, n_ctx): method set_record_attn (line 1242) | def set_record_attn(self, record_attn): method forward (line 1263) | def forward(self, hidden_states, last_encoder_hidden_states=None, samp... method del_cache (line 1276) | def del_cache(self): class JukeboxPositionalEmbedding (line 1281) | class JukeboxPositionalEmbedding(nn.Module): method __init__ (line 1282) | def __init__(self, embed_dim, width): method forward (line 1286) | def forward(self): class JukeboxConditionalAutoregressive (line 1291) | class JukeboxConditionalAutoregressive(nn.Module): method __init__ (line 1292) | def __init__( method forward (line 1355) | def forward( method get_emb (line 1425) | def get_emb(self, sample_t, n_samples, tokens, audio_conditioning, met... method sample (line 1444) | def sample( method split_chunks (line 1503) | def split_chunks(self, length, chunk_size): method primed_sample (line 1508) | def primed_sample( class JukeboxMusicTokenConditioner (line 1621) | class JukeboxMusicTokenConditioner(nn.Module): method __init__ (line 1627) | def __init__(self, config, level): method forward (line 1643) | def forward(self, music_tokens, raw_audio_conditionning=None): class JukeboxRangeEmbedding (line 1666) | class JukeboxRangeEmbedding(nn.Module): method __init__ (line 1676) | def __init__(self, n_time, embed_dim, range, out_width, clamp=False): method forward (line 1684) | def forward(self, pos_start, pos_end=None): class JukeboxLabelConditioner (line 1714) | class JukeboxLabelConditioner(nn.Module): method __init__ (line 1715) | def __init__(self, config, include_time_signal): method forward (line 1740) | def forward(self, metadata): class JukeboxPrior (line 1770) | class JukeboxPrior(PreTrainedModel): method _init_weights (line 1797) | def _init_weights(self, module): method __init__ (line 1824) | def __init__(self, config: JukeboxPriorConfig, level=None, nb_priors=3... method get_metadata (line 1914) | def get_metadata(self, labels, start, total_length, offset, get_indice... method set_metadata_lyric_tokens (line 1931) | def set_metadata_lyric_tokens(self, labels): method get_music_tokens_conds (line 1956) | def get_music_tokens_conds(self, music_tokens, start, end): method prior_preprocess (line 1972) | def prior_preprocess(self, tokens, conds): method prior_postprocess (line 1989) | def prior_postprocess(self, tokens): method embed_tokens (line 2007) | def embed_tokens(self, music_tokens_conds): method encode (line 2017) | def encode(self, hidden_states, start_level=None, end_level=None, bs_c... method decode (line 2032) | def decode(self, music_tokens, start_level=None, end_level=None, bs_ch... method get_cond (line 2046) | def get_cond(self, music_tokens_conds, metadata): method sample (line 2062) | def sample( method get_encoder_states (line 2157) | def get_encoder_states(self, lyric_tokens, sample=False): method get_encoder_loss (line 2172) | def get_encoder_loss(self, last_encoder_hidden_states, target_lyrics): method forward_tokens (line 2185) | def forward_tokens( method forward (line 2230) | def forward( class JukeboxPreTrainedModel (line 2266) | class JukeboxPreTrainedModel(PreTrainedModel): method _init_weights (line 2276) | def _init_weights(self, module): method __init__ (line 2280) | def __init__(self, *inputs, **kwargs): class JukeboxModel (line 2302) | class JukeboxModel(JukeboxPreTrainedModel): method __init__ (line 2305) | def __init__(self, config): method set_shared_params (line 2314) | def set_shared_params(self, model_config): method decode (line 2327) | def decode(self, music_tokens, start_level=0, end_level=None, bs_chunk... method encode (line 2330) | def encode(self, input_audio, start_level=0, end_level=None, bs_chunks... method split_batch (line 2333) | def split_batch(self, obj, n_samples, split_size): method sample_partial_window (line 2345) | def sample_partial_window( method sample_single_window (line 2362) | def sample_single_window(self, music_tokens, labels, offset, sampling_... method sample_level (line 2421) | def sample_level( method _sample (line 2438) | def _sample( method ancestral_sample (line 2591) | def ancestral_sample(self, labels, n_samples=1, **sampling_kwargs) -> ... method continue_sample (line 2632) | def continue_sample(self, music_tokens, labels, **sampling_kwargs) -> ... method upsample (line 2647) | def upsample(self, music_tokens, labels, **sampling_kwargs) -> List[to... method primed_sample (line 2664) | def primed_sample(self, raw_audio, labels, **sampling_kwargs) -> List[... FILE: transformers/models/jukebox/tokenization_jukebox.py class JukeboxTokenizer (line 59) | class JukeboxTokenizer(PreTrainedTokenizer): method __init__ (line 119) | def __init__( method vocab_size (line 162) | def vocab_size(self): method get_vocab (line 165) | def get_vocab(self): method _convert_token_to_id (line 168) | def _convert_token_to_id(self, list_artists, list_genres, list_lyrics): method _tokenize (line 181) | def _tokenize(self, lyrics): method tokenize (line 191) | def tokenize(self, artist, genre, lyrics, **kwargs): method prepare_for_tokenization (line 199) | def prepare_for_tokenization( method _run_strip_accents (line 249) | def _run_strip_accents(self, text): method _normalize (line 260) | def _normalize(self, text: str) -> str: method convert_lyric_tokens_to_string (line 281) | def convert_lyric_tokens_to_string(self, lyrics: List[str]) -> str: method convert_to_tensors (line 284) | def convert_to_tensors( method __call__ (line 345) | def __call__(self, artist, genres, lyrics="", return_tensors="pt") -> ... method save_vocabulary (line 372) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _convert_id_to_token (line 408) | def _convert_id_to_token(self, artists_index, genres_index, lyric_index): FILE: transformers/models/layoutlm/configuration_layoutlm.py class LayoutLMConfig (line 36) | class LayoutLMConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class LayoutLMOnnxConfig (line 146) | class LayoutLMOnnxConfig(OnnxConfig): method __init__ (line 147) | def __init__( method inputs (line 157) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 167) | def generate_dummy_inputs( FILE: transformers/models/layoutlm/modeling_layoutlm.py class LayoutLMEmbeddings (line 55) | class LayoutLMEmbeddings(nn.Module): method __init__ (line 58) | def __init__(self, config): method forward (line 73) | def forward( class LayoutLMSelfAttention (line 130) | class LayoutLMSelfAttention(nn.Module): method __init__ (line 131) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 157) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 162) | def forward( class LayoutLMSelfOutput (line 265) | class LayoutLMSelfOutput(nn.Module): method __init__ (line 266) | def __init__(self, config): method forward (line 272) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMAttention (line 280) | class LayoutLMAttention(nn.Module): method __init__ (line 281) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 287) | def prune_heads(self, heads): method forward (line 305) | def forward( class LayoutLMIntermediate (line 330) | class LayoutLMIntermediate(nn.Module): method __init__ (line 331) | def __init__(self, config): method forward (line 339) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMOutput (line 346) | class LayoutLMOutput(nn.Module): method __init__ (line 347) | def __init__(self, config): method forward (line 353) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMLayer (line 361) | class LayoutLMLayer(nn.Module): method __init__ (line 362) | def __init__(self, config): method forward (line 376) | def forward( method feed_forward_chunk (line 441) | def feed_forward_chunk(self, attention_output): class LayoutLMEncoder (line 448) | class LayoutLMEncoder(nn.Module): method __init__ (line 449) | def __init__(self, config): method forward (line 455) | def forward( class LayoutLMPooler (line 547) | class LayoutLMPooler(nn.Module): method __init__ (line 548) | def __init__(self, config): method forward (line 553) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMPredictionHeadTransform (line 563) | class LayoutLMPredictionHeadTransform(nn.Module): method __init__ (line 564) | def __init__(self, config): method forward (line 573) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMLMPredictionHead (line 581) | class LayoutLMLMPredictionHead(nn.Module): method __init__ (line 582) | def __init__(self, config): method forward (line 595) | def forward(self, hidden_states): class LayoutLMOnlyMLMHead (line 602) | class LayoutLMOnlyMLMHead(nn.Module): method __init__ (line 603) | def __init__(self, config): method forward (line 607) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class LayoutLMPreTrainedModel (line 612) | class LayoutLMPreTrainedModel(PreTrainedModel): method _init_weights (line 624) | def _init_weights(self, module): method _set_gradient_checkpointing (line 640) | def _set_gradient_checkpointing(self, module, value=False): class LayoutLMModel (line 711) | class LayoutLMModel(LayoutLMPreTrainedModel): method __init__ (line 712) | def __init__(self, config): method get_input_embeddings (line 723) | def get_input_embeddings(self): method set_input_embeddings (line 726) | def set_input_embeddings(self, value): method _prune_heads (line 729) | def _prune_heads(self, heads_to_prune): method forward (line 739) | def forward( class LayoutLMForMaskedLM (line 859) | class LayoutLMForMaskedLM(LayoutLMPreTrainedModel): method __init__ (line 866) | def __init__(self, config): method get_input_embeddings (line 875) | def get_input_embeddings(self): method get_output_embeddings (line 878) | def get_output_embeddings(self): method set_output_embeddings (line 881) | def set_output_embeddings(self, new_embeddings): method forward (line 886) | def forward( class LayoutLMForSequenceClassification (line 994) | class LayoutLMForSequenceClassification(LayoutLMPreTrainedModel): method __init__ (line 995) | def __init__(self, config): method get_input_embeddings (line 1005) | def get_input_embeddings(self): method forward (line 1010) | def forward( class LayoutLMForTokenClassification (line 1131) | class LayoutLMForTokenClassification(LayoutLMPreTrainedModel): method __init__ (line 1132) | def __init__(self, config): method get_input_embeddings (line 1142) | def get_input_embeddings(self): method forward (line 1147) | def forward( class LayoutLMForQuestionAnswering (line 1249) | class LayoutLMForQuestionAnswering(LayoutLMPreTrainedModel): method __init__ (line 1250) | def __init__(self, config, has_visual_segment_embedding=True): method get_input_embeddings (line 1260) | def get_input_embeddings(self): method forward (line 1264) | def forward( FILE: transformers/models/layoutlm/modeling_tf_layoutlm.py class TFLayoutLMEmbeddings (line 62) | class TFLayoutLMEmbeddings(tf.keras.layers.Layer): method __init__ (line 65) | def __init__(self, config: LayoutLMConfig, **kwargs): method build (line 76) | def build(self, input_shape: tf.TensorShape): method call (line 128) | def call( class TFLayoutLMSelfAttention (line 192) | class TFLayoutLMSelfAttention(tf.keras.layers.Layer): method __init__ (line 193) | def __init__(self, config: LayoutLMConfig, **kwargs): method transpose_for_scores (line 220) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 227) | def call( class TFLayoutLMSelfOutput (line 310) | class TFLayoutLMSelfOutput(tf.keras.layers.Layer): method __init__ (line 311) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 320) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMAttention (line 329) | class TFLayoutLMAttention(tf.keras.layers.Layer): method __init__ (line 330) | def __init__(self, config: LayoutLMConfig, **kwargs): method prune_heads (line 336) | def prune_heads(self, heads): method call (line 339) | def call( class TFLayoutLMIntermediate (line 370) | class TFLayoutLMIntermediate(tf.keras.layers.Layer): method __init__ (line 371) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 383) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMOutput (line 391) | class TFLayoutLMOutput(tf.keras.layers.Layer): method __init__ (line 392) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 401) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMLayer (line 410) | class TFLayoutLMLayer(tf.keras.layers.Layer): method __init__ (line 411) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 424) | def call( class TFLayoutLMEncoder (line 497) | class TFLayoutLMEncoder(tf.keras.layers.Layer): method __init__ (line 498) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 503) | def call( class TFLayoutLMPooler (line 567) | class TFLayoutLMPooler(tf.keras.layers.Layer): method __init__ (line 568) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 578) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMPredictionHeadTransform (line 588) | class TFLayoutLMPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 589) | def __init__(self, config: LayoutLMConfig, **kwargs): method call (line 605) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMLMPredictionHead (line 614) | class TFLayoutLMLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 615) | def __init__(self, config: LayoutLMConfig, input_embeddings: tf.keras.... method build (line 627) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 632) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 635) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 639) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 642) | def set_bias(self, value: tf.Variable): method call (line 646) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMMLMHead (line 658) | class TFLayoutLMMLMHead(tf.keras.layers.Layer): method __init__ (line 659) | def __init__(self, config: LayoutLMConfig, input_embeddings: tf.keras.... method call (line 664) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFLayoutLMMainLayer (line 671) | class TFLayoutLMMainLayer(tf.keras.layers.Layer): method __init__ (line 674) | def __init__(self, config: LayoutLMConfig, add_pooling_layer: bool = T... method get_input_embeddings (line 683) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 686) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 690) | def _prune_heads(self, heads_to_prune): method call (line 698) | def call( class TFLayoutLMPreTrainedModel (line 800) | class TFLayoutLMPreTrainedModel(TFPreTrainedModel): class TFLayoutLMModel (line 912) | class TFLayoutLMModel(TFLayoutLMPreTrainedModel): method __init__ (line 913) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 923) | def call( class TFLayoutLMForMaskedLM (line 991) | class TFLayoutLMForMaskedLM(TFLayoutLMPreTrainedModel, TFMaskedLanguageM... method __init__ (line 1000) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method get_lm_head (line 1012) | def get_lm_head(self) -> tf.keras.layers.Layer: method get_prefix_bias_name (line 1015) | def get_prefix_bias_name(self) -> str: method call (line 1022) | def call( class TFLayoutLMForSequenceClassification (line 1118) | class TFLayoutLMForSequenceClassification(TFLayoutLMPreTrainedModel, TFS... method __init__ (line 1123) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1139) | def call( class TFLayoutLMForTokenClassification (line 1236) | class TFLayoutLMForTokenClassification(TFLayoutLMPreTrainedModel, TFToke... method __init__ (line 1247) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1263) | def call( class TFLayoutLMForQuestionAnswering (line 1359) | class TFLayoutLMForQuestionAnswering(TFLayoutLMPreTrainedModel, TFQuesti... method __init__ (line 1369) | def __init__(self, config: LayoutLMConfig, *inputs, **kwargs): method call (line 1383) | def call( FILE: transformers/models/layoutlm/tokenization_layoutlm.py function load_vocab (line 53) | def load_vocab(vocab_file): function whitespace_tokenize (line 65) | def whitespace_tokenize(text): class LayoutLMTokenizer (line 75) | class LayoutLMTokenizer(PreTrainedTokenizer): method __init__ (line 122) | def __init__( method do_lower_case (line 169) | def do_lower_case(self): method vocab_size (line 173) | def vocab_size(self): method get_vocab (line 176) | def get_vocab(self): method _tokenize (line 179) | def _tokenize(self, text): method _convert_token_to_id (line 192) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 196) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 200) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 205) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 230) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 258) | def create_token_type_ids_from_sequences( method save_vocabulary (line 287) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 309) | class BasicTokenizer(object): method __init__ (line 329) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 337) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 374) | def _run_strip_accents(self, text): method _run_split_on_punc (line 385) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 407) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 420) | def _is_chinese_char(self, cp): method _clean_text (line 444) | def _clean_text(self, text): class WordpieceTokenizer (line 459) | class WordpieceTokenizer(object): method __init__ (line 462) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 467) | def tokenize(self, text): FILE: transformers/models/layoutlm/tokenization_layoutlm_fast.py class LayoutLMTokenizerFast (line 62) | class LayoutLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 108) | def __init__( method build_inputs_with_special_tokens (line 150) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 174) | def create_token_type_ids_from_sequences( method save_vocabulary (line 203) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/layoutlmv2/configuration_layoutlmv2.py class LayoutLMv2Config (line 34) | class LayoutLMv2Config(PretrainedConfig): method __init__ (line 119) | def __init__( method get_default_detectron2_config (line 184) | def get_default_detectron2_config(self): method get_detectron2_config (line 214) | def get_detectron2_config(self): FILE: transformers/models/layoutlmv2/feature_extraction_layoutlmv2.py class LayoutLMv2FeatureExtractor (line 28) | class LayoutLMv2FeatureExtractor(LayoutLMv2ImageProcessor): method __init__ (line 29) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/layoutlmv2/image_processing_layoutlmv2.py function normalize_box (line 44) | def normalize_box(box, width, height): function apply_tesseract (line 53) | def apply_tesseract(image: np.ndarray, lang: Optional[str], tesseract_co... class LayoutLMv2ImageProcessor (line 87) | class LayoutLMv2ImageProcessor(BaseImageProcessor): method __init__ (line 113) | def __init__( method resize (line 134) | def resize( method preprocess (line 161) | def preprocess( FILE: transformers/models/layoutlmv2/modeling_layoutlmv2.py class LayoutLMv2Embeddings (line 63) | class LayoutLMv2Embeddings(nn.Module): method __init__ (line 66) | def __init__(self, config): method _calc_spatial_position_embeddings (line 82) | def _calc_spatial_position_embeddings(self, bbox): class LayoutLMv2SelfAttention (line 108) | class LayoutLMv2SelfAttention(nn.Module): method __init__ (line 109) | def __init__(self, config): method transpose_for_scores (line 135) | def transpose_for_scores(self, x): method compute_qkv (line 140) | def compute_qkv(self, hidden_states): method forward (line 157) | def forward( class LayoutLMv2Attention (line 201) | class LayoutLMv2Attention(nn.Module): method __init__ (line 202) | def __init__(self, config): method forward (line 207) | def forward( class LayoutLMv2SelfOutput (line 229) | class LayoutLMv2SelfOutput(nn.Module): method __init__ (line 230) | def __init__(self, config): method forward (line 236) | def forward(self, hidden_states, input_tensor): class LayoutLMv2Intermediate (line 244) | class LayoutLMv2Intermediate(nn.Module): method __init__ (line 245) | def __init__(self, config): method forward (line 253) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMv2Output (line 260) | class LayoutLMv2Output(nn.Module): method __init__ (line 261) | def __init__(self, config): method forward (line 267) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMv2Layer (line 274) | class LayoutLMv2Layer(nn.Module): method __init__ (line 275) | def __init__(self, config): method forward (line 283) | def forward( method feed_forward_chunk (line 311) | def feed_forward_chunk(self, attention_output): function relative_position_bucket (line 317) | def relative_position_bucket(relative_position, bidirectional=True, num_... class LayoutLMv2Encoder (line 361) | class LayoutLMv2Encoder(nn.Module): method __init__ (line 362) | def __init__(self, config): method _calculate_1d_position_embeddings (line 385) | def _calculate_1d_position_embeddings(self, hidden_states, position_ids): method _calculate_2d_position_embeddings (line 397) | def _calculate_2d_position_embeddings(self, hidden_states, bbox): method forward (line 421) | def forward( class LayoutLMv2PreTrainedModel (line 500) | class LayoutLMv2PreTrainedModel(PreTrainedModel): method _init_weights (line 511) | def _init_weights(self, module): method _set_gradient_checkpointing (line 527) | def _set_gradient_checkpointing(self, module, value=False): function my_convert_sync_batchnorm (line 532) | def my_convert_sync_batchnorm(module, process_group=None): class LayoutLMv2VisualBackbone (line 556) | class LayoutLMv2VisualBackbone(nn.Module): method __init__ (line 557) | def __init__(self, config): method forward (line 589) | def forward(self, images): method synchronize_batch_norm (line 596) | def synchronize_batch_norm(self): class LayoutLMv2Pooler (line 690) | class LayoutLMv2Pooler(nn.Module): method __init__ (line 691) | def __init__(self, config): method forward (line 696) | def forward(self, hidden_states): class LayoutLMv2Model (line 709) | class LayoutLMv2Model(LayoutLMv2PreTrainedModel): method __init__ (line 710) | def __init__(self, config): method get_input_embeddings (line 730) | def get_input_embeddings(self): method set_input_embeddings (line 733) | def set_input_embeddings(self, value): method _calc_text_embeddings (line 736) | def _calc_text_embeddings(self, input_ids, bbox, position_ids, token_t... method _calc_img_embeddings (line 761) | def _calc_img_embeddings(self, image, bbox, position_ids): method _calc_visual_bbox (line 772) | def _calc_visual_bbox(self, image_feature_pool_shape, bbox, device, fi... method _get_input_shape (line 809) | def _get_input_shape(self, input_ids=None, inputs_embeds=None): method forward (line 821) | def forward( class LayoutLMv2ForSequenceClassification (line 970) | class LayoutLMv2ForSequenceClassification(LayoutLMv2PreTrainedModel): method __init__ (line 971) | def __init__(self, config): method get_input_embeddings (line 981) | def get_input_embeddings(self): method forward (line 986) | def forward( class LayoutLMv2ForTokenClassification (line 1151) | class LayoutLMv2ForTokenClassification(LayoutLMv2PreTrainedModel): method __init__ (line 1152) | def __init__(self, config): method get_input_embeddings (line 1162) | def get_input_embeddings(self): method forward (line 1167) | def forward( class LayoutLMv2ForQuestionAnswering (line 1282) | class LayoutLMv2ForQuestionAnswering(LayoutLMv2PreTrainedModel): method __init__ (line 1283) | def __init__(self, config, has_visual_segment_embedding=True): method get_input_embeddings (line 1293) | def get_input_embeddings(self): method forward (line 1298) | def forward( FILE: transformers/models/layoutlmv2/processing_layoutlmv2.py class LayoutLMv2Processor (line 27) | class LayoutLMv2Processor(ProcessorMixin): method __init__ (line 50) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 67) | def __call__( method get_overflowing_images (line 153) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 167) | def batch_decode(self, *args, **kwargs): method decode (line 174) | def decode(self, *args, **kwargs): method model_input_names (line 182) | def model_input_names(self): method feature_extractor_class (line 186) | def feature_extractor_class(self): method feature_extractor (line 194) | def feature_extractor(self): FILE: transformers/models/layoutlmv2/tokenization_layoutlmv2.py function load_vocab (line 170) | def load_vocab(vocab_file): function whitespace_tokenize (line 181) | def whitespace_tokenize(text): function subfinder (line 193) | def subfinder(mylist, pattern): class LayoutLMv2Tokenizer (line 206) | class LayoutLMv2Tokenizer(PreTrainedTokenizer): method __init__ (line 225) | def __init__( method do_lower_case (line 293) | def do_lower_case(self): method vocab_size (line 297) | def vocab_size(self): method get_vocab (line 300) | def get_vocab(self): method _tokenize (line 303) | def _tokenize(self, text): method _convert_token_to_id (line 316) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 320) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 324) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 329) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 354) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 382) | def create_token_type_ids_from_sequences( method save_vocabulary (line 405) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 426) | def __call__( method batch_encode_plus (line 575) | def batch_encode_plus( method _batch_encode_plus (line 633) | def _batch_encode_plus( method _batch_prepare_for_model (line 689) | def _batch_prepare_for_model( method encode (line 760) | def encode( method encode_plus (line 807) | def encode_plus( method _encode_plus (line 873) | def _encode_plus( method prepare_for_model (line 926) | def prepare_for_model( method truncate_sequences (line 1136) | def truncate_sequences( method _pad (line 1261) | def _pad( class BasicTokenizer (line 1347) | class BasicTokenizer(object): method __init__ (line 1367) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 1375) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 1412) | def _run_strip_accents(self, text): method _run_split_on_punc (line 1423) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 1445) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 1458) | def _is_chinese_char(self, cp): method _clean_text (line 1482) | def _clean_text(self, text): class WordpieceTokenizer (line 1497) | class WordpieceTokenizer(object): method __init__ (line 1500) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 1505) | def tokenize(self, text): FILE: transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py class LayoutLMv2TokenizerFast (line 70) | class LayoutLMv2TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 122) | def __init__( method __call__ (line 180) | def __call__( method batch_encode_plus (line 329) | def batch_encode_plus( method tokenize (line 387) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 396) | def encode_plus( method _batch_encode_plus (line 462) | def _batch_encode_plus( method _encode_plus (line 618) | def _encode_plus( method _pad (line 684) | def _pad( method build_inputs_with_special_tokens (line 768) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 792) | def create_token_type_ids_from_sequences( method save_vocabulary (line 815) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/layoutlmv3/configuration_layoutlmv3.py class LayoutLMv3Config (line 40) | class LayoutLMv3Config(PretrainedConfig): method __init__ (line 124) | def __init__( class LayoutLMv3OnnxConfig (line 193) | class LayoutLMv3OnnxConfig(OnnxConfig): method inputs (line 197) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 219) | def atol_for_validation(self) -> float: method default_onnx_opset (line 223) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 226) | def generate_dummy_inputs( FILE: transformers/models/layoutlmv3/feature_extraction_layoutlmv3.py class LayoutLMv3FeatureExtractor (line 28) | class LayoutLMv3FeatureExtractor(LayoutLMv3ImageProcessor): method __init__ (line 29) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/layoutlmv3/image_processing_layoutlmv3.py function normalize_box (line 46) | def normalize_box(box, width, height): function apply_tesseract (line 55) | def apply_tesseract(image: np.ndarray, lang: Optional[str], tesseract_co... class LayoutLMv3ImageProcessor (line 88) | class LayoutLMv3ImageProcessor(BaseImageProcessor): method __init__ (line 129) | def __init__( method resize (line 160) | def resize( method rescale (line 187) | def rescale( method normalize (line 207) | def normalize( method preprocess (line 230) | def preprocess( FILE: transformers/models/layoutlmv3/modeling_layoutlmv3.py class LayoutLMv3PatchEmbeddings (line 199) | class LayoutLMv3PatchEmbeddings(nn.Module): method __init__ (line 203) | def __init__(self, config): method forward (line 219) | def forward(self, pixel_values, position_embedding=None): class LayoutLMv3TextEmbeddings (line 234) | class LayoutLMv3TextEmbeddings(nn.Module): method __init__ (line 239) | def __init__(self, config): method calculate_spatial_position_embeddings (line 260) | def calculate_spatial_position_embeddings(self, bbox): method create_position_ids_from_input_ids (line 286) | def create_position_ids_from_input_ids(self, input_ids, padding_idx): method create_position_ids_from_inputs_embeds (line 296) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method forward (line 308) | def forward( class LayoutLMv3PreTrainedModel (line 350) | class LayoutLMv3PreTrainedModel(PreTrainedModel): method _init_weights (line 359) | def _init_weights(self, module): class LayoutLMv3SelfAttention (line 376) | class LayoutLMv3SelfAttention(nn.Module): method __init__ (line 377) | def __init__(self, config): method transpose_for_scores (line 397) | def transpose_for_scores(self, x): method cogview_attention (line 402) | def cogview_attention(self, attention_scores, alpha=32): method forward (line 414) | def forward( class LayoutLMv3SelfOutput (line 467) | class LayoutLMv3SelfOutput(nn.Module): method __init__ (line 468) | def __init__(self, config): method forward (line 474) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMv3Attention (line 482) | class LayoutLMv3Attention(nn.Module): method __init__ (line 483) | def __init__(self, config): method forward (line 488) | def forward( class LayoutLMv3Layer (line 511) | class LayoutLMv3Layer(nn.Module): method __init__ (line 512) | def __init__(self, config): method forward (line 520) | def forward( method feed_forward_chunk (line 548) | def feed_forward_chunk(self, attention_output): class LayoutLMv3Encoder (line 554) | class LayoutLMv3Encoder(nn.Module): method __init__ (line 555) | def __init__(self, config): method relative_position_bucket (line 577) | def relative_position_bucket(self, relative_position, bidirectional=Tr... method _cal_1d_pos_emb (line 600) | def _cal_1d_pos_emb(self, hidden_states, position_ids): method _cal_2d_pos_emb (line 613) | def _cal_2d_pos_emb(self, hidden_states, bbox): method forward (line 637) | def forward( class LayoutLMv3Intermediate (line 718) | class LayoutLMv3Intermediate(nn.Module): method __init__ (line 719) | def __init__(self, config): method forward (line 727) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LayoutLMv3Output (line 734) | class LayoutLMv3Output(nn.Module): method __init__ (line 735) | def __init__(self, config): method forward (line 741) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LayoutLMv3Model (line 752) | class LayoutLMv3Model(LayoutLMv3PreTrainedModel): method __init__ (line 755) | def __init__(self, config): method get_input_embeddings (line 784) | def get_input_embeddings(self): method set_input_embeddings (line 787) | def set_input_embeddings(self, value): method _prune_heads (line 790) | def _prune_heads(self, heads_to_prune): method init_visual_bbox (line 798) | def init_visual_bbox(self, image_size=(14, 14), max_len=1000): method calculate_visual_bbox (line 821) | def calculate_visual_bbox(self, device, dtype, batch_size): method forward_image (line 826) | def forward_image(self, pixel_values): method forward (line 847) | def forward( class LayoutLMv3ClassificationHead (line 1004) | class LayoutLMv3ClassificationHead(nn.Module): method __init__ (line 1009) | def __init__(self, config, pool_feature=False): method forward (line 1022) | def forward(self, x): class LayoutLMv3ForTokenClassification (line 1040) | class LayoutLMv3ForTokenClassification(LayoutLMv3PreTrainedModel): method __init__ (line 1044) | def __init__(self, config): method forward (line 1061) | def forward( class LayoutLMv3ForQuestionAnswering (line 1155) | class LayoutLMv3ForQuestionAnswering(LayoutLMv3PreTrainedModel): method __init__ (line 1159) | def __init__(self, config): method forward (line 1172) | def forward( class LayoutLMv3ForSequenceClassification (line 1288) | class LayoutLMv3ForSequenceClassification(LayoutLMv3PreTrainedModel): method __init__ (line 1291) | def __init__(self, config): method forward (line 1304) | def forward( FILE: transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py class TFLayoutLMv3PatchEmbeddings (line 68) | class TFLayoutLMv3PatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 71) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 91) | def call(self, pixel_values: tf.Tensor) -> tf.Tensor: class TFLayoutLMv3TextEmbeddings (line 101) | class TFLayoutLMv3TextEmbeddings(tf.keras.layers.Layer): method __init__ (line 106) | def __init__(self, config: LayoutLMv3Config, **kwargs): method calculate_spatial_position_embeddings (line 155) | def calculate_spatial_position_embeddings(self, bbox: tf.Tensor) -> tf... method create_position_ids_from_inputs_embeds (line 196) | def create_position_ids_from_inputs_embeds(self, inputs_embds: tf.Tens... method create_position_ids_from_input_ids (line 211) | def create_position_ids_from_input_ids(self, input_ids: tf.Tensor) -> ... method create_position_ids (line 220) | def create_position_ids(self, input_ids: tf.Tensor, inputs_embeds: tf.... method call (line 226) | def call( class TFLayoutLMv3SelfAttention (line 264) | class TFLayoutLMv3SelfAttention(tf.keras.layers.Layer): method __init__ (line 265) | def __init__(self, config: LayoutLMv3Config, **kwargs): method transpose_for_scores (line 298) | def transpose_for_scores(self, x: tf.Tensor): method cogview_attention (line 309) | def cogview_attention(self, attention_scores: tf.Tensor, alpha: Union[... method call (line 322) | def call( class TFLayoutLMv3SelfOutput (line 377) | class TFLayoutLMv3SelfOutput(tf.keras.layers.Layer): method __init__ (line 378) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 387) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMv3Attention (line 395) | class TFLayoutLMv3Attention(tf.keras.layers.Layer): method __init__ (line 396) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 401) | def call( class TFLayoutLMv3Intermediate (line 426) | class TFLayoutLMv3Intermediate(tf.keras.layers.Layer): method __init__ (line 427) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 439) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLayoutLMv3Output (line 447) | class TFLayoutLMv3Output(tf.keras.layers.Layer): method __init__ (line 448) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 457) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLayoutLMv3Layer (line 465) | class TFLayoutLMv3Layer(tf.keras.layers.Layer): method __init__ (line 466) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 472) | def call( class TFLayoutLMv3Encoder (line 499) | class TFLayoutLMv3Encoder(tf.keras.layers.Layer): method __init__ (line 500) | def __init__(self, config: LayoutLMv3Config, **kwargs): method relative_position_bucket (line 534) | def relative_position_bucket(self, relative_positions: tf.Tensor, num_... method _cal_pos_emb (line 559) | def _cal_pos_emb( method _cal_1d_pos_emb (line 575) | def _cal_1d_pos_emb(self, position_ids: tf.Tensor): method _cal_2d_pos_emb (line 578) | def _cal_2d_pos_emb(self, bbox: tf.Tensor): method call (line 596) | def call( class TFLayoutLMv3MainLayer (line 655) | class TFLayoutLMv3MainLayer(tf.keras.layers.Layer): method __init__ (line 658) | def __init__(self, config: LayoutLMv3Config, **kwargs): method build (line 679) | def build(self, input_shape: tf.TensorShape): method get_input_embeddings (line 699) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 702) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 706) | def _prune_heads(self, heads_to_prune): method init_visual_bbox (line 713) | def init_visual_bbox(self, image_size: Tuple[int, int], max_len: int =... method calculate_visual_bbox (line 736) | def calculate_visual_bbox(self, batch_size: int, dtype: tf.DType): method embed_image (line 742) | def embed_image(self, pixel_values: tf.Tensor) -> tf.Tensor: method get_extended_attention_mask (line 757) | def get_extended_attention_mask(self, attention_mask: tf.Tensor) -> tf... method get_head_mask (line 784) | def get_head_mask(self, head_mask: tf.Tensor | None) -> Union[tf.Tenso... method call (line 810) | def call( class TFLayoutLMv3PreTrainedModel (line 973) | class TFLayoutLMv3PreTrainedModel(TFPreTrainedModel): method input_signature (line 983) | def input_signature(self): class TFLayoutLMv3Model (line 1111) | class TFLayoutLMv3Model(TFLayoutLMv3PreTrainedModel): method __init__ (line 1115) | def __init__(self, config, *inputs, **kwargs): method call (line 1122) | def call( class TFLayoutLMv3ClassificationHead (line 1184) | class TFLayoutLMv3ClassificationHead(tf.keras.layers.Layer): method __init__ (line 1189) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1210) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: class TFLayoutLMv3ForSequenceClassification (line 1226) | class TFLayoutLMv3ForSequenceClassification(TFLayoutLMv3PreTrainedModel,... method __init__ (line 1230) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1239) | def call( class TFLayoutLMv3ForTokenClassification (line 1330) | class TFLayoutLMv3ForTokenClassification(TFLayoutLMv3PreTrainedModel, TF... method __init__ (line 1334) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1352) | def call( class TFLayoutLMv3ForQuestionAnswering (line 1452) | class TFLayoutLMv3ForQuestionAnswering(TFLayoutLMv3PreTrainedModel, TFQu... method __init__ (line 1456) | def __init__(self, config: LayoutLMv3Config, **kwargs): method call (line 1467) | def call( FILE: transformers/models/layoutlmv3/processing_layoutlmv3.py class LayoutLMv3Processor (line 27) | class LayoutLMv3Processor(ProcessorMixin): method __init__ (line 50) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 67) | def __call__( method get_overflowing_images (line 151) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 165) | def batch_decode(self, *args, **kwargs): method decode (line 172) | def decode(self, *args, **kwargs): method model_input_names (line 180) | def model_input_names(self): method feature_extractor_class (line 184) | def feature_extractor_class(self): method feature_extractor (line 192) | def feature_extractor(self): FILE: transformers/models/layoutlmv3/tokenization_layoutlmv3.py function bytes_to_unicode (line 161) | def bytes_to_unicode(): function get_pairs (line 186) | def get_pairs(word): class LayoutLMv3Tokenizer (line 200) | class LayoutLMv3Tokenizer(PreTrainedTokenizer): method __init__ (line 276) | def __init__( method vocab_size (line 349) | def vocab_size(self): method get_vocab (line 353) | def get_vocab(self): method bpe (line 357) | def bpe(self, token): method _tokenize (line 400) | def _tokenize(self, text): method _convert_token_to_id (line 411) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 416) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 421) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 428) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 458) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 484) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 512) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 535) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method __call__ (line 549) | def __call__( method batch_encode_plus (line 699) | def batch_encode_plus( method _batch_encode_plus (line 758) | def _batch_encode_plus( method _batch_prepare_for_model (line 815) | def _batch_prepare_for_model( method encode (line 887) | def encode( method encode_plus (line 935) | def encode_plus( method _encode_plus (line 1002) | def _encode_plus( method prepare_for_model (line 1055) | def prepare_for_model( method truncate_sequences (line 1268) | def truncate_sequences( method _pad (line 1394) | def _pad( FILE: transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py class LayoutLMv3TokenizerFast (line 65) | class LayoutLMv3TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 139) | def __init__( method __call__ (line 226) | def __call__( method batch_encode_plus (line 376) | def batch_encode_plus( method tokenize (line 435) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 445) | def encode_plus( method _batch_encode_plus (line 511) | def _batch_encode_plus( method _encode_plus (line 673) | def _encode_plus( method _pad (line 740) | def _pad( method save_vocabulary (line 825) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 829) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 836) | def create_token_type_ids_from_sequences( FILE: transformers/models/layoutxlm/processing_layoutxlm.py class LayoutXLMProcessor (line 25) | class LayoutXLMProcessor(ProcessorMixin): method __call__ (line 47) | def __call__( method get_overflowing_images (line 134) | def get_overflowing_images(self, images, overflow_to_sample_mapping): method batch_decode (line 148) | def batch_decode(self, *args, **kwargs): method decode (line 155) | def decode(self, *args, **kwargs): method model_input_names (line 163) | def model_input_names(self): FILE: transformers/models/layoutxlm/tokenization_layoutxlm.py class LayoutXLMTokenizer (line 149) | class LayoutXLMTokenizer(PreTrainedTokenizer): method __init__ (line 234) | def __init__( method __getstate__ (line 300) | def __getstate__(self): method __setstate__ (line 306) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 316) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 342) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 370) | def create_token_type_ids_from_sequences( method vocab_size (line 396) | def vocab_size(self): method get_vocab (line 399) | def get_vocab(self): method _tokenize (line 404) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 407) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 416) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 422) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 427) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 445) | def __call__( method _batch_encode_plus (line 593) | def _batch_encode_plus( method _batch_prepare_for_model (line 649) | def _batch_prepare_for_model( method _encode_plus (line 719) | def _encode_plus( method prepare_for_model (line 772) | def prepare_for_model( method truncate_sequences (line 969) | def truncate_sequences( method _pad (line 1094) | def _pad( FILE: transformers/models/layoutxlm/tokenization_layoutxlm_fast.py class LayoutXLMTokenizerFast (line 152) | class LayoutXLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 220) | def __init__( method __call__ (line 270) | def __call__( method tokenize (line 418) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method _batch_encode_plus (line 426) | def _batch_encode_plus( method _encode_plus (line 583) | def _encode_plus( method _pad (line 649) | def _pad( method build_inputs_with_special_tokens (line 733) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 759) | def create_token_type_ids_from_sequences( method save_vocabulary (line 784) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/led/configuration_led.py class LEDConfig (line 31) | class LEDConfig(PretrainedConfig): method __init__ (line 108) | def __init__( FILE: transformers/models/led/modeling_led.py function shift_tokens_right (line 62) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 78) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, p... function _expand_mask (line 93) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class LEDLearnedPositionalEmbedding (line 111) | class LEDLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 116) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 119) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class LEDEncoderSelfAttention (line 129) | class LEDEncoderSelfAttention(nn.Module): method __init__ (line 130) | def __init__(self, config, layer_id): method forward (line 165) | def forward( method _pad_and_transpose_last_two_dims (line 334) | def _pad_and_transpose_last_two_dims(hidden_states_padded, padding): method _pad_and_diagonalize (line 345) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 394) | def _chunk(hidden_states, window_overlap, onnx_export: bool = False): method _mask_invalid_locations (line 435) | def _mask_invalid_locations(input_tensor, affected_seq_len) -> torch.T... method _sliding_chunks_query_key_matmul (line 450) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn_probs_value (line 516) | def _sliding_chunks_matmul_attn_probs_value( method _get_global_attn_indices (line 561) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 589) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 619) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 655) | def _compute_global_attn_output_from_hidden( class LEDEncoderAttention (line 764) | class LEDEncoderAttention(nn.Module): method __init__ (line 765) | def __init__(self, config, layer_id): method forward (line 770) | def forward( class LEDDecoderAttention (line 798) | class LEDDecoderAttention(nn.Module): method __init__ (line 801) | def __init__( method _shape (line 827) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 830) | def forward( class LEDEncoderLayer (line 941) | class LEDEncoderLayer(nn.Module): method __init__ (line 942) | def __init__(self, config: LEDConfig, layer_id: int): method forward (line 954) | def forward( class LEDDecoderLayer (line 1003) | class LEDDecoderLayer(nn.Module): method __init__ (line 1004) | def __init__(self, config: LEDConfig): method forward (line 1030) | def forward( class LEDClassificationHead (line 1119) | class LEDClassificationHead(nn.Module): method __init__ (line 1122) | def __init__( method forward (line 1134) | def forward(self, hidden_states: torch.Tensor): class LEDPreTrainedModel (line 1143) | class LEDPreTrainedModel(PreTrainedModel): method _init_weights (line 1148) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1159) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 1164) | def dummy_inputs(self): class LEDEncoderBaseModelOutput (line 1176) | class LEDEncoderBaseModelOutput(ModelOutput): class LEDSeq2SeqModelOutput (line 1219) | class LEDSeq2SeqModelOutput(ModelOutput): class LEDSeq2SeqLMOutput (line 1287) | class LEDSeq2SeqLMOutput(ModelOutput): class LEDSeq2SeqSequenceClassifierOutput (line 1354) | class LEDSeq2SeqSequenceClassifierOutput(ModelOutput): class LEDSeq2SeqQuestionAnsweringModelOutput (line 1421) | class LEDSeq2SeqQuestionAnsweringModelOutput(ModelOutput): class LEDEncoder (line 1645) | class LEDEncoder(LEDPreTrainedModel): method __init__ (line 1655) | def __init__(self, config: LEDConfig, embed_tokens: Optional[nn.Embedd... method _merge_to_attention_mask (line 1694) | def _merge_to_attention_mask(self, attention_mask: torch.Tensor, globa... method _pad_to_window_size (line 1706) | def _pad_to_window_size( method forward (line 1749) | def forward( class LEDDecoder (line 1940) | class LEDDecoder(LEDPreTrainedModel): method __init__ (line 1949) | def __init__(self, config: LEDConfig, embed_tokens: Optional[nn.Embedd... method forward (line 1972) | def forward( class LEDModel (line 2211) | class LEDModel(LEDPreTrainedModel): method __init__ (line 2214) | def __init__(self, config: LEDConfig): method get_input_embeddings (line 2226) | def get_input_embeddings(self): method set_input_embeddings (line 2229) | def set_input_embeddings(self, value): method get_encoder (line 2234) | def get_encoder(self): method get_decoder (line 2237) | def get_decoder(self): method forward (line 2246) | def forward( class LEDForConditionalGeneration (line 2335) | class LEDForConditionalGeneration(LEDPreTrainedModel): method __init__ (line 2346) | def __init__(self, config: LEDConfig): method get_encoder (line 2355) | def get_encoder(self): method get_decoder (line 2358) | def get_decoder(self): method resize_token_embeddings (line 2361) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 2366) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 2375) | def get_output_embeddings(self): method set_output_embeddings (line 2378) | def set_output_embeddings(self, new_embeddings): method forward (line 2384) | def forward( method prepare_inputs_for_generation (line 2479) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2509) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2513) | def _reorder_cache(past_key_values, beam_idx): class LEDForSequenceClassification (line 2530) | class LEDForSequenceClassification(LEDPreTrainedModel): method __init__ (line 2533) | def __init__(self, config: LEDConfig, **kwargs): method forward (line 2558) | def forward( class LEDForQuestionAnswering (line 2666) | class LEDForQuestionAnswering(LEDPreTrainedModel): method __init__ (line 2669) | def __init__(self, config): method forward (line 2687) | def forward( FILE: transformers/models/led/modeling_tf_led.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 86) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 104) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFLEDLearnedPositionalEmbedding (line 117) | class TFLEDLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 122) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 125) | def call(self, input_shape: tf.TensorShape, past_key_values_length: in... class TFLEDEncoderSelfAttention (line 135) | class TFLEDEncoderSelfAttention(tf.keras.layers.Layer): method __init__ (line 136) | def __init__(self, config, layer_id, **kwargs): method build (line 195) | def build(self, input_shape=None): method call (line 205) | def call( method _sliding_chunks_query_key_matmul (line 396) | def _sliding_chunks_query_key_matmul(self, query, key, window_overlap): method _mask_invalid_locations (line 513) | def _mask_invalid_locations(input_tensor, window_overlap): method _sliding_chunks_matmul_attn_probs_value (line 542) | def _sliding_chunks_matmul_attn_probs_value(self, attn_probs, value, w... method _pad_and_transpose_last_two_dims (line 616) | def _pad_and_transpose_last_two_dims(hidden_states_padded, paddings): method _pad_and_diagonalize (line 627) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 679) | def _chunk(hidden_states, window_overlap): method _get_global_attn_indices (line 709) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 739) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 793) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 834) | def _compute_global_attn_output_from_hidden( method reshape_and_transpose (line 971) | def reshape_and_transpose(self, vector, batch_size): class TFLEDEncoderAttention (line 981) | class TFLEDEncoderAttention(tf.keras.layers.Layer): method __init__ (line 982) | def __init__(self, config, layer_id, **kwargs): method call (line 987) | def call(self, inputs, training=False): class TFLEDDecoderAttention (line 1008) | class TFLEDDecoderAttention(tf.keras.layers.Layer): method __init__ (line 1011) | def __init__( method _shape (line 1035) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 1038) | def call( class TFLEDEncoderLayer (line 1159) | class TFLEDEncoderLayer(tf.keras.layers.Layer): method __init__ (line 1160) | def __init__(self, config: LEDConfig, layer_id: int, **kwargs): method call (line 1172) | def call( class TFLEDDecoderLayer (line 1218) | class TFLEDDecoderLayer(tf.keras.layers.Layer): method __init__ (line 1219) | def __init__(self, config: LEDConfig, **kwargs): method call (line 1246) | def call( class TFLEDPreTrainedModel (line 1327) | class TFLEDPreTrainedModel(TFPreTrainedModel): method input_signature (line 1332) | def input_signature(self): class TFLEDEncoderBaseModelOutput (line 1340) | class TFLEDEncoderBaseModelOutput(ModelOutput): class TFLEDSeq2SeqModelOutput (line 1383) | class TFLEDSeq2SeqModelOutput(ModelOutput): class TFLEDSeq2SeqLMOutput (line 1451) | class TFLEDSeq2SeqLMOutput(ModelOutput): class TFLEDEncoder (line 1627) | class TFLEDEncoder(tf.keras.layers.Layer): method __init__ (line 1637) | def __init__(self, config: LEDConfig, embed_tokens: Optional[tf.keras.... method get_embed_tokens (line 1666) | def get_embed_tokens(self): method set_embed_tokens (line 1669) | def set_embed_tokens(self, embed_tokens): method call (line 1673) | def call( method compute_hidden_states (line 1839) | def compute_hidden_states(self, hidden_states, padding_len): method _pad_to_window_size (line 1842) | def _pad_to_window_size( class TFLEDDecoder (line 1889) | class TFLEDDecoder(tf.keras.layers.Layer): method __init__ (line 1899) | def __init__(self, config: LEDConfig, embed_tokens: Optional[tf.keras.... method set_embed_tokens (line 1917) | def set_embed_tokens(self, embed_tokens): method call (line 1921) | def call( class TFLEDMainLayer (line 2109) | class TFLEDMainLayer(tf.keras.layers.Layer): method __init__ (line 2112) | def __init__(self, config: LEDConfig, **kwargs): method get_input_embeddings (line 2127) | def get_input_embeddings(self): method set_input_embeddings (line 2130) | def set_input_embeddings(self, new_embeddings): method call (line 2136) | def call( class TFLEDModel (line 2218) | class TFLEDModel(TFLEDPreTrainedModel): method __init__ (line 2219) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 2224) | def get_encoder(self): method get_decoder (line 2227) | def get_decoder(self): method call (line 2237) | def call( method serving_output (line 2278) | def serving_output(self, output): class BiasLayer (line 2301) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 2307) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 2314) | def call(self, x): class TFLEDForConditionalGeneration (line 2322) | class TFLEDForConditionalGeneration(TFLEDPreTrainedModel): method __init__ (line 2328) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 2340) | def get_decoder(self): method get_encoder (line 2343) | def get_encoder(self): method get_bias (line 2346) | def get_bias(self): method set_bias (line 2349) | def set_bias(self, value): method get_output_embeddings (line 2357) | def get_output_embeddings(self): method set_output_embeddings (line 2360) | def set_output_embeddings(self, value): method call (line 2366) | def call( method serving_output (line 2450) | def serving_output(self, output): method prepare_inputs_for_generation (line 2471) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2497) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method hf_compute_loss (line 2500) | def hf_compute_loss(self, labels, logits): FILE: transformers/models/led/tokenization_led.py function bytes_to_unicode (line 54) | def bytes_to_unicode(): function get_pairs (line 79) | def get_pairs(word): class LEDTokenizer (line 93) | class LEDTokenizer(PreTrainedTokenizer): method __init__ (line 177) | def __init__( method vocab_size (line 233) | def vocab_size(self): method get_vocab (line 237) | def get_vocab(self): method bpe (line 241) | def bpe(self, token): method _tokenize (line 284) | def _tokenize(self, text): method _convert_token_to_id (line 295) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 300) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 305) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 312) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 342) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 368) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 396) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 420) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _pad (line 426) | def _pad( FILE: transformers/models/led/tokenization_led_fast.py class LEDTokenizerFast (line 50) | class LEDTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 138) | def __init__( method mask_token (line 209) | def mask_token(self) -> str: method mask_token (line 224) | def mask_token(self, value): method _batch_encode_plus (line 236) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 248) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 260) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 265) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 273) | def create_token_type_ids_from_sequences( method _pad (line 297) | def _pad( FILE: transformers/models/levit/configuration_levit.py class LevitConfig (line 35) | class LevitConfig(PretrainedConfig): method __init__ (line 92) | def __init__( class LevitOnnxConfig (line 132) | class LevitOnnxConfig(OnnxConfig): method inputs (line 136) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 144) | def atol_for_validation(self) -> float: FILE: transformers/models/levit/convert_levit_timm_to_pytorch.py function convert_weight_and_push (line 36) | def convert_weight_and_push( function convert_weights_and_push (line 83) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: transformers/models/levit/feature_extraction_levit.py class LevitFeatureExtractor (line 26) | class LevitFeatureExtractor(LevitImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/levit/image_processing_levit.py class LevitImageProcessor (line 46) | class LevitImageProcessor(BaseImageProcessor): method __init__ (line 88) | def __init__( method resize (line 119) | def resize( method center_crop (line 164) | def center_crop( method rescale (line 187) | def rescale( method normalize (line 207) | def normalize( method preprocess (line 230) | def preprocess( FILE: transformers/models/levit/modeling_levit.py class LevitForImageClassificationWithTeacherOutput (line 57) | class LevitForImageClassificationWithTeacherOutput(ModelOutput): class LevitConvEmbeddings (line 82) | class LevitConvEmbeddings(nn.Module): method __init__ (line 87) | def __init__( method forward (line 96) | def forward(self, embeddings): class LevitPatchEmbeddings (line 102) | class LevitPatchEmbeddings(nn.Module): method __init__ (line 108) | def __init__(self, config): method forward (line 130) | def forward(self, pixel_values): class MLPLayerWithBN (line 146) | class MLPLayerWithBN(nn.Module): method __init__ (line 147) | def __init__(self, input_dim, output_dim, bn_weight_init=1): method forward (line 152) | def forward(self, hidden_state): class LevitSubsample (line 158) | class LevitSubsample(nn.Module): method __init__ (line 159) | def __init__(self, stride, resolution): method forward (line 164) | def forward(self, hidden_state): class LevitAttention (line 172) | class LevitAttention(nn.Module): method __init__ (line 173) | def __init__(self, hidden_sizes, key_dim, num_attention_heads, attenti... method train (line 201) | def train(self, mode=True): method get_attention_biases (line 206) | def get_attention_biases(self, device): method forward (line 215) | def forward(self, hidden_state): class LevitAttentionSubsample (line 232) | class LevitAttentionSubsample(nn.Module): method __init__ (line 233) | def __init__( method train (line 277) | def train(self, mode=True): method get_attention_biases (line 282) | def get_attention_biases(self, device): method forward (line 291) | def forward(self, hidden_state): class LevitMLPLayer (line 313) | class LevitMLPLayer(nn.Module): method __init__ (line 318) | def __init__(self, input_dim, hidden_dim): method forward (line 324) | def forward(self, hidden_state): class LevitResidualLayer (line 331) | class LevitResidualLayer(nn.Module): method __init__ (line 336) | def __init__(self, module, drop_rate): method forward (line 341) | def forward(self, hidden_state): class LevitStage (line 352) | class LevitStage(nn.Module): method __init__ (line 357) | def __init__( method get_resolution (line 412) | def get_resolution(self): method forward (line 415) | def forward(self, hidden_state): class LevitEncoder (line 421) | class LevitEncoder(nn.Module): method __init__ (line 426) | def __init__(self, config): method forward (line 451) | def forward(self, hidden_state, output_hidden_states=False, return_dic... class LevitClassificationLayer (line 467) | class LevitClassificationLayer(nn.Module): method __init__ (line 472) | def __init__(self, input_dim, output_dim): method forward (line 477) | def forward(self, hidden_state): class LevitPreTrainedModel (line 483) | class LevitPreTrainedModel(PreTrainedModel): method _init_weights (line 494) | def _init_weights(self, module): method _set_gradient_checkpointing (line 506) | def _set_gradient_checkpointing(self, module, value=False): class LevitModel (line 540) | class LevitModel(LevitPreTrainedModel): method __init__ (line 541) | def __init__(self, config): method forward (line 557) | def forward( class LevitForImageClassification (line 600) | class LevitForImageClassification(LevitPreTrainedModel): method __init__ (line 601) | def __init__(self, config): method forward (line 624) | def forward( class LevitForImageClassificationWithTeacher (line 687) | class LevitForImageClassificationWithTeacher(LevitPreTrainedModel): method __init__ (line 688) | def __init__(self, config): method forward (line 716) | def forward( FILE: transformers/models/lilt/configuration_lilt.py class LiltConfig (line 30) | class LiltConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: transformers/models/lilt/modeling_lilt.py class LiltTextEmbeddings (line 49) | class LiltTextEmbeddings(nn.Module): method __init__ (line 50) | def __init__(self, config): method forward (line 71) | def forward( method create_position_ids_from_input_ids (line 107) | def create_position_ids_from_input_ids(self, input_ids, padding_idx): method create_position_ids_from_inputs_embeds (line 120) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LiltLayoutEmbeddings (line 136) | class LiltLayoutEmbeddings(nn.Module): method __init__ (line 137) | def __init__(self, config): method forward (line 158) | def forward(self, bbox=None, position_ids=None): class LiltSelfAttention (line 192) | class LiltSelfAttention(nn.Module): method __init__ (line 193) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 229) | def transpose_for_scores(self, x, r=1): method forward (line 234) | def forward( class LiltSelfOutput (line 330) | class LiltSelfOutput(nn.Module): method __init__ (line 331) | def __init__(self, config): method forward (line 337) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LiltAttention (line 344) | class LiltAttention(nn.Module): method __init__ (line 345) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 357) | def prune_heads(self, heads): method forward (line 375) | def forward( class LiltIntermediate (line 397) | class LiltIntermediate(nn.Module): method __init__ (line 398) | def __init__(self, config): method forward (line 406) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LiltOutput (line 413) | class LiltOutput(nn.Module): method __init__ (line 414) | def __init__(self, config): method forward (line 420) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LiltLayer (line 427) | class LiltLayer(nn.Module): method __init__ (line 428) | def __init__(self, config): method forward (line 445) | def forward( method feed_forward_chunk (line 476) | def feed_forward_chunk(self, attention_output): method layout_feed_forward_chunk (line 481) | def layout_feed_forward_chunk(self, attention_output): class LiltEncoder (line 487) | class LiltEncoder(nn.Module): method __init__ (line 489) | def __init__(self, config): method forward (line 495) | def forward( class LiltPooler (line 565) | class LiltPooler(nn.Module): method __init__ (line 566) | def __init__(self, config): method forward (line 571) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LiltPreTrainedModel (line 581) | class LiltPreTrainedModel(PreTrainedModel): method _init_weights (line 593) | def _init_weights(self, module): method _set_gradient_checkpointing (line 609) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 613) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class LiltModel (line 699) | class LiltModel(LiltPreTrainedModel): method __init__ (line 702) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 715) | def get_input_embeddings(self): method set_input_embeddings (line 718) | def set_input_embeddings(self, value): method _prune_heads (line 721) | def _prune_heads(self, heads_to_prune): method forward (line 731) | def forward( class LiltForSequenceClassification (line 849) | class LiltForSequenceClassification(LiltPreTrainedModel): method __init__ (line 853) | def __init__(self, config): method forward (line 866) | def forward( class LiltForTokenClassification (line 969) | class LiltForTokenClassification(LiltPreTrainedModel): method __init__ (line 974) | def __init__(self, config): method forward (line 990) | def forward( class LiltClassificationHead (line 1069) | class LiltClassificationHead(nn.Module): method __init__ (line 1072) | def __init__(self, config): method forward (line 1081) | def forward(self, features, **kwargs): class LiltForQuestionAnswering (line 1098) | class LiltForQuestionAnswering(LiltPreTrainedModel): method __init__ (line 1103) | def __init__(self, config): method forward (line 1115) | def forward( FILE: transformers/models/llama/configuration_llama.py class LlamaConfig (line 31) | class LlamaConfig(PretrainedConfig): method __init__ (line 84) | def __init__( FILE: transformers/models/llama/convert_llama_weights_to_hf.py function compute_intermediate_size (line 71) | def compute_intermediate_size(n): function read_json (line 75) | def read_json(path): function write_json (line 80) | def write_json(text, path): function write_model (line 85) | def write_model(model_path, input_base_path, model_size): function write_tokenizer (line 244) | def write_tokenizer(tokenizer_path, input_tokenizer_path): function main (line 252) | def main(): FILE: transformers/models/llama/modeling_llama.py function _make_causal_mask (line 42) | def _make_causal_mask( function _expand_mask (line 60) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class LlamaRMSNorm (line 74) | class LlamaRMSNorm(nn.Module): method __init__ (line 75) | def __init__(self, hidden_size, eps=1e-6): method forward (line 83) | def forward(self, hidden_states): class LlamaRotaryEmbedding (line 91) | class LlamaRotaryEmbedding(torch.nn.Module): method __init__ (line 92) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 106) | def forward(self, x, seq_len=None): function rotate_half (line 123) | def rotate_half(x): function apply_rotary_pos_emb (line 130) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class LlamaMLP (line 141) | class LlamaMLP(nn.Module): method __init__ (line 142) | def __init__( method forward (line 154) | def forward(self, x, task_types=None): class LlamaAttention (line 161) | class LlamaAttention(nn.Module): method __init__ (line 164) | def __init__(self, config: LlamaConfig): method _shape (line 183) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 186) | def forward( class LlamaDecoderLayer (line 254) | class LlamaDecoderLayer(nn.Module): method __init__ (line 255) | def __init__(self, config: LlamaConfig): method forward (line 267) | def forward( class LlamaPreTrainedModel (line 344) | class LlamaPreTrainedModel(PreTrainedModel): method _init_weights (line 352) | def _init_weights(self, module): method _set_gradient_checkpointing (line 363) | def _set_gradient_checkpointing(self, module, value=False): class LlamaModel (line 436) | class LlamaModel(LlamaPreTrainedModel): method __init__ (line 444) | def __init__(self, config: LlamaConfig): method get_input_embeddings (line 457) | def get_input_embeddings(self): method set_input_embeddings (line 460) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 464) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 488) | def forward( class LlamaForCausalLM (line 621) | class LlamaForCausalLM(LlamaPreTrainedModel): method __init__ (line 622) | def __init__(self, config): method get_input_embeddings (line 631) | def get_input_embeddings(self): method set_input_embeddings (line 634) | def set_input_embeddings(self, value): method get_output_embeddings (line 637) | def get_output_embeddings(self): method set_output_embeddings (line 640) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 643) | def set_decoder(self, decoder): method get_decoder (line 646) | def get_decoder(self): method forward (line 651) | def forward( method prepare_inputs_for_generation (line 740) | def prepare_inputs_for_generation( method _reorder_cache (line 771) | def _reorder_cache(past_key_values, beam_idx): class LlamaForSequenceClassification (line 793) | class LlamaForSequenceClassification(LlamaPreTrainedModel): method __init__ (line 796) | def __init__(self, config): method get_input_embeddings (line 805) | def get_input_embeddings(self): method set_input_embeddings (line 808) | def set_input_embeddings(self, value): method forward (line 812) | def forward( FILE: transformers/models/llama/tokenization_llama.py class LlamaTokenizer (line 49) | class LlamaTokenizer(PreTrainedTokenizer): method __init__ (line 63) | def __init__( method __getstate__ (line 98) | def __getstate__(self): method __setstate__ (line 103) | def __setstate__(self, d): method vocab_size (line 109) | def vocab_size(self): method get_vocab (line 113) | def get_vocab(self): method _tokenize (line 119) | def _tokenize(self, text): method _convert_token_to_id (line 123) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 127) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 132) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 151) | def save_vocabulary(self, save_directory, filename_prefix: Optional[st... method build_inputs_with_special_tokens (line 178) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 189) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 226) | def create_token_type_ids_from_sequences( FILE: transformers/models/llama/tokenization_llama_fast.py class LlamaTokenizerFast (line 37) | class LlamaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 81) | def __init__( method update_post_processor (line 109) | def update_post_processor(self): method add_eos_token (line 129) | def add_eos_token(self): method add_bos_token (line 133) | def add_bos_token(self): method add_eos_token (line 137) | def add_eos_token(self, value): method add_bos_token (line 142) | def add_bos_token(self, value): method save_vocabulary (line 146) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/longformer/configuration_longformer.py class LongformerConfig (line 46) | class LongformerConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class LongformerOnnxConfig (line 153) | class LongformerOnnxConfig(OnnxConfig): method __init__ (line 154) | def __init__(self, config: "PretrainedConfig", task: str = "default", ... method inputs (line 159) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 173) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 180) | def atol_for_validation(self) -> float: method default_onnx_opset (line 190) | def default_onnx_opset(self) -> int: method generate_dummy_inputs (line 194) | def generate_dummy_inputs( FILE: transformers/models/longformer/convert_longformer_original_pytorch_lightning_to_pytorch.py class LightningModel (line 27) | class LightningModel(pl.LightningModule): method __init__ (line 28) | def __init__(self, model): method forward (line 35) | def forward(self): function convert_longformer_qa_checkpoint_to_pytorch (line 39) | def convert_longformer_qa_checkpoint_to_pytorch( FILE: transformers/models/longformer/modeling_longformer.py class LongformerBaseModelOutput (line 56) | class LongformerBaseModelOutput(ModelOutput): class LongformerBaseModelOutputWithPooling (line 99) | class LongformerBaseModelOutputWithPooling(ModelOutput): class LongformerMaskedLMOutput (line 147) | class LongformerMaskedLMOutput(ModelOutput): class LongformerQuestionAnsweringModelOutput (line 193) | class LongformerQuestionAnsweringModelOutput(ModelOutput): class LongformerSequenceClassifierOutput (line 242) | class LongformerSequenceClassifierOutput(ModelOutput): class LongformerMultipleChoiceModelOutput (line 288) | class LongformerMultipleChoiceModelOutput(ModelOutput): class LongformerTokenClassifierOutput (line 336) | class LongformerTokenClassifierOutput(ModelOutput): function _get_question_end_index (line 381) | def _get_question_end_index(input_ids, sep_token_id): function _compute_global_attention_mask (line 397) | def _compute_global_attention_mask(input_ids, sep_token_id, before_sep_t... function create_position_ids_from_input_ids (line 417) | def create_position_ids_from_input_ids(input_ids, padding_idx): class LongformerEmbeddings (line 433) | class LongformerEmbeddings(nn.Module): method __init__ (line 438) | def __init__(self, config): method forward (line 453) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... method create_position_ids_from_inputs_embeds (line 479) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LongformerSelfAttention (line 497) | class LongformerSelfAttention(nn.Module): method __init__ (line 498) | def __init__(self, config, layer_id): method forward (line 533) | def forward( method _pad_and_transpose_last_two_dims (line 702) | def _pad_and_transpose_last_two_dims(hidden_states_padded, padding): method _pad_and_diagonalize (line 713) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 762) | def _chunk(hidden_states, window_overlap, onnx_export: bool = False): method _mask_invalid_locations (line 803) | def _mask_invalid_locations(input_tensor, affected_seq_len) -> torch.T... method _sliding_chunks_query_key_matmul (line 818) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn_probs_value (line 884) | def _sliding_chunks_matmul_attn_probs_value( method _get_global_attn_indices (line 929) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 957) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 987) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 1023) | def _compute_global_attn_output_from_hidden( class LongformerSelfOutput (line 1133) | class LongformerSelfOutput(nn.Module): method __init__ (line 1134) | def __init__(self, config): method forward (line 1140) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LongformerAttention (line 1147) | class LongformerAttention(nn.Module): method __init__ (line 1148) | def __init__(self, config, layer_id=0): method prune_heads (line 1154) | def prune_heads(self, heads): method forward (line 1172) | def forward( class LongformerIntermediate (line 1197) | class LongformerIntermediate(nn.Module): method __init__ (line 1198) | def __init__(self, config): method forward (line 1206) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LongformerOutput (line 1213) | class LongformerOutput(nn.Module): method __init__ (line 1214) | def __init__(self, config): method forward (line 1220) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LongformerLayer (line 1227) | class LongformerLayer(nn.Module): method __init__ (line 1228) | def __init__(self, config, layer_id=0): method forward (line 1236) | def forward( method ff_chunk (line 1264) | def ff_chunk(self, attn_output): class LongformerEncoder (line 1270) | class LongformerEncoder(nn.Module): method __init__ (line 1271) | def __init__(self, config): method forward (line 1277) | def forward( class LongformerPooler (line 1368) | class LongformerPooler(nn.Module): method __init__ (line 1369) | def __init__(self, config): method forward (line 1374) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LongformerLMHead (line 1384) | class LongformerLMHead(nn.Module): method __init__ (line 1387) | def __init__(self, config): method forward (line 1396) | def forward(self, features, **kwargs): method _tie_weights (line 1406) | def _tie_weights(self): class LongformerPreTrainedModel (line 1415) | class LongformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1427) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1443) | def _set_gradient_checkpointing(self, module, value=False): class LongformerModel (line 1535) | class LongformerModel(LongformerPreTrainedModel): method __init__ (line 1551) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1572) | def get_input_embeddings(self): method set_input_embeddings (line 1575) | def set_input_embeddings(self, value): method _prune_heads (line 1578) | def _prune_heads(self, heads_to_prune): method _pad_to_window_size (line 1586) | def _pad_to_window_size( method _merge_to_attention_mask (line 1636) | def _merge_to_attention_mask(self, attention_mask: torch.Tensor, globa... method forward (line 1650) | def forward( class LongformerForMaskedLM (line 1772) | class LongformerForMaskedLM(LongformerPreTrainedModel): method __init__ (line 1776) | def __init__(self, config): method get_output_embeddings (line 1785) | def get_output_embeddings(self): method set_output_embeddings (line 1788) | def set_output_embeddings(self, new_embeddings): method forward (line 1793) | def forward( class LongformerForSequenceClassification (line 1887) | class LongformerForSequenceClassification(LongformerPreTrainedModel): method __init__ (line 1890) | def __init__(self, config): method forward (line 1909) | def forward( class LongformerClassificationHead (line 1990) | class LongformerClassificationHead(nn.Module): method __init__ (line 1993) | def __init__(self, config): method forward (line 1999) | def forward(self, hidden_states, **kwargs): class LongformerForQuestionAnswering (line 2016) | class LongformerForQuestionAnswering(LongformerPreTrainedModel): method __init__ (line 2019) | def __init__(self, config): method forward (line 2031) | def forward( class LongformerForTokenClassification (line 2155) | class LongformerForTokenClassification(LongformerPreTrainedModel): method __init__ (line 2158) | def __init__(self, config): method forward (line 2180) | def forward( class LongformerForMultipleChoice (line 2245) | class LongformerForMultipleChoice(LongformerPreTrainedModel): method __init__ (line 2246) | def __init__(self, config): method forward (line 2264) | def forward( FILE: transformers/models/longformer/modeling_tf_longformer.py class TFLongformerBaseModelOutput (line 69) | class TFLongformerBaseModelOutput(ModelOutput): class TFLongformerBaseModelOutputWithPooling (line 112) | class TFLongformerBaseModelOutputWithPooling(ModelOutput): class TFLongformerMaskedLMOutput (line 160) | class TFLongformerMaskedLMOutput(ModelOutput): class TFLongformerQuestionAnsweringModelOutput (line 206) | class TFLongformerQuestionAnsweringModelOutput(ModelOutput): class TFLongformerSequenceClassifierOutput (line 255) | class TFLongformerSequenceClassifierOutput(ModelOutput): class TFLongformerMultipleChoiceModelOutput (line 301) | class TFLongformerMultipleChoiceModelOutput(ModelOutput): class TFLongformerTokenClassifierOutput (line 349) | class TFLongformerTokenClassifierOutput(ModelOutput): function _compute_global_attention_mask (line 394) | def _compute_global_attention_mask(input_ids_shape, sep_token_indices, b... class TFLongformerLMHead (line 419) | class TFLongformerLMHead(tf.keras.layers.Layer): method __init__ (line 422) | def __init__(self, config, input_embeddings, **kwargs): method build (line 437) | def build(self, input_shape): method get_output_embeddings (line 442) | def get_output_embeddings(self): method set_output_embeddings (line 445) | def set_output_embeddings(self, value): method get_bias (line 449) | def get_bias(self): method set_bias (line 452) | def set_bias(self, value): method call (line 456) | def call(self, hidden_states): class TFLongformerEmbeddings (line 471) | class TFLongformerEmbeddings(tf.keras.layers.Layer): method __init__ (line 476) | def __init__(self, config, **kwargs): method build (line 487) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 511) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 525) | def call( class TFLongformerIntermediate (line 573) | class TFLongformerIntermediate(tf.keras.layers.Layer): method __init__ (line 574) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 586) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLongformerOutput (line 594) | class TFLongformerOutput(tf.keras.layers.Layer): method __init__ (line 595) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 604) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLongformerPooler (line 613) | class TFLongformerPooler(tf.keras.layers.Layer): method __init__ (line 614) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 624) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLongformerSelfOutput (line 634) | class TFLongformerSelfOutput(tf.keras.layers.Layer): method __init__ (line 635) | def __init__(self, config: LongformerConfig, **kwargs): method call (line 644) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFLongformerSelfAttention (line 652) | class TFLongformerSelfAttention(tf.keras.layers.Layer): method __init__ (line 653) | def __init__(self, config, layer_id, **kwargs): method build (line 712) | def build(self, input_shape=None): method call (line 722) | def call( method _sliding_chunks_query_key_matmul (line 913) | def _sliding_chunks_query_key_matmul(self, query, key, window_overlap): method _mask_invalid_locations (line 1030) | def _mask_invalid_locations(input_tensor, window_overlap): method _sliding_chunks_matmul_attn_probs_value (line 1059) | def _sliding_chunks_matmul_attn_probs_value(self, attn_probs, value, w... method _pad_and_transpose_last_two_dims (line 1133) | def _pad_and_transpose_last_two_dims(hidden_states_padded, paddings): method _pad_and_diagonalize (line 1144) | def _pad_and_diagonalize(chunked_hidden_states): method _chunk (line 1196) | def _chunk(hidden_states, window_overlap): method _get_global_attn_indices (line 1226) | def _get_global_attn_indices(is_index_global_attn): method _concat_with_global_key_attn_probs (line 1256) | def _concat_with_global_key_attn_probs( method _compute_attn_output_with_global_indices (line 1310) | def _compute_attn_output_with_global_indices( method _compute_global_attn_output_from_hidden (line 1351) | def _compute_global_attn_output_from_hidden( method reshape_and_transpose (line 1488) | def reshape_and_transpose(self, vector, batch_size): class TFLongformerAttention (line 1498) | class TFLongformerAttention(tf.keras.layers.Layer): method __init__ (line 1499) | def __init__(self, config, layer_id=0, **kwargs): method prune_heads (line 1505) | def prune_heads(self, heads): method call (line 1508) | def call(self, inputs, training=False): class TFLongformerLayer (line 1528) | class TFLongformerLayer(tf.keras.layers.Layer): method __init__ (line 1529) | def __init__(self, config, layer_id=0, **kwargs): method call (line 1536) | def call(self, inputs, training=False): class TFLongformerEncoder (line 1558) | class TFLongformerEncoder(tf.keras.layers.Layer): method __init__ (line 1559) | def __init__(self, config, **kwargs): method call (line 1566) | def call( class TFLongformerMainLayer (line 1637) | class TFLongformerMainLayer(tf.keras.layers.Layer): method __init__ (line 1640) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 1665) | def get_input_embeddings(self): method set_input_embeddings (line 1668) | def set_input_embeddings(self, value): method _prune_heads (line 1672) | def _prune_heads(self, heads_to_prune): method call (line 1680) | def call( method _pad_to_window_size (line 1800) | def _pad_to_window_size( method _merge_to_attention_mask (line 1855) | def _merge_to_attention_mask(attention_mask: tf.Tensor, global_attenti... class TFLongformerPreTrainedModel (line 1869) | class TFLongformerPreTrainedModel(TFPreTrainedModel): method input_signature (line 1879) | def input_signature(self): class TFLongformerModel (line 1999) | class TFLongformerModel(TFLongformerPreTrainedModel): method __init__ (line 2016) | def __init__(self, config, *inputs, **kwargs): method call (line 2023) | def call( class TFLongformerForMaskedLM (line 2058) | class TFLongformerForMaskedLM(TFLongformerPreTrainedModel, TFMaskedLangu... method __init__ (line 2062) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 2068) | def get_lm_head(self): method get_prefix_bias_name (line 2071) | def get_prefix_bias_name(self): method call (line 2085) | def call( class TFLongformerForQuestionAnswering (line 2145) | class TFLongformerForQuestionAnswering(TFLongformerPreTrainedModel, TFQu... method __init__ (line 2149) | def __init__(self, config, *inputs, **kwargs): method call (line 2169) | def call( class TFLongformerClassificationHead (line 2268) | class TFLongformerClassificationHead(tf.keras.layers.Layer): method __init__ (line 2271) | def __init__(self, config, **kwargs): method call (line 2284) | def call(self, hidden_states, training=False): class TFLongformerForSequenceClassification (line 2300) | class TFLongformerForSequenceClassification(TFLongformerPreTrainedModel,... method __init__ (line 2304) | def __init__(self, config, *inputs, **kwargs): method call (line 2319) | def call( class TFLongformerForMultipleChoice (line 2403) | class TFLongformerForMultipleChoice(TFLongformerPreTrainedModel, TFMulti... method __init__ (line 2407) | def __init__(self, config, *inputs, **kwargs): method input_signature (line 2417) | def input_signature(self): method call (line 2433) | def call( class TFLongformerForTokenClassification (line 2517) | class TFLongformerForTokenClassification(TFLongformerPreTrainedModel, TF... method __init__ (line 2522) | def __init__(self, config, *inputs, **kwargs): method call (line 2539) | def call( FILE: transformers/models/longformer/tokenization_longformer.py function bytes_to_unicode (line 76) | def bytes_to_unicode(): function get_pairs (line 101) | def get_pairs(word): class LongformerTokenizer (line 116) | class LongformerTokenizer(PreTrainedTokenizer): method __init__ (line 199) | def __init__( method vocab_size (line 254) | def vocab_size(self): method get_vocab (line 257) | def get_vocab(self): method bpe (line 260) | def bpe(self, token): method _tokenize (line 302) | def _tokenize(self, text): method _convert_token_to_id (line 312) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 316) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 320) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 326) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 355) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 380) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 407) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 430) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: transformers/models/longformer/tokenization_longformer_fast.py class LongformerTokenizerFast (line 91) | class LongformerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 178) | def __init__( method mask_token (line 247) | def mask_token(self) -> str: method mask_token (line 262) | def mask_token(self, value): method _batch_encode_plus (line 273) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 282) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 292) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 296) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 303) | def create_token_type_ids_from_sequences( FILE: transformers/models/longt5/configuration_longt5.py class LongT5Config (line 33) | class LongT5Config(PretrainedConfig): method __init__ (line 89) | def __init__( class LongT5OnnxConfig (line 155) | class LongT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 157) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 176) | def default_onnx_opset(self) -> int: FILE: transformers/models/longt5/convert_longt5x_checkpoint_to_flax.py function convert_t5x_checkpoint_to_flax (line 27) | def convert_t5x_checkpoint_to_flax(t5x_checkpoint_path, config_name, fla... FILE: transformers/models/longt5/modeling_flax_longt5.py function shift_tokens_right (line 59) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... function _pad_to_multiple (line 71) | def _pad_to_multiple(x: jnp.ndarray, block_len: int, axis: int, pad_valu... function _split_into_blocks (line 80) | def _split_into_blocks(x: jnp.ndarray, block_len: int, axis: int) -> jnp... function _concatenate_3_blocks (line 92) | def _concatenate_3_blocks(x: jnp.ndarray, block_axis: int, sequence_axis... function _make_3block_relative_position_ids (line 114) | def _make_3block_relative_position_ids(block_len: int) -> jnp.ndarray: function _mask_local_attention_mask (line 122) | def _mask_local_attention_mask(local_attention_mask: np.ndarray, block_l... function _get_local_attention_mask (line 130) | def _get_local_attention_mask(attention_mask: np.ndarray, block_len: int... function _make_global_fixed_block_ids (line 146) | def _make_global_fixed_block_ids(attention_mask: np.ndarray, global_bloc... function _make_side_relative_position_ids (line 188) | def _make_side_relative_position_ids(attention_mask: np.ndarray, global_... function _create_global_aggregates (line 197) | def _create_global_aggregates(hidden_states: np.ndarray, block_ids: np.n... class FlaxLongT5LayerNorm (line 205) | class FlaxLongT5LayerNorm(nn.Module): method setup (line 211) | def setup(self): method __call__ (line 214) | def __call__(self, hidden_states): class FlaxLongT5DenseActDense (line 226) | class FlaxLongT5DenseActDense(nn.Module): method setup (line 230) | def setup(self): method __call__ (line 249) | def __call__(self, hidden_states, deterministic=True): class FlaxLongT5DenseGatedActDense (line 258) | class FlaxLongT5DenseGatedActDense(nn.Module): method setup (line 262) | def setup(self): method __call__ (line 287) | def __call__(self, hidden_states, deterministic): class FlaxLongT5LayerFF (line 297) | class FlaxLongT5LayerFF(nn.Module): method setup (line 301) | def setup(self): method __call__ (line 312) | def __call__(self, hidden_states, deterministic=True): class FlaxLongT5Attention (line 320) | class FlaxLongT5Attention(nn.Module): method setup (line 326) | def setup(self): method _relative_position_bucket (line 373) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 408) | def compute_bias(self, query_length, key_length): method _split_heads (line 425) | def _split_heads(self, hidden_states): method _merge_heads (line 428) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 432) | def _concatenate_to_cache(self, key, value, query, attention_mask): method _create_position_bias (line 464) | def _create_position_bias( method __call__ (line 488) | def __call__( class FlaxLongT5LocalAttention (line 604) | class FlaxLongT5LocalAttention(nn.Module): method setup (line 609) | def setup(self): method _relative_position_bucket (line 658) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 693) | def compute_bias(self, block_length: int): method _split_heads (line 710) | def _split_heads(self, hidden_states): method _merge_heads (line 713) | def _merge_heads(self, hidden_states): method _create_position_bias (line 716) | def _create_position_bias(self, block_len: int, attention_mask: Option... method __call__ (line 727) | def __call__( class FlaxLongT5TransientGlobalAttention (line 815) | class FlaxLongT5TransientGlobalAttention(nn.Module): method setup (line 820) | def setup(self): method _relative_position_bucket (line 881) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 916) | def compute_bias(self, block_length: int): method compute_side_bias (line 933) | def compute_side_bias(self, attention_mask: np.ndarray, global_segment... method _split_heads (line 958) | def _split_heads(self, hidden_states): method _merge_heads (line 961) | def _merge_heads(self, hidden_states): method _create_position_bias (line 964) | def _create_position_bias(self, block_len: int, attention_mask: Option... method __call__ (line 975) | def __call__( class FlaxLongT5LayerLocalSelfAttention (line 1103) | class FlaxLongT5LayerLocalSelfAttention(nn.Module): method setup (line 1110) | def setup(self): method __call__ (line 1119) | def __call__( class FlaxLongT5LayerTransientGlobalSelfAttention (line 1141) | class FlaxLongT5LayerTransientGlobalSelfAttention(nn.Module): method setup (line 1148) | def setup(self): method __call__ (line 1157) | def __call__( class FlaxLongT5LayerSelfAttention (line 1180) | class FlaxLongT5LayerSelfAttention(nn.Module): method setup (line 1185) | def setup(self): method __call__ (line 1197) | def __call__( class FlaxLongT5LayerCrossAttention (line 1221) | class FlaxLongT5LayerCrossAttention(nn.Module): method setup (line 1225) | def setup(self): method __call__ (line 1234) | def __call__( class FlaxLongT5Block (line 1256) | class FlaxLongT5Block(nn.Module): method setup (line 1261) | def setup(self): method __call__ (line 1290) | def __call__( class FlaxLongT5LayerCollection (line 1342) | class FlaxLongT5LayerCollection(nn.Module): method setup (line 1347) | def setup(self): method __call__ (line 1352) | def __call__( class FlaxLongT5BlockCollection (line 1378) | class FlaxLongT5BlockCollection(nn.Module): method setup (line 1383) | def setup(self): method __call__ (line 1407) | def __call__( class FlaxLongT5Stack (line 1465) | class FlaxLongT5Stack(nn.Module): method setup (line 1471) | def setup(self): method __call__ (line 1482) | def __call__( class FlaxLongT5PreTrainedModel (line 1666) | class FlaxLongT5PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 1676) | def __init__( method enable_gradient_checkpointing (line 1688) | def enable_gradient_checkpointing(self): method init_weights (line 1695) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 1725) | def __call__( method init_cache (line 1774) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1812) | def encode( method decode (line 1870) | def decode( class FlaxLongT5Module (line 2018) | class FlaxLongT5Module(nn.Module): method _get_encoder_module (line 2023) | def _get_encoder_module(self): method _get_decoder_module (line 2026) | def _get_decoder_module(self): method setup (line 2029) | def setup(self): method __call__ (line 2056) | def __call__( class FlaxLongT5Model (line 2108) | class FlaxLongT5Model(FlaxLongT5PreTrainedModel): class FlaxLongT5ForConditionalGenerationModule (line 2143) | class FlaxLongT5ForConditionalGenerationModule(nn.Module): method _get_encoder_module (line 2148) | def _get_encoder_module(self): method _get_decoder_module (line 2151) | def _get_decoder_module(self): method setup (line 2154) | def setup(self): method __call__ (line 2187) | def __call__( class FlaxLongT5ForConditionalGeneration (line 2253) | class FlaxLongT5ForConditionalGeneration(FlaxLongT5PreTrainedModel): method decode (line 2258) | def decode( method prepare_inputs_for_generation (line 2387) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 2416) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/longt5/modeling_longt5.py function _pad_to_multiple (line 63) | def _pad_to_multiple(x: torch.Tensor, block_len: int, dim: int, pad_valu... function _split_into_blocks (line 79) | def _split_into_blocks(x: torch.Tensor, block_len: int, dim: int) -> tor... function _concatenate_3_blocks (line 94) | def _concatenate_3_blocks(x: torch.Tensor, block_dim: int, sequence_dim:... function _make_3block_relative_position_ids (line 119) | def _make_3block_relative_position_ids(block_len: int) -> torch.Tensor: function _mask_local_attention_mask (line 128) | def _mask_local_attention_mask(local_attention_mask: torch.Tensor, block... function _get_local_attention_mask (line 137) | def _get_local_attention_mask(attention_mask: torch.Tensor, block_len: i... function _make_global_fixed_block_ids (line 153) | def _make_global_fixed_block_ids( function _make_side_relative_position_ids (line 202) | def _make_side_relative_position_ids(attention_mask: torch.Tensor, globa... function _create_global_aggregates (line 211) | def _create_global_aggregates( class LongT5LayerNorm (line 224) | class LongT5LayerNorm(nn.Module): method __init__ (line 225) | def __init__(self, hidden_size, eps=1e-6): method forward (line 233) | def forward(self, hidden_states): class LongT5DenseActDense (line 266) | class LongT5DenseActDense(nn.Module): method __init__ (line 267) | def __init__(self, config: LongT5Config): method forward (line 274) | def forward(self, hidden_states): class LongT5DenseGatedActDense (line 288) | class LongT5DenseGatedActDense(nn.Module): method __init__ (line 289) | def __init__(self, config: LongT5Config): method forward (line 297) | def forward(self, hidden_states): class LongT5LayerFF (line 307) | class LongT5LayerFF(nn.Module): method __init__ (line 308) | def __init__(self, config: LongT5Config): method forward (line 318) | def forward(self, hidden_states): class LongT5Attention (line 326) | class LongT5Attention(nn.Module): method __init__ (line 327) | def __init__(self, config: LongT5Config, has_relative_attention_bias=F... method prune_heads (line 350) | def prune_heads(self, heads): method _relative_position_bucket (line 367) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 414) | def compute_bias(self, query_length, key_length, device=None): method forward (line 431) | def forward( class LongT5LocalAttention (line 561) | class LongT5LocalAttention(nn.Module): method __init__ (line 562) | def __init__(self, config: LongT5Config, has_relative_attention_bias: ... method prune_heads (line 588) | def prune_heads(self, heads): method _relative_position_bucket (line 606) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 653) | def compute_bias(self, block_length: int): method forward (line 677) | def forward( class LongT5TransientGlobalAttention (line 753) | class LongT5TransientGlobalAttention(nn.Module): method __init__ (line 754) | def __init__(self, config: LongT5Config, has_relative_attention_bias: ... method prune_heads (line 786) | def prune_heads(self, heads): method _relative_position_bucket (line 804) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 851) | def compute_bias(self, block_length: int): method compute_side_bias (line 875) | def compute_side_bias(self, mask: torch.Tensor, global_segment_ids: to... method forward (line 896) | def forward( class LongT5LayerSelfAttention (line 1018) | class LongT5LayerSelfAttention(nn.Module): method __init__ (line 1019) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1025) | def forward( class LongT5LayerLocalSelfAttention (line 1050) | class LongT5LayerLocalSelfAttention(nn.Module): method __init__ (line 1053) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1059) | def forward( class LongT5LayerTransientGlobalSelfAttention (line 1081) | class LongT5LayerTransientGlobalSelfAttention(nn.Module): method __init__ (line 1084) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1092) | def forward( class LongT5LayerCrossAttention (line 1115) | class LongT5LayerCrossAttention(nn.Module): method __init__ (line 1116) | def __init__(self, config): method forward (line 1122) | def forward( class LongT5Block (line 1151) | class LongT5Block(nn.Module): method __init__ (line 1152) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1173) | def forward( class LongT5PreTrainedModel (line 1274) | class LongT5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 1287) | def dummy_inputs(self): method _init_weights (line 1297) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1344) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 1349) | def _shift_right(self, input_ids): class LongT5Stack (line 1377) | class LongT5Stack(LongT5PreTrainedModel): method __init__ (line 1378) | def __init__(self, config, embed_tokens=None): method get_input_embeddings (line 1401) | def get_input_embeddings(self): method set_input_embeddings (line 1405) | def set_input_embeddings(self, new_embeddings): method forward (line 1408) | def forward( class LongT5Model (line 1765) | class LongT5Model(LongT5PreTrainedModel): method __init__ (line 1774) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 1793) | def get_input_embeddings(self): method set_input_embeddings (line 1796) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1801) | def get_encoder(self): method get_decoder (line 1804) | def get_decoder(self): method _prune_heads (line 1807) | def _prune_heads(self, heads_to_prune): method forward (line 1817) | def forward( class LongT5ForConditionalGeneration (line 1918) | class LongT5ForConditionalGeneration(LongT5PreTrainedModel): method __init__ (line 1928) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 1951) | def get_input_embeddings(self): method set_input_embeddings (line 1954) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1959) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1962) | def get_output_embeddings(self): method get_encoder (line 1965) | def get_encoder(self): method get_decoder (line 1968) | def get_decoder(self): method forward (line 1973) | def forward( method prepare_inputs_for_generation (line 2101) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2128) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2131) | def _reorder_cache(self, past_key_values, beam_idx): class LongT5EncoderModel (line 2160) | class LongT5EncoderModel(LongT5PreTrainedModel): method __init__ (line 2163) | def __init__(self, config: LongT5Config): method get_input_embeddings (line 2175) | def get_input_embeddings(self): method set_input_embeddings (line 2178) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 2182) | def get_encoder(self): method _prune_heads (line 2185) | def _prune_heads(self, heads_to_prune): method forward (line 2195) | def forward( FILE: transformers/models/luke/configuration_luke.py class LukeConfig (line 29) | class LukeConfig(PretrainedConfig): method __init__ (line 96) | def __init__( FILE: transformers/models/luke/convert_luke_original_pytorch_checkpoint_to_pytorch.py function convert_luke_checkpoint (line 28) | def convert_luke_checkpoint(checkpoint_path, metadata_path, entity_vocab... function load_entity_vocab (line 134) | def load_entity_vocab(entity_vocab_path): FILE: transformers/models/luke/modeling_luke.py class BaseLukeModelOutputWithPooling (line 54) | class BaseLukeModelOutputWithPooling(BaseModelOutputWithPooling): class BaseLukeModelOutput (line 85) | class BaseLukeModelOutput(BaseModelOutput): class LukeMaskedLMOutput (line 116) | class LukeMaskedLMOutput(ModelOutput): class EntityClassificationOutput (line 159) | class EntityClassificationOutput(ModelOutput): class EntityPairClassificationOutput (line 190) | class EntityPairClassificationOutput(ModelOutput): class EntitySpanClassificationOutput (line 221) | class EntitySpanClassificationOutput(ModelOutput): class LukeSequenceClassifierOutput (line 252) | class LukeSequenceClassifierOutput(ModelOutput): class LukeTokenClassifierOutput (line 286) | class LukeTokenClassifierOutput(ModelOutput): class LukeQuestionAnsweringModelOutput (line 320) | class LukeQuestionAnsweringModelOutput(ModelOutput): class LukeMultipleChoiceModelOutput (line 357) | class LukeMultipleChoiceModelOutput(ModelOutput): class LukeEmbeddings (line 392) | class LukeEmbeddings(nn.Module): method __init__ (line 397) | def __init__(self, config): method forward (line 414) | def forward( method create_position_ids_from_inputs_embeds (line 447) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class LukeEntityEmbeddings (line 465) | class LukeEntityEmbeddings(nn.Module): method __init__ (line 466) | def __init__(self, config: LukeConfig): method forward (line 480) | def forward( class LukeSelfAttention (line 505) | class LukeSelfAttention(nn.Module): method __init__ (line 506) | def __init__(self, config): method transpose_for_scores (line 530) | def transpose_for_scores(self, x): method forward (line 535) | def forward( class LukeSelfOutput (line 619) | class LukeSelfOutput(nn.Module): method __init__ (line 620) | def __init__(self, config): method forward (line 626) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LukeAttention (line 633) | class LukeAttention(nn.Module): method __init__ (line 634) | def __init__(self, config): method prune_heads (line 640) | def prune_heads(self, heads): method forward (line 643) | def forward( class LukeIntermediate (line 681) | class LukeIntermediate(nn.Module): method __init__ (line 682) | def __init__(self, config): method forward (line 690) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class LukeOutput (line 697) | class LukeOutput(nn.Module): method __init__ (line 698) | def __init__(self, config): method forward (line 704) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class LukeLayer (line 711) | class LukeLayer(nn.Module): method __init__ (line 712) | def __init__(self, config): method forward (line 720) | def forward( method feed_forward_chunk (line 757) | def feed_forward_chunk(self, attention_output): class LukeEncoder (line 763) | class LukeEncoder(nn.Module): method __init__ (line 764) | def __init__(self, config): method forward (line 770) | def forward( class LukePooler (line 848) | class LukePooler(nn.Module): method __init__ (line 849) | def __init__(self, config): method forward (line 854) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class EntityPredictionHeadTransform (line 863) | class EntityPredictionHeadTransform(nn.Module): method __init__ (line 864) | def __init__(self, config): method forward (line 873) | def forward(self, hidden_states): class EntityPredictionHead (line 880) | class EntityPredictionHead(nn.Module): method __init__ (line 881) | def __init__(self, config): method forward (line 888) | def forward(self, hidden_states): class LukePreTrainedModel (line 895) | class LukePreTrainedModel(PreTrainedModel): method _init_weights (line 906) | def _init_weights(self, module: nn.Module): method _set_gradient_checkpointing (line 923) | def _set_gradient_checkpointing(self, module, value=False): class LukeModel (line 1024) | class LukeModel(LukePreTrainedModel): method __init__ (line 1027) | def __init__(self, config: LukeConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 1040) | def get_input_embeddings(self): method set_input_embeddings (line 1043) | def set_input_embeddings(self, value): method get_entity_embeddings (line 1046) | def get_entity_embeddings(self): method set_entity_embeddings (line 1049) | def set_entity_embeddings(self, value): method _prune_heads (line 1052) | def _prune_heads(self, heads_to_prune): method forward (line 1057) | def forward( method get_extended_attention_mask (line 1194) | def get_extended_attention_mask( function create_position_ids_from_input_ids (line 1225) | def create_position_ids_from_input_ids(input_ids, padding_idx): class LukeLMHead (line 1242) | class LukeLMHead(nn.Module): method __init__ (line 1245) | def __init__(self, config): method forward (line 1254) | def forward(self, features, **kwargs): method _tie_weights (line 1264) | def _tie_weights(self): class LukeForMaskedLM (line 1280) | class LukeForMaskedLM(LukePreTrainedModel): method __init__ (line 1293) | def __init__(self, config): method tie_weights (line 1306) | def tie_weights(self): method get_output_embeddings (line 1310) | def get_output_embeddings(self): method set_output_embeddings (line 1313) | def set_output_embeddings(self, new_embeddings): method forward (line 1318) | def forward( class LukeForEntityClassification (line 1425) | class LukeForEntityClassification(LukePreTrainedModel): method __init__ (line 1426) | def __init__(self, config): method forward (line 1440) | def forward( class LukeForEntityPairClassification (line 1540) | class LukeForEntityPairClassification(LukePreTrainedModel): method __init__ (line 1541) | def __init__(self, config): method forward (line 1555) | def forward( class LukeForEntitySpanClassification (line 1660) | class LukeForEntitySpanClassification(LukePreTrainedModel): method __init__ (line 1661) | def __init__(self, config): method forward (line 1675) | def forward( class LukeForSequenceClassification (line 1806) | class LukeForSequenceClassification(LukePreTrainedModel): method __init__ (line 1807) | def __init__(self, config): method forward (line 1825) | def forward( class LukeForTokenClassification (line 1920) | class LukeForTokenClassification(LukePreTrainedModel): method __init__ (line 1921) | def __init__(self, config): method forward (line 1940) | def forward( class LukeForQuestionAnswering (line 2016) | class LukeForQuestionAnswering(LukePreTrainedModel): method __init__ (line 2017) | def __init__(self, config): method forward (line 2034) | def forward( class LukeForMultipleChoice (line 2135) | class LukeForMultipleChoice(LukePreTrainedModel): method __init__ (line 2136) | def __init__(self, config): method forward (line 2154) | def forward( FILE: transformers/models/luke/tokenization_luke.py function bytes_to_unicode (line 154) | def bytes_to_unicode(): function get_pairs (line 179) | def get_pairs(word): class LukeTokenizer (line 193) | class LukeTokenizer(PreTrainedTokenizer): method __init__ (line 294) | def __init__( method vocab_size (line 412) | def vocab_size(self): method get_vocab (line 416) | def get_vocab(self): method bpe (line 420) | def bpe(self, token): method _tokenize (line 463) | def _tokenize(self, text): method _convert_token_to_id (line 474) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 479) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 484) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 491) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 517) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 545) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 569) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method __call__ (line 576) | def __call__( method _encode_plus (line 721) | def _encode_plus( method _batch_encode_plus (line 801) | def _batch_encode_plus( method _check_entity_input_format (line 909) | def _check_entity_input_format(self, entities: Optional[EntityInput], ... method _create_input_sequence (line 927) | def _create_input_sequence( method _batch_prepare_for_model (line 1080) | def _batch_prepare_for_model( method prepare_for_model (line 1162) | def prepare_for_model( method pad (line 1391) | def pad( method _pad (line 1551) | def _pad( method save_vocabulary (line 1690) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/lxmert/configuration_lxmert.py class LxmertConfig (line 29) | class LxmertConfig(PretrainedConfig): method __init__ (line 118) | def __init__( FILE: transformers/models/lxmert/convert_lxmert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: transformers/models/lxmert/modeling_lxmert.py class GeLU (line 51) | class GeLU(nn.Module): method __init__ (line 52) | def __init__(self): method forward (line 55) | def forward(self, x): class LxmertModelOutput (line 60) | class LxmertModelOutput(ModelOutput): class LxmertForQuestionAnsweringOutput (line 106) | class LxmertForQuestionAnsweringOutput(ModelOutput): class LxmertForPreTrainingOutput (line 146) | class LxmertForPreTrainingOutput(ModelOutput): function load_tf_weights_in_lxmert (line 193) | def load_tf_weights_in_lxmert(model, config, tf_checkpoint_path): class LxmertEmbeddings (line 272) | class LxmertEmbeddings(nn.Module): method __init__ (line 275) | def __init__(self, config): method forward (line 286) | def forward(self, input_ids, token_type_ids=None, inputs_embeds=None): class LxmertAttention (line 312) | class LxmertAttention(nn.Module): method __init__ (line 313) | def __init__(self, config, ctx_dim=None): method transpose_for_scores (line 333) | def transpose_for_scores(self, x): method forward (line 341) | def forward(self, hidden_states, context, attention_mask=None, output_... class LxmertAttentionOutput (line 373) | class LxmertAttentionOutput(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 380) | def forward(self, hidden_states, input_tensor): class LxmertCrossAttentionLayer (line 387) | class LxmertCrossAttentionLayer(nn.Module): method __init__ (line 388) | def __init__(self, config): method forward (line 393) | def forward(self, input_tensor, ctx_tensor, ctx_att_mask=None, output_... class LxmertSelfAttentionLayer (line 402) | class LxmertSelfAttentionLayer(nn.Module): method __init__ (line 403) | def __init__(self, config): method forward (line 408) | def forward(self, input_tensor, attention_mask, output_attentions=False): class LxmertIntermediate (line 423) | class LxmertIntermediate(nn.Module): method __init__ (line 424) | def __init__(self, config): method forward (line 429) | def forward(self, hidden_states): class LxmertOutput (line 435) | class LxmertOutput(nn.Module): method __init__ (line 436) | def __init__(self, config): method forward (line 442) | def forward(self, hidden_states, input_tensor): class LxmertLayer (line 449) | class LxmertLayer(nn.Module): method __init__ (line 450) | def __init__(self, config): method forward (line 456) | def forward(self, hidden_states, attention_mask=None, output_attention... class LxmertXLayer (line 465) | class LxmertXLayer(nn.Module): method __init__ (line 466) | def __init__(self, config): method cross_att (line 481) | def cross_att( method self_att (line 504) | def self_att(self, lang_input, lang_attention_mask, visual_input, visu... method output_fc (line 510) | def output_fc(self, lang_input, visual_input): method forward (line 521) | def forward( class LxmertVisualFeatureEncoder (line 556) | class LxmertVisualFeatureEncoder(nn.Module): method __init__ (line 557) | def __init__(self, config): method forward (line 572) | def forward(self, visual_feats, visual_pos): class LxmertEncoder (line 583) | class LxmertEncoder(nn.Module): method __init__ (line 584) | def __init__(self, config): method forward (line 602) | def forward( class LxmertPooler (line 664) | class LxmertPooler(nn.Module): method __init__ (line 665) | def __init__(self, config): method forward (line 670) | def forward(self, hidden_states): class LxmertPredictionHeadTransform (line 679) | class LxmertPredictionHeadTransform(nn.Module): method __init__ (line 680) | def __init__(self, config): method forward (line 686) | def forward(self, hidden_states): class LxmertLMPredictionHead (line 693) | class LxmertLMPredictionHead(nn.Module): method __init__ (line 694) | def __init__(self, config, lxmert_model_embedding_weights): method forward (line 708) | def forward(self, hidden_states): class LxmertVisualAnswerHead (line 714) | class LxmertVisualAnswerHead(nn.Module): method __init__ (line 715) | def __init__(self, config, num_labels): method forward (line 725) | def forward(self, hidden_states): class LxmertVisualObjHead (line 729) | class LxmertVisualObjHead(nn.Module): method __init__ (line 730) | def __init__(self, config): method forward (line 752) | def forward(self, hidden_states): class LxmertPreTrainingHeads (line 760) | class LxmertPreTrainingHeads(nn.Module): method __init__ (line 761) | def __init__(self, config, lxmert_model_embedding_weights): method forward (line 766) | def forward(self, sequence_output, pooled_output): class LxmertPreTrainedModel (line 772) | class LxmertPreTrainedModel(PreTrainedModel): method _init_weights (line 782) | def _init_weights(self, module): class LxmertModel (line 883) | class LxmertModel(LxmertPreTrainedModel): method __init__ (line 884) | def __init__(self, config): method get_input_embeddings (line 892) | def get_input_embeddings(self): method set_input_embeddings (line 895) | def set_input_embeddings(self, new_embeddings): method forward (line 904) | def forward( class LxmertForPreTraining (line 1020) | class LxmertForPreTraining(LxmertPreTrainedModel): method __init__ (line 1023) | def __init__(self, config): method resize_num_qa_labels (line 1078) | def resize_num_qa_labels(self, num_labels): method _resize_qa_labels (line 1102) | def _resize_qa_labels(self, num_labels): method get_qa_logit_layer (line 1108) | def get_qa_logit_layer(self) -> nn.Module: method _set_qa_logit_layer (line 1119) | def _set_qa_logit_layer(self, qa_logit_layer): method _get_resized_qa_labels (line 1122) | def _get_resized_qa_labels(self, cur_qa_logit_layer, num_labels): method forward (line 1151) | def forward( class LxmertForQuestionAnswering (line 1288) | class LxmertForQuestionAnswering(LxmertPreTrainedModel): method __init__ (line 1289) | def __init__(self, config): method resize_num_qa_labels (line 1308) | def resize_num_qa_labels(self, num_labels): method _resize_qa_labels (line 1332) | def _resize_qa_labels(self, num_labels): method get_qa_logit_layer (line 1338) | def get_qa_logit_layer(self) -> nn.Module: method _set_qa_logit_layer (line 1350) | def _set_qa_logit_layer(self, qa_logit_layer): method _get_resized_qa_labels (line 1353) | def _get_resized_qa_labels(self, cur_qa_logit_layer, num_labels): method forward (line 1386) | def forward( FILE: transformers/models/lxmert/modeling_tf_lxmert.py class TFLxmertModelOutput (line 61) | class TFLxmertModelOutput(ModelOutput): class TFLxmertForPreTrainingOutput (line 107) | class TFLxmertForPreTrainingOutput(ModelOutput): class TFLxmertVisualFeatureEncoder (line 154) | class TFLxmertVisualFeatureEncoder(tf.keras.layers.Layer): method __init__ (line 155) | def __init__(self, config, **kwargs): method call (line 178) | def call(self, visn_input, training=False): class TFLxmertEmbeddings (line 191) | class TFLxmertEmbeddings(tf.keras.layers.Layer): method __init__ (line 194) | def __init__(self, config, **kwargs): method build (line 204) | def build(self, input_shape): method call (line 228) | def call(self, input_ids=None, token_type_ids=None, inputs_embeds=None... class TFLxmertAttention (line 256) | class TFLxmertAttention(tf.keras.layers.Layer): method __init__ (line 257) | def __init__(self, config, **kwargs): method transpose_for_scores (line 288) | def transpose_for_scores(self, x, batch_size): method call (line 293) | def call(self, hidden_states, context, attention_mask, output_attentio... class TFLxmertIntermediate (line 332) | class TFLxmertIntermediate(tf.keras.layers.Layer): method __init__ (line 333) | def __init__(self, config, **kwargs): method call (line 345) | def call(self, hidden_states): class TFLxmertOutput (line 351) | class TFLxmertOutput(tf.keras.layers.Layer): method __init__ (line 352) | def __init__(self, config, **kwargs): method call (line 363) | def call(self, hidden_states, input_tensor, training=False): class TFLxmertAttentionOutput (line 370) | class TFLxmertAttentionOutput(tf.keras.layers.Layer): method __init__ (line 371) | def __init__(self, config, **kwargs): method call (line 381) | def call(self, hidden_states, input_tensor, training=False): class TFLxmertSelfAttentionLayer (line 388) | class TFLxmertSelfAttentionLayer(tf.keras.layers.Layer): method __init__ (line 389) | def __init__(self, config, **kwargs): method call (line 394) | def call(self, input_tensor, attention_mask, output_attentions, traini... class TFLxmertCrossAttentionLayer (line 403) | class TFLxmertCrossAttentionLayer(tf.keras.layers.Layer): method __init__ (line 404) | def __init__(self, config, **kwargs): method call (line 409) | def call( class TFLxmertLayer (line 425) | class TFLxmertLayer(tf.keras.layers.Layer): method __init__ (line 426) | def __init__(self, config, **kwargs): method call (line 432) | def call(self, hidden_states, attention_mask, output_attentions, train... class TFLxmertXLayer (line 441) | class TFLxmertXLayer(tf.keras.layers.Layer): method __init__ (line 442) | def __init__(self, config, **kwargs): method cross_att (line 456) | def cross_att( method self_att (line 489) | def self_att( method output_fc (line 503) | def output_fc(self, lang_input, visn_input, training=False): method call (line 513) | def call( class TFLxmertEncoder (line 546) | class TFLxmertEncoder(tf.keras.layers.Layer): method __init__ (line 547) | def __init__(self, config, **kwargs): method call (line 564) | def call( class TFLxmertMainLayer (line 636) | class TFLxmertMainLayer(tf.keras.layers.Layer): method __init__ (line 639) | def __init__(self, config, **kwargs): method get_input_embeddings (line 655) | def get_input_embeddings(self): method set_input_embeddings (line 658) | def set_input_embeddings(self, value): method _prune_heads (line 662) | def _prune_heads(self, heads_to_prune): method call (line 666) | def call( class TFLxmertPreTrainedModel (line 775) | class TFLxmertPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 785) | def dummy_inputs(self): method input_signature (line 805) | def input_signature(self): class TFLxmertModel (line 927) | class TFLxmertModel(TFLxmertPreTrainedModel): method __init__ (line 928) | def __init__(self, config, *inputs, **kwargs): method call (line 939) | def call( class TFLxmertPooler (line 970) | class TFLxmertPooler(tf.keras.layers.Layer): method __init__ (line 971) | def __init__(self, config, **kwargs): method call (line 980) | def call(self, hidden_states): class TFLxmertPredictionHeadTransform (line 989) | class TFLxmertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 990) | def __init__(self, config: LxmertConfig, **kwargs): method call (line 1006) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLxmertLMPredictionHead (line 1015) | class TFLxmertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 1016) | def __init__(self, config: LxmertConfig, input_embeddings: tf.keras.la... method build (line 1028) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 1033) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 1036) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 1040) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 1043) | def set_bias(self, value: tf.Variable): method call (line 1047) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFLxmertMLMHead (line 1059) | class TFLxmertMLMHead(tf.keras.layers.Layer): method __init__ (line 1060) | def __init__(self, config: LxmertConfig, input_embeddings: tf.keras.la... method call (line 1065) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFLxmertPreTrainingHeads (line 1071) | class TFLxmertPreTrainingHeads(tf.keras.layers.Layer): method __init__ (line 1072) | def __init__(self, config, input_embeddings, **kwargs): method call (line 1082) | def call(self, sequence_output, pooled_output): class TFLxmertVisualAnswerHead (line 1088) | class TFLxmertVisualAnswerHead(tf.keras.layers.Layer): method __init__ (line 1089) | def __init__(self, config, num_labels, **kwargs): method call (line 1105) | def call(self, hidden_states): class TFLxmertVisualObjHead (line 1114) | class TFLxmertVisualObjHead(tf.keras.layers.Layer): method __init__ (line 1115) | def __init__(self, config, **kwargs): method call (line 1140) | def call(self, hidden_states): class TFLxmertForPreTraining (line 1149) | class TFLxmertForPreTraining(TFLxmertPreTrainedModel): method __init__ (line 1150) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 1202) | def dummy_inputs(self): method get_lm_head (line 1242) | def get_lm_head(self): method get_prefix_bias_name (line 1245) | def get_prefix_bias_name(self): method call (line 1252) | def call( FILE: transformers/models/lxmert/tokenization_lxmert.py function load_vocab (line 45) | def load_vocab(vocab_file): function whitespace_tokenize (line 57) | def whitespace_tokenize(text): class LxmertTokenizer (line 67) | class LxmertTokenizer(PreTrainedTokenizer): method __init__ (line 114) | def __init__( method do_lower_case (line 161) | def do_lower_case(self): method vocab_size (line 165) | def vocab_size(self): method get_vocab (line 168) | def get_vocab(self): method _tokenize (line 171) | def _tokenize(self, text): method _convert_token_to_id (line 184) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 188) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 192) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 197) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 222) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 250) | def create_token_type_ids_from_sequences( method save_vocabulary (line 279) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 301) | class BasicTokenizer(object): method __init__ (line 321) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 329) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 366) | def _run_strip_accents(self, text): method _run_split_on_punc (line 377) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 399) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 412) | def _is_chinese_char(self, cp): method _clean_text (line 436) | def _clean_text(self, text): class WordpieceTokenizer (line 451) | class WordpieceTokenizer(object): method __init__ (line 454) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 459) | def tokenize(self, text): FILE: transformers/models/lxmert/tokenization_lxmert_fast.py class LxmertTokenizerFast (line 48) | class LxmertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 94) | def __init__( method build_inputs_with_special_tokens (line 136) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 160) | def create_token_type_ids_from_sequences( method save_vocabulary (line 189) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/m2m_100/configuration_m2m_100.py class M2M100Config (line 34) | class M2M100Config(PretrainedConfig): method __init__ (line 106) | def __init__( class M2M100OnnxConfig (line 163) | class M2M100OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 165) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 188) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 215) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( FILE: transformers/models/m2m_100/convert_m2m100_original_checkpoint_to_pytorch.py function remove_ignore_keys_ (line 23) | def remove_ignore_keys_(state_dict): function make_linear_from_emb (line 38) | def make_linear_from_emb(emb): function convert_fairseq_m2m100_checkpoint_from_disk (line 45) | def convert_fairseq_m2m100_checkpoint_from_disk(checkpoint_path): FILE: transformers/models/m2m_100/modeling_m2m_100.py function shift_tokens_right (line 59) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 76) | def _make_causal_mask( function _expand_mask (line 94) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function create_position_ids_from_input_ids (line 108) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class M2M100SinusoidalPositionalEmbedding (line 119) | class M2M100SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 122) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 129) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 138) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 159) | def forward( method create_position_ids_from_inputs_embeds (line 179) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class M2M100Attention (line 198) | class M2M100Attention(nn.Module): method __init__ (line 201) | def __init__( method _shape (line 228) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 231) | def forward( class M2M100EncoderLayer (line 353) | class M2M100EncoderLayer(nn.Module): method __init__ (line 354) | def __init__(self, config: M2M100Config): method forward (line 370) | def forward( class M2M100DecoderLayer (line 422) | class M2M100DecoderLayer(nn.Module): method __init__ (line 423) | def __init__(self, config: M2M100Config): method forward (line 449) | def forward( class M2M100PreTrainedModel (line 539) | class M2M100PreTrainedModel(PreTrainedModel): method _init_weights (line 545) | def _init_weights(self, module): method _set_gradient_checkpointing (line 556) | def _set_gradient_checkpointing(self, module, value=False): class M2M100Encoder (line 684) | class M2M100Encoder(M2M100PreTrainedModel): method __init__ (line 694) | def __init__(self, config: M2M100Config, embed_tokens: Optional[nn.Emb... method forward (line 722) | def forward( class M2M100Decoder (line 864) | class M2M100Decoder(M2M100PreTrainedModel): method __init__ (line 873) | def __init__(self, config: M2M100Config, embed_tokens: Optional[nn.Emb... method forward (line 898) | def forward( class M2M100Model (line 1140) | class M2M100Model(M2M100PreTrainedModel): method __init__ (line 1150) | def __init__(self, config: M2M100Config): method get_input_embeddings (line 1162) | def get_input_embeddings(self): method set_input_embeddings (line 1165) | def set_input_embeddings(self, value): method get_encoder (line 1170) | def get_encoder(self): method get_decoder (line 1173) | def get_decoder(self): method forward (line 1182) | def forward( class M2M100ForConditionalGeneration (line 1259) | class M2M100ForConditionalGeneration(M2M100PreTrainedModel): method __init__ (line 1273) | def __init__(self, config: M2M100Config): method get_encoder (line 1281) | def get_encoder(self): method get_decoder (line 1284) | def get_decoder(self): method resize_token_embeddings (line 1287) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1291) | def get_output_embeddings(self): method set_output_embeddings (line 1294) | def set_output_embeddings(self, new_embeddings): method forward (line 1300) | def forward( method prepare_inputs_for_generation (line 1377) | def prepare_inputs_for_generation( method _reorder_cache (line 1406) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/m2m_100/tokenization_m2m_100.py class M2M100Tokenizer (line 64) | class M2M100Tokenizer(PreTrainedTokenizer): method __init__ (line 131) | def __init__( method vocab_size (line 196) | def vocab_size(self) -> int: method src_lang (line 200) | def src_lang(self) -> str: method src_lang (line 204) | def src_lang(self, new_src_lang: str) -> None: method _tokenize (line 208) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 211) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 216) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 222) | def convert_tokens_to_string(self, tokens): method get_special_tokens_mask (line 236) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 266) | def build_inputs_with_special_tokens( method get_vocab (line 293) | def get_vocab(self) -> Dict: method __getstate__ (line 298) | def __getstate__(self) -> Dict: method __setstate__ (line 303) | def __setstate__(self, d: Dict) -> None: method save_vocabulary (line 312) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 334) | def prepare_seq2seq_batch( method _build_translation_inputs (line 347) | def _build_translation_inputs(self, raw_inputs, src_lang: Optional[str... method _switch_to_input_mode (line 357) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 360) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 363) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 370) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method get_lang_token (line 377) | def get_lang_token(self, lang: str) -> str: method get_lang_id (line 380) | def get_lang_id(self, lang: str) -> int: function load_spm (line 385) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function load_json (line 391) | def load_json(path: str) -> Union[Dict, List]: function save_json (line 396) | def save_json(data, path: str) -> None: FILE: transformers/models/marian/configuration_marian.py class MarianConfig (line 34) | class MarianConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class MarianOnnxConfig (line 169) | class MarianOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 172) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 217) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 229) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 297) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_encoder_and_decoder (line 337) | def _generate_dummy_inputs_for_encoder_and_decoder( method generate_dummy_inputs (line 363) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 384) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method atol_for_validation (line 393) | def atol_for_validation(self) -> float: FILE: transformers/models/marian/convert_marian_tatoeba_to_pytorch.py class TatoebaConverter (line 44) | class TatoebaConverter: method __init__ (line 58) | def __init__(self, save_dir="marian_converted"): method convert_models (line 76) | def convert_models(self, tatoeba_ids, dry_run=False): method expand_group_to_two_letter_codes (line 93) | def expand_group_to_two_letter_codes(self, grp_name): method is_group (line 96) | def is_group(self, code, name): method get_tags (line 99) | def get_tags(self, code, name): method resolve_lang_code (line 111) | def resolve_lang_code(self, src, tgt) -> Tuple[str, str]: method model_type_info_from_model_name (line 117) | def model_type_info_from_model_name(name): method write_model_card (line 131) | def write_model_card(self, model_dict, dry_run=False) -> str: method download_lang_info (line 279) | def download_lang_info(self): method parse_metadata (line 288) | def parse_metadata(self, model_name, repo_path=DEFAULT_MODEL_DIR, meth... function l2front_matter (line 1301) | def l2front_matter(langs): function dedup (line 1305) | def dedup(lst): FILE: transformers/models/marian/convert_marian_to_pytorch.py function remove_suffix (line 34) | def remove_suffix(text: str, suffix: str): function remove_prefix (line 40) | def remove_prefix(text: str, prefix: str): function convert_encoder_layer (line 46) | def convert_encoder_layer(opus_dict, layer_prefix: str, converter: dict): function load_layers_ (line 57) | def load_layers_(layer_lst: nn.ModuleList, opus_state: dict, converter, ... function find_pretrained_model (line 64) | def find_pretrained_model(src_lang: str, tgt_lang: str) -> List[str]: function add_emb_entries (line 76) | def add_emb_entries(wemb, final_bias, n_special_tokens=1): function _cast_yaml_str (line 85) | def _cast_yaml_str(v): function cast_marian_config (line 97) | def cast_marian_config(raw_cfg: Dict[str, str]) -> Dict: function load_config_from_state_dict (line 104) | def load_config_from_state_dict(opus_dict): function find_model_file (line 112) | def find_model_file(dest_dir): # this one better function convert_opus_name_to_hf_name (line 166) | def convert_opus_name_to_hf_name(x): function convert_hf_name_to_opus_name (line 173) | def convert_hf_name_to_opus_name(hf_model_name): function get_system_metadata (line 185) | def get_system_metadata(repo_root): function write_model_card (line 210) | def write_model_card( function make_registry (line 281) | def make_registry(repo_path="Opus-MT-train/models"): function convert_all_sentencepiece_models (line 298) | def convert_all_sentencepiece_models(model_list=None, repo_path=None, de... function lmap (line 318) | def lmap(f, x) -> List: function fetch_test_set (line 322) | def fetch_test_set(test_set_url): function convert_whole_dir (line 336) | def convert_whole_dir(path=Path("marian_ckpt/")): function _parse_readme (line 344) | def _parse_readme(lns): function save_tokenizer_config (line 367) | def save_tokenizer_config(dest_dir: Path, separate_vocabs=False): function add_to_vocab_ (line 373) | def add_to_vocab_(vocab: Dict[str, int], special_tokens: List[str]): function find_vocab_file (line 384) | def find_vocab_file(model_dir): function find_src_vocab_file (line 388) | def find_src_vocab_file(model_dir): function find_tgt_vocab_file (line 392) | def find_tgt_vocab_file(model_dir): function add_special_tokens_to_vocab (line 396) | def add_special_tokens_to_vocab(model_dir: Path, separate_vocab=False) -... function check_equal (line 417) | def check_equal(marian_cfg, k1, k2): function check_marian_cfg_assumptions (line 423) | def check_marian_cfg_assumptions(marian_cfg): class OpusState (line 477) | class OpusState: method __init__ (line 478) | def __init__(self, source_dir, eos_token_id=0): method _check_layer_entries (line 562) | def _check_layer_entries(self): method extra_keys (line 574) | def extra_keys(self): method sub_keys (line 587) | def sub_keys(self, layer_prefix): method load_tokenizer (line 590) | def load_tokenizer(self): method load_marian_model (line 595) | def load_marian_model(self) -> MarianMTModel: function download_and_unzip (line 648) | def download_and_unzip(url, dest_dir): function convert (line 659) | def convert(source_dir: Path, dest_dir): function load_yaml (line 677) | def load_yaml(path): function save_json (line 684) | def save_json(content: Union[Dict, List], path: str) -> None: function unzip (line 689) | def unzip(zip_path: str, dest_dir: str) -> None: FILE: transformers/models/marian/modeling_flax_marian.py function create_sinusoidal_positions (line 219) | def create_sinusoidal_positions(n_pos, dim): function shift_tokens_right (line 230) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int, decode... class FlaxMarianAttention (line 243) | class FlaxMarianAttention(nn.Module): method setup (line 252) | def setup(self) -> None: method _split_heads (line 278) | def _split_heads(self, hidden_states): method _merge_heads (line 281) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 285) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 316) | def __call__( class FlaxMarianEncoderLayer (line 411) | class FlaxMarianEncoderLayer(nn.Module): method setup (line 415) | def setup(self) -> None: method __call__ (line 438) | def __call__( class FlaxMarianEncoderLayerCollection (line 469) | class FlaxMarianEncoderLayerCollection(nn.Module): method setup (line 473) | def setup(self): method __call__ (line 480) | def __call__( class FlaxMarianDecoderLayer (line 524) | class FlaxMarianDecoderLayer(nn.Module): method setup (line 528) | def setup(self) -> None: method __call__ (line 561) | def __call__( class FlaxMarianDecoderLayerCollection (line 613) | class FlaxMarianDecoderLayerCollection(nn.Module): method setup (line 617) | def setup(self): method __call__ (line 624) | def __call__( class FlaxMarianEncoder (line 683) | class FlaxMarianEncoder(nn.Module): method setup (line 688) | def setup(self): method __call__ (line 698) | def __call__( class FlaxMarianDecoder (line 739) | class FlaxMarianDecoder(nn.Module): method setup (line 744) | def setup(self): method __call__ (line 754) | def __call__( class FlaxMarianModule (line 804) | class FlaxMarianModule(nn.Module): method setup (line 808) | def setup(self): method _get_encoder_module (line 818) | def _get_encoder_module(self): method _get_decoder_module (line 821) | def _get_decoder_module(self): method __call__ (line 824) | def __call__( class FlaxMarianPreTrainedModel (line 873) | class FlaxMarianPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 878) | def __init__( method init_weights (line 890) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 926) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 964) | def encode( method decode (line 1028) | def decode( method __call__ (line 1141) | def __call__( class FlaxMarianModel (line 1205) | class FlaxMarianModel(FlaxMarianPreTrainedModel): class FlaxMarianMTModule (line 1214) | class FlaxMarianMTModule(nn.Module): method setup (line 1219) | def setup(self): method _get_encoder_module (line 1229) | def _get_encoder_module(self): method _get_decoder_module (line 1232) | def _get_decoder_module(self): method __call__ (line 1235) | def __call__( class FlaxMarianMTModel (line 1289) | class FlaxMarianMTModel(FlaxMarianPreTrainedModel): method decode (line 1295) | def decode( method _adapt_logits_for_beam_search (line 1430) | def _adapt_logits_for_beam_search(self, logits): method prepare_inputs_for_generation (line 1435) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1466) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/marian/modeling_marian.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 78) | def _make_causal_mask( function _expand_mask (line 96) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MarianSinusoidalPositionalEmbedding (line 110) | class MarianSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 113) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 118) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 135) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class MarianAttention (line 145) | class MarianAttention(nn.Module): method __init__ (line 148) | def __init__( method _shape (line 175) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 178) | def forward( class MarianEncoderLayer (line 300) | class MarianEncoderLayer(nn.Module): method __init__ (line 301) | def __init__(self, config: MarianConfig): method forward (line 317) | def forward( class MarianDecoderLayer (line 369) | class MarianDecoderLayer(nn.Module): method __init__ (line 370) | def __init__(self, config: MarianConfig): method forward (line 396) | def forward( class MarianPreTrainedModel (line 486) | class MarianPreTrainedModel(PreTrainedModel): method _init_weights (line 491) | def _init_weights(self, module: Union[nn.Linear, nn.Embedding, MarianS... method _set_gradient_checkpointing (line 504) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 509) | def dummy_inputs(self): class MarianEncoder (line 652) | class MarianEncoder(MarianPreTrainedModel): method __init__ (line 662) | def __init__(self, config: MarianConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 687) | def get_input_embeddings(self): method set_input_embeddings (line 690) | def set_input_embeddings(self, value): method forward (line 693) | def forward( class MarianDecoder (line 822) | class MarianDecoder(MarianPreTrainedModel): method __init__ (line 831) | def __init__(self, config: MarianConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 853) | def get_input_embeddings(self): method set_input_embeddings (line 856) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 860) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 883) | def forward( class MarianModel (line 1100) | class MarianModel(MarianPreTrainedModel): method __init__ (line 1103) | def __init__(self, config: MarianConfig): method get_input_embeddings (line 1125) | def get_input_embeddings(self): method set_input_embeddings (line 1129) | def set_input_embeddings(self, value): method get_decoder_input_embeddings (line 1137) | def get_decoder_input_embeddings(self): method set_decoder_input_embeddings (line 1145) | def set_decoder_input_embeddings(self, value): method get_encoder (line 1154) | def get_encoder(self): method get_decoder (line 1157) | def get_decoder(self): method resize_decoder_token_embeddings (line 1160) | def resize_decoder_token_embeddings(self, new_num_tokens: int) -> nn.E... method forward (line 1186) | def forward( class MarianMTModel (line 1286) | class MarianMTModel(MarianPreTrainedModel): method __init__ (line 1300) | def __init__(self, config: MarianConfig): method get_encoder (line 1311) | def get_encoder(self): method get_decoder (line 1314) | def get_decoder(self): method resize_token_embeddings (line 1317) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_token_embeddings (line 1323) | def _resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method resize_decoder_token_embeddings (line 1344) | def resize_decoder_token_embeddings(self, new_num_tokens): method _resize_final_logits_bias (line 1376) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1385) | def get_output_embeddings(self): method set_output_embeddings (line 1388) | def set_output_embeddings(self, new_embeddings: nn.Embedding): method tie_weights (line 1391) | def tie_weights(self): method forward (line 1416) | def forward( method prepare_inputs_for_generation (line 1495) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1523) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method adjust_logits_during_generation (line 1526) | def adjust_logits_during_generation(self, logits, cur_len): method _reorder_cache (line 1531) | def _reorder_cache(past_key_values, beam_idx): class MarianDecoderWrapper (line 1542) | class MarianDecoderWrapper(MarianPreTrainedModel): method __init__ (line 1548) | def __init__(self, config): method forward (line 1552) | def forward(self, *args, **kwargs): class MarianForCausalLM (line 1557) | class MarianForCausalLM(MarianPreTrainedModel): method __init__ (line 1560) | def __init__(self, config): method get_input_embeddings (line 1572) | def get_input_embeddings(self): method set_input_embeddings (line 1575) | def set_input_embeddings(self, value): method get_output_embeddings (line 1578) | def get_output_embeddings(self): method set_output_embeddings (line 1581) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1584) | def set_decoder(self, decoder): method get_decoder (line 1587) | def get_decoder(self): method forward (line 1591) | def forward( method prepare_inputs_for_generation (line 1735) | def prepare_inputs_for_generation( method _reorder_cache (line 1753) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/marian/modeling_tf_marian.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 89) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 107) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFMarianSinusoidalPositionalEmbedding (line 120) | class TFMarianSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 123) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 132) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 151) | def _init_weight(n_pos: int, dim: int): method call (line 168) | def call( class TFMarianAttention (line 179) | class TFMarianAttention(tf.keras.layers.Layer): method __init__ (line 182) | def __init__( method _shape (line 210) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 213) | def call( class TFMarianEncoderLayer (line 333) | class TFMarianEncoderLayer(tf.keras.layers.Layer): method __init__ (line 334) | def __init__(self, config: MarianConfig, **kwargs): method call (line 348) | def call( class TFMarianDecoderLayer (line 390) | class TFMarianDecoderLayer(tf.keras.layers.Layer): method __init__ (line 391) | def __init__(self, config: MarianConfig, **kwargs): method call (line 418) | def call( class TFMarianPreTrainedModel (line 499) | class TFMarianPreTrainedModel(TFPreTrainedModel): class TFMarianEncoder (line 648) | class TFMarianEncoder(tf.keras.layers.Layer): method __init__ (line 658) | def __init__(self, config: MarianConfig, embed_tokens: Optional[tf.ker... method get_embed_tokens (line 675) | def get_embed_tokens(self): method set_embed_tokens (line 678) | def set_embed_tokens(self, embed_tokens): method call (line 682) | def call( class TFMarianDecoder (line 811) | class TFMarianDecoder(tf.keras.layers.Layer): method __init__ (line 821) | def __init__(self, config: MarianConfig, embed_tokens: Optional[tf.ker... method get_embed_tokens (line 837) | def get_embed_tokens(self): method set_embed_tokens (line 840) | def set_embed_tokens(self, embed_tokens): method call (line 844) | def call( class TFMarianMainLayer (line 1043) | class TFMarianMainLayer(tf.keras.layers.Layer): method __init__ (line 1046) | def __init__(self, config: MarianConfig, **kwargs): method get_input_embeddings (line 1062) | def get_input_embeddings(self): method set_input_embeddings (line 1065) | def set_input_embeddings(self, new_embeddings): method call (line 1071) | def call( class TFMarianModel (line 1157) | class TFMarianModel(TFMarianPreTrainedModel): method __init__ (line 1158) | def __init__(self, config: MarianConfig, *inputs, **kwargs): method get_encoder (line 1163) | def get_encoder(self): method get_decoder (line 1166) | def get_decoder(self): method call (line 1176) | def call( method serving_output (line 1220) | def serving_output(self, output): class BiasLayer (line 1241) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1247) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1254) | def call(self, x): class TFMarianMTModel (line 1262) | class TFMarianMTModel(TFMarianPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 1268) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1277) | def get_decoder(self): method get_encoder (line 1280) | def get_encoder(self): method get_output_embeddings (line 1283) | def get_output_embeddings(self): method set_output_embeddings (line 1286) | def set_output_embeddings(self, value): method get_bias (line 1289) | def get_bias(self): method set_bias (line 1292) | def set_bias(self, value): method call (line 1304) | def call( method serving_output (line 1386) | def serving_output(self, output): method prepare_inputs_for_generation (line 1406) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1444) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method adjust_logits_during_generation (line 1447) | def adjust_logits_during_generation( FILE: transformers/models/marian/tokenization_marian.py class MarianTokenizer (line 61) | class MarianTokenizer(PreTrainedTokenizer): method __init__ (line 127) | def __init__( method _setup_normalizer (line 188) | def _setup_normalizer(self): method normalize (line 197) | def normalize(self, x: str) -> str: method _convert_token_to_id (line 201) | def _convert_token_to_id(self, token): method remove_language_code (line 204) | def remove_language_code(self, text: str): method _tokenize (line 210) | def _tokenize(self, text: str) -> List[str]: method _convert_id_to_token (line 215) | def _convert_id_to_token(self, index: int) -> str: method batch_decode (line 219) | def batch_decode(self, sequences, **kwargs): method decode (line 242) | def decode(self, token_ids, **kwargs): method convert_tokens_to_string (line 268) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method build_inputs_with_special_tokens (line 283) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method _switch_to_input_mode (line 290) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 294) | def _switch_to_target_mode(self): method vocab_size (line 300) | def vocab_size(self) -> int: method save_vocabulary (line 303) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_vocab (line 348) | def get_vocab(self) -> Dict: method get_src_vocab (line 351) | def get_src_vocab(self): method get_tgt_vocab (line 354) | def get_tgt_vocab(self): method __getstate__ (line 357) | def __getstate__(self) -> Dict: method __setstate__ (line 364) | def __setstate__(self, d: Dict) -> None: method num_special_tokens_to_add (line 375) | def num_special_tokens_to_add(self, *args, **kwargs): method _special_token_mask (line 379) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 384) | def get_special_tokens_mask( function load_spm (line 396) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function save_json (line 402) | def save_json(data, path: str) -> None: function load_json (line 407) | def load_json(path: str) -> Union[Dict, List]: FILE: transformers/models/markuplm/configuration_markuplm.py class MarkupLMConfig (line 29) | class MarkupLMConfig(PretrainedConfig): method __init__ (line 102) | def __init__( FILE: transformers/models/markuplm/feature_extraction_markuplm.py class MarkupLMFeatureExtractor (line 33) | class MarkupLMFeatureExtractor(FeatureExtractionMixin): method __init__ (line 43) | def __init__(self, **kwargs): method xpath_soup (line 47) | def xpath_soup(self, element): method get_three_from_single (line 62) | def get_three_from_single(self, html_string): method construct_xpath (line 91) | def construct_xpath(self, xpath_tags, xpath_subscripts): method __call__ (line 99) | def __call__(self, html_strings) -> BatchFeature: FILE: transformers/models/markuplm/modeling_markuplm.py class XPathEmbeddings (line 61) | class XPathEmbeddings(nn.Module): method __init__ (line 67) | def __init__(self, config): method forward (line 93) | def forward(self, xpath_tags_seq=None, xpath_subs_seq=None): function create_position_ids_from_input_ids (line 112) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... class MarkupLMEmbeddings (line 128) | class MarkupLMEmbeddings(nn.Module): method __init__ (line 131) | def __init__(self, config): method create_position_ids_from_inputs_embeds (line 154) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): method forward (line 171) | def forward( class MarkupLMSelfOutput (line 225) | class MarkupLMSelfOutput(nn.Module): method __init__ (line 226) | def __init__(self, config): method forward (line 232) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MarkupLMIntermediate (line 240) | class MarkupLMIntermediate(nn.Module): method __init__ (line 241) | def __init__(self, config): method forward (line 249) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMOutput (line 256) | class MarkupLMOutput(nn.Module): method __init__ (line 257) | def __init__(self, config): method forward (line 263) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MarkupLMPooler (line 271) | class MarkupLMPooler(nn.Module): method __init__ (line 272) | def __init__(self, config): method forward (line 277) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMPredictionHeadTransform (line 287) | class MarkupLMPredictionHeadTransform(nn.Module): method __init__ (line 288) | def __init__(self, config): method forward (line 297) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MarkupLMLMPredictionHead (line 305) | class MarkupLMLMPredictionHead(nn.Module): method __init__ (line 306) | def __init__(self, config): method forward (line 319) | def forward(self, hidden_states): class MarkupLMOnlyMLMHead (line 326) | class MarkupLMOnlyMLMHead(nn.Module): method __init__ (line 327) | def __init__(self, config): method forward (line 331) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MarkupLMSelfAttention (line 337) | class MarkupLMSelfAttention(nn.Module): method __init__ (line 338) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 364) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 369) | def forward( class MarkupLMAttention (line 472) | class MarkupLMAttention(nn.Module): method __init__ (line 473) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 479) | def prune_heads(self, heads): method forward (line 497) | def forward( class MarkupLMLayer (line 522) | class MarkupLMLayer(nn.Module): method __init__ (line 523) | def __init__(self, config): method forward (line 537) | def forward( method feed_forward_chunk (line 602) | def feed_forward_chunk(self, attention_output): class MarkupLMEncoder (line 609) | class MarkupLMEncoder(nn.Module): method __init__ (line 610) | def __init__(self, config): method forward (line 616) | def forward( class MarkupLMPreTrainedModel (line 707) | class MarkupLMPreTrainedModel(PreTrainedModel): method _init_weights (line 719) | def _init_weights(self, module): method from_pretrained (line 736) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... class MarkupLMModel (line 806) | class MarkupLMModel(MarkupLMPreTrainedModel): method __init__ (line 808) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 820) | def get_input_embeddings(self): method set_input_embeddings (line 823) | def set_input_embeddings(self, value): method _prune_heads (line 826) | def _prune_heads(self, heads_to_prune): method forward (line 836) | def forward( method prepare_inputs_for_generation (line 939) | def prepare_inputs_for_generation( method _reorder_cache (line 959) | def _reorder_cache(self, past_key_values, beam_idx): class MarkupLMForQuestionAnswering (line 973) | class MarkupLMForQuestionAnswering(MarkupLMPreTrainedModel): method __init__ (line 977) | def __init__(self, config): method forward (line 989) | def forward( class MarkupLMForTokenClassification (line 1095) | class MarkupLMForTokenClassification(MarkupLMPreTrainedModel): method __init__ (line 1097) | def __init__(self, config): method forward (line 1113) | def forward( class MarkupLMForSequenceClassification (line 1201) | class MarkupLMForSequenceClassification(MarkupLMPreTrainedModel): method __init__ (line 1203) | def __init__(self, config): method forward (line 1220) | def forward( FILE: transformers/models/markuplm/processing_markuplm.py class MarkupLMProcessor (line 25) | class MarkupLMProcessor(ProcessorMixin): method __call__ (line 48) | def __call__( method batch_decode (line 128) | def batch_decode(self, *args, **kwargs): method decode (line 135) | def decode(self, *args, **kwargs): method model_input_names (line 143) | def model_input_names(self): FILE: transformers/models/markuplm/tokenization_markuplm.py function bytes_to_unicode (line 110) | def bytes_to_unicode(): function get_pairs (line 132) | def get_pairs(word): class MarkupLMTokenizer (line 145) | class MarkupLMTokenizer(PreTrainedTokenizer): method __init__ (line 204) | def __init__( method get_xpath_seq (line 285) | def get_xpath_seq(self, xpath): method vocab_size (line 311) | def vocab_size(self): method get_vocab (line 314) | def get_vocab(self): method bpe (line 317) | def bpe(self, token): method _tokenize (line 359) | def _tokenize(self, text): method _convert_token_to_id (line 369) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 373) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 377) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 386) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 417) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method build_inputs_with_special_tokens (line 423) | def build_inputs_with_special_tokens( method build_xpath_tags_with_special_tokens (line 446) | def build_xpath_tags_with_special_tokens( method build_xpath_subs_with_special_tokens (line 454) | def build_xpath_subs_with_special_tokens( method get_special_tokens_mask (line 462) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 487) | def create_token_type_ids_from_sequences( method __call__ (line 510) | def __call__( method batch_encode_plus (line 655) | def batch_encode_plus( method _batch_encode_plus (line 713) | def _batch_encode_plus( method _batch_prepare_for_model (line 769) | def _batch_prepare_for_model( method encode (line 840) | def encode( method encode_plus (line 887) | def encode_plus( method _encode_plus (line 953) | def _encode_plus( method prepare_for_model (line 1006) | def prepare_for_model( method truncate_sequences (line 1234) | def truncate_sequences( method _pad (line 1370) | def _pad( FILE: transformers/models/markuplm/tokenization_markuplm_fast.py function bytes_to_unicode (line 64) | def bytes_to_unicode(): function get_pairs (line 86) | def get_pairs(word): class MarkupLMTokenizerFast (line 99) | class MarkupLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 162) | def __init__( method get_xpath_seq (line 259) | def get_xpath_seq(self, xpath): method __call__ (line 285) | def __call__( method batch_encode_plus (line 430) | def batch_encode_plus( method tokenize (line 488) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode_plus (line 497) | def encode_plus( method _batch_encode_plus (line 563) | def _batch_encode_plus( method _encode_plus (line 720) | def _encode_plus( method _pad (line 786) | def _pad( method build_inputs_with_special_tokens (line 879) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 902) | def create_token_type_ids_from_sequences( method save_vocabulary (line 924) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/mask2former/configuration_mask2former.py class Mask2FormerConfig (line 34) | class Mask2FormerConfig(PretrainedConfig): method __init__ (line 127) | def __init__( method from_backbone_config (line 211) | def from_backbone_config(cls, backbone_config: PretrainedConfig, **kwa... method to_dict (line 226) | def to_dict(self) -> Dict[str, any]: FILE: transformers/models/mask2former/convert_mask2former_original_pytorch_checkpoint_to_pytorch.py class TrackedStateDict (line 55) | class TrackedStateDict: method __init__ (line 56) | def __init__(self, to_track: Dict): method __getitem__ (line 65) | def __getitem__(self, key: str) -> Any: method __setitem__ (line 68) | def __setitem__(self, key: str, item: Any): method diff (line 72) | def diff(self) -> List[str]: method copy (line 81) | def copy(self) -> Dict: function prepare_img (line 87) | def prepare_img(): class Args (line 95) | class Args: function setup_cfg (line 101) | def setup_cfg(args: Args): class OriginalMask2FormerConfigToOursConverter (line 111) | class OriginalMask2FormerConfigToOursConverter: method __call__ (line 112) | def __call__(self, original_config: object) -> Mask2FormerConfig: class OriginalMask2FormerConfigToFeatureExtractorConverter (line 195) | class OriginalMask2FormerConfigToFeatureExtractorConverter: method __call__ (line 196) | def __call__(self, original_config: object) -> Mask2FormerImageProcessor: class OriginalMask2FormerCheckpointToOursConverter (line 211) | class OriginalMask2FormerCheckpointToOursConverter: method __init__ (line 212) | def __init__(self, original_model: nn.Module, config: Mask2FormerConfig): method pop_all (line 216) | def pop_all(self, renamed_keys: List[Tuple[str, str]], dst_state_dict:... method replace_maskformer_swin_backbone (line 220) | def replace_maskformer_swin_backbone( method replace_swin_backbone (line 379) | def replace_swin_backbone(self, dst_state_dict: StateDict, src_state_d... method replace_pixel_module (line 537) | def replace_pixel_module(self, dst_state_dict: StateDict, src_state_di... method rename_keys_in_masked_attention_decoder (line 621) | def rename_keys_in_masked_attention_decoder(self, dst_state_dict: Stat... method replace_masked_attention_decoder (line 718) | def replace_masked_attention_decoder(self, dst_state_dict: StateDict, ... method replace_keys_qkv_transformer_decoder (line 749) | def replace_keys_qkv_transformer_decoder(self, dst_state_dict: StateDi... method replace_transformer_module (line 768) | def replace_transformer_module(self, dst_state_dict: StateDict, src_st... method replace_universal_segmentation_module (line 783) | def replace_universal_segmentation_module(self, dst_state_dict: StateD... method convert (line 795) | def convert(self, mask2former: Mask2FormerModel) -> Mask2FormerModel: method convert_universal_segmentation (line 810) | def convert_universal_segmentation( method using_dirs (line 824) | def using_dirs(checkpoints_dir: Path, config_dir: Path) -> Iterator[Tu... function test (line 846) | def test( function get_model_name (line 907) | def get_model_name(checkpoint_file: Path): FILE: transformers/models/mask2former/image_processing_mask2former.py function max_across_indices (line 62) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 70) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 86) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function binary_mask_to_rle (line 103) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 126) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 148) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 177) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 196) | def compute_segments( function convert_segmentation_map_to_binary_masks (line 257) | def convert_segmentation_map_to_binary_masks( function get_mask2former_resize_output_image_size (line 293) | def get_mask2former_resize_output_image_size( class Mask2FormerImageProcessor (line 331) | class Mask2FormerImageProcessor(BaseImageProcessor): method __init__ (line 381) | def __init__( method from_dict (line 432) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method size_divisibility (line 445) | def size_divisibility(self): method max_size (line 454) | def max_size(self): method resize (line 462) | def resize( method rescale (line 505) | def rescale( method normalize (line 513) | def normalize( method convert_segmentation_map_to_binary_masks (line 525) | def convert_segmentation_map_to_binary_masks( method __call__ (line 541) | def __call__(self, images, segmentation_maps=None, **kwargs) -> BatchF... method _preprocess (line 544) | def _preprocess( method _preprocess_image (line 565) | def _preprocess_image( method _preprocess_mask (line 598) | def _preprocess_mask( method preprocess (line 629) | def preprocess( method _pad_image (line 724) | def _pad_image( method pad (line 746) | def pad( method encode_inputs (line 784) | def encode_inputs( method post_process_semantic_segmentation (line 883) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 938) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1056) | def post_process_panoptic_segmentation( FILE: transformers/models/mask2former/modeling_mask2former.py class Mask2FormerPixelDecoderOutput (line 60) | class Mask2FormerPixelDecoderOutput(ModelOutput): class Mask2FormerMaskedAttentionDecoderOutput (line 84) | class Mask2FormerMaskedAttentionDecoderOutput(BaseModelOutputWithCrossAt... class Mask2FormerPixelLevelModuleOutput (line 116) | class Mask2FormerPixelLevelModuleOutput(ModelOutput): class Mask2FormerModelOutput (line 147) | class Mask2FormerModelOutput(ModelOutput): class Mask2FormerForUniversalSegmentationOutput (line 193) | class Mask2FormerForUniversalSegmentationOutput(ModelOutput): function _expand_mask (line 250) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... function sample_point (line 265) | def sample_point( function dice_loss (line 298) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_cross_entropy_loss (line 328) | def sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: torch.Tenso... function pair_wise_dice_loss (line 348) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_cross_entropy_loss (line 370) | def pair_wise_sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: t... class Mask2FormerHungarianMatcher (line 399) | class Mask2FormerHungarianMatcher(nn.Module): method __init__ (line 407) | def __init__( method forward (line 434) | def forward( class Mask2FormerLoss (line 502) | class Mask2FormerLoss(nn.Module): method __init__ (line 503) | def __init__(self, config: Mask2FormerConfig, weight_dict: Dict[str, f... method _max_by_axis (line 538) | def _max_by_axis(self, sizes: List[List[int]]) -> List[int]: method _pad_images_to_max_in_batch (line 546) | def _pad_images_to_max_in_batch(self, tensors: List[Tensor]) -> Tuple[... method loss_labels (line 563) | def loss_labels( method loss_masks (line 597) | def loss_masks( method _get_predictions_permutation_indices (line 659) | def _get_predictions_permutation_indices(self, indices): method _get_targets_permutation_indices (line 665) | def _get_targets_permutation_indices(self, indices): method calculate_uncertainty (line 671) | def calculate_uncertainty(self, logits: torch.Tensor) -> torch.Tensor: method sample_points_using_uncertainty (line 688) | def sample_points_using_uncertainty( method forward (line 743) | def forward( method get_num_masks (line 798) | def get_num_masks(self, class_labels: torch.Tensor, device: torch.devi... function multi_scale_deformable_attention (line 808) | def multi_scale_deformable_attention( class Mask2FormerSinePositionEmbedding (line 848) | class Mask2FormerSinePositionEmbedding(nn.Module): method __init__ (line 854) | def __init__( method forward (line 865) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class Mask2FormerPixelDecoderEncoderMultiscaleDeformableAttention (line 888) | class Mask2FormerPixelDecoderEncoderMultiscaleDeformableAttention(nn.Mod... method __init__ (line 893) | def __init__(self, embed_dim: int, num_heads: int, n_levels: int, n_po... method with_pos_embed (line 920) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 923) | def forward( class Mask2FormerPixelDecoderEncoderLayer (line 981) | class Mask2FormerPixelDecoderEncoderLayer(nn.Module): method __init__ (line 982) | def __init__(self, config: Mask2FormerConfig): method forward (line 1000) | def forward( class Mask2FormerPixelDecoderEncoderOnly (line 1071) | class Mask2FormerPixelDecoderEncoderOnly(nn.Module): method __init__ (line 1081) | def __init__(self, config: Mask2FormerConfig): method get_reference_points (line 1091) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1122) | def forward( class Mask2FormerPixelDecoder (line 1200) | class Mask2FormerPixelDecoder(nn.Module): method __init__ (line 1201) | def __init__(self, config: Mask2FormerConfig, feature_channels): method get_valid_ratio (line 1271) | def get_valid_ratio(self, mask): method forward (line 1282) | def forward( class Mask2FormerPixelLevelModule (line 1379) | class Mask2FormerPixelLevelModule(nn.Module): method __init__ (line 1380) | def __init__(self, config: Mask2FormerConfig): method forward (line 1398) | def forward(self, pixel_values: Tensor, output_hidden_states: bool = F... class Mask2FormerAttention (line 1411) | class Mask2FormerAttention(nn.Module): method __init__ (line 1417) | def __init__( method _shape (line 1442) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 1445) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1448) | def forward( class Mask2FormerMaskedAttentionDecoderLayer (line 1547) | class Mask2FormerMaskedAttentionDecoderLayer(nn.Module): method __init__ (line 1561) | def __init__(self, config: Mask2FormerConfig): method with_pos_embed (line 1584) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1587) | def forward_post( method forward_pre (line 1646) | def forward_pre( method forward (line 1707) | def forward( class Mask2FormerMaskedAttentionDecoder (line 1761) | class Mask2FormerMaskedAttentionDecoder(nn.Module): method __init__ (line 1774) | def __init__(self, config: Mask2FormerConfig): method forward (line 1797) | def forward( class Mask2FormerPredictionBlock (line 1939) | class Mask2FormerPredictionBlock(nn.Module): method __init__ (line 1940) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 1947) | def forward(self, input: Tensor) -> Tensor: class Mask2FormerMLPPredictionHead (line 1954) | class Mask2FormerMLPPredictionHead(nn.Module): method __init__ (line 1955) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 1986) | def forward(self, input: Tensor) -> Tensor: class Mask2FormerMaskPredictor (line 1993) | class Mask2FormerMaskPredictor(nn.Module): method __init__ (line 1994) | def __init__(self, hidden_size: int, num_heads: int, mask_feature_size... method forward (line 2015) | def forward(self, outputs: torch.Tensor, pixel_embeddings: torch.Tenso... class Mask2FormerTransformerModule (line 2032) | class Mask2FormerTransformerModule(nn.Module): method __init__ (line 2037) | def __init__(self, in_features: int, config: Mask2FormerConfig): method forward (line 2055) | def forward( class Mask2FormerPreTrainedModel (line 2132) | class Mask2FormerPreTrainedModel(PreTrainedModel): method _init_weights (line 2137) | def _init_weights(self, module: nn.Module): class Mask2FormerModel (line 2211) | class Mask2FormerModel(Mask2FormerPreTrainedModel): method __init__ (line 2214) | def __init__(self, config: Mask2FormerConfig): method forward (line 2223) | def forward( class Mask2FormerForUniversalSegmentation (line 2315) | class Mask2FormerForUniversalSegmentation(Mask2FormerPreTrainedModel): method __init__ (line 2318) | def __init__(self, config: Mask2FormerConfig): method get_loss_dict (line 2333) | def get_loss_dict( method get_loss (line 2357) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method get_auxiliary_logits (line 2360) | def get_auxiliary_logits(self, classes: torch.Tensor, output_masks: to... method forward (line 2370) | def forward( FILE: transformers/models/maskformer/configuration_maskformer.py class MaskFormerConfig (line 36) | class MaskFormerConfig(PretrainedConfig): method __init__ (line 103) | def __init__( method from_backbone_and_decoder_configs (line 184) | def from_backbone_and_decoder_configs( method to_dict (line 205) | def to_dict(self) -> Dict[str, any]: FILE: transformers/models/maskformer/configuration_maskformer_swin.py class MaskFormerSwinConfig (line 25) | class MaskFormerSwinConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 100) | def __init__( FILE: transformers/models/maskformer/convert_maskformer_original_pytorch_checkpoint_to_pytorch.py class TrackedStateDict (line 51) | class TrackedStateDict: method __init__ (line 52) | def __init__(self, to_track: Dict): method __getitem__ (line 61) | def __getitem__(self, key: str) -> Any: method __setitem__ (line 64) | def __setitem__(self, key: str, item: Any): method diff (line 68) | def diff(self) -> List[str]: method copy (line 77) | def copy(self) -> Dict: function prepare_img (line 83) | def prepare_img(): class Args (line 91) | class Args: function setup_cfg (line 97) | def setup_cfg(args: Args): class OriginalMaskFormerConfigToOursConverter (line 107) | class OriginalMaskFormerConfigToOursConverter: method __call__ (line 108) | def __call__(self, original_config: object) -> MaskFormerConfig: class OriginalMaskFormerConfigToFeatureExtractorConverter (line 167) | class OriginalMaskFormerConfigToFeatureExtractorConverter: method __call__ (line 168) | def __call__(self, original_config: object) -> MaskFormerFeatureExtrac... class OriginalMaskFormerCheckpointToOursConverter (line 184) | class OriginalMaskFormerCheckpointToOursConverter: method __init__ (line 185) | def __init__(self, original_model: nn.Module, config: MaskFormerConfig): method pop_all (line 189) | def pop_all(self, renamed_keys: List[Tuple[str, str]], dst_state_dict:... method replace_backbone (line 193) | def replace_backbone(self, dst_state_dict: StateDict, src_state_dict: ... method replace_pixel_module (line 350) | def replace_pixel_module(self, dst_state_dict: StateDict, src_state_di... method rename_keys_in_detr_decoder (line 383) | def rename_keys_in_detr_decoder(self, dst_state_dict: StateDict, src_s... method replace_q_k_v_in_detr_decoder (line 440) | def replace_q_k_v_in_detr_decoder(self, dst_state_dict: StateDict, src... method replace_detr_decoder (line 467) | def replace_detr_decoder(self, dst_state_dict: StateDict, src_state_di... method replace_transformer_module (line 483) | def replace_transformer_module(self, dst_state_dict: StateDict, src_st... method replace_instance_segmentation_module (line 497) | def replace_instance_segmentation_module(self, dst_state_dict: StateDi... method convert (line 518) | def convert(self, mask_former: MaskFormerModel) -> MaskFormerModel: method convert_instance_segmentation (line 533) | def convert_instance_segmentation( method using_dirs (line 546) | def using_dirs(checkpoints_dir: Path, config_dir: Path) -> Iterator[Tu... function test (line 557) | def test(original_model, our_model: MaskFormerForInstanceSegmentation, f... function get_name (line 612) | def get_name(checkpoint_file: Path): FILE: transformers/models/maskformer/convert_maskformer_resnet_to_pytorch.py function get_maskformer_config (line 37) | def get_maskformer_config(model_name: str): function create_rename_keys (line 80) | def create_rename_keys(config): function rename_key (line 221) | def rename_key(dct, old, new): function read_in_decoder_q_k_v (line 227) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 255) | def prepare_img() -> torch.Tensor: function convert_maskformer_checkpoint (line 262) | def convert_maskformer_checkpoint( FILE: transformers/models/maskformer/convert_maskformer_swin_to_pytorch.py function get_maskformer_config (line 37) | def get_maskformer_config(model_name: str): function create_rename_keys (line 75) | def create_rename_keys(config): function rename_key (line 164) | def rename_key(dct, old, new): function read_in_swin_q_k_v (line 170) | def read_in_swin_q_k_v(state_dict, backbone_config): function read_in_decoder_q_k_v (line 196) | def read_in_decoder_q_k_v(state_dict, config): function prepare_img (line 224) | def prepare_img() -> torch.Tensor: function convert_maskformer_checkpoint (line 231) | def convert_maskformer_checkpoint( FILE: transformers/models/maskformer/feature_extraction_maskformer.py class MaskFormerFeatureExtractor (line 26) | class MaskFormerFeatureExtractor(MaskFormerImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/maskformer/image_processing_maskformer.py function max_across_indices (line 66) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 74) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 90) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function binary_mask_to_rle (line 107) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 130) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 152) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 181) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 200) | def compute_segments( function convert_segmentation_map_to_binary_masks (line 261) | def convert_segmentation_map_to_binary_masks( function get_maskformer_resize_output_image_size (line 297) | def get_maskformer_resize_output_image_size( class MaskFormerImageProcessor (line 335) | class MaskFormerImageProcessor(BaseImageProcessor): method __init__ (line 385) | def __init__( method from_dict (line 443) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method size_divisibility (line 456) | def size_divisibility(self): method max_size (line 465) | def max_size(self): method reduce_labels (line 474) | def reduce_labels(self): method resize (line 482) | def resize( method rescale (line 525) | def rescale( method normalize (line 533) | def normalize( method convert_segmentation_map_to_binary_masks (line 545) | def convert_segmentation_map_to_binary_masks( method __call__ (line 562) | def __call__(self, images, segmentation_maps=None, **kwargs) -> BatchF... method _preprocess (line 565) | def _preprocess( method _preprocess_image (line 586) | def _preprocess_image( method _preprocess_mask (line 619) | def _preprocess_mask( method preprocess (line 650) | def preprocess( method _pad_image (line 755) | def _pad_image( method pad (line 777) | def pad( method encode_inputs (line 815) | def encode_inputs( method post_process_segmentation (line 913) | def post_process_segmentation( method post_process_semantic_segmentation (line 961) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 1011) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1124) | def post_process_panoptic_segmentation( FILE: transformers/models/maskformer/modeling_maskformer.py class DetrDecoderOutput (line 62) | class DetrDecoderOutput(BaseModelOutputWithCrossAttentions): class MaskFormerPixelLevelModuleOutput (line 92) | class MaskFormerPixelLevelModuleOutput(ModelOutput): class MaskFormerPixelDecoderOutput (line 122) | class MaskFormerPixelDecoderOutput(ModelOutput): class MaskFormerModelOutput (line 146) | class MaskFormerModelOutput(ModelOutput): class MaskFormerForInstanceSegmentationOutput (line 189) | class MaskFormerForInstanceSegmentationOutput(ModelOutput): function upsample_like (line 248) | def upsample_like(pixel_values: Tensor, like: Tensor, mode: str = "bilin... function dice_loss (line 269) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_focal_loss (line 300) | def sigmoid_focal_loss( function pair_wise_dice_loss (line 344) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_focal_loss (line 367) | def pair_wise_sigmoid_focal_loss(inputs: Tensor, labels: Tensor, alpha: ... class DetrAttention (line 407) | class DetrAttention(nn.Module): method __init__ (line 414) | def __init__( method _shape (line 439) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 442) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 445) | def forward( class DetrDecoderLayer (line 539) | class DetrDecoderLayer(nn.Module): method __init__ (line 540) | def __init__(self, config: DetrConfig): method forward (line 566) | def forward( function _expand_mask (line 647) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class DetrDecoder (line 661) | class DetrDecoder(nn.Module): method __init__ (line 676) | def __init__(self, config: DetrConfig): method forward (line 688) | def forward( class MaskFormerHungarianMatcher (line 840) | class MaskFormerHungarianMatcher(nn.Module): method __init__ (line 848) | def __init__(self, cost_class: float = 1.0, cost_mask: float = 1.0, co... method forward (line 867) | def forward(self, masks_queries_logits, class_queries_logits, mask_lab... method __repr__ (line 925) | def __repr__(self): class MaskFormerLoss (line 938) | class MaskFormerLoss(nn.Module): method __init__ (line 939) | def __init__( method _max_by_axis (line 972) | def _max_by_axis(self, the_list: List[List[int]]) -> List[int]: method _pad_images_to_max_in_batch (line 979) | def _pad_images_to_max_in_batch(self, tensors: List[Tensor]) -> Tuple[... method loss_labels (line 998) | def loss_labels( method loss_masks (line 1033) | def loss_masks( method _get_predictions_permutation_indices (line 1075) | def _get_predictions_permutation_indices(self, indices): method _get_targets_permutation_indices (line 1081) | def _get_targets_permutation_indices(self, indices): method forward (line 1087) | def forward( method get_num_masks (line 1141) | def get_num_masks(self, class_labels: torch.Tensor, device: torch.devi... class MaskFormerFPNConvLayer (line 1150) | class MaskFormerFPNConvLayer(nn.Module): method __init__ (line 1151) | def __init__(self, in_features: int, out_features: int, kernel_size: i... method forward (line 1176) | def forward(self, input: Tensor) -> Tensor: class MaskFormerFPNLayer (line 1183) | class MaskFormerFPNLayer(nn.Module): method __init__ (line 1184) | def __init__(self, in_features: int, lateral_features: int): method forward (line 1203) | def forward(self, down: Tensor, left: Tensor) -> Tensor: class MaskFormerFPNModel (line 1211) | class MaskFormerFPNModel(nn.Module): method __init__ (line 1212) | def __init__(self, in_features: int, lateral_widths: List[int], featur... method forward (line 1231) | def forward(self, features: List[Tensor]) -> List[Tensor]: class MaskFormerPixelDecoder (line 1242) | class MaskFormerPixelDecoder(nn.Module): method __init__ (line 1243) | def __init__(self, *args, feature_size: int = 256, mask_feature_size: ... method forward (line 1260) | def forward(self, features: List[Tensor], output_hidden_states: bool =... class MaskFormerSinePositionEmbedding (line 1271) | class MaskFormerSinePositionEmbedding(nn.Module): method __init__ (line 1277) | def __init__( method forward (line 1288) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class PredictionBlock (line 1310) | class PredictionBlock(nn.Module): method __init__ (line 1311) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 1318) | def forward(self, input: Tensor) -> Tensor: class MaskformerMLPPredictionHead (line 1325) | class MaskformerMLPPredictionHead(nn.Module): method __init__ (line 1326) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 1357) | def forward(self, input: Tensor) -> Tensor: class MaskFormerPixelLevelModule (line 1364) | class MaskFormerPixelLevelModule(nn.Module): method __init__ (line 1365) | def __init__(self, config: MaskFormerConfig): method forward (line 1393) | def forward(self, pixel_values: Tensor, output_hidden_states: bool = F... class MaskFormerTransformerModule (line 1405) | class MaskFormerTransformerModule(nn.Module): method __init__ (line 1410) | def __init__(self, in_features: int, config: MaskFormerConfig): method forward (line 1419) | def forward( class MaskFormerPreTrainedModel (line 1482) | class MaskFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 1487) | def _init_weights(self, module: nn.Module): method _set_gradient_checkpointing (line 1526) | def _set_gradient_checkpointing(self, module, value=False): class MaskFormerModel (line 1537) | class MaskFormerModel(MaskFormerPreTrainedModel): method __init__ (line 1538) | def __init__(self, config: MaskFormerConfig): method forward (line 1549) | def forward( class MaskFormerForInstanceSegmentation (line 1634) | class MaskFormerForInstanceSegmentation(MaskFormerPreTrainedModel): method __init__ (line 1635) | def __init__(self, config: MaskFormerConfig): method get_loss_dict (line 1662) | def get_loss_dict( method get_loss (line 1681) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method get_logits (line 1684) | def get_logits(self, outputs: MaskFormerModelOutput) -> Tuple[Tensor, ... method forward (line 1717) | def forward( FILE: transformers/models/maskformer/modeling_maskformer_swin.py class MaskFormerSwinModelOutputWithPooling (line 37) | class MaskFormerSwinModelOutputWithPooling(ModelOutput): class MaskFormerSwinBaseModelOutput (line 71) | class MaskFormerSwinBaseModelOutput(ModelOutput): function window_partition (line 102) | def window_partition(input_feature, window_size): function window_reverse (line 115) | def window_reverse(windows, window_size, height, width): function drop_path (line 126) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class MaskFormerSwinEmbeddings (line 146) | class MaskFormerSwinEmbeddings(nn.Module): method __init__ (line 151) | def __init__(self, config): method forward (line 166) | def forward(self, pixel_values): class MaskFormerSwinPatchEmbeddings (line 179) | class MaskFormerSwinPatchEmbeddings(nn.Module): method __init__ (line 186) | def __init__(self, config): method maybe_pad (line 201) | def maybe_pad(self, pixel_values, height, width): method forward (line 210) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class MaskFormerSwinPatchMerging (line 227) | class MaskFormerSwinPatchMerging(nn.Module): method __init__ (line 240) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 247) | def maybe_pad(self, input_feature, height, width): method forward (line 255) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class MaskFormerSwinDropPath (line 282) | class MaskFormerSwinDropPath(nn.Module): method __init__ (line 285) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 289) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 292) | def extra_repr(self) -> str: class MaskFormerSwinSelfAttention (line 297) | class MaskFormerSwinSelfAttention(nn.Module): method __init__ (line 298) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 335) | def transpose_for_scores(self, x): method forward (line 340) | def forward( class MaskFormerSwinSelfOutput (line 398) | class MaskFormerSwinSelfOutput(nn.Module): method __init__ (line 399) | def __init__(self, config, dim): method forward (line 404) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MaskFormerSwinAttention (line 412) | class MaskFormerSwinAttention(nn.Module): method __init__ (line 413) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 419) | def prune_heads(self, heads): method forward (line 437) | def forward( class MaskFormerSwinIntermediate (line 451) | class MaskFormerSwinIntermediate(nn.Module): method __init__ (line 452) | def __init__(self, config, dim): method forward (line 460) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MaskFormerSwinOutput (line 467) | class MaskFormerSwinOutput(nn.Module): method __init__ (line 468) | def __init__(self, config, dim): method forward (line 473) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MaskFormerSwinLayer (line 479) | class MaskFormerSwinLayer(nn.Module): method __init__ (line 480) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method get_attn_mask (line 494) | def get_attn_mask(self, input_resolution): method maybe_pad (line 523) | def maybe_pad(self, hidden_states, height, width): method forward (line 531) | def forward(self, hidden_states, input_dimensions, head_mask=None, out... class MaskFormerSwinStage (line 591) | class MaskFormerSwinStage(nn.Module): method __init__ (line 593) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 618) | def forward( class MaskFormerSwinEncoder (line 647) | class MaskFormerSwinEncoder(nn.Module): method __init__ (line 649) | def __init__(self, config, grid_size): method forward (line 671) | def forward( class MaskFormerSwinPreTrainedModel (line 732) | class MaskFormerSwinPreTrainedModel(PreTrainedModel): method _init_weights (line 743) | def _init_weights(self, module): method _set_gradient_checkpointing (line 755) | def _set_gradient_checkpointing(self, module, value=False): class MaskFormerSwinModel (line 760) | class MaskFormerSwinModel(MaskFormerSwinPreTrainedModel): method __init__ (line 761) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 773) | def get_input_embeddings(self): method _prune_heads (line 776) | def _prune_heads(self, heads_to_prune): method forward (line 784) | def forward( class MaskFormerSwinBackbone (line 841) | class MaskFormerSwinBackbone(MaskFormerSwinPreTrainedModel, BackboneMixin): method __init__ (line 853) | def __init__(self, config: MaskFormerSwinConfig): method forward (line 868) | def forward( FILE: transformers/models/mbart/configuration_mbart.py class MBartConfig (line 34) | class MBartConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class MBartOnnxConfig (line 170) | class MBartOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 172) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 216) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method _generate_dummy_inputs_for_default_and_seq2seq_lm (line 228) | def _generate_dummy_inputs_for_default_and_seq2seq_lm( method _generate_dummy_inputs_for_causal_lm (line 296) | def _generate_dummy_inputs_for_causal_lm( method _generate_dummy_inputs_for_sequence_classification_and_question_answering (line 334) | def _generate_dummy_inputs_for_sequence_classification_and_question_an... method generate_dummy_inputs (line 360) | def generate_dummy_inputs( method _flatten_past_key_values_ (line 384) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: transformers/models/mbart/convert_mbart_original_checkpoint_to_pytorch.py function remove_ignore_keys_ (line 23) | def remove_ignore_keys_(state_dict): function make_linear_from_emb (line 36) | def make_linear_from_emb(emb): function convert_fairseq_mbart_checkpoint_from_disk (line 43) | def convert_fairseq_mbart_checkpoint_from_disk( FILE: transformers/models/mbart/modeling_flax_mbart.py function shift_tokens_right (line 220) | def shift_tokens_right(input_ids: jnp.ndarray, pad_token_id: int) -> jnp... class FlaxMBartAttention (line 244) | class FlaxMBartAttention(nn.Module): method setup (line 253) | def setup(self) -> None: method _split_heads (line 279) | def _split_heads(self, hidden_states): method _merge_heads (line 282) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 286) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 317) | def __call__( class FlaxMBartEncoderLayer (line 411) | class FlaxMBartEncoderLayer(nn.Module): method setup (line 415) | def setup(self) -> None: method __call__ (line 438) | def __call__( class FlaxMBartEncoderLayerCollection (line 468) | class FlaxMBartEncoderLayerCollection(nn.Module): method setup (line 472) | def setup(self): method __call__ (line 479) | def __call__( class FlaxMBartDecoderLayer (line 522) | class FlaxMBartDecoderLayer(nn.Module): method setup (line 526) | def setup(self) -> None: method __call__ (line 559) | def __call__( class FlaxMBartDecoderLayerCollection (line 611) | class FlaxMBartDecoderLayerCollection(nn.Module): method setup (line 615) | def setup(self): method __call__ (line 622) | def __call__( class FlaxMBartClassificationHead (line 682) | class FlaxMBartClassificationHead(nn.Module): method setup (line 691) | def setup(self): method __call__ (line 702) | def __call__(self, hidden_states: jnp.ndarray, deterministic: bool): class FlaxMBartEncoder (line 711) | class FlaxMBartEncoder(nn.Module): method setup (line 716) | def setup(self): method __call__ (line 736) | def __call__( class FlaxMBartDecoder (line 786) | class FlaxMBartDecoder(nn.Module): method setup (line 791) | def setup(self): method __call__ (line 812) | def __call__( class FlaxMBartModule (line 872) | class FlaxMBartModule(nn.Module): method setup (line 876) | def setup(self): method _get_encoder_module (line 887) | def _get_encoder_module(self): method _get_decoder_module (line 890) | def _get_decoder_module(self): method __call__ (line 893) | def __call__( class FlaxMBartPreTrainedModel (line 942) | class FlaxMBartPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 947) | def __init__( method init_weights (line 959) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 996) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1039) | def encode( method decode (line 1102) | def decode( method __call__ (line 1214) | def __call__( class FlaxMBartModel (line 1276) | class FlaxMBartModel(FlaxMBartPreTrainedModel): class FlaxMBartForConditionalGenerationModule (line 1286) | class FlaxMBartForConditionalGenerationModule(nn.Module): method setup (line 1291) | def setup(self): method _get_encoder_module (line 1301) | def _get_encoder_module(self): method _get_decoder_module (line 1304) | def _get_decoder_module(self): method __call__ (line 1307) | def __call__( class FlaxMBartForConditionalGeneration (line 1361) | class FlaxMBartForConditionalGeneration(FlaxMBartPreTrainedModel): method decode (line 1367) | def decode( method prepare_inputs_for_generation (line 1501) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1532) | def update_inputs_for_generation(self, model_outputs, model_kwargs): class FlaxMBartForSequenceClassificationModule (line 1587) | class FlaxMBartForSequenceClassificationModule(nn.Module): method setup (line 1592) | def setup(self): method _get_encoder_module (line 1601) | def _get_encoder_module(self): method _get_decoder_module (line 1604) | def _get_decoder_module(self): method __call__ (line 1607) | def __call__( class FlaxMBartForSequenceClassification (line 1674) | class FlaxMBartForSequenceClassification(FlaxMBartPreTrainedModel): class FlaxMBartForQuestionAnsweringModule (line 1688) | class FlaxMBartForQuestionAnsweringModule(nn.Module): method setup (line 1693) | def setup(self): method _get_encoder_module (line 1699) | def _get_encoder_module(self): method _get_decoder_module (line 1702) | def _get_decoder_module(self): method __call__ (line 1705) | def __call__( class FlaxMBartForQuestionAnswering (line 1761) | class FlaxMBartForQuestionAnswering(FlaxMBartPreTrainedModel): FILE: transformers/models/mbart/modeling_mbart.py function shift_tokens_right (line 62) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int): function _make_causal_mask (line 83) | def _make_causal_mask( function _expand_mask (line 101) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MBartLearnedPositionalEmbedding (line 116) | class MBartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 121) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 127) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MBartAttention (line 139) | class MBartAttention(nn.Module): method __init__ (line 142) | def __init__( method _shape (line 169) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 172) | def forward( class MBartEncoderLayer (line 293) | class MBartEncoderLayer(nn.Module): method __init__ (line 294) | def __init__(self, config: MBartConfig): method forward (line 310) | def forward( class MBartDecoderLayer (line 361) | class MBartDecoderLayer(nn.Module): method __init__ (line 362) | def __init__(self, config: MBartConfig): method forward (line 388) | def forward( class MBartClassificationHead (line 479) | class MBartClassificationHead(nn.Module): method __init__ (line 482) | def __init__( method forward (line 494) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MBartPreTrainedModel (line 503) | class MBartPreTrainedModel(PreTrainedModel): method _init_weights (line 509) | def _init_weights(self, module): method _set_gradient_checkpointing (line 520) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 525) | def dummy_inputs(self): class MBartEncoder (line 687) | class MBartEncoder(MBartPreTrainedModel): method __init__ (line 697) | def __init__(self, config: MBartConfig, embed_tokens: Optional[nn.Embe... method _backward_compatibility_gradient_checkpointing (line 725) | def _backward_compatibility_gradient_checkpointing(self): method forward (line 730) | def forward( class MBartDecoder (line 865) | class MBartDecoder(MBartPreTrainedModel): method __init__ (line 874) | def __init__(self, config: MBartConfig, embed_tokens: Optional[nn.Embe... method get_input_embeddings (line 899) | def get_input_embeddings(self): method set_input_embeddings (line 902) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 906) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 929) | def forward( class MBartModel (line 1153) | class MBartModel(MBartPreTrainedModel): method __init__ (line 1156) | def __init__(self, config: MBartConfig): method get_input_embeddings (line 1168) | def get_input_embeddings(self): method set_input_embeddings (line 1171) | def set_input_embeddings(self, value): method get_encoder (line 1176) | def get_encoder(self): method get_decoder (line 1179) | def get_decoder(self): method forward (line 1189) | def forward( class MBartForConditionalGeneration (line 1272) | class MBartForConditionalGeneration(MBartPreTrainedModel): method __init__ (line 1283) | def __init__(self, config: MBartConfig): method get_encoder (line 1292) | def get_encoder(self): method get_decoder (line 1295) | def get_decoder(self): method resize_token_embeddings (line 1298) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1303) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1312) | def get_output_embeddings(self): method set_output_embeddings (line 1315) | def set_output_embeddings(self, new_embeddings): method forward (line 1321) | def forward( method prepare_inputs_for_generation (line 1398) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1426) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1430) | def _reorder_cache(past_key_values, beam_idx): class MBartForSequenceClassification (line 1447) | class MBartForSequenceClassification(MBartPreTrainedModel): method __init__ (line 1450) | def __init__(self, config: MBartConfig, **kwargs): method forward (line 1470) | def forward( class MBartForQuestionAnswering (line 1576) | class MBartForQuestionAnswering(MBartPreTrainedModel): method __init__ (line 1579) | def __init__(self, config): method forward (line 1598) | def forward( class MBartDecoderWrapper (line 1694) | class MBartDecoderWrapper(MBartPreTrainedModel): method __init__ (line 1700) | def __init__(self, config): method forward (line 1704) | def forward(self, *args, **kwargs): class MBartForCausalLM (line 1709) | class MBartForCausalLM(MBartPreTrainedModel): method __init__ (line 1712) | def __init__(self, config): method get_input_embeddings (line 1724) | def get_input_embeddings(self): method set_input_embeddings (line 1727) | def set_input_embeddings(self, value): method get_output_embeddings (line 1730) | def get_output_embeddings(self): method set_output_embeddings (line 1733) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1736) | def set_decoder(self, decoder): method get_decoder (line 1739) | def get_decoder(self): method forward (line 1743) | def forward( method prepare_inputs_for_generation (line 1887) | def prepare_inputs_for_generation( method _reorder_cache (line 1905) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/mbart/modeling_tf_mbart.py function shift_tokens_right (line 63) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int): function _make_causal_mask (line 88) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 106) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFMBartLearnedPositionalEmbedding (line 120) | class TFMBartLearnedPositionalEmbedding(tf.keras.layers.Embedding): method __init__ (line 125) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 131) | def call( class TFMBartAttention (line 148) | class TFMBartAttention(tf.keras.layers.Layer): method __init__ (line 151) | def __init__( method _shape (line 179) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 182) | def call( class TFMBartEncoderLayer (line 301) | class TFMBartEncoderLayer(tf.keras.layers.Layer): method __init__ (line 302) | def __init__(self, config: MBartConfig, **kwargs): method call (line 316) | def call( class TFMBartDecoderLayer (line 357) | class TFMBartDecoderLayer(tf.keras.layers.Layer): method __init__ (line 358) | def __init__(self, config: MBartConfig, **kwargs): method call (line 385) | def call( class TFMBartPreTrainedModel (line 466) | class TFMBartPreTrainedModel(TFPreTrainedModel): class TFMBartEncoder (line 638) | class TFMBartEncoder(tf.keras.layers.Layer): method __init__ (line 648) | def __init__(self, config: MBartConfig, embed_tokens: Optional[tf.kera... method get_embed_tokens (line 667) | def get_embed_tokens(self): method set_embed_tokens (line 670) | def set_embed_tokens(self, embed_tokens): method call (line 674) | def call( class TFMBartDecoder (line 806) | class TFMBartDecoder(tf.keras.layers.Layer): method __init__ (line 816) | def __init__(self, config: MBartConfig, embed_tokens: Optional[tf.kera... method get_embed_tokens (line 834) | def get_embed_tokens(self): method set_embed_tokens (line 837) | def set_embed_tokens(self, embed_tokens): method call (line 841) | def call( class TFMBartMainLayer (line 1045) | class TFMBartMainLayer(tf.keras.layers.Layer): method __init__ (line 1048) | def __init__(self, config: MBartConfig, **kwargs): method get_input_embeddings (line 1064) | def get_input_embeddings(self): method set_input_embeddings (line 1067) | def set_input_embeddings(self, new_embeddings): method call (line 1073) | def call( class TFMBartModel (line 1162) | class TFMBartModel(TFMBartPreTrainedModel): method __init__ (line 1163) | def __init__(self, config: MBartConfig, *inputs, **kwargs): method get_encoder (line 1168) | def get_encoder(self): method get_decoder (line 1171) | def get_decoder(self): method call (line 1181) | def call( method serving_output (line 1225) | def serving_output(self, output): class BiasLayer (line 1246) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1252) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1259) | def call(self, x): class TFMBartForConditionalGeneration (line 1267) | class TFMBartForConditionalGeneration(TFMBartPreTrainedModel, TFCausalLa... method __init__ (line 1273) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1282) | def get_decoder(self): method get_encoder (line 1285) | def get_encoder(self): method get_output_embeddings (line 1288) | def get_output_embeddings(self): method set_output_embeddings (line 1291) | def set_output_embeddings(self, value): method get_bias (line 1294) | def get_bias(self): method set_bias (line 1297) | def set_bias(self, value): method call (line 1309) | def call( method serving_output (line 1389) | def serving_output(self, output): method prepare_inputs_for_generation (line 1409) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1447) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): FILE: transformers/models/mbart/tokenization_mbart.py class MBartTokenizer (line 53) | class MBartTokenizer(PreTrainedTokenizer): method __init__ (line 82) | def __init__( method __getstate__ (line 158) | def __getstate__(self): method __setstate__ (line 164) | def __setstate__(self, d): method vocab_size (line 175) | def vocab_size(self): method src_lang (line 179) | def src_lang(self) -> str: method src_lang (line 183) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 187) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 217) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 244) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 269) | def _build_translation_inputs( method get_vocab (line 281) | def get_vocab(self): method _tokenize (line 286) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 289) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 298) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 304) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 309) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 326) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 338) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 341) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 344) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 350) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: transformers/models/mbart/tokenization_mbart_fast.py class MBartTokenizerFast (line 63) | class MBartTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 96) | def __init__( method src_lang (line 153) | def src_lang(self) -> str: method src_lang (line 157) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 161) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 190) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 215) | def _build_translation_inputs( method prepare_seq2seq_batch (line 227) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 239) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 242) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 245) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 260) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 275) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/mbart50/tokenization_mbart50.py class MBart50Tokenizer (line 49) | class MBart50Tokenizer(PreTrainedTokenizer): method __init__ (line 116) | def __init__( method vocab_size (line 185) | def vocab_size(self) -> int: method src_lang (line 189) | def src_lang(self) -> str: method src_lang (line 193) | def src_lang(self, new_src_lang: str) -> None: method __getstate__ (line 197) | def __getstate__(self) -> Dict: method __setstate__ (line 202) | def __setstate__(self, d: Dict) -> None: method get_vocab (line 212) | def get_vocab(self) -> Dict: method _tokenize (line 217) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 220) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 229) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 235) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 254) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method get_special_tokens_mask (line 271) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 301) | def build_inputs_with_special_tokens( method _build_translation_inputs (line 328) | def _build_translation_inputs( method prepare_seq2seq_batch (line 340) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 352) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 355) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 358) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 364) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: FILE: transformers/models/mbart50/tokenization_mbart50_fast.py class MBart50TokenizerFast (line 59) | class MBart50TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 113) | def __init__( method src_lang (line 162) | def src_lang(self) -> str: method src_lang (line 166) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 170) | def build_inputs_with_special_tokens( method prepare_seq2seq_batch (line 199) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 211) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 214) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 217) | def set_src_lang_special_tokens(self, src_lang: str) -> None: method set_tgt_lang_special_tokens (line 232) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method _build_translation_inputs (line 247) | def _build_translation_inputs( method save_vocabulary (line 259) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/mctct/configuration_mctct.py class MCTCTConfig (line 29) | class MCTCTConfig(PretrainedConfig): method __init__ (line 119) | def __init__( FILE: transformers/models/mctct/feature_extraction_mctct.py class MCTCTFeatureExtractor (line 34) | class MCTCTFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 71) | def __init__( method _extract_mfsc_features (line 108) | def _extract_mfsc_features(self, one_waveform: np.array) -> np.ndarray: method _normalize_one (line 141) | def _normalize_one(self, x, input_length, padding_value): method normalize (line 158) | def normalize( method __call__ (line 164) | def __call__( FILE: transformers/models/mctct/modeling_mctct.py function _expand_mask (line 62) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MCTCTConv1dSubsampler (line 76) | class MCTCTConv1dSubsampler(nn.Module): method __init__ (line 82) | def __init__(self, config): method forward (line 121) | def forward(self, input_features): class MCTCTEmbeddings (line 137) | class MCTCTEmbeddings(nn.Module): method __init__ (line 140) | def __init__(self, config): method forward (line 160) | def forward( class MCTCTSelfAttention (line 193) | class MCTCTSelfAttention(nn.Module): method __init__ (line 194) | def __init__(self, config): method transpose_for_scores (line 217) | def transpose_for_scores(self, x): method reshape_fortran (line 222) | def reshape_fortran(self, x, shape): method relative_position_embedding_rotate (line 227) | def relative_position_embedding_rotate(self, scores): method forward (line 252) | def forward( class MCTCTLayerNorm (line 301) | class MCTCTLayerNorm(nn.Module): method __init__ (line 302) | def __init__(self): method forward (line 307) | def forward(self, hidden_states): class MCTCTSelfOutput (line 311) | class MCTCTSelfOutput(nn.Module): method __init__ (line 312) | def __init__(self, config): method forward (line 319) | def forward(self, hidden_states, input_tensor): class MCTCTAttention (line 326) | class MCTCTAttention(nn.Module): method __init__ (line 327) | def __init__(self, config): method prune_heads (line 333) | def prune_heads(self, heads): method forward (line 351) | def forward( class MCTCTIntermediate (line 370) | class MCTCTIntermediate(nn.Module): method __init__ (line 371) | def __init__(self, config): method forward (line 379) | def forward(self, hidden_states): class MCTCTOutput (line 385) | class MCTCTOutput(nn.Module): method __init__ (line 386) | def __init__(self, config): method forward (line 392) | def forward(self, hidden_states, input_tensor): class MCTCTLayer (line 399) | class MCTCTLayer(nn.Module): method __init__ (line 400) | def __init__(self, config: MCTCTConfig): method forward (line 411) | def forward( method feed_forward_chunk (line 432) | def feed_forward_chunk(self, attention_output): class MCTCTPreTrainedModel (line 438) | class MCTCTPreTrainedModel(PreTrainedModel): method _init_weights (line 450) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 474) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... method _get_feature_vector_attention_mask (line 488) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... method _set_gradient_checkpointing (line 507) | def _set_gradient_checkpointing(self, module, value=False): class MCTCTEncoder (line 555) | class MCTCTEncoder(MCTCTPreTrainedModel): method __init__ (line 556) | def __init__(self, config: MCTCTConfig): method forward (line 566) | def forward( class MCTCTModel (line 661) | class MCTCTModel(MCTCTPreTrainedModel): method __init__ (line 662) | def __init__(self, config): method forward (line 679) | def forward( class MCTCTForCTC (line 721) | class MCTCTForCTC(MCTCTPreTrainedModel): method __init__ (line 722) | def __init__(self, config): method forward (line 749) | def forward( FILE: transformers/models/mctct/processing_mctct.py class MCTCTProcessor (line 24) | class MCTCTProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 45) | def __call__(self, *args, **kwargs): method batch_decode (line 83) | def batch_decode(self, *args, **kwargs): method pad (line 90) | def pad(self, *args, **kwargs): method decode (line 120) | def decode(self, *args, **kwargs): method as_target_processor (line 128) | def as_target_processor(self): FILE: transformers/models/mega/configuration_mega.py class MegaConfig (line 31) | class MegaConfig(PretrainedConfig): method __init__ (line 150) | def __init__( class MegaOnnxConfig (line 230) | class MegaOnnxConfig(OnnxConfig): method inputs (line 232) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/mega/convert_mega_original_pytorch_checkpoint_to_pytorch.py class MegaLM (line 51) | class MegaLM(nn.Module): method __init__ (line 54) | def __init__(self, mega_args, depth, vocab_size): method forward (line 61) | def forward(self, input_ids, attention_mask, batch_first=True, ignore_... class OriginalMegaForMaskedLM (line 101) | class OriginalMegaForMaskedLM(nn.Module): method __init__ (line 104) | def __init__(self, mega_args, depth, vocab_size): method forward (line 110) | def forward(self, input_ids, attention_mask, batch_first=True, ignore_... function convert_checkpoint_to_huggingface (line 123) | def convert_checkpoint_to_huggingface(pretrained_checkpoint_path, output... FILE: transformers/models/mega/modeling_mega.py class MegaEmbeddings (line 59) | class MegaEmbeddings(nn.Module): method __init__ (line 65) | def __init__(self, config: MegaConfig): method forward (line 79) | def forward(self, input_ids=None, token_type_ids=None, inputs_embeds=N... class MegaSimpleRelativePositionalBias (line 113) | class MegaSimpleRelativePositionalBias(nn.Module): method __init__ (line 118) | def __init__(self, config: MegaConfig): method forward (line 124) | def forward(self, seq_len): class MegaRotaryRelativePositionalBias (line 143) | class MegaRotaryRelativePositionalBias(nn.Module): method __init__ (line 152) | def __init__(self, config: MegaConfig): method get_sinusoid_embeddings (line 169) | def get_sinusoid_embeddings(max_positions: int, embedding_dim: int): method rotary (line 176) | def rotary(self, input): method forward (line 189) | def forward(self, seq_len): class MegaDropout (line 196) | class MegaDropout(nn.Module): method __init__ (line 205) | def __init__(self, dropout_probability, is_featurewise=False): method forward (line 210) | def forward(self, input, batch_first: bool = False): class MegaRMSNorm (line 234) | class MegaRMSNorm(nn.Module): method __init__ (line 240) | def __init__(self, number_features, eps=1e-6, affine=True): method forward (line 250) | def forward(self, input): class MegaScaleNorm (line 259) | class MegaScaleNorm(nn.Module): method __init__ (line 265) | def __init__(self, dim, eps=1e-6, affine=True): method forward (line 275) | def forward(self, input): class MegaSequenceNorm (line 284) | class MegaSequenceNorm(nn.Module): method __init__ (line 290) | def __init__(self, norm_type, embedding_dim, eps=1e-5, affine=True, ex... method forward (line 305) | def forward(self, input): class MegaMultiDimensionDampedEma (line 320) | class MegaMultiDimensionDampedEma(nn.Module): method __init__ (line 327) | def __init__(self, config: MegaConfig): method _compute_ema_coefficients (line 351) | def _compute_ema_coefficients(self): method _compute_efficient_ema_kernel (line 359) | def _compute_efficient_ema_kernel(self, length: int): method get_ema_coefficients (line 371) | def get_ema_coefficients(self): method get_ema_kernel (line 379) | def get_ema_kernel(self, length: int): method fft_convolution (line 388) | def fft_convolution(self, inputs, kernel, length): method ema_step (line 395) | def ema_step(self, inputs, length, past_state=None): method one_ema_step (line 437) | def one_ema_step(self, inputs, past_state=None): method forward (line 449) | def forward( class MegaGatedCrossAttention (line 529) | class MegaGatedCrossAttention(nn.Module): method __init__ (line 536) | def __init__(self, config: MegaConfig): method element_attention (line 574) | def element_attention(self, query, key, key_padding_mask, pidx): method softmax_attention (line 604) | def softmax_attention(self, query, key, key_padding_mask, pidx): method forward (line 630) | def forward( class MegaMovingAverageGatedAttention (line 789) | class MegaMovingAverageGatedAttention(nn.Module): method __init__ (line 798) | def __init__(self, config: MegaConfig): method element_attention (line 839) | def element_attention(self, query, key, padding_mask, causal_mask): method softmax_attention (line 878) | def softmax_attention(self, query, key, padding_mask, causal_mask): method forward (line 916) | def forward( class MegaNormalizedFeedForwardNetwork (line 1125) | class MegaNormalizedFeedForwardNetwork(nn.Module): method __init__ (line 1131) | def __init__(self, config: MegaConfig): method forward (line 1152) | def forward(self, inputs): class MegaBlock (line 1170) | class MegaBlock(nn.Module): method __init__ (line 1171) | def __init__(self, config: MegaConfig): method forward (line 1185) | def forward( class MegaPooler (line 1320) | class MegaPooler(nn.Module): method __init__ (line 1321) | def __init__(self, config): method forward (line 1326) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegaPreTrainedModel (line 1335) | class MegaPreTrainedModel(PreTrainedModel): method _init_weights (line 1346) | def _init_weights(self, module): method update_keys_to_ignore (line 1390) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class MegaModel (line 1460) | class MegaModel(MegaPreTrainedModel): method __init__ (line 1479) | def __init__(self, config: MegaConfig, add_pooling_layer=True): method get_input_embeddings (line 1491) | def get_input_embeddings(self): method set_input_embeddings (line 1494) | def set_input_embeddings(self, value): method forward (line 1503) | def forward( class MegaForCausalLM (line 1658) | class MegaForCausalLM(MegaPreTrainedModel): method __init__ (line 1663) | def __init__(self, config: MegaConfig): method get_output_embeddings (line 1686) | def get_output_embeddings(self): method set_output_embeddings (line 1689) | def set_output_embeddings(self, new_embeddings): method forward (line 1694) | def forward( method prepare_inputs_for_generation (line 1802) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1814) | def _reorder_cache(self, past_key_values, beam_idx): class MegaForMaskedLM (line 1822) | class MegaForMaskedLM(MegaPreTrainedModel): method __init__ (line 1827) | def __init__(self, config: MegaConfig): method get_output_embeddings (line 1852) | def get_output_embeddings(self): method set_output_embeddings (line 1855) | def set_output_embeddings(self, new_embeddings): method forward (line 1867) | def forward( class MegaForSequenceClassification (line 1931) | class MegaForSequenceClassification(MegaPreTrainedModel): method __init__ (line 1934) | def __init__(self, config): method forward (line 1951) | def forward( class MegaForMultipleChoice (line 2024) | class MegaForMultipleChoice(MegaPreTrainedModel): method __init__ (line 2027) | def __init__(self, config): method forward (line 2043) | def forward( class MegaForTokenClassification (line 2111) | class MegaForTokenClassification(MegaPreTrainedModel): method __init__ (line 2115) | def __init__(self, config): method forward (line 2135) | def forward( class MegaClassificationHead (line 2185) | class MegaClassificationHead(nn.Module): method __init__ (line 2188) | def __init__(self, config): method forward (line 2197) | def forward(self, features, **kwargs): class MegaForQuestionAnswering (line 2214) | class MegaForQuestionAnswering(MegaPreTrainedModel): method __init__ (line 2218) | def __init__(self, config): method forward (line 2234) | def forward( FILE: transformers/models/megatron_bert/configuration_megatron_bert.py class MegatronBertConfig (line 28) | class MegatronBertConfig(PretrainedConfig): method __init__ (line 95) | def __init__( FILE: transformers/models/megatron_bert/convert_megatron_bert_checkpoint.py function recursive_print (line 48) | def recursive_print(name, val, spaces=0): function fix_query_key_value_ordering (line 68) | def fix_query_key_value_ordering(param, checkpoint_version, num_splits, ... function convert_megatron_checkpoint (line 94) | def convert_megatron_checkpoint(args, input_state_dict, config): function main (line 275) | def main(): FILE: transformers/models/megatron_bert/modeling_megatron_bert.py function load_tf_weights_in_megatron_bert (line 66) | def load_tf_weights_in_megatron_bert(model, config, tf_checkpoint_path): class MegatronBertEmbeddings (line 135) | class MegatronBertEmbeddings(nn.Module): method __init__ (line 138) | def __init__(self, config): method forward (line 155) | def forward( class MegatronBertSelfAttention (line 192) | class MegatronBertSelfAttention(nn.Module): method __init__ (line 193) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 219) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 224) | def forward( class MegatronBertSelfOutput (line 327) | class MegatronBertSelfOutput(nn.Module): method __init__ (line 328) | def __init__(self, config): method forward (line 333) | def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor)... class MegatronBertAttention (line 340) | class MegatronBertAttention(nn.Module): method __init__ (line 341) | def __init__(self, config): method prune_heads (line 348) | def prune_heads(self, heads): method forward (line 366) | def forward( class MegatronBertIntermediate (line 392) | class MegatronBertIntermediate(nn.Module): method __init__ (line 393) | def __init__(self, config): method forward (line 401) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertOutput (line 408) | class MegatronBertOutput(nn.Module): method __init__ (line 409) | def __init__(self, config): method forward (line 414) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MegatronBertLayer (line 421) | class MegatronBertLayer(nn.Module): method __init__ (line 422) | def __init__(self, config): method forward (line 437) | def forward( method feed_forward_chunk (line 502) | def feed_forward_chunk(self, attention_output): class MegatronBertEncoder (line 509) | class MegatronBertEncoder(nn.Module): method __init__ (line 510) | def __init__(self, config): method forward (line 520) | def forward( class MegatronBertPooler (line 617) | class MegatronBertPooler(nn.Module): method __init__ (line 618) | def __init__(self, config): method forward (line 623) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertPredictionHeadTransform (line 633) | class MegatronBertPredictionHeadTransform(nn.Module): method __init__ (line 634) | def __init__(self, config): method forward (line 643) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MegatronBertLMPredictionHead (line 651) | class MegatronBertLMPredictionHead(nn.Module): method __init__ (line 652) | def __init__(self, config): method forward (line 665) | def forward(self, hidden_states): class MegatronBertOnlyMLMHead (line 672) | class MegatronBertOnlyMLMHead(nn.Module): method __init__ (line 673) | def __init__(self, config): method forward (line 677) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MegatronBertOnlyNSPHead (line 683) | class MegatronBertOnlyNSPHead(nn.Module): method __init__ (line 684) | def __init__(self, config): method forward (line 688) | def forward(self, pooled_output): class MegatronBertPreTrainingHeads (line 694) | class MegatronBertPreTrainingHeads(nn.Module): method __init__ (line 695) | def __init__(self, config): method forward (line 700) | def forward(self, sequence_output, pooled_output): class MegatronBertPreTrainedModel (line 706) | class MegatronBertPreTrainedModel(PreTrainedModel): method _init_weights (line 718) | def _init_weights(self, module): method _set_gradient_checkpointing (line 730) | def _set_gradient_checkpointing(self, module, value=False): class MegatronBertForPreTrainingOutput (line 737) | class MegatronBertForPreTrainingOutput(ModelOutput): class MegatronBertModel (line 840) | class MegatronBertModel(MegatronBertPreTrainedModel): method __init__ (line 853) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 865) | def get_input_embeddings(self): method set_input_embeddings (line 868) | def set_input_embeddings(self, value): method _prune_heads (line 871) | def _prune_heads(self, heads_to_prune): method forward (line 885) | def forward( class MegatronBertForPreTraining (line 1016) | class MegatronBertForPreTraining(MegatronBertPreTrainedModel): method __init__ (line 1019) | def __init__(self, config, add_binary_head=True): method get_output_embeddings (line 1028) | def get_output_embeddings(self): method set_output_embeddings (line 1031) | def set_output_embeddings(self, new_embeddings): method forward (line 1036) | def forward( class MegatronBertForCausalLM (line 1122) | class MegatronBertForCausalLM(MegatronBertPreTrainedModel): method __init__ (line 1126) | def __init__(self, config): method get_output_embeddings (line 1138) | def get_output_embeddings(self): method set_output_embeddings (line 1141) | def set_output_embeddings(self, new_embeddings): method forward (line 1146) | def forward( method prepare_inputs_for_generation (line 1247) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1259) | def _reorder_cache(self, past_key_values, beam_idx): class MegatronBertForMaskedLM (line 1267) | class MegatronBertForMaskedLM(MegatronBertPreTrainedModel): method __init__ (line 1271) | def __init__(self, config): method get_output_embeddings (line 1286) | def get_output_embeddings(self): method set_output_embeddings (line 1289) | def set_output_embeddings(self, new_embeddings): method forward (line 1298) | def forward( method prepare_inputs_for_generation (line 1355) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class MegatronBertForNextSentencePrediction (line 1375) | class MegatronBertForNextSentencePrediction(MegatronBertPreTrainedModel): method __init__ (line 1378) | def __init__(self, config): method forward (line 1389) | def forward( class MegatronBertForSequenceClassification (line 1481) | class MegatronBertForSequenceClassification(MegatronBertPreTrainedModel): method __init__ (line 1482) | def __init__(self, config): method forward (line 1499) | def forward( class MegatronBertForMultipleChoice (line 1578) | class MegatronBertForMultipleChoice(MegatronBertPreTrainedModel): method __init__ (line 1579) | def __init__(self, config): method forward (line 1597) | def forward( class MegatronBertForTokenClassification (line 1671) | class MegatronBertForTokenClassification(MegatronBertPreTrainedModel): method __init__ (line 1674) | def __init__(self, config): method forward (line 1691) | def forward( class MegatronBertForQuestionAnswering (line 1751) | class MegatronBertForQuestionAnswering(MegatronBertPreTrainedModel): method __init__ (line 1754) | def __init__(self, config): method forward (line 1770) | def forward( FILE: transformers/models/megatron_gpt2/checkpoint_reshaping_and_interoperability.py function add_checkpointing_args (line 28) | def add_checkpointing_args(parser): function add_megatron_checkpoint_args (line 54) | def add_megatron_checkpoint_args(parser): function add_transformers_checkpoint_args (line 112) | def add_transformers_checkpoint_args(parser): function recursive_print (line 168) | def recursive_print(name, val, spaces=0): function megatron_to_transformers_fix_query_key_value_ordering (line 196) | def megatron_to_transformers_fix_query_key_value_ordering( function transformers_to_megatron_fix_query_key_value_ordering (line 230) | def transformers_to_megatron_fix_query_key_value_ordering( function merge_transformers_sharded_states (line 264) | def merge_transformers_sharded_states(path, num_checkpoints): function get_megatron_sharded_states (line 280) | def get_megatron_sharded_states(args, tp_size, pp_size, pp_rank): function get_element_from_dict_by_path (line 301) | def get_element_from_dict_by_path(d, path): function convert_checkpoint_from_megatron_to_transformers (line 317) | def convert_checkpoint_from_megatron_to_transformers(args): function convert_checkpoint_from_transformers_to_megatron (line 591) | def convert_checkpoint_from_transformers_to_megatron(args): function main (line 882) | def main(): FILE: transformers/models/megatron_gpt2/convert_megatron_gpt2_checkpoint.py function recursive_print (line 48) | def recursive_print(name, val, spaces=0): function fix_query_key_value_ordering (line 68) | def fix_query_key_value_ordering(param, checkpoint_version, num_splits, ... function convert_megatron_checkpoint (line 94) | def convert_megatron_checkpoint(args, input_state_dict, config): function main (line 240) | def main(): FILE: transformers/models/mgp_str/configuration_mgp_str.py class MgpstrConfig (line 28) | class MgpstrConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: transformers/models/mgp_str/modeling_mgp_str.py function drop_path (line 54) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class MgpstrDropPath (line 75) | class MgpstrDropPath(nn.Module): method __init__ (line 78) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 82) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 85) | def extra_repr(self) -> str: class MgpstrModelOutput (line 90) | class MgpstrModelOutput(ModelOutput): class MgpstrEmbeddings (line 127) | class MgpstrEmbeddings(nn.Module): method __init__ (line 130) | def __init__(self, config: MgpstrConfig): method forward (line 155) | def forward(self, pixel_values): class MgpstrMlp (line 173) | class MgpstrMlp(nn.Module): method __init__ (line 176) | def __init__(self, config: MgpstrConfig, hidden_features): method forward (line 184) | def forward(self, hidden_states): class MgpstrAttention (line 193) | class MgpstrAttention(nn.Module): method __init__ (line 194) | def __init__(self, config: MgpstrConfig): method forward (line 205) | def forward(self, hidden_states): class MgpstrLayer (line 224) | class MgpstrLayer(nn.Module): method __init__ (line 225) | def __init__(self, config: MgpstrConfig, drop_path=None): method forward (line 235) | def forward(self, hidden_states): class MgpstrEncoder (line 250) | class MgpstrEncoder(nn.Module): method __init__ (line 251) | def __init__(self, config: MgpstrConfig): method forward (line 260) | def forward(self, hidden_states, output_attentions=False, output_hidde... class MgpstrA3Module (line 286) | class MgpstrA3Module(nn.Module): method __init__ (line 287) | def __init__(self, config: MgpstrConfig): method forward (line 299) | def forward(self, hidden_states): class MgpstrPreTrainedModel (line 314) | class MgpstrPreTrainedModel(PreTrainedModel): method _init_weights (line 323) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 336) | def _set_gradient_checkpointing(self, module: MgpstrEncoder, value: bo... class MgpstrModel (line 372) | class MgpstrModel(MgpstrPreTrainedModel): method __init__ (line 373) | def __init__(self, config: MgpstrConfig): method get_input_embeddings (line 379) | def get_input_embeddings(self) -> nn.Module: method forward (line 383) | def forward(self, pixel_values, output_attentions=None, output_hidden_... class MgpstrForSceneTextRecognition (line 418) | class MgpstrForSceneTextRecognition(MgpstrPreTrainedModel): method __init__ (line 422) | def __init__(self, config: MgpstrConfig) -> None: method forward (line 438) | def forward( FILE: transformers/models/mgp_str/processing_mgp_str.py class DecodeType (line 30) | class DecodeType(ExplicitEnum): class MgpstrProcessor (line 39) | class MgpstrProcessor(ProcessorMixin): method __init__ (line 56) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 77) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 100) | def batch_decode(self, sequences): method _decode_helper (line 142) | def _decode_helper(self, pred_logits, format): method char_decode (line 192) | def char_decode(self, sequences): method bpe_decode (line 205) | def bpe_decode(self, sequences): method wp_decode (line 217) | def wp_decode(self, sequences): FILE: transformers/models/mgp_str/tokenization_mgp_str.py class MgpstrTokenizer (line 38) | class MgpstrTokenizer(PreTrainedTokenizer): method __init__ (line 64) | def __init__(self, vocab_file, unk_token="[GO]", bos_token="[GO]", eos... method vocab_size (line 78) | def vocab_size(self): method get_vocab (line 81) | def get_vocab(self): method _tokenize (line 84) | def _tokenize(self, text): method _convert_token_to_id (line 91) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 95) | def _convert_id_to_token(self, index): method save_vocabulary (line 99) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/mluke/convert_mluke_original_pytorch_checkpoint_to_pytorch.py function convert_luke_checkpoint (line 29) | def convert_luke_checkpoint(checkpoint_path, metadata_path, entity_vocab... function load_original_entity_vocab (line 186) | def load_original_entity_vocab(entity_vocab_path): FILE: transformers/models/mluke/tokenization_mluke.py class MLukeTokenizer (line 147) | class MLukeTokenizer(PreTrainedTokenizer): method __init__ (line 237) | def __init__( method __getstate__ (line 348) | def __getstate__(self): method __setstate__ (line 354) | def __setstate__(self, d): method __call__ (line 366) | def __call__( method _encode_plus (line 512) | def _encode_plus( method _batch_encode_plus (line 593) | def _batch_encode_plus( method _check_entity_input_format (line 702) | def _check_entity_input_format(self, entities: Optional[EntityInput], ... method _create_input_sequence (line 721) | def _create_input_sequence( method _batch_prepare_for_model (line 875) | def _batch_prepare_for_model( method prepare_for_model (line 958) | def prepare_for_model( method pad (line 1188) | def pad( method _pad (line 1349) | def _pad( method save_vocabulary (line 1488) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 1510) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 1537) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 1566) | def create_token_type_ids_from_sequences( method vocab_size (line 1593) | def vocab_size(self): method get_vocab (line 1597) | def get_vocab(self): method _tokenize (line 1603) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 1607) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 1616) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 1622) | def convert_tokens_to_string(self, tokens): FILE: transformers/models/mmbt/configuration_mmbt.py class MMBTConfig (line 24) | class MMBTConfig(object): method __init__ (line 38) | def __init__(self, config, num_labels=None, modal_hidden_size=2048): FILE: transformers/models/mmbt/modeling_mmbt.py class ModalEmbeddings (line 33) | class ModalEmbeddings(nn.Module): method __init__ (line 36) | def __init__(self, config, encoder, embeddings): method forward (line 47) | def forward(self, input_modal, start_token=None, end_token=None, posit... class MMBTModel (line 181) | class MMBTModel(nn.Module, ModuleUtilsMixin): method __init__ (line 182) | def __init__(self, config, transformer, encoder): method forward (line 190) | def forward( method get_input_embeddings (line 299) | def get_input_embeddings(self): method set_input_embeddings (line 302) | def set_input_embeddings(self, value): class MMBTForClassification (line 313) | class MMBTForClassification(nn.Module): method __init__ (line 343) | def __init__(self, config, transformer, encoder): method forward (line 351) | def forward( FILE: transformers/models/mobilebert/configuration_mobilebert.py class MobileBertConfig (line 31) | class MobileBertConfig(PretrainedConfig): method __init__ (line 114) | def __init__( class MobileBertOnnxConfig (line 174) | class MobileBertOnnxConfig(OnnxConfig): method inputs (line 176) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/mobilebert/convert_mobilebert_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 26) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, mobilebert_conf... FILE: transformers/models/mobilebert/modeling_mobilebert.py function load_tf_weights_in_mobilebert (line 82) | def load_tf_weights_in_mobilebert(model, config, tf_checkpoint_path): class NoNorm (line 160) | class NoNorm(nn.Module): method __init__ (line 161) | def __init__(self, feat_size, eps=None): method forward (line 166) | def forward(self, input_tensor: torch.Tensor) -> torch.Tensor: class MobileBertEmbeddings (line 173) | class MobileBertEmbeddings(nn.Module): method __init__ (line 176) | def __init__(self, config): method forward (line 196) | def forward( class MobileBertSelfAttention (line 247) | class MobileBertSelfAttention(nn.Module): method __init__ (line 248) | def __init__(self, config): method transpose_for_scores (line 261) | def transpose_for_scores(self, x): method forward (line 266) | def forward( class MobileBertSelfOutput (line 305) | class MobileBertSelfOutput(nn.Module): method __init__ (line 306) | def __init__(self, config): method forward (line 314) | def forward(self, hidden_states: torch.Tensor, residual_tensor: torch.... class MobileBertAttention (line 322) | class MobileBertAttention(nn.Module): method __init__ (line 323) | def __init__(self, config): method prune_heads (line 329) | def prune_heads(self, heads): method forward (line 347) | def forward( class MobileBertIntermediate (line 372) | class MobileBertIntermediate(nn.Module): method __init__ (line 373) | def __init__(self, config): method forward (line 381) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OutputBottleneck (line 387) | class OutputBottleneck(nn.Module): method __init__ (line 388) | def __init__(self, config): method forward (line 394) | def forward(self, hidden_states: torch.Tensor, residual_tensor: torch.... class MobileBertOutput (line 401) | class MobileBertOutput(nn.Module): method __init__ (line 402) | def __init__(self, config): method forward (line 412) | def forward( class BottleneckLayer (line 425) | class BottleneckLayer(nn.Module): method __init__ (line 426) | def __init__(self, config): method forward (line 431) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Bottleneck (line 437) | class Bottleneck(nn.Module): method __init__ (line 438) | def __init__(self, config): method forward (line 446) | def forward(self, hidden_states: torch.Tensor) -> Tuple[torch.Tensor]: class FFNOutput (line 473) | class FFNOutput(nn.Module): method __init__ (line 474) | def __init__(self, config): method forward (line 479) | def forward(self, hidden_states: torch.Tensor, residual_tensor: torch.... class FFNLayer (line 485) | class FFNLayer(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 491) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertLayer (line 497) | class MobileBertLayer(nn.Module): method __init__ (line 498) | def __init__(self, config): method forward (line 511) | def forward( class MobileBertEncoder (line 560) | class MobileBertEncoder(nn.Module): method __init__ (line 561) | def __init__(self, config): method forward (line 565) | def forward( class MobileBertPooler (line 602) | class MobileBertPooler(nn.Module): method __init__ (line 603) | def __init__(self, config): method forward (line 609) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertPredictionHeadTransform (line 621) | class MobileBertPredictionHeadTransform(nn.Module): method __init__ (line 622) | def __init__(self, config): method forward (line 631) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertLMPredictionHead (line 638) | class MobileBertLMPredictionHead(nn.Module): method __init__ (line 639) | def __init__(self, config): method forward (line 650) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileBertOnlyMLMHead (line 657) | class MobileBertOnlyMLMHead(nn.Module): method __init__ (line 658) | def __init__(self, config): method forward (line 662) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class MobileBertPreTrainingHeads (line 667) | class MobileBertPreTrainingHeads(nn.Module): method __init__ (line 668) | def __init__(self, config): method forward (line 673) | def forward(self, sequence_output: torch.Tensor, pooled_output: torch.... class MobileBertPreTrainedModel (line 679) | class MobileBertPreTrainedModel(PreTrainedModel): method _init_weights (line 691) | def _init_weights(self, module): class MobileBertForPreTrainingOutput (line 709) | class MobileBertForPreTrainingOutput(ModelOutput): class MobileBertModel (line 812) | class MobileBertModel(MobileBertPreTrainedModel): method __init__ (line 817) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 828) | def get_input_embeddings(self): method set_input_embeddings (line 831) | def set_input_embeddings(self, value): method _prune_heads (line 834) | def _prune_heads(self, heads_to_prune): method forward (line 848) | def forward( class MobileBertForPreTraining (line 925) | class MobileBertForPreTraining(MobileBertPreTrainedModel): method __init__ (line 932) | def __init__(self, config): method get_output_embeddings (line 940) | def get_output_embeddings(self): method set_output_embeddings (line 943) | def set_output_embeddings(self, new_embeddigs): method resize_token_embeddings (line 946) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 956) | def forward( class MobileBertForMaskedLM (line 1037) | class MobileBertForMaskedLM(MobileBertPreTrainedModel): method __init__ (line 1045) | def __init__(self, config): method get_output_embeddings (line 1054) | def get_output_embeddings(self): method set_output_embeddings (line 1057) | def set_output_embeddings(self, new_embeddigs): method resize_token_embeddings (line 1060) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method forward (line 1075) | def forward( class MobileBertOnlyNSPHead (line 1128) | class MobileBertOnlyNSPHead(nn.Module): method __init__ (line 1129) | def __init__(self, config): method forward (line 1133) | def forward(self, pooled_output: torch.Tensor) -> torch.Tensor: class MobileBertForNextSentencePrediction (line 1142) | class MobileBertForNextSentencePrediction(MobileBertPreTrainedModel): method __init__ (line 1143) | def __init__(self, config): method forward (line 1154) | def forward( class MobileBertForSequenceClassification (line 1246) | class MobileBertForSequenceClassification(MobileBertPreTrainedModel): method __init__ (line 1247) | def __init__(self, config): method forward (line 1270) | def forward( class MobileBertForQuestionAnswering (line 1350) | class MobileBertForQuestionAnswering(MobileBertPreTrainedModel): method __init__ (line 1353) | def __init__(self, config): method forward (line 1373) | def forward( class MobileBertForMultipleChoice (line 1456) | class MobileBertForMultipleChoice(MobileBertPreTrainedModel): method __init__ (line 1457) | def __init__(self, config): method forward (line 1478) | def forward( class MobileBertForTokenClassification (line 1553) | class MobileBertForTokenClassification(MobileBertPreTrainedModel): method __init__ (line 1556) | def __init__(self, config): method forward (line 1578) | def forward( FILE: transformers/models/mobilebert/modeling_tf_mobilebert.py class TFMobileBertPreTrainingLoss (line 93) | class TFMobileBertPreTrainingLoss: method hf_compute_loss (line 100) | def hf_compute_loss(self, labels: tf.Tensor, logits: tf.Tensor) -> tf.... class TFMobileBertIntermediate (line 123) | class TFMobileBertIntermediate(tf.keras.layers.Layer): method __init__ (line 124) | def __init__(self, config, **kwargs): method call (line 134) | def call(self, hidden_states): class TFLayerNorm (line 141) | class TFLayerNorm(tf.keras.layers.LayerNormalization): method __init__ (line 142) | def __init__(self, feat_size, *args, **kwargs): class TFNoNorm (line 146) | class TFNoNorm(tf.keras.layers.Layer): method __init__ (line 147) | def __init__(self, feat_size, epsilon=None, **kwargs): method build (line 151) | def build(self, input_shape): method call (line 156) | def call(self, inputs: tf.Tensor): class TFMobileBertEmbeddings (line 163) | class TFMobileBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 166) | def __init__(self, config, **kwargs): method build (line 184) | def build(self, input_shape): method call (line 208) | def call(self, input_ids=None, position_ids=None, token_type_ids=None,... class TFMobileBertSelfAttention (line 258) | class TFMobileBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 259) | def __init__(self, config, **kwargs): method transpose_for_scores (line 285) | def transpose_for_scores(self, x, batch_size): method call (line 290) | def call( class TFMobileBertSelfOutput (line 336) | class TFMobileBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 337) | def __init__(self, config, **kwargs): method call (line 349) | def call(self, hidden_states, residual_tensor, training=False): class TFMobileBertAttention (line 357) | class TFMobileBertAttention(tf.keras.layers.Layer): method __init__ (line 358) | def __init__(self, config, **kwargs): method prune_heads (line 363) | def prune_heads(self, heads): method call (line 366) | def call( class TFOutputBottleneck (line 386) | class TFOutputBottleneck(tf.keras.layers.Layer): method __init__ (line 387) | def __init__(self, config, **kwargs): method call (line 395) | def call(self, hidden_states, residual_tensor, training=False): class TFMobileBertOutput (line 402) | class TFMobileBertOutput(tf.keras.layers.Layer): method __init__ (line 403) | def __init__(self, config, **kwargs): method call (line 417) | def call(self, hidden_states, residual_tensor_1, residual_tensor_2, tr... class TFBottleneckLayer (line 428) | class TFBottleneckLayer(tf.keras.layers.Layer): method __init__ (line 429) | def __init__(self, config, **kwargs): method call (line 436) | def call(self, inputs): class TFBottleneck (line 442) | class TFBottleneck(tf.keras.layers.Layer): method __init__ (line 443) | def __init__(self, config, **kwargs): method call (line 451) | def call(self, hidden_states): class TFFFNOutput (line 478) | class TFFFNOutput(tf.keras.layers.Layer): method __init__ (line 479) | def __init__(self, config, **kwargs): method call (line 486) | def call(self, hidden_states, residual_tensor): class TFFFNLayer (line 492) | class TFFFNLayer(tf.keras.layers.Layer): method __init__ (line 493) | def __init__(self, config, **kwargs): method call (line 498) | def call(self, hidden_states): class TFMobileBertLayer (line 504) | class TFMobileBertLayer(tf.keras.layers.Layer): method __init__ (line 505) | def __init__(self, config, **kwargs): method call (line 518) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFMobileBertEncoder (line 564) | class TFMobileBertEncoder(tf.keras.layers.Layer): method __init__ (line 565) | def __init__(self, config, **kwargs): method call (line 571) | def call( class TFMobileBertPooler (line 607) | class TFMobileBertPooler(tf.keras.layers.Layer): method __init__ (line 608) | def __init__(self, config, **kwargs): method call (line 619) | def call(self, hidden_states): class TFMobileBertPredictionHeadTransform (line 630) | class TFMobileBertPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 631) | def __init__(self, config, **kwargs): method call (line 642) | def call(self, hidden_states): class TFMobileBertLMPredictionHead (line 649) | class TFMobileBertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 650) | def __init__(self, config, **kwargs): method build (line 655) | def build(self, input_shape): method get_output_embeddings (line 671) | def get_output_embeddings(self): method set_output_embeddings (line 674) | def set_output_embeddings(self, value): method get_bias (line 678) | def get_bias(self): method set_bias (line 681) | def set_bias(self, value): method call (line 685) | def call(self, hidden_states): class TFMobileBertMLMHead (line 692) | class TFMobileBertMLMHead(tf.keras.layers.Layer): method __init__ (line 693) | def __init__(self, config, **kwargs): method call (line 697) | def call(self, sequence_output): class TFMobileBertMainLayer (line 703) | class TFMobileBertMainLayer(tf.keras.layers.Layer): method __init__ (line 706) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 719) | def get_input_embeddings(self): method set_input_embeddings (line 722) | def set_input_embeddings(self, value): method _prune_heads (line 726) | def _prune_heads(self, heads_to_prune): method call (line 734) | def call( class TFMobileBertPreTrainedModel (line 818) | class TFMobileBertPreTrainedModel(TFPreTrainedModel): class TFMobileBertForPreTrainingOutput (line 829) | class TFMobileBertForPreTrainingOutput(ModelOutput): class TFMobileBertModel (line 961) | class TFMobileBertModel(TFMobileBertPreTrainedModel): method __init__ (line 962) | def __init__(self, config, *inputs, **kwargs): method call (line 973) | def call( class TFMobileBertForPreTraining (line 1009) | class TFMobileBertForPreTraining(TFMobileBertPreTrainedModel, TFMobileBe... method __init__ (line 1010) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1016) | def get_lm_head(self): method get_prefix_bias_name (line 1019) | def get_prefix_bias_name(self): method call (line 1026) | def call( class TFMobileBertForMaskedLM (line 1093) | class TFMobileBertForMaskedLM(TFMobileBertPreTrainedModel, TFMaskedLangu... method __init__ (line 1101) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1107) | def get_lm_head(self): method get_prefix_bias_name (line 1110) | def get_prefix_bias_name(self): method call (line 1123) | def call( class TFMobileBertOnlyNSPHead (line 1172) | class TFMobileBertOnlyNSPHead(tf.keras.layers.Layer): method __init__ (line 1173) | def __init__(self, config, **kwargs): method call (line 1177) | def call(self, pooled_output): class TFMobileBertForNextSentencePrediction (line 1186) | class TFMobileBertForNextSentencePrediction(TFMobileBertPreTrainedModel,... method __init__ (line 1190) | def __init__(self, config, *inputs, **kwargs): method call (line 1199) | def call( class TFMobileBertForSequenceClassification (line 1271) | class TFMobileBertForSequenceClassification(TFMobileBertPreTrainedModel,... method __init__ (line 1281) | def __init__(self, config, *inputs, **kwargs): method call (line 1303) | def call( class TFMobileBertForQuestionAnswering (line 1361) | class TFMobileBertForQuestionAnswering(TFMobileBertPreTrainedModel, TFQu... method __init__ (line 1371) | def __init__(self, config, *inputs, **kwargs): method call (line 1391) | def call( class TFMobileBertForMultipleChoice (line 1460) | class TFMobileBertForMultipleChoice(TFMobileBertPreTrainedModel, TFMulti... method __init__ (line 1470) | def __init__(self, config, *inputs, **kwargs): method call (line 1488) | def call( class TFMobileBertForTokenClassification (line 1561) | class TFMobileBertForTokenClassification(TFMobileBertPreTrainedModel, TF... method __init__ (line 1572) | def __init__(self, config, *inputs, **kwargs): method call (line 1594) | def call( FILE: transformers/models/mobilebert/tokenization_mobilebert.py function load_vocab (line 43) | def load_vocab(vocab_file): function whitespace_tokenize (line 55) | def whitespace_tokenize(text): class MobileBertTokenizer (line 65) | class MobileBertTokenizer(PreTrainedTokenizer): method __init__ (line 112) | def __init__( method do_lower_case (line 159) | def do_lower_case(self): method vocab_size (line 163) | def vocab_size(self): method get_vocab (line 166) | def get_vocab(self): method _tokenize (line 169) | def _tokenize(self, text): method _convert_token_to_id (line 182) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 186) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 190) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 195) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 220) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 248) | def create_token_type_ids_from_sequences( method save_vocabulary (line 277) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 299) | class BasicTokenizer(object): method __init__ (line 319) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 327) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 364) | def _run_strip_accents(self, text): method _run_split_on_punc (line 375) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 397) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 410) | def _is_chinese_char(self, cp): method _clean_text (line 434) | def _clean_text(self, text): class WordpieceTokenizer (line 449) | class WordpieceTokenizer(object): method __init__ (line 452) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 457) | def tokenize(self, text): FILE: transformers/models/mobilebert/tokenization_mobilebert_fast.py class MobileBertTokenizerFast (line 46) | class MobileBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 92) | def __init__( method build_inputs_with_special_tokens (line 134) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 158) | def create_token_type_ids_from_sequences( method save_vocabulary (line 187) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/mobilenet_v1/configuration_mobilenet_v1.py class MobileNetV1Config (line 36) | class MobileNetV1Config(PretrainedConfig): method __init__ (line 83) | def __init__( class MobileNetV1OnnxConfig (line 112) | class MobileNetV1OnnxConfig(OnnxConfig): method inputs (line 116) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 120) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 127) | def atol_for_validation(self) -> float: FILE: transformers/models/mobilenet_v1/convert_original_tf_checkpoint_to_pytorch.py function get_mobilenet_v1_config (line 41) | def get_mobilenet_v1_config(model_name): function prepare_img (line 67) | def prepare_img(): function convert_movilevit_checkpoint (line 74) | def convert_movilevit_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: transformers/models/mobilenet_v1/feature_extraction_mobilenet_v1.py class MobileNetV1FeatureExtractor (line 26) | class MobileNetV1FeatureExtractor(MobileNetV1ImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/mobilenet_v1/image_processing_mobilenet_v1.py class MobileNetV1ImageProcessor (line 46) | class MobileNetV1ImageProcessor(BaseImageProcessor): method __init__ (line 87) | def __init__( method resize (line 117) | def resize( method center_crop (line 145) | def center_crop( method rescale (line 167) | def rescale( method normalize (line 189) | def normalize( method preprocess (line 218) | def preprocess( FILE: transformers/models/mobilenet_v1/modeling_mobilenet_v1.py function _build_tf_to_pytorch_map (line 53) | def _build_tf_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_mobilenet_v1 (line 100) | def load_tf_weights_in_mobilenet_v1(model, config, tf_checkpoint_path): function apply_tf_padding (line 156) | def apply_tf_padding(features: torch.Tensor, conv_layer: nn.Conv2d) -> t... class MobileNetV1ConvLayer (line 184) | class MobileNetV1ConvLayer(nn.Module): method __init__ (line 185) | def __init__( method forward (line 239) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV1PreTrainedModel (line 250) | class MobileNetV1PreTrainedModel(PreTrainedModel): method _init_weights (line 262) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d]) -> None: class MobileNetV1Model (line 301) | class MobileNetV1Model(MobileNetV1PreTrainedModel): method __init__ (line 302) | def __init__(self, config: MobileNetV1Config, add_pooling_layer: bool ... method _prune_heads (line 352) | def _prune_heads(self, heads_to_prune): method forward (line 363) | def forward( class MobileNetV1ForImageClassification (line 411) | class MobileNetV1ForImageClassification(MobileNetV1PreTrainedModel): method __init__ (line 412) | def __init__(self, config: MobileNetV1Config) -> None: method forward (line 434) | def forward( FILE: transformers/models/mobilenet_v2/configuration_mobilenet_v2.py class MobileNetV2Config (line 38) | class MobileNetV2Config(PretrainedConfig): method __init__ (line 101) | def __init__( class MobileNetV2OnnxConfig (line 142) | class MobileNetV2OnnxConfig(OnnxConfig): method inputs (line 146) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 150) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 157) | def atol_for_validation(self) -> float: FILE: transformers/models/mobilenet_v2/convert_original_tf_checkpoint_to_pytorch.py function get_mobilenet_v2_config (line 42) | def get_mobilenet_v2_config(model_name): function prepare_img (line 79) | def prepare_img(): function convert_movilevit_checkpoint (line 86) | def convert_movilevit_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: transformers/models/mobilenet_v2/feature_extraction_mobilenet_v2.py class MobileNetV2FeatureExtractor (line 26) | class MobileNetV2FeatureExtractor(MobileNetV2ImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/mobilenet_v2/image_processing_mobilenet_v2.py class MobileNetV2ImageProcessor (line 50) | class MobileNetV2ImageProcessor(BaseImageProcessor): method __init__ (line 91) | def __init__( method resize (line 121) | def resize( method center_crop (line 149) | def center_crop( method rescale (line 173) | def rescale( method normalize (line 195) | def normalize( method preprocess (line 224) | def preprocess( method post_process_semantic_segmentation (line 335) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: transformers/models/mobilenet_v2/modeling_mobilenet_v2.py function _build_tf_to_pytorch_map (line 65) | def _build_tf_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_mobilenet_v2 (line 177) | def load_tf_weights_in_mobilenet_v2(model, config, tf_checkpoint_path): function make_divisible (line 234) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... function apply_depth_multiplier (line 249) | def apply_depth_multiplier(config: MobileNetV2Config, channels: int) -> ... function apply_tf_padding (line 253) | def apply_tf_padding(features: torch.Tensor, conv_layer: nn.Conv2d) -> t... class MobileNetV2ConvLayer (line 288) | class MobileNetV2ConvLayer(nn.Module): method __init__ (line 289) | def __init__( method forward (line 346) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2InvertedResidual (line 357) | class MobileNetV2InvertedResidual(nn.Module): method __init__ (line 358) | def __init__( method forward (line 394) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2Stem (line 404) | class MobileNetV2Stem(nn.Module): method __init__ (line 405) | def __init__(self, config: MobileNetV2Config, in_channels: int, expand... method forward (line 442) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2PreTrainedModel (line 451) | class MobileNetV2PreTrainedModel(PreTrainedModel): method _init_weights (line 463) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d]) -> None: class MobileNetV2Model (line 502) | class MobileNetV2Model(MobileNetV2PreTrainedModel): method __init__ (line 503) | def __init__(self, config: MobileNetV2Config, add_pooling_layer: bool ... method _prune_heads (line 563) | def _prune_heads(self, heads_to_prune): method forward (line 574) | def forward( class MobileNetV2ForImageClassification (line 622) | class MobileNetV2ForImageClassification(MobileNetV2PreTrainedModel): method __init__ (line 623) | def __init__(self, config: MobileNetV2Config) -> None: method forward (line 645) | def forward( class MobileNetV2DeepLabV3Plus (line 700) | class MobileNetV2DeepLabV3Plus(nn.Module): method __init__ (line 706) | def __init__(self, config: MobileNetV2Config) -> None: method forward (line 756) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileNetV2ForSemanticSegmentation (line 781) | class MobileNetV2ForSemanticSegmentation(MobileNetV2PreTrainedModel): method __init__ (line 782) | def __init__(self, config: MobileNetV2Config) -> None: method forward (line 794) | def forward( FILE: transformers/models/mobilevit/configuration_mobilevit.py class MobileViTConfig (line 46) | class MobileViTConfig(PretrainedConfig): method __init__ (line 116) | def __init__( class MobileViTOnnxConfig (line 168) | class MobileViTOnnxConfig(OnnxConfig): method inputs (line 172) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 176) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 183) | def atol_for_validation(self) -> float: FILE: transformers/models/mobilevit/convert_mlcvnets_to_pytorch.py function get_mobilevit_config (line 40) | def get_mobilevit_config(mobilevit_name): function rename_key (line 74) | def rename_key(name, base_model=False): function convert_state_dict (line 153) | def convert_state_dict(orig_state_dict, model, base_model=False): function prepare_img (line 189) | def prepare_img(): function convert_movilevit_checkpoint (line 196) | def convert_movilevit_checkpoint(mobilevit_name, checkpoint_path, pytorc... FILE: transformers/models/mobilevit/feature_extraction_mobilevit.py class MobileViTFeatureExtractor (line 26) | class MobileViTFeatureExtractor(MobileViTImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/mobilevit/image_processing_mobilevit.py class MobileViTImageProcessor (line 51) | class MobileViTImageProcessor(BaseImageProcessor): method __init__ (line 85) | def __init__( method resize (line 112) | def resize( method center_crop (line 140) | def center_crop( method rescale (line 164) | def rescale( method flip_channel_order (line 184) | def flip_channel_order( method preprocess (line 198) | def preprocess( method post_process_semantic_segmentation (line 300) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: transformers/models/mobilevit/modeling_mobilevit.py function make_divisible (line 73) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... class MobileViTConvLayer (line 88) | class MobileViTConvLayer(nn.Module): method __init__ (line 89) | def __init__( method forward (line 143) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTInvertedResidual (line 152) | class MobileViTInvertedResidual(nn.Module): method __init__ (line 157) | def __init__( method forward (line 190) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTMobileNetLayer (line 200) | class MobileViTMobileNetLayer(nn.Module): method __init__ (line 201) | def __init__( method forward (line 217) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTSelfAttention (line 223) | class MobileViTSelfAttention(nn.Module): method __init__ (line 224) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method transpose_for_scores (line 243) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 248) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTSelfOutput (line 274) | class MobileViTSelfOutput(nn.Module): method __init__ (line 275) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method forward (line 280) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTAttention (line 286) | class MobileViTAttention(nn.Module): method __init__ (line 287) | def __init__(self, config: MobileViTConfig, hidden_size: int) -> None: method prune_heads (line 293) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 311) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTIntermediate (line 317) | class MobileViTIntermediate(nn.Module): method __init__ (line 318) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 326) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTOutput (line 332) | class MobileViTOutput(nn.Module): method __init__ (line 333) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 338) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MobileViTTransformerLayer (line 345) | class MobileViTTransformerLayer(nn.Module): method __init__ (line 346) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method forward (line 354) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTTransformer (line 364) | class MobileViTTransformer(nn.Module): method __init__ (line 365) | def __init__(self, config: MobileViTConfig, hidden_size: int, num_stag... method forward (line 377) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTLayer (line 383) | class MobileViTLayer(nn.Module): method __init__ (line 388) | def __init__( method unfolding (line 446) | def unfolding(self, features: torch.Tensor) -> Tuple[torch.Tensor, Dict]: method folding (line 489) | def folding(self, patches: torch.Tensor, info_dict: Dict) -> torch.Ten... method forward (line 518) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTEncoder (line 544) | class MobileViTEncoder(nn.Module): method __init__ (line 545) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 619) | def forward( class MobileViTPreTrainedModel (line 652) | class MobileViTPreTrainedModel(PreTrainedModel): method _init_weights (line 663) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 675) | def _set_gradient_checkpointing(self, module, value=False): class MobileViTModel (line 708) | class MobileViTModel(MobileViTPreTrainedModel): method __init__ (line 709) | def __init__(self, config: MobileViTConfig, expand_output: bool = True): method _prune_heads (line 735) | def _prune_heads(self, heads_to_prune): method forward (line 753) | def forward( class MobileViTForImageClassification (line 802) | class MobileViTForImageClassification(MobileViTPreTrainedModel): method __init__ (line 803) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 825) | def forward( class MobileViTASPPPooling (line 880) | class MobileViTASPPPooling(nn.Module): method __init__ (line 881) | def __init__(self, config: MobileViTConfig, in_channels: int, out_chan... method forward (line 896) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTASPP (line 904) | class MobileViTASPP(nn.Module): method __init__ (line 909) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 952) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTDeepLabV3 (line 963) | class MobileViTDeepLabV3(nn.Module): method __init__ (line 968) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 984) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTForSemanticSegmentation (line 997) | class MobileViTForSemanticSegmentation(MobileViTPreTrainedModel): method __init__ (line 998) | def __init__(self, config: MobileViTConfig) -> None: method forward (line 1010) | def forward( FILE: transformers/models/mobilevit/modeling_tf_mobilevit.py function make_divisible (line 69) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... class TFMobileViTConvLayer (line 84) | class TFMobileViTConvLayer(tf.keras.layers.Layer): method __init__ (line 85) | def __init__( method call (line 136) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTInvertedResidual (line 146) | class TFMobileViTInvertedResidual(tf.keras.layers.Layer): method __init__ (line 151) | def __init__( method call (line 184) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTMobileNetLayer (line 194) | class TFMobileViTMobileNetLayer(tf.keras.layers.Layer): method __init__ (line 195) | def __init__( method call (line 218) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTSelfAttention (line 224) | class TFMobileViTSelfAttention(tf.keras.layers.Layer): method __init__ (line 225) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method transpose_for_scores (line 246) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 251) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTSelfOutput (line 276) | class TFMobileViTSelfOutput(tf.keras.layers.Layer): method __init__ (line 277) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method call (line 282) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTAttention (line 288) | class TFMobileViTAttention(tf.keras.layers.Layer): method __init__ (line 289) | def __init__(self, config: MobileViTConfig, hidden_size: int, **kwargs... method prune_heads (line 294) | def prune_heads(self, heads): method call (line 297) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTIntermediate (line 303) | class TFMobileViTIntermediate(tf.keras.layers.Layer): method __init__ (line 304) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 312) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFMobileViTOutput (line 318) | class TFMobileViTOutput(tf.keras.layers.Layer): method __init__ (line 319) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 324) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFMobileViTTransformerLayer (line 331) | class TFMobileViTTransformerLayer(tf.keras.layers.Layer): method __init__ (line 332) | def __init__(self, config: MobileViTConfig, hidden_size: int, intermed... method call (line 344) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTTransformer (line 354) | class TFMobileViTTransformer(tf.keras.layers.Layer): method __init__ (line 355) | def __init__(self, config: MobileViTConfig, hidden_size: int, num_stag... method call (line 368) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTLayer (line 374) | class TFMobileViTLayer(tf.keras.layers.Layer): method __init__ (line 379) | def __init__( method unfolding (line 434) | def unfolding(self, features: tf.Tensor) -> Tuple[tf.Tensor, Dict]: method folding (line 478) | def folding(self, patches: tf.Tensor, info_dict: Dict) -> tf.Tensor: method call (line 506) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTEncoder (line 532) | class TFMobileViTEncoder(tf.keras.layers.Layer): method __init__ (line 533) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 611) | def call( class TFMobileViTMainLayer (line 633) | class TFMobileViTMainLayer(tf.keras.layers.Layer): method __init__ (line 636) | def __init__(self, config: MobileViTConfig, expand_output: bool = True... method _prune_heads (line 658) | def _prune_heads(self, heads_to_prune): method call (line 666) | def call( class TFMobileViTPreTrainedModel (line 728) | class TFMobileViTPreTrainedModel(TFPreTrainedModel): class TFMobileViTModel (line 800) | class TFMobileViTModel(TFMobileViTPreTrainedModel): method __init__ (line 801) | def __init__(self, config: MobileViTConfig, expand_output: bool = True... method call (line 817) | def call( class TFMobileViTForImageClassification (line 835) | class TFMobileViTForImageClassification(TFMobileViTPreTrainedModel, TFSe... method __init__ (line 836) | def __init__(self, config: MobileViTConfig, *inputs, **kwargs) -> None: method call (line 856) | def call( class TFMobileViTASPPPooling (line 888) | class TFMobileViTASPPPooling(tf.keras.layers.Layer): method __init__ (line 889) | def __init__(self, config: MobileViTConfig, out_channels: int, **kwarg... method call (line 904) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTASPP (line 912) | class TFMobileViTASPP(tf.keras.layers.Layer): method __init__ (line 917) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 963) | def call(self, features: tf.Tensor, training: bool = False) -> tf.Tensor: class TFMobileViTDeepLabV3 (line 977) | class TFMobileViTDeepLabV3(tf.keras.layers.Layer): method __init__ (line 982) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method call (line 998) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFMobileViTForSemanticSegmentation (line 1011) | class TFMobileViTForSemanticSegmentation(TFMobileViTPreTrainedModel): method __init__ (line 1012) | def __init__(self, config: MobileViTConfig, **kwargs) -> None: method hf_compute_loss (line 1019) | def hf_compute_loss(self, logits, labels): method call (line 1042) | def call( FILE: transformers/models/mobilevitv2/configuration_mobilevitv2.py class MobileViTV2Config (line 34) | class MobileViTV2Config(PretrainedConfig): method __init__ (line 102) | def __init__( class MobileViTV2OnnxConfig (line 152) | class MobileViTV2OnnxConfig(OnnxConfig): method inputs (line 156) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 160) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 167) | def atol_for_validation(self) -> float: FILE: transformers/models/mobilevitv2/convert_mlcvnets_to_pytorch.py function load_orig_config_file (line 42) | def load_orig_config_file(orig_cfg_file): function get_mobilevitv2_config (line 68) | def get_mobilevitv2_config(task_name, orig_cfg_file): function rename_key (line 126) | def rename_key(dct, old, new): function create_rename_keys (line 131) | def create_rename_keys(state_dict, base_model=False): function remove_unused_keys (line 215) | def remove_unused_keys(state_dict): function prepare_img (line 226) | def prepare_img(): function convert_mobilevitv2_checkpoint (line 234) | def convert_mobilevitv2_checkpoint(task_name, checkpoint_path, orig_conf... FILE: transformers/models/mobilevitv2/modeling_mobilevitv2.py function make_divisible (line 67) | def make_divisible(value: int, divisor: int = 8, min_value: Optional[int... function clip (line 82) | def clip(value: float, min_val: float = float("-inf"), max_val: float = ... class MobileViTV2ConvLayer (line 87) | class MobileViTV2ConvLayer(nn.Module): method __init__ (line 88) | def __init__( method forward (line 142) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2InvertedResidual (line 152) | class MobileViTV2InvertedResidual(nn.Module): method __init__ (line 157) | def __init__( method forward (line 190) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2MobileNetLayer (line 201) | class MobileViTV2MobileNetLayer(nn.Module): method __init__ (line 202) | def __init__( method forward (line 218) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2LinearSelfAttention (line 224) | class MobileViTV2LinearSelfAttention(nn.Module): method __init__ (line 236) | def __init__(self, config: MobileViTV2Config, embed_dim: int) -> None: method forward (line 261) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2FFN (line 287) | class MobileViTV2FFN(nn.Module): method __init__ (line 288) | def __init__( method forward (line 320) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2TransformerLayer (line 328) | class MobileViTV2TransformerLayer(nn.Module): method __init__ (line 329) | def __init__( method forward (line 343) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2Transformer (line 355) | class MobileViTV2Transformer(nn.Module): method __init__ (line 356) | def __init__(self, config: MobileViTV2Config, n_layers: int, d_model: ... method forward (line 373) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2Layer (line 379) | class MobileViTV2Layer(nn.Module): method __init__ (line 384) | def __init__( method unfolding (line 445) | def unfolding(self, feature_map: torch.Tensor) -> Tuple[torch.Tensor, ... method folding (line 456) | def folding(self, patches: torch.Tensor, output_size: Tuple[int, int])... method forward (line 469) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2Encoder (line 493) | class MobileViTV2Encoder(nn.Module): method __init__ (line 494) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 575) | def forward( class MobileViTV2PreTrainedModel (line 609) | class MobileViTV2PreTrainedModel(PreTrainedModel): method _init_weights (line 620) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 632) | def _set_gradient_checkpointing(self, module, value=False): class MobileViTV2Model (line 665) | class MobileViTV2Model(MobileViTV2PreTrainedModel): method __init__ (line 666) | def __init__(self, config: MobileViTV2Config, expand_output: bool = Tr... method _prune_heads (line 689) | def _prune_heads(self, heads_to_prune): method forward (line 707) | def forward( class MobileViTV2ForImageClassification (line 756) | class MobileViTV2ForImageClassification(MobileViTV2PreTrainedModel): method __init__ (line 757) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 781) | def forward( class MobileViTV2ASPPPooling (line 837) | class MobileViTV2ASPPPooling(nn.Module): method __init__ (line 838) | def __init__(self, config: MobileViTV2Config, in_channels: int, out_ch... method forward (line 853) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2ASPP (line 861) | class MobileViTV2ASPP(nn.Module): method __init__ (line 866) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 910) | def forward(self, features: torch.Tensor) -> torch.Tensor: class MobileViTV2DeepLabV3 (line 922) | class MobileViTV2DeepLabV3(nn.Module): method __init__ (line 927) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 943) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MobileViTV2ForSemanticSegmentation (line 957) | class MobileViTV2ForSemanticSegmentation(MobileViTV2PreTrainedModel): method __init__ (line 958) | def __init__(self, config: MobileViTV2Config) -> None: method forward (line 970) | def forward( FILE: transformers/models/mpnet/configuration_mpnet.py class MPNetConfig (line 29) | class MPNetConfig(PretrainedConfig): method __init__ (line 84) | def __init__( FILE: transformers/models/mpnet/modeling_mpnet.py class MPNetPreTrainedModel (line 53) | class MPNetPreTrainedModel(PreTrainedModel): method _init_weights (line 58) | def _init_weights(self, module): class MPNetEmbeddings (line 75) | class MPNetEmbeddings(nn.Module): method __init__ (line 76) | def __init__(self, config): method forward (line 88) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... method create_position_ids_from_inputs_embeds (line 114) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class MPNetSelfAttention (line 132) | class MPNetSelfAttention(nn.Module): method __init__ (line 133) | def __init__(self, config): method transpose_for_scores (line 152) | def transpose_for_scores(self, x): method forward (line 157) | def forward( class MPNetAttention (line 205) | class MPNetAttention(nn.Module): method __init__ (line 206) | def __init__(self, config): method prune_heads (line 214) | def prune_heads(self, heads): method forward (line 230) | def forward( class MPNetIntermediate (line 252) | class MPNetIntermediate(nn.Module): method __init__ (line 253) | def __init__(self, config): method forward (line 261) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MPNetOutput (line 268) | class MPNetOutput(nn.Module): method __init__ (line 269) | def __init__(self, config): method forward (line 275) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class MPNetLayer (line 282) | class MPNetLayer(nn.Module): method __init__ (line 283) | def __init__(self, config): method forward (line 289) | def forward( class MPNetEncoder (line 314) | class MPNetEncoder(nn.Module): method __init__ (line 315) | def __init__(self, config): method forward (line 322) | def forward( method compute_position_bias (line 364) | def compute_position_bias(self, x, position_ids=None, num_buckets=32): method relative_position_bucket (line 383) | def relative_position_bucket(relative_position, num_buckets=32, max_di... class MPNetPooler (line 404) | class MPNetPooler(nn.Module): method __init__ (line 405) | def __init__(self, config): method forward (line 410) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MPNetModel (line 481) | class MPNetModel(MPNetPreTrainedModel): method __init__ (line 484) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 495) | def get_input_embeddings(self): method set_input_embeddings (line 498) | def set_input_embeddings(self, value): method _prune_heads (line 501) | def _prune_heads(self, heads_to_prune): method forward (line 515) | def forward( class MPNetForMaskedLM (line 572) | class MPNetForMaskedLM(MPNetPreTrainedModel): method __init__ (line 576) | def __init__(self, config): method get_output_embeddings (line 585) | def get_output_embeddings(self): method set_output_embeddings (line 588) | def set_output_embeddings(self, new_embeddings): method forward (line 597) | def forward( class MPNetLMHead (line 648) | class MPNetLMHead(nn.Module): method __init__ (line 651) | def __init__(self, config): method forward (line 662) | def forward(self, features, **kwargs): class MPNetForSequenceClassification (line 680) | class MPNetForSequenceClassification(MPNetPreTrainedModel): method __init__ (line 683) | def __init__(self, config): method forward (line 699) | def forward( class MPNetForMultipleChoice (line 774) | class MPNetForMultipleChoice(MPNetPreTrainedModel): method __init__ (line 777) | def __init__(self, config): method forward (line 793) | def forward( class MPNetForTokenClassification (line 864) | class MPNetForTokenClassification(MPNetPreTrainedModel): method __init__ (line 868) | def __init__(self, config): method forward (line 885) | def forward( class MPNetClassificationHead (line 937) | class MPNetClassificationHead(nn.Module): method __init__ (line 940) | def __init__(self, config): method forward (line 946) | def forward(self, features, **kwargs): class MPNetForQuestionAnswering (line 963) | class MPNetForQuestionAnswering(MPNetPreTrainedModel): method __init__ (line 967) | def __init__(self, config): method forward (line 983) | def forward( function create_position_ids_from_input_ids (line 1057) | def create_position_ids_from_input_ids(input_ids, padding_idx): FILE: transformers/models/mpnet/modeling_tf_mpnet.py class TFMPNetPreTrainedModel (line 70) | class TFMPNetPreTrainedModel(TFPreTrainedModel): class TFMPNetEmbeddings (line 80) | class TFMPNetEmbeddings(tf.keras.layers.Layer): method __init__ (line 83) | def __init__(self, config, **kwargs): method build (line 94) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 111) | def create_position_ids_from_input_ids(self, input_ids): method call (line 125) | def call(self, input_ids=None, position_ids=None, inputs_embeds=None, ... class TFMPNetPooler (line 158) | class TFMPNetPooler(tf.keras.layers.Layer): method __init__ (line 159) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 169) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFMPNetSelfAttention (line 178) | class TFMPNetSelfAttention(tf.keras.layers.Layer): method __init__ (line 179) | def __init__(self, config, **kwargs): method transpose_for_scores (line 207) | def transpose_for_scores(self, x, batch_size): method call (line 213) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFMPNetAttention (line 251) | class TFMPNetAttention(tf.keras.layers.Layer): method __init__ (line 252) | def __init__(self, config, **kwargs): method prune_heads (line 259) | def prune_heads(self, heads): method call (line 262) | def call(self, input_tensor, attention_mask, head_mask, output_attenti... class TFMPNetIntermediate (line 272) | class TFMPNetIntermediate(tf.keras.layers.Layer): method __init__ (line 273) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 285) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFMPNetOutput (line 293) | class TFMPNetOutput(tf.keras.layers.Layer): method __init__ (line 294) | def __init__(self, config: MPNetConfig, **kwargs): method call (line 303) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFMPNetLayer (line 311) | class TFMPNetLayer(tf.keras.layers.Layer): method __init__ (line 312) | def __init__(self, config, **kwargs): method call (line 319) | def call(self, hidden_states, attention_mask, head_mask, output_attent... class TFMPNetEncoder (line 333) | class TFMPNetEncoder(tf.keras.layers.Layer): method __init__ (line 334) | def __init__(self, config, **kwargs): method build (line 347) | def build(self, input_shape): method call (line 357) | def call( method _relative_position_bucket (line 400) | def _relative_position_bucket(relative_position, num_buckets=32, max_d... method compute_position_bias (line 421) | def compute_position_bias(self, x, position_ids=None): class TFMPNetMainLayer (line 445) | class TFMPNetMainLayer(tf.keras.layers.Layer): method __init__ (line 448) | def __init__(self, config, **kwargs): method get_input_embeddings (line 463) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 467) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 472) | def _prune_heads(self, heads_to_prune): method call (line 480) | def call( class TFMPNetModel (line 659) | class TFMPNetModel(TFMPNetPreTrainedModel): method __init__ (line 660) | def __init__(self, config, *inputs, **kwargs): method call (line 671) | def call( class TFMPNetLMHead (line 697) | class TFMPNetLMHead(tf.keras.layers.Layer): method __init__ (line 700) | def __init__(self, config, input_embeddings, **kwargs): method build (line 715) | def build(self, input_shape): method get_output_embeddings (line 720) | def get_output_embeddings(self): method set_output_embeddings (line 723) | def set_output_embeddings(self, value): method get_bias (line 727) | def get_bias(self): method set_bias (line 730) | def set_bias(self, value): method call (line 734) | def call(self, hidden_states): class TFMPNetForMaskedLM (line 750) | class TFMPNetForMaskedLM(TFMPNetPreTrainedModel, TFMaskedLanguageModelin... method __init__ (line 753) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 759) | def get_lm_head(self): method get_prefix_bias_name (line 762) | def get_prefix_bias_name(self): method call (line 773) | def call( class TFMPNetClassificationHead (line 820) | class TFMPNetClassificationHead(tf.keras.layers.Layer): method __init__ (line 823) | def __init__(self, config, **kwargs): method call (line 836) | def call(self, features, training=False): class TFMPNetForSequenceClassification (line 852) | class TFMPNetForSequenceClassification(TFMPNetPreTrainedModel, TFSequenc... method __init__ (line 855) | def __init__(self, config, *inputs, **kwargs): method call (line 869) | def call( class TFMPNetForMultipleChoice (line 924) | class TFMPNetForMultipleChoice(TFMPNetPreTrainedModel, TFMultipleChoiceL... method __init__ (line 925) | def __init__(self, config, *inputs, **kwargs): method call (line 941) | def call( class TFMPNetForTokenClassification (line 1010) | class TFMPNetForTokenClassification(TFMPNetPreTrainedModel, TFTokenClass... method __init__ (line 1013) | def __init__(self, config, *inputs, **kwargs): method call (line 1030) | def call( class TFMPNetForQuestionAnswering (line 1084) | class TFMPNetForQuestionAnswering(TFMPNetPreTrainedModel, TFQuestionAnsw... method __init__ (line 1087) | def __init__(self, config, *inputs, **kwargs): method call (line 1103) | def call( FILE: transformers/models/mpnet/tokenization_mpnet.py function load_vocab (line 46) | def load_vocab(vocab_file): function whitespace_tokenize (line 57) | def whitespace_tokenize(text): class MPNetTokenizer (line 66) | class MPNetTokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method do_lower_case (line 194) | def do_lower_case(self): method vocab_size (line 198) | def vocab_size(self): method get_vocab (line 201) | def get_vocab(self): method _tokenize (line 204) | def _tokenize(self, text): method _convert_token_to_id (line 217) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 221) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 225) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 230) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 255) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 282) | def create_token_type_ids_from_sequences( method save_vocabulary (line 305) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 327) | class BasicTokenizer(object): method __init__ (line 347) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 355) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 392) | def _run_strip_accents(self, text): method _run_split_on_punc (line 403) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 425) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 438) | def _is_chinese_char(self, cp): method _clean_text (line 462) | def _clean_text(self, text): class WordpieceTokenizer (line 477) | class WordpieceTokenizer(object): method __init__ (line 480) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 485) | def tokenize(self, text): FILE: transformers/models/mpnet/tokenization_mpnet_fast.py class MPNetTokenizerFast (line 51) | class MPNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 113) | def __init__( method mask_token (line 158) | def mask_token(self) -> str: method mask_token (line 173) | def mask_token(self, value): method build_inputs_with_special_tokens (line 184) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 191) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/mt5/configuration_mt5.py class MT5Config (line 26) | class MT5Config(PretrainedConfig): method __init__ (line 72) | def __init__( method hidden_size (line 138) | def hidden_size(self): method num_attention_heads (line 142) | def num_attention_heads(self): method num_hidden_layers (line 146) | def num_hidden_layers(self): class MT5OnnxConfig (line 150) | class MT5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 173) | def default_onnx_opset(self) -> int: method atol_for_validation (line 177) | def atol_for_validation(self) -> float: FILE: transformers/models/mt5/modeling_flax_mt5.py function shift_tokens_right (line 30) | def shift_tokens_right(input_ids: jnp.array, pad_token_id: int, decoder_... class FlaxMT5Model (line 42) | class FlaxMT5Model(FlaxT5Model): class FlaxMT5EncoderModel (line 68) | class FlaxMT5EncoderModel(FlaxT5EncoderModel): class FlaxMT5ForConditionalGeneration (line 94) | class FlaxMT5ForConditionalGeneration(FlaxT5ForConditionalGeneration): FILE: transformers/models/mt5/modeling_mt5.py class MT5LayerNorm (line 110) | class MT5LayerNorm(nn.Module): method __init__ (line 111) | def __init__(self, hidden_size, eps=1e-6): method forward (line 119) | def forward(self, hidden_states): class MT5DenseActDense (line 136) | class MT5DenseActDense(nn.Module): method __init__ (line 137) | def __init__(self, config: MT5Config): method forward (line 144) | def forward(self, hidden_states): class MT5DenseGatedActDense (line 159) | class MT5DenseGatedActDense(nn.Module): method __init__ (line 160) | def __init__(self, config: MT5Config): method forward (line 168) | def forward(self, hidden_states): class MT5LayerFF (line 189) | class MT5LayerFF(nn.Module): method __init__ (line 190) | def __init__(self, config: MT5Config): method forward (line 200) | def forward(self, hidden_states): class MT5Attention (line 208) | class MT5Attention(nn.Module): method __init__ (line 209) | def __init__(self, config: MT5Config, has_relative_attention_bias=False): method prune_heads (line 232) | def prune_heads(self, heads): method _relative_position_bucket (line 249) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 296) | def compute_bias(self, query_length, key_length, device=None): method forward (line 313) | def forward( class MT5LayerSelfAttention (line 444) | class MT5LayerSelfAttention(nn.Module): method __init__ (line 445) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 451) | def forward( class MT5LayerCrossAttention (line 477) | class MT5LayerCrossAttention(nn.Module): method __init__ (line 478) | def __init__(self, config): method forward (line 484) | def forward( class MT5Block (line 514) | class MT5Block(nn.Module): method __init__ (line 515) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 525) | def forward( function load_tf_weights_in_mt5 (line 638) | def load_tf_weights_in_mt5(model, config, tf_checkpoint_path): class MT5PreTrainedModel (line 745) | class MT5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 760) | def dummy_inputs(self): method _init_weights (line 770) | def _init_weights(self, module): method _set_gradient_checkpointing (line 814) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 818) | def _shift_right(self, input_ids): class MT5Stack (line 847) | class MT5Stack(MT5PreTrainedModel): method __init__ (line 848) | def __init__(self, config, embed_tokens=None): method parallelize (line 868) | def parallelize(self, device_map=None): method deparallelize (line 896) | def deparallelize(self): method get_input_embeddings (line 911) | def get_input_embeddings(self): method set_input_embeddings (line 914) | def set_input_embeddings(self, new_embeddings): method forward (line 917) | def forward( class MT5Model (line 1296) | class MT5Model(MT5PreTrainedModel): method __init__ (line 1329) | def __init__(self, config: MT5Config): method parallelize (line 1354) | def parallelize(self, device_map=None): method deparallelize (line 1374) | def deparallelize(self): method get_input_embeddings (line 1388) | def get_input_embeddings(self): method set_input_embeddings (line 1392) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1398) | def get_encoder(self): method get_decoder (line 1402) | def get_decoder(self): method _prune_heads (line 1406) | def _prune_heads(self, heads_to_prune): method forward (line 1417) | def forward( class MT5ForConditionalGeneration (line 1531) | class MT5ForConditionalGeneration(MT5PreTrainedModel): method __init__ (line 1561) | def __init__(self, config: MT5Config): method parallelize (line 1590) | def parallelize(self, device_map=None): method deparallelize (line 1611) | def deparallelize(self): method get_input_embeddings (line 1626) | def get_input_embeddings(self): method set_input_embeddings (line 1630) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1636) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1640) | def get_output_embeddings(self): method get_encoder (line 1644) | def get_encoder(self): method get_decoder (line 1648) | def get_decoder(self): method forward (line 1654) | def forward( method prepare_inputs_for_generation (line 1808) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1838) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1842) | def _reorder_cache(self, past_key_values, beam_idx): class MT5EncoderModel (line 1877) | class MT5EncoderModel(MT5PreTrainedModel): method __init__ (line 1903) | def __init__(self, config: MT5Config): method parallelize (line 1921) | def parallelize(self, device_map=None): method deparallelize (line 1940) | def deparallelize(self): method get_input_embeddings (line 1952) | def get_input_embeddings(self): method set_input_embeddings (line 1956) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1961) | def get_encoder(self): method _prune_heads (line 1965) | def _prune_heads(self, heads_to_prune): method forward (line 1976) | def forward( FILE: transformers/models/mt5/modeling_tf_mt5.py class TFMT5Model (line 27) | class TFMT5Model(TFT5Model): class TFMT5ForConditionalGeneration (line 51) | class TFMT5ForConditionalGeneration(TFT5ForConditionalGeneration): class TFMT5EncoderModel (line 75) | class TFMT5EncoderModel(TFT5EncoderModel): FILE: transformers/models/mvp/configuration_mvp.py class MvpConfig (line 29) | class MvpConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: transformers/models/mvp/modeling_mvp.py function shift_tokens_right (line 77) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 94) | def _make_causal_mask( function _expand_mask (line 112) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class MvpLearnedPositionalEmbedding (line 127) | class MvpLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 132) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 138) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class MvpAttention (line 149) | class MvpAttention(nn.Module): method __init__ (line 152) | def __init__( method _shape (line 179) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 182) | def forward( class MvpEncoderLayer (line 304) | class MvpEncoderLayer(nn.Module): method __init__ (line 305) | def __init__(self, config: MvpConfig): method forward (line 321) | def forward( class MvpDecoderLayer (line 376) | class MvpDecoderLayer(nn.Module): method __init__ (line 377) | def __init__(self, config: MvpConfig): method forward (line 403) | def forward( class MvpClassificationHead (line 502) | class MvpClassificationHead(nn.Module): method __init__ (line 505) | def __init__( method forward (line 517) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class MvpPrompt (line 526) | class MvpPrompt(nn.Module): method __init__ (line 529) | def __init__(self, config, num_layers, num_heads): method forward (line 543) | def forward(self, prompt_ids: torch.Tensor) -> Tuple[torch.Tensor]: class MvpPreTrainedModel (line 551) | class MvpPreTrainedModel(PreTrainedModel): method _init_weights (line 557) | def _init_weights(self, module): method _set_gradient_checkpointing (line 568) | def _set_gradient_checkpointing(self, module, value=False): method dummy_inputs (line 573) | def dummy_inputs(self): class MvpEncoder (line 790) | class MvpEncoder(MvpPreTrainedModel): method __init__ (line 801) | def __init__( method get_input_embeddings (line 839) | def get_input_embeddings(self): method set_input_embeddings (line 842) | def set_input_embeddings(self, value): method forward (line 845) | def forward( class MvpDecoder (line 987) | class MvpDecoder(MvpPreTrainedModel): method __init__ (line 997) | def __init__( method get_input_embeddings (line 1037) | def get_input_embeddings(self): method set_input_embeddings (line 1040) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 1043) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1064) | def forward( class MvpModel (line 1297) | class MvpModel(MvpPreTrainedModel): method __init__ (line 1301) | def __init__(self, config: MvpConfig): method get_input_embeddings (line 1314) | def get_input_embeddings(self): method set_input_embeddings (line 1317) | def set_input_embeddings(self, value): method get_encoder (line 1322) | def get_encoder(self): method get_decoder (line 1325) | def get_decoder(self): method set_lightweight_tuning (line 1328) | def set_lightweight_tuning(self): method forward (line 1343) | def forward( class MvpForConditionalGeneration (line 1434) | class MvpForConditionalGeneration(MvpPreTrainedModel): method __init__ (line 1437) | def __init__(self, config: MvpConfig): method get_encoder (line 1446) | def get_encoder(self): method get_decoder (line 1449) | def get_decoder(self): method resize_token_embeddings (line 1452) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1457) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1466) | def get_output_embeddings(self): method set_output_embeddings (line 1469) | def set_output_embeddings(self, new_embeddings): method set_lightweight_tuning (line 1472) | def set_lightweight_tuning(self): method forward (line 1479) | def forward( method prepare_inputs_for_generation (line 1557) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1585) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1589) | def _reorder_cache(past_key_values, beam_idx): class MvpForSequenceClassification (line 1606) | class MvpForSequenceClassification(MvpPreTrainedModel): method __init__ (line 1610) | def __init__(self, config: MvpConfig, **kwargs): method set_lightweight_tuning (line 1623) | def set_lightweight_tuning(self): method forward (line 1629) | def forward( class MvpForQuestionAnswering (line 1734) | class MvpForQuestionAnswering(MvpPreTrainedModel): method __init__ (line 1738) | def __init__(self, config): method set_lightweight_tuning (line 1750) | def set_lightweight_tuning(self): method forward (line 1756) | def forward( class MvpDecoderWrapper (line 1852) | class MvpDecoderWrapper(MvpPreTrainedModel): method __init__ (line 1858) | def __init__(self, config): method forward (line 1862) | def forward(self, *args, **kwargs): class MvpForCausalLM (line 1866) | class MvpForCausalLM(MvpPreTrainedModel): method __init__ (line 1869) | def __init__(self, config): method get_input_embeddings (line 1881) | def get_input_embeddings(self): method set_input_embeddings (line 1884) | def set_input_embeddings(self, value): method get_output_embeddings (line 1887) | def get_output_embeddings(self): method set_output_embeddings (line 1890) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1893) | def set_decoder(self, decoder): method get_decoder (line 1896) | def get_decoder(self): method set_lightweight_tuning (line 1899) | def set_lightweight_tuning(self): method forward (line 1904) | def forward( method prepare_inputs_for_generation (line 2046) | def prepare_inputs_for_generation( method _reorder_cache (line 2064) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/mvp/tokenization_mvp.py function bytes_to_unicode (line 51) | def bytes_to_unicode(): function get_pairs (line 75) | def get_pairs(word): class MvpTokenizer (line 89) | class MvpTokenizer(PreTrainedTokenizer): method __init__ (line 172) | def __init__( method vocab_size (line 226) | def vocab_size(self): method get_vocab (line 229) | def get_vocab(self): method bpe (line 232) | def bpe(self, token): method _tokenize (line 274) | def _tokenize(self, text): method _convert_token_to_id (line 284) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 288) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 292) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 298) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 327) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 352) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 379) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 402) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: transformers/models/mvp/tokenization_mvp_fast.py class MvpTokenizerFast (line 53) | class MvpTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 139) | def __init__( method mask_token (line 209) | def mask_token(self) -> str: method mask_token (line 224) | def mask_token(self, value): method _batch_encode_plus (line 235) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 246) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 257) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 261) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 268) | def create_token_type_ids_from_sequences( FILE: transformers/models/nat/configuration_nat.py class NatConfig (line 30) | class NatConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 102) | def __init__( FILE: transformers/models/nat/modeling_nat.py function natten2dqkrpb (line 50) | def natten2dqkrpb(*args, **kwargs): function natten2dav (line 53) | def natten2dav(*args, **kwargs): class NatEncoderOutput (line 80) | class NatEncoderOutput(ModelOutput): class NatModelOutput (line 113) | class NatModelOutput(ModelOutput): class NatImageClassifierOutput (line 149) | class NatImageClassifierOutput(ModelOutput): class NatEmbeddings (line 184) | class NatEmbeddings(nn.Module): method __init__ (line 189) | def __init__(self, config): method forward (line 197) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class NatPatchEmbeddings (line 206) | class NatPatchEmbeddings(nn.Module): method __init__ (line 213) | def __init__(self, config): method forward (line 230) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> torch.... class NatDownsampler (line 242) | class NatDownsampler(nn.Module): method __init__ (line 253) | def __init__(self, dim: int, norm_layer: nn.Module = nn.LayerNorm) -> ... method forward (line 259) | def forward(self, input_feature: torch.Tensor) -> torch.Tensor: function drop_path (line 266) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class NatDropPath (line 287) | class NatDropPath(nn.Module): method __init__ (line 290) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 294) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 297) | def extra_repr(self) -> str: class NeighborhoodAttention (line 301) | class NeighborhoodAttention(nn.Module): method __init__ (line 302) | def __init__(self, config, dim, num_heads, kernel_size): method transpose_for_scores (line 323) | def transpose_for_scores(self, x): method forward (line 328) | def forward( class NeighborhoodAttentionOutput (line 362) | class NeighborhoodAttentionOutput(nn.Module): method __init__ (line 363) | def __init__(self, config, dim): method forward (line 368) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NeighborhoodAttentionModule (line 375) | class NeighborhoodAttentionModule(nn.Module): method __init__ (line 376) | def __init__(self, config, dim, num_heads, kernel_size): method prune_heads (line 382) | def prune_heads(self, heads): method forward (line 400) | def forward( class NatIntermediate (line 411) | class NatIntermediate(nn.Module): method __init__ (line 412) | def __init__(self, config, dim): method forward (line 420) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NatOutput (line 426) | class NatOutput(nn.Module): method __init__ (line 427) | def __init__(self, config, dim): method forward (line 432) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NatLayer (line 438) | class NatLayer(nn.Module): method __init__ (line 439) | def __init__(self, config, dim, num_heads, drop_path_rate=0.0): method maybe_pad (line 455) | def maybe_pad(self, hidden_states, height, width): method forward (line 466) | def forward( class NatStage (line 505) | class NatStage(nn.Module): method __init__ (line 506) | def __init__(self, config, dim, depth, num_heads, drop_path_rate, down... method forward (line 530) | def forward( class NatEncoder (line 551) | class NatEncoder(nn.Module): method __init__ (line 552) | def __init__(self, config): method forward (line 571) | def forward( class NatPreTrainedModel (line 620) | class NatPreTrainedModel(PreTrainedModel): method _init_weights (line 630) | def _init_weights(self, module): method _set_gradient_checkpointing (line 642) | def _set_gradient_checkpointing(self, module: NatEncoder, value: bool ... class NatModel (line 678) | class NatModel(NatPreTrainedModel): method __init__ (line 679) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 697) | def get_input_embeddings(self): method _prune_heads (line 700) | def _prune_heads(self, heads_to_prune): method forward (line 716) | def forward( class NatForImageClassification (line 770) | class NatForImageClassification(NatPreTrainedModel): method __init__ (line 771) | def __init__(self, config): method forward (line 794) | def forward( class NatBackbone (line 861) | class NatBackbone(NatPreTrainedModel, BackboneMixin): method __init__ (line 862) | def __init__(self, config): method get_input_embeddings (line 881) | def get_input_embeddings(self): method forward (line 886) | def forward( FILE: transformers/models/nezha/configuration_nezha.py class NezhaConfig (line 9) | class NezhaConfig(PretrainedConfig): method __init__ (line 69) | def __init__( FILE: transformers/models/nezha/modeling_nezha.py function load_tf_weights_in_nezha (line 67) | def load_tf_weights_in_nezha(model, config, tf_checkpoint_path): class NezhaRelativePositionsEncoding (line 140) | class NezhaRelativePositionsEncoding(nn.Module): method __init__ (line 143) | def __init__(self, length, depth, max_relative_position=127): method forward (line 168) | def forward(self, length): class NezhaEmbeddings (line 172) | class NezhaEmbeddings(nn.Module): method __init__ (line 175) | def __init__(self, config): method forward (line 188) | def forward( class NezhaSelfAttention (line 223) | class NezhaSelfAttention(nn.Module): method __init__ (line 224) | def __init__(self, config): method transpose_for_scores (line 248) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 253) | def forward( class NezhaSelfOutput (line 359) | class NezhaSelfOutput(nn.Module): method __init__ (line 360) | def __init__(self, config): method forward (line 366) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NezhaAttention (line 373) | class NezhaAttention(nn.Module): method __init__ (line 374) | def __init__(self, config): method prune_heads (line 380) | def prune_heads(self, heads): method forward (line 398) | def forward( class NezhaIntermediate (line 423) | class NezhaIntermediate(nn.Module): method __init__ (line 424) | def __init__(self, config): method forward (line 432) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaOutput (line 439) | class NezhaOutput(nn.Module): method __init__ (line 440) | def __init__(self, config): method forward (line 446) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NezhaLayer (line 453) | class NezhaLayer(nn.Module): method __init__ (line 454) | def __init__(self, config): method forward (line 468) | def forward( method feed_forward_chunk (line 533) | def feed_forward_chunk(self, attention_output): class NezhaEncoder (line 540) | class NezhaEncoder(nn.Module): method __init__ (line 541) | def __init__(self, config): method forward (line 547) | def forward( class NezhaPooler (line 639) | class NezhaPooler(nn.Module): method __init__ (line 640) | def __init__(self, config): method forward (line 645) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaPredictionHeadTransform (line 655) | class NezhaPredictionHeadTransform(nn.Module): method __init__ (line 656) | def __init__(self, config): method forward (line 665) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NezhaLMPredictionHead (line 673) | class NezhaLMPredictionHead(nn.Module): method __init__ (line 674) | def __init__(self, config): method forward (line 687) | def forward(self, hidden_states): class NezhaOnlyMLMHead (line 694) | class NezhaOnlyMLMHead(nn.Module): method __init__ (line 695) | def __init__(self, config): method forward (line 699) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class NezhaOnlyNSPHead (line 705) | class NezhaOnlyNSPHead(nn.Module): method __init__ (line 706) | def __init__(self, config): method forward (line 710) | def forward(self, pooled_output): class NezhaPreTrainingHeads (line 716) | class NezhaPreTrainingHeads(nn.Module): method __init__ (line 717) | def __init__(self, config): method forward (line 722) | def forward(self, sequence_output, pooled_output): class NezhaPreTrainedModel (line 728) | class NezhaPreTrainedModel(PreTrainedModel): method _init_weights (line 740) | def _init_weights(self, module): method _set_gradient_checkpointing (line 756) | def _set_gradient_checkpointing(self, module, value=False): class NezhaForPreTrainingOutput (line 762) | class NezhaForPreTrainingOutput(ModelOutput): class NezhaModel (line 860) | class NezhaModel(NezhaPreTrainedModel): method __init__ (line 873) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 885) | def get_input_embeddings(self): method set_input_embeddings (line 888) | def set_input_embeddings(self, value): method _prune_heads (line 891) | def _prune_heads(self, heads_to_prune): method forward (line 905) | def forward( class NezhaForPreTraining (line 1039) | class NezhaForPreTraining(NezhaPreTrainedModel): method __init__ (line 1042) | def __init__(self, config): method get_output_embeddings (line 1051) | def get_output_embeddings(self): method set_output_embeddings (line 1054) | def set_output_embeddings(self, new_embeddings): method forward (line 1059) | def forward( class NezhaForMaskedLM (line 1141) | class NezhaForMaskedLM(NezhaPreTrainedModel): method __init__ (line 1145) | def __init__(self, config): method get_output_embeddings (line 1160) | def get_output_embeddings(self): method set_output_embeddings (line 1163) | def set_output_embeddings(self, new_embeddings): method forward (line 1172) | def forward( method prepare_inputs_for_generation (line 1227) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class NezhaForNextSentencePrediction (line 1248) | class NezhaForNextSentencePrediction(NezhaPreTrainedModel): method __init__ (line 1249) | def __init__(self, config): method forward (line 1260) | def forward( class NezhaForSequenceClassification (line 1351) | class NezhaForSequenceClassification(NezhaPreTrainedModel): method __init__ (line 1352) | def __init__(self, config): method forward (line 1373) | def forward( class NezhaForMultipleChoice (line 1450) | class NezhaForMultipleChoice(NezhaPreTrainedModel): method __init__ (line 1451) | def __init__(self, config): method forward (line 1470) | def forward( class NezhaForTokenClassification (line 1542) | class NezhaForTokenClassification(NezhaPreTrainedModel): method __init__ (line 1545) | def __init__(self, config): method forward (line 1565) | def forward( class NezhaForQuestionAnswering (line 1623) | class NezhaForQuestionAnswering(NezhaPreTrainedModel): method __init__ (line 1626) | def __init__(self, config): method forward (line 1642) | def forward( FILE: transformers/models/nllb/tokenization_nllb.py class NllbTokenizer (line 49) | class NllbTokenizer(PreTrainedTokenizer): method __init__ (line 128) | def __init__( method __getstate__ (line 206) | def __getstate__(self): method __setstate__ (line 212) | def __setstate__(self, d): method vocab_size (line 223) | def vocab_size(self): method src_lang (line 227) | def src_lang(self) -> str: method src_lang (line 231) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 235) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 265) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 292) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 317) | def _build_translation_inputs( method get_vocab (line 329) | def get_vocab(self): method _tokenize (line 334) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 337) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 346) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 352) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 357) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 374) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 386) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 389) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 392) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 405) | def set_tgt_lang_special_tokens(self, lang: str) -> None: FILE: transformers/models/nllb/tokenization_nllb_fast.py class NllbTokenizerFast (line 61) | class NllbTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 140) | def __init__( method src_lang (line 199) | def src_lang(self) -> str: method src_lang (line 203) | def src_lang(self, new_src_lang: str) -> None: method build_inputs_with_special_tokens (line 207) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 236) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 261) | def _build_translation_inputs( method prepare_seq2seq_batch (line 273) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 285) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 288) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 291) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 314) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method save_vocabulary (line 336) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/nllb_moe/configuration_nllb_moe.py class NllbMoeConfig (line 27) | class NllbMoeConfig(PretrainedConfig): method __init__ (line 132) | def __init__( FILE: transformers/models/nllb_moe/convert_nllb_moe_sharded_original_checkpoint_to_pytorch.py function remove_ignore_keys_ (line 26) | def remove_ignore_keys_(state_dict): function make_linear_from_emb (line 41) | def make_linear_from_emb(emb): function rename_fairseq_keys (line 48) | def rename_fairseq_keys(state_dict, expert_idx=None): function shard_on_the_fly (line 73) | def shard_on_the_fly(switch_checkpoint_path, dump_path, num_experts, dty... FILE: transformers/models/nllb_moe/modeling_nllb_moe.py function shift_tokens_right (line 64) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 81) | def _make_causal_mask( function _expand_mask (line 99) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function create_position_ids_from_input_ids (line 114) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... function load_balancing_loss_func (line 131) | def load_balancing_loss_func(router_probs: torch.Tensor, expert_indices:... class NllbMoeSinusoidalPositionalEmbedding (line 171) | class NllbMoeSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 174) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 181) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 190) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 211) | def forward( method create_position_ids_from_inputs_embeds (line 231) | def create_position_ids_from_inputs_embeds(self, inputs_embeds, past_k... class NllbMoeTop2Router (line 249) | class NllbMoeTop2Router(nn.Module): method __init__ (line 261) | def __init__(self, config: NllbMoeConfig): method _cast_classifier (line 274) | def _cast_classifier(self): method normalize_router_probabilities (line 282) | def normalize_router_probabilities(self, router_probs, top_1_mask, top... method route_tokens (line 290) | def route_tokens( method forward (line 375) | def forward(self, hidden_states: torch.Tensor, padding_mask: Optional[... class NllbMoeDenseActDense (line 404) | class NllbMoeDenseActDense(nn.Module): method __init__ (line 405) | def __init__(self, config: NllbMoeConfig, ffn_dim: int): method forward (line 412) | def forward(self, hidden_states): class NllbMoeSparseMLP (line 426) | class NllbMoeSparseMLP(nn.Module): method __init__ (line 431) | def __init__(self, config: NllbMoeConfig, ffn_dim: int, expert_class: ... method forward (line 442) | def forward(self, hidden_states: torch.Tensor, padding_mask: Optional[... class NllbMoeAttention (line 492) | class NllbMoeAttention(nn.Module): method __init__ (line 495) | def __init__( method _shape (line 522) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 525) | def forward( class NllbMoeEncoderLayer (line 646) | class NllbMoeEncoderLayer(nn.Module): method __init__ (line 647) | def __init__(self, config: NllbMoeConfig, is_sparse: bool = False): method forward (line 665) | def forward( class NllbMoeDecoderLayer (line 725) | class NllbMoeDecoderLayer(nn.Module): method __init__ (line 726) | def __init__(self, config: NllbMoeConfig, is_sparse: bool = False): method forward (line 752) | def forward( class NllbMoePreTrainedModel (line 855) | class NllbMoePreTrainedModel(PreTrainedModel): method _init_weights (line 861) | def _init_weights(self, module): method _set_gradient_checkpointing (line 873) | def _set_gradient_checkpointing(self, module, value=False): class NllbMoeEncoder (line 1004) | class NllbMoeEncoder(NllbMoePreTrainedModel): method __init__ (line 1016) | def __init__(self, config: NllbMoeConfig, embed_tokens: Optional[nn.Em... method forward (line 1049) | def forward( class NllbMoeDecoder (line 1199) | class NllbMoeDecoder(NllbMoePreTrainedModel): method __init__ (line 1210) | def __init__(self, config: NllbMoeConfig, embed_tokens: Optional[nn.Em... method forward (line 1241) | def forward( class NllbMoeModel (line 1503) | class NllbMoeModel(NllbMoePreTrainedModel): method __init__ (line 1513) | def __init__(self, config: NllbMoeConfig): method get_input_embeddings (line 1525) | def get_input_embeddings(self): method set_input_embeddings (line 1528) | def set_input_embeddings(self, value): method get_encoder (line 1533) | def get_encoder(self): method get_decoder (line 1536) | def get_decoder(self): method forward (line 1542) | def forward( class NllbMoeForConditionalGeneration (line 1642) | class NllbMoeForConditionalGeneration(NllbMoePreTrainedModel): method __init__ (line 1656) | def __init__(self, config: NllbMoeConfig): method get_encoder (line 1666) | def get_encoder(self): method get_decoder (line 1669) | def get_decoder(self): method resize_token_embeddings (line 1672) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1676) | def get_output_embeddings(self): method set_output_embeddings (line 1679) | def set_output_embeddings(self, new_embeddings): method forward (line 1685) | def forward( method _unpack_router_logits (line 1800) | def _unpack_router_logits(self, router_outputs): method prepare_inputs_for_generation (line 1815) | def prepare_inputs_for_generation( method _reorder_cache (line 1844) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/nystromformer/configuration_nystromformer.py class NystromformerConfig (line 29) | class NystromformerConfig(PretrainedConfig): method __init__ (line 94) | def __init__( FILE: transformers/models/nystromformer/convert_nystromformer_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 25) | def rename_key(orig_key): function convert_checkpoint_helper (line 63) | def convert_checkpoint_helper(config, orig_state_dict): function convert_nystromformer_checkpoint (line 80) | def convert_nystromformer_checkpoint(checkpoint_path, nystromformer_conf... FILE: transformers/models/nystromformer/modeling_nystromformer.py class NystromformerEmbeddings (line 52) | class NystromformerEmbeddings(nn.Module): method __init__ (line 55) | def __init__(self, config): method forward (line 75) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class NystromformerSelfAttention (line 110) | class NystromformerSelfAttention(nn.Module): method __init__ (line 111) | def __init__(self, config, position_embedding_type=None): method iterative_inv (line 152) | def iterative_inv(self, mat, n_iter=6): method transpose_for_scores (line 173) | def transpose_for_scores(self, layer): method forward (line 178) | def forward(self, hidden_states, attention_mask=None, output_attention... class NystromformerSelfOutput (line 241) | class NystromformerSelfOutput(nn.Module): method __init__ (line 242) | def __init__(self, config): method forward (line 248) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NystromformerAttention (line 255) | class NystromformerAttention(nn.Module): method __init__ (line 256) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 262) | def prune_heads(self, heads): method forward (line 280) | def forward(self, hidden_states, attention_mask=None, output_attention... class NystromformerIntermediate (line 288) | class NystromformerIntermediate(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 297) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NystromformerOutput (line 304) | class NystromformerOutput(nn.Module): method __init__ (line 305) | def __init__(self, config): method forward (line 311) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class NystromformerLayer (line 318) | class NystromformerLayer(nn.Module): method __init__ (line 319) | def __init__(self, config): method forward (line 328) | def forward(self, hidden_states, attention_mask=None, output_attention... method feed_forward_chunk (line 341) | def feed_forward_chunk(self, attention_output): class NystromformerEncoder (line 347) | class NystromformerEncoder(nn.Module): method __init__ (line 348) | def __init__(self, config): method forward (line 354) | def forward( class NystromformerPredictionHeadTransform (line 403) | class NystromformerPredictionHeadTransform(nn.Module): method __init__ (line 404) | def __init__(self, config): method forward (line 413) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class NystromformerLMPredictionHead (line 421) | class NystromformerLMPredictionHead(nn.Module): method __init__ (line 422) | def __init__(self, config): method forward (line 435) | def forward(self, hidden_states): class NystromformerOnlyMLMHead (line 442) | class NystromformerOnlyMLMHead(nn.Module): method __init__ (line 443) | def __init__(self, config): method forward (line 447) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class NystromformerPreTrainedModel (line 452) | class NystromformerPreTrainedModel(PreTrainedModel): method _init_weights (line 463) | def _init_weights(self, module): method _set_gradient_checkpointing (line 479) | def _set_gradient_checkpointing(self, module, value=False): class NystromformerModel (line 549) | class NystromformerModel(NystromformerPreTrainedModel): method __init__ (line 550) | def __init__(self, config): method get_input_embeddings (line 560) | def get_input_embeddings(self): method set_input_embeddings (line 563) | def set_input_embeddings(self, value): method _prune_heads (line 566) | def _prune_heads(self, heads_to_prune): method forward (line 580) | def forward( class NystromformerForMaskedLM (line 660) | class NystromformerForMaskedLM(NystromformerPreTrainedModel): method __init__ (line 663) | def __init__(self, config): method get_output_embeddings (line 672) | def get_output_embeddings(self): method set_output_embeddings (line 675) | def set_output_embeddings(self, new_embeddings): method forward (line 684) | def forward( class NystromformerClassificationHead (line 737) | class NystromformerClassificationHead(nn.Module): method __init__ (line 740) | def __init__(self, config): method forward (line 748) | def forward(self, features, **kwargs): class NystromformerForSequenceClassification (line 765) | class NystromformerForSequenceClassification(NystromformerPreTrainedModel): method __init__ (line 766) | def __init__(self, config): method forward (line 781) | def forward( class NystromformerForMultipleChoice (line 858) | class NystromformerForMultipleChoice(NystromformerPreTrainedModel): method __init__ (line 859) | def __init__(self, config): method forward (line 877) | def forward( class NystromformerForTokenClassification (line 953) | class NystromformerForTokenClassification(NystromformerPreTrainedModel): method __init__ (line 954) | def __init__(self, config): method forward (line 971) | def forward( class NystromformerForQuestionAnswering (line 1031) | class NystromformerForQuestionAnswering(NystromformerPreTrainedModel): method __init__ (line 1032) | def __init__(self, config): method forward (line 1050) | def forward( FILE: transformers/models/oneformer/configuration_oneformer.py class OneFormerConfig (line 34) | class OneFormerConfig(PretrainedConfig): method __init__ (line 144) | def __init__( method to_dict (line 254) | def to_dict(self) -> Dict[str, any]: FILE: transformers/models/oneformer/convert_to_hf_oneformer.py class TrackedStateDict (line 61) | class TrackedStateDict: method __init__ (line 62) | def __init__(self, to_track: Dict): method __getitem__ (line 71) | def __getitem__(self, key: str) -> Any: method __setitem__ (line 74) | def __setitem__(self, key: str, item: Any): method diff (line 78) | def diff(self) -> List[str]: method copy (line 87) | def copy(self) -> Dict: function prepare_img (line 93) | def prepare_img(): class Args (line 101) | class Args: function setup_cfg (line 107) | def setup_cfg(args: Args): class OriginalOneFormerConfigToOursConverter (line 120) | class OriginalOneFormerConfigToOursConverter: method __call__ (line 121) | def __call__(self, original_config: object, is_swin: bool) -> OneForme... class OriginalOneFormerConfigToProcessorConverter (line 205) | class OriginalOneFormerConfigToProcessorConverter: method __call__ (line 206) | def __call__(self, original_config: object, model_repo: str) -> OneFor... class OriginalOneFormerCheckpointToOursConverter (line 240) | class OriginalOneFormerCheckpointToOursConverter: method __init__ (line 241) | def __init__(self, original_model: nn.Module, config: OneFormerConfig): method pop_all (line 245) | def pop_all(self, renamed_keys: List[Tuple[str, str]], dst_state_dict:... method replace_swin_backbone (line 250) | def replace_swin_backbone(self, dst_state_dict: StateDict, src_state_d... method replace_dinat_backbone (line 409) | def replace_dinat_backbone(self, dst_state_dict: StateDict, src_state_... method replace_pixel_module (line 546) | def replace_pixel_module(self, dst_state_dict: StateDict, src_state_di... method replace_keys_qkv_transformer_decoder (line 634) | def replace_keys_qkv_transformer_decoder(self, dst_state_dict: StateDi... method replace_transformer_module (line 653) | def replace_transformer_module(self, dst_state_dict: StateDict, src_st... method replace_task_mlp (line 815) | def replace_task_mlp(self, dst_state_dict: StateDict, src_state_dict: ... method replace_text_projector (line 834) | def replace_text_projector(self, dst_state_dict: StateDict, src_state_... method replace_text_mapper (line 851) | def replace_text_mapper(self, dst_state_dict: StateDict, src_state_dic... method convert (line 905) | def convert(self, oneformer: OneFormerModel, is_swin: bool) -> OneForm... method using_dirs (line 924) | def using_dirs(checkpoints_dir: Path, config_dir: Path) -> Iterator[Tu... function post_process_sem_seg_output (line 935) | def post_process_sem_seg_output(outputs: OneFormerForUniversalSegmentati... function test (line 961) | def test( function get_name (line 1059) | def get_name(checkpoint_file: Path): FILE: transformers/models/oneformer/image_processing_oneformer.py function max_across_indices (line 63) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function get_max_height_width (line 71) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function make_pixel_mask (line 87) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function binary_mask_to_rle (line 104) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 127) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 149) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 178) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 197) | def compute_segments( function convert_segmentation_map_to_binary_masks (line 258) | def convert_segmentation_map_to_binary_masks( function get_oneformer_resize_output_image_size (line 294) | def get_oneformer_resize_output_image_size( function prepare_metadata (line 322) | def prepare_metadata(repo_path, class_info_file): class OneFormerImageProcessor (line 338) | class OneFormerImageProcessor(BaseImageProcessor): method __init__ (line 391) | def __init__( method resize (line 440) | def resize( method rescale (line 482) | def rescale( method normalize (line 491) | def normalize( method convert_segmentation_map_to_binary_masks (line 504) | def convert_segmentation_map_to_binary_masks( method __call__ (line 521) | def __call__(self, images, task_inputs=None, segmentation_maps=None, *... method _preprocess (line 524) | def _preprocess( method _preprocess_image (line 544) | def _preprocess_image( method _preprocess_mask (line 575) | def _preprocess_mask( method preprocess (line 604) | def preprocess( method _pad_image (line 718) | def _pad_image( method pad (line 740) | def pad( method get_semantic_annotations (line 778) | def get_semantic_annotations(self, label, num_class_obj): method get_instance_annotations (line 813) | def get_instance_annotations(self, label, num_class_obj): method get_panoptic_annotations (line 845) | def get_panoptic_annotations(self, label, num_class_obj): method encode_inputs (line 875) | def encode_inputs( method post_process_semantic_segmentation (line 1005) | def post_process_semantic_segmentation( method post_process_instance_segmentation (line 1055) | def post_process_instance_segmentation( method post_process_panoptic_segmentation (line 1174) | def post_process_panoptic_segmentation( FILE: transformers/models/oneformer/modeling_oneformer.py function _get_clones (line 59) | def _get_clones(module, N): function multi_scale_deformable_attention (line 64) | def multi_scale_deformable_attention( function dice_loss (line 104) | def dice_loss(inputs: Tensor, labels: Tensor, num_masks: int) -> Tensor: function sigmoid_cross_entropy_loss (line 135) | def sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: torch.Tenso... function pair_wise_dice_loss (line 155) | def pair_wise_dice_loss(inputs: Tensor, labels: Tensor) -> Tensor: function pair_wise_sigmoid_cross_entropy_loss (line 178) | def pair_wise_sigmoid_cross_entropy_loss(inputs: torch.Tensor, labels: t... function sample_point (line 207) | def sample_point( class OneFormerHungarianMatcher (line 240) | class OneFormerHungarianMatcher(nn.Module): method __init__ (line 241) | def __init__( method forward (line 269) | def forward(self, masks_queries_logits, class_queries_logits, mask_lab... class OneFormerLoss (line 349) | class OneFormerLoss(nn.Module): method __init__ (line 350) | def __init__( method _max_by_axis (line 404) | def _max_by_axis(self, the_list: List[List[int]]) -> List[int]: method _pad_images_to_max_in_batch (line 411) | def _pad_images_to_max_in_batch(self, tensors: List[Tensor]) -> Tuple[... method loss_contrastive (line 430) | def loss_contrastive(self, contrastive_queries_logits: Tensor, text_qu... method loss_labels (line 467) | def loss_labels( method loss_masks (line 502) | def loss_masks( method calculate_uncertainty (line 560) | def calculate_uncertainty(self, logits: torch.Tensor) -> torch.Tensor: method sample_points_using_uncertainty (line 578) | def sample_points_using_uncertainty( method _get_predictions_permutation_indices (line 633) | def _get_predictions_permutation_indices(self, indices): method _get_targets_permutation_indices (line 639) | def _get_targets_permutation_indices(self, indices): method forward (line 645) | def forward( method get_num_masks (line 720) | def get_num_masks(self, class_labels: torch.Tensor, device: torch.devi... class OneFormerTransformerDecoderOutput (line 730) | class OneFormerTransformerDecoderOutput(BaseModelOutput): class OneFormerPixelDecoderOutput (line 757) | class OneFormerPixelDecoderOutput(ModelOutput): class OneFormerPixelLevelModuleOutput (line 781) | class OneFormerPixelLevelModuleOutput(ModelOutput): class OneFormerModelOutput (line 804) | class OneFormerModelOutput(ModelOutput): class OneFormerForUniversalSegmentationOutput (line 854) | class OneFormerForUniversalSegmentationOutput(ModelOutput): class OneFormerPixelDecoderFrozenBatchNorm2d (line 923) | class OneFormerPixelDecoderFrozenBatchNorm2d(nn.Module): method __init__ (line 931) | def __init__(self, n): method _load_from_state_dict (line 938) | def _load_from_state_dict( method forward (line 949) | def forward(self, x): class OneFormerPixelDecoderEncoderMultiscaleDeformableAttention (line 961) | class OneFormerPixelDecoderEncoderMultiscaleDeformableAttention(nn.Module): method __init__ (line 966) | def __init__(self, embed_dim: int, num_heads: int, n_levels: int, n_po... method with_pos_embed (line 993) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 996) | def forward( class OneFormerPixelDecoderEncoderLayer (line 1054) | class OneFormerPixelDecoderEncoderLayer(nn.Module): method __init__ (line 1055) | def __init__(self, config: OneFormerConfig): method forward (line 1075) | def forward( class OneFormerPixelDecoderEncoderOnly (line 1146) | class OneFormerPixelDecoderEncoderOnly(nn.Module): method __init__ (line 1157) | def __init__(self, config: OneFormerConfig): method get_reference_points (line 1165) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 1193) | def forward( class OneFormerPixelDecoder (line 1269) | class OneFormerPixelDecoder(nn.Module): method __init__ (line 1270) | def __init__(self, config: OneFormerConfig, feature_channels): method get_valid_ratio (line 1355) | def get_valid_ratio(self, mask): method forward (line 1366) | def forward( class OneFormerPixelLevelModule (line 1472) | class OneFormerPixelLevelModule(nn.Module): method __init__ (line 1473) | def __init__(self, config: OneFormerConfig): method forward (line 1488) | def forward(self, pixel_values: Tensor, output_hidden_states: bool = F... class OneFormerAttention (line 1499) | class OneFormerAttention(nn.Module): method __init__ (line 1505) | def __init__( method _shape (line 1530) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 1533) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 1536) | def forward( class OneFormerTransformerDecoderSelfAttentionLayer (line 1635) | class OneFormerTransformerDecoderSelfAttentionLayer(nn.Module): method __init__ (line 1636) | def __init__( method with_pos_embed (line 1648) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1651) | def forward_post( method forward_pre (line 1666) | def forward_pre( method forward (line 1681) | def forward( class OneFormerTransformerDecoderCrossAttentionLayer (line 1693) | class OneFormerTransformerDecoderCrossAttentionLayer(nn.Module): method __init__ (line 1694) | def __init__( method with_pos_embed (line 1706) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1709) | def forward_post( method forward_pre (line 1730) | def forward_pre( method forward (line 1751) | def forward( class OneFormerTransformerDecoderFFNLayer (line 1765) | class OneFormerTransformerDecoderFFNLayer(nn.Module): method __init__ (line 1766) | def __init__( method with_pos_embed (line 1786) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 1789) | def forward_post(self, output): method forward_pre (line 1795) | def forward_pre(self, output): method forward (line 1801) | def forward(self, output): class OneFormerMLPPredictionHead (line 1807) | class OneFormerMLPPredictionHead(nn.Module): method __init__ (line 1808) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int, n... method forward (line 1834) | def forward(self, input: Tensor) -> Tensor: class OneFormerTransformerDecoderLayer (line 1839) | class OneFormerTransformerDecoderLayer(nn.Module): method __init__ (line 1840) | def __init__(self, config: OneFormerConfig): method forward (line 1869) | def forward( class OneFormerTransformerDecoderQueryTransformerDecoder (line 1926) | class OneFormerTransformerDecoderQueryTransformerDecoder(nn.Module): method __init__ (line 1927) | def __init__(self, decoder_layer, num_layers, norm=None, return_interm... method forward (line 1934) | def forward( class OneFormerTransformerDecoderQueryTransformerDecoderLayer (line 1973) | class OneFormerTransformerDecoderQueryTransformerDecoderLayer(nn.Module): method __init__ (line 1974) | def __init__( method with_pos_embed (line 2002) | def with_pos_embed(self, tensor, pos: Optional[Tensor]): method forward_post (line 2005) | def forward_post( method forward_pre (line 2036) | def forward_pre( method forward (line 2067) | def forward( class OneFormerTransformerDecoderQueryTransformer (line 2101) | class OneFormerTransformerDecoderQueryTransformer(nn.Module): method __init__ (line 2102) | def __init__( method forward (line 2130) | def forward(self, src, mask, query_embed, pos_embed, task_token=None): class OneFormerTransformerDecoder (line 2147) | class OneFormerTransformerDecoder(nn.Module): method __init__ (line 2152) | def __init__(self, in_channels: int, config: OneFormerConfig): method forward (line 2191) | def forward( method forward_prediction_heads (line 2275) | def forward_prediction_heads(self, output, mask_features, attention_ma... method _get_aux_predictions (line 2296) | def _get_aux_predictions(self, outputs_class, outputs_seg_masks): class OneFormerTransformerModule (line 2307) | class OneFormerTransformerModule(nn.Module): method __init__ (line 2312) | def __init__(self, in_features: int, config: OneFormerConfig): method forward (line 2329) | def forward( class OneFormerSinePositionEmbedding (line 2379) | class OneFormerSinePositionEmbedding(nn.Module): method __init__ (line 2385) | def __init__( method forward (line 2396) | def forward(self, x: Tensor, mask: Optional[Tensor] = None) -> Tensor: class PredictionBlock (line 2419) | class PredictionBlock(nn.Module): method __init__ (line 2420) | def __init__(self, in_dim: int, out_dim: int, activation: nn.Module) -... method forward (line 2427) | def forward(self, input: Tensor) -> Tensor: class OneFormerTextMapperAttention (line 2434) | class OneFormerTextMapperAttention(nn.Module): method __init__ (line 2435) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 2450) | def forward(self, q, k, v): class OneFormerTextTransformerDecoderLayer (line 2470) | class OneFormerTextTransformerDecoderLayer(nn.Module): method __init__ (line 2471) | def __init__( method forward (line 2491) | def forward(self, hidden_state, mem): class OneFormerTextContextDecoder (line 2500) | class OneFormerTextContextDecoder(nn.Module): method __init__ (line 2501) | def __init__( method forward (line 2535) | def forward(self, text, visual): class OneFormerTextMLP (line 2545) | class OneFormerTextMLP(nn.Module): method __init__ (line 2546) | def __init__( method forward (line 2560) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OneFormerTextTransformerLayer (line 2567) | class OneFormerTextTransformerLayer(nn.Module): method __init__ (line 2568) | def __init__(self, width: int, heads: int, attn_mask: torch.Tensor, la... method forward (line 2576) | def forward( class OneFormerTextTransformer (line 2601) | class OneFormerTextTransformer(nn.Module): method __init__ (line 2602) | def __init__( method forward (line 2619) | def forward(self, hidden_states: torch.Tensor): class OneFormerTextEncoder (line 2628) | class OneFormerTextEncoder(nn.Module): method __init__ (line 2629) | def __init__( method build_attention_mask (line 2655) | def build_attention_mask(self): method forward (line 2663) | def forward(self, text): class OneFormerTextMapper (line 2675) | class OneFormerTextMapper(nn.Module): method __init__ (line 2676) | def __init__(self, config: OneFormerConfig): method forward (line 2700) | def forward( method encode_text (line 2708) | def encode_text(self, text): class OneFormerTaskModel (line 2736) | class OneFormerTaskModel(nn.Module): method __init__ (line 2737) | def __init__(self, config: OneFormerConfig): method forward (line 2746) | def forward(self, inputs: Tensor) -> Tensor: class OneFormerPreTrainedModel (line 2786) | class OneFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 2791) | def _init_weights(self, module: nn.Module): class OneFormerModel (line 2905) | class OneFormerModel(OneFormerPreTrainedModel): method __init__ (line 2908) | def __init__(self, config: OneFormerConfig): method forward (line 2924) | def forward( class OneFormerForUniversalSegmentation (line 3034) | class OneFormerForUniversalSegmentation(OneFormerPreTrainedModel): method __init__ (line 3037) | def __init__(self, config: OneFormerConfig): method get_loss_dict (line 3068) | def get_loss_dict( method get_loss (line 3098) | def get_loss(self, loss_dict: Dict[str, Tensor]) -> Tensor: method forward (line 3103) | def forward( FILE: transformers/models/oneformer/processing_oneformer.py class OneFormerProcessor (line 29) | class OneFormerProcessor(ProcessorMixin): method __init__ (line 49) | def __init__( method _preprocess_text (line 62) | def _preprocess_text(self, text_list=None, max_length=77): method __call__ (line 78) | def __call__(self, images=None, task_inputs=None, segmentation_maps=No... method encode_inputs (line 145) | def encode_inputs(self, images=None, task_inputs=None, segmentation_ma... method post_process_semantic_segmentation (line 185) | def post_process_semantic_segmentation(self, *args, **kwargs): method post_process_instance_segmentation (line 192) | def post_process_instance_segmentation(self, *args, **kwargs): method post_process_panoptic_segmentation (line 199) | def post_process_panoptic_segmentation(self, *args, **kwargs): FILE: transformers/models/open_llama/configuration_open_llama.py class OpenLlamaConfig (line 33) | class OpenLlamaConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: transformers/models/open_llama/modeling_open_llama.py function _make_causal_mask (line 51) | def _make_causal_mask( function _expand_mask (line 69) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class OpenLlamaRMSNorm (line 84) | class OpenLlamaRMSNorm(nn.Module): method __init__ (line 85) | def __init__(self, hidden_size, eps=1e-6): method forward (line 93) | def forward(self, hidden_states): class OpenLlamaRotaryEmbedding (line 102) | class OpenLlamaRotaryEmbedding(torch.nn.Module): method __init__ (line 103) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method forward (line 117) | def forward(self, x, seq_len=None): function rotate_half (line 134) | def rotate_half(x): function apply_rotary_pos_emb (line 141) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): class OpenLlamaMLP (line 151) | class OpenLlamaMLP(nn.Module): method __init__ (line 152) | def __init__( method forward (line 166) | def forward(self, x): class OpenLlamaAttention (line 171) | class OpenLlamaAttention(nn.Module): method __init__ (line 174) | def __init__(self, config: OpenLlamaConfig): method _shape (line 194) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 197) | def forward( class OpenLlamaDecoderLayer (line 274) | class OpenLlamaDecoderLayer(nn.Module): method __init__ (line 275) | def __init__(self, config: OpenLlamaConfig): method forward (line 289) | def forward( class OpenLlamaPreTrainedModel (line 365) | class OpenLlamaPreTrainedModel(PreTrainedModel): method _init_weights (line 372) | def _init_weights(self, module): method _set_gradient_checkpointing (line 386) | def _set_gradient_checkpointing(self, module, value=False): class OpenLlamaModel (line 459) | class OpenLlamaModel(OpenLlamaPreTrainedModel): method __init__ (line 467) | def __init__(self, config: OpenLlamaConfig): method get_input_embeddings (line 484) | def get_input_embeddings(self): method set_input_embeddings (line 487) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 491) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 515) | def forward( class OpenLlamaForCausalLM (line 647) | class OpenLlamaForCausalLM(OpenLlamaPreTrainedModel): method __init__ (line 648) | def __init__(self, config): method get_input_embeddings (line 659) | def get_input_embeddings(self): method set_input_embeddings (line 662) | def set_input_embeddings(self, value): method get_output_embeddings (line 665) | def get_output_embeddings(self): method set_output_embeddings (line 668) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 671) | def set_decoder(self, decoder): method get_decoder (line 674) | def get_decoder(self): method forward (line 679) | def forward( method prepare_inputs_for_generation (line 768) | def prepare_inputs_for_generation( method _reorder_cache (line 799) | def _reorder_cache(past_key_values, beam_idx): class OpenLlamaForSequenceClassification (line 822) | class OpenLlamaForSequenceClassification(OpenLlamaPreTrainedModel): method __init__ (line 825) | def __init__(self, config): method get_input_embeddings (line 834) | def get_input_embeddings(self): method set_input_embeddings (line 837) | def set_input_embeddings(self, value): method forward (line 841) | def forward( FILE: transformers/models/openai/configuration_openai.py class OpenAIGPTConfig (line 27) | class OpenAIGPTConfig(PretrainedConfig): method __init__ (line 121) | def __init__( FILE: transformers/models/openai/convert_openai_original_tf_checkpoint_to_pytorch.py function convert_openai_checkpoint_to_pytorch (line 29) | def convert_openai_checkpoint_to_pytorch(openai_checkpoint_folder_path, ... FILE: transformers/models/openai/modeling_openai.py function load_tf_weights_in_openai_gpt (line 55) | def load_tf_weights_in_openai_gpt(model, config, openai_checkpoint_folde... class Attention (line 136) | class Attention(nn.Module): method __init__ (line 137) | def __init__(self, nx, n_positions, config, scale=False): method prune_heads (line 156) | def prune_heads(self, heads): method _attn (line 171) | def _attn(self, q, k, v, attention_mask=None, head_mask=None, output_a... method merge_heads (line 196) | def merge_heads(self, x): method split_heads (line 201) | def split_heads(self, x, k=False): method forward (line 209) | def forward(self, x, attention_mask=None, head_mask=None, output_atten... class MLP (line 227) | class MLP(nn.Module): method __init__ (line 228) | def __init__(self, n_state, config): # in MLP: n_state=3072 (4 * n_embd) method forward (line 236) | def forward(self, x): class Block (line 242) | class Block(nn.Module): method __init__ (line 243) | def __init__(self, n_positions, config, scale=False): method forward (line 251) | def forward(self, x, attention_mask=None, head_mask=None, output_atten... class OpenAIGPTPreTrainedModel (line 268) | class OpenAIGPTPreTrainedModel(PreTrainedModel): method _init_weights (line 279) | def _init_weights(self, module): class OpenAIGPTDoubleHeadsModelOutput (line 297) | class OpenAIGPTDoubleHeadsModelOutput(ModelOutput): class OpenAIGPTModel (line 401) | class OpenAIGPTModel(OpenAIGPTPreTrainedModel): method __init__ (line 402) | def __init__(self, config): method get_input_embeddings (line 414) | def get_input_embeddings(self): method set_input_embeddings (line 417) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 420) | def _prune_heads(self, heads_to_prune): method forward (line 433) | def forward( class OpenAIGPTLMHeadModel (line 531) | class OpenAIGPTLMHeadModel(OpenAIGPTPreTrainedModel): method __init__ (line 534) | def __init__(self, config): method get_output_embeddings (line 542) | def get_output_embeddings(self): method set_output_embeddings (line 545) | def set_output_embeddings(self, new_embeddings): method forward (line 554) | def forward( method prepare_inputs_for_generation (line 609) | def prepare_inputs_for_generation(self, input_ids: torch.LongTensor, *... class OpenAIGPTDoubleHeadsModel (line 622) | class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel): method __init__ (line 625) | def __init__(self, config): method get_output_embeddings (line 636) | def get_output_embeddings(self): method set_output_embeddings (line 639) | def set_output_embeddings(self, new_embeddings): method forward (line 644) | def forward( class OpenAIGPTForSequenceClassification (line 750) | class OpenAIGPTForSequenceClassification(OpenAIGPTPreTrainedModel): method __init__ (line 751) | def __init__(self, config): method forward (line 766) | def forward( FILE: transformers/models/openai/modeling_tf_openai.py class TFAttention (line 63) | class TFAttention(tf.keras.layers.Layer): method __init__ (line 64) | def __init__(self, nx, config, scale=False, **kwargs): method prune_heads (line 83) | def prune_heads(self, heads): method causal_attention_mask (line 87) | def causal_attention_mask(nd, ns): method _attn (line 97) | def _attn(self, q, k, v, attention_mask, head_mask, output_attentions,... method merge_heads (line 127) | def merge_heads(self, x): method split_heads (line 133) | def split_heads(self, x): method call (line 139) | def call(self, x, attention_mask, head_mask, output_attentions, traini... class TFMLP (line 157) | class TFMLP(tf.keras.layers.Layer): method __init__ (line 158) | def __init__(self, n_state, config, **kwargs): method call (line 166) | def call(self, x, training=False): class TFBlock (line 173) | class TFBlock(tf.keras.layers.Layer): method __init__ (line 174) | def __init__(self, config, scale=False, **kwargs): method call (line 182) | def call(self, x, attention_mask, head_mask, output_attentions, traini... class TFOpenAIGPTMainLayer (line 195) | class TFOpenAIGPTMainLayer(tf.keras.layers.Layer): method __init__ (line 198) | def __init__(self, config, *inputs, **kwargs): method build (line 216) | def build(self, input_shape): method get_input_embeddings (line 226) | def get_input_embeddings(self): method set_input_embeddings (line 229) | def set_input_embeddings(self, value): method _prune_heads (line 233) | def _prune_heads(self, heads_to_prune): method call (line 240) | def call( class TFOpenAIGPTPreTrainedModel (line 351) | class TFOpenAIGPTPreTrainedModel(TFPreTrainedModel): class TFOpenAIGPTDoubleHeadsModelOutput (line 362) | class TFOpenAIGPTDoubleHeadsModelOutput(ModelOutput): class TFOpenAIGPTModel (line 492) | class TFOpenAIGPTModel(TFOpenAIGPTPreTrainedModel): method __init__ (line 493) | def __init__(self, config, *inputs, **kwargs): method call (line 504) | def call( class TFOpenAIGPTLMHeadModel (line 539) | class TFOpenAIGPTLMHeadModel(TFOpenAIGPTPreTrainedModel, TFCausalLanguag... method __init__ (line 540) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 546) | def get_output_embeddings(self): method set_output_embeddings (line 549) | def set_output_embeddings(self, value): method call (line 559) | def call( method prepare_inputs_for_generation (line 613) | def prepare_inputs_for_generation(self, inputs, **kwargs): class TFOpenAIGPTDoubleHeadsModel (line 626) | class TFOpenAIGPTDoubleHeadsModel(TFOpenAIGPTPreTrainedModel): method __init__ (line 627) | def __init__(self, config, *inputs, **kwargs): method call (line 638) | def call( method input_signature (line 730) | def input_signature(self): class TFOpenAIGPTForSequenceClassification (line 753) | class TFOpenAIGPTForSequenceClassification(TFOpenAIGPTPreTrainedModel, T... method __init__ (line 754) | def __init__(self, config, *inputs, **kwargs): method call (line 772) | def call( FILE: transformers/models/openai/tokenization_openai.py function whitespace_tokenize (line 46) | def whitespace_tokenize(text): class BasicTokenizer (line 56) | class BasicTokenizer(object): method __init__ (line 76) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 84) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 121) | def _run_strip_accents(self, text): method _run_split_on_punc (line 132) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 154) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 167) | def _is_chinese_char(self, cp): method _clean_text (line 191) | def _clean_text(self, text): function get_pairs (line 205) | def get_pairs(word): function text_standardize (line 218) | def text_standardize(text): class OpenAIGPTTokenizer (line 233) | class OpenAIGPTTokenizer(PreTrainedTokenizer): method __init__ (line 259) | def __init__(self, vocab_file, merges_file, unk_token="", **kwargs): method do_lower_case (line 284) | def do_lower_case(self): method vocab_size (line 288) | def vocab_size(self): method get_vocab (line 291) | def get_vocab(self): method bpe (line 294) | def bpe(self, token): method _tokenize (line 338) | def _tokenize(self, text): method _convert_token_to_id (line 353) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 357) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 361) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 366) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/openai/tokenization_openai_fast.py class OpenAIGPTTokenizerFast (line 40) | class OpenAIGPTTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 67) | def __init__(self, vocab_file=None, merges_file=None, tokenizer_file=N... method do_lower_case (line 71) | def do_lower_case(self): method save_vocabulary (line 74) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/opt/configuration_opt.py class OPTConfig (line 32) | class OPTConfig(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: transformers/models/opt/convert_opt_original_pytorch_checkpoint_to_pytorch.py function load_checkpoint (line 31) | def load_checkpoint(checkpoint_path): function convert_opt_checkpoint (line 81) | def convert_opt_checkpoint(checkpoint_path, pytorch_dump_folder_path, co... FILE: transformers/models/opt/modeling_flax_opt.py class FlaxOPTAttention (line 108) | class FlaxOPTAttention(nn.Module): method setup (line 117) | def setup(self) -> None: method _split_heads (line 143) | def _split_heads(self, hidden_states): method _merge_heads (line 146) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 150) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 181) | def __call__( class FlaxOPTDecoderLayer (line 275) | class FlaxOPTDecoderLayer(nn.Module): method setup (line 279) | def setup(self) -> None: method __call__ (line 304) | def __call__( class FlaxOPTDecoderLayerCollection (line 360) | class FlaxOPTDecoderLayerCollection(nn.Module): method setup (line 364) | def setup(self): method __call__ (line 371) | def __call__( class FlaxOPTLearnedPositionalEmbedding (line 404) | class FlaxOPTLearnedPositionalEmbedding(nn.Embed): method setup (line 409) | def setup(self): method __call__ (line 415) | def __call__(self, positions): class FlaxOPTDecoder (line 421) | class FlaxOPTDecoder(nn.Module): method setup (line 426) | def setup(self): method __call__ (line 465) | def __call__( class FlaxOPTPreTrainedModel (line 517) | class FlaxOPTPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 522) | def __init__( method init_weights (line 534) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 564) | def init_cache(self, batch_size, max_length): method __call__ (line 583) | def __call__( class FlaxOPTModule (line 647) | class FlaxOPTModule(nn.Module): method setup (line 651) | def setup(self): method _get_decoder_module (line 654) | def _get_decoder_module(self): method __call__ (line 657) | def __call__( class FlaxOPTModel (line 690) | class FlaxOPTModel(FlaxOPTPreTrainedModel): class FlaxOPTForCausalLMModule (line 703) | class FlaxOPTForCausalLMModule(nn.Module): method setup (line 707) | def setup(self): method __call__ (line 716) | def __call__( class FlaxOPTForCausalLM (line 763) | class FlaxOPTForCausalLM(FlaxOPTPreTrainedModel): method prepare_inputs_for_generation (line 766) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 788) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/opt/modeling_opt.py function _make_causal_mask (line 68) | def _make_causal_mask( function _expand_mask (line 85) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class OPTLearnedPositionalEmbedding (line 99) | class OPTLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 104) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 110) | def forward(self, attention_mask: torch.LongTensor, past_key_values_le... class OPTAttention (line 123) | class OPTAttention(nn.Module): method __init__ (line 126) | def __init__( method _shape (line 153) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 156) | def forward( class OPTDecoderLayer (line 277) | class OPTDecoderLayer(nn.Module): method __init__ (line 278) | def __init__(self, config: OPTConfig): method forward (line 299) | def forward( class OPTPreTrainedModel (line 398) | class OPTPreTrainedModel(PreTrainedModel): method _init_weights (line 405) | def _init_weights(self, module): method _set_gradient_checkpointing (line 416) | def _set_gradient_checkpointing(self, module, value=False): class OPTDecoder (line 483) | class OPTDecoder(OPTPreTrainedModel): method __init__ (line 491) | def __init__(self, config: OPTConfig): method get_input_embeddings (line 528) | def get_input_embeddings(self): method set_input_embeddings (line 531) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 535) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 558) | def forward( class OPTModel (line 753) | class OPTModel(OPTPreTrainedModel): method __init__ (line 754) | def __init__(self, config: OPTConfig): method get_input_embeddings (line 760) | def get_input_embeddings(self): method set_input_embeddings (line 763) | def set_input_embeddings(self, value): method get_decoder (line 766) | def get_decoder(self): method forward (line 776) | def forward( class OPTForCausalLM (line 819) | class OPTForCausalLM(OPTPreTrainedModel): method __init__ (line 822) | def __init__(self, config): method get_input_embeddings (line 832) | def get_input_embeddings(self): method set_input_embeddings (line 835) | def set_input_embeddings(self, value): method get_output_embeddings (line 838) | def get_output_embeddings(self): method set_output_embeddings (line 841) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 844) | def set_decoder(self, decoder): method get_decoder (line 847) | def get_decoder(self): method forward (line 851) | def forward( method prepare_inputs_for_generation (line 982) | def prepare_inputs_for_generation( method _reorder_cache (line 1004) | def _reorder_cache(past_key_values, beam_idx): class OPTForSequenceClassification (line 1026) | class OPTForSequenceClassification(OPTPreTrainedModel): method __init__ (line 1029) | def __init__(self, config: OPTConfig): method forward (line 1046) | def forward( method get_input_embeddings (line 1134) | def get_input_embeddings(self): method set_input_embeddings (line 1137) | def set_input_embeddings(self, value): class OPTForQuestionAnswering (line 1148) | class OPTForQuestionAnswering(OPTPreTrainedModel): method __init__ (line 1151) | def __init__(self, config: OPTConfig): method forward (line 1161) | def forward( method get_input_embeddings (line 1267) | def get_input_embeddings(self): method set_input_embeddings (line 1270) | def set_input_embeddings(self, value): FILE: transformers/models/opt/modeling_tf_opt.py function _make_causal_mask (line 63) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 81) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFOPTLearnedPositionalEmbedding (line 94) | class TFOPTLearnedPositionalEmbedding(TFSharedEmbeddings): method __init__ (line 99) | def __init__(self, num_embeddings: int, embedding_dim: int, **kwargs): method call (line 105) | def call(self, attention_mask, past_key_values_length: int = 0): class TFOPTAttention (line 119) | class TFOPTAttention(tf.keras.layers.Layer): method __init__ (line 122) | def __init__( method _shape (line 150) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 153) | def call( class TFOPTDecoderLayer (line 272) | class TFOPTDecoderLayer(tf.keras.layers.Layer): method __init__ (line 273) | def __init__(self, config: OPTConfig, **kwargs): method call (line 292) | def call( class TFOPTPreTrainedModel (line 404) | class TFOPTPreTrainedModel(TFPreTrainedModel): class TFOPTDecoder (line 464) | class TFOPTDecoder(tf.keras.layers.Layer): method __init__ (line 467) | def __init__(self, config: OPTConfig, **kwargs): method get_embed_tokens (line 501) | def get_embed_tokens(self): method set_embed_tokens (line 504) | def set_embed_tokens(self, embed_tokens): method set_input_embeddings (line 507) | def set_input_embeddings(self, new_embeddings): method get_input_embeddings (line 511) | def get_input_embeddings(self): method _prepare_decoder_attention_mask (line 514) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 531) | def call( class TFOPTMainLayer (line 696) | class TFOPTMainLayer(tf.keras.layers.Layer): method __init__ (line 699) | def __init__(self, config: OPTConfig, **kwargs): method get_input_embeddings (line 704) | def get_input_embeddings(self): method set_input_embeddings (line 707) | def set_input_embeddings(self, new_embeddings): method call (line 711) | def call( class TFOPTModel (line 761) | class TFOPTModel(TFOPTPreTrainedModel): method __init__ (line 764) | def __init__(self, config: OPTConfig, **kwargs): method get_input_embeddings (line 769) | def get_input_embeddings(self): method set_input_embeddings (line 772) | def set_input_embeddings(self, new_embeddings): method call (line 783) | def call( method serving_output (line 827) | def serving_output(self, output): class TFOPTForCausalLM (line 847) | class TFOPTForCausalLM(TFOPTPreTrainedModel, TFCausalLanguageModelingLoss): method __init__ (line 850) | def __init__(self, config: OPTConfig, **kwargs): method get_output_embeddings (line 855) | def get_output_embeddings(self): method prepare_inputs_for_generation (line 858) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 880) | def call( method serving_output (line 992) | def serving_output(self, output): FILE: transformers/models/owlvit/configuration_owlvit.py class OwlViTTextConfig (line 41) | class OwlViTTextConfig(PretrainedConfig): method __init__ (line 96) | def __init__( method from_pretrained (line 129) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class OwlViTVisionConfig (line 145) | class OwlViTVisionConfig(PretrainedConfig): method __init__ (line 200) | def __init__( method from_pretrained (line 232) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class OwlViTConfig (line 248) | class OwlViTConfig(PretrainedConfig): method __init__ (line 275) | def __init__( method from_pretrained (line 303) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method from_text_vision_configs (line 315) | def from_text_vision_configs(cls, text_config: Dict, vision_config: Di... method to_dict (line 329) | def to_dict(self): class OwlViTOnnxConfig (line 343) | class OwlViTOnnxConfig(OnnxConfig): method inputs (line 345) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 355) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 366) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 369) | def generate_dummy_inputs( method default_onnx_opset (line 385) | def default_onnx_opset(self) -> int: FILE: transformers/models/owlvit/convert_owlvit_original_flax_to_hf.py function flatten_nested_dict (line 79) | def flatten_nested_dict(params, parent_key="", sep="/"): function to_f32 (line 92) | def to_f32(params): function copy_attn_layer (line 96) | def copy_attn_layer(hf_attn_layer, pt_attn_layer): function copy_mlp (line 116) | def copy_mlp(hf_mlp, pt_mlp): function copy_linear (line 121) | def copy_linear(hf_linear, pt_linear): function copy_layer (line 126) | def copy_layer(hf_layer, pt_layer): function copy_layers (line 138) | def copy_layers(hf_layers, pt_layers): function copy_encoder (line 143) | def copy_encoder(hf_encoder, pt_model): function copy_text_model_and_projection (line 155) | def copy_text_model_and_projection(hf_model, pt_model): function copy_vision_model_and_projection (line 163) | def copy_vision_model_and_projection(hf_model, pt_model): function copy_class_merge_token (line 180) | def copy_class_merge_token(hf_model, flax_params): function copy_class_box_heads (line 189) | def copy_class_box_heads(hf_model, flax_params): function copy_flax_attn_params (line 227) | def copy_flax_attn_params(hf_backbone, flax_attn_params): function _convert_attn_layers (line 257) | def _convert_attn_layers(params): function convert_clip_backbone (line 276) | def convert_clip_backbone(flax_params, torch_config): function convert_owlvit_checkpoint (line 326) | def convert_owlvit_checkpoint(pt_backbone, flax_params, attn_params, pyt... FILE: transformers/models/owlvit/feature_extraction_owlvit.py class OwlViTFeatureExtractor (line 26) | class OwlViTFeatureExtractor(OwlViTImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/owlvit/image_processing_owlvit.py function _upcast (line 52) | def _upcast(t): function box_area (line 60) | def box_area(boxes): function box_iou (line 75) | def box_iou(boxes1, boxes2): class OwlViTImageProcessor (line 91) | class OwlViTImageProcessor(BaseImageProcessor): method __init__ (line 129) | def __init__( method resize (line 168) | def resize( method center_crop (line 185) | def center_crop( method rescale (line 201) | def rescale( method normalize (line 213) | def normalize( method preprocess (line 226) | def preprocess( method post_process (line 338) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 384) | def post_process_object_detection( method post_process_image_guided_detection (line 440) | def post_process_image_guided_detection(self, outputs, threshold=0.6, ... FILE: transformers/models/owlvit/modeling_owlvit.py function _expand_mask (line 58) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 73) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function owlvit_loss (line 78) | def owlvit_loss(similarity: torch.Tensor) -> torch.Tensor: class OwlViTOutput (line 85) | class OwlViTOutput(ModelOutput): method to_tuple (line 115) | def to_tuple(self) -> Tuple[Any]: function _upcast (line 123) | def _upcast(t: torch.Tensor) -> torch.Tensor: function box_area (line 132) | def box_area(boxes: torch.Tensor) -> torch.Tensor: function box_iou (line 149) | def box_iou(boxes1: torch.Tensor, boxes2: torch.Tensor) -> torch.Tensor: function generalized_box_iou (line 166) | def generalized_box_iou(boxes1, boxes2): class OwlViTObjectDetectionOutput (line 191) | class OwlViTObjectDetectionOutput(ModelOutput): method to_tuple (line 233) | def to_tuple(self) -> Tuple[Any]: class OwlViTImageGuidedObjectDetectionOutput (line 241) | class OwlViTImageGuidedObjectDetectionOutput(ModelOutput): method to_tuple (line 282) | def to_tuple(self) -> Tuple[Any]: class OwlViTVisionEmbeddings (line 289) | class OwlViTVisionEmbeddings(nn.Module): method __init__ (line 290) | def __init__(self, config: OwlViTVisionConfig): method forward (line 309) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class OwlViTTextEmbeddings (line 321) | class OwlViTTextEmbeddings(nn.Module): method __init__ (line 322) | def __init__(self, config: OwlViTTextConfig): method forward (line 330) | def forward( class OwlViTAttention (line 350) | class OwlViTAttention(nn.Module): method __init__ (line 353) | def __init__(self, config): method _shape (line 372) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 375) | def forward( class OwlViTMLP (line 458) | class OwlViTMLP(nn.Module): method __init__ (line 459) | def __init__(self, config): method forward (line 466) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class OwlViTEncoderLayer (line 474) | class OwlViTEncoderLayer(nn.Module): method __init__ (line 475) | def __init__(self, config: OwlViTConfig): method forward (line 483) | def forward( class OwlViTPreTrainedModel (line 524) | class OwlViTPreTrainedModel(PreTrainedModel): method _init_weights (line 536) | def _init_weights(self, module): method _set_gradient_checkpointing (line 578) | def _set_gradient_checkpointing(self, module, value=False): class OwlViTEncoder (line 691) | class OwlViTEncoder(nn.Module): method __init__ (line 700) | def __init__(self, config: OwlViTConfig): method forward (line 705) | def forward( function _make_causal_mask (line 787) | def _make_causal_mask( class OwlViTTextTransformer (line 804) | class OwlViTTextTransformer(nn.Module): method __init__ (line 805) | def __init__(self, config: OwlViTTextConfig): method forward (line 815) | def forward( class OwlViTTextModel (line 876) | class OwlViTTextModel(OwlViTPreTrainedModel): method __init__ (line 879) | def __init__(self, config: OwlViTTextConfig): method get_input_embeddings (line 885) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 888) | def set_input_embeddings(self, value): method forward (line 893) | def forward( class OwlViTVisionTransformer (line 928) | class OwlViTVisionTransformer(nn.Module): method __init__ (line 929) | def __init__(self, config: OwlViTVisionConfig): method forward (line 940) | def forward( class OwlViTVisionModel (line 986) | class OwlViTVisionModel(OwlViTPreTrainedModel): method __init__ (line 990) | def __init__(self, config: OwlViTVisionConfig): method get_input_embeddings (line 996) | def get_input_embeddings(self) -> nn.Module: method forward (line 1001) | def forward( class OwlViTModel (line 1037) | class OwlViTModel(OwlViTPreTrainedModel): method __init__ (line 1040) | def __init__(self, config: OwlViTConfig): method get_text_features (line 1073) | def get_text_features( method get_image_features (line 1108) | def get_image_features( method forward (line 1154) | def forward( class OwlViTBoxPredictionHead (line 1251) | class OwlViTBoxPredictionHead(nn.Module): method __init__ (line 1252) | def __init__(self, config: OwlViTConfig): method forward (line 1261) | def forward(self, image_features: torch.Tensor) -> torch.FloatTensor: class OwlViTClassPredictionHead (line 1270) | class OwlViTClassPredictionHead(nn.Module): method __init__ (line 1271) | def __init__(self, config: OwlViTConfig): method forward (line 1282) | def forward( class OwlViTForObjectDetection (line 1319) | class OwlViTForObjectDetection(OwlViTPreTrainedModel): method __init__ (line 1322) | def __init__(self, config: OwlViTConfig): method normalize_grid_corner_coordinates (line 1332) | def normalize_grid_corner_coordinates(self, feature_map: torch.FloatTe... method compute_box_bias (line 1353) | def compute_box_bias(self, feature_map: torch.FloatTensor) -> torch.Fl... method box_predictor (line 1369) | def box_predictor( method class_predictor (line 1392) | def class_predictor( method image_text_embedder (line 1411) | def image_text_embedder( method image_embedder (line 1453) | def image_embedder( method embed_image_query (line 1485) | def embed_image_query( method image_guided_detection (line 1528) | def image_guided_detection( method forward (line 1623) | def forward( FILE: transformers/models/owlvit/processing_owlvit.py class OwlViTProcessor (line 29) | class OwlViTProcessor(ProcessorMixin): method __init__ (line 45) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 62) | def __call__(self, text=None, images=None, query_images=None, padding=... method post_process (line 174) | def post_process(self, *args, **kwargs): method post_process_object_detection (line 181) | def post_process_object_detection(self, *args, **kwargs): method post_process_image_guided_detection (line 188) | def post_process_image_guided_detection(self, *args, **kwargs): method batch_decode (line 195) | def batch_decode(self, *args, **kwargs): method decode (line 202) | def decode(self, *args, **kwargs): method feature_extractor_class (line 210) | def feature_extractor_class(self): method feature_extractor (line 218) | def feature_extractor(self): FILE: transformers/models/pegasus/configuration_pegasus.py class PegasusConfig (line 29) | class PegasusConfig(PretrainedConfig): method __init__ (line 104) | def __init__( method num_attention_heads (line 160) | def num_attention_heads(self) -> int: method hidden_size (line 164) | def hidden_size(self) -> int: FILE: transformers/models/pegasus/convert_pegasus_tf_to_pytorch.py function rename_state_dict_key (line 48) | def rename_state_dict_key(k): function convert_pegasus (line 57) | def convert_pegasus(tf_weights: dict, cfg_updates: dict) -> PegasusForCo... function get_tf_weights_as_numpy (line 88) | def get_tf_weights_as_numpy(path="./ckpt/aeslc/model.ckpt-32000") -> Dict: function convert_pegasus_ckpt_to_pytorch (line 101) | def convert_pegasus_ckpt_to_pytorch(ckpt_path: str, save_dir: str): FILE: transformers/models/pegasus/modeling_flax_pegasus.py function shift_tokens_right (line 213) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... function create_sinusoidal_positions (line 226) | def create_sinusoidal_positions(n_pos, dim, dtype): class FlaxPegasusAttention (line 237) | class FlaxPegasusAttention(nn.Module): method setup (line 246) | def setup(self) -> None: method _split_heads (line 272) | def _split_heads(self, hidden_states): method _merge_heads (line 275) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 279) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 310) | def __call__( class FlaxPegasusEncoderLayer (line 405) | class FlaxPegasusEncoderLayer(nn.Module): method setup (line 409) | def setup(self) -> None: method __call__ (line 432) | def __call__( class FlaxPegasusEncoderLayerCollection (line 462) | class FlaxPegasusEncoderLayerCollection(nn.Module): method setup (line 466) | def setup(self): method __call__ (line 473) | def __call__( class FlaxPegasusDecoderLayer (line 517) | class FlaxPegasusDecoderLayer(nn.Module): method setup (line 521) | def setup(self) -> None: method __call__ (line 554) | def __call__( class FlaxPegasusDecoderLayerCollection (line 606) | class FlaxPegasusDecoderLayerCollection(nn.Module): method setup (line 610) | def setup(self): method __call__ (line 617) | def __call__( class FlaxPegasusEncoder (line 676) | class FlaxPegasusEncoder(nn.Module): method setup (line 681) | def setup(self): method __call__ (line 695) | def __call__( class FlaxPegasusDecoder (line 745) | class FlaxPegasusDecoder(nn.Module): method setup (line 750) | def setup(self): method __call__ (line 765) | def __call__( class FlaxPegasusModule (line 823) | class FlaxPegasusModule(nn.Module): method setup (line 827) | def setup(self): method _get_encoder_module (line 838) | def _get_encoder_module(self): method _get_decoder_module (line 841) | def _get_decoder_module(self): method __call__ (line 844) | def __call__( class FlaxPegasusPreTrainedModel (line 893) | class FlaxPegasusPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 898) | def __init__( method init_weights (line 910) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 944) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 987) | def encode( method decode (line 1050) | def decode( method __call__ (line 1163) | def __call__( class FlaxPegasusModel (line 1227) | class FlaxPegasusModel(FlaxPegasusPreTrainedModel): class FlaxPegasusForConditionalGenerationModule (line 1237) | class FlaxPegasusForConditionalGenerationModule(nn.Module): method setup (line 1242) | def setup(self): method _get_encoder_module (line 1252) | def _get_encoder_module(self): method _get_decoder_module (line 1255) | def _get_decoder_module(self): method __call__ (line 1258) | def __call__( class FlaxPegasusForConditionalGeneration (line 1312) | class FlaxPegasusForConditionalGeneration(FlaxPegasusPreTrainedModel): method decode (line 1318) | def decode( method prepare_inputs_for_generation (line 1453) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1484) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/pegasus/modeling_pegasus.py function shift_tokens_right (line 60) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 77) | def _make_causal_mask( function _expand_mask (line 95) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class PegasusSinusoidalPositionalEmbedding (line 110) | class PegasusSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 113) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 118) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 135) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class PegasusAttention (line 145) | class PegasusAttention(nn.Module): method __init__ (line 148) | def __init__( method _shape (line 175) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 178) | def forward( class PegasusEncoderLayer (line 300) | class PegasusEncoderLayer(nn.Module): method __init__ (line 301) | def __init__(self, config: PegasusConfig): method forward (line 317) | def forward( class PegasusDecoderLayer (line 369) | class PegasusDecoderLayer(nn.Module): method __init__ (line 370) | def __init__(self, config: PegasusConfig): method forward (line 396) | def forward( class PegasusPreTrainedModel (line 486) | class PegasusPreTrainedModel(PreTrainedModel): method _init_weights (line 491) | def _init_weights(self, module): method _set_gradient_checkpointing (line 504) | def _set_gradient_checkpointing(self, module, value=False): class PegasusEncoder (line 638) | class PegasusEncoder(PegasusPreTrainedModel): method __init__ (line 648) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[nn.Em... method resize_position_embeddings (line 676) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 699) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 705) | def forward( class PegasusDecoder (line 839) | class PegasusDecoder(PegasusPreTrainedModel): method __init__ (line 848) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[nn.Em... method get_input_embeddings (line 873) | def get_input_embeddings(self): method set_input_embeddings (line 876) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 880) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method resize_position_embeddings (line 903) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 926) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 932) | def forward( class PegasusModel (line 1153) | class PegasusModel(PegasusPreTrainedModel): method __init__ (line 1156) | def __init__(self, config: PegasusConfig): method get_input_embeddings (line 1168) | def get_input_embeddings(self): method set_input_embeddings (line 1171) | def set_input_embeddings(self, value): method get_encoder (line 1176) | def get_encoder(self): method get_decoder (line 1179) | def get_decoder(self): method resize_position_embeddings (line 1182) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1199) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1207) | def forward( class PegasusForConditionalGeneration (line 1304) | class PegasusForConditionalGeneration(PegasusPreTrainedModel): method __init__ (line 1316) | def __init__(self, config: PegasusConfig): method get_encoder (line 1325) | def get_encoder(self): method get_decoder (line 1328) | def get_decoder(self): method resize_token_embeddings (line 1331) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1336) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1345) | def get_output_embeddings(self): method set_output_embeddings (line 1348) | def set_output_embeddings(self, new_embeddings): method resize_position_embeddings (line 1351) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1368) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1377) | def forward( method prepare_inputs_for_generation (line 1456) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1484) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1488) | def _reorder_cache(past_key_values, beam_idx): class PegasusDecoderWrapper (line 1499) | class PegasusDecoderWrapper(PegasusPreTrainedModel): method __init__ (line 1505) | def __init__(self, config): method forward (line 1509) | def forward(self, *args, **kwargs): class PegasusForCausalLM (line 1513) | class PegasusForCausalLM(PegasusPreTrainedModel): method __init__ (line 1516) | def __init__(self, config): method get_input_embeddings (line 1528) | def get_input_embeddings(self): method set_input_embeddings (line 1531) | def set_input_embeddings(self, value): method get_output_embeddings (line 1534) | def get_output_embeddings(self): method set_output_embeddings (line 1537) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1540) | def set_decoder(self, decoder): method get_decoder (line 1543) | def get_decoder(self): method get_position_embeddings (line 1546) | def get_position_embeddings(self) -> nn.Embedding: method resize_position_embeddings (line 1552) | def resize_position_embeddings(self, new_num_position_embeddings: int): method forward (line 1570) | def forward( method prepare_inputs_for_generation (line 1714) | def prepare_inputs_for_generation( method _reorder_cache (line 1732) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/pegasus/modeling_tf_pegasus.py function shift_tokens_right (line 65) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 90) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 108) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFPegasusSinusoidalPositionalEmbedding (line 122) | class TFPegasusSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 125) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 134) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 153) | def _init_weight(n_pos: int, dim: int): method call (line 170) | def call( class TFPegasusAttention (line 181) | class TFPegasusAttention(tf.keras.layers.Layer): method __init__ (line 184) | def __init__( method _shape (line 212) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 215) | def call( class TFPegasusEncoderLayer (line 335) | class TFPegasusEncoderLayer(tf.keras.layers.Layer): method __init__ (line 336) | def __init__(self, config: PegasusConfig, **kwargs): method call (line 350) | def call( class TFPegasusDecoderLayer (line 392) | class TFPegasusDecoderLayer(tf.keras.layers.Layer): method __init__ (line 393) | def __init__(self, config: PegasusConfig, **kwargs): method call (line 420) | def call( class TFPegasusPreTrainedModel (line 501) | class TFPegasusPreTrainedModel(TFPreTrainedModel): class TFPegasusEncoder (line 651) | class TFPegasusEncoder(tf.keras.layers.Layer): method __init__ (line 661) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[tf.ke... method get_embed_tokens (line 679) | def get_embed_tokens(self): method set_embed_tokens (line 682) | def set_embed_tokens(self, embed_tokens): method call (line 686) | def call( class TFPegasusDecoder (line 817) | class TFPegasusDecoder(tf.keras.layers.Layer): method __init__ (line 827) | def __init__(self, config: PegasusConfig, embed_tokens: Optional[tf.ke... method get_embed_tokens (line 844) | def get_embed_tokens(self): method set_embed_tokens (line 847) | def set_embed_tokens(self, embed_tokens): method call (line 851) | def call( class TFPegasusMainLayer (line 1052) | class TFPegasusMainLayer(tf.keras.layers.Layer): method __init__ (line 1055) | def __init__(self, config: PegasusConfig, **kwargs): method get_input_embeddings (line 1071) | def get_input_embeddings(self): method set_input_embeddings (line 1074) | def set_input_embeddings(self, new_embeddings): method call (line 1080) | def call( class TFPegasusModel (line 1166) | class TFPegasusModel(TFPegasusPreTrainedModel): method __init__ (line 1167) | def __init__(self, config: PegasusConfig, *inputs, **kwargs): method get_encoder (line 1172) | def get_encoder(self): method get_decoder (line 1175) | def get_decoder(self): method call (line 1185) | def call( method serving_output (line 1229) | def serving_output(self, output): class BiasLayer (line 1250) | class BiasLayer(tf.keras.layers.Layer): method __init__ (line 1256) | def __init__(self, shape, initializer, trainable, name, **kwargs): method call (line 1263) | def call(self, x): class TFPegasusForConditionalGeneration (line 1271) | class TFPegasusForConditionalGeneration(TFPegasusPreTrainedModel, TFCaus... method __init__ (line 1277) | def __init__(self, config, *inputs, **kwargs): method get_decoder (line 1286) | def get_decoder(self): method get_encoder (line 1289) | def get_encoder(self): method get_output_embeddings (line 1292) | def get_output_embeddings(self): method set_output_embeddings (line 1295) | def set_output_embeddings(self, value): method get_bias (line 1298) | def get_bias(self): method set_bias (line 1301) | def set_bias(self, value): method call (line 1313) | def call( method serving_output (line 1395) | def serving_output(self, output): method prepare_inputs_for_generation (line 1415) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1453) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): FILE: transformers/models/pegasus/tokenization_pegasus.py class PegasusTokenizer (line 41) | class PegasusTokenizer(PreTrainedTokenizer): method __init__ (line 105) | def __init__( method vocab_size (line 186) | def vocab_size(self) -> int: method get_vocab (line 189) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 194) | def __getstate__(self): method __setstate__ (line 199) | def __setstate__(self, d): method _tokenize (line 209) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 213) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 222) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 232) | def convert_tokens_to_string(self, tokens): method num_special_tokens_to_add (line 246) | def num_special_tokens_to_add(self, pair=False): method _special_token_mask (line 250) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 256) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 267) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 292) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/pegasus/tokenization_pegasus_fast.py class PegasusTokenizerFast (line 51) | class PegasusTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 100) | def __init__( method _special_token_mask (line 157) | def _special_token_mask(self, seq): method get_special_tokens_mask (line 169) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 180) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method save_vocabulary (line 201) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/pegasus_x/configuration_pegasus_x.py class PegasusXConfig (line 30) | class PegasusXConfig(PretrainedConfig): method __init__ (line 110) | def __init__( method num_attention_heads (line 174) | def num_attention_heads(self) -> int: method hidden_size (line 178) | def hidden_size(self) -> int: FILE: transformers/models/pegasus_x/modeling_pegasus_x.py class DimensionInfo (line 60) | class DimensionInfo: function shift_tokens_right (line 78) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 95) | def _make_causal_mask( function _expand_mask (line 113) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class PegasusXSinusoidalPositionalEmbedding (line 127) | class PegasusXSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 130) | def __init__(self, embed_dim, max_scale: int = 10000.0): method forward (line 136) | def forward(self, input_embeds: torch.Tensor, past_key_values_length: ... class PegasusXAttention (line 154) | class PegasusXAttention(nn.Module): method __init__ (line 157) | def __init__( method _shape (line 184) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 187) | def forward( class PegasusXGlobalLocalAttention (line 308) | class PegasusXGlobalLocalAttention(nn.Module): method __init__ (line 311) | def __init__( method _shape (line 339) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 342) | def forward( method compute_global_attention_representations (line 435) | def compute_global_attention_representations( method compute_local_attention_representations (line 478) | def compute_local_attention_representations( class PegasusXEncoderLayer (line 542) | class PegasusXEncoderLayer(nn.Module): method __init__ (line 543) | def __init__(self, stagger_blocks_this_layer: bool, config: PegasusXCo... method forward (line 563) | def forward( method pad_local_tokens (line 635) | def pad_local_tokens(cls, hidden_states, attention_mask, block_size): method unpad_local_tokens (line 651) | def unpad_local_tokens(cls, padded_hidden_states, block_size): class PegasusXDecoderLayer (line 657) | class PegasusXDecoderLayer(nn.Module): method __init__ (line 658) | def __init__(self, config: PegasusXConfig): method forward (line 686) | def forward( class PegasusXPreTrainedModel (line 769) | class PegasusXPreTrainedModel(PreTrainedModel): method _init_weights (line 774) | def _init_weights(self, module): method _set_gradient_checkpointing (line 783) | def _set_gradient_checkpointing(self, module, value=False): class PegasusXEncoder (line 901) | class PegasusXEncoder(PegasusXPreTrainedModel): method __init__ (line 911) | def __init__(self, config: PegasusXConfig, embed_tokens: Optional[nn.E... method resize_position_embeddings (line 942) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 961) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 967) | def forward( class PegasusXDecoder (line 1110) | class PegasusXDecoder(PegasusXPreTrainedModel): method __init__ (line 1119) | def __init__(self, config: PegasusXConfig, embed_tokens: Optional[nn.E... method get_input_embeddings (line 1139) | def get_input_embeddings(self): method set_input_embeddings (line 1142) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 1146) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method resize_position_embeddings (line 1169) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1188) | def get_position_embeddings(self) -> nn.Embedding: method forward (line 1194) | def forward( class PegasusXModel (line 1388) | class PegasusXModel(PegasusXPreTrainedModel): method __init__ (line 1391) | def __init__(self, config: PegasusXConfig): method get_input_embeddings (line 1403) | def get_input_embeddings(self): method set_input_embeddings (line 1406) | def set_input_embeddings(self, value): method get_encoder (line 1411) | def get_encoder(self): method get_decoder (line 1414) | def get_decoder(self): method resize_position_embeddings (line 1417) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1434) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1442) | def forward( class PegasusXForConditionalGeneration (line 1531) | class PegasusXForConditionalGeneration(PegasusXPreTrainedModel): method __init__ (line 1542) | def __init__(self, config: PegasusXConfig): method get_encoder (line 1550) | def get_encoder(self): method get_decoder (line 1553) | def get_decoder(self): method resize_token_embeddings (line 1556) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1560) | def get_output_embeddings(self): method set_output_embeddings (line 1563) | def set_output_embeddings(self, new_embeddings): method resize_position_embeddings (line 1566) | def resize_position_embeddings(self, new_num_position_embeddings: int): method get_position_embeddings (line 1583) | def get_position_embeddings(self) -> Tuple[nn.Embedding]: method forward (line 1592) | def forward( method prepare_inputs_for_generation (line 1665) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1687) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1691) | def _reorder_cache(past_key_values, beam_idx): class PegasusXDecoderWrapper (line 1702) | class PegasusXDecoderWrapper(PegasusXPreTrainedModel): method __init__ (line 1708) | def __init__(self, config): method forward (line 1712) | def forward(self, *args, **kwargs): FILE: transformers/models/perceiver/configuration_perceiver.py class PerceiverConfig (line 36) | class PerceiverConfig(PretrainedConfig): method __init__ (line 120) | def __init__( class PerceiverOnnxConfig (line 182) | class PerceiverOnnxConfig(OnnxConfig): method inputs (line 184) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 197) | def atol_for_validation(self) -> float: method generate_dummy_inputs (line 200) | def generate_dummy_inputs( FILE: transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py function prepare_img (line 48) | def prepare_img(): function rename_keys (line 55) | def rename_keys(state_dict, architecture): function convert_perceiver_checkpoint (line 264) | def convert_perceiver_checkpoint(pickle_file, pytorch_dump_folder_path, ... FILE: transformers/models/perceiver/feature_extraction_perceiver.py class PerceiverFeatureExtractor (line 26) | class PerceiverFeatureExtractor(PerceiverImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/perceiver/image_processing_perceiver.py class PerceiverImageProcessor (line 44) | class PerceiverImageProcessor(BaseImageProcessor): method __init__ (line 83) | def __init__( method center_crop (line 114) | def center_crop( method resize (line 149) | def resize( method rescale (line 177) | def rescale( method normalize (line 197) | def normalize( method preprocess (line 220) | def preprocess( FILE: transformers/models/perceiver/modeling_perceiver.py class PerceiverModelOutput (line 61) | class PerceiverModelOutput(ModelOutput): class PerceiverDecoderOutput (line 92) | class PerceiverDecoderOutput(ModelOutput): class PerceiverMaskedLMOutput (line 110) | class PerceiverMaskedLMOutput(ModelOutput): class PerceiverClassifierOutput (line 141) | class PerceiverClassifierOutput(ModelOutput): class PerceiverEmbeddings (line 172) | class PerceiverEmbeddings(nn.Module): method __init__ (line 175) | def __init__(self, config): method forward (line 179) | def forward(self, batch_size: int): class PerceiverSelfAttention (line 183) | class PerceiverSelfAttention(nn.Module): method __init__ (line 186) | def __init__( method transpose_for_scores (line 227) | def transpose_for_scores(self, x, channels_per_head): method forward (line 232) | def forward( class PerceiverSelfOutput (line 298) | class PerceiverSelfOutput(nn.Module): method __init__ (line 299) | def __init__(self, config, input_channels, output_channels): method forward (line 303) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PerceiverAttention (line 308) | class PerceiverAttention(nn.Module): method __init__ (line 311) | def __init__( method prune_heads (line 359) | def prune_heads(self, heads): method forward (line 377) | def forward( class PerceiverMLP (line 408) | class PerceiverMLP(nn.Module): method __init__ (line 411) | def __init__(self, config, input_size, widening_factor): method forward (line 420) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PerceiverLayer (line 427) | class PerceiverLayer(nn.Module): method __init__ (line 428) | def __init__( method forward (line 456) | def forward( method feed_forward_chunk (line 487) | def feed_forward_chunk(self, attention_output): class PerceiverEncoder (line 493) | class PerceiverEncoder(nn.Module): method __init__ (line 496) | def __init__(self, config, kv_dim=None): method forward (line 543) | def forward( class PerceiverPreTrainedModel (line 608) | class PerceiverPreTrainedModel(PreTrainedModel): method _init_weights (line 618) | def _init_weights(self, module): class PerceiverModel (line 716) | class PerceiverModel(PerceiverPreTrainedModel): method __init__ (line 717) | def __init__( method get_input_embeddings (line 738) | def get_input_embeddings(self): method set_input_embeddings (line 741) | def set_input_embeddings(self, value): method _prune_heads (line 744) | def _prune_heads(self, heads_to_prune): method forward (line 754) | def forward( class PerceiverForMaskedLM (line 954) | class PerceiverForMaskedLM(PerceiverPreTrainedModel): method __init__ (line 955) | def __init__(self, config: PerceiverConfig): method forward (line 988) | def forward( class PerceiverForSequenceClassification (line 1089) | class PerceiverForSequenceClassification(PerceiverPreTrainedModel): method __init__ (line 1090) | def __init__(self, config): method forward (line 1112) | def forward( class PerceiverForImageClassificationLearned (line 1214) | class PerceiverForImageClassificationLearned(PerceiverPreTrainedModel): method __init__ (line 1215) | def __init__(self, config): method forward (line 1247) | def forward( class PerceiverForImageClassificationFourier (line 1357) | class PerceiverForImageClassificationFourier(PerceiverPreTrainedModel): method __init__ (line 1358) | def __init__(self, config): method forward (line 1391) | def forward( class PerceiverForImageClassificationConvProcessing (line 1500) | class PerceiverForImageClassificationConvProcessing(PerceiverPreTrainedM... method __init__ (line 1501) | def __init__(self, config): method forward (line 1535) | def forward( class PerceiverForOpticalFlow (line 1644) | class PerceiverForOpticalFlow(PerceiverPreTrainedModel): method __init__ (line 1645) | def __init__(self, config): method forward (line 1696) | def forward( class PerceiverForMultimodalAutoencoding (line 1789) | class PerceiverForMultimodalAutoencoding(PerceiverPreTrainedModel): method __init__ (line 1790) | def __init__(self, config: PerceiverConfig): method forward (line 1907) | def forward( function build_position_encoding (line 1997) | def build_position_encoding( class PerceiverAbstractDecoder (line 2034) | class PerceiverAbstractDecoder(nn.Module, metaclass=abc.ABCMeta): method decoder_query (line 2038) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method num_query_channels (line 2043) | def num_query_channels(self): method forward (line 2047) | def forward(self, query, z, query_mask=None): class PerceiverProjectionDecoder (line 2051) | class PerceiverProjectionDecoder(PerceiverAbstractDecoder): method __init__ (line 2060) | def __init__(self, config): method decoder_query (line 2064) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2067) | def forward( class PerceiverBasicDecoder (line 2077) | class PerceiverBasicDecoder(PerceiverAbstractDecoder): method __init__ (line 2113) | def __init__( method num_query_channels (line 2171) | def num_query_channels(self) -> int: method decoder_query (line 2184) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2232) | def forward( class PerceiverClassificationDecoder (line 2263) | class PerceiverClassificationDecoder(PerceiverAbstractDecoder): method __init__ (line 2274) | def __init__(self, config, **decoder_kwargs): method num_query_channels (line 2286) | def num_query_channels(self) -> int: method decoder_query (line 2289) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2294) | def forward( class PerceiverOpticalFlowDecoder (line 2309) | class PerceiverOpticalFlowDecoder(PerceiverAbstractDecoder): method __init__ (line 2312) | def __init__(self, config, output_image_shape, output_num_channels=2, ... method num_query_channels (line 2321) | def num_query_channels(self) -> int: method decoder_query (line 2324) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2329) | def forward( class PerceiverBasicVideoAutoencodingDecoder (line 2344) | class PerceiverBasicVideoAutoencodingDecoder(PerceiverAbstractDecoder): method __init__ (line 2358) | def __init__( method num_query_channels (line 2376) | def num_query_channels(self) -> int: method decoder_query (line 2379) | def decoder_query(self, inputs, modality_sizes=None, inputs_without_po... method forward (line 2387) | def forward( function restructure (line 2397) | def restructure(modality_sizes: ModalitySizeType, inputs: torch.Tensor) ... class PerceiverMultimodalDecoder (line 2421) | class PerceiverMultimodalDecoder(PerceiverAbstractDecoder): method __init__ (line 2447) | def __init__( method num_query_channels (line 2479) | def num_query_channels(self) -> int: method decoder_query (line 2484) | def decoder_query(self, inputs, modality_sizes, inputs_without_pos=Non... method forward (line 2518) | def forward( function space_to_depth (line 2532) | def space_to_depth(frames: torch.Tensor, temporal_block_size: int = 1, s... class Conv2dSamePadding (line 2592) | class Conv2dSamePadding(nn.Conv2d): method __init__ (line 2598) | def __init__(self, *args, **kwargs): method forward (line 2604) | def forward(self, input): class Conv2DDownsample (line 2608) | class Conv2DDownsample(nn.Module): method __init__ (line 2611) | def __init__( method forward (line 2638) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: function generate_fourier_features (line 2646) | def generate_fourier_features(pos, num_bands, max_resolution=(224, 224),... function build_linear_positions (line 2698) | def build_linear_positions(index_dims, output_range=(-1.0, 1.0)): class PerceiverAbstractPositionEncoding (line 2721) | class PerceiverAbstractPositionEncoding(nn.Module, metaclass=abc.ABCMeta): method num_dimensions (line 2726) | def num_dimensions(self) -> int: method output_size (line 2730) | def output_size(self, *args, **kwargs) -> int: method forward (line 2734) | def forward(self, batch_size, pos): class PerceiverTrainablePositionEncoding (line 2738) | class PerceiverTrainablePositionEncoding(PerceiverAbstractPositionEncodi... method __init__ (line 2741) | def __init__(self, index_dims, num_channels=128): method num_dimensions (line 2749) | def num_dimensions(self) -> int: method output_size (line 2754) | def output_size(self, *args, **kwargs) -> int: method forward (line 2757) | def forward(self, batch_size: int) -> torch.Tensor: function _check_or_build_spatial_positions (line 2765) | def _check_or_build_spatial_positions(pos, index_dims, batch_size): class PerceiverFourierPositionEncoding (line 2795) | class PerceiverFourierPositionEncoding(PerceiverAbstractPositionEncoding): method __init__ (line 2798) | def __init__(self, num_bands, max_resolution, concat_pos=True, sine_on... method num_dimensions (line 2806) | def num_dimensions(self) -> int: method output_size (line 2809) | def output_size(self): method forward (line 2820) | def forward( class AbstractPreprocessor (line 2839) | class AbstractPreprocessor(nn.Module): method num_channels (line 2841) | def num_channels(self) -> int: class PerceiverTextPreprocessor (line 2846) | class PerceiverTextPreprocessor(AbstractPreprocessor): method __init__ (line 2857) | def __init__(self, config: PerceiverConfig) -> None: method num_channels (line 2864) | def num_channels(self) -> int: method forward (line 2867) | def forward(self, inputs: torch.LongTensor, pos: Optional[torch.Tensor... class PerceiverEmbeddingDecoder (line 2877) | class PerceiverEmbeddingDecoder(nn.Module): method __init__ (line 2886) | def __init__(self, config: PerceiverConfig) -> None: method forward (line 2892) | def forward(self, hidden_states: torch.Tensor, embedding_layer: torch.... class PerceiverMultimodalPostprocessor (line 2901) | class PerceiverMultimodalPostprocessor(nn.Module): method __init__ (line 2914) | def __init__(self, modalities: Mapping[str, PostprocessorType], input_... method forward (line 2919) | def forward( class PerceiverClassificationPostprocessor (line 2935) | class PerceiverClassificationPostprocessor(nn.Module): method __init__ (line 2946) | def __init__(self, config: PerceiverConfig, in_channels: int) -> None: method forward (line 2950) | def forward(self, inputs, pos: Optional[torch.Tensor] = None, modality... class PerceiverAudioPostprocessor (line 2955) | class PerceiverAudioPostprocessor(nn.Module): method __init__ (line 2968) | def __init__(self, config: PerceiverConfig, in_channels: int, postproc... method forward (line 2977) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverProjectionPostprocessor (line 2982) | class PerceiverProjectionPostprocessor(nn.Module): method __init__ (line 2994) | def __init__(self, in_channels: int, out_channels: int) -> None: method forward (line 2998) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverImagePreprocessor (line 3003) | class PerceiverImagePreprocessor(AbstractPreprocessor): method __init__ (line 3040) | def __init__( method num_channels (line 3115) | def num_channels(self) -> int: method _build_network_inputs (line 3147) | def _build_network_inputs(self, inputs: torch.Tensor, network_input_is... method forward (line 3182) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverOneHotPreprocessor (line 3232) | class PerceiverOneHotPreprocessor(AbstractPreprocessor): method __init__ (line 3241) | def __init__(self, config: PerceiverConfig) -> None: method num_channels (line 3246) | def num_channels(self) -> int: method forward (line 3249) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverAudioPreprocessor (line 3258) | class PerceiverAudioPreprocessor(AbstractPreprocessor): method __init__ (line 3281) | def __init__( method num_channels (line 3315) | def num_channels(self) -> int: method _build_network_inputs (line 3325) | def _build_network_inputs(self, inputs): method forward (line 3346) | def forward(self, inputs: torch.Tensor, pos: Optional[torch.Tensor] = ... class PerceiverMultimodalPreprocessor (line 3355) | class PerceiverMultimodalPreprocessor(AbstractPreprocessor): method __init__ (line 3372) | def __init__( method num_channels (line 3393) | def num_channels(self) -> int: method forward (line 3398) | def forward( FILE: transformers/models/perceiver/tokenization_perceiver.py class PerceiverTokenizer (line 27) | class PerceiverTokenizer(PreTrainedTokenizer): method __init__ (line 60) | def __init__( method get_vocab (line 103) | def get_vocab(self) -> Dict[str, int]: method vocab_size (line 112) | def vocab_size(self): method get_special_tokens_mask (line 115) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 143) | def build_inputs_with_special_tokens( method _tokenize (line 167) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 172) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 184) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 194) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 213) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/phobert/tokenization_phobert.py function get_pairs (line 52) | def get_pairs(word): class PhobertTokenizer (line 68) | class PhobertTokenizer(PreTrainedTokenizer): method __init__ (line 121) | def __init__( method build_inputs_with_special_tokens (line 164) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 190) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 218) | def create_token_type_ids_from_sequences( method vocab_size (line 243) | def vocab_size(self): method get_vocab (line 246) | def get_vocab(self): method bpe (line 249) | def bpe(self, token): method _tokenize (line 293) | def _tokenize(self, text): method _convert_token_to_id (line 303) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 307) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 311) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 316) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method add_from_file (line 341) | def add_from_file(self, f): FILE: transformers/models/pix2struct/configuration_pix2struct.py class Pix2StructTextConfig (line 34) | class Pix2StructTextConfig(PretrainedConfig): method __init__ (line 102) | def __init__( method from_pretrained (line 153) | def from_pretrained( class Pix2StructVisionConfig (line 171) | class Pix2StructVisionConfig(PretrainedConfig): method __init__ (line 240) | def __init__( method from_pretrained (line 286) | def from_pretrained( class Pix2StructConfig (line 304) | class Pix2StructConfig(PretrainedConfig): method __init__ (line 355) | def __init__( method from_text_vision_configs (line 392) | def from_text_vision_configs( method to_dict (line 405) | def to_dict(self): FILE: transformers/models/pix2struct/convert_pix2struct_original_pytorch_to_hf.py function get_flax_param (line 34) | def get_flax_param(t5x_checkpoint_path): function rename_and_convert_flax_params (line 40) | def rename_and_convert_flax_params(flax_dict): function convert_pix2struct_original_pytorch_checkpoint_to_hf (line 105) | def convert_pix2struct_original_pytorch_checkpoint_to_hf( FILE: transformers/models/pix2struct/image_processing_pix2struct.py function torch_extract_patches (line 52) | def torch_extract_patches(image_tensor, patch_height, patch_width): function render_text (line 79) | def render_text( function render_header (line 147) | def render_header(image: np.ndarray, header: str, **kwargs): class Pix2StructImageProcessor (line 187) | class Pix2StructImageProcessor(BaseImageProcessor): method __init__ (line 210) | def __init__( method extract_flattened_patches (line 226) | def extract_flattened_patches(self, image: np.ndarray, max_patches: in... method normalize (line 300) | def normalize( method preprocess (line 323) | def preprocess( FILE: transformers/models/pix2struct/modeling_pix2struct.py class Pix2StructLayerNorm (line 76) | class Pix2StructLayerNorm(nn.Module): method __init__ (line 77) | def __init__(self, hidden_size, eps=1e-6): method forward (line 85) | def forward(self, hidden_states): class Pix2StructVisionEmbeddings (line 117) | class Pix2StructVisionEmbeddings(nn.Module): method __init__ (line 124) | def __init__(self, config: Pix2StructConfig) -> None: method forward (line 133) | def forward(self, flattened_patches: torch.Tensor) -> torch.Tensor: class Pix2StructVisionAttention (line 153) | class Pix2StructVisionAttention(nn.Module): method __init__ (line 154) | def __init__(self, config): method forward (line 170) | def forward( class Pix2StructVisionMlp (line 248) | class Pix2StructVisionMlp(nn.Module): method __init__ (line 249) | def __init__(self, config: Pix2StructVisionConfig): method forward (line 257) | def forward(self, hidden_states): class Pix2StructVisionLayer (line 277) | class Pix2StructVisionLayer(nn.Module): method __init__ (line 278) | def __init__(self, config: Pix2StructConfig) -> None: method forward (line 287) | def forward( class Pix2StructVisionEncoder (line 320) | class Pix2StructVisionEncoder(nn.Module): method __init__ (line 321) | def __init__(self, config: Pix2StructConfig) -> None: method forward (line 327) | def forward( class Pix2StructPreTrainedModel (line 379) | class Pix2StructPreTrainedModel(PreTrainedModel): method dummy_inputs (line 388) | def dummy_inputs(self): method _init_weights (line 398) | def _init_weights(self, module): method _shift_right (line 478) | def _shift_right(self, input_ids): class Pix2StructVisionModel (line 548) | class Pix2StructVisionModel(Pix2StructPreTrainedModel): method __init__ (line 554) | def __init__(self, config: Pix2StructConfig): method _set_gradient_checkpointing (line 566) | def _set_gradient_checkpointing(self, module: Pix2StructVisionEncoder,... method get_input_embeddings (line 570) | def get_input_embeddings(self): method _prune_heads (line 573) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 583) | def forward( class Pix2StructTextDenseGatedActDense (line 662) | class Pix2StructTextDenseGatedActDense(nn.Module): method __init__ (line 663) | def __init__(self, config: Pix2StructTextConfig): method forward (line 671) | def forward(self, hidden_states): class Pix2StructTextLayerFF (line 691) | class Pix2StructTextLayerFF(nn.Module): method __init__ (line 692) | def __init__(self, config: Pix2StructTextConfig): method forward (line 700) | def forward(self, hidden_states): class Pix2StructTextAttention (line 707) | class Pix2StructTextAttention(nn.Module): method __init__ (line 708) | def __init__(self, config: Pix2StructTextConfig, has_relative_attentio... method _relative_position_bucket (line 732) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 780) | def compute_bias(self, query_length, key_length, device=None): method forward (line 797) | def forward( class Pix2StructTextLayerSelfAttention (line 927) | class Pix2StructTextLayerSelfAttention(nn.Module): method __init__ (line 928) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 934) | def forward( class Pix2StructTextLayerCrossAttention (line 960) | class Pix2StructTextLayerCrossAttention(nn.Module): method __init__ (line 961) | def __init__(self, config): method forward (line 967) | def forward( class Pix2StructTextBlock (line 996) | class Pix2StructTextBlock(nn.Module): method __init__ (line 997) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 1008) | def forward( class Pix2StructTextModel (line 1317) | class Pix2StructTextModel(Pix2StructPreTrainedModel): method _set_gradient_checkpointing (line 1322) | def _set_gradient_checkpointing(self, module, value=False): method __init__ (line 1326) | def __init__(self, config): method _reorder_cache (line 1343) | def _reorder_cache(self, past_key_values, beam_idx): method get_input_embeddings (line 1373) | def get_input_embeddings(self): method set_input_embeddings (line 1376) | def set_input_embeddings(self, new_embeddings): method get_output_embeddings (line 1379) | def get_output_embeddings(self): method set_output_embeddings (line 1382) | def set_output_embeddings(self, new_embeddings): method forward (line 1387) | def forward( class Pix2StructForConditionalGeneration (line 1596) | class Pix2StructForConditionalGeneration(Pix2StructPreTrainedModel): method __init__ (line 1608) | def __init__(self, config: Pix2StructConfig): method get_input_embeddings (line 1619) | def get_input_embeddings(self): method set_input_embeddings (line 1622) | def set_input_embeddings(self, new_embeddings): method get_output_embeddings (line 1625) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 1628) | def set_output_embeddings(self, new_embeddings): method resize_token_embeddings (line 1631) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method get_decoder (line 1639) | def get_decoder(self): method get_encoder (line 1642) | def get_encoder(self): method forward (line 1647) | def forward( method prepare_inputs_for_generation (line 1789) | def prepare_inputs_for_generation( FILE: transformers/models/pix2struct/processing_pix2struct.py class Pix2StructProcessor (line 26) | class Pix2StructProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor, tokenizer): method __call__ (line 48) | def __call__( method batch_decode (line 144) | def batch_decode(self, *args, **kwargs): method decode (line 151) | def decode(self, *args, **kwargs): method model_input_names (line 159) | def model_input_names(self): FILE: transformers/models/plbart/configuration_plbart.py class PLBartConfig (line 32) | class PLBartConfig(PretrainedConfig): method __init__ (line 109) | def __init__( class PLBartOnnxConfig (line 167) | class PLBartOnnxConfig(OnnxConfigWithPast): method inputs (line 169) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 178) | def outputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/plbart/convert_plbart_original_checkpoint_to_torch.py function remove_ignore_keys_ (line 23) | def remove_ignore_keys_(state_dict): function make_linear_from_emb (line 36) | def make_linear_from_emb(emb): function convert_fairseq_plbart_checkpoint_from_disk (line 43) | def convert_fairseq_plbart_checkpoint_from_disk( FILE: transformers/models/plbart/modeling_plbart.py function shift_tokens_right (line 61) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int): function _make_causal_mask (line 82) | def _make_causal_mask( function _expand_mask (line 100) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class PLBartLearnedPositionalEmbedding (line 115) | class PLBartLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 120) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 126) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class PLBartAttention (line 138) | class PLBartAttention(nn.Module): method __init__ (line 141) | def __init__( method _shape (line 168) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 171) | def forward( class PLBartEncoderLayer (line 293) | class PLBartEncoderLayer(nn.Module): method __init__ (line 294) | def __init__(self, config: PLBartConfig): method forward (line 310) | def forward( class PLBartDecoderLayer (line 362) | class PLBartDecoderLayer(nn.Module): method __init__ (line 363) | def __init__(self, config: PLBartConfig): method forward (line 389) | def forward( class PLBartClassificationHead (line 480) | class PLBartClassificationHead(nn.Module): method __init__ (line 483) | def __init__( method forward (line 495) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class PLBartPreTrainedModel (line 504) | class PLBartPreTrainedModel(PreTrainedModel): method _init_weights (line 510) | def _init_weights(self, module): method _set_gradient_checkpointing (line 521) | def _set_gradient_checkpointing(self, module, value=False): class PLBartEncoder (line 665) | class PLBartEncoder(PLBartPreTrainedModel): method __init__ (line 675) | def __init__(self, config: PLBartConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 702) | def get_input_embeddings(self): method set_input_embeddings (line 705) | def set_input_embeddings(self, value): method forward (line 708) | def forward( class PLBartDecoder (line 843) | class PLBartDecoder(PLBartPreTrainedModel): method __init__ (line 852) | def __init__(self, config: PLBartConfig, embed_tokens: Optional[nn.Emb... method get_input_embeddings (line 876) | def get_input_embeddings(self): method set_input_embeddings (line 879) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 882) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 905) | def forward( class PLBartModel (line 1129) | class PLBartModel(PLBartPreTrainedModel): method __init__ (line 1132) | def __init__(self, config: PLBartConfig): method get_input_embeddings (line 1143) | def get_input_embeddings(self): method set_input_embeddings (line 1146) | def set_input_embeddings(self, value): method get_encoder (line 1151) | def get_encoder(self): method get_decoder (line 1154) | def get_decoder(self): method forward (line 1163) | def forward( class PLBartForConditionalGeneration (line 1246) | class PLBartForConditionalGeneration(PLBartPreTrainedModel): method __init__ (line 1257) | def __init__(self, config: PLBartConfig): method get_encoder (line 1265) | def get_encoder(self): method get_decoder (line 1268) | def get_decoder(self): method resize_token_embeddings (line 1271) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method _resize_final_logits_bias (line 1276) | def _resize_final_logits_bias(self, new_num_tokens: int) -> None: method get_output_embeddings (line 1285) | def get_output_embeddings(self): method set_output_embeddings (line 1288) | def set_output_embeddings(self, new_embeddings): method forward (line 1294) | def forward( method prepare_inputs_for_generation (line 1369) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1397) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1401) | def _reorder_cache(past_key_values, beam_idx): class PLBartForSequenceClassification (line 1418) | class PLBartForSequenceClassification(PLBartPreTrainedModel): method __init__ (line 1421) | def __init__(self, config: PLBartConfig, **kwargs): method forward (line 1441) | def forward( class PLBartDecoderWrapper (line 1541) | class PLBartDecoderWrapper(PLBartPreTrainedModel): method __init__ (line 1547) | def __init__(self, config): method forward (line 1551) | def forward(self, *args, **kwargs): class PLBartForCausalLM (line 1556) | class PLBartForCausalLM(PLBartPreTrainedModel): method __init__ (line 1559) | def __init__(self, config): method get_input_embeddings (line 1571) | def get_input_embeddings(self): method set_input_embeddings (line 1574) | def set_input_embeddings(self, value): method get_output_embeddings (line 1577) | def get_output_embeddings(self): method set_output_embeddings (line 1580) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 1583) | def set_decoder(self, decoder): method get_decoder (line 1586) | def get_decoder(self): method forward (line 1590) | def forward( method prepare_inputs_for_generation (line 1734) | def prepare_inputs_for_generation( method _reorder_cache (line 1752) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/plbart/tokenization_plbart.py class PLBartTokenizer (line 106) | class PLBartTokenizer(PreTrainedTokenizer): method __init__ (line 176) | def __init__( method __getstate__ (line 268) | def __getstate__(self): method __setstate__ (line 274) | def __setstate__(self, d): method vocab_size (line 285) | def vocab_size(self): method src_lang (line 294) | def src_lang(self) -> str: method src_lang (line 298) | def src_lang(self, new_src_lang: str) -> None: method get_special_tokens_mask (line 303) | def get_special_tokens_mask( method build_inputs_with_special_tokens (line 333) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 360) | def create_token_type_ids_from_sequences( method _build_translation_inputs (line 384) | def _build_translation_inputs( method get_vocab (line 397) | def get_vocab(self): method _tokenize (line 402) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 405) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 414) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 420) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 425) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_seq2seq_batch (line 442) | def prepare_seq2seq_batch( method _switch_to_input_mode (line 454) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 457) | def _switch_to_target_mode(self): method set_src_lang_special_tokens (line 460) | def set_src_lang_special_tokens(self, src_lang) -> None: method set_tgt_lang_special_tokens (line 470) | def set_tgt_lang_special_tokens(self, lang: str) -> None: method _convert_lang_code_special_format (line 481) | def _convert_lang_code_special_format(self, lang: str) -> str: FILE: transformers/models/poolformer/configuration_poolformer.py class PoolFormerConfig (line 34) | class PoolFormerConfig(PretrainedConfig): method __init__ (line 96) | def __init__( class PoolFormerOnnxConfig (line 135) | class PoolFormerOnnxConfig(OnnxConfig): method inputs (line 139) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 147) | def atol_for_validation(self) -> float: FILE: transformers/models/poolformer/convert_poolformer_original_to_pytorch.py function replace_key_with_offset (line 35) | def replace_key_with_offset(key, offset, original_name, new_name): function rename_keys (line 49) | def rename_keys(state_dict): function prepare_img (line 85) | def prepare_img(): function convert_poolformer_checkpoint (line 93) | def convert_poolformer_checkpoint(model_name, checkpoint_path, pytorch_d... FILE: transformers/models/poolformer/feature_extraction_poolformer.py class PoolFormerFeatureExtractor (line 26) | class PoolFormerFeatureExtractor(PoolFormerImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/poolformer/image_processing_poolformer.py class PoolFormerImageProcessor (line 50) | class PoolFormerImageProcessor(BaseImageProcessor): method __init__ (line 103) | def __init__( method resize (line 136) | def resize( method center_crop (line 198) | def center_crop( method rescale (line 222) | def rescale( method normalize (line 242) | def normalize( method preprocess (line 265) | def preprocess( FILE: transformers/models/poolformer/modeling_poolformer.py function drop_path (line 53) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class PoolFormerDropPath (line 74) | class PoolFormerDropPath(nn.Module): method __init__ (line 77) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 81) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 84) | def extra_repr(self) -> str: class PoolFormerEmbeddings (line 88) | class PoolFormerEmbeddings(nn.Module): method __init__ (line 93) | def __init__(self, hidden_size, num_channels, patch_size, stride, padd... method forward (line 102) | def forward(self, pixel_values): class PoolFormerGroupNorm (line 108) | class PoolFormerGroupNorm(nn.GroupNorm): method __init__ (line 113) | def __init__(self, num_channels, **kwargs): class PoolFormerPooling (line 117) | class PoolFormerPooling(nn.Module): method __init__ (line 118) | def __init__(self, pool_size): method forward (line 122) | def forward(self, hidden_states): class PoolFormerOutput (line 126) | class PoolFormerOutput(nn.Module): method __init__ (line 127) | def __init__(self, config, dropout_prob, hidden_size, intermediate_size): method forward (line 137) | def forward(self, hidden_states): class PoolFormerLayer (line 147) | class PoolFormerLayer(nn.Module): method __init__ (line 150) | def __init__(self, config, num_channels, pool_size, hidden_size, inter... method forward (line 168) | def forward(self, hidden_states): class PoolFormerEncoder (line 198) | class PoolFormerEncoder(nn.Module): method __init__ (line 199) | def __init__(self, config): method forward (line 242) | def forward(self, pixel_values, output_hidden_states=False, return_dic... class PoolFormerPreTrainedModel (line 264) | class PoolFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 275) | def _init_weights(self, module): method _set_gradient_checkpointing (line 285) | def _set_gradient_checkpointing(self, module, value=False): class PoolFormerModel (line 313) | class PoolFormerModel(PoolFormerPreTrainedModel): method __init__ (line 314) | def __init__(self, config): method get_input_embeddings (line 323) | def get_input_embeddings(self): method forward (line 334) | def forward( class PoolFormerFinalPooler (line 364) | class PoolFormerFinalPooler(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 369) | def forward(self, hidden_states): class PoolFormerForImageClassification (line 380) | class PoolFormerForImageClassification(PoolFormerPreTrainedModel): method __init__ (line 381) | def __init__(self, config): method forward (line 403) | def forward( FILE: transformers/models/prophetnet/configuration_prophetnet.py class ProphetNetConfig (line 32) | class ProphetNetConfig(PretrainedConfig): method __init__ (line 107) | def __init__( method num_hidden_layers (line 174) | def num_hidden_layers(self) -> int: method num_hidden_layers (line 178) | def num_hidden_layers(self, value): FILE: transformers/models/prophetnet/convert_prophetnet_original_pytorch_checkpoint_to_pytorch.py function convert_prophetnet_checkpoint_to_pytorch (line 38) | def convert_prophetnet_checkpoint_to_pytorch(prophetnet_checkpoint_path:... FILE: transformers/models/prophetnet/modeling_prophetnet.py function softmax (line 178) | def softmax(hidden_state, dim, onnx_trace=False): function ngram_attention_bias (line 185) | def ngram_attention_bias(sequence_length, ngram, device, dtype): function compute_relative_buckets (line 202) | def compute_relative_buckets(num_buckets, max_distance, relative_positio... function compute_all_stream_relative_buckets (line 229) | def compute_all_stream_relative_buckets(num_buckets, max_distance, posit... class ProphetNetSeq2SeqLMOutput (line 253) | class ProphetNetSeq2SeqLMOutput(ModelOutput): method decoder_cross_attentions (line 328) | def decoder_cross_attentions(self): class ProphetNetSeq2SeqModelOutput (line 338) | class ProphetNetSeq2SeqModelOutput(ModelOutput): method decoder_cross_attentions (line 414) | def decoder_cross_attentions(self): class ProphetNetDecoderModelOutput (line 424) | class ProphetNetDecoderModelOutput(ModelOutput): class ProphetNetDecoderLMOutput (line 484) | class ProphetNetDecoderLMOutput(ModelOutput): class ProphetNetPreTrainedModel (line 545) | class ProphetNetPreTrainedModel(PreTrainedModel): method _init_weights (line 550) | def _init_weights(self, module): method _set_gradient_checkpointing (line 560) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 564) | def _shift_right(self, input_ids): class ProphetNetPositionalEmbeddings (line 587) | class ProphetNetPositionalEmbeddings(nn.Embedding): method __init__ (line 594) | def __init__(self, config: ProphetNetConfig) -> None: method forward (line 598) | def forward(self, inputs_shape, device, attention_mask=None, past_key_... method _forward (line 626) | def _forward(self, position_ids): class ProphetNetAttention (line 630) | class ProphetNetAttention(nn.Module): method __init__ (line 633) | def __init__( method _shape (line 657) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 660) | def forward( class ProphetNetFeedForward (line 759) | class ProphetNetFeedForward(nn.Module): method __init__ (line 764) | def __init__(self, config: ProphetNetConfig, ffn_dim: int): method forward (line 772) | def forward(self, hidden_states): class ProphetNetNgramSelfAttention (line 782) | class ProphetNetNgramSelfAttention(nn.Module): method __init__ (line 783) | def __init__(self, config: ProphetNetConfig): method _shape (line 812) | def _shape(self, tensor, seq_len, batch_size): method prepare_for_onnx_export_ (line 815) | def prepare_for_onnx_export_(self): method forward (line 818) | def forward( method get_main_relative_pos_embeddings (line 996) | def get_main_relative_pos_embeddings( method get_predict_relative_pos_embeddings (line 1041) | def get_predict_relative_pos_embeddings( class ProphetNetEncoderLayer (line 1101) | class ProphetNetEncoderLayer(nn.Module): method __init__ (line 1106) | def __init__(self, config: ProphetNetConfig): method forward (line 1116) | def forward( class ProphetNetDecoderLayer (line 1144) | class ProphetNetDecoderLayer(nn.Module): method __init__ (line 1149) | def __init__(self, config: ProphetNetConfig): method forward (line 1164) | def forward( class ProphetNetEncoder (line 1232) | class ProphetNetEncoder(ProphetNetPreTrainedModel): method __init__ (line 1239) | def __init__(self, config: ProphetNetConfig, word_embeddings: nn.Embed... method get_input_embeddings (line 1256) | def get_input_embeddings(self): method set_input_embeddings (line 1259) | def set_input_embeddings(self, value): method forward (line 1264) | def forward( class ProphetNetDecoder (line 1372) | class ProphetNetDecoder(ProphetNetPreTrainedModel): method __init__ (line 1379) | def __init__(self, config: ProphetNetConfig, word_embeddings: Optional... method get_input_embeddings (line 1403) | def get_input_embeddings(self): method set_input_embeddings (line 1406) | def set_input_embeddings(self, value): method forward (line 1411) | def forward( method compute_buffered_relative_buckets (line 1660) | def compute_buffered_relative_buckets(self, position_ids): method prepare_attention_mask (line 1682) | def prepare_attention_mask(self, hidden_states, attention_mask): method prepare_predict_attention_mask (line 1706) | def prepare_predict_attention_mask(self, hidden_states, attention_mask): class ProphetNetModel (line 1746) | class ProphetNetModel(ProphetNetPreTrainedModel): method __init__ (line 1749) | def __init__(self, config: ProphetNetConfig): method get_input_embeddings (line 1766) | def get_input_embeddings(self): method set_input_embeddings (line 1769) | def set_input_embeddings(self, value): method get_encoder (line 1774) | def get_encoder(self): method get_decoder (line 1777) | def get_decoder(self): method forward (line 1782) | def forward( class ProphetNetForConditionalGeneration (line 1875) | class ProphetNetForConditionalGeneration(ProphetNetPreTrainedModel): method __init__ (line 1882) | def __init__(self, config: ProphetNetConfig): method get_output_embeddings (line 1893) | def get_output_embeddings(self): method set_output_embeddings (line 1896) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1899) | def get_input_embeddings(self): method forward (line 1904) | def forward( method _compute_loss (line 2008) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2036) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2065) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2070) | def _reorder_cache(past_key_values, beam_idx): method get_encoder (line 2079) | def get_encoder(self): method get_decoder (line 2082) | def get_decoder(self): class ProphetNetForCausalLM (line 2091) | class ProphetNetForCausalLM(ProphetNetPreTrainedModel): method __init__ (line 2094) | def __init__(self, config: ProphetNetConfig): method get_input_embeddings (line 2110) | def get_input_embeddings(self): method set_input_embeddings (line 2113) | def set_input_embeddings(self, value): method get_output_embeddings (line 2116) | def get_output_embeddings(self): method set_output_embeddings (line 2119) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2122) | def set_decoder(self, decoder): method get_decoder (line 2125) | def get_decoder(self): method forward (line 2130) | def forward( method _compute_loss (line 2262) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2290) | def prepare_inputs_for_generation( method _reorder_cache (line 2316) | def _reorder_cache(past_key_values, beam_idx): class ProphetNetDecoderWrapper (line 2323) | class ProphetNetDecoderWrapper(ProphetNetPreTrainedModel): method __init__ (line 2329) | def __init__(self, config: ProphetNetConfig): method forward (line 2333) | def forward(self, *args, **kwargs): FILE: transformers/models/prophetnet/tokenization_prophetnet.py function whitespace_tokenize (line 47) | def whitespace_tokenize(text): class BasicTokenizer (line 57) | class BasicTokenizer(object): method __init__ (line 77) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 85) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 122) | def _run_strip_accents(self, text): method _run_split_on_punc (line 133) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 155) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 168) | def _is_chinese_char(self, cp): method _clean_text (line 192) | def _clean_text(self, text): class WordpieceTokenizer (line 207) | class WordpieceTokenizer(object): method __init__ (line 210) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 215) | def tokenize(self, text): function load_vocab (line 264) | def load_vocab(vocab_file): class ProphetNetTokenizer (line 275) | class ProphetNetTokenizer(PreTrainedTokenizer): method __init__ (line 330) | def __init__( method vocab_size (line 378) | def vocab_size(self): method get_vocab (line 381) | def get_vocab(self): method _tokenize (line 384) | def _tokenize(self, text): method _convert_token_to_id (line 397) | def _convert_token_to_id(self, token: str): method _convert_id_to_token (line 401) | def _convert_id_to_token(self, index: int): method convert_tokens_to_string (line 405) | def convert_tokens_to_string(self, tokens: str): method get_special_tokens_mask (line 410) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 440) | def create_token_type_ids_from_sequences( method save_vocabulary (line 468) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 488) | def build_inputs_with_special_tokens( FILE: transformers/models/qdqbert/configuration_qdqbert.py class QDQBertConfig (line 29) | class QDQBertConfig(PretrainedConfig): method __init__ (line 90) | def __init__( FILE: transformers/models/qdqbert/modeling_qdqbert.py function load_tf_weights_in_qdqbert (line 78) | def load_tf_weights_in_qdqbert(model, tf_checkpoint_path): class QDQBertEmbeddings (line 152) | class QDQBertEmbeddings(nn.Module): method __init__ (line 155) | def __init__(self, config): method forward (line 172) | def forward( class QDQBertSelfAttention (line 214) | class QDQBertSelfAttention(nn.Module): method __init__ (line 215) | def __init__(self, config): method transpose_for_scores (line 244) | def transpose_for_scores(self, x): method forward (line 249) | def forward( class QDQBertSelfOutput (line 348) | class QDQBertSelfOutput(nn.Module): method __init__ (line 349) | def __init__(self, config): method forward (line 361) | def forward(self, hidden_states, input_tensor): class QDQBertAttention (line 372) | class QDQBertAttention(nn.Module): method __init__ (line 373) | def __init__(self, config): method prune_heads (line 379) | def prune_heads(self, heads): method forward (line 397) | def forward( class QDQBertIntermediate (line 421) | class QDQBertIntermediate(nn.Module): method __init__ (line 422) | def __init__(self, config): method forward (line 431) | def forward(self, hidden_states): class QDQBertOutput (line 437) | class QDQBertOutput(nn.Module): method __init__ (line 438) | def __init__(self, config): method forward (line 449) | def forward(self, hidden_states, input_tensor): class QDQBertLayer (line 460) | class QDQBertLayer(nn.Module): method __init__ (line 461) | def __init__(self, config): method forward (line 474) | def forward( method feed_forward_chunk (line 537) | def feed_forward_chunk(self, attention_output): class QDQBertEncoder (line 544) | class QDQBertEncoder(nn.Module): method __init__ (line 545) | def __init__(self, config): method forward (line 551) | def forward( class QDQBertPooler (line 641) | class QDQBertPooler(nn.Module): method __init__ (line 642) | def __init__(self, config): method forward (line 647) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class QDQBertPredictionHeadTransform (line 657) | class QDQBertPredictionHeadTransform(nn.Module): method __init__ (line 658) | def __init__(self, config): method forward (line 667) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class QDQBertLMPredictionHead (line 675) | class QDQBertLMPredictionHead(nn.Module): method __init__ (line 676) | def __init__(self, config): method forward (line 689) | def forward(self, hidden_states): class QDQBertOnlyMLMHead (line 696) | class QDQBertOnlyMLMHead(nn.Module): method __init__ (line 697) | def __init__(self, config): method forward (line 701) | def forward(self, sequence_output): class QDQBertOnlyNSPHead (line 707) | class QDQBertOnlyNSPHead(nn.Module): method __init__ (line 708) | def __init__(self, config): method forward (line 712) | def forward(self, pooled_output): class QDQBertPreTrainingHeads (line 718) | class QDQBertPreTrainingHeads(nn.Module): method __init__ (line 719) | def __init__(self, config): method forward (line 724) | def forward(self, sequence_output, pooled_output): class QDQBertPreTrainedModel (line 731) | class QDQBertPreTrainedModel(PreTrainedModel): method _init_weights (line 743) | def _init_weights(self, module): method _set_gradient_checkpointing (line 759) | def _set_gradient_checkpointing(self, module, value=False): class QDQBertModel (line 834) | class QDQBertModel(QDQBertPreTrainedModel): method __init__ (line 847) | def __init__(self, config, add_pooling_layer: bool = True): method get_input_embeddings (line 860) | def get_input_embeddings(self): method set_input_embeddings (line 863) | def set_input_embeddings(self, value): method _prune_heads (line 866) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]): method forward (line 880) | def forward( class QDQBertLMHeadModel (line 1014) | class QDQBertLMHeadModel(QDQBertPreTrainedModel): method __init__ (line 1018) | def __init__(self, config): method get_output_embeddings (line 1030) | def get_output_embeddings(self): method set_output_embeddings (line 1033) | def set_output_embeddings(self, new_embeddings): method forward (line 1038) | def forward( method prepare_inputs_for_generation (line 1141) | def prepare_inputs_for_generation( method _reorder_cache (line 1159) | def _reorder_cache(self, past_key_values, beam_idx): class QDQBertForMaskedLM (line 1167) | class QDQBertForMaskedLM(QDQBertPreTrainedModel): method __init__ (line 1171) | def __init__(self, config): method get_output_embeddings (line 1186) | def get_output_embeddings(self): method set_output_embeddings (line 1189) | def set_output_embeddings(self, new_embeddings): method forward (line 1198) | def forward( method prepare_inputs_for_generation (line 1255) | def prepare_inputs_for_generation( class QDQBertForNextSentencePrediction (line 1278) | class QDQBertForNextSentencePrediction(QDQBertPreTrainedModel): method __init__ (line 1279) | def __init__(self, config): method forward (line 1290) | def forward( class QDQBertForSequenceClassification (line 1382) | class QDQBertForSequenceClassification(QDQBertPreTrainedModel): method __init__ (line 1383) | def __init__(self, config): method forward (line 1400) | def forward( class QDQBertForMultipleChoice (line 1479) | class QDQBertForMultipleChoice(QDQBertPreTrainedModel): method __init__ (line 1480) | def __init__(self, config): method forward (line 1496) | def forward( class QDQBertForTokenClassification (line 1570) | class QDQBertForTokenClassification(QDQBertPreTrainedModel): method __init__ (line 1573) | def __init__(self, config): method forward (line 1590) | def forward( class QDQBertForQuestionAnswering (line 1650) | class QDQBertForQuestionAnswering(QDQBertPreTrainedModel): method __init__ (line 1653) | def __init__(self, config): method forward (line 1669) | def forward( FILE: transformers/models/rag/configuration_rag.py class RagConfig (line 82) | class RagConfig(PretrainedConfig): method __init__ (line 86) | def __init__( method from_question_encoder_generator_configs (line 171) | def from_question_encoder_generator_configs( method to_dict (line 183) | def to_dict(self): FILE: transformers/models/rag/modeling_rag.py class RetrievAugLMMarginOutput (line 39) | class RetrievAugLMMarginOutput(ModelOutput): class RetrievAugLMOutput (line 134) | class RetrievAugLMOutput(ModelOutput): class RagPreTrainedModel (line 223) | class RagPreTrainedModel(PreTrainedModel): method from_pretrained (line 237) | def from_pretrained(cls, *args, **kwargs): method from_pretrained_question_encoder_generator (line 244) | def from_pretrained_question_encoder_generator( class RagModel (line 494) | class RagModel(RagPreTrainedModel): method __init__ (line 495) | def __init__( method forward (line 539) | def forward( class RagSequenceForGeneration (line 740) | class RagSequenceForGeneration(RagPreTrainedModel): method __init__ (line 741) | def __init__( method set_retriever (line 762) | def set_retriever(self, retriever: RagRetriever): method set_context_encoder_for_training (line 765) | def set_context_encoder_for_training(self, ctx_encoder: PreTrainedModel): method forward (line 771) | def forward( method retriever (line 899) | def retriever(self): method generator (line 903) | def generator(self): method question_encoder (line 907) | def question_encoder(self): method generate (line 911) | def generate( method get_nll (line 1061) | def get_nll( method _cat_and_pad (line 1121) | def _cat_and_pad(tensors, pad_token_id): class RagTokenForGeneration (line 1138) | class RagTokenForGeneration(RagPreTrainedModel): method __init__ (line 1139) | def __init__( method set_retriever (line 1161) | def set_retriever(self, retriever: RagRetriever): method set_context_encoder_for_training (line 1164) | def set_context_encoder_for_training(self, ctx_encoder: PreTrainedModel): method prepare_inputs_for_generation (line 1168) | def prepare_inputs_for_generation( method retriever (line 1196) | def retriever(self): method generator (line 1200) | def generator(self): method question_encoder (line 1204) | def question_encoder(self): method _reorder_cache (line 1208) | def _reorder_cache(past_key_values, beam_idx): method marginalize (line 1225) | def marginalize(self, seq_logits, doc_scores, n_docs=None): method forward (line 1238) | def forward( method generate (line 1378) | def generate( method get_input_embeddings (line 1582) | def get_input_embeddings(self): method get_output_embeddings (line 1585) | def get_output_embeddings(self): method set_output_embeddings (line 1588) | def set_output_embeddings(self, new_embeddings): method shift_tokens_right (line 1591) | def shift_tokens_right(self, input_ids, start_token_id=None): method get_nll (line 1600) | def get_nll(self, seq_logits, doc_scores, target, reduce_loss=False, e... FILE: transformers/models/rag/modeling_tf_rag.py class TFRetrievAugLMMarginOutput (line 48) | class TFRetrievAugLMMarginOutput(ModelOutput): class TFRetrievAugLMOutput (line 136) | class TFRetrievAugLMOutput(ModelOutput): class TFRagPreTrainedModel (line 218) | class TFRagPreTrainedModel(TFPreTrainedModel): method from_pretrained_question_encoder_generator (line 232) | def from_pretrained_question_encoder_generator( class TFRagModel (line 496) | class TFRagModel(TFRagPreTrainedModel): method __init__ (line 499) | def __init__( method set_retriever (line 543) | def set_retriever(self, retriever: RagRetriever): method call (line 549) | def call( class TFRagTokenForGeneration (line 729) | class TFRagTokenForGeneration(TFRagPreTrainedModel, TFCausalLanguageMode... method __init__ (line 732) | def __init__( method set_retriever (line 761) | def set_retriever(self, retriever: RagRetriever): method prepare_inputs_for_generation (line 765) | def prepare_inputs_for_generation( method retriever (line 793) | def retriever(self): method generator (line 797) | def generator(self): method question_encoder (line 801) | def question_encoder(self): method _gather_beams (line 805) | def _gather_beams(nested, beam_indices, batch_axis=0): method marginalize (line 830) | def marginalize(self, seq_logits, doc_scores, n_docs=None): method call (line 845) | def call( method generate (line 997) | def generate( method get_input_embeddings (line 1210) | def get_input_embeddings(self): method get_output_embeddings (line 1213) | def get_output_embeddings(self): method shift_tokens_right (line 1217) | def shift_tokens_right(self, input_ids, start_token_id=None): method get_nll (line 1250) | def get_nll(self, seq_logits, doc_scores, target, reduce_loss=False, e... method hf_compute_loss (line 1264) | def hf_compute_loss(self, labels, y_pred, smooth_epsilon=0.0, from_log... class TFRagSequenceForGeneration (line 1301) | class TFRagSequenceForGeneration(TFRagPreTrainedModel, TFCausalLanguageM... method __init__ (line 1304) | def __init__( method set_retriever (line 1333) | def set_retriever(self, retriever: RagRetriever): method retriever (line 1337) | def retriever(self): method generator (line 1341) | def generator(self): method question_encoder (line 1345) | def question_encoder(self): method call (line 1351) | def call( method get_nll (line 1499) | def get_nll( method generate (line 1583) | def generate( method _cat_and_pad (line 1726) | def _cat_and_pad(tensors, pad_token_id): FILE: transformers/models/rag/retrieval_rag.py class Index (line 44) | class Index: method get_doc_dicts (line 49) | def get_doc_dicts(self, doc_ids: np.ndarray) -> List[dict]: method get_top_docs (line 59) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... method is_initialized (line 75) | def is_initialized(self): method init_index (line 81) | def init_index(self): class LegacyIndex (line 90) | class LegacyIndex(Index): method __init__ (line 105) | def __init__(self, vector_size, index_path): method _resolve_path (line 113) | def _resolve_path(self, index_path, filename): method _load_passages (line 131) | def _load_passages(self): method _deserialize_index (line 138) | def _deserialize_index(self): method is_initialized (line 149) | def is_initialized(self): method init_index (line 152) | def init_index(self): method get_doc_dicts (line 160) | def get_doc_dicts(self, doc_ids: np.array): method get_top_docs (line 174) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... class HFIndexBase (line 183) | class HFIndexBase(Index): method __init__ (line 184) | def __init__(self, vector_size, dataset, index_initialized=False): method _check_dataset_format (line 191) | def _check_dataset_format(self, with_index: bool): method init_index (line 206) | def init_index(self): method is_initialized (line 209) | def is_initialized(self): method get_doc_dicts (line 212) | def get_doc_dicts(self, doc_ids: np.ndarray) -> List[dict]: method get_top_docs (line 215) | def get_top_docs(self, question_hidden_states: np.ndarray, n_docs=5) -... class CanonicalHFIndex (line 225) | class CanonicalHFIndex(HFIndexBase): method __init__ (line 247) | def __init__( method init_index (line 269) | def init_index(self): class CustomHFIndex (line 287) | class CustomHFIndex(HFIndexBase): method __init__ (line 301) | def __init__(self, vector_size: int, dataset, index_path=None): method load_from_disk (line 306) | def load_from_disk(cls, vector_size, dataset_path, index_path): method init_index (line 316) | def init_index(self): class RagRetriever (line 323) | class RagRetriever: method __init__ (line 377) | def __init__(self, config, question_encoder_tokenizer, generator_token... method _build_index (line 396) | def _build_index(config): method from_pretrained (line 419) | def from_pretrained(cls, retriever_name_or_path, indexed_dataset=None,... method save_pretrained (line 437) | def save_pretrained(self, save_directory): method init_retrieval (line 457) | def init_retrieval(self): method postprocess_docs (line 465) | def postprocess_docs(self, docs, input_strings, prefix, n_docs, return... method _chunk_tensor (line 517) | def _chunk_tensor(self, t: Iterable, chunk_size: int) -> List[Iterable]: method _main_retrieve (line 520) | def _main_retrieve(self, question_hidden_states: np.ndarray, n_docs: i... method retrieve (line 537) | def retrieve(self, question_hidden_states: np.ndarray, n_docs: int) ->... method set_ctx_encoder_tokenizer (line 559) | def set_ctx_encoder_tokenizer(self, ctx_encoder_tokenizer: PreTrainedT... method __call__ (line 564) | def __call__( FILE: transformers/models/rag/tokenization_rag.py class RagTokenizer (line 28) | class RagTokenizer: method __init__ (line 29) | def __init__(self, question_encoder, generator): method save_pretrained (line 34) | def save_pretrained(self, save_directory): method from_pretrained (line 44) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 61) | def __call__(self, *args, **kwargs): method batch_decode (line 64) | def batch_decode(self, *args, **kwargs): method decode (line 67) | def decode(self, *args, **kwargs): method _switch_to_input_mode (line 70) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 73) | def _switch_to_target_mode(self): method prepare_seq2seq_batch (line 76) | def prepare_seq2seq_batch( FILE: transformers/models/realm/configuration_realm.py class RealmConfig (line 44) | class RealmConfig(PretrainedConfig): method __init__ (line 130) | def __init__( FILE: transformers/models/realm/modeling_realm.py function load_tf_weights_in_realm (line 58) | def load_tf_weights_in_realm(model, config, tf_checkpoint_path): class RealmEmbeddings (line 166) | class RealmEmbeddings(nn.Module): method __init__ (line 169) | def __init__(self, config): method forward (line 186) | def forward( class RealmSelfAttention (line 229) | class RealmSelfAttention(nn.Module): method __init__ (line 230) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 256) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 261) | def forward( class RealmSelfOutput (line 364) | class RealmSelfOutput(nn.Module): method __init__ (line 365) | def __init__(self, config): method forward (line 371) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RealmAttention (line 379) | class RealmAttention(nn.Module): method __init__ (line 380) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 386) | def prune_heads(self, heads): method forward (line 404) | def forward( class RealmIntermediate (line 429) | class RealmIntermediate(nn.Module): method __init__ (line 430) | def __init__(self, config): method forward (line 438) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RealmOutput (line 445) | class RealmOutput(nn.Module): method __init__ (line 446) | def __init__(self, config): method forward (line 452) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RealmLayer (line 460) | class RealmLayer(nn.Module): method __init__ (line 461) | def __init__(self, config): method forward (line 475) | def forward( method feed_forward_chunk (line 540) | def feed_forward_chunk(self, attention_output): class RealmEncoder (line 547) | class RealmEncoder(nn.Module): method __init__ (line 548) | def __init__(self, config): method forward (line 554) | def forward( class RealmPooler (line 646) | class RealmPooler(nn.Module): method __init__ (line 647) | def __init__(self, config): method forward (line 652) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RealmEmbedderOutput (line 662) | class RealmEmbedderOutput(ModelOutput): class RealmScorerOutput (line 689) | class RealmScorerOutput(ModelOutput): class RealmReaderOutput (line 708) | class RealmReaderOutput(ModelOutput): class RealmForOpenQAOutput (line 758) | class RealmForOpenQAOutput(ModelOutput): class RealmPredictionHeadTransform (line 774) | class RealmPredictionHeadTransform(nn.Module): method __init__ (line 775) | def __init__(self, config): method forward (line 784) | def forward(self, hidden_states): class RealmLMPredictionHead (line 791) | class RealmLMPredictionHead(nn.Module): method __init__ (line 792) | def __init__(self, config): method forward (line 805) | def forward(self, hidden_states): class RealmOnlyMLMHead (line 811) | class RealmOnlyMLMHead(nn.Module): method __init__ (line 812) | def __init__(self, config): method forward (line 816) | def forward(self, sequence_output): class RealmScorerProjection (line 821) | class RealmScorerProjection(nn.Module): method __init__ (line 822) | def __init__(self, config): method forward (line 828) | def forward(self, hidden_states): class RealmReaderProjection (line 834) | class RealmReaderProjection(nn.Module): method __init__ (line 835) | def __init__(self, config): method forward (line 843) | def forward(self, hidden_states, block_mask): class RealmPreTrainedModel (line 962) | class RealmPreTrainedModel(PreTrainedModel): method _init_weights (line 973) | def _init_weights(self, module): method _flatten_inputs (line 989) | def _flatten_inputs(self, *inputs): class RealmBertModel (line 1003) | class RealmBertModel(RealmPreTrainedModel): method __init__ (line 1008) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 1021) | def get_input_embeddings(self): method set_input_embeddings (line 1024) | def set_input_embeddings(self, value): method _prune_heads (line 1027) | def _prune_heads(self, heads_to_prune): method forward (line 1035) | def forward( class RealmEmbedder (line 1149) | class RealmEmbedder(RealmPreTrainedModel): method __init__ (line 1152) | def __init__(self, config): method get_input_embeddings (line 1159) | def get_input_embeddings(self): method set_input_embeddings (line 1162) | def set_input_embeddings(self, value): method forward (line 1167) | def forward( class RealmScorer (line 1231) | class RealmScorer(RealmPreTrainedModel): method __init__ (line 1238) | def __init__(self, config, query_embedder=None): method forward (line 1249) | def forward( class RealmKnowledgeAugEncoder (line 1379) | class RealmKnowledgeAugEncoder(RealmPreTrainedModel): method __init__ (line 1382) | def __init__(self, config): method get_input_embeddings (line 1388) | def get_input_embeddings(self): method set_input_embeddings (line 1391) | def set_input_embeddings(self, value): method get_output_embeddings (line 1394) | def get_output_embeddings(self): method set_output_embeddings (line 1397) | def set_output_embeddings(self, new_embeddings): method forward (line 1404) | def forward( class RealmReader (line 1529) | class RealmReader(RealmPreTrainedModel): method __init__ (line 1532) | def __init__(self, config): method forward (line 1544) | def forward( class RealmForOpenQA (line 1735) | class RealmForOpenQA(RealmPreTrainedModel): method __init__ (line 1736) | def __init__(self, config, retriever=None): method searcher_beam_size (line 1753) | def searcher_beam_size(self): method block_embedding_to (line 1758) | def block_embedding_to(self, device): method forward (line 1770) | def forward( FILE: transformers/models/realm/retrieval_realm.py function convert_tfrecord_to_np (line 33) | def convert_tfrecord_to_np(block_records_path: str, num_block_records: i... class ScaNNSearcher (line 43) | class ScaNNSearcher: method __init__ (line 46) | def __init__( method search_batched (line 67) | def search_batched(self, question_projection): class RealmRetriever (line 72) | class RealmRetriever: method __init__ (line 83) | def __init__(self, block_records, tokenizer): method __call__ (line 88) | def __call__(self, retrieved_block_ids, question_input_ids, answer_ids... method from_pretrained (line 110) | def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union... method save_pretrained (line 123) | def save_pretrained(self, save_directory): method block_has_answer (line 129) | def block_has_answer(self, concat_inputs, answer_ids): FILE: transformers/models/realm/tokenization_realm.py function load_vocab (line 75) | def load_vocab(vocab_file): function whitespace_tokenize (line 86) | def whitespace_tokenize(text): class RealmTokenizer (line 95) | class RealmTokenizer(PreTrainedTokenizer): method __init__ (line 145) | def __init__( method do_lower_case (line 192) | def do_lower_case(self): method vocab_size (line 196) | def vocab_size(self): method get_vocab (line 199) | def get_vocab(self): method _tokenize (line 202) | def _tokenize(self, text): method _convert_token_to_id (line 215) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 219) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 223) | def convert_tokens_to_string(self, tokens): method batch_encode_candidates (line 228) | def batch_encode_candidates(self, text, **kwargs): method build_inputs_with_special_tokens (line 301) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 326) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 354) | def create_token_type_ids_from_sequences( method save_vocabulary (line 383) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 404) | class BasicTokenizer(object): method __init__ (line 424) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 432) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 469) | def _run_strip_accents(self, text): method _run_split_on_punc (line 480) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 502) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 515) | def _is_chinese_char(self, cp): method _clean_text (line 539) | def _clean_text(self, text): class WordpieceTokenizer (line 553) | class WordpieceTokenizer(object): method __init__ (line 556) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 561) | def tokenize(self, text): FILE: transformers/models/realm/tokenization_realm_fast.py class RealmTokenizerFast (line 102) | class RealmTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 151) | def __init__( method batch_encode_candidates (line 193) | def batch_encode_candidates(self, text, **kwargs): method build_inputs_with_special_tokens (line 266) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 290) | def create_token_type_ids_from_sequences( method save_vocabulary (line 319) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/reformer/configuration_reformer.py class ReformerConfig (line 32) | class ReformerConfig(PretrainedConfig): method __init__ (line 165) | def __init__( FILE: transformers/models/reformer/convert_reformer_trax_checkpoint_to_pytorch.py function set_param (line 32) | def set_param(torch_layer, weight, bias=None): function set_layer_weights_in_torch_lsh (line 41) | def set_layer_weights_in_torch_lsh(weights, torch_layer, hidden_size): function set_layer_weights_in_torch_local (line 61) | def set_layer_weights_in_torch_local(weights, torch_layer, hidden_size): function set_block_weights_in_torch (line 86) | def set_block_weights_in_torch(weights, torch_block, hidden_size): function set_model_weights_in_torch (line 139) | def set_model_weights_in_torch(weights, torch_model, hidden_size): function convert_trax_checkpoint_to_pytorch (line 186) | def convert_trax_checkpoint_to_pytorch(trax_model_pkl_path, config_file,... FILE: transformers/models/reformer/modeling_reformer.py function _stable_argsort (line 74) | def _stable_argsort(vector, dim): function _get_least_common_mult_chunk_len (line 83) | def _get_least_common_mult_chunk_len(config): function _get_min_chunk_len (line 99) | def _get_min_chunk_len(config): class AxialPositionEmbeddings (line 115) | class AxialPositionEmbeddings(nn.Module): method __init__ (line 120) | def __init__(self, config): method forward (line 145) | def forward(self, position_ids): class PositionEmbeddings (line 211) | class PositionEmbeddings(nn.Module): method __init__ (line 214) | def __init__(self, config): method forward (line 219) | def forward(self, position_ids): class ReformerEmbeddings (line 225) | class ReformerEmbeddings(nn.Module): method __init__ (line 228) | def __init__(self, config): method forward (line 238) | def forward(self, input_ids=None, position_ids=None, inputs_embeds=Non... class EfficientAttentionMixin (line 271) | class EfficientAttentionMixin: method _look_adjacent (line 276) | def _look_adjacent(self, vectors, num_chunks_before, num_chunks_after): method _split_hidden_size_dim (line 299) | def _split_hidden_size_dim(self, x, num_attn_heads, attn_head_size): method _merge_hidden_size_dims (line 307) | def _merge_hidden_size_dims(self, x, num_attn_heads, attn_head_size): method _split_seq_length_dim_to (line 314) | def _split_seq_length_dim_to(self, vectors, dim_factor_1, dim_factor_2... class LSHSelfAttention (line 329) | class LSHSelfAttention(nn.Module, EfficientAttentionMixin): method __init__ (line 330) | def __init__(self, config): method forward (line 360) | def forward( method _query_per_attn_head (line 597) | def _query_per_attn_head(self, hidden_states): method _value_per_attn_head (line 605) | def _value_per_attn_head(self, hidden_states): method _hash_vectors (line 613) | def _hash_vectors(self, vectors, num_hashes, attention_mask, increase_... method _get_sorted_bucket_idx_and_undo_sorted_bucket_idx (line 687) | def _get_sorted_bucket_idx_and_undo_sorted_bucket_idx(self, sequence_l... method _set_num_buckets (line 706) | def _set_num_buckets(self, sequence_length): method _attend (line 726) | def _attend( method _compute_attn_mask (line 838) | def _compute_attn_mask( method _get_relevant_hid_states_and_buckets (line 866) | def _get_relevant_hid_states_and_buckets( method _expand_to_indices_in_relevant_chunk (line 952) | def _expand_to_indices_in_relevant_chunk(self, indices, sequence_length): method _len_and_dim_norm (line 972) | def _len_and_dim_norm(self, vectors, sqrt_num): method _len_norm (line 980) | def _len_norm(self, x, epsilon=1e-6): method _gather_by_expansion (line 988) | def _gather_by_expansion(self, vectors, idxs, num_hashes): class ReverseSort (line 997) | class ReverseSort(Function): method forward (line 1004) | def forward(ctx, out_vectors, logits, sorted_bucket_idx, undo_sorted_b... method backward (line 1016) | def backward(ctx, grad_out_vectors, grad_logits): class LocalSelfAttention (line 1029) | class LocalSelfAttention(nn.Module, EfficientAttentionMixin): method __init__ (line 1030) | def __init__(self, config): method forward (line 1055) | def forward( method _compute_attn_mask (line 1222) | def _compute_attn_mask( method _retrieve_relevant_hidden_states (line 1248) | def _retrieve_relevant_hidden_states(previous_hidden_states, chunk_len... class ReformerSelfOutput (line 1253) | class ReformerSelfOutput(nn.Module): method __init__ (line 1254) | def __init__(self, config): method forward (line 1261) | def forward(self, hidden_states): class ReformerAttention (line 1267) | class ReformerAttention(nn.Module): method __init__ (line 1268) | def __init__(self, config, layer_id=0): method forward (line 1292) | def forward( class ReformerFeedForwardDense (line 1359) | class ReformerFeedForwardDense(nn.Module): method __init__ (line 1360) | def __init__(self, config): method forward (line 1371) | def forward(self, hidden_states): class ReformerFeedForwardOutput (line 1378) | class ReformerFeedForwardOutput(nn.Module): method __init__ (line 1379) | def __init__(self, config): method forward (line 1385) | def forward(self, hidden_states): class ChunkReformerFeedForward (line 1391) | class ChunkReformerFeedForward(nn.Module): method __init__ (line 1392) | def __init__(self, config): method forward (line 1401) | def forward(self, attention_output): method forward_chunk (line 1409) | def forward_chunk(self, hidden_states): class ReformerLayer (line 1415) | class ReformerLayer(nn.Module): method __init__ (line 1416) | def __init__(self, config, layer_id=0): method _init_attention_seed (line 1426) | def _init_attention_seed(self): method _init_feed_forward_seed (line 1444) | def _init_feed_forward_seed(self): method forward (line 1461) | def forward( method backward_pass (line 1514) | def backward_pass( class _ReversibleFunction (line 1583) | class _ReversibleFunction(Function): method forward (line 1591) | def forward( method backward (line 1649) | def backward(ctx, grad_hidden_states): class ReformerEncoder (line 1695) | class ReformerEncoder(nn.Module): method __init__ (line 1696) | def __init__(self, config): method forward (line 1705) | def forward( class ReformerOnlyLMHead (line 1756) | class ReformerOnlyLMHead(nn.Module): method __init__ (line 1757) | def __init__(self, config): method forward (line 1767) | def forward(self, hidden_states): method forward_chunk (line 1770) | def forward_chunk(self, hidden_states): method _tie_weights (line 1774) | def _tie_weights(self): class ReformerPreTrainedModel (line 1779) | class ReformerPreTrainedModel(PreTrainedModel): method dummy_inputs (line 1789) | def dummy_inputs(self): method _init_weights (line 1798) | def _init_weights(self, module): class ReformerModelOutput (line 1819) | class ReformerModelOutput(ModelOutput): class ReformerModelWithLMHeadOutput (line 1856) | class ReformerModelWithLMHeadOutput(ModelOutput): class ReformerModel (line 1976) | class ReformerModel(ReformerPreTrainedModel): method __init__ (line 1977) | def __init__(self, config): method get_input_embeddings (line 1990) | def get_input_embeddings(self): method set_input_embeddings (line 1993) | def set_input_embeddings(self, value): method _prune_heads (line 1996) | def _prune_heads(self, heads_to_prune): method forward (line 2010) | def forward( method _pad_to_mult_of_chunk_length (line 2130) | def _pad_to_mult_of_chunk_length( class ReformerModelWithLMHead (line 2187) | class ReformerModelWithLMHead(ReformerPreTrainedModel): method __init__ (line 2190) | def __init__(self, config): method get_output_embeddings (line 2208) | def get_output_embeddings(self): method set_output_embeddings (line 2211) | def set_output_embeddings(self, new_embeddings): method forward (line 2220) | def forward( method prepare_inputs_for_generation (line 2281) | def prepare_inputs_for_generation( method _reorder_cache (line 2297) | def _reorder_cache(self, past_key_values, beam_idx): class ReformerForMaskedLM (line 2313) | class ReformerForMaskedLM(ReformerPreTrainedModel): method __init__ (line 2314) | def __init__(self, config): method get_output_embeddings (line 2326) | def get_output_embeddings(self): method set_output_embeddings (line 2329) | def set_output_embeddings(self, new_embeddings): method forward (line 2334) | def forward( class ReformerForSequenceClassification (line 2441) | class ReformerForSequenceClassification(ReformerPreTrainedModel): method __init__ (line 2442) | def __init__(self, config): method forward (line 2457) | def forward( class ReformerClassificationHead (line 2559) | class ReformerClassificationHead(nn.Module): method __init__ (line 2562) | def __init__(self, config): method forward (line 2571) | def forward(self, hidden_states, **kwargs): class ReformerForQuestionAnswering (line 2588) | class ReformerForQuestionAnswering(ReformerPreTrainedModel): method __init__ (line 2589) | def __init__(self, config): method forward (line 2606) | def forward( FILE: transformers/models/reformer/tokenization_reformer.py class ReformerTokenizer (line 48) | class ReformerTokenizer(PreTrainedTokenizer): method __init__ (line 98) | def __init__( method vocab_size (line 122) | def vocab_size(self): method get_vocab (line 125) | def get_vocab(self) -> Dict[str, int]: method __getstate__ (line 130) | def __getstate__(self): method __setstate__ (line 135) | def __setstate__(self, d): method _tokenize (line 145) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 149) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 153) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 159) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 173) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/reformer/tokenization_reformer_fast.py class ReformerTokenizerFast (line 57) | class ReformerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 94) | def __init__( method save_vocabulary (line 115) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/regnet/configuration_regnet.py class RegNetConfig (line 28) | class RegNetConfig(PretrainedConfig): method __init__ (line 72) | def __init__( FILE: transformers/models/regnet/convert_regnet_seer_10b_to_pytorch.py class Tracker (line 47) | class Tracker: method _forward_hook (line 53) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor, name: str): method __call__ (line 59) | def __call__(self, x: Tensor): method parametrized (line 67) | def parametrized(self): class FakeRegNetVisslWrapper (line 72) | class FakeRegNetVisslWrapper(nn.Module): method __init__ (line 77) | def __init__(self, model: nn.Module): method forward (line 91) | def forward(self, x: Tensor): class FakeRegNetParams (line 99) | class FakeRegNetParams(RegNetParams): method get_expanded_params (line 105) | def get_expanded_params(self): function get_from_to_our_keys (line 109) | def get_from_to_our_keys(model_name: str) -> Dict[str, str]: function convert_weights_and_push (line 162) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: transformers/models/regnet/convert_regnet_to_pytorch.py class Tracker (line 42) | class Tracker: method _forward_hook (line 47) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 52) | def __call__(self, x: Tensor): method parametrized (line 60) | def parametrized(self): class ModuleTransfer (line 66) | class ModuleTransfer: method __call__ (line 74) | def __call__(self, x: Tensor): class FakeRegNetVisslWrapper (line 97) | class FakeRegNetVisslWrapper(nn.Module): method __init__ (line 102) | def __init__(self, model: nn.Module): method forward (line 116) | def forward(self, x: Tensor): class NameToFromModelFuncMap (line 124) | class NameToFromModelFuncMap(dict): method convert_name_to_timm (line 129) | def convert_name_to_timm(self, x: str) -> str: method __getitem__ (line 133) | def __getitem__(self, x: str) -> Callable[[], Tuple[nn.Module, Dict]]: class NameToOurModelFuncMap (line 145) | class NameToOurModelFuncMap(dict): method __getitem__ (line 150) | def __getitem__(self, x: str) -> Callable[[], nn.Module]: function manually_copy_vissl_head (line 158) | def manually_copy_vissl_head(from_state_dict, to_state_dict, keys: List[... function convert_weight_and_push (line 165) | def convert_weight_and_push( function convert_weights_and_push (line 222) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: transformers/models/regnet/modeling_flax_regnet.py class Identity (line 94) | class Identity(nn.Module): method __call__ (line 98) | def __call__(self, x, **kwargs): class FlaxRegNetConvLayer (line 102) | class FlaxRegNetConvLayer(nn.Module): method setup (line 110) | def setup(self): method __call__ (line 124) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetEmbeddings (line 131) | class FlaxRegNetEmbeddings(nn.Module): method setup (line 135) | def setup(self): method __call__ (line 144) | def __call__(self, pixel_values: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetShortCut (line 155) | class FlaxRegNetShortCut(nn.Module): method setup (line 165) | def setup(self): method __call__ (line 176) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxRegNetSELayerCollection (line 182) | class FlaxRegNetSELayerCollection(nn.Module): method setup (line 187) | def setup(self): method __call__ (line 203) | def __call__(self, hidden_state: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetSELayer (line 212) | class FlaxRegNetSELayer(nn.Module): method setup (line 221) | def setup(self): method __call__ (line 225) | def __call__(self, hidden_state: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetXLayerCollection (line 236) | class FlaxRegNetXLayerCollection(nn.Module): method setup (line 242) | def setup(self): method __call__ (line 270) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetXLayer (line 276) | class FlaxRegNetXLayer(nn.Module): method setup (line 287) | def setup(self): method __call__ (line 307) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetYLayerCollection (line 316) | class FlaxRegNetYLayerCollection(nn.Module): method setup (line 323) | def setup(self): method __call__ (line 357) | def __call__(self, hidden_state: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetYLayer (line 363) | class FlaxRegNetYLayer(nn.Module): method setup (line 374) | def setup(self): method __call__ (line 395) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxRegNetStageLayersCollection (line 404) | class FlaxRegNetStageLayersCollection(nn.Module): method setup (line 416) | def setup(self): method __call__ (line 444) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxRegNetStage (line 452) | class FlaxRegNetStage(nn.Module): method setup (line 464) | def setup(self): method __call__ (line 474) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxRegNetStageCollection (line 479) | class FlaxRegNetStageCollection(nn.Module): method setup (line 483) | def setup(self): method __call__ (line 504) | def __call__( class FlaxRegNetEncoder (line 522) | class FlaxRegNetEncoder(nn.Module): method setup (line 526) | def setup(self): method __call__ (line 529) | def __call__( class FlaxRegNetPreTrainedModel (line 553) | class FlaxRegNetPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 564) | def __init__( method init_weights (line 578) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 597) | def __call__( class FlaxRegNetModule (line 630) | class FlaxRegNetModule(nn.Module): method setup (line 634) | def setup(self): method __call__ (line 644) | def __call__( class FlaxRegNetModel (line 689) | class FlaxRegNetModel(FlaxRegNetPreTrainedModel): class FlaxRegNetClassifierCollection (line 724) | class FlaxRegNetClassifierCollection(nn.Module): method setup (line 728) | def setup(self): method __call__ (line 731) | def __call__(self, x: jnp.ndarray) -> jnp.ndarray: class FlaxRegNetForImageClassificationModule (line 736) | class FlaxRegNetForImageClassificationModule(nn.Module): method setup (line 740) | def setup(self): method __call__ (line 748) | def __call__( class FlaxRegNetForImageClassification (line 782) | class FlaxRegNetForImageClassification(FlaxRegNetPreTrainedModel): FILE: transformers/models/regnet/modeling_regnet.py class RegNetConvLayer (line 55) | class RegNetConvLayer(nn.Module): method __init__ (line 56) | def __init__( method forward (line 78) | def forward(self, hidden_state): class RegNetEmbeddings (line 85) | class RegNetEmbeddings(nn.Module): method __init__ (line 90) | def __init__(self, config: RegNetConfig): method forward (line 97) | def forward(self, pixel_values): class RegNetShortCut (line 108) | class RegNetShortCut(nn.Module): method __init__ (line 114) | def __init__(self, in_channels: int, out_channels: int, stride: int = 2): method forward (line 119) | def forward(self, input: Tensor) -> Tensor: class RegNetSELayer (line 125) | class RegNetSELayer(nn.Module): method __init__ (line 130) | def __init__(self, in_channels: int, reduced_channels: int): method forward (line 141) | def forward(self, hidden_state): class RegNetXLayer (line 149) | class RegNetXLayer(nn.Module): method __init__ (line 154) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method forward (line 168) | def forward(self, hidden_state): class RegNetYLayer (line 177) | class RegNetYLayer(nn.Module): method __init__ (line 182) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method forward (line 197) | def forward(self, hidden_state): class RegNetStage (line 206) | class RegNetStage(nn.Module): method __init__ (line 211) | def __init__( method forward (line 234) | def forward(self, hidden_state): class RegNetEncoder (line 239) | class RegNetEncoder(nn.Module): method __init__ (line 240) | def __init__(self, config: RegNetConfig): method forward (line 257) | def forward( class RegNetPreTrainedModel (line 277) | class RegNetPreTrainedModel(PreTrainedModel): method _init_weights (line 289) | def _init_weights(self, module): method _set_gradient_checkpointing (line 296) | def _set_gradient_checkpointing(self, module, value=False): class RegNetModel (line 331) | class RegNetModel(RegNetPreTrainedModel): method __init__ (line 332) | def __init__(self, config): method forward (line 349) | def forward( class RegNetForImageClassification (line 385) | class RegNetForImageClassification(RegNetPreTrainedModel): method __init__ (line 386) | def __init__(self, config): method forward (line 405) | def forward( FILE: transformers/models/regnet/modeling_tf_regnet.py class TFRegNetConvLayer (line 53) | class TFRegNetConvLayer(tf.keras.layers.Layer): method __init__ (line 54) | def __init__( method call (line 79) | def call(self, hidden_state): class TFRegNetEmbeddings (line 86) | class TFRegNetEmbeddings(tf.keras.layers.Layer): method __init__ (line 91) | def __init__(self, config: RegNetConfig, **kwargs): method call (line 102) | def call(self, pixel_values): class TFRegNetShortCut (line 117) | class TFRegNetShortCut(tf.keras.layers.Layer): method __init__ (line 123) | def __init__(self, out_channels: int, stride: int = 2, **kwargs): method call (line 130) | def call(self, inputs: tf.Tensor, training: bool = False) -> tf.Tensor: class TFRegNetSELayer (line 134) | class TFRegNetSELayer(tf.keras.layers.Layer): method __init__ (line 139) | def __init__(self, in_channels: int, reduced_channels: int, **kwargs): method call (line 147) | def call(self, hidden_state): class TFRegNetXLayer (line 156) | class TFRegNetXLayer(tf.keras.layers.Layer): method __init__ (line 161) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method call (line 180) | def call(self, hidden_state): class TFRegNetYLayer (line 190) | class TFRegNetYLayer(tf.keras.layers.Layer): method __init__ (line 195) | def __init__(self, config: RegNetConfig, in_channels: int, out_channel... method call (line 214) | def call(self, hidden_state): class TFRegNetStage (line 224) | class TFRegNetStage(tf.keras.layers.Layer): method __init__ (line 229) | def __init__( method call (line 241) | def call(self, hidden_state): class TFRegNetEncoder (line 247) | class TFRegNetEncoder(tf.keras.layers.Layer): method __init__ (line 248) | def __init__(self, config: RegNetConfig, **kwargs): method call (line 266) | def call( class TFRegNetMainLayer (line 287) | class TFRegNetMainLayer(tf.keras.layers.Layer): method __init__ (line 290) | def __init__(self, config, **kwargs): method call (line 298) | def call( class TFRegNetPreTrainedModel (line 337) | class TFRegNetPreTrainedModel(TFPreTrainedModel): method input_signature (line 348) | def input_signature(self): class TFRegNetModel (line 380) | class TFRegNetModel(TFRegNetPreTrainedModel): method __init__ (line 381) | def __init__(self, config: RegNetConfig, *inputs, **kwargs): method call (line 394) | def call( class TFRegNetForImageClassification (line 429) | class TFRegNetForImageClassification(TFRegNetPreTrainedModel, TFSequence... method __init__ (line 430) | def __init__(self, config: RegNetConfig, *inputs, **kwargs): method call (line 448) | def call( FILE: transformers/models/rembert/configuration_rembert.py class RemBertConfig (line 32) | class RemBertConfig(PretrainedConfig): method __init__ (line 101) | def __init__( class RemBertOnnxConfig (line 145) | class RemBertOnnxConfig(OnnxConfig): method inputs (line 147) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 161) | def atol_for_validation(self) -> float: FILE: transformers/models/rembert/convert_rembert_tf_checkpoint_to_pytorch.py function convert_rembert_tf_checkpoint_to_pytorch (line 29) | def convert_rembert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_co... FILE: transformers/models/rembert/modeling_rembert.py function load_tf_weights_in_rembert (line 61) | def load_tf_weights_in_rembert(model, config, tf_checkpoint_path): class RemBertEmbeddings (line 144) | class RemBertEmbeddings(nn.Module): method __init__ (line 147) | def __init__(self, config): method forward (line 163) | def forward( class RemBertPooler (line 197) | class RemBertPooler(nn.Module): method __init__ (line 198) | def __init__(self, config): method forward (line 203) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertSelfAttention (line 212) | class RemBertSelfAttention(nn.Module): method __init__ (line 213) | def __init__(self, config): method transpose_for_scores (line 233) | def transpose_for_scores(self, x): method forward (line 238) | def forward( class RemBertSelfOutput (line 318) | class RemBertSelfOutput(nn.Module): method __init__ (line 319) | def __init__(self, config): method forward (line 325) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RemBertAttention (line 332) | class RemBertAttention(nn.Module): method __init__ (line 333) | def __init__(self, config): method prune_heads (line 340) | def prune_heads(self, heads): method forward (line 359) | def forward( class RemBertIntermediate (line 384) | class RemBertIntermediate(nn.Module): method __init__ (line 385) | def __init__(self, config): method forward (line 393) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertOutput (line 400) | class RemBertOutput(nn.Module): method __init__ (line 401) | def __init__(self, config): method forward (line 407) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RemBertLayer (line 414) | class RemBertLayer(nn.Module): method __init__ (line 415) | def __init__(self, config): method forward (line 430) | def forward( method feed_forward_chunk (line 496) | def feed_forward_chunk(self, attention_output): class RemBertEncoder (line 502) | class RemBertEncoder(nn.Module): method __init__ (line 503) | def __init__(self, config): method forward (line 511) | def forward( class RemBertPredictionHeadTransform (line 603) | class RemBertPredictionHeadTransform(nn.Module): method __init__ (line 604) | def __init__(self, config): method forward (line 613) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertLMPredictionHead (line 620) | class RemBertLMPredictionHead(nn.Module): method __init__ (line 621) | def __init__(self, config): method forward (line 628) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RemBertOnlyMLMHead (line 637) | class RemBertOnlyMLMHead(nn.Module): method __init__ (line 638) | def __init__(self, config): method forward (line 642) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RemBertPreTrainedModel (line 647) | class RemBertPreTrainedModel(PreTrainedModel): method _init_weights (line 659) | def _init_weights(self, module): method _set_gradient_checkpointing (line 675) | def _set_gradient_checkpointing(self, module, value=False): class RemBertModel (line 745) | class RemBertModel(RemBertPreTrainedModel): method __init__ (line 758) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 770) | def get_input_embeddings(self): method set_input_embeddings (line 773) | def set_input_embeddings(self, value): method _prune_heads (line 776) | def _prune_heads(self, heads_to_prune): method forward (line 790) | def forward( class RemBertForMaskedLM (line 914) | class RemBertForMaskedLM(RemBertPreTrainedModel): method __init__ (line 915) | def __init__(self, config): method get_output_embeddings (line 930) | def get_output_embeddings(self): method set_output_embeddings (line 933) | def set_output_embeddings(self, new_embeddings): method forward (line 942) | def forward( method prepare_inputs_for_generation (line 998) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class RemBertForCausalLM (line 1016) | class RemBertForCausalLM(RemBertPreTrainedModel): method __init__ (line 1019) | def __init__(self, config): method get_output_embeddings (line 1031) | def get_output_embeddings(self): method set_output_embeddings (line 1034) | def set_output_embeddings(self, new_embeddings): method forward (line 1039) | def forward( method prepare_inputs_for_generation (line 1139) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1152) | def _reorder_cache(self, past_key_values, beam_idx): class RemBertForSequenceClassification (line 1168) | class RemBertForSequenceClassification(RemBertPreTrainedModel): method __init__ (line 1169) | def __init__(self, config): method forward (line 1185) | def forward( class RemBertForMultipleChoice (line 1264) | class RemBertForMultipleChoice(RemBertPreTrainedModel): method __init__ (line 1265) | def __init__(self, config): method forward (line 1281) | def forward( class RemBertForTokenClassification (line 1355) | class RemBertForTokenClassification(RemBertPreTrainedModel): method __init__ (line 1356) | def __init__(self, config): method forward (line 1373) | def forward( class RemBertForQuestionAnswering (line 1433) | class RemBertForQuestionAnswering(RemBertPreTrainedModel): method __init__ (line 1434) | def __init__(self, config): method forward (line 1451) | def forward( FILE: transformers/models/rembert/modeling_tf_rembert.py class TFRemBertEmbeddings (line 70) | class TFRemBertEmbeddings(tf.keras.layers.Layer): method __init__ (line 73) | def __init__(self, config: RemBertConfig, **kwargs): method build (line 83) | def build(self, input_shape: tf.TensorShape): method call (line 107) | def call( class TFRemBertSelfAttention (line 148) | class TFRemBertSelfAttention(tf.keras.layers.Layer): method __init__ (line 149) | def __init__(self, config: RemBertConfig, **kwargs): method transpose_for_scores (line 176) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 183) | def call( class TFRemBertSelfOutput (line 266) | class TFRemBertSelfOutput(tf.keras.layers.Layer): method __init__ (line 267) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 276) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRemBertAttention (line 285) | class TFRemBertAttention(tf.keras.layers.Layer): method __init__ (line 286) | def __init__(self, config: RemBertConfig, **kwargs): method prune_heads (line 292) | def prune_heads(self, heads): method call (line 295) | def call( class TFRemBertIntermediate (line 326) | class TFRemBertIntermediate(tf.keras.layers.Layer): method __init__ (line 327) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 339) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertOutput (line 347) | class TFRemBertOutput(tf.keras.layers.Layer): method __init__ (line 348) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 357) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRemBertLayer (line 366) | class TFRemBertLayer(tf.keras.layers.Layer): method __init__ (line 367) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 380) | def call( class TFRemBertEncoder (line 452) | class TFRemBertEncoder(tf.keras.layers.Layer): method __init__ (line 453) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 464) | def call( class TFRemBertPooler (line 529) | class TFRemBertPooler(tf.keras.layers.Layer): method __init__ (line 530) | def __init__(self, config: RemBertConfig, **kwargs): method call (line 540) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertLMPredictionHead (line 549) | class TFRemBertLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 550) | def __init__(self, config: RemBertConfig, input_embeddings: tf.keras.l... method build (line 565) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 577) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 580) | def set_output_embeddings(self, value): method get_bias (line 584) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 587) | def set_bias(self, value: tf.Variable): method call (line 591) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRemBertMLMHead (line 604) | class TFRemBertMLMHead(tf.keras.layers.Layer): method __init__ (line 605) | def __init__(self, config: RemBertConfig, input_embeddings: tf.keras.l... method call (line 610) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFRemBertMainLayer (line 617) | class TFRemBertMainLayer(tf.keras.layers.Layer): method __init__ (line 620) | def __init__(self, config: RemBertConfig, add_pooling_layer: bool = Tr... method get_input_embeddings (line 630) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 633) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 637) | def _prune_heads(self, heads_to_prune): method call (line 646) | def call( class TFRemBertPreTrainedModel (line 804) | class TFRemBertPreTrainedModel(TFPreTrainedModel): class TFRemBertModel (line 916) | class TFRemBertModel(TFRemBertPreTrainedModel): method __init__ (line 917) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 929) | def call( class TFRemBertForMaskedLM (line 987) | class TFRemBertForMaskedLM(TFRemBertPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 988) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method get_lm_head (line 1000) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1010) | def call( class TFRemBertForCausalLM (line 1061) | class TFRemBertForCausalLM(TFRemBertPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1062) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method get_lm_head (line 1071) | def get_lm_head(self) -> tf.keras.layers.Layer: method prepare_inputs_for_generation (line 1075) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1093) | def call( class TFRemBertForSequenceClassification (line 1180) | class TFRemBertForSequenceClassification(TFRemBertPreTrainedModel, TFSeq... method __init__ (line 1181) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1201) | def call( class TFRemBertForMultipleChoice (line 1257) | class TFRemBertForMultipleChoice(TFRemBertPreTrainedModel, TFMultipleCho... method __init__ (line 1258) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1274) | def call( class TFRemBertForTokenClassification (line 1353) | class TFRemBertForTokenClassification(TFRemBertPreTrainedModel, TFTokenC... method __init__ (line 1354) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1372) | def call( class TFRemBertForQuestionAnswering (line 1426) | class TFRemBertForQuestionAnswering(TFRemBertPreTrainedModel, TFQuestion... method __init__ (line 1427) | def __init__(self, config: RemBertConfig, *inputs, **kwargs): method call (line 1444) | def call( FILE: transformers/models/rembert/tokenization_rembert.py class RemBertTokenizer (line 43) | class RemBertTokenizer(PreTrainedTokenizer): method __init__ (line 99) | def __init__( method vocab_size (line 137) | def vocab_size(self): method get_vocab (line 140) | def get_vocab(self): method __getstate__ (line 145) | def __getstate__(self): method __setstate__ (line 150) | def __setstate__(self, d): method _tokenize (line 155) | def _tokenize(self, text, sample=False): method _convert_token_to_id (line 160) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 164) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 168) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 172) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 197) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 228) | def create_token_type_ids_from_sequences( method save_vocabulary (line 258) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/rembert/tokenization_rembert_fast.py class RemBertTokenizerFast (line 51) | class RemBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 103) | def __init__( method build_inputs_with_special_tokens (line 144) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 169) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 200) | def create_token_type_ids_from_sequences( method save_vocabulary (line 230) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/resnet/configuration_resnet.py class ResNetConfig (line 35) | class ResNetConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 88) | def __init__( class ResNetOnnxConfig (line 117) | class ResNetOnnxConfig(OnnxConfig): method inputs (line 121) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 129) | def atol_for_validation(self) -> float: FILE: transformers/models/resnet/convert_resnet_to_pytorch.py class Tracker (line 40) | class Tracker: method _forward_hook (line 45) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 50) | def __call__(self, x: Tensor): method parametrized (line 58) | def parametrized(self): class ModuleTransfer (line 64) | class ModuleTransfer: method __call__ (line 71) | def __call__(self, x: Tensor): function convert_weight_and_push (line 94) | def convert_weight_and_push(name: str, config: ResNetConfig, save_direct... function convert_weights_and_push (line 126) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: transformers/models/resnet/modeling_flax_resnet.py class Identity (line 88) | class Identity(nn.Module): method __call__ (line 92) | def __call__(self, x, **kwargs): class FlaxResNetConvLayer (line 96) | class FlaxResNetConvLayer(nn.Module): method setup (line 103) | def setup(self): method __call__ (line 116) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxResNetEmbeddings (line 123) | class FlaxResNetEmbeddings(nn.Module): method setup (line 131) | def setup(self): method __call__ (line 142) | def __call__(self, pixel_values: jnp.ndarray, deterministic: bool = Tr... class FlaxResNetShortCut (line 153) | class FlaxResNetShortCut(nn.Module): method setup (line 163) | def setup(self): method __call__ (line 174) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxResNetBasicLayerCollection (line 180) | class FlaxResNetBasicLayerCollection(nn.Module): method setup (line 185) | def setup(self): method __call__ (line 191) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxResNetBasicLayer (line 197) | class FlaxResNetBasicLayer(nn.Module): method setup (line 208) | def setup(self): method __call__ (line 223) | def __call__(self, hidden_state, deterministic: bool = True): class FlaxResNetBottleNeckLayerCollection (line 235) | class FlaxResNetBottleNeckLayerCollection(nn.Module): method setup (line 242) | def setup(self): method __call__ (line 251) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxResNetBottleNeckLayer (line 257) | class FlaxResNetBottleNeckLayer(nn.Module): method setup (line 271) | def setup(self): method __call__ (line 289) | def __call__(self, hidden_state: jnp.ndarray, deterministic: bool = Tr... class FlaxResNetStageLayersCollection (line 300) | class FlaxResNetStageLayersCollection(nn.Module): method setup (line 312) | def setup(self): method __call__ (line 340) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxResNetStage (line 347) | class FlaxResNetStage(nn.Module): method setup (line 359) | def setup(self): method __call__ (line 369) | def __call__(self, x: jnp.ndarray, deterministic: bool = True) -> jnp.... class FlaxResNetStageCollection (line 373) | class FlaxResNetStageCollection(nn.Module): method setup (line 377) | def setup(self): method __call__ (line 398) | def __call__( class FlaxResNetEncoder (line 415) | class FlaxResNetEncoder(nn.Module): method setup (line 419) | def setup(self): method __call__ (line 422) | def __call__( class FlaxResNetPreTrainedModel (line 445) | class FlaxResNetPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 456) | def __init__( method init_weights (line 470) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 489) | def __call__( class FlaxResNetModule (line 521) | class FlaxResNetModule(nn.Module): method setup (line 525) | def setup(self): method __call__ (line 535) | def __call__( class FlaxResNetModel (line 580) | class FlaxResNetModel(FlaxResNetPreTrainedModel): class FlaxResNetClassifierCollection (line 610) | class FlaxResNetClassifierCollection(nn.Module): method setup (line 614) | def setup(self): method __call__ (line 617) | def __call__(self, x: jnp.ndarray) -> jnp.ndarray: class FlaxResNetForImageClassificationModule (line 621) | class FlaxResNetForImageClassificationModule(nn.Module): method setup (line 625) | def setup(self): method __call__ (line 633) | def __call__( class FlaxResNetForImageClassification (line 667) | class FlaxResNetForImageClassification(FlaxResNetPreTrainedModel): FILE: transformers/models/resnet/modeling_resnet.py class ResNetConvLayer (line 62) | class ResNetConvLayer(nn.Module): method __init__ (line 63) | def __init__( method forward (line 73) | def forward(self, input: Tensor) -> Tensor: class ResNetEmbeddings (line 80) | class ResNetEmbeddings(nn.Module): method __init__ (line 85) | def __init__(self, config: ResNetConfig): method forward (line 93) | def forward(self, pixel_values: Tensor) -> Tensor: class ResNetShortCut (line 104) | class ResNetShortCut(nn.Module): method __init__ (line 110) | def __init__(self, in_channels: int, out_channels: int, stride: int = 2): method forward (line 115) | def forward(self, input: Tensor) -> Tensor: class ResNetBasicLayer (line 121) | class ResNetBasicLayer(nn.Module): method __init__ (line 126) | def __init__(self, in_channels: int, out_channels: int, stride: int = ... method forward (line 138) | def forward(self, hidden_state): class ResNetBottleNeckLayer (line 147) | class ResNetBottleNeckLayer(nn.Module): method __init__ (line 155) | def __init__( method forward (line 171) | def forward(self, hidden_state): class ResNetStage (line 180) | class ResNetStage(nn.Module): method __init__ (line 185) | def __init__( method forward (line 203) | def forward(self, input: Tensor) -> Tensor: class ResNetEncoder (line 210) | class ResNetEncoder(nn.Module): method __init__ (line 211) | def __init__(self, config: ResNetConfig): method forward (line 228) | def forward( class ResNetPreTrainedModel (line 251) | class ResNetPreTrainedModel(PreTrainedModel): method _init_weights (line 262) | def _init_weights(self, module): method _set_gradient_checkpointing (line 269) | def _set_gradient_checkpointing(self, module, value=False): class ResNetModel (line 303) | class ResNetModel(ResNetPreTrainedModel): method __init__ (line 304) | def __init__(self, config): method forward (line 321) | def forward( class ResNetForImageClassification (line 356) | class ResNetForImageClassification(ResNetPreTrainedModel): method __init__ (line 357) | def __init__(self, config): method forward (line 376) | def forward( class ResNetBackbone (line 432) | class ResNetBackbone(ResNetPreTrainedModel, BackboneMixin): method __init__ (line 433) | def __init__(self, config): method forward (line 446) | def forward( FILE: transformers/models/resnet/modeling_tf_resnet.py class TFResNetConvLayer (line 52) | class TFResNetConvLayer(tf.keras.layers.Layer): method __init__ (line 53) | def __init__( method convolution (line 65) | def convolution(self, hidden_state: tf.Tensor) -> tf.Tensor: method call (line 72) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetEmbeddings (line 79) | class TFResNetEmbeddings(tf.keras.layers.Layer): method __init__ (line 84) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 96) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFResNetShortCut (line 109) | class TFResNetShortCut(tf.keras.layers.Layer): method __init__ (line 115) | def __init__(self, out_channels: int, stride: int = 2, **kwargs) -> None: method call (line 123) | def call(self, x: tf.Tensor, training: bool = False) -> tf.Tensor: class TFResNetBasicLayer (line 130) | class TFResNetBasicLayer(tf.keras.layers.Layer): method __init__ (line 135) | def __init__( method call (line 149) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetBottleNeckLayer (line 159) | class TFResNetBottleNeckLayer(tf.keras.layers.Layer): method __init__ (line 167) | def __init__( method call (line 189) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetStage (line 200) | class TFResNetStage(tf.keras.layers.Layer): method __init__ (line 205) | def __init__( method call (line 219) | def call(self, hidden_state: tf.Tensor, training: bool = False) -> tf.... class TFResNetEncoder (line 225) | class TFResNetEncoder(tf.keras.layers.Layer): method __init__ (line 226) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 244) | def call( class TFResNetPreTrainedModel (line 268) | class TFResNetPreTrainedModel(TFPreTrainedModel): method input_signature (line 279) | def input_signature(self): class TFResNetMainLayer (line 311) | class TFResNetMainLayer(tf.keras.layers.Layer): method __init__ (line 314) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 322) | def call( class TFResNetModel (line 372) | class TFResNetModel(TFResNetPreTrainedModel): method __init__ (line 373) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method call (line 386) | def call( class TFResNetForImageClassification (line 414) | class TFResNetForImageClassification(TFResNetPreTrainedModel, TFSequence... method __init__ (line 415) | def __init__(self, config: ResNetConfig, **kwargs) -> None: method classifier (line 426) | def classifier(self, x: tf.Tensor) -> tf.Tensor: method call (line 439) | def call( FILE: transformers/models/retribert/configuration_retribert.py class RetriBertConfig (line 31) | class RetriBertConfig(PretrainedConfig): method __init__ (line 77) | def __init__( FILE: transformers/models/retribert/modeling_retribert.py class RetriBertPreTrainedModel (line 42) | class RetriBertPreTrainedModel(PreTrainedModel): method _init_weights (line 52) | def _init_weights(self, module): class RetriBertModel (line 88) | class RetriBertModel(RetriBertPreTrainedModel): method __init__ (line 89) | def __init__(self, config: RetriBertConfig) -> None: method embed_sentences_checkpointed (line 104) | def embed_sentences_checkpointed( method embed_questions (line 148) | def embed_questions( method embed_answers (line 162) | def embed_answers( method forward (line 176) | def forward( FILE: transformers/models/retribert/tokenization_retribert.py function load_vocab (line 49) | def load_vocab(vocab_file): function whitespace_tokenize (line 61) | def whitespace_tokenize(text): class RetriBertTokenizer (line 70) | class RetriBertTokenizer(PreTrainedTokenizer): method __init__ (line 120) | def __init__( method do_lower_case (line 168) | def do_lower_case(self): method vocab_size (line 173) | def vocab_size(self): method get_vocab (line 177) | def get_vocab(self): method _tokenize (line 181) | def _tokenize(self, text): method _convert_token_to_id (line 195) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 200) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 205) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 211) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 237) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 266) | def create_token_type_ids_from_sequences( method save_vocabulary (line 296) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 318) | class BasicTokenizer(object): method __init__ (line 338) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 346) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 383) | def _run_strip_accents(self, text): method _run_split_on_punc (line 394) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 416) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 429) | def _is_chinese_char(self, cp): method _clean_text (line 453) | def _clean_text(self, text): class WordpieceTokenizer (line 468) | class WordpieceTokenizer(object): method __init__ (line 471) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 476) | def tokenize(self, text): FILE: transformers/models/retribert/tokenization_retribert_fast.py class RetriBertTokenizerFast (line 54) | class RetriBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 105) | def __init__( method build_inputs_with_special_tokens (line 148) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 173) | def create_token_type_ids_from_sequences( method save_vocabulary (line 203) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/roberta/configuration_roberta.py class RobertaConfig (line 37) | class RobertaConfig(PretrainedConfig): method __init__ (line 106) | def __init__( class RobertaOnnxConfig (line 147) | class RobertaOnnxConfig(OnnxConfig): method inputs (line 149) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/roberta/convert_roberta_original_pytorch_checkpoint_to_pytorch.py function convert_roberta_checkpoint_to_pytorch (line 48) | def convert_roberta_checkpoint_to_pytorch( FILE: transformers/models/roberta/modeling_flax_roberta.py function create_position_ids_from_input_ids (line 52) | def create_position_ids_from_input_ids(input_ids, padding_idx): class FlaxRobertaEmbeddings (line 137) | class FlaxRobertaEmbeddings(nn.Module): method setup (line 143) | def setup(self): method __call__ (line 165) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxRobertaSelfAttention (line 181) | class FlaxRobertaSelfAttention(nn.Module): method setup (line 186) | def setup(self): method _split_heads (line 215) | def _split_heads(self, hidden_states): method _merge_heads (line 218) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 223) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 254) | def __call__( class FlaxRobertaSelfOutput (line 353) | class FlaxRobertaSelfOutput(nn.Module): method setup (line 357) | def setup(self): method __call__ (line 366) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRobertaAttention (line 374) | class FlaxRobertaAttention(nn.Module): method setup (line 379) | def setup(self): method __call__ (line 383) | def __call__( class FlaxRobertaIntermediate (line 417) | class FlaxRobertaIntermediate(nn.Module): method setup (line 421) | def setup(self): method __call__ (line 429) | def __call__(self, hidden_states): class FlaxRobertaOutput (line 436) | class FlaxRobertaOutput(nn.Module): method setup (line 440) | def setup(self): method __call__ (line 449) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRobertaLayer (line 457) | class FlaxRobertaLayer(nn.Module): method setup (line 461) | def setup(self): method __call__ (line 468) | def __call__( class FlaxRobertaLayerCollection (line 515) | class FlaxRobertaLayerCollection(nn.Module): method setup (line 520) | def setup(self): method __call__ (line 533) | def __call__( class FlaxRobertaEncoder (line 598) | class FlaxRobertaEncoder(nn.Module): method setup (line 603) | def setup(self): method __call__ (line 610) | def __call__( class FlaxRobertaPooler (line 638) | class FlaxRobertaPooler(nn.Module): method setup (line 642) | def setup(self): method __call__ (line 649) | def __call__(self, hidden_states): class FlaxRobertaLMHead (line 655) | class FlaxRobertaLMHead(nn.Module): method setup (line 660) | def setup(self): method __call__ (line 675) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRobertaClassificationHead (line 690) | class FlaxRobertaClassificationHead(nn.Module): method setup (line 694) | def setup(self): method __call__ (line 712) | def __call__(self, hidden_states, deterministic=True): class FlaxRobertaPreTrainedModel (line 722) | class FlaxRobertaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 733) | def __init__( method enable_gradient_checkpointing (line 747) | def enable_gradient_checkpointing(self): method init_weights (line 754) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 797) | def init_cache(self, batch_size, max_length): method __call__ (line 817) | def __call__( class FlaxRobertaModule (line 915) | class FlaxRobertaModule(nn.Module): method setup (line 921) | def setup(self): method __call__ (line 930) | def __call__( class FlaxRobertaModel (line 990) | class FlaxRobertaModel(FlaxRobertaPreTrainedModel): class FlaxRobertaForMaskedLMModule (line 997) | class FlaxRobertaForMaskedLMModule(nn.Module): method setup (line 1002) | def setup(self): method __call__ (line 1011) | def __call__( class FlaxRobertaForMaskedLM (line 1056) | class FlaxRobertaForMaskedLM(FlaxRobertaPreTrainedModel): class FlaxRobertaForSequenceClassificationModule (line 1069) | class FlaxRobertaForSequenceClassificationModule(nn.Module): method setup (line 1074) | def setup(self): method __call__ (line 1083) | def __call__( class FlaxRobertaForSequenceClassification (line 1128) | class FlaxRobertaForSequenceClassification(FlaxRobertaPreTrainedModel): class FlaxRobertaForMultipleChoiceModule (line 1141) | class FlaxRobertaForMultipleChoiceModule(nn.Module): method setup (line 1146) | def setup(self): method __call__ (line 1155) | def __call__( class FlaxRobertaForMultipleChoice (line 1209) | class FlaxRobertaForMultipleChoice(FlaxRobertaPreTrainedModel): class FlaxRobertaForTokenClassificationModule (line 1225) | class FlaxRobertaForTokenClassificationModule(nn.Module): method setup (line 1230) | def setup(self): method __call__ (line 1245) | def __call__( class FlaxRobertaForTokenClassification (line 1291) | class FlaxRobertaForTokenClassification(FlaxRobertaPreTrainedModel): class FlaxRobertaForQuestionAnsweringModule (line 1304) | class FlaxRobertaForQuestionAnsweringModule(nn.Module): method setup (line 1309) | def setup(self): method __call__ (line 1318) | def __call__( class FlaxRobertaForQuestionAnswering (line 1368) | class FlaxRobertaForQuestionAnswering(FlaxRobertaPreTrainedModel): class FlaxRobertaForCausalLMModule (line 1380) | class FlaxRobertaForCausalLMModule(nn.Module): method setup (line 1385) | def setup(self): method __call__ (line 1394) | def __call__( class FlaxRobertaForCausalLM (line 1452) | class FlaxRobertaForCausalLM(FlaxRobertaPreTrainedModel): method prepare_inputs_for_generation (line 1455) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1476) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/roberta/modeling_roberta.py class RobertaEmbeddings (line 65) | class RobertaEmbeddings(nn.Module): method __init__ (line 71) | def __init__(self, config): method forward (line 94) | def forward( method create_position_ids_from_inputs_embeds (line 134) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class RobertaSelfAttention (line 153) | class RobertaSelfAttention(nn.Module): method __init__ (line 154) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 180) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 185) | def forward( class RobertaSelfOutput (line 288) | class RobertaSelfOutput(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 295) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaAttention (line 303) | class RobertaAttention(nn.Module): method __init__ (line 304) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 310) | def prune_heads(self, heads): method forward (line 328) | def forward( class RobertaIntermediate (line 353) | class RobertaIntermediate(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaOutput (line 369) | class RobertaOutput(nn.Module): method __init__ (line 370) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaLayer (line 384) | class RobertaLayer(nn.Module): method __init__ (line 385) | def __init__(self, config): method forward (line 399) | def forward( method feed_forward_chunk (line 464) | def feed_forward_chunk(self, attention_output): class RobertaEncoder (line 471) | class RobertaEncoder(nn.Module): method __init__ (line 472) | def __init__(self, config): method forward (line 478) | def forward( class RobertaPooler (line 570) | class RobertaPooler(nn.Module): method __init__ (line 571) | def __init__(self, config): method forward (line 576) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreTrainedModel (line 585) | class RobertaPreTrainedModel(PreTrainedModel): method _init_weights (line 597) | def _init_weights(self, module): method _set_gradient_checkpointing (line 613) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 617) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class RobertaModel (line 698) | class RobertaModel(RobertaPreTrainedModel): method __init__ (line 717) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 729) | def get_input_embeddings(self): method set_input_embeddings (line 732) | def set_input_embeddings(self, value): method _prune_heads (line 735) | def _prune_heads(self, heads_to_prune): method forward (line 750) | def forward( class RobertaForCausalLM (line 883) | class RobertaForCausalLM(RobertaPreTrainedModel): method __init__ (line 888) | def __init__(self, config): method get_output_embeddings (line 903) | def get_output_embeddings(self): method set_output_embeddings (line 906) | def set_output_embeddings(self, new_embeddings): method forward (line 911) | def forward( method prepare_inputs_for_generation (line 1017) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1029) | def _reorder_cache(self, past_key_values, beam_idx): class RobertaForMaskedLM (line 1037) | class RobertaForMaskedLM(RobertaPreTrainedModel): method __init__ (line 1042) | def __init__(self, config): method get_output_embeddings (line 1060) | def get_output_embeddings(self): method set_output_embeddings (line 1063) | def set_output_embeddings(self, new_embeddings): method forward (line 1075) | def forward( class RobertaLMHead (line 1135) | class RobertaLMHead(nn.Module): method __init__ (line 1138) | def __init__(self, config): method forward (line 1147) | def forward(self, features, **kwargs): method _tie_weights (line 1157) | def _tie_weights(self): class RobertaForSequenceClassification (line 1173) | class RobertaForSequenceClassification(RobertaPreTrainedModel): method __init__ (line 1176) | def __init__(self, config): method forward (line 1195) | def forward( class RobertaForMultipleChoice (line 1274) | class RobertaForMultipleChoice(RobertaPreTrainedModel): method __init__ (line 1277) | def __init__(self, config): method forward (line 1293) | def forward( class RobertaForTokenClassification (line 1368) | class RobertaForTokenClassification(RobertaPreTrainedModel): method __init__ (line 1372) | def __init__(self, config): method forward (line 1394) | def forward( class RobertaClassificationHead (line 1449) | class RobertaClassificationHead(nn.Module): method __init__ (line 1452) | def __init__(self, config): method forward (line 1461) | def forward(self, features, **kwargs): class RobertaForQuestionAnswering (line 1478) | class RobertaForQuestionAnswering(RobertaPreTrainedModel): method __init__ (line 1482) | def __init__(self, config): method forward (line 1500) | def forward( function create_position_ids_from_input_ids (line 1575) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/roberta/modeling_tf_roberta.py class TFRobertaEmbeddings (line 76) | class TFRobertaEmbeddings(tf.keras.layers.Layer): method __init__ (line 81) | def __init__(self, config, **kwargs): method build (line 92) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 116) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 130) | def call( class TFRobertaPooler (line 177) | class TFRobertaPooler(tf.keras.layers.Layer): method __init__ (line 178) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 188) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRobertaSelfAttention (line 198) | class TFRobertaSelfAttention(tf.keras.layers.Layer): method __init__ (line 199) | def __init__(self, config: RobertaConfig, **kwargs): method transpose_for_scores (line 226) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 233) | def call( class TFRobertaSelfOutput (line 316) | class TFRobertaSelfOutput(tf.keras.layers.Layer): method __init__ (line 317) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 326) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRobertaAttention (line 335) | class TFRobertaAttention(tf.keras.layers.Layer): method __init__ (line 336) | def __init__(self, config: RobertaConfig, **kwargs): method prune_heads (line 342) | def prune_heads(self, heads): method call (line 345) | def call( class TFRobertaIntermediate (line 376) | class TFRobertaIntermediate(tf.keras.layers.Layer): method __init__ (line 377) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 389) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRobertaOutput (line 397) | class TFRobertaOutput(tf.keras.layers.Layer): method __init__ (line 398) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 407) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRobertaLayer (line 416) | class TFRobertaLayer(tf.keras.layers.Layer): method __init__ (line 417) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 430) | def call( class TFRobertaEncoder (line 503) | class TFRobertaEncoder(tf.keras.layers.Layer): method __init__ (line 504) | def __init__(self, config: RobertaConfig, **kwargs): method call (line 509) | def call( class TFRobertaMainLayer (line 573) | class TFRobertaMainLayer(tf.keras.layers.Layer): method __init__ (line 576) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 593) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 597) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 602) | def _prune_heads(self, heads_to_prune): method call (line 611) | def call( class TFRobertaPreTrainedModel (line 769) | class TFRobertaPreTrainedModel(TFPreTrainedModel): class TFRobertaModel (line 881) | class TFRobertaModel(TFRobertaPreTrainedModel): method __init__ (line 882) | def __init__(self, config, *inputs, **kwargs): method call (line 893) | def call( class TFRobertaLMHead (line 950) | class TFRobertaLMHead(tf.keras.layers.Layer): method __init__ (line 953) | def __init__(self, config, input_embeddings, **kwargs): method build (line 968) | def build(self, input_shape): method get_output_embeddings (line 973) | def get_output_embeddings(self): method set_output_embeddings (line 976) | def set_output_embeddings(self, value): method get_bias (line 980) | def get_bias(self): method set_bias (line 983) | def set_bias(self, value): method call (line 987) | def call(self, hidden_states): class TFRobertaForMaskedLM (line 1003) | class TFRobertaForMaskedLM(TFRobertaPreTrainedModel, TFMaskedLanguageMod... method __init__ (line 1007) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1013) | def get_lm_head(self): method get_prefix_bias_name (line 1016) | def get_prefix_bias_name(self): method call (line 1030) | def call( class TFRobertaForCausalLM (line 1080) | class TFRobertaForCausalLM(TFRobertaPreTrainedModel, TFCausalLanguageMod... method __init__ (line 1084) | def __init__(self, config: RobertaConfig, *inputs, **kwargs): method get_lm_head (line 1093) | def get_lm_head(self): method get_prefix_bias_name (line 1096) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1101) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1120) | def call( class TFRobertaClassificationHead (line 1202) | class TFRobertaClassificationHead(tf.keras.layers.Layer): method __init__ (line 1205) | def __init__(self, config, **kwargs): method call (line 1221) | def call(self, features, training=False): class TFRobertaForSequenceClassification (line 1237) | class TFRobertaForSequenceClassification(TFRobertaPreTrainedModel, TFSeq... method __init__ (line 1241) | def __init__(self, config, *inputs, **kwargs): method call (line 1257) | def call( class TFRobertaForMultipleChoice (line 1313) | class TFRobertaForMultipleChoice(TFRobertaPreTrainedModel, TFMultipleCho... method __init__ (line 1318) | def __init__(self, config, *inputs, **kwargs): method call (line 1334) | def call( class TFRobertaForTokenClassification (line 1403) | class TFRobertaForTokenClassification(TFRobertaPreTrainedModel, TFTokenC... method __init__ (line 1408) | def __init__(self, config, *inputs, **kwargs): method call (line 1430) | def call( class TFRobertaForQuestionAnswering (line 1486) | class TFRobertaForQuestionAnswering(TFRobertaPreTrainedModel, TFQuestion... method __init__ (line 1490) | def __init__(self, config, *inputs, **kwargs): method call (line 1508) | def call( FILE: transformers/models/roberta/tokenization_roberta.py function bytes_to_unicode (line 69) | def bytes_to_unicode(): function get_pairs (line 93) | def get_pairs(word): class RobertaTokenizer (line 107) | class RobertaTokenizer(PreTrainedTokenizer): method __init__ (line 190) | def __init__( method vocab_size (line 245) | def vocab_size(self): method get_vocab (line 248) | def get_vocab(self): method bpe (line 251) | def bpe(self, token): method _tokenize (line 293) | def _tokenize(self, text): method _convert_token_to_id (line 303) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 307) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 311) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 317) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 346) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 371) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 398) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 421) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... FILE: transformers/models/roberta/tokenization_roberta_fast.py class RobertaTokenizerFast (line 76) | class RobertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 163) | def __init__( method mask_token (line 232) | def mask_token(self) -> str: method mask_token (line 247) | def mask_token(self, value): method _batch_encode_plus (line 258) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 267) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method save_vocabulary (line 277) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 281) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 288) | def create_token_type_ids_from_sequences( FILE: transformers/models/roberta_prelayernorm/configuration_roberta_prelayernorm.py class RobertaPreLayerNormConfig (line 35) | class RobertaPreLayerNormConfig(PretrainedConfig): method __init__ (line 107) | def __init__( class RobertaPreLayerNormOnnxConfig (line 149) | class RobertaPreLayerNormOnnxConfig(OnnxConfig): method inputs (line 151) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/roberta_prelayernorm/convert_roberta_prelayernorm_original_pytorch_checkpoint_to_pytorch.py function convert_roberta_prelayernorm_checkpoint_to_pytorch (line 31) | def convert_roberta_prelayernorm_checkpoint_to_pytorch(checkpoint_repo: ... FILE: transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py function create_position_ids_from_input_ids (line 54) | def create_position_ids_from_input_ids(input_ids, padding_idx): class FlaxRobertaPreLayerNormEmbeddings (line 139) | class FlaxRobertaPreLayerNormEmbeddings(nn.Module): method setup (line 145) | def setup(self): method __call__ (line 167) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxRobertaPreLayerNormSelfAttention (line 183) | class FlaxRobertaPreLayerNormSelfAttention(nn.Module): method setup (line 188) | def setup(self): method _split_heads (line 217) | def _split_heads(self, hidden_states): method _merge_heads (line 220) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 225) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 256) | def __call__( class FlaxRobertaPreLayerNormSelfOutput (line 354) | class FlaxRobertaPreLayerNormSelfOutput(nn.Module): method setup (line 358) | def setup(self): method __call__ (line 366) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRobertaPreLayerNormAttention (line 373) | class FlaxRobertaPreLayerNormAttention(nn.Module): method setup (line 378) | def setup(self): method __call__ (line 383) | def __call__( class FlaxRobertaPreLayerNormIntermediate (line 417) | class FlaxRobertaPreLayerNormIntermediate(nn.Module): method setup (line 421) | def setup(self): method __call__ (line 430) | def __call__(self, hidden_states): class FlaxRobertaPreLayerNormOutput (line 437) | class FlaxRobertaPreLayerNormOutput(nn.Module): method setup (line 441) | def setup(self): method __call__ (line 449) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRobertaPreLayerNormLayer (line 457) | class FlaxRobertaPreLayerNormLayer(nn.Module): method setup (line 461) | def setup(self): method __call__ (line 468) | def __call__( class FlaxRobertaPreLayerNormLayerCollection (line 515) | class FlaxRobertaPreLayerNormLayerCollection(nn.Module): method setup (line 520) | def setup(self): method __call__ (line 533) | def __call__( class FlaxRobertaPreLayerNormEncoder (line 598) | class FlaxRobertaPreLayerNormEncoder(nn.Module): method setup (line 603) | def setup(self): method __call__ (line 610) | def __call__( class FlaxRobertaPreLayerNormPooler (line 638) | class FlaxRobertaPreLayerNormPooler(nn.Module): method setup (line 642) | def setup(self): method __call__ (line 649) | def __call__(self, hidden_states): class FlaxRobertaPreLayerNormLMHead (line 656) | class FlaxRobertaPreLayerNormLMHead(nn.Module): method setup (line 661) | def setup(self): method __call__ (line 676) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRobertaPreLayerNormClassificationHead (line 692) | class FlaxRobertaPreLayerNormClassificationHead(nn.Module): method setup (line 696) | def setup(self): method __call__ (line 714) | def __call__(self, hidden_states, deterministic=True): class FlaxRobertaPreLayerNormPreTrainedModel (line 725) | class FlaxRobertaPreLayerNormPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 736) | def __init__( method enable_gradient_checkpointing (line 750) | def enable_gradient_checkpointing(self): method init_weights (line 757) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 800) | def init_cache(self, batch_size, max_length): method __call__ (line 820) | def __call__( class FlaxRobertaPreLayerNormModule (line 917) | class FlaxRobertaPreLayerNormModule(nn.Module): method setup (line 923) | def setup(self): method __call__ (line 933) | def __call__( class FlaxRobertaPreLayerNormModel (line 995) | class FlaxRobertaPreLayerNormModel(FlaxRobertaPreLayerNormPreTrainedModel): class FlaxRobertaPreLayerNormForMaskedLMModule (line 1008) | class FlaxRobertaPreLayerNormForMaskedLMModule(nn.Module): method setup (line 1013) | def setup(self): method __call__ (line 1022) | def __call__( class FlaxRobertaPreLayerNormForMaskedLM (line 1072) | class FlaxRobertaPreLayerNormForMaskedLM(FlaxRobertaPreLayerNormPreTrain... class FlaxRobertaPreLayerNormForSequenceClassificationModule (line 1086) | class FlaxRobertaPreLayerNormForSequenceClassificationModule(nn.Module): method setup (line 1091) | def setup(self): method __call__ (line 1100) | def __call__( class FlaxRobertaPreLayerNormForSequenceClassification (line 1146) | class FlaxRobertaPreLayerNormForSequenceClassification(FlaxRobertaPreLay... class FlaxRobertaPreLayerNormForMultipleChoiceModule (line 1159) | class FlaxRobertaPreLayerNormForMultipleChoiceModule(nn.Module): method setup (line 1164) | def setup(self): method __call__ (line 1173) | def __call__( class FlaxRobertaPreLayerNormForMultipleChoice (line 1228) | class FlaxRobertaPreLayerNormForMultipleChoice(FlaxRobertaPreLayerNormPr... class FlaxRobertaPreLayerNormForTokenClassificationModule (line 1245) | class FlaxRobertaPreLayerNormForTokenClassificationModule(nn.Module): method setup (line 1250) | def setup(self): method __call__ (line 1265) | def __call__( class FlaxRobertaPreLayerNormForTokenClassification (line 1312) | class FlaxRobertaPreLayerNormForTokenClassification(FlaxRobertaPreLayerN... class FlaxRobertaPreLayerNormForQuestionAnsweringModule (line 1325) | class FlaxRobertaPreLayerNormForQuestionAnsweringModule(nn.Module): method setup (line 1330) | def setup(self): method __call__ (line 1339) | def __call__( class FlaxRobertaPreLayerNormForQuestionAnswering (line 1390) | class FlaxRobertaPreLayerNormForQuestionAnswering(FlaxRobertaPreLayerNor... class FlaxRobertaPreLayerNormForCausalLMModule (line 1403) | class FlaxRobertaPreLayerNormForCausalLMModule(nn.Module): method setup (line 1408) | def setup(self): method __call__ (line 1417) | def __call__( class FlaxRobertaPreLayerNormForCausalLM (line 1478) | class FlaxRobertaPreLayerNormForCausalLM(FlaxRobertaPreLayerNormPreTrain... method prepare_inputs_for_generation (line 1481) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1502) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py class RobertaPreLayerNormEmbeddings (line 68) | class RobertaPreLayerNormEmbeddings(nn.Module): method __init__ (line 74) | def __init__(self, config): method forward (line 97) | def forward( method create_position_ids_from_inputs_embeds (line 137) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class RobertaPreLayerNormSelfAttention (line 156) | class RobertaPreLayerNormSelfAttention(nn.Module): method __init__ (line 157) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 183) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 188) | def forward( class RobertaPreLayerNormSelfOutput (line 290) | class RobertaPreLayerNormSelfOutput(nn.Module): method __init__ (line 291) | def __init__(self, config): method forward (line 296) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaPreLayerNormAttention (line 303) | class RobertaPreLayerNormAttention(nn.Module): method __init__ (line 304) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 312) | def prune_heads(self, heads): method forward (line 330) | def forward( class RobertaPreLayerNormIntermediate (line 355) | class RobertaPreLayerNormIntermediate(nn.Module): method __init__ (line 356) | def __init__(self, config): method forward (line 365) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreLayerNormOutput (line 372) | class RobertaPreLayerNormOutput(nn.Module): method __init__ (line 373) | def __init__(self, config): method forward (line 378) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RobertaPreLayerNormLayer (line 386) | class RobertaPreLayerNormLayer(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 401) | def forward( method feed_forward_chunk (line 466) | def feed_forward_chunk(self, attention_output): class RobertaPreLayerNormEncoder (line 473) | class RobertaPreLayerNormEncoder(nn.Module): method __init__ (line 474) | def __init__(self, config): method forward (line 480) | def forward( class RobertaPreLayerNormPooler (line 572) | class RobertaPreLayerNormPooler(nn.Module): method __init__ (line 573) | def __init__(self, config): method forward (line 578) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RobertaPreLayerNormPreTrainedModel (line 588) | class RobertaPreLayerNormPreTrainedModel(PreTrainedModel): method _init_weights (line 600) | def _init_weights(self, module): method _set_gradient_checkpointing (line 616) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 620) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class RobertaPreLayerNormModel (line 701) | class RobertaPreLayerNormModel(RobertaPreLayerNormPreTrainedModel): method __init__ (line 719) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 732) | def get_input_embeddings(self): method set_input_embeddings (line 735) | def set_input_embeddings(self, value): method _prune_heads (line 738) | def _prune_heads(self, heads_to_prune): method forward (line 752) | def forward( class RobertaPreLayerNormForCausalLM (line 888) | class RobertaPreLayerNormForCausalLM(RobertaPreLayerNormPreTrainedModel): method __init__ (line 893) | def __init__(self, config): method get_output_embeddings (line 910) | def get_output_embeddings(self): method set_output_embeddings (line 913) | def set_output_embeddings(self, new_embeddings): method forward (line 918) | def forward( method prepare_inputs_for_generation (line 1024) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1036) | def _reorder_cache(self, past_key_values, beam_idx): class RobertaPreLayerNormForMaskedLM (line 1046) | class RobertaPreLayerNormForMaskedLM(RobertaPreLayerNormPreTrainedModel): method __init__ (line 1052) | def __init__(self, config): method get_output_embeddings (line 1070) | def get_output_embeddings(self): method set_output_embeddings (line 1073) | def set_output_embeddings(self, new_embeddings): method forward (line 1086) | def forward( class RobertaPreLayerNormLMHead (line 1147) | class RobertaPreLayerNormLMHead(nn.Module): method __init__ (line 1150) | def __init__(self, config): method forward (line 1159) | def forward(self, features, **kwargs): method _tie_weights (line 1169) | def _tie_weights(self): class RobertaPreLayerNormForSequenceClassification (line 1185) | class RobertaPreLayerNormForSequenceClassification(RobertaPreLayerNormPr... method __init__ (line 1188) | def __init__(self, config): method forward (line 1206) | def forward( class RobertaPreLayerNormForMultipleChoice (line 1286) | class RobertaPreLayerNormForMultipleChoice(RobertaPreLayerNormPreTrained... method __init__ (line 1289) | def __init__(self, config): method forward (line 1307) | def forward( class RobertaPreLayerNormForTokenClassification (line 1382) | class RobertaPreLayerNormForTokenClassification(RobertaPreLayerNormPreTr... method __init__ (line 1386) | def __init__(self, config): method forward (line 1407) | def forward( class RobertaPreLayerNormClassificationHead (line 1463) | class RobertaPreLayerNormClassificationHead(nn.Module): method __init__ (line 1466) | def __init__(self, config): method forward (line 1475) | def forward(self, features, **kwargs): class RobertaPreLayerNormForQuestionAnswering (line 1492) | class RobertaPreLayerNormForQuestionAnswering(RobertaPreLayerNormPreTrai... method __init__ (line 1496) | def __init__(self, config): method forward (line 1513) | def forward( function create_position_ids_from_input_ids (line 1588) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py class TFRobertaPreLayerNormEmbeddings (line 81) | class TFRobertaPreLayerNormEmbeddings(tf.keras.layers.Layer): method __init__ (line 86) | def __init__(self, config, **kwargs): method build (line 97) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 121) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 135) | def call( class TFRobertaPreLayerNormPooler (line 182) | class TFRobertaPreLayerNormPooler(tf.keras.layers.Layer): method __init__ (line 183) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 193) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRobertaPreLayerNormSelfAttention (line 203) | class TFRobertaPreLayerNormSelfAttention(tf.keras.layers.Layer): method __init__ (line 204) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method transpose_for_scores (line 231) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 238) | def call( class TFRobertaPreLayerNormSelfOutput (line 320) | class TFRobertaPreLayerNormSelfOutput(tf.keras.layers.Layer): method __init__ (line 321) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 329) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRobertaPreLayerNormAttention (line 337) | class TFRobertaPreLayerNormAttention(tf.keras.layers.Layer): method __init__ (line 338) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method prune_heads (line 346) | def prune_heads(self, heads): method call (line 349) | def call( class TFRobertaPreLayerNormIntermediate (line 380) | class TFRobertaPreLayerNormIntermediate(tf.keras.layers.Layer): method __init__ (line 381) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 394) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRobertaPreLayerNormOutput (line 402) | class TFRobertaPreLayerNormOutput(tf.keras.layers.Layer): method __init__ (line 403) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 411) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRobertaPreLayerNormLayer (line 420) | class TFRobertaPreLayerNormLayer(tf.keras.layers.Layer): method __init__ (line 421) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 434) | def call( class TFRobertaPreLayerNormEncoder (line 507) | class TFRobertaPreLayerNormEncoder(tf.keras.layers.Layer): method __init__ (line 508) | def __init__(self, config: RobertaPreLayerNormConfig, **kwargs): method call (line 513) | def call( class TFRobertaPreLayerNormMainLayer (line 577) | class TFRobertaPreLayerNormMainLayer(tf.keras.layers.Layer): method __init__ (line 580) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 597) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 600) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 604) | def _prune_heads(self, heads_to_prune): method call (line 612) | def call( class TFRobertaPreLayerNormPreTrainedModel (line 770) | class TFRobertaPreLayerNormPreTrainedModel(TFPreTrainedModel): class TFRobertaPreLayerNormModel (line 883) | class TFRobertaPreLayerNormModel(TFRobertaPreLayerNormPreTrainedModel): method __init__ (line 884) | def __init__(self, config, *inputs, **kwargs): method call (line 895) | def call( class TFRobertaPreLayerNormLMHead (line 953) | class TFRobertaPreLayerNormLMHead(tf.keras.layers.Layer): method __init__ (line 956) | def __init__(self, config, input_embeddings, **kwargs): method build (line 971) | def build(self, input_shape): method get_output_embeddings (line 976) | def get_output_embeddings(self): method set_output_embeddings (line 979) | def set_output_embeddings(self, value): method get_bias (line 983) | def get_bias(self): method set_bias (line 986) | def set_bias(self, value): method call (line 990) | def call(self, hidden_states): class TFRobertaPreLayerNormForMaskedLM (line 1008) | class TFRobertaPreLayerNormForMaskedLM(TFRobertaPreLayerNormPreTrainedMo... method __init__ (line 1013) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1021) | def get_lm_head(self): method get_prefix_bias_name (line 1024) | def get_prefix_bias_name(self): method call (line 1039) | def call( class TFRobertaPreLayerNormForCausalLM (line 1090) | class TFRobertaPreLayerNormForCausalLM(TFRobertaPreLayerNormPreTrainedMo... method __init__ (line 1094) | def __init__(self, config: RobertaPreLayerNormConfig, *inputs, **kwargs): method get_lm_head (line 1109) | def get_lm_head(self): method get_prefix_bias_name (line 1112) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1117) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1136) | def call( class TFRobertaPreLayerNormClassificationHead (line 1219) | class TFRobertaPreLayerNormClassificationHead(tf.keras.layers.Layer): method __init__ (line 1222) | def __init__(self, config, **kwargs): method call (line 1238) | def call(self, features, training=False): class TFRobertaPreLayerNormForSequenceClassification (line 1254) | class TFRobertaPreLayerNormForSequenceClassification( method __init__ (line 1260) | def __init__(self, config, *inputs, **kwargs): method call (line 1277) | def call( class TFRobertaPreLayerNormForMultipleChoice (line 1334) | class TFRobertaPreLayerNormForMultipleChoice(TFRobertaPreLayerNormPreTra... method __init__ (line 1339) | def __init__(self, config, *inputs, **kwargs): method call (line 1357) | def call( class TFRobertaPreLayerNormForTokenClassification (line 1426) | class TFRobertaPreLayerNormForTokenClassification(TFRobertaPreLayerNormP... method __init__ (line 1431) | def __init__(self, config, *inputs, **kwargs): method call (line 1454) | def call( class TFRobertaPreLayerNormForQuestionAnswering (line 1510) | class TFRobertaPreLayerNormForQuestionAnswering(TFRobertaPreLayerNormPre... method __init__ (line 1514) | def __init__(self, config, *inputs, **kwargs): method call (line 1533) | def call( FILE: transformers/models/roc_bert/configuration_roc_bert.py class RoCBertConfig (line 28) | class RoCBertConfig(PretrainedConfig): method __init__ (line 114) | def __init__( FILE: transformers/models/roc_bert/modeling_roc_bert.py function load_tf_weights_in_roc_bert (line 84) | def load_tf_weights_in_roc_bert(model, config, tf_checkpoint_path): class RoCBertEmbeddings (line 157) | class RoCBertEmbeddings(nn.Module): method __init__ (line 160) | def __init__(self, config): method forward (line 201) | def forward( class RoCBertSelfAttention (line 287) | class RoCBertSelfAttention(nn.Module): method __init__ (line 288) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 314) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 319) | def forward( class RoCBertSelfOutput (line 422) | class RoCBertSelfOutput(nn.Module): method __init__ (line 423) | def __init__(self, config): method forward (line 429) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoCBertAttention (line 437) | class RoCBertAttention(nn.Module): method __init__ (line 438) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 444) | def prune_heads(self, heads): method forward (line 462) | def forward( class RoCBertIntermediate (line 487) | class RoCBertIntermediate(nn.Module): method __init__ (line 488) | def __init__(self, config): method forward (line 496) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoCBertOutput (line 503) | class RoCBertOutput(nn.Module): method __init__ (line 504) | def __init__(self, config): method forward (line 510) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoCBertLayer (line 518) | class RoCBertLayer(nn.Module): method __init__ (line 519) | def __init__(self, config): method forward (line 533) | def forward( method feed_forward_chunk (line 598) | def feed_forward_chunk(self, attention_output): class RoCBertEncoder (line 605) | class RoCBertEncoder(nn.Module): method __init__ (line 606) | def __init__(self, config): method forward (line 612) | def forward( class RoCBertPooler (line 704) | class RoCBertPooler(nn.Module): method __init__ (line 705) | def __init__(self, config): method forward (line 710) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoCBertPredictionHeadTransform (line 720) | class RoCBertPredictionHeadTransform(nn.Module): method __init__ (line 721) | def __init__(self, config): method forward (line 730) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoCBertLMPredictionHead (line 738) | class RoCBertLMPredictionHead(nn.Module): method __init__ (line 739) | def __init__(self, config): method forward (line 752) | def forward(self, hidden_states): class RoCBertOnlyMLMHead (line 759) | class RoCBertOnlyMLMHead(nn.Module): method __init__ (line 760) | def __init__(self, config): method forward (line 764) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RoCBertPreTrainedModel (line 770) | class RoCBertPreTrainedModel(PreTrainedModel): method _init_weights (line 782) | def _init_weights(self, module): method _set_gradient_checkpointing (line 798) | def _set_gradient_checkpointing(self, module, value=False): class RoCBertModel (line 882) | class RoCBertModel(RoCBertPreTrainedModel): method __init__ (line 896) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 909) | def get_input_embeddings(self): method set_input_embeddings (line 913) | def set_input_embeddings(self, value): method get_pronunciation_embeddings (line 916) | def get_pronunciation_embeddings(self): method set_pronunciation_embeddings (line 919) | def set_pronunciation_embeddings(self, value): method get_shape_embeddings (line 922) | def get_shape_embeddings(self): method set_shape_embeddings (line 925) | def set_shape_embeddings(self, value): method _prune_heads (line 929) | def _prune_heads(self, heads_to_prune): method forward (line 944) | def forward( class RoCBertForPreTraining (line 1083) | class RoCBertForPreTraining(RoCBertPreTrainedModel): method __init__ (line 1086) | def __init__(self, config): method get_output_embeddings (line 1096) | def get_output_embeddings(self): method set_output_embeddings (line 1100) | def set_output_embeddings(self, new_embeddings): method forward (line 1105) | def forward( class RoCBertForMaskedLM (line 1268) | class RoCBertForMaskedLM(RoCBertPreTrainedModel): method __init__ (line 1273) | def __init__(self, config): method get_output_embeddings (line 1289) | def get_output_embeddings(self): method set_output_embeddings (line 1293) | def set_output_embeddings(self, new_embeddings): method forward (line 1297) | def forward( method prepare_inputs_for_generation (line 1378) | def prepare_inputs_for_generation( class RoCBertForCausalLM (line 1409) | class RoCBertForCausalLM(RoCBertPreTrainedModel): method __init__ (line 1414) | def __init__(self, config): method get_output_embeddings (line 1427) | def get_output_embeddings(self): method set_output_embeddings (line 1431) | def set_output_embeddings(self, new_embeddings): method forward (line 1436) | def forward( method prepare_inputs_for_generation (line 1548) | def prepare_inputs_for_generation( method _reorder_cache (line 1580) | def _reorder_cache(self, past_key_values, beam_idx): class RoCBertForSequenceClassification (line 1592) | class RoCBertForSequenceClassification(RoCBertPreTrainedModel): method __init__ (line 1594) | def __init__(self, config): method forward (line 1617) | def forward( class RoCBertForMultipleChoice (line 1698) | class RoCBertForMultipleChoice(RoCBertPreTrainedModel): method __init__ (line 1700) | def __init__(self, config): method forward (line 1721) | def forward( class RoCBertForTokenClassification (line 1803) | class RoCBertForTokenClassification(RoCBertPreTrainedModel): method __init__ (line 1807) | def __init__(self, config): method forward (line 1829) | def forward( class RoCBertForQuestionAnswering (line 1891) | class RoCBertForQuestionAnswering(RoCBertPreTrainedModel): method __init__ (line 1895) | def __init__(self, config): method forward (line 1915) | def forward( FILE: transformers/models/roc_bert/tokenization_roc_bert.py function load_vocab (line 74) | def load_vocab(vocab_file): function whitespace_tokenize (line 86) | def whitespace_tokenize(text): class RoCBertTokenizer (line 95) | class RoCBertTokenizer(PreTrainedTokenizer): method __init__ (line 142) | def __init__( method do_lower_case (line 201) | def do_lower_case(self): method vocab_size (line 205) | def vocab_size(self): method get_vocab (line 209) | def get_vocab(self): method _tokenize (line 213) | def _tokenize(self, text): method _encode_plus (line 226) | def _encode_plus( method prepare_for_model (line 321) | def prepare_for_model( method _pad (line 501) | def _pad( method _batch_encode_plus (line 561) | def _batch_encode_plus( method _batch_prepare_for_model (line 666) | def _batch_prepare_for_model( method _convert_token_to_id (line 741) | def _convert_token_to_id(self, token): method _convert_token_to_shape_id (line 745) | def _convert_token_to_shape_id(self, token): method convert_tokens_to_shape_ids (line 749) | def convert_tokens_to_shape_ids(self, tokens: Union[str, List[str]]) -... method _convert_token_to_pronunciation_id (line 758) | def _convert_token_to_pronunciation_id(self, token): method convert_tokens_to_pronunciation_ids (line 762) | def convert_tokens_to_pronunciation_ids(self, tokens: Union[str, List[... method _convert_id_to_token (line 772) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 777) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 782) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 812) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 841) | def create_token_type_ids_from_sequences( method save_vocabulary (line 870) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class RoCBertBasicTokenizer (line 916) | class RoCBertBasicTokenizer(object): method __init__ (line 936) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 944) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 981) | def _run_strip_accents(self, text): method _run_split_on_punc (line 992) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 1014) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 1027) | def _is_chinese_char(self, cp): method _clean_text (line 1051) | def _clean_text(self, text): class RoCBertWordpieceTokenizer (line 1066) | class RoCBertWordpieceTokenizer(object): method __init__ (line 1069) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 1074) | def tokenize(self, text): FILE: transformers/models/roformer/configuration_roformer.py class RoFormerConfig (line 46) | class RoFormerConfig(PretrainedConfig): method __init__ (line 111) | def __init__( class RoFormerOnnxConfig (line 150) | class RoFormerOnnxConfig(OnnxConfig): method inputs (line 152) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/roformer/convert_roformer_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 29) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: transformers/models/roformer/modeling_flax_roformer.py function create_sinusoidal_positions (line 130) | def create_sinusoidal_positions(n_pos, dim): class FlaxRoFormerEmbeddings (line 140) | class FlaxRoFormerEmbeddings(nn.Module): method setup (line 146) | def setup(self): method __call__ (line 160) | def __call__(self, input_ids, token_type_ids, attention_mask, determin... class FlaxRoFormerSelfAttention (line 174) | class FlaxRoFormerSelfAttention(nn.Module): method setup (line 178) | def setup(self) -> None: method __call__ (line 203) | def __call__( method apply_rotary_position_embeddings (line 273) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class FlaxRoFormerSelfOutput (line 293) | class FlaxRoFormerSelfOutput(nn.Module): method setup (line 297) | def setup(self): method __call__ (line 306) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxRoFormerAttention (line 313) | class FlaxRoFormerAttention(nn.Module): method setup (line 317) | def setup(self): method __call__ (line 321) | def __call__( class FlaxRoFormerIntermediate (line 353) | class FlaxRoFormerIntermediate(nn.Module): method setup (line 357) | def setup(self): method __call__ (line 365) | def __call__(self, hidden_states): class FlaxRoFormerOutput (line 372) | class FlaxRoFormerOutput(nn.Module): method setup (line 376) | def setup(self): method __call__ (line 385) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxRoFormerLayer (line 392) | class FlaxRoFormerLayer(nn.Module): method setup (line 396) | def setup(self): method __call__ (line 401) | def __call__( class FlaxRoFormerLayerCollection (line 430) | class FlaxRoFormerLayerCollection(nn.Module): method setup (line 434) | def setup(self): method __call__ (line 439) | def __call__( class FlaxRoFormerEncoder (line 492) | class FlaxRoFormerEncoder(nn.Module): method setup (line 496) | def setup(self): method __call__ (line 502) | def __call__( class FlaxRoFormerPredictionHeadTransform (line 527) | class FlaxRoFormerPredictionHeadTransform(nn.Module): method setup (line 531) | def setup(self): method __call__ (line 536) | def __call__(self, hidden_states): class FlaxRoFormerLMPredictionHead (line 543) | class FlaxRoFormerLMPredictionHead(nn.Module): method setup (line 548) | def setup(self): method __call__ (line 553) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRoFormerOnlyMLMHead (line 567) | class FlaxRoFormerOnlyMLMHead(nn.Module): method setup (line 571) | def setup(self): method __call__ (line 574) | def __call__(self, hidden_states, shared_embedding=None): class FlaxRoFormerClassificationHead (line 579) | class FlaxRoFormerClassificationHead(nn.Module): method setup (line 583) | def setup(self): method __call__ (line 597) | def __call__(self, hidden_states, deterministic=True): class FlaxRoFormerPreTrainedModel (line 607) | class FlaxRoFormerPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 617) | def __init__( method init_weights (line 629) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 654) | def __call__( class FlaxRoFormerModule (line 702) | class FlaxRoFormerModule(nn.Module): method setup (line 706) | def setup(self): method __call__ (line 710) | def __call__( class FlaxRoFormerModel (line 747) | class FlaxRoFormerModel(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForMaskedLMModule (line 754) | class FlaxRoFormerForMaskedLMModule(nn.Module): method setup (line 758) | def setup(self): method __call__ (line 762) | def __call__( class FlaxRoFormerForMaskedLM (line 805) | class FlaxRoFormerForMaskedLM(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForSequenceClassificationModule (line 818) | class FlaxRoFormerForSequenceClassificationModule(nn.Module): method setup (line 822) | def setup(self): method __call__ (line 826) | def __call__( class FlaxRoFormerForSequenceClassification (line 869) | class FlaxRoFormerForSequenceClassification(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForMultipleChoiceModule (line 881) | class FlaxRoFormerForMultipleChoiceModule(nn.Module): method setup (line 885) | def setup(self): method __call__ (line 890) | def __call__( class FlaxRoFormerForMultipleChoice (line 944) | class FlaxRoFormerForMultipleChoice(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForTokenClassificationModule (line 959) | class FlaxRoFormerForTokenClassificationModule(nn.Module): method setup (line 963) | def setup(self): method __call__ (line 968) | def __call__( class FlaxRoFormerForTokenClassification (line 1012) | class FlaxRoFormerForTokenClassification(FlaxRoFormerPreTrainedModel): class FlaxRoFormerForQuestionAnsweringModule (line 1024) | class FlaxRoFormerForQuestionAnsweringModule(nn.Module): method setup (line 1028) | def setup(self): method __call__ (line 1032) | def __call__( class FlaxRoFormerForQuestionAnswering (line 1080) | class FlaxRoFormerForQuestionAnswering(FlaxRoFormerPreTrainedModel): FILE: transformers/models/roformer/modeling_roformer.py class RoFormerSinusoidalPositionalEmbedding (line 67) | class RoFormerSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 70) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 75) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 92) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... function load_tf_weights_in_roformer (line 101) | def load_tf_weights_in_roformer(model, config, tf_checkpoint_path): class RoFormerEmbeddings (line 174) | class RoFormerEmbeddings(nn.Module): method __init__ (line 177) | def __init__(self, config): method forward (line 187) | def forward(self, input_ids=None, token_type_ids=None, inputs_embeds=N... class RoFormerSelfAttention (line 208) | class RoFormerSelfAttention(nn.Module): method __init__ (line 209) | def __init__(self, config): method transpose_for_scores (line 230) | def transpose_for_scores(self, x): method forward (line 235) | def forward( method apply_rotary_position_embeddings (line 319) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class RoFormerSelfOutput (line 347) | class RoFormerSelfOutput(nn.Module): method __init__ (line 348) | def __init__(self, config): method forward (line 354) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoFormerAttention (line 361) | class RoFormerAttention(nn.Module): method __init__ (line 362) | def __init__(self, config): method prune_heads (line 369) | def prune_heads(self, heads): method forward (line 388) | def forward( class RoFormerIntermediate (line 415) | class RoFormerIntermediate(nn.Module): method __init__ (line 416) | def __init__(self, config): method forward (line 424) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class RoFormerOutput (line 431) | class RoFormerOutput(nn.Module): method __init__ (line 432) | def __init__(self, config): method forward (line 438) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class RoFormerLayer (line 445) | class RoFormerLayer(nn.Module): method __init__ (line 446) | def __init__(self, config): method forward (line 460) | def forward( method feed_forward_chunk (line 528) | def feed_forward_chunk(self, attention_output): class RoFormerEncoder (line 534) | class RoFormerEncoder(nn.Module): method __init__ (line 535) | def __init__(self, config): method forward (line 544) | def forward( class RoFormerPredictionHeadTransform (line 641) | class RoFormerPredictionHeadTransform(nn.Module): method __init__ (line 642) | def __init__(self, config): method forward (line 651) | def forward(self, hidden_states): class RoFormerLMPredictionHead (line 658) | class RoFormerLMPredictionHead(nn.Module): method __init__ (line 659) | def __init__(self, config): method forward (line 672) | def forward(self, hidden_states): class RoFormerOnlyMLMHead (line 679) | class RoFormerOnlyMLMHead(nn.Module): method __init__ (line 680) | def __init__(self, config): method forward (line 684) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class RoFormerPreTrainedModel (line 689) | class RoFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 705) | def _init_weights(self, module): method _set_gradient_checkpointing (line 723) | def _set_gradient_checkpointing(self, module, value=False): class RoFormerModel (line 788) | class RoFormerModel(RoFormerPreTrainedModel): method __init__ (line 801) | def __init__(self, config): method get_input_embeddings (line 814) | def get_input_embeddings(self): method set_input_embeddings (line 817) | def set_input_embeddings(self, value): method _prune_heads (line 820) | def _prune_heads(self, heads_to_prune): method forward (line 834) | def forward( class RoFormerForMaskedLM (line 954) | class RoFormerForMaskedLM(RoFormerPreTrainedModel): method __init__ (line 957) | def __init__(self, config): method get_output_embeddings (line 972) | def get_output_embeddings(self): method set_output_embeddings (line 975) | def set_output_embeddings(self, new_embeddings): method forward (line 984) | def forward( method prepare_inputs_for_generation (line 1038) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class RoFormerForCausalLM (line 1056) | class RoFormerForCausalLM(RoFormerPreTrainedModel): method __init__ (line 1059) | def __init__(self, config): method get_output_embeddings (line 1071) | def get_output_embeddings(self): method set_output_embeddings (line 1074) | def set_output_embeddings(self, new_embeddings): method forward (line 1079) | def forward( method prepare_inputs_for_generation (line 1178) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1191) | def _reorder_cache(self, past_key_values, beam_idx): class RoFormerClassificationHead (line 1200) | class RoFormerClassificationHead(nn.Module): method __init__ (line 1203) | def __init__(self, config): method forward (line 1211) | def forward(self, features, **kwargs): class RoFormerForSequenceClassification (line 1228) | class RoFormerForSequenceClassification(RoFormerPreTrainedModel): method __init__ (line 1229) | def __init__(self, config): method forward (line 1244) | def forward( class RoFormerForMultipleChoice (line 1319) | class RoFormerForMultipleChoice(RoFormerPreTrainedModel): method __init__ (line 1320) | def __init__(self, config): method forward (line 1338) | def forward( class RoFormerForTokenClassification (line 1410) | class RoFormerForTokenClassification(RoFormerPreTrainedModel): method __init__ (line 1411) | def __init__(self, config): method forward (line 1428) | def forward( class RoFormerForQuestionAnswering (line 1486) | class RoFormerForQuestionAnswering(RoFormerPreTrainedModel): method __init__ (line 1487) | def __init__(self, config): method forward (line 1505) | def forward( FILE: transformers/models/roformer/modeling_tf_roformer.py class TFRoFormerSinusoidalPositionalEmbedding (line 77) | class TFRoFormerSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 80) | def __init__(self, num_positions: int, embedding_dim: int, **kwargs): method build (line 89) | def build(self, input_shape: tf.TensorShape): method _init_weight (line 108) | def _init_weight(n_pos: int, dim: int): method call (line 125) | def call(self, input_shape: tf.TensorShape, past_key_values_length: in... class TFRoFormerEmbeddings (line 133) | class TFRoFormerEmbeddings(tf.keras.layers.Layer): method __init__ (line 136) | def __init__(self, config: RoFormerConfig, **kwargs): method build (line 145) | def build(self, input_shape: tf.TensorShape): method call (line 162) | def call( class TFRoFormerSelfAttention (line 195) | class TFRoFormerSelfAttention(tf.keras.layers.Layer): method __init__ (line 196) | def __init__(self, config: RoFormerConfig, **kwargs): method transpose_for_scores (line 222) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 229) | def call( method apply_rotary_position_embeddings (line 285) | def apply_rotary_position_embeddings(sinusoidal_pos, query_layer, key_... class TFRoFormerSelfOutput (line 312) | class TFRoFormerSelfOutput(tf.keras.layers.Layer): method __init__ (line 313) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 322) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRoFormerAttention (line 330) | class TFRoFormerAttention(tf.keras.layers.Layer): method __init__ (line 331) | def __init__(self, config: RoFormerConfig, **kwargs): method prune_heads (line 337) | def prune_heads(self, heads): method call (line 340) | def call( class TFRoFormerIntermediate (line 366) | class TFRoFormerIntermediate(tf.keras.layers.Layer): method __init__ (line 367) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 379) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerOutput (line 387) | class TFRoFormerOutput(tf.keras.layers.Layer): method __init__ (line 388) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 397) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFRoFormerLayer (line 405) | class TFRoFormerLayer(tf.keras.layers.Layer): method __init__ (line 406) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 413) | def call( class TFRoFormerEncoder (line 440) | class TFRoFormerEncoder(tf.keras.layers.Layer): method __init__ (line 441) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 450) | def call( class TFRoFormerPredictionHeadTransform (line 495) | class TFRoFormerPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 496) | def __init__(self, config: RoFormerConfig, **kwargs): method call (line 512) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerLMPredictionHead (line 520) | class TFRoFormerLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 521) | def __init__(self, config: RoFormerConfig, input_embeddings: tf.keras.... method build (line 533) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 538) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 541) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 545) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 548) | def set_bias(self, value: tf.Variable): method call (line 552) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFRoFormerMLMHead (line 564) | class TFRoFormerMLMHead(tf.keras.layers.Layer): method __init__ (line 565) | def __init__(self, config: RoFormerConfig, input_embeddings: tf.keras.... method call (line 570) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFRoFormerMainLayer (line 577) | class TFRoFormerMainLayer(tf.keras.layers.Layer): method __init__ (line 580) | def __init__(self, config: RoFormerConfig, add_pooling_layer: bool = T... method get_input_embeddings (line 591) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 594) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 598) | def _prune_heads(self, heads_to_prune): method call (line 606) | def call( class TFRoFormerPreTrainedModel (line 691) | class TFRoFormerPreTrainedModel(TFPreTrainedModel): class TFRoFormerModel (line 798) | class TFRoFormerModel(TFRoFormerPreTrainedModel): method __init__ (line 799) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 811) | def call( class TFRoFormerForMaskedLM (line 839) | class TFRoFormerForMaskedLM(TFRoFormerPreTrainedModel, TFMaskedLanguageM... method __init__ (line 840) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method get_lm_head (line 852) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 862) | def call( class TFRoFormerForCausalLM (line 911) | class TFRoFormerForCausalLM(TFRoFormerPreTrainedModel, TFCausalLanguageM... method __init__ (line 912) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method get_lm_head (line 921) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 930) | def call( class TFRoFormerClassificationHead (line 981) | class TFRoFormerClassificationHead(tf.keras.layers.Layer): method __init__ (line 984) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1000) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFRoFormerForSequenceClassification (line 1017) | class TFRoFormerForSequenceClassification(TFRoFormerPreTrainedModel, TFS... method __init__ (line 1018) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1033) | def call( class TFRoFormerForMultipleChoice (line 1086) | class TFRoFormerForMultipleChoice(TFRoFormerPreTrainedModel, TFMultipleC... method __init__ (line 1087) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1105) | def call( class TFRoFormerForTokenClassification (line 1178) | class TFRoFormerForTokenClassification(TFRoFormerPreTrainedModel, TFToke... method __init__ (line 1179) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1197) | def call( class TFRoFormerForQuestionAnswering (line 1249) | class TFRoFormerForQuestionAnswering(TFRoFormerPreTrainedModel, TFQuesti... method __init__ (line 1250) | def __init__(self, config: RoFormerConfig, *inputs, **kwargs): method call (line 1267) | def call( FILE: transformers/models/roformer/tokenization_roformer.py function load_vocab (line 70) | def load_vocab(vocab_file): function whitespace_tokenize (line 82) | def whitespace_tokenize(text): class BasicTokenizer (line 92) | class BasicTokenizer(object): method __init__ (line 112) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 120) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 157) | def _run_strip_accents(self, text): method _run_split_on_punc (line 168) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 190) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 203) | def _is_chinese_char(self, cp): method _clean_text (line 227) | def _clean_text(self, text): class WordpieceTokenizer (line 242) | class WordpieceTokenizer(object): method __init__ (line 245) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 250) | def tokenize(self, text): class RoFormerTokenizer (line 299) | class RoFormerTokenizer(PreTrainedTokenizer): method __init__ (line 354) | def __init__( method do_lower_case (line 409) | def do_lower_case(self): method vocab_size (line 413) | def vocab_size(self): method __getstate__ (line 416) | def __getstate__(self): method __setstate__ (line 421) | def __setstate__(self, d): method get_vocab (line 427) | def get_vocab(self): method _tokenize (line 430) | def _tokenize(self, text, use_jieba=True): method _convert_token_to_id (line 452) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 456) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 460) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 465) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 490) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 518) | def create_token_type_ids_from_sequences( method save_vocabulary (line 547) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/roformer/tokenization_roformer_fast.py class RoFormerTokenizerFast (line 71) | class RoFormerTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 97) | def __init__( method __getstate__ (line 137) | def __getstate__(self): method __setstate__ (line 142) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 147) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 171) | def create_token_type_ids_from_sequences( method save_vocabulary (line 200) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method save_pretrained (line 204) | def save_pretrained( FILE: transformers/models/roformer/tokenization_utils.py class JiebaPreTokenizer (line 22) | class JiebaPreTokenizer: method __init__ (line 23) | def __init__(self, vocab) -> None: method jieba_split (line 40) | def jieba_split(self, i: int, normalized_string: NormalizedString) -> ... method pre_tokenize (line 67) | def pre_tokenize(self, pretok: PreTokenizedString): FILE: transformers/models/rwkv/configuration_rwkv.py class RwkvConfig (line 38) | class RwkvConfig(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: transformers/models/rwkv/convert_rwkv_checkpoint_to_hf.py function convert_state_dict (line 50) | def convert_state_dict(state_dict): function convert_rmkv_checkpoint_to_hf_format (line 81) | def convert_rmkv_checkpoint_to_hf_format( FILE: transformers/models/rwkv/modeling_rwkv.py function load_wkv_cuda_kernel (line 64) | def load_wkv_cuda_kernel(context_length): class RwkvLinearAttention (line 96) | class RwkvLinearAttention(torch.autograd.Function): method forward (line 98) | def forward(ctx, time_decay, time_first, key, value, state=None, retur... method backward (line 162) | def backward(ctx, g_output, g_state=None): function rwkv_linear_attention_cpu (line 202) | def rwkv_linear_attention_cpu(time_decay, time_first, key, value, state=... function rwkv_linear_attention (line 246) | def rwkv_linear_attention(time_decay, time_first, key, value, state=None... class RwkvSelfAttention (line 257) | class RwkvSelfAttention(nn.Module): method __init__ (line 258) | def __init__(self, config, layer_id=0): method extract_key_value (line 288) | def extract_key_value(self, hidden, state=None): method forward (line 307) | def forward(self, hidden, state=None, use_cache=False): class RwkvFeedForward (line 327) | class RwkvFeedForward(nn.Module): method __init__ (line 328) | def __init__(self, config, layer_id=0): method forward (line 345) | def forward(self, hidden, state=None): class RwkvBlock (line 365) | class RwkvBlock(nn.Module): method __init__ (line 366) | def __init__(self, config, layer_id): method forward (line 380) | def forward(self, hidden, state=None, use_cache=False, output_attentio... class RwkvPreTrainedModel (line 399) | class RwkvPreTrainedModel(PreTrainedModel): method _init_weights (line 410) | def _init_weights(self, module): method _set_gradient_checkpointing (line 467) | def _set_gradient_checkpointing(self, module, value=False): class RwkvOutput (line 473) | class RwkvOutput(ModelOutput): class RwkvCausalLMOutput (line 503) | class RwkvCausalLMOutput(ModelOutput): class RwkvModel (line 598) | class RwkvModel(RwkvPreTrainedModel): method __init__ (line 599) | def __init__(self, config): method get_input_embeddings (line 611) | def get_input_embeddings(self): method set_input_embeddings (line 614) | def set_input_embeddings(self, new_embeddings): method forward (line 623) | def forward( method _rescale_layers (line 698) | def _rescale_layers(self): class RwkvForCausalLM (line 734) | class RwkvForCausalLM(RwkvPreTrainedModel): method __init__ (line 735) | def __init__(self, config): method get_output_embeddings (line 743) | def get_output_embeddings(self): method set_output_embeddings (line 746) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 749) | def prepare_inputs_for_generation(self, input_ids, state=None, inputs_... method forward (line 769) | def forward( FILE: transformers/models/sam/configuration_sam.py class SamPromptEncoderConfig (line 32) | class SamPromptEncoderConfig(PretrainedConfig): method __init__ (line 57) | def __init__( class SamMaskDecoderConfig (line 79) | class SamMaskDecoderConfig(PretrainedConfig): method __init__ (line 113) | def __init__( class SamVisionConfig (line 140) | class SamVisionConfig(PretrainedConfig): method __init__ (line 200) | def __init__( class SamConfig (line 254) | class SamConfig(PretrainedConfig): method __init__ (line 307) | def __init__( method to_dict (line 332) | def to_dict(self): FILE: transformers/models/sam/convert_sam_original_to_hf_format.py function replace_keys (line 61) | def replace_keys(state_dict): function convert_sam_checkpoint (line 91) | def convert_sam_checkpoint(model_name, pytorch_dump_folder, push_to_hub,... FILE: transformers/models/sam/image_processing_sam.py class SamImageProcessor (line 63) | class SamImageProcessor(BaseImageProcessor): method __init__ (line 107) | def __init__( method pad_image (line 141) | def pad_image( method _get_preprocess_shape (line 169) | def _get_preprocess_shape(self, old_shape: Tuple[int, int], longest_ed... method resize (line 180) | def resize( method rescale (line 215) | def rescale( method normalize (line 235) | def normalize( method preprocess (line 258) | def preprocess( method post_process_masks (line 387) | def post_process_masks( method _post_process_masks_pt (line 442) | def _post_process_masks_pt( method _post_process_masks_tf (line 489) | def _post_process_masks_tf( method post_process_for_mask_generation (line 531) | def post_process_for_mask_generation( method generate_crop_boxes (line 554) | def generate_crop_boxes( method filter_masks (line 615) | def filter_masks( method _filter_masks_pt (line 676) | def _filter_masks_pt( method _filter_masks_tf (line 756) | def _filter_masks_tf( function _compute_stability_score_pt (line 834) | def _compute_stability_score_pt(masks: "torch.Tensor", mask_threshold: f... function _compute_stability_score_tf (line 845) | def _compute_stability_score_tf(masks: "tf.Tensor", mask_threshold: floa... function _build_point_grid (line 856) | def _build_point_grid(n_per_side: int) -> np.ndarray: function _normalize_coordinates (line 866) | def _normalize_coordinates( function _generate_crop_boxes (line 894) | def _generate_crop_boxes( function _generate_per_layer_crops (line 947) | def _generate_per_layer_crops(crop_n_layers, overlap_ratio, original_size): function _generate_crop_images (line 981) | def _generate_crop_images(crop_boxes, image, points_grid, layer_idxs, ta... function _pad_masks (line 1009) | def _pad_masks(masks, crop_box: List[int], orig_height: int, orig_width:... function _pad_masks_tf (line 1019) | def _pad_masks_tf(masks, crop_box: List[int], orig_height: int, orig_wid... function _is_box_near_crop_edge (line 1029) | def _is_box_near_crop_edge(boxes, crop_box, orig_box, atol=20.0): function _is_box_near_crop_edge_tf (line 1047) | def _is_box_near_crop_edge_tf(boxes, crop_box, orig_box, atol=20.0): function _batched_mask_to_box (line 1065) | def _batched_mask_to_box(masks: "torch.Tensor"): function _batched_mask_to_box_tf (line 1114) | def _batched_mask_to_box_tf(masks: "tf.Tensor"): function _mask_to_rle_pytorch (line 1162) | def _mask_to_rle_pytorch(input_mask: "torch.Tensor"): function _mask_to_rle_tf (line 1185) | def _mask_to_rle_tf(input_mask: "tf.Tensor"): function _rle_to_mask (line 1208) | def _rle_to_mask(rle: Dict[str, Any]) -> np.ndarray: function _postprocess_for_mg (line 1222) | def _postprocess_for_mg(rle_masks, iou_scores, mask_boxes, amg_crops_nms... function _postprocess_for_mg_tf (line 1251) | def _postprocess_for_mg_tf(rle_masks, iou_scores, mask_boxes, amg_crops_... FILE: transformers/models/sam/modeling_sam.py class SamVisionEncoderOutput (line 49) | class SamVisionEncoderOutput(ModelOutput): class SamImageSegmentationOutput (line 79) | class SamImageSegmentationOutput(ModelOutput): class SamPatchEmbeddings (line 114) | class SamPatchEmbeddings(nn.Module): method __init__ (line 121) | def __init__(self, config): method forward (line 135) | def forward(self, pixel_values): class SamMLPBlock (line 149) | class SamMLPBlock(nn.Module): method __init__ (line 150) | def __init__(self, config): method forward (line 156) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SamLayerNorm (line 164) | class SamLayerNorm(nn.Module): method __init__ (line 170) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 180) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SamAttention (line 194) | class SamAttention(nn.Module): method __init__ (line 200) | def __init__(self, config, downsample_rate=None): method _separate_heads (line 216) | def _separate_heads(self, hidden_states: Tensor, num_attention_heads: ... method _recombine_heads (line 222) | def _recombine_heads(self, hidden_states: Tensor, point_batch_size: in... method forward (line 227) | def forward(self, query: Tensor, key: Tensor, value: Tensor, attention... class SamTwoWayAttentionBlock (line 257) | class SamTwoWayAttentionBlock(nn.Module): method __init__ (line 258) | def __init__(self, config, attention_downsample_rate: int = 2, skip_fi... method forward (line 291) | def forward( class SamTwoWayTransformer (line 344) | class SamTwoWayTransformer(nn.Module): method __init__ (line 345) | def __init__(self, config: SamMaskDecoderConfig): method forward (line 358) | def forward( class SamFeedForward (line 415) | class SamFeedForward(nn.Module): method __init__ (line 416) | def __init__( method forward (line 427) | def forward(self, hidden_states): class SamMaskDecoder (line 439) | class SamMaskDecoder(nn.Module): method __init__ (line 440) | def __init__(self, config: SamMaskDecoderConfig): method forward (line 468) | def forward( class SamPositionalEmbedding (line 565) | class SamPositionalEmbedding(nn.Module): method __init__ (line 566) | def __init__(self, config): method forward (line 571) | def forward(self, input_coords, input_shape=None): class SamMaskEmbedding (line 588) | class SamMaskEmbedding(nn.Module): method __init__ (line 589) | def __init__(self, config: SamPromptEncoderConfig): method forward (line 603) | def forward(self, masks): class SamPromptEncoder (line 615) | class SamPromptEncoder(nn.Module): method __init__ (line 616) | def __init__(self, config: SamPromptEncoderConfig, shared_patch_embedd... method _embed_points (line 631) | def _embed_points(self, points: torch.Tensor, labels: torch.Tensor, pa... method _embed_boxes (line 669) | def _embed_boxes(self, boxes: torch.Tensor) -> torch.Tensor: method forward (line 680) | def forward( class SamVisionAttention (line 727) | class SamVisionAttention(nn.Module): method __init__ (line 730) | def __init__(self, config, window_size): method get_rel_pos (line 755) | def get_rel_pos(self, q_size: int, k_size: int, rel_pos: torch.Tensor)... method add_decomposed_rel_pos (line 787) | def add_decomposed_rel_pos( method forward (line 832) | def forward(self, hidden_states: torch.Tensor, output_attentions=False... class SamVisionLayer (line 867) | class SamVisionLayer(nn.Module): method __init__ (line 868) | def __init__(self, config, window_size): method window_partition (line 876) | def window_partition(self, hidden_states: torch.Tensor, window_size: i... method window_unpartition (line 900) | def window_unpartition( method forward (line 930) | def forward( class SamVisionNeck (line 962) | class SamVisionNeck(nn.Module): method __init__ (line 963) | def __init__(self, config: SamVisionConfig): method forward (line 972) | def forward(self, hidden_states): class SamVisionEncoder (line 982) | class SamVisionEncoder(nn.Module): method __init__ (line 983) | def __init__(self, config: SamVisionConfig): method get_input_embeddings (line 1014) | def get_input_embeddings(self): method forward (line 1017) | def forward( class SamPreTrainedModel (line 1084) | class SamPreTrainedModel(PreTrainedModel): method _init_weights (line 1089) | def _init_weights(self, module): class SamModel (line 1192) | class SamModel(SamPreTrainedModel): method __init__ (line 1195) | def __init__(self, config): method get_input_embeddings (line 1205) | def get_input_embeddings(self): method get_image_wide_positional_embeddings (line 1208) | def get_image_wide_positional_embeddings(self): method get_image_embeddings (line 1222) | def get_image_embeddings( method get_prompt_embeddings (line 1253) | def get_prompt_embeddings( method forward (line 1286) | def forward( FILE: transformers/models/sam/modeling_tf_sam.py class TFSamVisionEncoderOutput (line 52) | class TFSamVisionEncoderOutput(ModelOutput): class TFSamImageSegmentationOutput (line 82) | class TFSamImageSegmentationOutput(ModelOutput): class TFSamPatchEmbeddings (line 117) | class TFSamPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 124) | def __init__(self, config, **kwargs): method call (line 140) | def call(self, pixel_values): class TFSamMLPBlock (line 154) | class TFSamMLPBlock(tf.keras.layers.Layer): method __init__ (line 155) | def __init__(self, config, **kwargs): method call (line 161) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFSamLayerNorm (line 168) | class TFSamLayerNorm(tf.keras.layers.Layer): method __init__ (line 174) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method build (line 182) | def build(self, input_shape): method call (line 187) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSamAttention (line 195) | class TFSamAttention(tf.keras.layers.Layer): method __init__ (line 201) | def __init__(self, config, downsample_rate=None, **kwargs): method _separate_heads (line 217) | def _separate_heads(self, hidden_states: tf.Tensor, num_attention_head... method _recombine_heads (line 225) | def _recombine_heads(self, hidden_states: tf.Tensor, point_batch_size:... method call (line 233) | def call(self, query: tf.Tensor, key: tf.Tensor, value: tf.Tensor) -> ... class TFSamTwoWayAttentionBlock (line 261) | class TFSamTwoWayAttentionBlock(tf.keras.layers.Layer): method __init__ (line 262) | def __init__(self, config, attention_downsample_rate: int = 2, skip_fi... method call (line 299) | def call( class TFSamTwoWayTransformer (line 349) | class TFSamTwoWayTransformer(tf.keras.layers.Layer): method __init__ (line 350) | def __init__(self, config: SamMaskDecoderConfig, **kwargs): method call (line 365) | def call( class TFSamFeedForward (line 416) | class TFSamFeedForward(tf.keras.layers.Layer): method __init__ (line 417) | def __init__( method call (line 431) | def call(self, hidden_states): class TFSamMaskDecoder (line 443) | class TFSamMaskDecoder(tf.keras.layers.Layer): method __init__ (line 444) | def __init__(self, config: SamMaskDecoderConfig, **kwargs): method build (line 486) | def build(self, input_shape): method call (line 493) | def call( class TFSamPositionalEmbedding (line 570) | class TFSamPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 571) | def __init__(self, config, **kwargs): method build (line 576) | def build(self, input_shape): method call (line 586) | def call(self, input_coords, input_shape=None): class TFSamMaskEmbedding (line 608) | class TFSamMaskEmbedding(tf.keras.layers.Layer): method __init__ (line 609) | def __init__(self, config: SamPromptEncoderConfig, **kwargs): method call (line 619) | def call(self, masks): method build (line 632) | def build(self, input_shape): class TFSamPromptEncoder (line 652) | class TFSamPromptEncoder(tf.keras.layers.Layer): method __init__ (line 653) | def __init__(self, config: SamPromptEncoderConfig, shared_patch_embedd... method build (line 667) | def build(self, input_shape): method _embed_points (line 696) | def _embed_points(self, points: tf.Tensor, labels: tf.Tensor, pad: boo... method _embed_boxes (line 724) | def _embed_boxes(self, boxes: tf.Tensor) -> tf.Tensor: method call (line 738) | def call( class TFSamVisionAttention (line 788) | class TFSamVisionAttention(tf.keras.layers.Layer): method __init__ (line 791) | def __init__(self, config, window_size, **kwargs): method build (line 814) | def build(self, input_shape): method get_rel_pos (line 825) | def get_rel_pos(self, q_size: int, k_size: int, rel_pos: tf.Tensor) ->... method add_decomposed_rel_pos (line 861) | def add_decomposed_rel_pos( method call (line 906) | def call(self, hidden_states: tf.Tensor, output_attentions=False, trai... class TFSamVisionLayer (line 943) | class TFSamVisionLayer(tf.keras.layers.Layer): method __init__ (line 944) | def __init__(self, config, window_size, **kwargs): method window_partition (line 952) | def window_partition(self, hidden_states: tf.Tensor, window_size: int)... method window_unpartition (line 970) | def window_unpartition( method call (line 987) | def call( class TFSamVisionNeck (line 1019) | class TFSamVisionNeck(tf.keras.layers.Layer): method __init__ (line 1020) | def __init__(self, config: SamVisionConfig, **kwargs): method call (line 1040) | def call(self, hidden_states): class TFSamVisionEncoder (line 1050) | class TFSamVisionEncoder(tf.keras.layers.Layer): method __init__ (line 1051) | def __init__(self, config: SamVisionConfig, **kwargs): method build (line 1071) | def build(self, input_shape): method get_input_embeddings (line 1087) | def get_input_embeddings(self): method call (line 1090) | def call( class TFSamPreTrainedModel (line 1145) | class TFSamPreTrainedModel(TFPreTrainedModel): class TFSamModel (line 1236) | class TFSamModel(TFSamPreTrainedModel): method __init__ (line 1239) | def __init__(self, config, **kwargs): method get_input_embeddings (line 1250) | def get_input_embeddings(self): method get_image_wide_positional_embeddings (line 1253) | def get_image_wide_positional_embeddings(self): method get_image_embeddings (line 1264) | def get_image_embeddings( method get_prompt_embeddings (line 1294) | def get_prompt_embeddings( method call (line 1328) | def call( method serving_output (line 1454) | def serving_output(self, output: TFSamImageSegmentationOutput) -> TFSa... FILE: transformers/models/sam/processing_sam.py class SamProcessor (line 35) | class SamProcessor(ProcessorMixin): method __init__ (line 50) | def __init__(self, image_processor): method __call__ (line 56) | def __call__( method _normalize_and_convert (line 98) | def _normalize_and_convert( method _pad_points_and_labels (line 173) | def _pad_points_and_labels(self, input_points, input_labels): method _normalize_coordinates (line 189) | def _normalize_coordinates( method _check_and_preprocess_points (line 210) | def _check_and_preprocess_points( method model_input_names (line 258) | def model_input_names(self): method post_process_masks (line 262) | def post_process_masks(self, *args, **kwargs): FILE: transformers/models/segformer/configuration_segformer.py class SegformerConfig (line 38) | class SegformerConfig(PretrainedConfig): method __init__ (line 105) | def __init__( class SegformerOnnxConfig (line 157) | class SegformerOnnxConfig(OnnxConfig): method inputs (line 161) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 169) | def atol_for_validation(self) -> float: method default_onnx_opset (line 173) | def default_onnx_opset(self) -> int: FILE: transformers/models/segformer/convert_segformer_original_to_pytorch.py function rename_keys (line 41) | def rename_keys(state_dict, encoder_only=False): function read_in_k_v (line 92) | def read_in_k_v(state_dict, config): function prepare_img (line 113) | def prepare_img(): function convert_segformer_checkpoint (line 121) | def convert_segformer_checkpoint(model_name, checkpoint_path, pytorch_du... FILE: transformers/models/segformer/feature_extraction_segformer.py class SegformerFeatureExtractor (line 26) | class SegformerFeatureExtractor(SegformerImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/segformer/image_processing_segformer.py class SegformerImageProcessor (line 47) | class SegformerImageProcessor(BaseImageProcessor): method __init__ (line 85) | def __init__( method reduce_labels (line 120) | def reduce_labels(self): method from_dict (line 129) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method resize (line 140) | def resize( method rescale (line 168) | def rescale( method normalize (line 188) | def normalize( method reduce_label (line 211) | def reduce_label(self, label: ImageInput) -> np.ndarray: method _preprocess (line 219) | def _preprocess( method _preprocess_image (line 246) | def _preprocess_image( method _preprocess_mask (line 278) | def _preprocess_mask( method __call__ (line 308) | def __call__(self, images, segmentation_maps=None, **kwargs): method preprocess (line 317) | def preprocess( method post_process_semantic_segmentation (line 442) | def post_process_semantic_segmentation(self, outputs, target_sizes: Li... FILE: transformers/models/segformer/modeling_segformer.py class SegFormerImageClassifierOutput (line 60) | class SegFormerImageClassifierOutput(ImageClassifierOutput): function drop_path (line 88) | def drop_path(input, drop_prob: float = 0.0, training: bool = False, sca... class SegformerDropPath (line 109) | class SegformerDropPath(nn.Module): method __init__ (line 112) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 116) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 119) | def extra_repr(self) -> str: class SegformerOverlapPatchEmbeddings (line 123) | class SegformerOverlapPatchEmbeddings(nn.Module): method __init__ (line 126) | def __init__(self, patch_size, stride, num_channels, hidden_size): method forward (line 138) | def forward(self, pixel_values): class SegformerEfficientSelfAttention (line 148) | class SegformerEfficientSelfAttention(nn.Module): method __init__ (line 152) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method transpose_for_scores (line 179) | def transpose_for_scores(self, hidden_states): method forward (line 184) | def forward( class SegformerSelfOutput (line 229) | class SegformerSelfOutput(nn.Module): method __init__ (line 230) | def __init__(self, config, hidden_size): method forward (line 235) | def forward(self, hidden_states, input_tensor): class SegformerAttention (line 241) | class SegformerAttention(nn.Module): method __init__ (line 242) | def __init__(self, config, hidden_size, num_attention_heads, sequence_... method prune_heads (line 253) | def prune_heads(self, heads): method forward (line 271) | def forward(self, hidden_states, height, width, output_attentions=False): class SegformerDWConv (line 279) | class SegformerDWConv(nn.Module): method __init__ (line 280) | def __init__(self, dim=768): method forward (line 284) | def forward(self, hidden_states, height, width): class SegformerMixFFN (line 293) | class SegformerMixFFN(nn.Module): method __init__ (line 294) | def __init__(self, config, in_features, hidden_features=None, out_feat... method forward (line 306) | def forward(self, hidden_states, height, width): class SegformerLayer (line 316) | class SegformerLayer(nn.Module): method __init__ (line 319) | def __init__(self, config, hidden_size, num_attention_heads, drop_path... method forward (line 333) | def forward(self, hidden_states, height, width, output_attentions=False): class SegformerEncoder (line 359) | class SegformerEncoder(nn.Module): method __init__ (line 360) | def __init__(self, config): method forward (line 408) | def forward( class SegformerPreTrainedModel (line 450) | class SegformerPreTrainedModel(PreTrainedModel): method _init_weights (line 460) | def _init_weights(self, module): class SegformerModel (line 510) | class SegformerModel(SegformerPreTrainedModel): method __init__ (line 511) | def __init__(self, config): method _prune_heads (line 521) | def _prune_heads(self, heads_to_prune): method forward (line 537) | def forward( class SegformerForImageClassification (line 575) | class SegformerForImageClassification(SegformerPreTrainedModel): method __init__ (line 576) | def __init__(self, config): method forward (line 595) | def forward( class SegformerMLP (line 666) | class SegformerMLP(nn.Module): method __init__ (line 671) | def __init__(self, config: SegformerConfig, input_dim): method forward (line 675) | def forward(self, hidden_states: torch.Tensor): class SegformerDecodeHead (line 681) | class SegformerDecodeHead(SegformerPreTrainedModel): method __init__ (line 682) | def __init__(self, config): method forward (line 706) | def forward(self, encoder_hidden_states: torch.FloatTensor) -> torch.T... class SegformerForSemanticSegmentation (line 743) | class SegformerForSemanticSegmentation(SegformerPreTrainedModel): method __init__ (line 744) | def __init__(self, config): method forward (line 754) | def forward( FILE: transformers/models/segformer/modeling_tf_segformer.py class TFSegformerDropPath (line 59) | class TFSegformerDropPath(tf.keras.layers.Layer): method __init__ (line 65) | def __init__(self, drop_path, **kwargs): method call (line 69) | def call(self, x, training=None): class TFSegformerOverlapPatchEmbeddings (line 79) | class TFSegformerOverlapPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 82) | def __init__(self, patch_size, stride, hidden_size, **kwargs): method call (line 91) | def call(self, pixel_values: tf.Tensor) -> Tuple[tf.Tensor, int, int]: class TFSegformerEfficientSelfAttention (line 103) | class TFSegformerEfficientSelfAttention(tf.keras.layers.Layer): method __init__ (line 107) | def __init__( method transpose_for_scores (line 142) | def transpose_for_scores(self, tensor: tf.Tensor) -> tf.Tensor: method call (line 152) | def call( class TFSegformerSelfOutput (line 200) | class TFSegformerSelfOutput(tf.keras.layers.Layer): method __init__ (line 201) | def __init__(self, config: SegformerConfig, hidden_size: int, **kwargs): method call (line 206) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFSegformerAttention (line 212) | class TFSegformerAttention(tf.keras.layers.Layer): method __init__ (line 213) | def __init__( method call (line 231) | def call( class TFSegformerDWConv (line 241) | class TFSegformerDWConv(tf.keras.layers.Layer): method __init__ (line 242) | def __init__(self, dim: int = 768, **kwargs): method call (line 248) | def call(self, hidden_states: tf.Tensor, height: int, width: int) -> t... class TFSegformerMixFFN (line 261) | class TFSegformerMixFFN(tf.keras.layers.Layer): method __init__ (line 262) | def __init__( method call (line 281) | def call(self, hidden_states: tf.Tensor, height: int, width: int, trai... class TFSegformerLayer (line 291) | class TFSegformerLayer(tf.keras.layers.Layer): method __init__ (line 294) | def __init__( method call (line 318) | def call( class TFSegformerEncoder (line 351) | class TFSegformerEncoder(tf.keras.layers.Layer): method __init__ (line 352) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 402) | def call( class TFSegformerMainLayer (line 454) | class TFSegformerMainLayer(tf.keras.layers.Layer): method __init__ (line 457) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 465) | def call( class TFSegformerPreTrainedModel (line 513) | class TFSegformerPreTrainedModel(TFPreTrainedModel): method input_signature (line 524) | def input_signature(self): class TFSegformerModel (line 574) | class TFSegformerModel(TFSegformerPreTrainedModel): method __init__ (line 575) | def __init__(self, config: SegformerConfig, *inputs, **kwargs): method call (line 591) | def call( class TFSegformerForImageClassification (line 616) | class TFSegformerForImageClassification(TFSegformerPreTrainedModel, TFSe... method __init__ (line 617) | def __init__(self, config: SegformerConfig, *inputs, **kwargs): method call (line 634) | def call( class TFSegformerMLP (line 672) | class TFSegformerMLP(tf.keras.layers.Layer): method __init__ (line 677) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 681) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFSegformerDecodeHead (line 690) | class TFSegformerDecodeHead(TFSegformerPreTrainedModel): method __init__ (line 691) | def __init__(self, config: SegformerConfig, **kwargs): method call (line 712) | def call(self, encoder_hidden_states, training: bool = False): class TFSegformerForSemanticSegmentation (line 750) | class TFSegformerForSemanticSegmentation(TFSegformerPreTrainedModel): method __init__ (line 751) | def __init__(self, config: SegformerConfig, **kwargs): method hf_compute_loss (line 756) | def hf_compute_loss(self, logits, labels): method call (line 779) | def call( FILE: transformers/models/sew/configuration_sew.py class SEWConfig (line 32) | class SEWConfig(PretrainedConfig): method __init__ (line 157) | def __init__( method inputs_to_logits_ratio (line 254) | def inputs_to_logits_ratio(self): FILE: transformers/models/sew/convert_sew_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 62) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 90) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 134) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 174) | def convert_config(model, is_finetuned): function convert_sew_checkpoint (line 224) | def convert_sew_checkpoint( FILE: transformers/models/sew/modeling_sew.py function _compute_mask_indices (line 67) | def _compute_mask_indices( class SEWNoLayerNormConvLayer (line 187) | class SEWNoLayerNormConvLayer(nn.Module): method __init__ (line 188) | def __init__(self, config, layer_id=0): method forward (line 202) | def forward(self, hidden_states): class SEWLayerNormConvLayer (line 209) | class SEWLayerNormConvLayer(nn.Module): method __init__ (line 210) | def __init__(self, config, layer_id=0): method forward (line 225) | def forward(self, hidden_states): class SEWGroupNormConvLayer (line 237) | class SEWGroupNormConvLayer(nn.Module): method __init__ (line 238) | def __init__(self, config, layer_id=0): method forward (line 254) | def forward(self, hidden_states): class SEWPositionalConvEmbedding (line 261) | class SEWPositionalConvEmbedding(nn.Module): method __init__ (line 262) | def __init__(self, config): method forward (line 286) | def forward(self, hidden_states): class SEWSamePadLayer (line 295) | class SEWSamePadLayer(nn.Module): method __init__ (line 296) | def __init__(self, num_conv_pos_embeddings): method forward (line 300) | def forward(self, hidden_states): class SEWUpsampling (line 306) | class SEWUpsampling(nn.Module): method __init__ (line 307) | def __init__(self, config): method forward (line 313) | def forward(self, hidden_states): class SEWFeatureEncoder (line 329) | class SEWFeatureEncoder(nn.Module): method __init__ (line 332) | def __init__(self, config): method _freeze_parameters (line 349) | def _freeze_parameters(self): method forward (line 354) | def forward(self, input_values): class SEWFeatureExtractor (line 380) | class SEWFeatureExtractor(SEWFeatureEncoder): method __init__ (line 381) | def __init__(self, config): class SEWAttention (line 392) | class SEWAttention(nn.Module): method __init__ (line 395) | def __init__( method _shape (line 422) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 425) | def forward( class SEWFeedForward (line 547) | class SEWFeedForward(nn.Module): method __init__ (line 548) | def __init__(self, config): method forward (line 561) | def forward(self, hidden_states): class SEWEncoderLayer (line 572) | class SEWEncoderLayer(nn.Module): method __init__ (line 573) | def __init__(self, config): method forward (line 586) | def forward(self, hidden_states, attention_mask=None, output_attention... class SEWEncoder (line 606) | class SEWEncoder(nn.Module): method __init__ (line 607) | def __init__(self, config): method forward (line 618) | def forward( class SEWPreTrainedModel (line 716) | class SEWPreTrainedModel(PreTrainedModel): method _init_weights (line 728) | def _init_weights(self, module): method _set_gradient_checkpointing (line 760) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 764) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 779) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... class SEWModel (line 842) | class SEWModel(SEWPreTrainedModel): method __init__ (line 843) | def __init__(self, config: SEWConfig): method _mask_hidden_states (line 863) | def _mask_hidden_states( method forward (line 917) | def forward( class SEWForCTC (line 971) | class SEWForCTC(SEWPreTrainedModel): method __init__ (line 972) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1000) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1012) | def freeze_feature_encoder(self): method forward (line 1027) | def forward( class SEWForSequenceClassification (line 1107) | class SEWForSequenceClassification(SEWPreTrainedModel): method __init__ (line 1108) | def __init__(self, config): method freeze_feature_extractor (line 1125) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1137) | def freeze_feature_encoder(self): method freeze_base_model (line 1144) | def freeze_base_model(self): method forward (line 1161) | def forward( FILE: transformers/models/sew_d/configuration_sew_d.py class SEWDConfig (line 32) | class SEWDConfig(PretrainedConfig): method __init__ (line 172) | def __init__( method inputs_to_logits_ratio (line 281) | def inputs_to_logits_ratio(self): FILE: transformers/models/sew_d/convert_sew_d_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 64) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 92) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 138) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_config (line 178) | def convert_config(model, is_finetuned): function convert_sew_checkpoint (line 236) | def convert_sew_checkpoint( FILE: transformers/models/sew_d/modeling_sew_d.py function _compute_mask_indices (line 73) | def _compute_mask_indices( function make_log_bucket_position (line 193) | def make_log_bucket_position(relative_pos, bucket_size, max_position): function build_relative_position (line 209) | def build_relative_position(query_size, key_size, bucket_size=-1, max_po... function c2p_dynamic_expand (line 241) | def c2p_dynamic_expand(c2p_pos, query_layer, relative_pos): function p2c_dynamic_expand (line 247) | def p2c_dynamic_expand(c2p_pos, query_layer, key_layer): function pos_dynamic_expand (line 253) | def pos_dynamic_expand(pos_index, p2c_att, key_layer): function get_mask (line 258) | def get_mask(input, local_context): class SEWDNoLayerNormConvLayer (line 278) | class SEWDNoLayerNormConvLayer(nn.Module): method __init__ (line 279) | def __init__(self, config, layer_id=0): method forward (line 293) | def forward(self, hidden_states): class SEWDLayerNormConvLayer (line 300) | class SEWDLayerNormConvLayer(nn.Module): method __init__ (line 301) | def __init__(self, config, layer_id=0): method forward (line 316) | def forward(self, hidden_states): class SEWDGroupNormConvLayer (line 328) | class SEWDGroupNormConvLayer(nn.Module): method __init__ (line 329) | def __init__(self, config, layer_id=0): method forward (line 345) | def forward(self, hidden_states): class SEWDPositionalConvEmbedding (line 353) | class SEWDPositionalConvEmbedding(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 378) | def forward(self, hidden_states): class SEWDSamePadLayer (line 387) | class SEWDSamePadLayer(nn.Module): method __init__ (line 388) | def __init__(self, num_conv_pos_embeddings): method forward (line 392) | def forward(self, hidden_states): class SEWDUpsampling (line 399) | class SEWDUpsampling(nn.Module): method __init__ (line 400) | def __init__(self, config): method forward (line 406) | def forward(self, hidden_states): class SEWDFeatureEncoder (line 422) | class SEWDFeatureEncoder(nn.Module): method __init__ (line 425) | def __init__(self, config): method _freeze_parameters (line 442) | def _freeze_parameters(self): method forward (line 447) | def forward(self, input_values): class SEWDFeatureExtractor (line 473) | class SEWDFeatureExtractor(SEWDFeatureEncoder): method __init__ (line 474) | def __init__(self, config): class ContextPooler (line 485) | class ContextPooler(nn.Module): method __init__ (line 486) | def __init__(self, config): method forward (line 492) | def forward(self, hidden_states): method output_dim (line 503) | def output_dim(self): class XSoftmax (line 508) | class XSoftmax(torch.autograd.Function): method forward (line 537) | def forward(self, input, mask, dim): method backward (line 548) | def backward(self, grad_output): method symbolic (line 554) | def symbolic(g, self, mask, dim): class DropoutContext (line 572) | class DropoutContext(object): method __init__ (line 573) | def __init__(self): class XDropout (line 581) | class XDropout(torch.autograd.Function): method forward (line 585) | def forward(ctx, input, local_ctx): method backward (line 595) | def backward(ctx, grad_output): method symbolic (line 603) | def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Unio... class StableDropout (line 621) | class StableDropout(nn.Module): method __init__ (line 629) | def __init__(self, drop_prob): method forward (line 635) | def forward(self, x): method clear_context (line 646) | def clear_context(self): method init_context (line 650) | def init_context(self, reuse_mask=True, scale=1): method get_context (line 658) | def get_context(self): class SEWDSelfOutput (line 671) | class SEWDSelfOutput(nn.Module): method __init__ (line 672) | def __init__(self, config): method forward (line 678) | def forward(self, hidden_states, input_tensor): class DisentangledSelfAttention (line 686) | class DisentangledSelfAttention(nn.Module): method __init__ (line 697) | def __init__(self, config): method transpose_for_scores (line 735) | def transpose_for_scores(self, x, attention_heads): method forward (line 740) | def forward( method disentangled_attention_bias (line 824) | def disentangled_attention_bias(self, query_layer, key_layer, relative... class SEWDAttention (line 908) | class SEWDAttention(nn.Module): method __init__ (line 909) | def __init__(self, config): method forward (line 915) | def forward( class SEWDIntermediate (line 945) | class SEWDIntermediate(nn.Module): method __init__ (line 946) | def __init__(self, config): method forward (line 954) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SEWDOutput (line 961) | class SEWDOutput(nn.Module): method __init__ (line 962) | def __init__(self, config): method forward (line 969) | def forward(self, hidden_states, input_tensor): class SEWDLayer (line 977) | class SEWDLayer(nn.Module): method __init__ (line 978) | def __init__(self, config): method forward (line 984) | def forward( class ConvLayer (line 1012) | class ConvLayer(nn.Module): method __init__ (line 1013) | def __init__(self, config): method forward (line 1025) | def forward(self, hidden_states, residual_states, input_mask): class SEWDTransformerEncoder (line 1049) | class SEWDTransformerEncoder(nn.Module): method __init__ (line 1052) | def __init__(self, config): method get_rel_embedding (line 1079) | def get_rel_embedding(self): method get_attention_mask (line 1085) | def get_attention_mask(self, attention_mask): method get_rel_pos (line 1094) | def get_rel_pos(self, hidden_states, query_states=None, relative_pos=N... method forward (line 1106) | def forward( class SEWDEncoder (line 1188) | class SEWDEncoder(nn.Module): method __init__ (line 1189) | def __init__(self, config): method forward (line 1198) | def forward( class SEWDPreTrainedModel (line 1251) | class SEWDPreTrainedModel(PreTrainedModel): method _init_weights (line 1263) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1299) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1314) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _set_gradient_checkpointing (line 1326) | def _set_gradient_checkpointing(self, module, value=False): class SEWDModel (line 1382) | class SEWDModel(SEWDPreTrainedModel): method __init__ (line 1383) | def __init__(self, config: SEWDConfig): method _mask_hidden_states (line 1403) | def _mask_hidden_states( method forward (line 1457) | def forward( class SEWDForCTC (line 1511) | class SEWDForCTC(SEWDPreTrainedModel): method __init__ (line 1512) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1540) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1552) | def freeze_feature_encoder(self): method forward (line 1567) | def forward( class SEWDForSequenceClassification (line 1647) | class SEWDForSequenceClassification(SEWDPreTrainedModel): method __init__ (line 1648) | def __init__(self, config): method freeze_feature_extractor (line 1665) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1677) | def freeze_feature_encoder(self): method freeze_base_model (line 1684) | def freeze_base_model(self): method forward (line 1701) | def forward( FILE: transformers/models/speech_encoder_decoder/configuration_speech_encoder_decoder.py class SpeechEncoderDecoderConfig (line 27) | class SpeechEncoderDecoderConfig(PretrainedConfig): method __init__ (line 76) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 94) | def from_encoder_decoder_configs( method to_dict (line 110) | def to_dict(self): FILE: transformers/models/speech_encoder_decoder/convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py function set_recursively (line 69) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights_wav2vec2 (line 97) | def recursively_load_weights_wav2vec2(fairseq_model, hf_model): function load_conv_layer (line 143) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function load_adapter (line 183) | def load_adapter(full_name, value, adapter, unused_weights): function make_linear_from_emb (line 237) | def make_linear_from_emb(emb): function convert_wav2vec2_checkpoint (line 245) | def convert_wav2vec2_checkpoint( FILE: transformers/models/speech_encoder_decoder/convert_speech_to_text_wav2vec2_seq2seq_original_to_pytorch.py function set_recursively (line 71) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights_wav2vec2 (line 99) | def recursively_load_weights_wav2vec2(fairseq_model, hf_model): function load_conv_layer (line 149) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function make_linear_from_emb (line 189) | def make_linear_from_emb(emb): function create_vocab_dict (line 196) | def create_vocab_dict(dict_path): function convert_wav2vec2_checkpoint (line 215) | def convert_wav2vec2_checkpoint( FILE: transformers/models/speech_encoder_decoder/modeling_flax_speech_encoder_decoder.py class FlaxSpeechEncoderDecoderModule (line 200) | class FlaxSpeechEncoderDecoderModule(nn.Module): method setup (line 204) | def setup(self): method _get_feat_extract_output_lengths (line 230) | def _get_feat_extract_output_lengths( method _get_encoder_module (line 253) | def _get_encoder_module(self): method _get_projection_module (line 256) | def _get_projection_module(self): method _get_decoder_module (line 259) | def _get_decoder_module(self): method __call__ (line 262) | def __call__( class FlaxSpeechEncoderDecoderModel (line 329) | class FlaxSpeechEncoderDecoderModel(FlaxPreTrainedModel): method __init__ (line 341) | def __init__( method init_weights (line 377) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 420) | def init_cache(self, batch_size, max_length, encoder_outputs): method _get_feat_extract_output_lengths (line 461) | def _get_feat_extract_output_lengths( method encode (line 468) | def encode( method decode (line 538) | def decode( method __call__ (line 662) | def __call__( method prepare_inputs_for_generation (line 744) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 777) | def update_inputs_for_generation(self, model_outputs, model_kwargs): method from_encoder_decoder_pretrained (line 783) | def from_encoder_decoder_pretrained( FILE: transformers/models/speech_encoder_decoder/modeling_speech_encoder_decoder.py function shift_tokens_right (line 154) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class SpeechEncoderDecoderModel (line 173) | class SpeechEncoderDecoderModel(PreTrainedModel): method __init__ (line 185) | def __init__( method _set_gradient_checkpointing (line 252) | def _set_gradient_checkpointing(self, module, value=False): method get_encoder (line 257) | def get_encoder(self): method get_decoder (line 260) | def get_decoder(self): method get_output_embeddings (line 263) | def get_output_embeddings(self): method set_output_embeddings (line 266) | def set_output_embeddings(self, new_embeddings): method freeze_feature_encoder (line 269) | def freeze_feature_encoder(self): method from_pretrained (line 277) | def from_pretrained(cls, *args, **kwargs): method from_encoder_decoder_pretrained (line 288) | def from_encoder_decoder_pretrained( method forward (line 444) | def forward( method prepare_decoder_input_ids_from_labels (line 582) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 585) | def prepare_inputs_for_generation( method resize_token_embeddings (line 600) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 606) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/speech_to_text/configuration_speech_to_text.py class Speech2TextConfig (line 31) | class Speech2TextConfig(PretrainedConfig): method __init__ (line 116) | def __init__( FILE: transformers/models/speech_to_text/convert_s2t_fairseq_to_tfms.py function remove_ignore_keys_ (line 23) | def remove_ignore_keys_(state_dict): function rename_keys (line 38) | def rename_keys(s_dict): function make_linear_from_emb (line 47) | def make_linear_from_emb(emb): function convert_fairseq_s2t_checkpoint_to_tfms (line 54) | def convert_fairseq_s2t_checkpoint_to_tfms(checkpoint_path, pytorch_dump... FILE: transformers/models/speech_to_text/feature_extraction_speech_to_text.py class Speech2TextFeatureExtractor (line 33) | class Speech2TextFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 62) | def __init__( method _extract_fbank_features (line 80) | def _extract_fbank_features( method utterance_cmvn (line 94) | def utterance_cmvn( method normalize (line 117) | def normalize( method __call__ (line 126) | def __call__( FILE: transformers/models/speech_to_text/modeling_speech_to_text.py function shift_tokens_right (line 50) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 67) | def _make_causal_mask( function _expand_mask (line 85) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class Conv1dSubsampler (line 99) | class Conv1dSubsampler(nn.Module): method __init__ (line 105) | def __init__(self, config): method forward (line 125) | def forward(self, input_features): class Speech2TextSinusoidalPositionalEmbedding (line 134) | class Speech2TextSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 137) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 144) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 155) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 173) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 187) | def create_position_ids_from_input_ids( class Speech2TextAttention (line 205) | class Speech2TextAttention(nn.Module): method __init__ (line 208) | def __init__( method _shape (line 235) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 238) | def forward( class Speech2TextEncoderLayer (line 360) | class Speech2TextEncoderLayer(nn.Module): method __init__ (line 361) | def __init__(self, config: Speech2TextConfig): method forward (line 377) | def forward( class Speech2TextDecoderLayer (line 429) | class Speech2TextDecoderLayer(nn.Module): method __init__ (line 430) | def __init__(self, config: Speech2TextConfig): method forward (line 456) | def forward( class Speech2TextPreTrainedModel (line 546) | class Speech2TextPreTrainedModel(PreTrainedModel): method _init_weights (line 552) | def _init_weights(self, module): method _set_gradient_checkpointing (line 563) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 567) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... method _get_feature_vector_attention_mask (line 576) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... class Speech2TextEncoder (line 697) | class Speech2TextEncoder(Speech2TextPreTrainedModel): method __init__ (line 707) | def __init__(self, config: Speech2TextConfig): method forward (line 732) | def forward( class Speech2TextDecoder (line 853) | class Speech2TextDecoder(Speech2TextPreTrainedModel): method __init__ (line 862) | def __init__(self, config: Speech2TextConfig): method get_input_embeddings (line 886) | def get_input_embeddings(self): method set_input_embeddings (line 889) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 892) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 913) | def forward( class Speech2TextModel (line 1131) | class Speech2TextModel(Speech2TextPreTrainedModel): method __init__ (line 1132) | def __init__(self, config: Speech2TextConfig): method get_input_embeddings (line 1141) | def get_input_embeddings(self): method set_input_embeddings (line 1144) | def set_input_embeddings(self, value): method get_encoder (line 1147) | def get_encoder(self): method get_decoder (line 1150) | def get_decoder(self): method forward (line 1155) | def forward( class Speech2TextForConditionalGeneration (line 1262) | class Speech2TextForConditionalGeneration(Speech2TextPreTrainedModel): method __init__ (line 1276) | def __init__(self, config: Speech2TextConfig): method get_encoder (line 1284) | def get_encoder(self): method get_decoder (line 1287) | def get_decoder(self): method resize_token_embeddings (line 1290) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1294) | def get_output_embeddings(self): method set_output_embeddings (line 1297) | def set_output_embeddings(self, new_embeddings): method forward (line 1302) | def forward( method prepare_inputs_for_generation (line 1399) | def prepare_inputs_for_generation( method _reorder_cache (line 1427) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/speech_to_text/modeling_tf_speech_to_text.py function shift_tokens_right (line 68) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 93) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 111) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFConv1dSubsampler (line 124) | class TFConv1dSubsampler(tf.keras.layers.Layer): method __init__ (line 130) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 149) | def call(self, input_features: tf.Tensor) -> tf.Tensor: class TFSpeech2TextSinusoidalPositionalEmbedding (line 170) | class TFSpeech2TextSinusoidalPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 173) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _get_embedding (line 181) | def _get_embedding(num_embeddings: int, embedding_dim: int, padding_id... method build (line 198) | def build(self, input_shape: tf.TensorShape): method call (line 211) | def call(self, input_ids: tf.Tensor, past_key_values_length: int = 0) ... method create_position_ids_from_input_ids (line 224) | def create_position_ids_from_input_ids( class TFSpeech2TextAttention (line 241) | class TFSpeech2TextAttention(tf.keras.layers.Layer): method __init__ (line 244) | def __init__( method _shape (line 272) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 275) | def call( class TFSpeech2TextEncoderLayer (line 394) | class TFSpeech2TextEncoderLayer(tf.keras.layers.Layer): method __init__ (line 395) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 409) | def call( class TFSpeech2TextDecoderLayer (line 449) | class TFSpeech2TextDecoderLayer(tf.keras.layers.Layer): method __init__ (line 450) | def __init__(self, config: Speech2TextConfig, **kwargs): method call (line 478) | def call( class TFSpeech2TextPreTrainedModel (line 561) | class TFSpeech2TextPreTrainedModel(TFPreTrainedModel): method _get_feat_extract_output_lengths (line 566) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method input_signature (line 576) | def input_signature(self): class TFSpeech2TextEncoder (line 716) | class TFSpeech2TextEncoder(tf.keras.layers.Layer): method __init__ (line 726) | def __init__(self, config: Speech2TextConfig, **kwargs): method _get_feat_extract_output_lengths (line 749) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _get_feature_vector_attention_mask (line 758) | def _get_feature_vector_attention_mask(self, feature_vector_length, at... method call (line 778) | def call( class TFSpeech2TextDecoder (line 885) | class TFSpeech2TextDecoder(tf.keras.layers.Layer): method __init__ (line 894) | def __init__(self, config: Speech2TextConfig, **kwargs): method get_embed_tokens (line 916) | def get_embed_tokens(self): method set_embed_tokens (line 919) | def set_embed_tokens(self, embed_tokens): method call (line 923) | def call( class TFSpeech2TextMainLayer (line 1107) | class TFSpeech2TextMainLayer(tf.keras.layers.Layer): method __init__ (line 1110) | def __init__(self, config: Speech2TextConfig, **kwargs): method get_input_embeddings (line 1117) | def get_input_embeddings(self): method set_input_embeddings (line 1120) | def set_input_embeddings(self, new_embeddings): method call (line 1124) | def call( class TFSpeech2TextModel (line 1215) | class TFSpeech2TextModel(TFSpeech2TextPreTrainedModel): method __init__ (line 1216) | def __init__(self, config: Speech2TextConfig, *inputs, **kwargs): method get_encoder (line 1221) | def get_encoder(self): method get_decoder (line 1224) | def get_decoder(self): method call (line 1234) | def call( method serving_output (line 1273) | def serving_output(self, output): class TFSpeech2TextForConditionalGeneration (line 1297) | class TFSpeech2TextForConditionalGeneration(TFSpeech2TextPreTrainedModel... method __init__ (line 1298) | def __init__(self, config: Speech2TextConfig): method get_encoder (line 1305) | def get_encoder(self): method get_decoder (line 1308) | def get_decoder(self): method resize_token_embeddings (line 1311) | def resize_token_embeddings(self, new_num_tokens: int) -> tf.Variable: method get_output_embeddings (line 1315) | def get_output_embeddings(self): method set_output_embeddings (line 1318) | def set_output_embeddings(self, new_embeddings): method call (line 1324) | def call( method serving_output (line 1427) | def serving_output(self, output): method prepare_inputs_for_generation (line 1446) | def prepare_inputs_for_generation( FILE: transformers/models/speech_to_text/processing_speech_to_text.py class Speech2TextProcessor (line 24) | class Speech2TextProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 47) | def __call__(self, *args, **kwargs): method batch_decode (line 86) | def batch_decode(self, *args, **kwargs): method decode (line 93) | def decode(self, *args, **kwargs): method as_target_processor (line 101) | def as_target_processor(self): FILE: transformers/models/speech_to_text/tokenization_speech_to_text.py class Speech2TextTokenizer (line 59) | class Speech2TextTokenizer(PreTrainedTokenizer): method __init__ (line 113) | def __init__( method vocab_size (line 164) | def vocab_size(self) -> int: method tgt_lang (line 168) | def tgt_lang(self) -> str: method tgt_lang (line 172) | def tgt_lang(self, new_tgt_lang) -> None: method set_tgt_lang_special_tokens (line 176) | def set_tgt_lang_special_tokens(self, tgt_lang: str) -> None: method _tokenize (line 181) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 184) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 187) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 191) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method build_inputs_with_special_tokens (line 207) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 214) | def get_special_tokens_mask( method get_vocab (line 244) | def get_vocab(self) -> Dict: method __getstate__ (line 249) | def __getstate__(self) -> Dict: method __setstate__ (line 254) | def __setstate__(self, d: Dict) -> None: method save_vocabulary (line 263) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... function load_spm (line 285) | def load_spm(path: str, sp_model_kwargs: Dict[str, Any]) -> sentencepiec... function load_json (line 291) | def load_json(path: str) -> Union[Dict, List]: function save_json (line 296) | def save_json(data, path: str) -> None: FILE: transformers/models/speech_to_text_2/configuration_speech_to_text_2.py class Speech2Text2Config (line 31) | class Speech2Text2Config(PretrainedConfig): method __init__ (line 93) | def __init__( FILE: transformers/models/speech_to_text_2/modeling_speech_to_text_2.py function _make_causal_mask (line 47) | def _make_causal_mask( function _expand_mask (line 65) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class Speech2Text2SinusoidalPositionalEmbedding (line 80) | class Speech2Text2SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 83) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 90) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 101) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 119) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 133) | def create_position_ids_from_input_ids( class Speech2Text2Attention (line 151) | class Speech2Text2Attention(nn.Module): method __init__ (line 154) | def __init__( method _shape (line 181) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 184) | def forward( class Speech2Text2DecoderLayer (line 305) | class Speech2Text2DecoderLayer(nn.Module): method __init__ (line 306) | def __init__(self, config: Speech2Text2Config): method forward (line 335) | def forward( class Speech2Text2PreTrainedModel (line 425) | class Speech2Text2PreTrainedModel(PreTrainedModel): method _init_weights (line 430) | def _init_weights(self, module): method _set_gradient_checkpointing (line 441) | def _set_gradient_checkpointing(self, module, value=False): class Speech2Text2Decoder (line 463) | class Speech2Text2Decoder(Speech2Text2PreTrainedModel): method __init__ (line 472) | def __init__(self, config: Speech2Text2Config): method get_input_embeddings (line 494) | def get_input_embeddings(self): method set_input_embeddings (line 497) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 500) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 521) | def forward( class Speech2Text2DecoderWrapper (line 739) | class Speech2Text2DecoderWrapper(Speech2Text2PreTrainedModel): method __init__ (line 745) | def __init__(self, config): method forward (line 749) | def forward(self, *args, **kwargs): class Speech2Text2ForCausalLM (line 758) | class Speech2Text2ForCausalLM(Speech2Text2PreTrainedModel): method __init__ (line 761) | def __init__(self, config): method get_input_embeddings (line 773) | def get_input_embeddings(self): method set_input_embeddings (line 776) | def set_input_embeddings(self, value): method get_output_embeddings (line 779) | def get_output_embeddings(self): method set_output_embeddings (line 782) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 785) | def set_decoder(self, decoder): method get_decoder (line 788) | def get_decoder(self): method forward (line 792) | def forward( method prepare_inputs_for_generation (line 958) | def prepare_inputs_for_generation( method _reorder_cache (line 976) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/speech_to_text_2/processing_speech_to_text_2.py class Speech2Text2Processor (line 24) | class Speech2Text2Processor(ProcessorMixin): method __init__ (line 41) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 46) | def __call__(self, *args, **kwargs): method batch_decode (line 85) | def batch_decode(self, *args, **kwargs): method decode (line 92) | def decode(self, *args, **kwargs): method as_target_processor (line 100) | def as_target_processor(self): FILE: transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py function get_pairs (line 56) | def get_pairs(word): class Speech2Text2Tokenizer (line 73) | class Speech2Text2Tokenizer(PreTrainedTokenizer): method __init__ (line 102) | def __init__( method vocab_size (line 142) | def vocab_size(self) -> int: method get_vocab (line 145) | def get_vocab(self) -> Dict: method bpe (line 148) | def bpe(self, token): method _tokenize (line 197) | def _tokenize(self, text): method _convert_token_to_id (line 220) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 224) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 229) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method save_vocabulary (line 241) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/speecht5/configuration_speecht5.py class SpeechT5Config (line 37) | class SpeechT5Config(PretrainedConfig): method __init__ (line 200) | def __init__( method inputs_to_logits_ratio (line 345) | def inputs_to_logits_ratio(self): class SpeechT5HifiGanConfig (line 349) | class SpeechT5HifiGanConfig(PretrainedConfig): method __init__ (line 403) | def __init__( FILE: transformers/models/speecht5/convert_hifigan.py function load_weights (line 29) | def load_weights(checkpoint, hf_model, config): function convert_hifigan_checkpoint (line 59) | def convert_hifigan_checkpoint( FILE: transformers/models/speecht5/convert_speecht5_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 154) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function should_ignore (line 189) | def should_ignore(name, ignore_keys): function recursively_load_weights (line 203) | def recursively_load_weights(fairseq_dict, hf_model, task): function load_conv_layer (line 275) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_speecht5_checkpoint (line 320) | def convert_speecht5_checkpoint( FILE: transformers/models/speecht5/feature_extraction_speecht5.py class SpeechT5FeatureExtractor (line 32) | class SpeechT5FeatureExtractor(SequenceFeatureExtractor): method __init__ (line 79) | def __init__( method zero_mean_unit_var_norm (line 142) | def zero_mean_unit_var_norm( method _extract_mel_features (line 163) | def _extract_mel_features( method __call__ (line 182) | def __call__( method _process_audio (line 299) | def _process_audio( method to_dict (line 386) | def to_dict(self) -> Dict[str, Any]: FILE: transformers/models/speecht5/modeling_speecht5.py function shift_tokens_right (line 60) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function shift_spectrograms_right (line 76) | def shift_spectrograms_right(input_values: torch.Tensor, reduction_facto... function _make_causal_mask (line 94) | def _make_causal_mask( function _expand_mask (line 112) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function _compute_mask_indices (line 127) | def _compute_mask_indices( class SpeechT5NoLayerNormConvLayer (line 247) | class SpeechT5NoLayerNormConvLayer(nn.Module): method __init__ (line 248) | def __init__(self, config, layer_id=0): method forward (line 262) | def forward(self, hidden_states): class SpeechT5LayerNormConvLayer (line 269) | class SpeechT5LayerNormConvLayer(nn.Module): method __init__ (line 270) | def __init__(self, config, layer_id=0): method forward (line 285) | def forward(self, hidden_states): class SpeechT5GroupNormConvLayer (line 297) | class SpeechT5GroupNormConvLayer(nn.Module): method __init__ (line 298) | def __init__(self, config, layer_id=0): method forward (line 314) | def forward(self, hidden_states): class SpeechT5SinusoidalPositionalEmbedding (line 322) | class SpeechT5SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 325) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 332) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 343) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 361) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 375) | def create_position_ids_from_input_ids( class SpeechT5PositionalConvEmbedding (line 393) | class SpeechT5PositionalConvEmbedding(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 421) | def forward(self, hidden_states): class SpeechT5ScaledPositionalEncoding (line 432) | class SpeechT5ScaledPositionalEncoding(nn.Module): method __init__ (line 437) | def __init__(self, dropout, dim, max_len=5000): method forward (line 450) | def forward(self, emb): class SpeechT5RelativePositionalEncoding (line 456) | class SpeechT5RelativePositionalEncoding(torch.nn.Module): method __init__ (line 457) | def __init__(self, dim, max_length=1000): method forward (line 463) | def forward(self, hidden_states): class SpeechT5SamePadLayer (line 476) | class SpeechT5SamePadLayer(nn.Module): method __init__ (line 477) | def __init__(self, num_conv_pos_embeddings): method forward (line 481) | def forward(self, hidden_states): class SpeechT5FeatureEncoder (line 488) | class SpeechT5FeatureEncoder(nn.Module): method __init__ (line 491) | def __init__(self, config): method _freeze_parameters (line 510) | def _freeze_parameters(self): method forward (line 515) | def forward(self, input_values): class SpeechT5FeatureProjection (line 542) | class SpeechT5FeatureProjection(nn.Module): method __init__ (line 543) | def __init__(self, config): method forward (line 549) | def forward(self, hidden_states): class SpeechT5SpeechEncoderPrenet (line 557) | class SpeechT5SpeechEncoderPrenet(nn.Module): method __init__ (line 558) | def __init__(self, config): method freeze_feature_encoder (line 575) | def freeze_feature_encoder(self): method forward (line 578) | def forward( method _get_feature_vector_attention_mask (line 613) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _get_feat_extract_output_lengths (line 629) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _mask_hidden_states (line 645) | def _mask_hidden_states( class SpeechT5SpeechDecoderPrenet (line 692) | class SpeechT5SpeechDecoderPrenet(nn.Module): method __init__ (line 693) | def __init__(self, config): method forward (line 717) | def forward( class SpeechT5BatchNormConvLayer (line 744) | class SpeechT5BatchNormConvLayer(nn.Module): method __init__ (line 745) | def __init__(self, config, layer_id=0): method forward (line 775) | def forward(self, hidden_states): class SpeechT5SpeechDecoderPostnet (line 784) | class SpeechT5SpeechDecoderPostnet(nn.Module): method __init__ (line 785) | def __init__(self, config): method forward (line 796) | def forward(self, hidden_states: torch.Tensor): method postnet (line 802) | def postnet(self, hidden_states: torch.Tensor): class SpeechT5TextEncoderPrenet (line 809) | class SpeechT5TextEncoderPrenet(nn.Module): method __init__ (line 810) | def __init__(self, config): method get_input_embeddings (line 820) | def get_input_embeddings(self): method set_input_embeddings (line 823) | def set_input_embeddings(self, value): method forward (line 826) | def forward(self, input_ids: torch.Tensor): class SpeechT5TextDecoderPrenet (line 832) | class SpeechT5TextDecoderPrenet(nn.Module): method __init__ (line 833) | def __init__(self, config): method get_input_embeddings (line 847) | def get_input_embeddings(self): method set_input_embeddings (line 850) | def set_input_embeddings(self, value): method forward (line 853) | def forward( class SpeechT5TextDecoderPostnet (line 875) | class SpeechT5TextDecoderPostnet(nn.Module): method __init__ (line 876) | def __init__(self, config): method forward (line 881) | def forward(self, hidden_states: torch.Tensor): method get_output_embeddings (line 884) | def get_output_embeddings(self): method set_output_embeddings (line 887) | def set_output_embeddings(self, new_embeddings): class SpeechT5Attention (line 891) | class SpeechT5Attention(nn.Module): method __init__ (line 897) | def __init__( method _shape (line 924) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 927) | def forward( class SpeechT5FeedForward (line 1051) | class SpeechT5FeedForward(nn.Module): method __init__ (line 1052) | def __init__(self, config, intermediate_size): method forward (line 1065) | def forward(self, hidden_states): class SpeechT5EncoderLayer (line 1075) | class SpeechT5EncoderLayer(nn.Module): method __init__ (line 1076) | def __init__(self, config: SpeechT5Config): method forward (line 1089) | def forward( class SpeechT5DecoderLayer (line 1136) | class SpeechT5DecoderLayer(nn.Module): method __init__ (line 1137) | def __init__(self, config: SpeechT5Config): method forward (line 1159) | def forward( class SpeechT5PreTrainedModel (line 1244) | class SpeechT5PreTrainedModel(PreTrainedModel): method _init_weights (line 1257) | def _init_weights(self, module): method _set_gradient_checkpointing (line 1287) | def _set_gradient_checkpointing(self, module, value=False): class SpeechT5Encoder (line 1292) | class SpeechT5Encoder(SpeechT5PreTrainedModel): method __init__ (line 1297) | def __init__(self, config: SpeechT5Config): method forward (line 1314) | def forward( class SpeechT5EncoderWithSpeechPrenet (line 1433) | class SpeechT5EncoderWithSpeechPrenet(SpeechT5PreTrainedModel): method __init__ (line 1439) | def __init__(self, config: SpeechT5Config): method forward (line 1448) | def forward( class SpeechT5EncoderWithTextPrenet (line 1471) | class SpeechT5EncoderWithTextPrenet(SpeechT5PreTrainedModel): method __init__ (line 1476) | def __init__(self, config: SpeechT5Config): method get_input_embeddings (line 1485) | def get_input_embeddings(self): method set_input_embeddings (line 1488) | def set_input_embeddings(self, value): method forward (line 1491) | def forward( class SpeechT5EncoderWithoutPrenet (line 1514) | class SpeechT5EncoderWithoutPrenet(SpeechT5PreTrainedModel): method __init__ (line 1520) | def __init__(self, config: SpeechT5Config): method forward (line 1528) | def forward( class SpeechT5Decoder (line 1547) | class SpeechT5Decoder(SpeechT5PreTrainedModel): method __init__ (line 1552) | def __init__(self, config: SpeechT5Config): method _prepare_decoder_attention_mask (line 1564) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1587) | def forward( class SpeechT5DecoderWithSpeechPrenet (line 1781) | class SpeechT5DecoderWithSpeechPrenet(SpeechT5PreTrainedModel): method __init__ (line 1787) | def __init__(self, config: SpeechT5Config): method forward (line 1796) | def forward( class SpeechT5DecoderWithTextPrenet (line 1830) | class SpeechT5DecoderWithTextPrenet(SpeechT5PreTrainedModel): method __init__ (line 1835) | def __init__(self, config: SpeechT5Config): method get_input_embeddings (line 1844) | def get_input_embeddings(self): method set_input_embeddings (line 1847) | def set_input_embeddings(self, value): method forward (line 1850) | def forward( class SpeechT5DecoderWithoutPrenet (line 1883) | class SpeechT5DecoderWithoutPrenet(SpeechT5PreTrainedModel): method __init__ (line 1889) | def __init__(self, config: SpeechT5Config): method forward (line 1897) | def forward( class SpeechT5GuidedMultiheadAttentionLoss (line 1927) | class SpeechT5GuidedMultiheadAttentionLoss(nn.Module): method __init__ (line 1933) | def __init__(self, config: SpeechT5Config): method forward (line 1938) | def forward( method _make_guided_attention_masks (line 1963) | def _make_guided_attention_masks(self, input_masks, output_masks, devi... method _make_guided_attention_mask (line 1975) | def _make_guided_attention_mask(input_length, output_length, sigma, de... class SpeechT5SpectrogramLoss (line 1986) | class SpeechT5SpectrogramLoss(nn.Module): method __init__ (line 1991) | def __init__(self, config: SpeechT5Config): method forward (line 2003) | def forward( class SpeechT5Model (line 2178) | class SpeechT5Model(SpeechT5PreTrainedModel): method __init__ (line 2179) | def __init__( method get_input_embeddings (line 2193) | def get_input_embeddings(self): method set_input_embeddings (line 2200) | def set_input_embeddings(self, value): method get_encoder (line 2206) | def get_encoder(self): method get_decoder (line 2209) | def get_decoder(self): method freeze_feature_encoder (line 2212) | def freeze_feature_encoder(self): method forward (line 2222) | def forward( class SpeechT5ForSpeechToText (line 2326) | class SpeechT5ForSpeechToText(SpeechT5PreTrainedModel): method __init__ (line 2335) | def __init__(self, config: SpeechT5Config): method get_encoder (line 2355) | def get_encoder(self): method get_decoder (line 2358) | def get_decoder(self): method freeze_feature_encoder (line 2361) | def freeze_feature_encoder(self): method resize_token_embeddings (line 2368) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 2372) | def get_output_embeddings(self): method set_output_embeddings (line 2375) | def set_output_embeddings(self, new_embeddings): method forward (line 2380) | def forward( method prepare_inputs_for_generation (line 2507) | def prepare_inputs_for_generation( method _reorder_cache (line 2535) | def _reorder_cache(past_key_values, beam_idx): function _generate_speech (line 2542) | def _generate_speech( class SpeechT5ForTextToSpeech (line 2637) | class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel): method __init__ (line 2643) | def __init__(self, config: SpeechT5Config): method get_encoder (line 2663) | def get_encoder(self): method get_decoder (line 2666) | def get_decoder(self): method forward (line 2671) | def forward( method generate_speech (line 2796) | def generate_speech( class SpeechT5ForSpeechToSpeech (line 2858) | class SpeechT5ForSpeechToSpeech(SpeechT5PreTrainedModel): method __init__ (line 2866) | def __init__(self, config: SpeechT5Config): method get_encoder (line 2878) | def get_encoder(self): method get_decoder (line 2881) | def get_decoder(self): method freeze_feature_encoder (line 2884) | def freeze_feature_encoder(self): method forward (line 2893) | def forward( method generate_speech (line 3012) | def generate_speech( class HifiGanResidualBlock (line 3090) | class HifiGanResidualBlock(nn.Module): method __init__ (line 3091) | def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_... method get_padding (line 3122) | def get_padding(self, kernel_size, dilation=1): method apply_weight_norm (line 3125) | def apply_weight_norm(self): method remove_weight_norm (line 3131) | def remove_weight_norm(self): method forward (line 3137) | def forward(self, hidden_states): class SpeechT5HifiGan (line 3152) | class SpeechT5HifiGan(PreTrainedModel): method __init__ (line 3156) | def __init__(self, config: SpeechT5HifiGanConfig): method _init_weights (line 3194) | def _init_weights(self, module): method apply_weight_norm (line 3201) | def apply_weight_norm(self): method remove_weight_norm (line 3209) | def remove_weight_norm(self): method forward (line 3217) | def forward(self, spectrogram: torch.FloatTensor) -> torch.FloatTensor: FILE: transformers/models/speecht5/processing_speecht5.py class SpeechT5Processor (line 20) | class SpeechT5Processor(ProcessorMixin): method __init__ (line 36) | def __init__(self, feature_extractor, tokenizer): method __call__ (line 39) | def __call__(self, *args, **kwargs): method pad (line 110) | def pad(self, *args, **kwargs): method batch_decode (line 170) | def batch_decode(self, *args, **kwargs): method decode (line 177) | def decode(self, *args, **kwargs): FILE: transformers/models/speecht5/tokenization_speecht5.py class SpeechT5Tokenizer (line 47) | class SpeechT5Tokenizer(PreTrainedTokenizer): method __init__ (line 93) | def __init__( method vocab_size (line 120) | def vocab_size(self): method get_vocab (line 123) | def get_vocab(self): method __getstate__ (line 128) | def __getstate__(self): method __setstate__ (line 133) | def __setstate__(self, d): method _tokenize (line 143) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 147) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 151) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 156) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 170) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 177) | def get_special_tokens_mask( method save_vocabulary (line 190) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/splinter/configuration_splinter.py class SplinterConfig (line 32) | class SplinterConfig(PretrainedConfig): method __init__ (line 93) | def __init__( FILE: transformers/models/splinter/modeling_splinter.py class SplinterEmbeddings (line 49) | class SplinterEmbeddings(nn.Module): method __init__ (line 52) | def __init__(self, config): method forward (line 67) | def forward( class SplinterSelfAttention (line 102) | class SplinterSelfAttention(nn.Module): method __init__ (line 103) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 129) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 134) | def forward( class SplinterSelfOutput (line 237) | class SplinterSelfOutput(nn.Module): method __init__ (line 238) | def __init__(self, config): method forward (line 244) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SplinterAttention (line 252) | class SplinterAttention(nn.Module): method __init__ (line 253) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 259) | def prune_heads(self, heads): method forward (line 277) | def forward( class SplinterIntermediate (line 302) | class SplinterIntermediate(nn.Module): method __init__ (line 303) | def __init__(self, config): method forward (line 311) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SplinterOutput (line 318) | class SplinterOutput(nn.Module): method __init__ (line 319) | def __init__(self, config): method forward (line 325) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SplinterLayer (line 333) | class SplinterLayer(nn.Module): method __init__ (line 334) | def __init__(self, config): method forward (line 348) | def forward( method feed_forward_chunk (line 413) | def feed_forward_chunk(self, attention_output): class SplinterEncoder (line 420) | class SplinterEncoder(nn.Module): method __init__ (line 421) | def __init__(self, config): method forward (line 427) | def forward( class SplinterPreTrainedModel (line 518) | class SplinterPreTrainedModel(PreTrainedModel): method _init_weights (line 530) | def _init_weights(self, module): method _set_gradient_checkpointing (line 546) | def _set_gradient_checkpointing(self, module, value=False): class SplinterModel (line 616) | class SplinterModel(SplinterPreTrainedModel): method __init__ (line 623) | def __init__(self, config): method get_input_embeddings (line 633) | def get_input_embeddings(self): method set_input_embeddings (line 636) | def set_input_embeddings(self, value): method _prune_heads (line 639) | def _prune_heads(self, heads_to_prune): method forward (line 653) | def forward( class SplinterFullyConnectedLayer (line 774) | class SplinterFullyConnectedLayer(nn.Module): method __init__ (line 775) | def __init__(self, input_dim, output_dim, hidden_act="gelu"): method forward (line 785) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: class QuestionAwareSpanSelectionHead (line 792) | class QuestionAwareSpanSelectionHead(nn.Module): method __init__ (line 798) | def __init__(self, config): method forward (line 809) | def forward(self, inputs, positions): class SplinterForQuestionAnswering (line 837) | class SplinterForQuestionAnswering(SplinterPreTrainedModel): method __init__ (line 838) | def __init__(self, config): method forward (line 854) | def forward( class SplinterForPreTrainingOutput (line 952) | class SplinterForPreTrainingOutput(ModelOutput): class SplinterForPreTraining (line 991) | class SplinterForPreTraining(SplinterPreTrainedModel): method __init__ (line 992) | def __init__(self, config): method forward (line 1005) | def forward( method _prepare_question_positions (line 1105) | def _prepare_question_positions(self, input_ids: torch.Tensor) -> torc... FILE: transformers/models/splinter/tokenization_splinter.py function load_vocab (line 55) | def load_vocab(vocab_file): function whitespace_tokenize (line 66) | def whitespace_tokenize(text): class SplinterTokenizer (line 75) | class SplinterTokenizer(PreTrainedTokenizer): method __init__ (line 124) | def __init__( method question_token_id (line 173) | def question_token_id(self): method do_lower_case (line 181) | def do_lower_case(self): method vocab_size (line 185) | def vocab_size(self): method get_vocab (line 188) | def get_vocab(self): method _tokenize (line 191) | def _tokenize(self, text): method _convert_token_to_id (line 204) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 208) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 212) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 217) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 249) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 277) | def create_token_type_ids_from_sequences( method save_vocabulary (line 306) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 327) | class BasicTokenizer(object): method __init__ (line 347) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 355) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 392) | def _run_strip_accents(self, text): method _run_split_on_punc (line 403) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 425) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 438) | def _is_chinese_char(self, cp): method _clean_text (line 462) | def _clean_text(self, text): class WordpieceTokenizer (line 476) | class WordpieceTokenizer(object): method __init__ (line 479) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 484) | def tokenize(self, text): FILE: transformers/models/splinter/tokenization_splinter_fast.py class SplinterTokenizerFast (line 55) | class SplinterTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 103) | def __init__( method question_token_id (line 146) | def question_token_id(self): method build_inputs_with_special_tokens (line 153) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 185) | def create_token_type_ids_from_sequences( method save_vocabulary (line 214) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/squeezebert/configuration_squeezebert.py class SqueezeBertConfig (line 37) | class SqueezeBertConfig(PretrainedConfig): method __init__ (line 115) | def __init__( class SqueezeBertOnnxConfig (line 163) | class SqueezeBertOnnxConfig(OnnxConfig): method inputs (line 165) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/squeezebert/modeling_squeezebert.py class SqueezeBertEmbeddings (line 52) | class SqueezeBertEmbeddings(nn.Module): method __init__ (line 55) | def __init__(self, config): method forward (line 69) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class MatMulWrapper (line 94) | class MatMulWrapper(nn.Module): method __init__ (line 100) | def __init__(self): method forward (line 103) | def forward(self, mat1, mat2): class SqueezeBertLayerNorm (line 114) | class SqueezeBertLayerNorm(nn.LayerNorm): method __init__ (line 121) | def __init__(self, hidden_size, eps=1e-12): method forward (line 124) | def forward(self, x): class ConvDropoutLayerNorm (line 130) | class ConvDropoutLayerNorm(nn.Module): method __init__ (line 135) | def __init__(self, cin, cout, groups, dropout_prob): method forward (line 142) | def forward(self, hidden_states, input_tensor): class ConvActivation (line 150) | class ConvActivation(nn.Module): method __init__ (line 155) | def __init__(self, cin, cout, groups, act): method forward (line 160) | def forward(self, x): class SqueezeBertSelfAttention (line 165) | class SqueezeBertSelfAttention(nn.Module): method __init__ (line 166) | def __init__(self, config, cin, q_groups=1, k_groups=1, v_groups=1): method transpose_for_scores (line 190) | def transpose_for_scores(self, x): method transpose_key_for_scores (line 199) | def transpose_key_for_scores(self, x): method transpose_output (line 209) | def transpose_output(self, x): method forward (line 219) | def forward(self, hidden_states, attention_mask, output_attentions): class SqueezeBertModule (line 255) | class SqueezeBertModule(nn.Module): method __init__ (line 256) | def __init__(self, config): method forward (line 282) | def forward(self, hidden_states, attention_mask, output_attentions): class SqueezeBertEncoder (line 297) | class SqueezeBertEncoder(nn.Module): method __init__ (line 298) | def __init__(self, config): method forward (line 309) | def forward( class SqueezeBertPooler (line 358) | class SqueezeBertPooler(nn.Module): method __init__ (line 359) | def __init__(self, config): method forward (line 364) | def forward(self, hidden_states): class SqueezeBertPredictionHeadTransform (line 373) | class SqueezeBertPredictionHeadTransform(nn.Module): method __init__ (line 374) | def __init__(self, config): method forward (line 383) | def forward(self, hidden_states): class SqueezeBertLMPredictionHead (line 390) | class SqueezeBertLMPredictionHead(nn.Module): method __init__ (line 391) | def __init__(self, config): method forward (line 404) | def forward(self, hidden_states): class SqueezeBertOnlyMLMHead (line 410) | class SqueezeBertOnlyMLMHead(nn.Module): method __init__ (line 411) | def __init__(self, config): method forward (line 415) | def forward(self, sequence_output): class SqueezeBertPreTrainedModel (line 420) | class SqueezeBertPreTrainedModel(PreTrainedModel): method _init_weights (line 430) | def _init_weights(self, module): class SqueezeBertModel (line 546) | class SqueezeBertModel(SqueezeBertPreTrainedModel): method __init__ (line 547) | def __init__(self, config): method get_input_embeddings (line 557) | def get_input_embeddings(self): method set_input_embeddings (line 560) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 563) | def _prune_heads(self, heads_to_prune): method forward (line 577) | def forward( class SqueezeBertForMaskedLM (line 645) | class SqueezeBertForMaskedLM(SqueezeBertPreTrainedModel): method __init__ (line 652) | def __init__(self, config): method get_output_embeddings (line 661) | def get_output_embeddings(self): method set_output_embeddings (line 664) | def set_output_embeddings(self, new_embeddings): method forward (line 673) | def forward( class SqueezeBertForSequenceClassification (line 733) | class SqueezeBertForSequenceClassification(SqueezeBertPreTrainedModel): method __init__ (line 734) | def __init__(self, config): method forward (line 752) | def forward( class SqueezeBertForMultipleChoice (line 832) | class SqueezeBertForMultipleChoice(SqueezeBertPreTrainedModel): method __init__ (line 833) | def __init__(self, config): method forward (line 851) | def forward( class SqueezeBertForTokenClassification (line 925) | class SqueezeBertForTokenClassification(SqueezeBertPreTrainedModel): method __init__ (line 926) | def __init__(self, config): method forward (line 943) | def forward( class SqueezeBertForQuestionAnswering (line 1003) | class SqueezeBertForQuestionAnswering(SqueezeBertPreTrainedModel): method __init__ (line 1004) | def __init__(self, config): method forward (line 1020) | def forward( FILE: transformers/models/squeezebert/tokenization_squeezebert.py function load_vocab (line 57) | def load_vocab(vocab_file): function whitespace_tokenize (line 69) | def whitespace_tokenize(text): class SqueezeBertTokenizer (line 79) | class SqueezeBertTokenizer(PreTrainedTokenizer): method __init__ (line 126) | def __init__( method do_lower_case (line 173) | def do_lower_case(self): method vocab_size (line 177) | def vocab_size(self): method get_vocab (line 180) | def get_vocab(self): method _tokenize (line 183) | def _tokenize(self, text): method _convert_token_to_id (line 196) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 200) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 204) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 209) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 234) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 262) | def create_token_type_ids_from_sequences( method save_vocabulary (line 291) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... class BasicTokenizer (line 313) | class BasicTokenizer(object): method __init__ (line 333) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 341) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 378) | def _run_strip_accents(self, text): method _run_split_on_punc (line 389) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 411) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 424) | def _is_chinese_char(self, cp): method _clean_text (line 448) | def _clean_text(self, text): class WordpieceTokenizer (line 462) | class WordpieceTokenizer(object): method __init__ (line 465) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 470) | def tokenize(self, text): FILE: transformers/models/squeezebert/tokenization_squeezebert_fast.py class SqueezeBertTokenizerFast (line 69) | class SqueezeBertTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 115) | def __init__( method build_inputs_with_special_tokens (line 157) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method create_token_type_ids_from_sequences (line 181) | def create_token_type_ids_from_sequences( method save_vocabulary (line 210) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/swiftformer/configuration_swiftformer.py class SwiftFormerConfig (line 34) | class SwiftFormerConfig(PretrainedConfig): method __init__ (line 90) | def __init__( class SwiftFormerOnnxConfig (line 123) | class SwiftFormerOnnxConfig(OnnxConfig): method inputs (line 127) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 135) | def atol_for_validation(self) -> float: FILE: transformers/models/swiftformer/convert_swiftformer_original_to_hf.py function prepare_img (line 42) | def prepare_img(): function get_expected_output (line 48) | def get_expected_output(swiftformer_name): function rename_key (line 62) | def rename_key(dct, old, new): function create_rename_keys (line 67) | def create_rename_keys(state_dict): function convert_swiftformer_checkpoint (line 90) | def convert_swiftformer_checkpoint(swiftformer_name, pytorch_dump_folder... FILE: transformers/models/swiftformer/modeling_swiftformer.py class SwiftFormerPatchEmbedding (line 61) | class SwiftFormerPatchEmbedding(nn.Module): method __init__ (line 70) | def __init__(self, config: SwiftFormerConfig): method forward (line 84) | def forward(self, x): function drop_path (line 89) | def drop_path(x, drop_prob: float = 0.0, training: bool = False): class SwiftFormerDropPath (line 110) | class SwiftFormerDropPath(nn.Module): method __init__ (line 113) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 117) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 120) | def extra_repr(self) -> str: class SwiftFormerEmbeddings (line 124) | class SwiftFormerEmbeddings(nn.Module): method __init__ (line 133) | def __init__(self, config: SwiftFormerConfig, index: int): method forward (line 151) | def forward(self, x): class SwiftFormerConvEncoder (line 157) | class SwiftFormerConvEncoder(nn.Module): method __init__ (line 166) | def __init__(self, config: SwiftFormerConfig, dim: int): method forward (line 178) | def forward(self, x): class SwiftFormerMlp (line 189) | class SwiftFormerMlp(nn.Module): method __init__ (line 198) | def __init__(self, config: SwiftFormerConfig, in_features: int): method forward (line 208) | def forward(self, x): class SwiftFormerEfficientAdditiveAttention (line 218) | class SwiftFormerEfficientAdditiveAttention(nn.Module): method __init__ (line 227) | def __init__(self, config: SwiftFormerConfig, dim: int = 512): method forward (line 238) | def forward(self, x): class SwiftFormerLocalRepresentation (line 258) | class SwiftFormerLocalRepresentation(nn.Module): method __init__ (line 267) | def __init__(self, config: SwiftFormerConfig, dim: int): method forward (line 278) | def forward(self, x): class SwiftFormerEncoderBlock (line 289) | class SwiftFormerEncoderBlock(nn.Module): method __init__ (line 299) | def __init__(self, config: SwiftFormerConfig, dim: int, drop_path: flo... method forward (line 318) | def forward(self, x): class SwiftFormerStage (line 340) | class SwiftFormerStage(nn.Module): method __init__ (line 350) | def __init__(self, config: SwiftFormerConfig, index: int) -> None: method forward (line 368) | def forward(self, input): class SwiftFormerEncoder (line 374) | class SwiftFormerEncoder(nn.Module): method __init__ (line 375) | def __init__(self, config: SwiftFormerConfig) -> None: method forward (line 397) | def forward( class SwiftFormerPreTrainedModel (line 424) | class SwiftFormerPreTrainedModel(PreTrainedModel): method _init_weights (line 435) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 445) | def _set_gradient_checkpointing(self, module: SwiftFormerEncoder, valu... class SwiftFormerModel (line 479) | class SwiftFormerModel(SwiftFormerPreTrainedModel): method __init__ (line 480) | def __init__(self, config: SwiftFormerConfig): method forward (line 498) | def forward( class SwiftFormerForImageClassification (line 536) | class SwiftFormerForImageClassification(SwiftFormerPreTrainedModel): method __init__ (line 537) | def __init__(self, config: SwiftFormerConfig) -> None: method forward (line 560) | def forward( FILE: transformers/models/swin/configuration_swin.py class SwinConfig (line 38) | class SwinConfig(BackboneConfigMixin, PretrainedConfig): method __init__ (line 115) | def __init__( class SwinOnnxConfig (line 167) | class SwinOnnxConfig(OnnxConfig): method inputs (line 171) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 179) | def atol_for_validation(self) -> float: FILE: transformers/models/swin/convert_swin_simmim_to_pytorch.py function get_swin_config (line 28) | def get_swin_config(model_name): function rename_key (line 52) | def rename_key(name): function convert_state_dict (line 85) | def convert_state_dict(orig_state_dict, model): function convert_swin_checkpoint (line 123) | def convert_swin_checkpoint(model_name, checkpoint_path, pytorch_dump_fo... FILE: transformers/models/swin/convert_swin_timm_to_pytorch.py function get_swin_config (line 13) | def get_swin_config(swin_name): function rename_key (line 59) | def rename_key(name): function convert_state_dict (line 92) | def convert_state_dict(orig_state_dict, model): function convert_swin_checkpoint (line 130) | def convert_swin_checkpoint(swin_name, pytorch_dump_folder_path): FILE: transformers/models/swin/modeling_swin.py class SwinEncoderOutput (line 68) | class SwinEncoderOutput(ModelOutput): class SwinModelOutput (line 101) | class SwinModelOutput(ModelOutput): class SwinMaskedImageModelingOutput (line 137) | class SwinMaskedImageModelingOutput(ModelOutput): method logits (line 172) | def logits(self): class SwinImageClassifierOutput (line 182) | class SwinImageClassifierOutput(ModelOutput): function window_partition (line 217) | def window_partition(input_feature, window_size): function window_reverse (line 229) | def window_reverse(windows, window_size, height, width): class SwinEmbeddings (line 239) | class SwinEmbeddings(nn.Module): method __init__ (line 244) | def __init__(self, config, use_mask_token=False): method forward (line 260) | def forward( class SwinPatchEmbeddings (line 281) | class SwinPatchEmbeddings(nn.Module): method __init__ (line 288) | def __init__(self, config): method maybe_pad (line 303) | def maybe_pad(self, pixel_values, height, width): method forward (line 312) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class SwinPatchMerging (line 328) | class SwinPatchMerging(nn.Module): method __init__ (line 341) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 348) | def maybe_pad(self, input_feature, height, width): method forward (line 356) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... function drop_path (line 383) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class SwinDropPath (line 404) | class SwinDropPath(nn.Module): method __init__ (line 407) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 411) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 414) | def extra_repr(self) -> str: class SwinSelfAttention (line 418) | class SwinSelfAttention(nn.Module): method __init__ (line 419) | def __init__(self, config, dim, num_heads, window_size): method transpose_for_scores (line 456) | def transpose_for_scores(self, x): method forward (line 461) | def forward( class SwinSelfOutput (line 518) | class SwinSelfOutput(nn.Module): method __init__ (line 519) | def __init__(self, config, dim): method forward (line 524) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class SwinAttention (line 531) | class SwinAttention(nn.Module): method __init__ (line 532) | def __init__(self, config, dim, num_heads, window_size): method prune_heads (line 538) | def prune_heads(self, heads): method forward (line 556) | def forward( class SwinIntermediate (line 569) | class SwinIntermediate(nn.Module): method __init__ (line 570) | def __init__(self, config, dim): method forward (line 578) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SwinOutput (line 584) | class SwinOutput(nn.Module): method __init__ (line 585) | def __init__(self, config, dim): method forward (line 590) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class SwinLayer (line 596) | class SwinLayer(nn.Module): method __init__ (line 597) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 610) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 616) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 644) | def maybe_pad(self, hidden_states, height, width): method forward (line 651) | def forward( class SwinStage (line 719) | class SwinStage(nn.Module): method __init__ (line 720) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 745) | def forward( class SwinEncoder (line 778) | class SwinEncoder(nn.Module): method __init__ (line 779) | def __init__(self, config, grid_size): method forward (line 801) | def forward( class SwinPreTrainedModel (line 881) | class SwinPreTrainedModel(PreTrainedModel): method _init_weights (line 892) | def _init_weights(self, module): method _set_gradient_checkpointing (line 904) | def _set_gradient_checkpointing(self, module, value=False): class SwinModel (line 946) | class SwinModel(SwinPreTrainedModel): method __init__ (line 947) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 962) | def get_input_embeddings(self): method _prune_heads (line 965) | def _prune_heads(self, heads_to_prune): method forward (line 981) | def forward( class SwinForMaskedImageModeling (line 1055) | class SwinForMaskedImageModeling(SwinPreTrainedModel): method __init__ (line 1056) | def __init__(self, config): method forward (line 1074) | def forward( class SwinForImageClassification (line 1166) | class SwinForImageClassification(SwinPreTrainedModel): method __init__ (line 1167) | def __init__(self, config): method forward (line 1188) | def forward( class SwinBackbone (line 1259) | class SwinBackbone(SwinPreTrainedModel, BackboneMixin): method __init__ (line 1260) | def __init__(self, config: SwinConfig): method get_input_embeddings (line 1277) | def get_input_embeddings(self): method forward (line 1280) | def forward( FILE: transformers/models/swin/modeling_tf_swin.py class TFSwinEncoderOutput (line 73) | class TFSwinEncoderOutput(ModelOutput): class TFSwinModelOutput (line 106) | class TFSwinModelOutput(ModelOutput): class TFSwinMaskedImageModelingOutput (line 142) | class TFSwinMaskedImageModelingOutput(ModelOutput): method logits (line 177) | def logits(self): class TFSwinImageClassifierOutput (line 187) | class TFSwinImageClassifierOutput(ModelOutput): function window_partition (line 222) | def window_partition(input_feature: tf.Tensor, window_size: int) -> tf.T... function window_reverse (line 236) | def window_reverse(windows: tf.Tensor, window_size: int, height: int, wi... function drop_path (line 251) | def drop_path( class TFSwinEmbeddings (line 270) | class TFSwinEmbeddings(tf.keras.layers.Layer): method __init__ (line 275) | def __init__(self, config: SwinConfig, use_mask_token: bool = False, *... method build (line 287) | def build(self, input_shape: tf.TensorShape) -> None: method call (line 301) | def call( class TFSwinPatchEmbeddings (line 325) | class TFSwinPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 330) | def __init__(self, config, **kwargs): method maybe_pad (line 351) | def maybe_pad(self, pixel_values: tf.Tensor, height: int, width: int) ... method call (line 360) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> Tup... class TFSwinPatchMerging (line 385) | class TFSwinPatchMerging(tf.keras.layers.Layer): method __init__ (line 398) | def __init__( method maybe_pad (line 411) | def maybe_pad(self, input_feature: tf.Tensor, height: int, width: int)... method call (line 419) | def call(self, input_feature: tf.Tensor, input_dimensions: Tuple[int, ... class TFSwinDropPath (line 447) | class TFSwinDropPath(tf.keras.layers.Layer): method __init__ (line 450) | def __init__(self, drop_prob: float = None, scale_by_keep: bool = True... method call (line 455) | def call(self, input: tf.Tensor, training: bool = False) -> tf.Tensor: class TFSwinSelfAttention (line 459) | class TFSwinSelfAttention(tf.keras.layers.Layer): method __init__ (line 460) | def __init__(self, config: SwinConfig, dim: int, num_heads: int, **kwa... method build (line 496) | def build(self, input_shape: tf.TensorShape) -> None: method transpose_for_scores (line 526) | def transpose_for_scores(self, x: tf.Tensor) -> tf.Tensor: method call (line 531) | def call( class TFSwinSelfOutput (line 595) | class TFSwinSelfOutput(tf.keras.layers.Layer): method __init__ (line 596) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 601) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFSwinAttention (line 607) | class TFSwinAttention(tf.keras.layers.Layer): method __init__ (line 608) | def __init__(self, config: SwinConfig, dim: int, num_heads: int, **kwa... method prune_heads (line 614) | def prune_heads(self, heads): method call (line 621) | def call( class TFSwinIntermediate (line 635) | class TFSwinIntermediate(tf.keras.layers.Layer): method __init__ (line 636) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 644) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFSwinOutput (line 650) | class TFSwinOutput(tf.keras.layers.Layer): method __init__ (line 651) | def __init__(self, config: SwinConfig, dim: int, **kwargs) -> None: method call (line 656) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFSwinLayer (line 662) | class TFSwinLayer(tf.keras.layers.Layer): method __init__ (line 663) | def __init__( method get_attn_mask (line 688) | def get_attn_mask(self, height: int, width: int, window_size: int, shi... method maybe_pad (line 716) | def maybe_pad( method call (line 726) | def call( class TFSwinStage (line 793) | class TFSwinStage(tf.keras.layers.Layer): method __init__ (line 794) | def __init__( method call (line 833) | def call( class TFSwinEncoder (line 865) | class TFSwinEncoder(tf.keras.layers.Layer): method __init__ (line 866) | def __init__(self, config: SwinConfig, grid_size: Tuple[int, int], **k... method call (line 887) | def call( class TFSwinPreTrainedModel (line 945) | class TFSwinPreTrainedModel(TFPreTrainedModel): method _set_gradient_checkpointing (line 956) | def _set_gradient_checkpointing(self, module, value=False) -> None: function normalize_data_format (line 995) | def normalize_data_format(value: str) -> str: class AdaptiveAveragePooling1D (line 1010) | class AdaptiveAveragePooling1D(tf.keras.layers.Layer): method __init__ (line 1032) | def __init__( method call (line 1044) | def call(self, inputs: tf.Tensor, *args) -> None: method compute_output_shape (line 1056) | def compute_output_shape(self, input_shape: Iterable[int]) -> tf.Tenso... method get_config (line 1064) | def get_config(self) -> Dict[str, Any]: class TFSwinMainLayer (line 1074) | class TFSwinMainLayer(tf.keras.layers.Layer): method __init__ (line 1077) | def __init__( method get_input_embeddings (line 1091) | def get_input_embeddings(self) -> TFSwinPatchEmbeddings: method _prune_heads (line 1094) | def _prune_heads(self, heads_to_prune: Dict[int, List]): method get_head_mask (line 1102) | def get_head_mask(self, head_mask: Optional[Any]) -> List: method call (line 1108) | def call( class TFSwinModel (line 1173) | class TFSwinModel(TFSwinPreTrainedModel): method __init__ (line 1174) | def __init__( method call (line 1190) | def call( class TFSwinPixelShuffle (line 1226) | class TFSwinPixelShuffle(tf.keras.layers.Layer): method __init__ (line 1229) | def __init__(self, upscale_factor: int, **kwargs) -> None: method call (line 1235) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSwinDecoder (line 1252) | class TFSwinDecoder(tf.keras.layers.Layer): method __init__ (line 1253) | def __init__(self, config: SwinConfig, **kwargs): method call (line 1260) | def call(self, x: tf.Tensor) -> tf.Tensor: class TFSwinForMaskedImageModeling (line 1276) | class TFSwinForMaskedImageModeling(TFSwinPreTrainedModel): method __init__ (line 1277) | def __init__(self, config: SwinConfig): method call (line 1287) | def call( class TFSwinForImageClassification (line 1388) | class TFSwinForImageClassification(TFSwinPreTrainedModel, TFSequenceClas... method __init__ (line 1389) | def __init__(self, config: SwinConfig): method call (line 1410) | def call( FILE: transformers/models/swin2sr/configuration_swin2sr.py class Swin2SRConfig (line 30) | class Swin2SRConfig(PretrainedConfig): method __init__ (line 106) | def __init__( FILE: transformers/models/swin2sr/convert_swin2sr_original_to_pytorch.py function get_config (line 27) | def get_config(checkpoint_url): function rename_key (line 55) | def rename_key(name, config): function convert_state_dict (line 126) | def convert_state_dict(orig_state_dict, config): function convert_swin2sr_checkpoint (line 163) | def convert_swin2sr_checkpoint(checkpoint_url, pytorch_dump_folder_path,... FILE: transformers/models/swin2sr/image_processing_swin2sr.py class Swin2SRImageProcessor (line 30) | class Swin2SRImageProcessor(BaseImageProcessor): method __init__ (line 45) | def __init__( method rescale (line 60) | def rescale( method pad (line 82) | def pad(self, image: np.ndarray, size: int, data_format: Optional[Unio... method preprocess (line 106) | def preprocess( FILE: transformers/models/swin2sr/modeling_swin2sr.py class Swin2SREncoderOutput (line 59) | class Swin2SREncoderOutput(ModelOutput): function window_partition (line 85) | def window_partition(input_feature, window_size): function window_reverse (line 98) | def window_reverse(windows, window_size, height, width): function drop_path (line 109) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class Swin2SRDropPath (line 130) | class Swin2SRDropPath(nn.Module): method __init__ (line 133) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 137) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 140) | def extra_repr(self) -> str: class Swin2SREmbeddings (line 144) | class Swin2SREmbeddings(nn.Module): method __init__ (line 149) | def __init__(self, config): method forward (line 163) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class Swin2SRPatchEmbeddings (line 174) | class Swin2SRPatchEmbeddings(nn.Module): method __init__ (line 175) | def __init__(self, config, normalize_patches=True): method forward (line 189) | def forward(self, embeddings: Optional[torch.FloatTensor]) -> Tuple[to... class Swin2SRPatchUnEmbeddings (line 201) | class Swin2SRPatchUnEmbeddings(nn.Module): method __init__ (line 204) | def __init__(self, config): method forward (line 209) | def forward(self, embeddings, x_size): class Swin2SRPatchMerging (line 216) | class Swin2SRPatchMerging(nn.Module): method __init__ (line 229) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 236) | def maybe_pad(self, input_feature, height, width): method forward (line 244) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class Swin2SRSelfAttention (line 271) | class Swin2SRSelfAttention(nn.Module): method __init__ (line 272) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method transpose_for_scores (line 331) | def transpose_for_scores(self, x): method forward (line 336) | def forward( class Swin2SRSelfOutput (line 399) | class Swin2SRSelfOutput(nn.Module): method __init__ (line 400) | def __init__(self, config, dim): method forward (line 405) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Swin2SRAttention (line 413) | class Swin2SRAttention(nn.Module): method __init__ (line 414) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method prune_heads (line 428) | def prune_heads(self, heads): method forward (line 446) | def forward( class Swin2SRIntermediate (line 460) | class Swin2SRIntermediate(nn.Module): method __init__ (line 461) | def __init__(self, config, dim): method forward (line 469) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swin2SROutput (line 476) | class Swin2SROutput(nn.Module): method __init__ (line 477) | def __init__(self, config, dim): method forward (line 482) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swin2SRLayer (line 489) | class Swin2SRLayer(nn.Module): method __init__ (line 490) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 512) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 536) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 564) | def maybe_pad(self, hidden_states, height, width): method forward (line 571) | def forward( class Swin2SRStage (line 635) | class Swin2SRStage(nn.Module): method __init__ (line 640) | def __init__(self, config, dim, input_resolution, depth, num_heads, dr... method forward (line 674) | def forward( class Swin2SREncoder (line 706) | class Swin2SREncoder(nn.Module): method __init__ (line 707) | def __init__(self, config, grid_size): method forward (line 729) | def forward( class Swin2SRPreTrainedModel (line 784) | class Swin2SRPreTrainedModel(PreTrainedModel): method _init_weights (line 795) | def _init_weights(self, module): method _set_gradient_checkpointing (line 805) | def _set_gradient_checkpointing(self, module, value=False): class Swin2SRModel (line 847) | class Swin2SRModel(Swin2SRPreTrainedModel): method __init__ (line 848) | def __init__(self, config): method get_input_embeddings (line 870) | def get_input_embeddings(self): method _prune_heads (line 873) | def _prune_heads(self, heads_to_prune): method pad_and_normalize (line 881) | def pad_and_normalize(self, pixel_values): method forward (line 904) | def forward( class Upsample (line 960) | class Upsample(nn.Module): method __init__ (line 970) | def __init__(self, scale, num_features): method forward (line 985) | def forward(self, hidden_state): class UpsampleOneStep (line 998) | class UpsampleOneStep(nn.Module): method __init__ (line 1010) | def __init__(self, scale, in_channels, out_channels): method forward (line 1016) | def forward(self, x): class PixelShuffleUpsampler (line 1023) | class PixelShuffleUpsampler(nn.Module): method __init__ (line 1024) | def __init__(self, config, num_features): method forward (line 1031) | def forward(self, sequence_output): class NearestConvUpsampler (line 1040) | class NearestConvUpsampler(nn.Module): method __init__ (line 1041) | def __init__(self, config, num_features): method forward (line 1054) | def forward(self, sequence_output): class PixelShuffleAuxUpsampler (line 1067) | class PixelShuffleAuxUpsampler(nn.Module): method __init__ (line 1068) | def __init__(self, config, num_features): method forward (line 1080) | def forward(self, sequence_output, bicubic, height, width): class Swin2SRForImageSuperResolution (line 1101) | class Swin2SRForImageSuperResolution(Swin2SRPreTrainedModel): method __init__ (line 1102) | def __init__(self, config): method forward (line 1130) | def forward( FILE: transformers/models/swinv2/configuration_swinv2.py class Swinv2Config (line 30) | class Swinv2Config(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: transformers/models/swinv2/convert_swinv2_timm_to_pytorch.py function get_swinv2_config (line 30) | def get_swinv2_config(swinv2_name): function rename_key (line 92) | def rename_key(name): function convert_state_dict (line 132) | def convert_state_dict(orig_state_dict, model): function convert_swinv2_checkpoint (line 170) | def convert_swinv2_checkpoint(swinv2_name, pytorch_dump_folder_path): FILE: transformers/models/swinv2/modeling_swinv2.py class Swinv2EncoderOutput (line 68) | class Swinv2EncoderOutput(ModelOutput): class Swinv2ModelOutput (line 102) | class Swinv2ModelOutput(ModelOutput): class Swinv2MaskedImageModelingOutput (line 139) | class Swinv2MaskedImageModelingOutput(ModelOutput): method logits (line 174) | def logits(self): class Swinv2ImageClassifierOutput (line 185) | class Swinv2ImageClassifierOutput(ModelOutput): function window_partition (line 221) | def window_partition(input_feature, window_size): function window_reverse (line 234) | def window_reverse(windows, window_size, height, width): function drop_path (line 245) | def drop_path(input, drop_prob=0.0, training=False, scale_by_keep=True): class Swinv2DropPath (line 266) | class Swinv2DropPath(nn.Module): method __init__ (line 269) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 273) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 276) | def extra_repr(self) -> str: class Swinv2Embeddings (line 281) | class Swinv2Embeddings(nn.Module): method __init__ (line 286) | def __init__(self, config, use_mask_token=False): method forward (line 302) | def forward( class Swinv2PatchEmbeddings (line 324) | class Swinv2PatchEmbeddings(nn.Module): method __init__ (line 331) | def __init__(self, config): method maybe_pad (line 346) | def maybe_pad(self, pixel_values, height, width): method forward (line 355) | def forward(self, pixel_values: Optional[torch.FloatTensor]) -> Tuple[... class Swinv2PatchMerging (line 371) | class Swinv2PatchMerging(nn.Module): method __init__ (line 384) | def __init__(self, input_resolution: Tuple[int], dim: int, norm_layer:... method maybe_pad (line 391) | def maybe_pad(self, input_feature, height, width): method forward (line 399) | def forward(self, input_feature: torch.Tensor, input_dimensions: Tuple... class Swinv2SelfAttention (line 425) | class Swinv2SelfAttention(nn.Module): method __init__ (line 426) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method transpose_for_scores (line 485) | def transpose_for_scores(self, x): method forward (line 490) | def forward( class Swinv2SelfOutput (line 553) | class Swinv2SelfOutput(nn.Module): method __init__ (line 554) | def __init__(self, config, dim): method forward (line 559) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class Swinv2Attention (line 566) | class Swinv2Attention(nn.Module): method __init__ (line 567) | def __init__(self, config, dim, num_heads, window_size, pretrained_win... method prune_heads (line 581) | def prune_heads(self, heads): method forward (line 599) | def forward( class Swinv2Intermediate (line 613) | class Swinv2Intermediate(nn.Module): method __init__ (line 614) | def __init__(self, config, dim): method forward (line 622) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swinv2Output (line 629) | class Swinv2Output(nn.Module): method __init__ (line 630) | def __init__(self, config, dim): method forward (line 635) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class Swinv2Layer (line 641) | class Swinv2Layer(nn.Module): method __init__ (line 642) | def __init__(self, config, dim, input_resolution, num_heads, shift_siz... method set_shift_and_window_size (line 664) | def set_shift_and_window_size(self, input_resolution): method get_attn_mask (line 688) | def get_attn_mask(self, height, width, dtype): method maybe_pad (line 716) | def maybe_pad(self, hidden_states, height, width): method forward (line 723) | def forward( class Swinv2Stage (line 787) | class Swinv2Stage(nn.Module): method __init__ (line 788) | def __init__( method forward (line 817) | def forward( class Swinv2Encoder (line 850) | class Swinv2Encoder(nn.Module): method __init__ (line 851) | def __init__(self, config, grid_size, pretrained_window_sizes=(0, 0, 0... method forward (line 877) | def forward( class Swinv2PreTrainedModel (line 958) | class Swinv2PreTrainedModel(PreTrainedModel): method _init_weights (line 969) | def _init_weights(self, module): method _set_gradient_checkpointing (line 981) | def _set_gradient_checkpointing(self, module, value=False): class Swinv2Model (line 1024) | class Swinv2Model(Swinv2PreTrainedModel): method __init__ (line 1025) | def __init__(self, config, add_pooling_layer=True, use_mask_token=False): method get_input_embeddings (line 1040) | def get_input_embeddings(self): method _prune_heads (line 1043) | def _prune_heads(self, heads_to_prune): method forward (line 1059) | def forward( class Swinv2ForMaskedImageModeling (line 1135) | class Swinv2ForMaskedImageModeling(Swinv2PreTrainedModel): method __init__ (line 1136) | def __init__(self, config): method forward (line 1154) | def forward( class Swinv2ForImageClassification (line 1247) | class Swinv2ForImageClassification(Swinv2PreTrainedModel): method __init__ (line 1248) | def __init__(self, config): method forward (line 1269) | def forward( FILE: transformers/models/switch_transformers/configuration_switch_transformers.py class SwitchTransformersConfig (line 27) | class SwitchTransformersConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: transformers/models/switch_transformers/convert_big_switch.py function rename_base_flax_keys (line 19) | def rename_base_flax_keys(flax_key_tuple, flax_tensor): function get_key_and_tensorstore_dict (line 37) | def get_key_and_tensorstore_dict(layer, checkpoint_info, switch_checkpoi... function rename_and_save_block (line 62) | def rename_and_save_block(current_block, save_path): function shard_on_the_fly (line 71) | def shard_on_the_fly(switch_checkpoint_path, dump_path, max_shard_size, ... function sanity_check (line 179) | def sanity_check(): FILE: transformers/models/switch_transformers/convert_switch_transformers_original_flax_checkpoint_to_pytorch.py function rename_keys (line 54) | def rename_keys(s_dict): function convert_gin_to_config (line 121) | def convert_gin_to_config(gin_file, num_experts): function convert_flax_checkpoint_to_pytorch (line 142) | def convert_flax_checkpoint_to_pytorch( FILE: transformers/models/switch_transformers/modeling_switch_transformers.py function router_z_loss_func (line 72) | def router_z_loss_func(router_logits: torch.Tensor) -> float: function load_balancing_loss_func (line 92) | def load_balancing_loss_func(router_probs: torch.Tensor, expert_indices:... class SwitchTransformersTop1Router (line 131) | class SwitchTransformersTop1Router(nn.Module): method __init__ (line 142) | def __init__(self, config: SwitchTransformersConfig): method _compute_router_probabilities (line 151) | def _compute_router_probabilities(self, hidden_states: torch.Tensor) -... method _cast_classifier (line 193) | def _cast_classifier(self): method forward (line 201) | def forward(self, hidden_states: torch.Tensor) -> Tuple: class SwitchTransformersLayerNorm (line 234) | class SwitchTransformersLayerNorm(nn.Module): method __init__ (line 235) | def __init__(self, hidden_size, eps=1e-6): method forward (line 243) | def forward(self, hidden_states): class SwitchTransformersDenseActDense (line 263) | class SwitchTransformersDenseActDense(nn.Module): method __init__ (line 264) | def __init__(self, config: SwitchTransformersConfig): method forward (line 271) | def forward(self, hidden_states): class SwitchTransformersDenseGatedActDense (line 286) | class SwitchTransformersDenseGatedActDense(nn.Module): method __init__ (line 287) | def __init__(self, config: SwitchTransformersConfig): method forward (line 295) | def forward(self, hidden_states): class SwitchTransformersSparseMLP (line 304) | class SwitchTransformersSparseMLP(nn.Module): method __init__ (line 309) | def __init__(self, config: SwitchTransformersConfig, expert_class: nn.... method forward (line 319) | def forward(self, hidden_states): class SwitchTransformersLayerFF (line 347) | class SwitchTransformersLayerFF(nn.Module): method __init__ (line 359) | def __init__(self, config: SwitchTransformersConfig, is_sparse=False): method forward (line 372) | def forward(self, hidden_states, output_router_logits): class SwitchTransformersAttention (line 390) | class SwitchTransformersAttention(nn.Module): method __init__ (line 391) | def __init__(self, config: SwitchTransformersConfig, has_relative_atte... method prune_heads (line 414) | def prune_heads(self, heads): method _relative_position_bucket (line 431) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 478) | def compute_bias(self, query_length, key_length, device=None): method forward (line 495) | def forward( class SwitchTransformersLayerSelfAttention (line 626) | class SwitchTransformersLayerSelfAttention(nn.Module): method __init__ (line 627) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 635) | def forward( class SwitchTransformersLayerCrossAttention (line 661) | class SwitchTransformersLayerCrossAttention(nn.Module): method __init__ (line 662) | def __init__(self, config): method forward (line 668) | def forward( class SwitchTransformersBlock (line 697) | class SwitchTransformersBlock(nn.Module): method __init__ (line 698) | def __init__(self, config, has_relative_attention_bias=False, is_spars... method forward (line 711) | def forward( class SwitchTransformersPreTrainedModel (line 818) | class SwitchTransformersPreTrainedModel(PreTrainedModel): method dummy_inputs (line 830) | def dummy_inputs(self): method _init_weights (line 840) | def _init_weights(self, module): method _set_gradient_checkpointing (line 897) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 901) | def _shift_right(self, input_ids): class SwitchTransformersStack (line 929) | class SwitchTransformersStack(SwitchTransformersPreTrainedModel): method __init__ (line 930) | def __init__(self, config, embed_tokens=None): method get_input_embeddings (line 959) | def get_input_embeddings(self): method set_input_embeddings (line 962) | def set_input_embeddings(self, new_embeddings): method forward (line 965) | def forward( class SwitchTransformersModel (line 1339) | class SwitchTransformersModel(SwitchTransformersPreTrainedModel): method __init__ (line 1342) | def __init__(self, config: SwitchTransformersConfig): method get_input_embeddings (line 1363) | def get_input_embeddings(self): method set_input_embeddings (line 1366) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1371) | def get_encoder(self): method get_decoder (line 1374) | def get_decoder(self): method _prune_heads (line 1377) | def _prune_heads(self, heads_to_prune): method forward (line 1387) | def forward( class SwitchTransformersForConditionalGeneration (line 1507) | class SwitchTransformersForConditionalGeneration(SwitchTransformersPreTr... method __init__ (line 1514) | def __init__(self, config: SwitchTransformersConfig): method get_input_embeddings (line 1543) | def get_input_embeddings(self): method set_input_embeddings (line 1546) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1551) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1554) | def get_output_embeddings(self): method get_encoder (line 1557) | def get_encoder(self): method get_decoder (line 1560) | def get_decoder(self): method forward (line 1565) | def forward( method _unpack_router_logits (line 1746) | def _unpack_router_logits(self, router_outputs): method prepare_inputs_for_generation (line 1756) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1783) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1786) | def _reorder_cache(self, past_key_values, beam_idx): class SwitchTransformersEncoderModel (line 1824) | class SwitchTransformersEncoderModel(SwitchTransformersPreTrainedModel): method __init__ (line 1827) | def __init__(self, config: SwitchTransformersConfig): method get_input_embeddings (line 1842) | def get_input_embeddings(self): method set_input_embeddings (line 1845) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1849) | def get_encoder(self): method _prune_heads (line 1852) | def _prune_heads(self, heads_to_prune): method forward (line 1862) | def forward( FILE: transformers/models/t5/configuration_t5.py class T5Config (line 34) | class T5Config(PretrainedConfig): method __init__ (line 82) | def __init__( class T5OnnxConfig (line 143) | class T5OnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 145) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method default_onnx_opset (line 164) | def default_onnx_opset(self) -> int: FILE: transformers/models/t5/convert_t5_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 27) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, config_file, py... FILE: transformers/models/t5/convert_t5x_checkpoint_to_flax.py function convert_t5x_checkpoint_to_flax (line 25) | def convert_t5x_checkpoint_to_flax(t5x_checkpoint_path, config_name, fla... FILE: transformers/models/t5/convert_t5x_checkpoint_to_pytorch.py function t5x_attention_lookup (line 45) | def t5x_attention_lookup(params, i, prefix, layer_name="attention"): function t5x_mlp_lookup (line 54) | def t5x_mlp_lookup(params, i, prefix, split_mlp_wi=False): function t5x_layer_norm_lookup (line 67) | def t5x_layer_norm_lookup(params, i, prefix, layer_name): function convert_t5x_to_pytorch (line 72) | def convert_t5x_to_pytorch(variables: dict, *, num_layers: int, is_encod... function make_state_dict (line 157) | def make_state_dict(converted_params, is_encoder_only: bool): function load_t5x_weights_in_t5 (line 177) | def load_t5x_weights_in_t5(model, config, t5x_checkpoint_path, is_encode... function convert_t5x_checkpoint_to_pytorch (line 185) | def convert_t5x_checkpoint_to_pytorch( FILE: transformers/models/t5/modeling_flax_t5.py function shift_tokens_right (line 59) | def shift_tokens_right(input_ids: np.array, pad_token_id: int, decoder_s... class FlaxT5LayerNorm (line 71) | class FlaxT5LayerNorm(nn.Module): method setup (line 77) | def setup(self): method __call__ (line 80) | def __call__(self, hidden_states): class FlaxT5DenseActDense (line 91) | class FlaxT5DenseActDense(nn.Module): method setup (line 95) | def setup(self): method __call__ (line 114) | def __call__(self, hidden_states, deterministic=True): class FlaxT5DenseGatedActDense (line 122) | class FlaxT5DenseGatedActDense(nn.Module): method setup (line 126) | def setup(self): method __call__ (line 151) | def __call__(self, hidden_states, deterministic): class FlaxT5LayerFF (line 160) | class FlaxT5LayerFF(nn.Module): method setup (line 164) | def setup(self): method __call__ (line 173) | def __call__(self, hidden_states, deterministic=True): class FlaxT5Attention (line 180) | class FlaxT5Attention(nn.Module): method setup (line 186) | def setup(self): method _relative_position_bucket (line 233) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 268) | def compute_bias(self, query_length, key_length): method _split_heads (line 285) | def _split_heads(self, hidden_states): method _merge_heads (line 288) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 292) | def _concatenate_to_cache(self, key, value, query, attention_mask): method _create_position_bias (line 324) | def _create_position_bias( method __call__ (line 348) | def __call__( class FlaxT5LayerSelfAttention (line 464) | class FlaxT5LayerSelfAttention(nn.Module): method setup (line 469) | def setup(self): method __call__ (line 479) | def __call__( class FlaxT5LayerCrossAttention (line 502) | class FlaxT5LayerCrossAttention(nn.Module): method setup (line 506) | def setup(self): method __call__ (line 513) | def __call__( class FlaxT5Block (line 535) | class FlaxT5Block(nn.Module): method setup (line 540) | def setup(self): method __call__ (line 557) | def __call__( class FlaxT5LayerCollection (line 608) | class FlaxT5LayerCollection(nn.Module): method setup (line 613) | def setup(self): method __call__ (line 618) | def __call__( class FlaxT5BlockCollection (line 643) | class FlaxT5BlockCollection(nn.Module): method setup (line 648) | def setup(self): method __call__ (line 672) | def __call__( class FlaxT5Stack (line 729) | class FlaxT5Stack(nn.Module): method setup (line 735) | def setup(self): method __call__ (line 746) | def __call__( class FlaxT5PreTrainedModel (line 927) | class FlaxT5PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 937) | def __init__( method enable_gradient_checkpointing (line 950) | def enable_gradient_checkpointing(self): method init_weights (line 957) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 987) | def __call__( method init_cache (line 1036) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 1074) | def encode( method decode (line 1132) | def decode( class FlaxT5Module (line 1278) | class FlaxT5Module(nn.Module): method _get_encoder_module (line 1283) | def _get_encoder_module(self): method _get_decoder_module (line 1286) | def _get_decoder_module(self): method setup (line 1289) | def setup(self): method __call__ (line 1316) | def __call__( class FlaxT5Model (line 1367) | class FlaxT5Model(FlaxT5PreTrainedModel): class FlaxT5EncoderModule (line 1408) | class FlaxT5EncoderModule(nn.Module): method setup (line 1413) | def setup(self): method __call__ (line 1432) | def __call__( class FlaxT5EncoderModel (line 1454) | class FlaxT5EncoderModel(FlaxT5PreTrainedModel): method __call__ (line 1458) | def __call__( class FlaxT5ForConditionalGenerationModule (line 1495) | class FlaxT5ForConditionalGenerationModule(nn.Module): method _get_encoder_module (line 1500) | def _get_encoder_module(self): method _get_decoder_module (line 1503) | def _get_decoder_module(self): method setup (line 1506) | def setup(self): method __call__ (line 1539) | def __call__( class FlaxT5ForConditionalGeneration (line 1605) | class FlaxT5ForConditionalGeneration(FlaxT5PreTrainedModel): method decode (line 1610) | def decode( method prepare_inputs_for_generation (line 1739) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1768) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/t5/modeling_t5.py function load_tf_weights_in_t5 (line 74) | def load_tf_weights_in_t5(model, config, tf_checkpoint_path): class T5LayerNorm (line 237) | class T5LayerNorm(nn.Module): method __init__ (line 238) | def __init__(self, hidden_size, eps=1e-6): method forward (line 246) | def forward(self, hidden_states): class T5DenseActDense (line 278) | class T5DenseActDense(nn.Module): method __init__ (line 279) | def __init__(self, config: T5Config): method forward (line 286) | def forward(self, hidden_states): class T5DenseGatedActDense (line 300) | class T5DenseGatedActDense(nn.Module): method __init__ (line 301) | def __init__(self, config: T5Config): method forward (line 309) | def forward(self, hidden_states): class T5LayerFF (line 329) | class T5LayerFF(nn.Module): method __init__ (line 330) | def __init__(self, config: T5Config): method forward (line 340) | def forward(self, hidden_states): class T5Attention (line 347) | class T5Attention(nn.Module): method __init__ (line 348) | def __init__(self, config: T5Config, has_relative_attention_bias=False): method prune_heads (line 371) | def prune_heads(self, heads): method _relative_position_bucket (line 388) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 435) | def compute_bias(self, query_length, key_length, device=None): method forward (line 452) | def forward( class T5LayerSelfAttention (line 582) | class T5LayerSelfAttention(nn.Module): method __init__ (line 583) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 589) | def forward( class T5LayerCrossAttention (line 614) | class T5LayerCrossAttention(nn.Module): method __init__ (line 615) | def __init__(self, config): method forward (line 621) | def forward( class T5Block (line 650) | class T5Block(nn.Module): method __init__ (line 651) | def __init__(self, config, has_relative_attention_bias=False): method forward (line 661) | def forward( class T5PreTrainedModel (line 774) | class T5PreTrainedModel(PreTrainedModel): method dummy_inputs (line 789) | def dummy_inputs(self): method _init_weights (line 799) | def _init_weights(self, module): method _set_gradient_checkpointing (line 843) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 847) | def _shift_right(self, input_ids): class T5Stack (line 875) | class T5Stack(T5PreTrainedModel): method __init__ (line 876) | def __init__(self, config, embed_tokens=None): method parallelize (line 896) | def parallelize(self, device_map=None): method deparallelize (line 924) | def deparallelize(self): method get_input_embeddings (line 939) | def get_input_embeddings(self): method set_input_embeddings (line 942) | def set_input_embeddings(self, new_embeddings): method forward (line 945) | def forward( class T5Model (line 1324) | class T5Model(T5PreTrainedModel): method __init__ (line 1333) | def __init__(self, config: T5Config): method parallelize (line 1357) | def parallelize(self, device_map=None): method deparallelize (line 1376) | def deparallelize(self): method get_input_embeddings (line 1389) | def get_input_embeddings(self): method set_input_embeddings (line 1392) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1397) | def get_encoder(self): method get_decoder (line 1400) | def get_decoder(self): method _prune_heads (line 1403) | def _prune_heads(self, heads_to_prune): method forward (line 1413) | def forward( class T5ForConditionalGeneration (line 1527) | class T5ForConditionalGeneration(T5PreTrainedModel): method __init__ (line 1537) | def __init__(self, config: T5Config): method parallelize (line 1565) | def parallelize(self, device_map=None): method deparallelize (line 1585) | def deparallelize(self): method get_input_embeddings (line 1599) | def get_input_embeddings(self): method set_input_embeddings (line 1602) | def set_input_embeddings(self, new_embeddings): method set_output_embeddings (line 1607) | def set_output_embeddings(self, new_embeddings): method get_output_embeddings (line 1610) | def get_output_embeddings(self): method get_encoder (line 1613) | def get_encoder(self): method get_decoder (line 1616) | def get_decoder(self): method forward (line 1621) | def forward( method prepare_inputs_for_generation (line 1774) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1803) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 1806) | def _reorder_cache(self, past_key_values, beam_idx): class T5EncoderModel (line 1841) | class T5EncoderModel(T5PreTrainedModel): method __init__ (line 1844) | def __init__(self, config: T5Config): method parallelize (line 1861) | def parallelize(self, device_map=None): method deparallelize (line 1879) | def deparallelize(self): method get_input_embeddings (line 1890) | def get_input_embeddings(self): method set_input_embeddings (line 1893) | def set_input_embeddings(self, new_embeddings): method get_encoder (line 1897) | def get_encoder(self): method _prune_heads (line 1900) | def _prune_heads(self, heads_to_prune): method forward (line 1910) | def forward( FILE: transformers/models/t5/modeling_tf_t5.py class TFT5LayerNorm (line 77) | class TFT5LayerNorm(tf.keras.layers.Layer): method __init__ (line 78) | def __init__(self, epsilon=1e-6, **kwargs): method build (line 85) | def build(self, input_shape): method call (line 90) | def call(self, hidden_states): class TFT5DenseActDense (line 96) | class TFT5DenseActDense(tf.keras.layers.Layer): method __init__ (line 97) | def __init__(self, config, **kwargs): method call (line 114) | def call(self, hidden_states, training=False): class TFT5DenseGatedActDense (line 122) | class TFT5DenseGatedActDense(tf.keras.layers.Layer): method __init__ (line 123) | def __init__(self, config, **kwargs): method call (line 143) | def call(self, hidden_states, training=False): class TFT5LayerFF (line 152) | class TFT5LayerFF(tf.keras.layers.Layer): method __init__ (line 153) | def __init__(self, config, **kwargs): method call (line 163) | def call(self, hidden_states, training=False): class TFT5Attention (line 170) | class TFT5Attention(tf.keras.layers.Layer): method __init__ (line 173) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method build (line 221) | def build(self, input_shape): method prune_heads (line 232) | def prune_heads(self, heads): method _relative_position_bucket (line 236) | def _relative_position_bucket(relative_position, bidirectional=True, n... method compute_bias (line 280) | def compute_bias(self, query_length, key_length): method call (line 299) | def call( class TFT5LayerSelfAttention (line 434) | class TFT5LayerSelfAttention(tf.keras.layers.Layer): method __init__ (line 435) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method call (line 445) | def call( class TFT5LayerCrossAttention (line 472) | class TFT5LayerCrossAttention(tf.keras.layers.Layer): method __init__ (line 473) | def __init__(self, config, **kwargs): method call (line 483) | def call( class TFT5Block (line 514) | class TFT5Block(tf.keras.layers.Layer): method __init__ (line 515) | def __init__(self, config, has_relative_attention_bias=False, **kwargs): method call (line 536) | def call( class TFT5MainLayer (line 622) | class TFT5MainLayer(tf.keras.layers.Layer): method __init__ (line 625) | def __init__(self, config, embed_tokens=None, **kwargs): method _prune_heads (line 646) | def _prune_heads(self, heads_to_prune): method call (line 650) | def call( class TFT5PreTrainedModel (line 857) | class TFT5PreTrainedModel(TFPreTrainedModel): method get_input_embeddings (line 868) | def get_input_embeddings(self): method set_input_embeddings (line 871) | def set_input_embeddings(self, value): method _shift_right (line 877) | def _shift_right(self, input_ids): class TFT5Model (line 1093) | class TFT5Model(TFT5PreTrainedModel): method __init__ (line 1094) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 1115) | def get_encoder(self): method get_decoder (line 1118) | def get_decoder(self): method call (line 1124) | def call( class TFT5ForConditionalGeneration (line 1226) | class TFT5ForConditionalGeneration(TFT5PreTrainedModel, TFCausalLanguage... method __init__ (line 1227) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 1254) | def get_output_embeddings(self): method set_output_embeddings (line 1262) | def set_output_embeddings(self, value): method get_encoder (line 1275) | def get_encoder(self): method get_decoder (line 1278) | def get_decoder(self): method call (line 1284) | def call( method serving_output (line 1424) | def serving_output(self, output): method prepare_inputs_for_generation (line 1443) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 1471) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): class TFT5EncoderModel (line 1479) | class TFT5EncoderModel(TFT5PreTrainedModel): method __init__ (line 1480) | def __init__(self, config, *inputs, **kwargs): method get_encoder (line 1495) | def get_encoder(self): method call (line 1501) | def call( FILE: transformers/models/t5/tokenization_t5.py class T5Tokenizer (line 55) | class T5Tokenizer(PreTrainedTokenizer): method __init__ (line 114) | def __init__( method _eventually_correct_t5_max_length (line 157) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method vocab_size (line 179) | def vocab_size(self): method get_vocab (line 182) | def get_vocab(self): method get_special_tokens_mask (line 187) | def get_special_tokens_mask( method get_sentinel_tokens (line 215) | def get_sentinel_tokens(self): method get_sentinel_token_ids (line 220) | def get_sentinel_token_ids(self): method _add_eos_if_not_present (line 223) | def _add_eos_if_not_present(self, token_ids: List[int]) -> List[int]: method create_token_type_ids_from_sequences (line 234) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 256) | def build_inputs_with_special_tokens( method __getstate__ (line 282) | def __getstate__(self): method __setstate__ (line 287) | def __setstate__(self, d): method _tokenize (line 297) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 301) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 309) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 317) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 336) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/t5/tokenization_t5_fast.py class T5TokenizerFast (line 66) | class T5TokenizerFast(PreTrainedTokenizerFast): method __init__ (line 109) | def __init__( method _eventually_correct_t5_max_length (line 149) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method save_vocabulary (line 170) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 190) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 216) | def create_token_type_ids_from_sequences( method get_sentinel_tokens (line 238) | def get_sentinel_tokens(self): method get_sentinel_token_ids (line 243) | def get_sentinel_token_ids(self): FILE: transformers/models/table_transformer/configuration_table_transformer.py class TableTransformerConfig (line 37) | class TableTransformerConfig(PretrainedConfig): method __init__ (line 144) | def __init__( method num_attention_heads (line 233) | def num_attention_heads(self) -> int: method hidden_size (line 237) | def hidden_size(self) -> int: class TableTransformerOnnxConfig (line 242) | class TableTransformerOnnxConfig(OnnxConfig): method inputs (line 246) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 255) | def atol_for_validation(self) -> float: method default_onnx_opset (line 259) | def default_onnx_opset(self) -> int: FILE: transformers/models/table_transformer/convert_table_transformer_original_pytorch_checkpoint_to_pytorch.py function rename_key (line 115) | def rename_key(state_dict, old, new): function rename_backbone_keys (line 120) | def rename_backbone_keys(state_dict): function read_in_q_k_v (line 132) | def read_in_q_k_v(state_dict): function resize (line 173) | def resize(image, checkpoint_url): function normalize (line 183) | def normalize(image): function convert_table_transformer_checkpoint (line 190) | def convert_table_transformer_checkpoint(checkpoint_url, pytorch_dump_fo... FILE: transformers/models/table_transformer/modeling_table_transformer.py class TableTransformerDecoderOutput (line 66) | class TableTransformerDecoderOutput(BaseModelOutputWithCrossAttentions): class TableTransformerModelOutput (line 98) | class TableTransformerModelOutput(Seq2SeqModelOutput): class TableTransformerObjectDetectionOutput (line 140) | class TableTransformerObjectDetectionOutput(ModelOutput): class TableTransformerFrozenBatchNorm2d (line 203) | class TableTransformerFrozenBatchNorm2d(nn.Module): method __init__ (line 211) | def __init__(self, n): method _load_from_state_dict (line 218) | def _load_from_state_dict( method forward (line 229) | def forward(self, x): function replace_batch_norm (line 243) | def replace_batch_norm(m, name=""): class TableTransformerConvEncoder (line 259) | class TableTransformerConvEncoder(nn.Module): method __init__ (line 267) | def __init__(self, config): method forward (line 306) | def forward(self, pixel_values: torch.Tensor, pixel_mask: torch.Tensor): class TableTransformerConvModel (line 319) | class TableTransformerConvModel(nn.Module): method __init__ (line 324) | def __init__(self, conv_encoder, position_embedding): method forward (line 329) | def forward(self, pixel_values, pixel_mask): function _expand_mask (line 340) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, target_len: Opt... class TableTransformerSinePositionEmbedding (line 355) | class TableTransformerSinePositionEmbedding(nn.Module): method __init__ (line 361) | def __init__(self, embedding_dim=64, temperature=10000, normalize=Fals... method forward (line 372) | def forward(self, pixel_values, pixel_mask): class TableTransformerLearnedPositionEmbedding (line 393) | class TableTransformerLearnedPositionEmbedding(nn.Module): method __init__ (line 398) | def __init__(self, embedding_dim=256): method forward (line 403) | def forward(self, pixel_values, pixel_mask=None): function build_position_encoding (line 417) | def build_position_encoding(config): class TableTransformerAttention (line 431) | class TableTransformerAttention(nn.Module): method __init__ (line 438) | def __init__( method _shape (line 463) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method with_pos_embed (line 466) | def with_pos_embed(self, tensor: torch.Tensor, position_embeddings: Op... method forward (line 469) | def forward( class TableTransformerEncoderLayer (line 562) | class TableTransformerEncoderLayer(nn.Module): method __init__ (line 564) | def __init__(self, config: TableTransformerConfig): method forward (line 580) | def forward( class TableTransformerDecoderLayer (line 635) | class TableTransformerDecoderLayer(nn.Module): method __init__ (line 637) | def __init__(self, config: TableTransformerConfig): method forward (line 663) | def forward( class TableTransformerClassificationHead (line 745) | class TableTransformerClassificationHead(nn.Module): method __init__ (line 748) | def __init__(self, input_dim: int, inner_dim: int, num_classes: int, p... method forward (line 754) | def forward(self, hidden_states: torch.Tensor): class TableTransformerPreTrainedModel (line 763) | class TableTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 768) | def _init_weights(self, module): method _set_gradient_checkpointing (line 785) | def _set_gradient_checkpointing(self, module, value=False): class TableTransformerEncoder (line 844) | class TableTransformerEncoder(TableTransformerPreTrainedModel): method __init__ (line 859) | def __init__(self, config: TableTransformerConfig): method forward (line 872) | def forward( class TableTransformerDecoder (line 956) | class TableTransformerDecoder(TableTransformerPreTrainedModel): method __init__ (line 971) | def __init__(self, config: TableTransformerConfig): method forward (line 984) | def forward( class TableTransformerModel (line 1144) | class TableTransformerModel(TableTransformerPreTrainedModel): method __init__ (line 1146) | def __init__(self, config: TableTransformerConfig): method get_encoder (line 1165) | def get_encoder(self): method get_decoder (line 1168) | def get_decoder(self): method freeze_backbone (line 1171) | def freeze_backbone(self): method unfreeze_backbone (line 1175) | def unfreeze_backbone(self): method forward (line 1181) | def forward( class TableTransformerForObjectDetection (line 1313) | class TableTransformerForObjectDetection(TableTransformerPreTrainedModel): method __init__ (line 1315) | def __init__(self, config: TableTransformerConfig): method _set_aux_loss (line 1334) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 1342) | def forward( function dice_loss (line 1477) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 1497) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class TableTransformerLoss (line 1529) | class TableTransformerLoss(nn.Module): method __init__ (line 1554) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 1565) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 1587) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 1602) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 1626) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 1659) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 1665) | def _get_target_permutation_idx(self, indices): method get_loss (line 1671) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 1682) | def forward(self, outputs, targets): class TableTransformerMLPPredictionHead (line 1728) | class TableTransformerMLPPredictionHead(nn.Module): method __init__ (line 1737) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1743) | def forward(self, x): class TableTransformerHungarianMatcher (line 1750) | class TableTransformerHungarianMatcher(nn.Module): method __init__ (line 1767) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 1778) | def forward(self, outputs, targets): function _upcast (line 1829) | def _upcast(t: Tensor) -> Tensor: function box_area (line 1838) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 1855) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 1872) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 1897) | def _max_by_axis(the_list): class NestedTensor (line 1907) | class NestedTensor(object): method __init__ (line 1908) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 1912) | def to(self, device): method decompose (line 1921) | def decompose(self): method __repr__ (line 1924) | def __repr__(self): function nested_tensor_from_tensor_list (line 1929) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: transformers/models/tapas/configuration_tapas.py class TapasConfig (line 45) | class TapasConfig(PretrainedConfig): method __init__ (line 157) | def __init__( FILE: transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 35) | def convert_tf_checkpoint_to_pytorch( FILE: transformers/models/tapas/modeling_tapas.py class TableQuestionAnsweringOutput (line 91) | class TableQuestionAnsweringOutput(ModelOutput): function load_tf_weights_in_tapas (line 120) | def load_tf_weights_in_tapas(model, config, tf_checkpoint_path): class TapasEmbeddings (line 254) | class TapasEmbeddings(nn.Module): method __init__ (line 260) | def __init__(self, config): method forward (line 281) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class TapasSelfAttention (line 333) | class TapasSelfAttention(nn.Module): method __init__ (line 334) | def __init__(self, config): method transpose_for_scores (line 353) | def transpose_for_scores(self, x): method forward (line 358) | def forward( class TapasSelfOutput (line 429) | class TapasSelfOutput(nn.Module): method __init__ (line 430) | def __init__(self, config): method forward (line 436) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TapasAttention (line 443) | class TapasAttention(nn.Module): method __init__ (line 444) | def __init__(self, config): method prune_heads (line 451) | def prune_heads(self, heads): method forward (line 470) | def forward( class TapasIntermediate (line 495) | class TapasIntermediate(nn.Module): method __init__ (line 496) | def __init__(self, config): method forward (line 504) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasOutput (line 511) | class TapasOutput(nn.Module): method __init__ (line 512) | def __init__(self, config): method forward (line 518) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TapasLayer (line 525) | class TapasLayer(nn.Module): method __init__ (line 526) | def __init__(self, config): method forward (line 541) | def forward( method feed_forward_chunk (line 607) | def feed_forward_chunk(self, attention_output): class TapasEncoder (line 613) | class TapasEncoder(nn.Module): method __init__ (line 614) | def __init__(self, config): method forward (line 620) | def forward( class TapasPooler (line 682) | class TapasPooler(nn.Module): method __init__ (line 683) | def __init__(self, config): method forward (line 688) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasPredictionHeadTransform (line 698) | class TapasPredictionHeadTransform(nn.Module): method __init__ (line 699) | def __init__(self, config): method forward (line 708) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TapasLMPredictionHead (line 716) | class TapasLMPredictionHead(nn.Module): method __init__ (line 717) | def __init__(self, config): method forward (line 730) | def forward(self, hidden_states): class TapasOnlyMLMHead (line 737) | class TapasOnlyMLMHead(nn.Module): method __init__ (line 738) | def __init__(self, config): method forward (line 742) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class TapasPreTrainedModel (line 747) | class TapasPreTrainedModel(PreTrainedModel): method _init_weights (line 758) | def _init_weights(self, module): method _set_gradient_checkpointing (line 774) | def _set_gradient_checkpointing(self, module, value=False): class TapasModel (line 841) | class TapasModel(TapasPreTrainedModel): method __init__ (line 852) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 864) | def get_input_embeddings(self): method set_input_embeddings (line 867) | def set_input_embeddings(self, value): method _prune_heads (line 870) | def _prune_heads(self, heads_to_prune): method forward (line 880) | def forward( class TapasForMaskedLM (line 993) | class TapasForMaskedLM(TapasPreTrainedModel): method __init__ (line 998) | def __init__(self, config): method get_output_embeddings (line 1007) | def get_output_embeddings(self): method set_output_embeddings (line 1010) | def set_output_embeddings(self, new_embeddings): method forward (line 1015) | def forward( class TapasForQuestionAnswering (line 1109) | class TapasForQuestionAnswering(TapasPreTrainedModel): method __init__ (line 1110) | def __init__(self, config: TapasConfig): method forward (line 1146) | def forward( class TapasForSequenceClassification (line 1454) | class TapasForSequenceClassification(TapasPreTrainedModel): method __init__ (line 1455) | def __init__(self, config): method forward (line 1468) | def forward( class AverageApproximationFunction (line 1574) | class AverageApproximationFunction(str, enum.Enum): class IndexMap (line 1583) | class IndexMap(object): method __init__ (line 1586) | def __init__(self, indices, num_segments, batch_dims=0): method batch_shape (line 1605) | def batch_shape(self): class ProductIndexMap (line 1609) | class ProductIndexMap(IndexMap): method __init__ (line 1612) | def __init__(self, outer_index, inner_index): method project_outer (line 1637) | def project_outer(self, index): method project_inner (line 1642) | def project_inner(self, index): function gather (line 1654) | def gather(values, index, name="segmented_gather"): function flatten (line 1687) | def flatten(index, name="segmented_flatten"): function range_index_map (line 1716) | def range_index_map(batch_shape, num_segments, name="range_index_map"): function _segment_reduce (line 1757) | def _segment_reduce(values, index, segment_reduce_fn, name): function reduce_sum (line 1805) | def reduce_sum(values, index, name="segmented_reduce_sum"): function reduce_mean (line 1832) | def reduce_mean(values, index, name="segmented_reduce_mean"): function reduce_max (line 1861) | def reduce_max(values, index, name="segmented_reduce_max"): function reduce_min (line 1888) | def reduce_min(values, index, name="segmented_reduce_min"): function compute_column_logits (line 1918) | def compute_column_logits( function _single_column_cell_selection_loss (line 1970) | def _single_column_cell_selection_loss(token_logits, column_logits, labe... function compute_token_logits (line 2077) | def compute_token_logits(sequence_output, temperature, output_weights, o... function _calculate_aggregate_mask (line 2099) | def _calculate_aggregate_mask(answer, pooled_output, cell_selection_pref... function _calculate_aggregation_loss_known (line 2150) | def _calculate_aggregation_loss_known( function _calculate_aggregation_loss_unknown (line 2196) | def _calculate_aggregation_loss_unknown(logits_aggregation, aggregate_ma... function _calculate_aggregation_loss (line 2220) | def _calculate_aggregation_loss( function _calculate_expected_result (line 2258) | def _calculate_expected_result( function huber_loss (line 2346) | def huber_loss(input, target, delta: float = 1.0): function _calculate_regression_loss (line 2351) | def _calculate_regression_loss( FILE: transformers/models/tapas/modeling_tf_tapas.py class TFTableQuestionAnsweringOutput (line 116) | class TFTableQuestionAnsweringOutput(ModelOutput): class TFTapasEmbeddings (line 145) | class TFTapasEmbeddings(tf.keras.layers.Layer): method __init__ (line 151) | def __init__(self, config: TapasConfig, **kwargs): method build (line 163) | def build(self, input_shape: tf.TensorShape): method call (line 191) | def call( class TFTapasSelfAttention (line 255) | class TFTapasSelfAttention(tf.keras.layers.Layer): method __init__ (line 256) | def __init__(self, config: TapasConfig, **kwargs): method transpose_for_scores (line 283) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 290) | def call( class TFTapasSelfOutput (line 373) | class TFTapasSelfOutput(tf.keras.layers.Layer): method __init__ (line 374) | def __init__(self, config: TapasConfig, **kwargs): method call (line 383) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFTapasAttention (line 392) | class TFTapasAttention(tf.keras.layers.Layer): method __init__ (line 393) | def __init__(self, config: TapasConfig, **kwargs): method prune_heads (line 399) | def prune_heads(self, heads): method call (line 402) | def call( class TFTapasIntermediate (line 433) | class TFTapasIntermediate(tf.keras.layers.Layer): method __init__ (line 434) | def __init__(self, config: TapasConfig, **kwargs): method call (line 446) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasOutput (line 454) | class TFTapasOutput(tf.keras.layers.Layer): method __init__ (line 455) | def __init__(self, config: TapasConfig, **kwargs): method call (line 464) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFTapasLayer (line 473) | class TFTapasLayer(tf.keras.layers.Layer): method __init__ (line 474) | def __init__(self, config: TapasConfig, **kwargs): method call (line 487) | def call( class TFTapasEncoder (line 560) | class TFTapasEncoder(tf.keras.layers.Layer): method __init__ (line 561) | def __init__(self, config: TapasConfig, **kwargs): method call (line 566) | def call( class TFTapasPooler (line 630) | class TFTapasPooler(tf.keras.layers.Layer): method __init__ (line 631) | def __init__(self, config: TapasConfig, **kwargs): method call (line 641) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasPredictionHeadTransform (line 651) | class TFTapasPredictionHeadTransform(tf.keras.layers.Layer): method __init__ (line 652) | def __init__(self, config: TapasConfig, **kwargs): method call (line 668) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasLMPredictionHead (line 677) | class TFTapasLMPredictionHead(tf.keras.layers.Layer): method __init__ (line 678) | def __init__(self, config: TapasConfig, input_embeddings: tf.keras.lay... method build (line 690) | def build(self, input_shape: tf.TensorShape): method get_output_embeddings (line 695) | def get_output_embeddings(self) -> tf.keras.layers.Layer: method set_output_embeddings (line 698) | def set_output_embeddings(self, value: tf.Variable): method get_bias (line 702) | def get_bias(self) -> Dict[str, tf.Variable]: method set_bias (line 705) | def set_bias(self, value: tf.Variable): method call (line 709) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFTapasMLMHead (line 721) | class TFTapasMLMHead(tf.keras.layers.Layer): method __init__ (line 722) | def __init__(self, config: TapasConfig, input_embeddings: tf.keras.lay... method call (line 727) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFTapasMainLayer (line 734) | class TFTapasMainLayer(tf.keras.layers.Layer): method __init__ (line 737) | def __init__(self, config: TapasConfig, add_pooling_layer: bool = True... method get_input_embeddings (line 747) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 750) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 754) | def _prune_heads(self, heads_to_prune): method call (line 762) | def call( class TFTapasPreTrainedModel (line 856) | class TFTapasPreTrainedModel(TFPreTrainedModel): method input_signature (line 866) | def input_signature(self): class TFTapasModel (line 974) | class TFTapasModel(TFTapasPreTrainedModel): method __init__ (line 975) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 983) | def call( class TFTapasForMaskedLM (line 1038) | class TFTapasForMaskedLM(TFTapasPreTrainedModel, TFMaskedLanguageModelin... method __init__ (line 1039) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method get_lm_head (line 1051) | def get_lm_head(self) -> tf.keras.layers.Layer: method call (line 1057) | def call( class TFTapasComputeTokenLogits (line 1133) | class TFTapasComputeTokenLogits(tf.keras.layers.Layer): method __init__ (line 1134) | def __init__(self, config: TapasConfig, **kwargs): method call (line 1153) | def call(self, sequence_output: tf.Tensor) -> tf.Tensor: class TFTapasComputeColumnLogits (line 1169) | class TFTapasComputeColumnLogits(tf.keras.layers.Layer): method __init__ (line 1170) | def __init__(self, config: TapasConfig, **kwargs): method call (line 1187) | def call(self, sequence_output, cell_index, cell_mask, allow_empty_col... class TFTapasForQuestionAnswering (line 1238) | class TFTapasForQuestionAnswering(TFTapasPreTrainedModel): method __init__ (line 1239) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1263) | def call( class TFTapasForSequenceClassification (line 1563) | class TFTapasForSequenceClassification(TFTapasPreTrainedModel, TFSequenc... method __init__ (line 1564) | def __init__(self, config: TapasConfig, *inputs, **kwargs): method call (line 1577) | def call( class AverageApproximationFunction (line 1661) | class AverageApproximationFunction(str, enum.Enum): class IndexMap (line 1670) | class IndexMap(object): method __init__ (line 1673) | def __init__(self, indices, num_segments, batch_dims=0): method batch_shape (line 1689) | def batch_shape(self): class ProductIndexMap (line 1693) | class ProductIndexMap(IndexMap): method __init__ (line 1696) | def __init__(self, outer_index, inner_index): method project_outer (line 1722) | def project_outer(self, index): method project_inner (line 1730) | def project_inner(self, index): function gather (line 1739) | def gather(values, index, name="segmented_gather"): function flatten (line 1755) | def flatten(index, name="segmented_flatten"): function range_index_map (line 1778) | def range_index_map(batch_shape, num_segments, name="range_index_map"): function _segment_reduce (line 1806) | def _segment_reduce(values, index, segment_reduce_fn, name): function reduce_mean (line 1841) | def reduce_mean(values, index, name="segmented_reduce_mean"): function reduce_sum (line 1864) | def reduce_sum(values, index, name="segmented_reduce_sum"): function reduce_max (line 1887) | def reduce_max(values, index, name="segmented_reduce_max"): function reduce_min (line 1909) | def reduce_min(values, index, name="segmented_reduce_min"): function _single_column_cell_selection_loss (line 1914) | def _single_column_cell_selection_loss(token_logits, column_logits, labe... function _calculate_aggregate_mask (line 1987) | def _calculate_aggregate_mask(answer, pooled_output, cell_selection_pref... function _calculate_aggregation_loss_known (line 2031) | def _calculate_aggregation_loss_known( function _calculate_aggregation_loss_unknown (line 2077) | def _calculate_aggregation_loss_unknown(logits_aggregation, aggregate_ma... function _calculate_aggregation_loss (line 2101) | def _calculate_aggregation_loss( function _calculate_expected_result (line 2139) | def _calculate_expected_result( function _calculate_regression_loss (line 2218) | def _calculate_regression_loss( FILE: transformers/models/tapas/tokenization_tapas.py class TapasTruncationStrategy (line 137) | class TapasTruncationStrategy(ExplicitEnum): class TokenCoordinates (line 150) | class TokenCoordinates: class TokenizedTable (line 157) | class TokenizedTable: class SerializedExample (line 163) | class SerializedExample: function _is_inner_wordpiece (line 170) | def _is_inner_wordpiece(token: Text): function load_vocab (line 174) | def load_vocab(vocab_file): function whitespace_tokenize (line 185) | def whitespace_tokenize(text): class TapasTokenizer (line 236) | class TapasTokenizer(PreTrainedTokenizer): method __init__ (line 320) | def __init__( method do_lower_case (line 405) | def do_lower_case(self): method vocab_size (line 409) | def vocab_size(self): method get_vocab (line 412) | def get_vocab(self): method _tokenize (line 415) | def _tokenize(self, text): method _convert_token_to_id (line 430) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 434) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 438) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 443) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method create_attention_mask_from_sequences (line 463) | def create_attention_mask_from_sequences(self, query_ids: List[int], t... method create_segment_token_type_ids_from_sequences (line 477) | def create_segment_token_type_ids_from_sequences( method create_column_token_type_ids_from_sequences (line 494) | def create_column_token_type_ids_from_sequences( method create_row_token_type_ids_from_sequences (line 511) | def create_row_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 528) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 547) | def get_special_tokens_mask( method __call__ (line 576) | def __call__( method batch_encode_plus (line 693) | def batch_encode_plus( method _get_question_tokens (line 789) | def _get_question_tokens(self, query): method _batch_encode_plus (line 802) | def _batch_encode_plus( method _batch_prepare_for_model (line 859) | def _batch_prepare_for_model( method encode (line 931) | def encode( method encode_plus (line 974) | def encode_plus( method _encode_plus (line 1057) | def _encode_plus( method prepare_for_model (line 1113) | def prepare_for_model( method _get_truncated_table_rows (line 1305) | def _get_truncated_table_rows( method _tokenize_table (line 1362) | def _tokenize_table( method _question_encoding_cost (line 1407) | def _question_encoding_cost(self, question_tokens): method _get_token_budget (line 1411) | def _get_token_budget(self, question_tokens, max_length=None): method _get_table_values (line 1425) | def _get_table_values(self, table, num_columns, num_rows, num_tokens) ... method _get_table_boundaries (line 1444) | def _get_table_boundaries(self, table): method _get_table_cost (line 1457) | def _get_table_cost(self, table, num_columns, num_rows, num_tokens): method _get_max_num_tokens (line 1460) | def _get_max_num_tokens(self, question_tokens, tokenized_table, num_co... method _get_num_columns (line 1479) | def _get_num_columns(self, table): method _get_num_rows (line 1485) | def _get_num_rows(self, table, drop_rows_to_fit): method _serialize_text (line 1494) | def _serialize_text(self, question_tokens): method _serialize (line 1515) | def _serialize( method _get_column_values (line 1545) | def _get_column_values(self, table, col_index): method _get_cell_token_indexes (line 1553) | def _get_cell_token_indexes(self, column_ids, row_ids, column_id, row_... method _get_numeric_column_ranks (line 1558) | def _get_numeric_column_ranks(self, column_ids, row_ids, table): method _get_numeric_sort_key_fn (line 1593) | def _get_numeric_sort_key_fn(self, table_numeric_values, value): method _get_numeric_relations (line 1614) | def _get_numeric_relations(self, question, column_ids, row_ids, table): method _get_numeric_values (line 1655) | def _get_numeric_values(self, table, column_ids, row_ids): method _get_numeric_values_scale (line 1678) | def _get_numeric_values_scale(self, table, column_ids, row_ids): method _pad_to_seq_length (line 1699) | def _pad_to_seq_length(self, inputs): method _get_all_answer_ids_from_coordinates (line 1705) | def _get_all_answer_ids_from_coordinates( method _get_all_answer_ids (line 1725) | def _get_all_answer_ids(self, column_ids, row_ids, answer_coordinates): method _find_tokens (line 1740) | def _find_tokens(self, text, segment): method _find_answer_coordinates_from_answer_text (line 1751) | def _find_answer_coordinates_from_answer_text( method _find_answer_ids_from_answer_texts (line 1771) | def _find_answer_ids_from_answer_texts( method _get_answer_ids (line 1809) | def _get_answer_ids(self, column_ids, row_ids, answer_coordinates): method get_answer_ids (line 1817) | def get_answer_ids(self, column_ids, row_ids, tokenized_table, answer_... method _pad (line 1827) | def _pad( method _get_cell_token_probs (line 1921) | def _get_cell_token_probs(self, probabilities, segment_ids, row_ids, c... method _get_mean_cell_probs (line 1929) | def _get_mean_cell_probs(self, probabilities, segment_ids, row_ids, co... method convert_logits_to_predictions (line 1938) | def convert_logits_to_predictions(self, data, logits, logits_agg=None,... class BasicTokenizer (line 2040) | class BasicTokenizer(object): method __init__ (line 2060) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 2068) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 2105) | def _run_strip_accents(self, text): method _run_split_on_punc (line 2116) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 2138) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 2151) | def _is_chinese_char(self, cp): method _clean_text (line 2175) | def _clean_text(self, text): class WordpieceTokenizer (line 2190) | class WordpieceTokenizer(object): method __init__ (line 2193) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 2198) | def tokenize(self, text): class Relation (line 2256) | class Relation(enum.Enum): class Date (line 2269) | class Date: class NumericValue (line 2276) | class NumericValue: class NumericValueSpan (line 2282) | class NumericValueSpan: class Cell (line 2289) | class Cell: class Question (line 2295) | class Question: function _process_date_pattern (line 2354) | def _process_date_pattern(dp): function _process_date_patterns (line 2368) | def _process_date_patterns(): function _get_numeric_value_from_date (line 2422) | def _get_numeric_value_from_date(date, mask): function _get_span_length_key (line 2437) | def _get_span_length_key(span): function _get_numeric_value_from_float (line 2442) | def _get_numeric_value_from_float(value): function _parse_date (line 2448) | def _parse_date(text): function _parse_number (line 2465) | def _parse_number(text): function get_all_spans (line 2483) | def get_all_spans(text, max_ngram_length): function normalize_for_match (line 2504) | def normalize_for_match(text): function format_text (line 2508) | def format_text(text): function parse_text (line 2522) | def parse_text(text): function _get_value_type (line 2596) | def _get_value_type(numeric_value): function _get_value_as_primitive_value (line 2604) | def _get_value_as_primitive_value(numeric_value): function _get_all_types (line 2622) | def _get_all_types(numeric_values): function get_numeric_sort_key_fn (line 2626) | def get_numeric_sort_key_fn(numeric_values): function _consolidate_numeric_values (line 2673) | def _consolidate_numeric_values(row_index_to_values, min_consolidation_f... function _get_numeric_values (line 2720) | def _get_numeric_values(text): function _get_column_values (line 2726) | def _get_column_values(table, col_index): function get_numeric_relation (line 2742) | def get_numeric_relation(value, other_value, sort_key_fn): function add_numeric_values_to_question (line 2755) | def add_numeric_values_to_question(question): function filter_invalid_unicode (line 2763) | def filter_invalid_unicode(text): function filter_invalid_unicode_from_table (line 2768) | def filter_invalid_unicode_from_table(table): function add_numeric_table_values (line 2794) | def add_numeric_table_values(table, min_consolidation_fraction=0.7, debu... FILE: transformers/models/tapex/tokenization_tapex.py class TapexTruncationStrategy (line 57) | class TapexTruncationStrategy(ExplicitEnum): function bytes_to_unicode (line 120) | def bytes_to_unicode(): function get_pairs (line 142) | def get_pairs(word): class IndexedRowTableLinearize (line 155) | class IndexedRowTableLinearize: method process_table (line 160) | def process_table(self, table_content: Dict): method process_header (line 173) | def process_header(self, headers: List): method process_row (line 179) | def process_row(self, row: List, row_index: int): class TapexTokenizer (line 194) | class TapexTokenizer(PreTrainedTokenizer): method __init__ (line 272) | def __init__( method build_inputs_with_special_tokens (line 337) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 360) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 385) | def create_token_type_ids_from_sequences( method prepare_for_tokenization (line 406) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method vocab_size (line 413) | def vocab_size(self): method get_vocab (line 416) | def get_vocab(self): method bpe (line 419) | def bpe(self, token): method _tokenize (line 461) | def _tokenize(self, text): method _convert_token_to_id (line 471) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 475) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 479) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 485) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __call__ (line 515) | def __call__( method source_call_func (line 592) | def source_call_func( method batch_encode_plus (line 680) | def batch_encode_plus( method _batch_encode_plus (line 737) | def _batch_encode_plus( method _batch_prepare_for_model (line 796) | def _batch_prepare_for_model( method encode (line 867) | def encode( method encode_plus (line 899) | def encode_plus( method _encode_plus (line 947) | def _encode_plus( method target_call_func (line 1005) | def target_call_func( method target_batch_encode_plus (line 1070) | def target_batch_encode_plus( method _target_batch_encode_plus (line 1123) | def _target_batch_encode_plus( method target_encode (line 1183) | def target_encode( method target_encode_plus (line 1214) | def target_encode_plus( method _target_encode_plus (line 1265) | def _target_encode_plus( method prepare_table_query (line 1319) | def prepare_table_query( method truncate_table_cells (line 1363) | def truncate_table_cells(self, table_content: Dict, question: str, ans... method truncate_cell (line 1379) | def truncate_cell(self, cell_value): method truncate_table_rows (line 1394) | def truncate_table_rows( method estimate_delete_ratio (line 1423) | def estimate_delete_ratio(self, table_content: Dict, question: str, ma... method delete_unrelated_rows (line 1449) | def delete_unrelated_rows(self, table_content: Dict, question: str, an... FILE: transformers/models/time_series_transformer/configuration_time_series_transformer.py class TimeSeriesTransformerConfig (line 33) | class TimeSeriesTransformerConfig(PretrainedConfig): method __init__ (line 137) | def __init__( method _number_of_features (line 225) | def _number_of_features(self) -> int: FILE: transformers/models/time_series_transformer/modeling_time_series_transformer.py class TimeSeriesFeatureEmbedder (line 50) | class TimeSeriesFeatureEmbedder(nn.Module): method __init__ (line 61) | def __init__(self, cardinalities: List[int], embedding_dims: List[int]... method forward (line 67) | def forward(self, features: torch.Tensor) -> torch.Tensor: class TimeSeriesStdScaler (line 84) | class TimeSeriesStdScaler(nn.Module): method __init__ (line 98) | def __init__(self, dim: int, keepdim: bool = False, minimum_scale: flo... method forward (line 107) | def forward(self, data: torch.Tensor, weights: torch.Tensor) -> Tuple[... class TimeSeriesMeanScaler (line 117) | class TimeSeriesMeanScaler(nn.Module): method __init__ (line 133) | def __init__( method forward (line 143) | def forward( class TimeSeriesNOPScaler (line 174) | class TimeSeriesNOPScaler(nn.Module): method __init__ (line 185) | def __init__(self, dim: int, keepdim: bool = False): method forward (line 190) | def forward( function nll (line 198) | def nll(input: torch.distributions.Distribution, target: torch.Tensor) -... function weighted_average (line 205) | def weighted_average(input_tensor: torch.Tensor, weights: Optional[torch... function _make_causal_mask (line 230) | def _make_causal_mask( function _expand_mask (line 248) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class TimeSeriesSinusoidalPositionalEmbedding (line 263) | class TimeSeriesSinusoidalPositionalEmbedding(nn.Embedding): method __init__ (line 266) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method _init_weight (line 271) | def _init_weight(out: nn.Parameter) -> nn.Parameter: method forward (line 288) | def forward(self, input_ids_shape: torch.Size, past_key_values_length:... class TimeSeriesValueEmbedding (line 297) | class TimeSeriesValueEmbedding(nn.Module): method __init__ (line 298) | def __init__(self, feature_size, d_model): method forward (line 302) | def forward(self, x): class TimeSeriesTransformerAttention (line 307) | class TimeSeriesTransformerAttention(nn.Module): method __init__ (line 310) | def __init__( method _shape (line 337) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 340) | def forward( class TimeSeriesTransformerEncoderLayer (line 462) | class TimeSeriesTransformerEncoderLayer(nn.Module): method __init__ (line 463) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 479) | def forward( class TimeSeriesTransformerDecoderLayer (line 531) | class TimeSeriesTransformerDecoderLayer(nn.Module): method __init__ (line 532) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 558) | def forward( class TimeSeriesTransformerPreTrainedModel (line 648) | class TimeSeriesTransformerPreTrainedModel(PreTrainedModel): method _init_weights (line 654) | def _init_weights(self, module): method _set_gradient_checkpointing (line 667) | def _set_gradient_checkpointing(self, module, value=False): class TimeSeriesTransformerEncoder (line 843) | class TimeSeriesTransformerEncoder(TimeSeriesTransformerPreTrainedModel): method __init__ (line 852) | def __init__(self, config: TimeSeriesTransformerConfig): method forward (line 871) | def forward( class TimeSeriesTransformerDecoder (line 981) | class TimeSeriesTransformerDecoder(TimeSeriesTransformerPreTrainedModel): method __init__ (line 990) | def __init__(self, config: TimeSeriesTransformerConfig): method _prepare_decoder_attention_mask (line 1008) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 1031) | def forward( class TimeSeriesTransformerModel (line 1228) | class TimeSeriesTransformerModel(TimeSeriesTransformerPreTrainedModel): method __init__ (line 1229) | def __init__(self, config: TimeSeriesTransformerConfig): method _past_length (line 1253) | def _past_length(self) -> int: method get_lagged_subsequences (line 1256) | def get_lagged_subsequences( method create_network_inputs (line 1288) | def create_network_inputs( method get_encoder (line 1360) | def get_encoder(self): method get_decoder (line 1363) | def get_decoder(self): method forward (line 1368) | def forward( class TimeSeriesTransformerForPrediction (line 1489) | class TimeSeriesTransformerForPrediction(TimeSeriesTransformerPreTrained... method __init__ (line 1490) | def __init__(self, config: TimeSeriesTransformerConfig): method output_params (line 1513) | def output_params(self, dec_output): method get_encoder (line 1516) | def get_encoder(self): method get_decoder (line 1519) | def get_decoder(self): method output_distribution (line 1523) | def output_distribution(self, params, loc=None, scale=None, trailing_n... method forward (line 1531) | def forward( method generate (line 1664) | def generate( FILE: transformers/models/timesformer/configuration_timesformer.py class TimesformerConfig (line 28) | class TimesformerConfig(PretrainedConfig): method __init__ (line 90) | def __init__( FILE: transformers/models/timesformer/convert_timesformer_to_pytorch.py function get_timesformer_config (line 28) | def get_timesformer_config(model_name): function rename_key (line 58) | def rename_key(name): function convert_state_dict (line 103) | def convert_state_dict(orig_state_dict, config): function prepare_video (line 130) | def prepare_video(): function convert_timesformer_checkpoint (line 138) | def convert_timesformer_checkpoint(checkpoint_url, pytorch_dump_folder_p... FILE: transformers/models/timesformer/modeling_timesformer.py class TimesformerPatchEmbeddings (line 46) | class TimesformerPatchEmbeddings(nn.Module): method __init__ (line 49) | def __init__(self, config): method forward (line 65) | def forward(self, pixel_values): class TimesformerEmbeddings (line 75) | class TimesformerEmbeddings(nn.Module): method __init__ (line 80) | def __init__(self, config): method forward (line 100) | def forward(self, pixel_values): function drop_path (line 156) | def drop_path(input: torch.Tensor, drop_prob: float = 0.0, training: boo... class TimeSformerDropPath (line 177) | class TimeSformerDropPath(nn.Module): method __init__ (line 180) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 184) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 187) | def extra_repr(self) -> str: class TimesformerSelfAttention (line 192) | class TimesformerSelfAttention(nn.Module): method __init__ (line 193) | def __init__(self, config: TimesformerConfig): method forward (line 206) | def forward(self, hidden_states, output_attentions: bool = False): class TimesformerSelfOutput (line 226) | class TimesformerSelfOutput(nn.Module): method __init__ (line 232) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 237) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TimeSformerAttention (line 244) | class TimeSformerAttention(nn.Module): method __init__ (line 245) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 250) | def forward( class TimesformerIntermediate (line 264) | class TimesformerIntermediate(nn.Module): method __init__ (line 265) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 275) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TimesformerOutput (line 283) | class TimesformerOutput(nn.Module): method __init__ (line 284) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 289) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TimesformerLayer (line 297) | class TimesformerLayer(nn.Module): method __init__ (line 298) | def __init__(self, config: TimesformerConfig, layer_index: int) -> None: method forward (line 326) | def forward(self, hidden_states: torch.Tensor, output_attentions: bool... class TimesformerEncoder (line 420) | class TimesformerEncoder(nn.Module): method __init__ (line 421) | def __init__(self, config: TimesformerConfig) -> None: method forward (line 427) | def forward( class TimesformerPreTrainedModel (line 473) | class TimesformerPreTrainedModel(PreTrainedModel): method _init_weights (line 484) | def _init_weights(self, module): method _set_gradient_checkpointing (line 497) | def _set_gradient_checkpointing(self, module, value=False): class TimesformerModel (line 534) | class TimesformerModel(TimesformerPreTrainedModel): method __init__ (line 535) | def __init__(self, config): method get_input_embeddings (line 547) | def get_input_embeddings(self): method _prune_heads (line 550) | def _prune_heads(self, heads_to_prune): method forward (line 560) | def forward( class TimesformerForVideoClassification (line 667) | class TimesformerForVideoClassification(TimesformerPreTrainedModel): method __init__ (line 668) | def __init__(self, config): method forward (line 682) | def forward( FILE: transformers/models/timm_backbone/configuration_timm_backbone.py class TimmBackboneConfig (line 25) | class TimmBackboneConfig(PretrainedConfig): method __init__ (line 63) | def __init__( FILE: transformers/models/timm_backbone/modeling_timm_backbone.py class TimmBackbone (line 33) | class TimmBackbone(PreTrainedModel, BackboneMixin): method __init__ (line 43) | def __init__(self, config, **kwargs): method from_pretrained (line 80) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method _init_weights (line 103) | def _init_weights(self, module): method forward (line 109) | def forward( FILE: transformers/models/trajectory_transformer/configuration_trajectory_transformer.py class TrajectoryTransformerConfig (line 31) | class TrajectoryTransformerConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: transformers/models/trajectory_transformer/convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py class Parser (line 23) | class Parser(utils.Parser): function convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch (line 28) | def convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorc... FILE: transformers/models/trajectory_transformer/modeling_trajectory_transformer.py function load_tf_weights_in_trajectory_transformer (line 50) | def load_tf_weights_in_trajectory_transformer(model, config, tf_checkpoi... class TrajectoryTransformerOutput (line 124) | class TrajectoryTransformerOutput(ModelOutput): class TrajectoryTransformerPreTrainedModel (line 154) | class TrajectoryTransformerPreTrainedModel(PreTrainedModel): method _set_gradient_checkpointing (line 166) | def _set_gradient_checkpointing(self, module, value=False): method _init_weights (line 170) | def _init_weights(self, module): class EinLinear (line 229) | class EinLinear(nn.Module): method __init__ (line 230) | def __init__(self, n_models, in_features, out_features, bias): method reset_parameters (line 241) | def reset_parameters(self): method forward (line 249) | def forward(self, input): class CausalSelfAttention (line 262) | class CausalSelfAttention(nn.Module): method __init__ (line 263) | def __init__(self, config): method forward (line 295) | def forward( class Block (line 357) | class Block(nn.Module): method __init__ (line 358) | def __init__(self, config): method forward (line 370) | def forward( class TrajectoryTransformerModel (line 406) | class TrajectoryTransformerModel(TrajectoryTransformerPreTrainedModel): method __init__ (line 409) | def __init__(self, config): method get_block_size (line 440) | def get_block_size(self): method offset_tokens (line 443) | def offset_tokens(self, trajectories): method pad_to_full_observation (line 455) | def pad_to_full_observation(self, hidden_states): method forward (line 471) | def forward( FILE: transformers/models/transfo_xl/configuration_transfo_xl.py class TransfoXLConfig (line 29) | class TransfoXLConfig(PretrainedConfig): method __init__ (line 116) | def __init__( method max_position_embeddings (line 178) | def max_position_embeddings(self): method max_position_embeddings (line 184) | def max_position_embeddings(self, value): FILE: transformers/models/transfo_xl/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py function convert_transfo_xl_checkpoint_to_pytorch (line 41) | def convert_transfo_xl_checkpoint_to_pytorch( FILE: transformers/models/transfo_xl/modeling_tf_transfo_xl.py class TFPositionalEmbedding (line 59) | class TFPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 60) | def __init__(self, demb, **kwargs): method call (line 65) | def call(self, pos_seq, bsz=None): class TFPositionwiseFF (line 76) | class TFPositionwiseFF(tf.keras.layers.Layer): method __init__ (line 77) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False, layer_n... method call (line 95) | def call(self, inp, training=False): class TFRelPartialLearnableMultiHeadAttn (line 119) | class TFRelPartialLearnableMultiHeadAttn(tf.keras.layers.Layer): method __init__ (line 120) | def __init__( method build (line 170) | def build(self, input_shape): method _rel_shift (line 180) | def _rel_shift(self, x): method call (line 190) | def call(self, w, r, attn_mask, mems, head_mask, output_attentions, tr... class TFRelPartialLearnableDecoderLayer (line 271) | class TFRelPartialLearnableDecoderLayer(tf.keras.layers.Layer): method __init__ (line 272) | def __init__( method call (line 314) | def call(self, dec_inp, r, dec_attn_mask, mems, head_mask, output_atte... class TFTransfoEmbeddings (line 323) | class TFTransfoEmbeddings(tf.keras.layers.Layer): method __init__ (line 324) | def __init__(self, vocab_size, emb_size, init_std, **kwargs): method build (line 331) | def build(self, input_shape): method call (line 340) | def call(self, inputs): class TFAdaptiveEmbedding (line 344) | class TFAdaptiveEmbedding(tf.keras.layers.Layer): method __init__ (line 345) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, init_... method build (line 378) | def build(self, input_shape): method call (line 392) | def call(self, inp): class TFTransfoXLMainLayer (line 421) | class TFTransfoXLMainLayer(tf.keras.layers.Layer): method __init__ (line 424) | def __init__(self, config, **kwargs): method build (line 487) | def build(self, input_shape): method get_input_embeddings (line 497) | def get_input_embeddings(self): method set_input_embeddings (line 500) | def set_input_embeddings(self, value): method backward_compatible (line 503) | def backward_compatible(self): method reset_memory_length (line 506) | def reset_memory_length(self, mem_len): method _prune_heads (line 509) | def _prune_heads(self, heads): method init_mems (line 512) | def init_mems(self, bsz): method _update_mems (line 523) | def _update_mems(self, hids, mems, mlen, qlen): method call (line 544) | def call( class TFTransfoXLPreTrainedModel (line 678) | class TFTransfoXLPreTrainedModel(TFPreTrainedModel): class TFTransfoXLModelOutput (line 689) | class TFTransfoXLModelOutput(ModelOutput): class TFTransfoXLLMHeadModelOutput (line 720) | class TFTransfoXLLMHeadModelOutput(ModelOutput): class TFTransfoXLSequenceClassifierOutputWithPast (line 753) | class TFTransfoXLSequenceClassifierOutputWithPast(ModelOutput): class TFTransfoXLModel (line 871) | class TFTransfoXLModel(TFTransfoXLPreTrainedModel): method __init__ (line 872) | def __init__(self, config, *inputs, **kwargs): method call (line 883) | def call( class TFTransfoXLLMHeadModel (line 915) | class TFTransfoXLLMHeadModel(TFTransfoXLPreTrainedModel): method __init__ (line 916) | def __init__(self, config): method _resize_token_embeddings (line 929) | def _resize_token_embeddings(self, new_num_tokens): method get_output_embeddings (line 932) | def get_output_embeddings(self): method reset_memory_length (line 938) | def reset_memory_length(self, mem_len): method init_mems (line 941) | def init_mems(self, bsz): method call (line 951) | def call( method prepare_inputs_for_generation (line 995) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... class TFTransfoXLForSequenceClassification (line 1022) | class TFTransfoXLForSequenceClassification(TFTransfoXLPreTrainedModel, T... method __init__ (line 1023) | def __init__(self, config, *inputs, **kwargs): method get_output_embeddings (line 1034) | def get_output_embeddings(self): method call (line 1044) | def call( FILE: transformers/models/transfo_xl/modeling_tf_transfo_xl_utilities.py class TFAdaptiveSoftmaxMask (line 26) | class TFAdaptiveSoftmaxMask(tf.keras.layers.Layer): method __init__ (line 27) | def __init__(self, vocab_size, d_embed, d_proj, cutoffs, div_val=1, ke... method build (line 46) | def build(self, input_shape): method _logit (line 105) | def _logit(x, W, b, proj=None): method _gather_logprob (line 112) | def _gather_logprob(logprob, target): method call (line 118) | def call(self, hidden, target, return_mean=True, training=False): FILE: transformers/models/transfo_xl/modeling_transfo_xl.py function build_tf_to_pytorch_map (line 51) | def build_tf_to_pytorch_map(model, config): function load_tf_weights_in_transfo_xl (line 119) | def load_tf_weights_in_transfo_xl(model, config, tf_path): class PositionalEmbedding (line 178) | class PositionalEmbedding(nn.Module): method __init__ (line 179) | def __init__(self, demb): method forward (line 187) | def forward(self, pos_seq, bsz=None): class PositionwiseFF (line 197) | class PositionwiseFF(nn.Module): method __init__ (line 198) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False, layer_n... method forward (line 217) | def forward(self, inp): class RelPartialLearnableMultiHeadAttn (line 234) | class RelPartialLearnableMultiHeadAttn(nn.Module): method __init__ (line 235) | def __init__( method _rel_shift (line 275) | def _rel_shift(self, x): method forward (line 287) | def forward(self, w, r, attn_mask=None, mems=None, head_mask=None, out... class RelPartialLearnableDecoderLayer (line 372) | class RelPartialLearnableDecoderLayer(nn.Module): method __init__ (line 373) | def __init__(self, n_head, d_model, d_head, d_inner, dropout, layer_no... method forward (line 383) | def forward(self, dec_inp, r, dec_attn_mask=None, mems=None, head_mask... class AdaptiveEmbedding (line 399) | class AdaptiveEmbedding(nn.Module): method __init__ (line 400) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, sampl... method forward (line 427) | def forward(self, inp): class TransfoXLPreTrainedModel (line 459) | class TransfoXLPreTrainedModel(PreTrainedModel): method _init_weight (line 469) | def _init_weight(self, weight): method _init_bias (line 475) | def _init_bias(self, bias): method _init_weights (line 478) | def _init_weights(self, m): method resize_token_embeddings (line 518) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None... method _get_new_num_tokens_layer (line 557) | def _get_new_num_tokens_layer(self, new_num_tokens, layer): method _get_embedding_shapes (line 570) | def _get_embedding_shapes(self): method _resize_token_embeddings (line 574) | def _resize_token_embeddings(self, new_num_tokens, layer=-1): method _resize_cutoffs (line 585) | def _resize_cutoffs(self, new_num_tokens, new_emb_size, new_embedding_... class TransfoXLModelOutput (line 600) | class TransfoXLModelOutput(ModelOutput): class TransfoXLSequenceClassifierOutputWithPast (line 631) | class TransfoXLSequenceClassifierOutputWithPast(ModelOutput): class TransfoXLLMHeadModelOutput (line 665) | class TransfoXLLMHeadModelOutput(ModelOutput): method logits (line 701) | def logits(self): class TransfoXLModel (line 764) | class TransfoXLModel(TransfoXLPreTrainedModel): method __init__ (line 765) | def __init__(self, config): method get_input_embeddings (line 820) | def get_input_embeddings(self): method set_input_embeddings (line 823) | def set_input_embeddings(self, new_embeddings): method backward_compatible (line 826) | def backward_compatible(self): method reset_memory_length (line 829) | def reset_memory_length(self, mem_len): method _prune_heads (line 832) | def _prune_heads(self, heads): method init_mems (line 836) | def init_mems(self, bsz): method _update_mems (line 848) | def _update_mems(self, hids, mems, mlen, qlen): method forward (line 873) | def forward( class TransfoXLLMHeadModel (line 1004) | class TransfoXLLMHeadModel(TransfoXLPreTrainedModel): method __init__ (line 1007) | def __init__(self, config): method tie_weights (line 1033) | def tie_weights(self): method reset_memory_length (line 1054) | def reset_memory_length(self, mem_len): method init_mems (line 1057) | def init_mems(self, bsz): method forward (line 1066) | def forward( method get_output_embeddings (line 1141) | def get_output_embeddings(self): method prepare_inputs_for_generation (line 1148) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _resize_cutoffs (line 1160) | def _resize_cutoffs(self, new_num_tokens, new_emb_size, new_embedding_... method _reorder_cache (line 1168) | def _reorder_cache(mems: List[torch.Tensor], beam_idx: torch.Tensor) -... class TransfoXLForSequenceClassification (line 1192) | class TransfoXLForSequenceClassification(TransfoXLPreTrainedModel): method __init__ (line 1195) | def __init__(self, config): method forward (line 1209) | def forward( FILE: transformers/models/transfo_xl/modeling_transfo_xl_utilities.py class ProjectedAdaptiveLogSoftmax (line 29) | class ProjectedAdaptiveLogSoftmax(nn.Module): method __init__ (line 30) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, keep_... method _compute_logit (line 71) | def _compute_logit(self, hidden, weight, bias, proj): method forward (line 85) | def forward(self, hidden, labels=None, keep_order=False): method log_prob (line 194) | def log_prob(self, hidden): FILE: transformers/models/transfo_xl/tokenization_transfo_xl.py function tokenize_numbers (line 76) | def tokenize_numbers(text_array: List[str]) -> List[str]: function detokenize_numbers (line 102) | def detokenize_numbers(text: str) -> str: class TransfoXLTokenizer (line 123) | class TransfoXLTokenizer(PreTrainedTokenizer): method __init__ (line 168) | def __init__( method do_lower_case (line 260) | def do_lower_case(self): method _compile_space_around_punctuation_pattern (line 263) | def _compile_space_around_punctuation_pattern(self): method count_file (line 268) | def count_file(self, path, verbose=False, add_eos=False): method count_sents (line 284) | def count_sents(self, sents, verbose=False): method _build_from_file (line 295) | def _build_from_file(self, vocab_file): method save_vocabulary (line 310) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_vocab (line 322) | def build_vocab(self): method encode_file (line 343) | def encode_file(self, path, ordered=False, verbose=False, add_eos=True... method encode_sents (line 361) | def encode_sents(self, sents, ordered=False, verbose=False): method add_special (line 375) | def add_special(self, sym): method add_symbol (line 381) | def add_symbol(self, sym): method move_added_token (line 386) | def move_added_token(self, token: str, target_idx: int): method moses_punct_norm (line 413) | def moses_punct_norm(self, text): method moses_tokenize (line 416) | def moses_tokenize(self, text): method moses_pipeline (line 421) | def moses_pipeline(self, text: str) -> List[str]: method _convert_id_to_token (line 446) | def _convert_id_to_token(self, idx): method _convert_token_to_id (line 451) | def _convert_token_to_id(self, sym): method convert_tokens_to_string (line 468) | def convert_tokens_to_string(self, tokens): method convert_to_tensor (line 477) | def convert_to_tensor(self, symbols): method vocab_size (line 481) | def vocab_size(self): method get_vocab (line 484) | def get_vocab(self): method _tokenize (line 487) | def _tokenize(self, line, add_eos=False, add_double_eos=False): class LMOrderedIterator (line 507) | class LMOrderedIterator(object): method __init__ (line 508) | def __init__(self, data, bsz, bptt, device="cpu", ext_len=None): method get_batch (line 530) | def get_batch(self, i, bptt=None): method get_fixlen_iter (line 546) | def get_fixlen_iter(self, start=0): method get_varlen_iter (line 550) | def get_varlen_iter(self, start=0, std=5, min_len=5, max_deviation=3): method __iter__ (line 562) | def __iter__(self): class LMShuffledIterator (line 566) | class LMShuffledIterator(object): method __init__ (line 567) | def __init__(self, data, bsz, bptt, device="cpu", ext_len=None, shuffl... method get_sent_stream (line 580) | def get_sent_stream(self): method stream_iterator (line 589) | def stream_iterator(self, sent_stream): method __iter__ (line 636) | def __iter__(self): class LMMultiFileIterator (line 644) | class LMMultiFileIterator(LMShuffledIterator): method __init__ (line 645) | def __init__(self, paths, vocab, bsz, bptt, device="cpu", ext_len=None... method get_sent_stream (line 656) | def get_sent_stream(self, path): method __iter__ (line 664) | def __iter__(self): class TransfoXLCorpus (line 675) | class TransfoXLCorpus(object): method from_pretrained (line 678) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 713) | def __init__(self, *args, **kwargs): method build_corpus (line 720) | def build_corpus(self, path, dataset): method get_iterator (line 754) | def get_iterator(self, split, *args, **kwargs): function get_lm_corpus (line 775) | def get_lm_corpus(datadir, dataset): FILE: transformers/models/trocr/configuration_trocr.py class TrOCRConfig (line 31) | class TrOCRConfig(PretrainedConfig): method __init__ (line 102) | def __init__( FILE: transformers/models/trocr/convert_trocr_unilm_to_pytorch.py function create_rename_keys (line 43) | def create_rename_keys(encoder_config, decoder_config): function read_in_q_k_v (line 88) | def read_in_q_k_v(state_dict, encoder_config): function rename_key (line 104) | def rename_key(dct, old, new): function prepare_img (line 110) | def prepare_img(checkpoint_url): function convert_tr_ocr_checkpoint (line 124) | def convert_tr_ocr_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: transformers/models/trocr/modeling_trocr.py function _make_causal_mask (line 47) | def _make_causal_mask( function _expand_mask (line 65) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class TrOCRLearnedPositionalEmbedding (line 80) | class TrOCRLearnedPositionalEmbedding(nn.Embedding): method __init__ (line 85) | def __init__(self, num_embeddings: int, embedding_dim: int): method forward (line 91) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... class TrOCRSinusoidalPositionalEmbedding (line 102) | class TrOCRSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 105) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method get_embedding (line 114) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 133) | def forward(self, input_ids: torch.Tensor, past_key_values_length: int... method create_position_ids_from_input_ids (line 151) | def create_position_ids_from_input_ids( class TrOCRAttention (line 164) | class TrOCRAttention(nn.Module): method __init__ (line 167) | def __init__( method _shape (line 200) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 203) | def forward( class TrOCRDecoderLayer (line 313) | class TrOCRDecoderLayer(nn.Module): method __init__ (line 314) | def __init__(self, config: TrOCRConfig): method forward (line 348) | def forward( class TrOCRPreTrainedModel (line 442) | class TrOCRPreTrainedModel(PreTrainedModel): method _init_weights (line 447) | def _init_weights(self, module): method _set_gradient_checkpointing (line 458) | def _set_gradient_checkpointing(self, module, value=False): class TrOCRDecoder (line 480) | class TrOCRDecoder(TrOCRPreTrainedModel): method __init__ (line 488) | def __init__(self, config: TrOCRConfig): method get_input_embeddings (line 517) | def get_input_embeddings(self): method set_input_embeddings (line 520) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 523) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 544) | def forward( class TrOCRDecoderWrapper (line 771) | class TrOCRDecoderWrapper(TrOCRPreTrainedModel): method __init__ (line 777) | def __init__(self, config): method forward (line 781) | def forward(self, *args, **kwargs): class TrOCRForCausalLM (line 790) | class TrOCRForCausalLM(TrOCRPreTrainedModel): method __init__ (line 793) | def __init__(self, config): method get_input_embeddings (line 805) | def get_input_embeddings(self): method set_input_embeddings (line 808) | def set_input_embeddings(self, value): method get_output_embeddings (line 811) | def get_output_embeddings(self): method set_output_embeddings (line 814) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 817) | def set_decoder(self, decoder): method get_decoder (line 820) | def get_decoder(self): method forward (line 824) | def forward( method prepare_inputs_for_generation (line 998) | def prepare_inputs_for_generation( method _reorder_cache (line 1016) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/trocr/processing_trocr.py class TrOCRProcessor (line 24) | class TrOCRProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 61) | def __call__(self, *args, **kwargs): method batch_decode (line 94) | def batch_decode(self, *args, **kwargs): method decode (line 101) | def decode(self, *args, **kwargs): method as_target_processor (line 109) | def as_target_processor(self): method feature_extractor_class (line 125) | def feature_extractor_class(self): method feature_extractor (line 133) | def feature_extractor(self): FILE: transformers/models/tvlt/configuration_tvlt.py class TvltConfig (line 28) | class TvltConfig(PretrainedConfig): method __init__ (line 115) | def __init__( FILE: transformers/models/tvlt/feature_extraction_tvlt.py class TvltFeatureExtractor (line 30) | class TvltFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 59) | def __init__( method _np_extract_fbank_features (line 96) | def _np_extract_fbank_features(self, waveform: np.array) -> np.ndarray: method __call__ (line 116) | def __call__( FILE: transformers/models/tvlt/image_processing_tvlt.py function make_batched (line 45) | def make_batched(videos) -> List[List[ImageInput]]: class TvltImageProcessor (line 68) | class TvltImageProcessor(BaseImageProcessor): method __init__ (line 119) | def __init__( method resize (line 155) | def resize( method center_crop (line 187) | def center_crop( method rescale (line 211) | def rescale( method normalize (line 232) | def normalize( method _preprocess_image (line 261) | def _preprocess_image( method preprocess (line 306) | def preprocess( FILE: transformers/models/tvlt/modeling_tvlt.py class TvltModelOutput (line 55) | class TvltModelOutput(ModelOutput): class TvltDecoderOutput (line 96) | class TvltDecoderOutput(ModelOutput): class TvltForPreTrainingOutput (line 119) | class TvltForPreTrainingOutput(ModelOutput): function generate_pixel_mask_noise (line 152) | def generate_pixel_mask_noise(pixel_values, pixel_mask=None, mask_ratio=... function generate_audio_mask_noise (line 161) | def generate_audio_mask_noise(audio_values, audio_mask=None, mask_ratio=... function random_masking (line 179) | def random_masking(sequence, noise, len_keep, attention_masks=None): class TvltPixelEmbeddings (line 208) | class TvltPixelEmbeddings(nn.Module): method __init__ (line 211) | def __init__(self, config): method forward (line 223) | def forward(self, pixel_values, attention_masks=None): class TvltAudioEmbeddings (line 235) | class TvltAudioEmbeddings(nn.Module): method __init__ (line 238) | def __init__(self, config): method forward (line 252) | def forward(self, audio_values, attention_masks=None): class TvltPixelPatchEmbeddings (line 264) | class TvltPixelPatchEmbeddings(nn.Module): method __init__ (line 271) | def __init__(self, config): method forward (line 287) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class TvltAudioPatchEmbeddings (line 305) | class TvltAudioPatchEmbeddings(nn.Module): method __init__ (line 312) | def __init__(self, config): method forward (line 333) | def forward(self, audio_values: torch.Tensor) -> torch.Tensor: class TvltSelfAttention (line 350) | class TvltSelfAttention(nn.Module): method __init__ (line 351) | def __init__(self, config): method transpose_for_scores (line 369) | def transpose_for_scores(self, x): method forward (line 374) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class TvltSelfOutput (line 411) | class TvltSelfOutput(nn.Module): method __init__ (line 417) | def __init__(self, config: TvltConfig) -> None: method forward (line 422) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TvltAttention (line 430) | class TvltAttention(nn.Module): method __init__ (line 431) | def __init__(self, config): method prune_heads (line 437) | def prune_heads(self, heads): method forward (line 455) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class TvltIntermediate (line 465) | class TvltIntermediate(nn.Module): method __init__ (line 466) | def __init__(self, config: TvltConfig) -> None: method forward (line 474) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class TvltOutput (line 482) | class TvltOutput(nn.Module): method __init__ (line 483) | def __init__(self, config: TvltConfig) -> None: method forward (line 488) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class TvltLayer (line 498) | class TvltLayer(nn.Module): method __init__ (line 501) | def __init__(self, config): method forward (line 511) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class TvltEncoder (line 537) | class TvltEncoder(nn.Module): method __init__ (line 538) | def __init__(self, config): method forward (line 544) | def forward( class TvltPreTrainedModel (line 596) | class TvltPreTrainedModel(PreTrainedModel): method _init_weights (line 607) | def _init_weights(self, module): method _set_gradient_checkpointing (line 619) | def _set_gradient_checkpointing(self, module, value=False): class TvltModel (line 684) | class TvltModel(TvltPreTrainedModel): method __init__ (line 685) | def __init__(self, config): method get_input_embeddings (line 703) | def get_input_embeddings(self): method _prune_heads (line 706) | def _prune_heads(self, heads_to_prune): method forward (line 716) | def forward( class TvltDecoder (line 847) | class TvltDecoder(nn.Module): method __init__ (line 848) | def __init__(self, config): method forward (line 865) | def forward( class TvltForPreTraining (line 915) | class TvltForPreTraining(TvltPreTrainedModel): method __init__ (line 916) | def __init__(self, config): method patchify_pixel (line 970) | def patchify_pixel(self, pixel_values): method patchify_audio (line 998) | def patchify_audio(self, audio_values): method pixel_mae_loss (line 1025) | def pixel_mae_loss(self, pixel_values, pixel_predictions, mask): method audio_mae_loss (line 1032) | def audio_mae_loss(self, audio_values, audio_predictions, mask): method concatenate_mask (line 1039) | def concatenate_mask(self, mask_token, sequence, ids_restore): method forward (line 1050) | def forward( class TvltPooler (line 1189) | class TvltPooler(nn.Module): method __init__ (line 1190) | def __init__(self, config): method forward (line 1195) | def forward(self, hidden_states): class TvltMatchingHead (line 1202) | class TvltMatchingHead(nn.Module): method __init__ (line 1203) | def __init__(self, config): method forward (line 1208) | def forward(self, hidden_states): class TvltMAEHead (line 1213) | class TvltMAEHead(nn.Module): method __init__ (line 1214) | def __init__(self, config, output_dim=None): method forward (line 1219) | def forward(self, hidden_states): class TvltForAudioVisualClassification (line 1231) | class TvltForAudioVisualClassification(TvltPreTrainedModel): method __init__ (line 1232) | def __init__(self, config): method forward (line 1251) | def forward( FILE: transformers/models/tvlt/processing_tvlt.py class TvltProcessor (line 22) | class TvltProcessor(ProcessorMixin): method __init__ (line 39) | def __init__(self, image_processor, feature_extractor): method __call__ (line 45) | def __call__( method model_input_names (line 85) | def model_input_names(self): FILE: transformers/models/unispeech/configuration_unispeech.py class UniSpeechConfig (line 34) | class UniSpeechConfig(PretrainedConfig): method __init__ (line 183) | def __init__( method inputs_to_logits_ratio (line 302) | def inputs_to_logits_ratio(self): FILE: transformers/models/unispeech/convert_unispeech_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 69) | def set_recursively(hf_pointer, key, value, full_name, weight_type, is_f... function recursively_load_weights (line 106) | def recursively_load_weights(fairseq_model, hf_model, is_finetuned): function load_conv_layer (line 150) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_unispeech_checkpoint (line 191) | def convert_unispeech_checkpoint( FILE: transformers/models/unispeech/modeling_unispeech.py class UniSpeechForPreTrainingOutput (line 67) | class UniSpeechForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 103) | def _compute_mask_indices( class UniSpeechNoLayerNormConvLayer (line 223) | class UniSpeechNoLayerNormConvLayer(nn.Module): method __init__ (line 224) | def __init__(self, config, layer_id=0): method forward (line 238) | def forward(self, hidden_states): class UniSpeechLayerNormConvLayer (line 245) | class UniSpeechLayerNormConvLayer(nn.Module): method __init__ (line 246) | def __init__(self, config, layer_id=0): method forward (line 261) | def forward(self, hidden_states): class UniSpeechGroupNormConvLayer (line 273) | class UniSpeechGroupNormConvLayer(nn.Module): method __init__ (line 274) | def __init__(self, config, layer_id=0): method forward (line 290) | def forward(self, hidden_states): class UniSpeechPositionalConvEmbedding (line 298) | class UniSpeechPositionalConvEmbedding(nn.Module): method __init__ (line 299) | def __init__(self, config): method forward (line 326) | def forward(self, hidden_states): class UniSpeechSamePadLayer (line 338) | class UniSpeechSamePadLayer(nn.Module): method __init__ (line 339) | def __init__(self, num_conv_pos_embeddings): method forward (line 343) | def forward(self, hidden_states): class UniSpeechFeatureEncoder (line 350) | class UniSpeechFeatureEncoder(nn.Module): method __init__ (line 353) | def __init__(self, config): method _freeze_parameters (line 373) | def _freeze_parameters(self): method forward (line 378) | def forward(self, input_values): class UniSpeechFeatureExtractor (line 404) | class UniSpeechFeatureExtractor(UniSpeechFeatureEncoder): method __init__ (line 405) | def __init__(self, config): class UniSpeechFeatureProjection (line 416) | class UniSpeechFeatureProjection(nn.Module): method __init__ (line 417) | def __init__(self, config): method forward (line 423) | def forward(self, hidden_states): class UniSpeechAttention (line 432) | class UniSpeechAttention(nn.Module): method __init__ (line 435) | def __init__( method _shape (line 462) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 465) | def forward( class UniSpeechFeedForward (line 587) | class UniSpeechFeedForward(nn.Module): method __init__ (line 588) | def __init__(self, config): method forward (line 601) | def forward(self, hidden_states): class UniSpeechEncoderLayer (line 612) | class UniSpeechEncoderLayer(nn.Module): method __init__ (line 613) | def __init__(self, config): method forward (line 626) | def forward(self, hidden_states, attention_mask=None, output_attention... class UniSpeechAttnAdapterLayer (line 647) | class UniSpeechAttnAdapterLayer(nn.Module): method __init__ (line 648) | def __init__(self, config): method forward (line 662) | def forward(self, hidden_states: torch.FloatTensor): class UniSpeechEncoderLayerStableLayerNorm (line 673) | class UniSpeechEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 674) | def __init__(self, config): method forward (line 692) | def forward( class UniSpeechEncoder (line 719) | class UniSpeechEncoder(nn.Module): method __init__ (line 720) | def __init__(self, config): method forward (line 729) | def forward( class UniSpeechEncoderStableLayerNorm (line 807) | class UniSpeechEncoderStableLayerNorm(nn.Module): method __init__ (line 808) | def __init__(self, config): method forward (line 819) | def forward( class UniSpeechGumbelVectorQuantizer (line 898) | class UniSpeechGumbelVectorQuantizer(nn.Module): method __init__ (line 904) | def __init__(self, config): method _compute_perplexity (line 925) | def _compute_perplexity(probs): method forward (line 930) | def forward(self, hidden_states): class UniSpeechPreTrainedModel (line 968) | class UniSpeechPreTrainedModel(PreTrainedModel): method _init_weights (line 980) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1013) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1028) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _set_gradient_checkpointing (line 1043) | def _set_gradient_checkpointing(self, module, value=False): class UniSpeechModel (line 1108) | class UniSpeechModel(UniSpeechPreTrainedModel): method __init__ (line 1109) | def __init__(self, config: UniSpeechConfig): method _mask_hidden_states (line 1127) | def _mask_hidden_states( method forward (line 1181) | def forward( class UniSpeechForPreTraining (line 1232) | class UniSpeechForPreTraining(UniSpeechPreTrainedModel): method __init__ (line 1233) | def __init__(self, config: UniSpeechConfig): method set_gumbel_temperature (line 1248) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1254) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1266) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1274) | def compute_contrastive_logits( method forward (line 1295) | def forward( class UniSpeechForCTC (line 1380) | class UniSpeechForCTC(UniSpeechPreTrainedModel): method __init__ (line 1381) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1409) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1421) | def freeze_feature_encoder(self): method forward (line 1436) | def forward( class UniSpeechForSequenceClassification (line 1515) | class UniSpeechForSequenceClassification(UniSpeechPreTrainedModel): method __init__ (line 1516) | def __init__(self, config): method freeze_feature_extractor (line 1534) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1547) | def freeze_feature_encoder(self): method freeze_base_model (line 1555) | def freeze_base_model(self): method forward (line 1571) | def forward( FILE: transformers/models/unispeech_sat/configuration_unispeech_sat.py class UniSpeechSatConfig (line 34) | class UniSpeechSatConfig(PretrainedConfig): method __init__ (line 193) | def __init__( method inputs_to_logits_ratio (line 320) | def inputs_to_logits_ratio(self): FILE: transformers/models/unispeech_sat/convert_unispeech_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 36) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 45) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 52) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 71) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: transformers/models/unispeech_sat/convert_unispeech_sat_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 64) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 93) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 140) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_unispeech_sat_checkpoint (line 185) | def convert_unispeech_sat_checkpoint( FILE: transformers/models/unispeech_sat/modeling_unispeech_sat.py class UniSpeechSatForPreTrainingOutput (line 80) | class UniSpeechSatForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 117) | def _compute_mask_indices( class UniSpeechSatNoLayerNormConvLayer (line 237) | class UniSpeechSatNoLayerNormConvLayer(nn.Module): method __init__ (line 238) | def __init__(self, config, layer_id=0): method forward (line 252) | def forward(self, hidden_states): class UniSpeechSatLayerNormConvLayer (line 259) | class UniSpeechSatLayerNormConvLayer(nn.Module): method __init__ (line 260) | def __init__(self, config, layer_id=0): method forward (line 275) | def forward(self, hidden_states): class UniSpeechSatGroupNormConvLayer (line 287) | class UniSpeechSatGroupNormConvLayer(nn.Module): method __init__ (line 288) | def __init__(self, config, layer_id=0): method forward (line 304) | def forward(self, hidden_states): class UniSpeechSatPositionalConvEmbedding (line 312) | class UniSpeechSatPositionalConvEmbedding(nn.Module): method __init__ (line 313) | def __init__(self, config): method forward (line 340) | def forward(self, hidden_states): class UniSpeechSatSamePadLayer (line 352) | class UniSpeechSatSamePadLayer(nn.Module): method __init__ (line 353) | def __init__(self, num_conv_pos_embeddings): method forward (line 357) | def forward(self, hidden_states): class UniSpeechSatFeatureEncoder (line 364) | class UniSpeechSatFeatureEncoder(nn.Module): method __init__ (line 367) | def __init__(self, config): method _freeze_parameters (line 387) | def _freeze_parameters(self): method forward (line 392) | def forward(self, input_values): class UniSpeechSatFeatureExtractor (line 418) | class UniSpeechSatFeatureExtractor(UniSpeechSatFeatureEncoder): method __init__ (line 419) | def __init__(self, config): class UniSpeechSatFeatureProjection (line 430) | class UniSpeechSatFeatureProjection(nn.Module): method __init__ (line 431) | def __init__(self, config): method forward (line 437) | def forward(self, hidden_states): class UniSpeechSatAttention (line 446) | class UniSpeechSatAttention(nn.Module): method __init__ (line 449) | def __init__( method _shape (line 476) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 479) | def forward( class UniSpeechSatFeedForward (line 601) | class UniSpeechSatFeedForward(nn.Module): method __init__ (line 602) | def __init__(self, config): method forward (line 615) | def forward(self, hidden_states): class UniSpeechSatEncoderLayer (line 626) | class UniSpeechSatEncoderLayer(nn.Module): method __init__ (line 627) | def __init__(self, config): method forward (line 640) | def forward(self, hidden_states, attention_mask=None, output_attention... class UniSpeechSatAttnAdapterLayer (line 661) | class UniSpeechSatAttnAdapterLayer(nn.Module): method __init__ (line 662) | def __init__(self, config): method forward (line 676) | def forward(self, hidden_states: torch.FloatTensor): class UniSpeechSatEncoderLayerStableLayerNorm (line 687) | class UniSpeechSatEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 688) | def __init__(self, config): method forward (line 706) | def forward( class UniSpeechSatEncoder (line 733) | class UniSpeechSatEncoder(nn.Module): method __init__ (line 734) | def __init__(self, config): method forward (line 743) | def forward( class UniSpeechSatEncoderStableLayerNorm (line 821) | class UniSpeechSatEncoderStableLayerNorm(nn.Module): method __init__ (line 822) | def __init__(self, config): method forward (line 833) | def forward( class UniSpeechSatGumbelVectorQuantizer (line 912) | class UniSpeechSatGumbelVectorQuantizer(nn.Module): method __init__ (line 918) | def __init__(self, config): method _compute_perplexity (line 939) | def _compute_perplexity(probs, mask=None): method forward (line 944) | def forward(self, hidden_states): class UniSpeechSatPreTrainedModel (line 982) | class UniSpeechSatPreTrainedModel(PreTrainedModel): method _init_weights (line 994) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1027) | def _get_feat_extract_output_lengths(self, input_lengths: Union[torch.... method _get_feature_vector_attention_mask (line 1042) | def _get_feature_vector_attention_mask(self, feature_vector_length: in... method _set_gradient_checkpointing (line 1057) | def _set_gradient_checkpointing(self, module, value=False): class UniSpeechSatModel (line 1124) | class UniSpeechSatModel(UniSpeechSatPreTrainedModel): method __init__ (line 1125) | def __init__(self, config: UniSpeechSatConfig): method _mask_hidden_states (line 1142) | def _mask_hidden_states( method forward (line 1196) | def forward( class UniSpeechSatForPreTraining (line 1245) | class UniSpeechSatForPreTraining(UniSpeechSatPreTrainedModel): method __init__ (line 1246) | def __init__(self, config: UniSpeechSatConfig): method set_gumbel_temperature (line 1268) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1274) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1286) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1294) | def compute_contrastive_logits( method forward (line 1315) | def forward( class UniSpeechSatForCTC (line 1387) | class UniSpeechSatForCTC(UniSpeechSatPreTrainedModel): method __init__ (line 1388) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1416) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1428) | def freeze_feature_encoder(self): method forward (line 1443) | def forward( class UniSpeechSatForSequenceClassification (line 1522) | class UniSpeechSatForSequenceClassification(UniSpeechSatPreTrainedModel): method __init__ (line 1523) | def __init__(self, config): method freeze_feature_extractor (line 1541) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1554) | def freeze_feature_encoder(self): method freeze_base_model (line 1562) | def freeze_base_model(self): method forward (line 1578) | def forward( class UniSpeechSatForAudioFrameClassification (line 1647) | class UniSpeechSatForAudioFrameClassification(UniSpeechSatPreTrainedModel): method __init__ (line 1648) | def __init__(self, config): method freeze_feature_extractor (line 1664) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1676) | def freeze_feature_encoder(self): method freeze_base_model (line 1683) | def freeze_base_model(self): method forward (line 1699) | def forward( class AMSoftmaxLoss (line 1754) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1755) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1763) | def forward(self, hidden_states, labels): class TDNNLayer (line 1778) | class TDNNLayer(nn.Module): method __init__ (line 1779) | def __init__(self, config, layer_id=0): method forward (line 1789) | def forward(self, hidden_states): class UniSpeechSatForXVector (line 1811) | class UniSpeechSatForXVector(UniSpeechSatPreTrainedModel): method __init__ (line 1812) | def __init__(self, config): method freeze_feature_extractor (line 1831) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1843) | def freeze_feature_encoder(self): method freeze_base_model (line 1850) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1858) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1881) | def forward( FILE: transformers/models/upernet/configuration_upernet.py class UperNetConfig (line 27) | class UperNetConfig(PretrainedConfig): method __init__ (line 75) | def __init__( method to_dict (line 112) | def to_dict(self): FILE: transformers/models/upernet/convert_convnext_upernet_to_pytorch.py function get_upernet_config (line 28) | def get_upernet_config(model_name): function create_rename_keys (line 72) | def create_rename_keys(config): function rename_key (line 116) | def rename_key(dct, old, new): function convert_upernet_checkpoint (line 121) | def convert_upernet_checkpoint(model_name, pytorch_dump_folder_path, pus... FILE: transformers/models/upernet/convert_swin_upernet_to_pytorch.py function get_upernet_config (line 31) | def get_upernet_config(model_name): function create_rename_keys (line 82) | def create_rename_keys(config): function rename_key (line 128) | def rename_key(dct, old, new): function read_in_q_k_v (line 134) | def read_in_q_k_v(state_dict, backbone_config): function correct_unfold_reduction_order (line 159) | def correct_unfold_reduction_order(x): function reverse_correct_unfold_reduction_order (line 166) | def reverse_correct_unfold_reduction_order(x): function correct_unfold_norm_order (line 174) | def correct_unfold_norm_order(x): function reverse_correct_unfold_norm_order (line 184) | def reverse_correct_unfold_norm_order(x): function convert_upernet_checkpoint (line 191) | def convert_upernet_checkpoint(model_name, pytorch_dump_folder_path, pus... FILE: transformers/models/upernet/modeling_upernet.py class UperNetConvModule (line 40) | class UperNetConvModule(nn.Module): method __init__ (line 46) | def __init__( method forward (line 67) | def forward(self, input: torch.Tensor) -> torch.Tensor: class UperNetPyramidPoolingBlock (line 75) | class UperNetPyramidPoolingBlock(nn.Module): method __init__ (line 76) | def __init__(self, pool_scale: int, in_channels: int, channels: int) -... method forward (line 85) | def forward(self, input: torch.Tensor) -> torch.Tensor: class UperNetPyramidPoolingModule (line 92) | class UperNetPyramidPoolingModule(nn.Module): method __init__ (line 107) | def __init__(self, pool_scales: Tuple[int, ...], in_channels: int, cha... method forward (line 119) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: class UperNetHead (line 130) | class UperNetHead(nn.Module): method __init__ (line 136) | def __init__(self, config, in_channels): method init_weights (line 175) | def init_weights(self): method _init_weights (line 178) | def _init_weights(self, module): method psp_forward (line 184) | def psp_forward(self, inputs): method forward (line 193) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class UperNetFCNHead (line 223) | class UperNetFCNHead(nn.Module): method __init__ (line 239) | def __init__( method init_weights (line 275) | def init_weights(self): method _init_weights (line 278) | def _init_weights(self, module): method forward (line 284) | def forward(self, encoder_hidden_states: torch.Tensor) -> torch.Tensor: class UperNetPreTrainedModel (line 294) | class UperNetPreTrainedModel(PreTrainedModel): method _init_weights (line 304) | def _init_weights(self, module): method init_weights (line 310) | def init_weights(self): method _set_gradient_checkpointing (line 316) | def _set_gradient_checkpointing(self, module, value=False): class UperNetForSemanticSegmentation (line 351) | class UperNetForSemanticSegmentation(UperNetPreTrainedModel): method __init__ (line 352) | def __init__(self, config): method forward (line 366) | def forward( FILE: transformers/models/van/configuration_van.py class VanConfig (line 30) | class VanConfig(PretrainedConfig): method __init__ (line 82) | def __init__( FILE: transformers/models/van/convert_van_to_pytorch.py class Tracker (line 43) | class Tracker: method _forward_hook (line 48) | def _forward_hook(self, m, inputs: Tensor, outputs: Tensor): method __call__ (line 54) | def __call__(self, x: Tensor): method parametrized (line 62) | def parametrized(self): class ModuleTransfer (line 68) | class ModuleTransfer: method __call__ (line 75) | def __call__(self, x: Tensor): function copy_parameters (line 98) | def copy_parameters(from_model: nn.Module, our_model: nn.Module) -> nn.M... function convert_weight_and_push (line 122) | def convert_weight_and_push( function convert_weights_and_push (line 167) | def convert_weights_and_push(save_directory: Path, model_name: str = Non... FILE: transformers/models/van/modeling_van.py function drop_path (line 57) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class VanDropPath (line 78) | class VanDropPath(nn.Module): method __init__ (line 81) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 85) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 88) | def extra_repr(self) -> str: class VanOverlappingPatchEmbedder (line 92) | class VanOverlappingPatchEmbedder(nn.Module): method __init__ (line 99) | def __init__(self, in_channels: int, hidden_size: int, patch_size: int... method forward (line 106) | def forward(self, input: torch.Tensor) -> torch.Tensor: class VanMlpLayer (line 112) | class VanMlpLayer(nn.Module): method __init__ (line 118) | def __init__( method forward (line 134) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLargeKernelAttention (line 144) | class VanLargeKernelAttention(nn.Module): method __init__ (line 149) | def __init__(self, hidden_size: int): method forward (line 157) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLargeKernelAttentionLayer (line 164) | class VanLargeKernelAttentionLayer(nn.Module): method __init__ (line 169) | def __init__(self, hidden_size: int): method forward (line 173) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanSpatialAttentionLayer (line 179) | class VanSpatialAttentionLayer(nn.Module): method __init__ (line 185) | def __init__(self, hidden_size: int, hidden_act: str = "gelu"): method forward (line 198) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLayerScaling (line 207) | class VanLayerScaling(nn.Module): method __init__ (line 212) | def __init__(self, hidden_size: int, initial_value: float = 1e-2): method forward (line 216) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanLayer (line 222) | class VanLayer(nn.Module): method __init__ (line 227) | def __init__( method forward (line 245) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanStage (line 265) | class VanStage(nn.Module): method __init__ (line 270) | def __init__( method forward (line 296) | def forward(self, hidden_state: torch.Tensor) -> torch.Tensor: class VanEncoder (line 308) | class VanEncoder(nn.Module): method __init__ (line 313) | def __init__(self, config: VanConfig): method forward (line 343) | def forward( class VanPreTrainedModel (line 363) | class VanPreTrainedModel(PreTrainedModel): method _init_weights (line 374) | def _init_weights(self, module): method _set_gradient_checkpointing (line 390) | def _set_gradient_checkpointing(self, module, value=False): class VanModel (line 425) | class VanModel(VanPreTrainedModel): method __init__ (line 426) | def __init__(self, config): method forward (line 443) | def forward( class VanForImageClassification (line 480) | class VanForImageClassification(VanPreTrainedModel): method __init__ (line 481) | def __init__(self, config): method forward (line 499) | def forward( FILE: transformers/models/videomae/configuration_videomae.py class VideoMAEConfig (line 28) | class VideoMAEConfig(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: transformers/models/videomae/convert_videomae_to_pytorch.py function get_videomae_config (line 33) | def get_videomae_config(model_name): function set_architecture_configs (line 59) | def set_architecture_configs(model_name, config): function rename_key (line 91) | def rename_key(name): function convert_state_dict (line 138) | def convert_state_dict(orig_state_dict, config): function prepare_video (line 171) | def prepare_video(): function convert_videomae_checkpoint (line 179) | def convert_videomae_checkpoint(checkpoint_url, pytorch_dump_folder_path... FILE: transformers/models/videomae/feature_extraction_videomae.py class VideoMAEFeatureExtractor (line 26) | class VideoMAEFeatureExtractor(VideoMAEImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/videomae/image_processing_videomae.py function make_batched (line 50) | def make_batched(videos) -> List[List[ImageInput]]: class VideoMAEImageProcessor (line 63) | class VideoMAEImageProcessor(BaseImageProcessor): method __init__ (line 103) | def __init__( method resize (line 134) | def resize( method center_crop (line 166) | def center_crop( method rescale (line 190) | def rescale( method normalize (line 210) | def normalize( method _preprocess_image (line 233) | def _preprocess_image( method preprocess (line 279) | def preprocess( FILE: transformers/models/videomae/modeling_videomae.py class VideoMAEDecoderOutput (line 57) | class VideoMAEDecoderOutput(ModelOutput): class VideoMAEForPreTrainingOutput (line 80) | class VideoMAEForPreTrainingOutput(ModelOutput): function get_sinusoid_encoding_table (line 107) | def get_sinusoid_encoding_table(n_position, d_hid): class VideoMAEEmbeddings (line 121) | class VideoMAEEmbeddings(nn.Module): method __init__ (line 127) | def __init__(self, config): method forward (line 136) | def forward(self, pixel_values, bool_masked_pos): class VideoMAEPatchEmbeddings (line 153) | class VideoMAEPatchEmbeddings(nn.Module): method __init__ (line 163) | def __init__(self, config): method forward (line 190) | def forward(self, pixel_values): class VideoMAESelfAttention (line 206) | class VideoMAESelfAttention(nn.Module): method __init__ (line 207) | def __init__(self, config: VideoMAEConfig) -> None: method transpose_for_scores (line 232) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 237) | def forward( class VideoMAESelfOutput (line 277) | class VideoMAESelfOutput(nn.Module): method __init__ (line 283) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 288) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VideoMAEAttention (line 296) | class VideoMAEAttention(nn.Module): method __init__ (line 297) | def __init__(self, config: VideoMAEConfig) -> None: method prune_heads (line 303) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 321) | def forward( class VideoMAEIntermediate (line 336) | class VideoMAEIntermediate(nn.Module): method __init__ (line 337) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 345) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VideoMAEOutput (line 353) | class VideoMAEOutput(nn.Module): method __init__ (line 354) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 359) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VideoMAELayer (line 369) | class VideoMAELayer(nn.Module): method __init__ (line 372) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 382) | def forward( class VideoMAEEncoder (line 412) | class VideoMAEEncoder(nn.Module): method __init__ (line 413) | def __init__(self, config: VideoMAEConfig) -> None: method forward (line 419) | def forward( class VideoMAEPreTrainedModel (line 469) | class VideoMAEPreTrainedModel(PreTrainedModel): method _init_weights (line 480) | def _init_weights(self, module): method _set_gradient_checkpointing (line 492) | def _set_gradient_checkpointing(self, module, value=False): class VideoMAEModel (line 535) | class VideoMAEModel(VideoMAEPreTrainedModel): method __init__ (line 536) | def __init__(self, config): method get_input_embeddings (line 551) | def get_input_embeddings(self): method _prune_heads (line 554) | def _prune_heads(self, heads_to_prune): method forward (line 564) | def forward( class VideoMAEDecoder (line 681) | class VideoMAEDecoder(nn.Module): method __init__ (line 682) | def __init__(self, config, num_patches): method forward (line 704) | def forward( class VideoMAEForPreTraining (line 759) | class VideoMAEForPreTraining(VideoMAEPreTrainedModel): method __init__ (line 760) | def __init__(self, config): method forward (line 779) | def forward( class VideoMAEForVideoClassification (line 943) | class VideoMAEForVideoClassification(VideoMAEPreTrainedModel): method __init__ (line 944) | def __init__(self, config): method forward (line 959) | def forward( FILE: transformers/models/vilt/configuration_vilt.py class ViltConfig (line 28) | class ViltConfig(PretrainedConfig): method __init__ (line 101) | def __init__( FILE: transformers/models/vilt/convert_vilt_original_to_pytorch.py function create_rename_keys (line 45) | def create_rename_keys(config, vqa_model=False, nlvr_model=False, irtr_m... function read_in_q_k_v (line 134) | def read_in_q_k_v(state_dict, config): function remove_classification_head_ (line 157) | def remove_classification_head_(state_dict): function rename_key (line 163) | def rename_key(dct, old, new): function convert_vilt_checkpoint (line 169) | def convert_vilt_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: transformers/models/vilt/feature_extraction_vilt.py class ViltFeatureExtractor (line 26) | class ViltFeatureExtractor(ViltImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/vilt/image_processing_vilt.py function max_across_indices (line 46) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function make_pixel_mask (line 53) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function get_max_height_width (line 69) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function get_resize_output_image_size (line 84) | def get_resize_output_image_size( class ViltImageProcessor (line 111) | class ViltImageProcessor(BaseImageProcessor): method __init__ (line 153) | def __init__( method from_dict (line 186) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method resize (line 197) | def resize( method rescale (line 233) | def rescale( method normalize (line 253) | def normalize( method _pad_image (line 276) | def _pad_image( method pad (line 297) | def pad( method pad_and_create_pixel_mask (line 334) | def pad_and_create_pixel_mask( method preprocess (line 369) | def preprocess( FILE: transformers/models/vilt/modeling_vilt.py class ViltForImagesAndTextClassificationOutput (line 65) | class ViltForImagesAndTextClassificationOutput(ModelOutput): class ViltEmbeddings (line 90) | class ViltEmbeddings(nn.Module): method __init__ (line 99) | def __init__(self, config): method visual_embed (line 114) | def visual_embed(self, pixel_values, pixel_mask, max_image_length=200): method forward (line 202) | def forward( class TextEmbeddings (line 244) | class TextEmbeddings(nn.Module): method __init__ (line 247) | def __init__(self, config): method forward (line 264) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class ViltPatchEmbeddings (line 299) | class ViltPatchEmbeddings(nn.Module): method __init__ (line 304) | def __init__(self, config): method forward (line 319) | def forward(self, pixel_values): class ViltSelfAttention (line 329) | class ViltSelfAttention(nn.Module): method __init__ (line 330) | def __init__(self, config): method transpose_for_scores (line 348) | def transpose_for_scores(self, x): method forward (line 353) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltSelfOutput (line 390) | class ViltSelfOutput(nn.Module): method __init__ (line 396) | def __init__(self, config: ViltConfig) -> None: method forward (line 401) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViltAttention (line 408) | class ViltAttention(nn.Module): method __init__ (line 409) | def __init__(self, config): method prune_heads (line 415) | def prune_heads(self, heads): method forward (line 433) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltIntermediate (line 443) | class ViltIntermediate(nn.Module): method __init__ (line 444) | def __init__(self, config: ViltConfig) -> None: method forward (line 452) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViltOutput (line 460) | class ViltOutput(nn.Module): method __init__ (line 461) | def __init__(self, config: ViltConfig) -> None: method forward (line 466) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViltLayer (line 475) | class ViltLayer(nn.Module): method __init__ (line 478) | def __init__(self, config): method forward (line 488) | def forward(self, hidden_states, attention_mask=None, head_mask=None, ... class ViltEncoder (line 513) | class ViltEncoder(nn.Module): method __init__ (line 514) | def __init__(self, config): method forward (line 520) | def forward( class ViltPreTrainedModel (line 572) | class ViltPreTrainedModel(PreTrainedModel): method _init_weights (line 583) | def _init_weights(self, module): method _set_gradient_checkpointing (line 599) | def _set_gradient_checkpointing(self, module, value=False): class ViltModel (line 730) | class ViltModel(ViltPreTrainedModel): method __init__ (line 731) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 744) | def get_input_embeddings(self): method set_input_embeddings (line 747) | def set_input_embeddings(self, value): method _prune_heads (line 750) | def _prune_heads(self, heads_to_prune): method forward (line 760) | def forward( class ViltPooler (line 874) | class ViltPooler(nn.Module): method __init__ (line 875) | def __init__(self, config): method forward (line 880) | def forward(self, hidden_states): class ViltForMaskedLM (line 895) | class ViltForMaskedLM(ViltPreTrainedModel): method __init__ (line 898) | def __init__(self, config): method get_output_embeddings (line 907) | def get_output_embeddings(self): method set_output_embeddings (line 910) | def set_output_embeddings(self, new_embeddings): method forward (line 915) | def forward( class ViltPredictionHeadTransform (line 1028) | class ViltPredictionHeadTransform(nn.Module): method __init__ (line 1029) | def __init__(self, config): method forward (line 1038) | def forward(self, hidden_states): class ViltMLMHead (line 1045) | class ViltMLMHead(nn.Module): method __init__ (line 1046) | def __init__(self, config, weight=None): method forward (line 1058) | def forward(self, x): class ViltForQuestionAnswering (line 1071) | class ViltForQuestionAnswering(ViltPreTrainedModel): method __init__ (line 1072) | def __init__(self, config): method forward (line 1091) | def forward( class ViltForImageAndTextRetrieval (line 1184) | class ViltForImageAndTextRetrieval(ViltPreTrainedModel): method __init__ (line 1185) | def __init__(self, config): method forward (line 1198) | def forward( class ViltForImagesAndTextClassification (line 1285) | class ViltForImagesAndTextClassification(ViltPreTrainedModel): method __init__ (line 1286) | def __init__(self, config): method forward (line 1306) | def forward( class ViltForTokenClassification (line 1427) | class ViltForTokenClassification(ViltPreTrainedModel): method __init__ (line 1430) | def __init__(self, config): method forward (line 1444) | def forward( FILE: transformers/models/vilt/processing_vilt.py class ViltProcessor (line 27) | class ViltProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 62) | def __call__( method batch_decode (line 112) | def batch_decode(self, *args, **kwargs): method decode (line 119) | def decode(self, *args, **kwargs): method model_input_names (line 127) | def model_input_names(self): method feature_extractor_class (line 133) | def feature_extractor_class(self): method feature_extractor (line 141) | def feature_extractor(self): FILE: transformers/models/vision_encoder_decoder/configuration_vision_encoder_decoder.py class VisionEncoderDecoderConfig (line 34) | class VisionEncoderDecoderConfig(PretrainedConfig): method __init__ (line 83) | def __init__(self, **kwargs): method from_encoder_decoder_configs (line 101) | def from_encoder_decoder_configs( method to_dict (line 117) | def to_dict(self): class VisionEncoderDecoderEncoderOnnxConfig (line 131) | class VisionEncoderDecoderEncoderOnnxConfig(OnnxConfig): method inputs (line 135) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 143) | def atol_for_validation(self) -> float: method outputs (line 147) | def outputs(self) -> Mapping[str, Mapping[int, str]]: class VisionEncoderDecoderDecoderOnnxConfig (line 151) | class VisionEncoderDecoderDecoderOnnxConfig(OnnxConfig): method inputs (line 153) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 161) | def generate_dummy_inputs( class VisionEncoderDecoderOnnxConfig (line 186) | class VisionEncoderDecoderOnnxConfig(OnnxConfig): method inputs (line 188) | def inputs(self) -> None: method get_encoder_config (line 191) | def get_encoder_config(self, encoder_config: PretrainedConfig) -> Onnx... method get_decoder_config (line 204) | def get_decoder_config( FILE: transformers/models/vision_encoder_decoder/modeling_flax_vision_encoder_decoder.py class FlaxVisionEncoderDecoderModule (line 170) | class FlaxVisionEncoderDecoderModule(nn.Module): method setup (line 174) | def setup(self): method _get_encoder_module (line 200) | def _get_encoder_module(self): method _get_projection_module (line 203) | def _get_projection_module(self): method _get_decoder_module (line 206) | def _get_decoder_module(self): method __call__ (line 209) | def __call__( class FlaxVisionEncoderDecoderModel (line 268) | class FlaxVisionEncoderDecoderModel(FlaxPreTrainedModel): method __init__ (line 280) | def __init__( method init_weights (line 313) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 353) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 396) | def encode( method decode (line 470) | def decode( method __call__ (line 600) | def __call__( method prepare_inputs_for_generation (line 687) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 718) | def update_inputs_for_generation(self, model_outputs, model_kwargs): method from_encoder_decoder_pretrained (line 724) | def from_encoder_decoder_pretrained( FILE: transformers/models/vision_encoder_decoder/modeling_tf_vision_encoder_decoder.py function shift_tokens_right (line 149) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... class TFVisionEncoderDecoderModel (line 176) | class TFVisionEncoderDecoderModel(TFPreTrainedModel, TFCausalLanguageMod... method __init__ (line 188) | def __init__( method input_signature (line 256) | def input_signature(self): method get_encoder (line 277) | def get_encoder(self): method get_decoder (line 280) | def get_decoder(self): method get_input_embeddings (line 283) | def get_input_embeddings(self): method get_output_embeddings (line 286) | def get_output_embeddings(self): method set_output_embeddings (line 289) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 293) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 339) | def from_encoder_decoder_pretrained( method call (line 491) | def call( method serving_output (line 662) | def serving_output(self, output): method prepare_inputs_for_generation (line 689) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 707) | def prepare_decoder_input_ids_from_labels(self, labels: tf.Tensor): method resize_token_embeddings (line 710) | def resize_token_embeddings(self, *args, **kwargs): FILE: transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py function shift_tokens_right (line 37) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... class VisionEncoderDecoderModel (line 151) | class VisionEncoderDecoderModel(PreTrainedModel): method __init__ (line 163) | def __init__( method _set_gradient_checkpointing (line 228) | def _set_gradient_checkpointing(self, module, value=False): method get_encoder (line 233) | def get_encoder(self): method get_decoder (line 236) | def get_decoder(self): method get_output_embeddings (line 239) | def get_output_embeddings(self): method set_output_embeddings (line 242) | def set_output_embeddings(self, new_embeddings): method from_pretrained (line 246) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method from_encoder_decoder_pretrained (line 366) | def from_encoder_decoder_pretrained( method forward (line 521) | def forward( method prepare_decoder_input_ids_from_labels (line 648) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method prepare_inputs_for_generation (line 651) | def prepare_inputs_for_generation( method resize_token_embeddings (line 666) | def resize_token_embeddings(self, *args, **kwargs): method _reorder_cache (line 672) | def _reorder_cache(self, past_key_values, beam_idx): FILE: transformers/models/vision_text_dual_encoder/configuration_vision_text_dual_encoder.py class VisionTextDualEncoderConfig (line 28) | class VisionTextDualEncoderConfig(PretrainedConfig): method __init__ (line 78) | def __init__(self, projection_dim=512, logit_scale_init_value=2.6592, ... method from_vision_text_configs (line 106) | def from_vision_text_configs(cls, vision_config: PretrainedConfig, tex... method to_dict (line 117) | def to_dict(self): FILE: transformers/models/vision_text_dual_encoder/modeling_flax_vision_text_dual_encoder.py class FlaxVisionTextDualEncoderModule (line 122) | class FlaxVisionTextDualEncoderModule(nn.Module): method setup (line 126) | def setup(self): method __call__ (line 157) | def __call__( class FlaxVisionTextDualEncoderModel (line 219) | class FlaxVisionTextDualEncoderModel(FlaxPreTrainedModel): method __init__ (line 223) | def __init__( method init_weights (line 243) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 269) | def __call__( method get_text_features (line 319) | def get_text_features( method get_image_features (line 381) | def get_image_features( method from_vision_text_pretrained (line 415) | def from_vision_text_pretrained( FILE: transformers/models/vision_text_dual_encoder/modeling_tf_vision_text_dual_encoder.py function contrastive_loss (line 160) | def contrastive_loss(logits: tf.Tensor) -> tf.Tensor: function clip_loss (line 169) | def clip_loss(similarity: tf.Tensor) -> tf.Tensor: class TFVisionTextDualEncoderModel (line 176) | class TFVisionTextDualEncoderModel(TFPreTrainedModel): method __init__ (line 181) | def __init__( method build (line 224) | def build(self, input_shape=None): method from_pretrained (line 231) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method get_text_features (line 258) | def get_text_features( method get_image_features (line 300) | def get_image_features( method call (line 344) | def call( method from_vision_text_pretrained (line 462) | def from_vision_text_pretrained( method dummy_inputs (line 600) | def dummy_inputs(self): FILE: transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py function contrastive_loss (line 150) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function clip_loss (line 155) | def clip_loss(similarity: torch.Tensor) -> torch.Tensor: class VisionTextDualEncoderModel (line 162) | class VisionTextDualEncoderModel(PreTrainedModel): method __init__ (line 166) | def __init__( method get_text_features (line 210) | def get_text_features( method get_image_features (line 252) | def get_image_features( method forward (line 295) | def forward( method from_pretrained (line 408) | def from_pretrained(cls, *args, **kwargs): method from_vision_text_pretrained (line 415) | def from_vision_text_pretrained( FILE: transformers/models/vision_text_dual_encoder/processing_vision_text_dual_encoder.py class VisionTextDualEncoderProcessor (line 25) | class VisionTextDualEncoderProcessor(ProcessorMixin): method __init__ (line 44) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 62) | def __call__(self, text=None, images=None, return_tensors=None, **kwar... method batch_decode (line 115) | def batch_decode(self, *args, **kwargs): method decode (line 122) | def decode(self, *args, **kwargs): method model_input_names (line 130) | def model_input_names(self): method feature_extractor_class (line 136) | def feature_extractor_class(self): method feature_extractor (line 144) | def feature_extractor(self): FILE: transformers/models/visual_bert/configuration_visual_bert.py class VisualBertConfig (line 43) | class VisualBertConfig(PretrainedConfig): method __init__ (line 113) | def __init__( FILE: transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py function load_state_dict (line 59) | def load_state_dict(checkpoint_path): function get_new_dict (line 64) | def get_new_dict(d, config, rename_keys_prefix=rename_keys_prefix): function convert_visual_bert_checkpoint (line 83) | def convert_visual_bert_checkpoint(checkpoint_path, pytorch_dump_folder_... FILE: transformers/models/visual_bert/modeling_visual_bert.py class VisualBertEmbeddings (line 65) | class VisualBertEmbeddings(nn.Module): method __init__ (line 68) | def __init__(self, config): method forward (line 98) | def forward( class VisualBertSelfAttention (line 197) | class VisualBertSelfAttention(nn.Module): method __init__ (line 198) | def __init__(self, config): method transpose_for_scores (line 216) | def transpose_for_scores(self, x): method forward (line 221) | def forward( class VisualBertSelfOutput (line 266) | class VisualBertSelfOutput(nn.Module): method __init__ (line 267) | def __init__(self, config): method forward (line 273) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VisualBertAttention (line 280) | class VisualBertAttention(nn.Module): method __init__ (line 281) | def __init__(self, config): method prune_heads (line 287) | def prune_heads(self, heads): method forward (line 305) | def forward( class VisualBertIntermediate (line 324) | class VisualBertIntermediate(nn.Module): method __init__ (line 325) | def __init__(self, config): method forward (line 333) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertOutput (line 340) | class VisualBertOutput(nn.Module): method __init__ (line 341) | def __init__(self, config): method forward (line 347) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class VisualBertLayer (line 354) | class VisualBertLayer(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 363) | def forward( method feed_forward_chunk (line 387) | def feed_forward_chunk(self, attention_output): class VisualBertEncoder (line 393) | class VisualBertEncoder(nn.Module): method __init__ (line 394) | def __init__(self, config): method forward (line 400) | def forward( class VisualBertPooler (line 458) | class VisualBertPooler(nn.Module): method __init__ (line 459) | def __init__(self, config): method forward (line 464) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertPredictionHeadTransform (line 474) | class VisualBertPredictionHeadTransform(nn.Module): method __init__ (line 475) | def __init__(self, config): method forward (line 484) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisualBertLMPredictionHead (line 492) | class VisualBertLMPredictionHead(nn.Module): method __init__ (line 493) | def __init__(self, config): method forward (line 506) | def forward(self, hidden_states): class VisualBertPreTrainingHeads (line 513) | class VisualBertPreTrainingHeads(nn.Module): method __init__ (line 514) | def __init__(self, config): method forward (line 519) | def forward(self, sequence_output, pooled_output): class VisualBertPreTrainedModel (line 525) | class VisualBertPreTrainedModel(PreTrainedModel): method _init_weights (line 536) | def _init_weights(self, module): method _set_gradient_checkpointing (line 549) | def _set_gradient_checkpointing(self, module, value=False): class VisualBertForPreTrainingOutput (line 555) | class VisualBertForPreTrainingOutput(ModelOutput): class VisualBertModel (line 677) | class VisualBertModel(VisualBertPreTrainedModel): method __init__ (line 685) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 702) | def get_input_embeddings(self): method set_input_embeddings (line 705) | def set_input_embeddings(self, value): method _prune_heads (line 708) | def _prune_heads(self, heads_to_prune): method forward (line 718) | def forward( class VisualBertForPreTraining (line 873) | class VisualBertForPreTraining(VisualBertPreTrainedModel): method __init__ (line 876) | def __init__(self, config): method get_output_embeddings (line 885) | def get_output_embeddings(self): method set_output_embeddings (line 888) | def set_output_embeddings(self, new_embeddings): method forward (line 893) | def forward( class VisualBertForMultipleChoice (line 1024) | class VisualBertForMultipleChoice(VisualBertPreTrainedModel): method __init__ (line 1025) | def __init__(self, config): method forward (line 1039) | def forward( class VisualBertForQuestionAnswering (line 1177) | class VisualBertForQuestionAnswering(VisualBertPreTrainedModel): method __init__ (line 1178) | def __init__(self, config): method forward (line 1191) | def forward( class VisualBertForVisualReasoning (line 1303) | class VisualBertForVisualReasoning(VisualBertPreTrainedModel): method __init__ (line 1304) | def __init__(self, config): method forward (line 1317) | def forward( class VisualBertRegionToPhraseAttention (line 1412) | class VisualBertRegionToPhraseAttention(nn.Module): method __init__ (line 1413) | def __init__(self, config): method transpose_for_scores (line 1430) | def transpose_for_scores(self, x): method forward (line 1435) | def forward(self, query, key, attention_mask): class VisualBertForRegionToPhraseAlignment (line 1463) | class VisualBertForRegionToPhraseAlignment(VisualBertPreTrainedModel): method __init__ (line 1466) | def __init__(self, config): method forward (line 1479) | def forward( FILE: transformers/models/vit/configuration_vit.py class ViTConfig (line 35) | class ViTConfig(PretrainedConfig): method __init__ (line 93) | def __init__( class ViTOnnxConfig (line 129) | class ViTOnnxConfig(OnnxConfig): method inputs (line 133) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 141) | def atol_for_validation(self) -> float: FILE: transformers/models/vit/convert_dino_to_pytorch.py function create_rename_keys (line 36) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 87) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 113) | def remove_classification_head_(state_dict): function rename_key (line 119) | def rename_key(dct, old, new): function prepare_img (line 125) | def prepare_img(): function convert_vit_checkpoint (line 132) | def convert_vit_checkpoint(model_name, pytorch_dump_folder_path, base_mo... FILE: transformers/models/vit/convert_vit_timm_to_pytorch.py function create_rename_keys (line 37) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 90) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 116) | def remove_classification_head_(state_dict): function rename_key (line 122) | def rename_key(dct, old, new): function prepare_img (line 128) | def prepare_img(): function convert_vit_checkpoint (line 135) | def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path): FILE: transformers/models/vit/feature_extraction_vit.py class ViTFeatureExtractor (line 26) | class ViTFeatureExtractor(ViTImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/vit/image_processing_vit.py class ViTImageProcessor (line 39) | class ViTImageProcessor(BaseImageProcessor): method __init__ (line 72) | def __init__( method resize (line 96) | def resize( method rescale (line 130) | def rescale( method normalize (line 152) | def normalize( method preprocess (line 181) | def preprocess( FILE: transformers/models/vit/modeling_flax_vit.py class FlaxViTPatchEmbeddings (line 87) | class FlaxViTPatchEmbeddings(nn.Module): method setup (line 91) | def setup(self): method __call__ (line 108) | def __call__(self, pixel_values): class FlaxViTEmbeddings (line 119) | class FlaxViTEmbeddings(nn.Module): method setup (line 125) | def setup(self): method __call__ (line 140) | def __call__(self, pixel_values, deterministic=True): class FlaxViTSelfAttention (line 152) | class FlaxViTSelfAttention(nn.Module): method setup (line 156) | def setup(self): method __call__ (line 188) | def __call__(self, hidden_states, deterministic: bool = True, output_a... class FlaxViTSelfOutput (line 223) | class FlaxViTSelfOutput(nn.Module): method setup (line 227) | def setup(self): method __call__ (line 237) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxViTAttention (line 243) | class FlaxViTAttention(nn.Module): method setup (line 247) | def setup(self): method __call__ (line 251) | def __call__(self, hidden_states, deterministic=True, output_attention... class FlaxViTIntermediate (line 264) | class FlaxViTIntermediate(nn.Module): method setup (line 268) | def setup(self): method __call__ (line 278) | def __call__(self, hidden_states): class FlaxViTOutput (line 284) | class FlaxViTOutput(nn.Module): method setup (line 288) | def setup(self): method __call__ (line 298) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxViTLayer (line 305) | class FlaxViTLayer(nn.Module): method setup (line 309) | def setup(self): method __call__ (line 316) | def __call__(self, hidden_states, deterministic: bool = True, output_a... class FlaxViTLayerCollection (line 341) | class FlaxViTLayerCollection(nn.Module): method setup (line 345) | def setup(self): method __call__ (line 350) | def __call__( class FlaxViTEncoder (line 384) | class FlaxViTEncoder(nn.Module): method setup (line 388) | def setup(self): method __call__ (line 391) | def __call__( class FlaxViTPooler (line 408) | class FlaxViTPooler(nn.Module): method setup (line 412) | def setup(self): method __call__ (line 421) | def __call__(self, hidden_states): class FlaxViTPreTrainedModel (line 427) | class FlaxViTPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 438) | def __init__( method init_weights (line 452) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 472) | def __call__( class FlaxViTModule (line 505) | class FlaxViTModule(nn.Module): method setup (line 510) | def setup(self): method __call__ (line 516) | def __call__( class FlaxViTModel (line 555) | class FlaxViTModel(FlaxViTPreTrainedModel): class FlaxViTForImageClassificationModule (line 585) | class FlaxViTForImageClassificationModule(nn.Module): method setup (line 589) | def setup(self): method __call__ (line 599) | def __call__( class FlaxViTForImageClassification (line 638) | class FlaxViTForImageClassification(FlaxViTPreTrainedModel): FILE: transformers/models/vit/modeling_tf_vit.py class TFViTEmbeddings (line 56) | class TFViTEmbeddings(tf.keras.layers.Layer): method __init__ (line 62) | def __init__(self, config: ViTConfig, **kwargs): method build (line 69) | def build(self, input_shape: tf.TensorShape): method interpolate_pos_encoding (line 86) | def interpolate_pos_encoding(self, embeddings, height, width) -> tf.Te... method call (line 120) | def call( class TFViTPatchEmbeddings (line 145) | class TFViTPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 152) | def __init__(self, config: ViTConfig, **kwargs): method call (line 178) | def call( class TFViTSelfAttention (line 209) | class TFViTSelfAttention(tf.keras.layers.Layer): method __init__ (line 210) | def __init__(self, config: ViTConfig, **kwargs): method transpose_for_scores (line 235) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 242) | def call( class TFViTSelfOutput (line 284) | class TFViTSelfOutput(tf.keras.layers.Layer): method __init__ (line 290) | def __init__(self, config: ViTConfig, **kwargs): method call (line 298) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTAttention (line 305) | class TFViTAttention(tf.keras.layers.Layer): method __init__ (line 306) | def __init__(self, config: ViTConfig, **kwargs): method prune_heads (line 312) | def prune_heads(self, heads): method call (line 315) | def call( class TFViTIntermediate (line 333) | class TFViTIntermediate(tf.keras.layers.Layer): method __init__ (line 334) | def __init__(self, config: ViTConfig, **kwargs): method call (line 346) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFViTOutput (line 353) | class TFViTOutput(tf.keras.layers.Layer): method __init__ (line 354) | def __init__(self, config: ViTConfig, **kwargs): method call (line 362) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTLayer (line 370) | class TFViTLayer(tf.keras.layers.Layer): method __init__ (line 373) | def __init__(self, config: ViTConfig, **kwargs): method call (line 387) | def call( class TFViTEncoder (line 420) | class TFViTEncoder(tf.keras.layers.Layer): method __init__ (line 421) | def __init__(self, config: ViTConfig, **kwargs): method call (line 426) | def call( class TFViTMainLayer (line 466) | class TFViTMainLayer(tf.keras.layers.Layer): method __init__ (line 469) | def __init__(self, config: ViTConfig, add_pooling_layer: bool = True, ... method get_input_embeddings (line 479) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _prune_heads (line 482) | def _prune_heads(self, heads_to_prune): method call (line 490) | def call( class TFViTPreTrainedModel (line 543) | class TFViTPreTrainedModel(TFPreTrainedModel): class TFViTModel (line 631) | class TFViTModel(TFViTPreTrainedModel): method __init__ (line 632) | def __init__(self, config: ViTConfig, *inputs, add_pooling_layer=True,... method call (line 646) | def call( class TFViTPooler (line 669) | class TFViTPooler(tf.keras.layers.Layer): method __init__ (line 670) | def __init__(self, config: ViTConfig, **kwargs): method call (line 680) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFViTForImageClassification (line 704) | class TFViTForImageClassification(TFViTPreTrainedModel, TFSequenceClassi... method __init__ (line 705) | def __init__(self, config: ViTConfig, *inputs, **kwargs): method call (line 726) | def call( FILE: transformers/models/vit/modeling_vit.py class ViTEmbeddings (line 66) | class ViTEmbeddings(nn.Module): method __init__ (line 71) | def __init__(self, config: ViTConfig, use_mask_token: bool = False) ->... method interpolate_pos_encoding (line 82) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 115) | def forward( class ViTPatchEmbeddings (line 146) | class ViTPatchEmbeddings(nn.Module): method __init__ (line 153) | def __init__(self, config): method forward (line 168) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTSelfAttention (line 185) | class ViTSelfAttention(nn.Module): method __init__ (line 186) | def __init__(self, config: ViTConfig) -> None: method transpose_for_scores (line 204) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 209) | def forward( class ViTSelfOutput (line 245) | class ViTSelfOutput(nn.Module): method __init__ (line 251) | def __init__(self, config: ViTConfig) -> None: method forward (line 256) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTAttention (line 263) | class ViTAttention(nn.Module): method __init__ (line 264) | def __init__(self, config: ViTConfig) -> None: method prune_heads (line 270) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 288) | def forward( class ViTIntermediate (line 302) | class ViTIntermediate(nn.Module): method __init__ (line 303) | def __init__(self, config: ViTConfig) -> None: method forward (line 311) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTOutput (line 318) | class ViTOutput(nn.Module): method __init__ (line 319) | def __init__(self, config: ViTConfig) -> None: method forward (line 324) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTLayer (line 333) | class ViTLayer(nn.Module): method __init__ (line 336) | def __init__(self, config: ViTConfig) -> None: method forward (line 346) | def forward( class ViTEncoder (line 375) | class ViTEncoder(nn.Module): method __init__ (line 376) | def __init__(self, config: ViTConfig) -> None: method forward (line 382) | def forward( class ViTPreTrainedModel (line 432) | class ViTPreTrainedModel(PreTrainedModel): method _init_weights (line 444) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 470) | def _set_gradient_checkpointing(self, module: ViTEncoder, value: bool ... class ViTModel (line 515) | class ViTModel(ViTPreTrainedModel): method __init__ (line 516) | def __init__(self, config: ViTConfig, add_pooling_layer: bool = True, ... method get_input_embeddings (line 529) | def get_input_embeddings(self) -> ViTPatchEmbeddings: method _prune_heads (line 532) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 548) | def forward( class ViTPooler (line 610) | class ViTPooler(nn.Module): method __init__ (line 611) | def __init__(self, config: ViTConfig): method forward (line 616) | def forward(self, hidden_states): class ViTForMaskedImageModeling (line 637) | class ViTForMaskedImageModeling(ViTPreTrainedModel): method __init__ (line 638) | def __init__(self, config: ViTConfig) -> None: method forward (line 657) | def forward( class ViTForImageClassification (line 766) | class ViTForImageClassification(ViTPreTrainedModel): method __init__ (line 767) | def __init__(self, config: ViTConfig) -> None: method forward (line 786) | def forward( FILE: transformers/models/vit_hybrid/configuration_vit_hybrid.py class ViTHybridConfig (line 34) | class ViTHybridConfig(PretrainedConfig): method __init__ (line 93) | def __init__( method to_dict (line 150) | def to_dict(self) -> Dict[str, any]: FILE: transformers/models/vit_hybrid/convert_vit_hybrid_timm_to_pytorch.py function create_rename_keys (line 46) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 121) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 147) | def remove_classification_head_(state_dict): function rename_key (line 153) | def rename_key(dct, old, new): function prepare_img (line 159) | def prepare_img(): function convert_vit_checkpoint (line 166) | def convert_vit_checkpoint(vit_name, pytorch_dump_folder_path, push_to_h... FILE: transformers/models/vit_hybrid/image_processing_vit_hybrid.py class ViTHybridImageProcessor (line 51) | class ViTHybridImageProcessor(BaseImageProcessor): method __init__ (line 91) | def __init__( method resize (line 124) | def resize( method center_crop (line 152) | def center_crop( method rescale (line 176) | def rescale( method normalize (line 196) | def normalize( method preprocess (line 219) | def preprocess( FILE: transformers/models/vit_hybrid/modeling_vit_hybrid.py class ViTHybridEmbeddings (line 56) | class ViTHybridEmbeddings(nn.Module): method __init__ (line 62) | def __init__(self, config: ViTHybridConfig, use_mask_token: bool = Fal... method interpolate_pos_encoding (line 73) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 107) | def forward( class ViTHybridPatchEmbeddings (line 138) | class ViTHybridPatchEmbeddings(nn.Module): method __init__ (line 145) | def __init__(self, config, feature_size=None): method forward (line 177) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTHybridSelfAttention (line 197) | class ViTHybridSelfAttention(nn.Module): method __init__ (line 198) | def __init__(self, config: ViTHybridConfig) -> None: method transpose_for_scores (line 216) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 221) | def forward( class ViTHybridSelfOutput (line 258) | class ViTHybridSelfOutput(nn.Module): method __init__ (line 264) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 269) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTHybridAttention (line 277) | class ViTHybridAttention(nn.Module): method __init__ (line 278) | def __init__(self, config: ViTHybridConfig) -> None: method prune_heads (line 284) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 302) | def forward( class ViTHybridIntermediate (line 317) | class ViTHybridIntermediate(nn.Module): method __init__ (line 318) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 326) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTHybridOutput (line 334) | class ViTHybridOutput(nn.Module): method __init__ (line 335) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 340) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTHybridLayer (line 349) | class ViTHybridLayer(nn.Module): method __init__ (line 352) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 362) | def forward( class ViTHybridEncoder (line 393) | class ViTHybridEncoder(nn.Module): method __init__ (line 394) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 400) | def forward( class ViTHybridPreTrainedModel (line 451) | class ViTHybridPreTrainedModel(PreTrainedModel): method _init_weights (line 463) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 489) | def _set_gradient_checkpointing(self, module: ViTHybridEncoder, value:... class ViTHybridModel (line 533) | class ViTHybridModel(ViTHybridPreTrainedModel): method __init__ (line 534) | def __init__(self, config: ViTHybridConfig, add_pooling_layer: bool = ... method get_input_embeddings (line 547) | def get_input_embeddings(self) -> ViTHybridPatchEmbeddings: method _prune_heads (line 550) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 566) | def forward( class ViTHybridPooler (line 629) | class ViTHybridPooler(nn.Module): method __init__ (line 630) | def __init__(self, config: ViTHybridConfig): method forward (line 635) | def forward(self, hidden_states): class ViTHybridForImageClassification (line 652) | class ViTHybridForImageClassification(ViTHybridPreTrainedModel): method __init__ (line 653) | def __init__(self, config: ViTHybridConfig) -> None: method forward (line 672) | def forward( FILE: transformers/models/vit_mae/configuration_vit_mae.py class ViTMAEConfig (line 29) | class ViTMAEConfig(PretrainedConfig): method __init__ (line 98) | def __init__( FILE: transformers/models/vit_mae/convert_vit_mae_to_pytorch.py function rename_key (line 26) | def rename_key(name): function convert_state_dict (line 69) | def convert_state_dict(orig_state_dict, config): function convert_vit_mae_checkpoint (line 105) | def convert_vit_mae_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: transformers/models/vit_mae/modeling_tf_vit_mae.py class TFViTMAEModelOutput (line 56) | class TFViTMAEModelOutput(ModelOutput): class TFViTMAEDecoderOutput (line 85) | class TFViTMAEDecoderOutput(ModelOutput): class TFViTMAEForPreTrainingOutput (line 108) | class TFViTMAEForPreTrainingOutput(ModelOutput): function get_2d_sincos_pos_embed (line 139) | def get_2d_sincos_pos_embed(embed_dim, grid_size, add_cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 167) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 179) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): class TFViTMAEEmbeddings (line 202) | class TFViTMAEEmbeddings(tf.keras.layers.Layer): method __init__ (line 208) | def __init__(self, config: ViTMAEConfig, **kwargs): method build (line 216) | def build(self, input_shape: tf.TensorShape): method random_masking (line 238) | def random_masking(self, sequence: tf.Tensor, noise: tf.Tensor | None ... method call (line 279) | def call(self, pixel_values: tf.Tensor, noise: tf.Tensor = None) -> tf... class TFViTMAEPatchEmbeddings (line 296) | class TFViTMAEPatchEmbeddings(tf.keras.layers.Layer): method __init__ (line 303) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 327) | def call(self, pixel_values: tf.Tensor, training: bool = False) -> tf.... class TFViTMAESelfAttention (line 357) | class TFViTMAESelfAttention(tf.keras.layers.Layer): method __init__ (line 358) | def __init__(self, config: ViTMAEConfig, **kwargs): method transpose_for_scores (line 383) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 390) | def call( class TFViTMAESelfOutput (line 433) | class TFViTMAESelfOutput(tf.keras.layers.Layer): method __init__ (line 439) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 447) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTMAEAttention (line 455) | class TFViTMAEAttention(tf.keras.layers.Layer): method __init__ (line 456) | def __init__(self, config: ViTMAEConfig, **kwargs): method prune_heads (line 462) | def prune_heads(self, heads): method call (line 465) | def call( class TFViTMAEIntermediate (line 484) | class TFViTMAEIntermediate(tf.keras.layers.Layer): method __init__ (line 485) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 497) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFViTMAEOutput (line 505) | class TFViTMAEOutput(tf.keras.layers.Layer): method __init__ (line 506) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 514) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFViTMAELayer (line 523) | class TFViTMAELayer(tf.keras.layers.Layer): method __init__ (line 526) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 540) | def call( class TFViTMAEEncoder (line 574) | class TFViTMAEEncoder(tf.keras.layers.Layer): method __init__ (line 575) | def __init__(self, config: ViTMAEConfig, **kwargs): method call (line 580) | def call( class TFViTMAEMainLayer (line 620) | class TFViTMAEMainLayer(tf.keras.layers.Layer): method __init__ (line 623) | def __init__(self, config: ViTMAEConfig, **kwargs): method get_input_embeddings (line 632) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method _prune_heads (line 635) | def _prune_heads(self, heads_to_prune): method call (line 643) | def call( class TFViTMAEPreTrainedModel (line 691) | class TFViTMAEPreTrainedModel(TFPreTrainedModel): class TFViTMAEModel (line 778) | class TFViTMAEModel(TFViTMAEPreTrainedModel): method __init__ (line 779) | def __init__(self, config: ViTMAEConfig, *inputs, **kwargs): method get_input_embeddings (line 784) | def get_input_embeddings(self): method call (line 790) | def call( class TFViTMAEDecoder (line 833) | class TFViTMAEDecoder(tf.keras.layers.Layer): method __init__ (line 834) | def __init__(self, config, num_patches, **kwargs): method build (line 856) | def build(self, input_shape: tf.TensorShape): method call (line 878) | def call( class TFViTMAEForPreTraining (line 939) | class TFViTMAEForPreTraining(TFViTMAEPreTrainedModel): method __init__ (line 940) | def __init__(self, config): method get_input_embeddings (line 951) | def get_input_embeddings(self): method _prune_heads (line 954) | def _prune_heads(self, heads_to_prune): method patchify (line 957) | def patchify(self, pixel_values): method unpatchify (line 1005) | def unpatchify(self, patchified_pixel_values): method forward_loss (line 1037) | def forward_loss(self, pixel_values, pred, mask): method call (line 1066) | def call( FILE: transformers/models/vit_mae/modeling_vit_mae.py class ViTMAEModelOutput (line 55) | class ViTMAEModelOutput(ModelOutput): class ViTMAEDecoderOutput (line 84) | class ViTMAEDecoderOutput(ModelOutput): class ViTMAEForPreTrainingOutput (line 107) | class ViTMAEForPreTrainingOutput(ModelOutput): function get_2d_sincos_pos_embed (line 138) | def get_2d_sincos_pos_embed(embed_dim, grid_size, add_cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 166) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 178) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): class ViTMAEEmbeddings (line 199) | class ViTMAEEmbeddings(nn.Module): method __init__ (line 205) | def __init__(self, config): method initialize_weights (line 218) | def initialize_weights(self): method random_masking (line 232) | def random_masking(self, sequence, noise=None): method forward (line 264) | def forward(self, pixel_values, noise=None): class ViTMAEPatchEmbeddings (line 282) | class ViTMAEPatchEmbeddings(nn.Module): method __init__ (line 289) | def __init__(self, config): method forward (line 303) | def forward(self, pixel_values): class ViTMAESelfAttention (line 318) | class ViTMAESelfAttention(nn.Module): method __init__ (line 319) | def __init__(self, config: ViTMAEConfig) -> None: method transpose_for_scores (line 337) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 342) | def forward( class ViTMAESelfOutput (line 379) | class ViTMAESelfOutput(nn.Module): method __init__ (line 385) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 390) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMAEAttention (line 398) | class ViTMAEAttention(nn.Module): method __init__ (line 399) | def __init__(self, config: ViTMAEConfig) -> None: method prune_heads (line 405) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 423) | def forward( class ViTMAEIntermediate (line 438) | class ViTMAEIntermediate(nn.Module): method __init__ (line 439) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 447) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTMAEOutput (line 455) | class ViTMAEOutput(nn.Module): method __init__ (line 456) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 461) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMAELayer (line 471) | class ViTMAELayer(nn.Module): method __init__ (line 474) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 484) | def forward( class ViTMAEEncoder (line 514) | class ViTMAEEncoder(nn.Module): method __init__ (line 515) | def __init__(self, config: ViTMAEConfig) -> None: method forward (line 521) | def forward( class ViTMAEPreTrainedModel (line 571) | class ViTMAEPreTrainedModel(PreTrainedModel): method _init_weights (line 582) | def _init_weights(self, module): method _set_gradient_checkpointing (line 594) | def _set_gradient_checkpointing(self, module, value=False): class ViTMAEModel (line 637) | class ViTMAEModel(ViTMAEPreTrainedModel): method __init__ (line 638) | def __init__(self, config): method get_input_embeddings (line 650) | def get_input_embeddings(self): method _prune_heads (line 653) | def _prune_heads(self, heads_to_prune): method forward (line 663) | def forward( class ViTMAEDecoder (line 732) | class ViTMAEDecoder(nn.Module): method __init__ (line 733) | def __init__(self, config, num_patches): method initialize_weights (line 758) | def initialize_weights(self, num_patches): method forward (line 768) | def forward( class ViTMAEForPreTraining (line 849) | class ViTMAEForPreTraining(ViTMAEPreTrainedModel): method __init__ (line 850) | def __init__(self, config): method get_input_embeddings (line 860) | def get_input_embeddings(self): method _prune_heads (line 863) | def _prune_heads(self, heads_to_prune): method patchify (line 871) | def patchify(self, pixel_values): method unpatchify (line 902) | def unpatchify(self, patchified_pixel_values): method forward_loss (line 937) | def forward_loss(self, pixel_values, pred, mask): method forward (line 964) | def forward( FILE: transformers/models/vit_msn/configuration_vit_msn.py class ViTMSNConfig (line 30) | class ViTMSNConfig(PretrainedConfig): method __init__ (line 86) | def __init__( FILE: transformers/models/vit_msn/convert_msn_to_pytorch.py function create_rename_keys (line 33) | def create_rename_keys(config, base_model=False): function read_in_q_k_v (line 86) | def read_in_q_k_v(state_dict, config, base_model=False): function remove_classification_head_ (line 112) | def remove_classification_head_(state_dict): function remove_projection_head (line 118) | def remove_projection_head(state_dict): function rename_key (line 143) | def rename_key(dct, old, new): function convert_vit_msn_checkpoint (line 148) | def convert_vit_msn_checkpoint(checkpoint_url, pytorch_dump_folder_path): FILE: transformers/models/vit_msn/modeling_vit_msn.py class ViTMSNEmbeddings (line 46) | class ViTMSNEmbeddings(nn.Module): method __init__ (line 51) | def __init__(self, config: ViTMSNConfig, use_mask_token: bool = False)... method interpolate_pos_encoding (line 62) | def interpolate_pos_encoding(self, embeddings: torch.Tensor, height: i... method forward (line 97) | def forward( class ViTMSNPatchEmbeddings (line 129) | class ViTMSNPatchEmbeddings(nn.Module): method __init__ (line 136) | def __init__(self, config): method forward (line 151) | def forward(self, pixel_values: torch.Tensor, interpolate_pos_encoding... class ViTMSNSelfAttention (line 169) | class ViTMSNSelfAttention(nn.Module): method __init__ (line 170) | def __init__(self, config: ViTMSNConfig) -> None: method transpose_for_scores (line 188) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 193) | def forward( class ViTMSNSelfOutput (line 230) | class ViTMSNSelfOutput(nn.Module): method __init__ (line 236) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 241) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMSNAttention (line 249) | class ViTMSNAttention(nn.Module): method __init__ (line 250) | def __init__(self, config: ViTMSNConfig) -> None: method prune_heads (line 256) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 274) | def forward( class ViTMSNIntermediate (line 289) | class ViTMSNIntermediate(nn.Module): method __init__ (line 290) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 298) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class ViTMSNOutput (line 306) | class ViTMSNOutput(nn.Module): method __init__ (line 307) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 312) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class ViTMSNLayer (line 322) | class ViTMSNLayer(nn.Module): method __init__ (line 325) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 335) | def forward( class ViTMSNEncoder (line 365) | class ViTMSNEncoder(nn.Module): method __init__ (line 366) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 372) | def forward( class ViTMSNPreTrainedModel (line 422) | class ViTMSNPreTrainedModel(PreTrainedModel): method _init_weights (line 435) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 447) | def _set_gradient_checkpointing(self, module: ViTMSNEncoder, value: bo... class ViTMSNModel (line 492) | class ViTMSNModel(ViTMSNPreTrainedModel): method __init__ (line 493) | def __init__(self, config: ViTMSNConfig, use_mask_token: bool = False): method get_input_embeddings (line 505) | def get_input_embeddings(self) -> ViTMSNPatchEmbeddings: method _prune_heads (line 508) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 518) | def forward( class ViTMSNForImageClassification (line 601) | class ViTMSNForImageClassification(ViTMSNPreTrainedModel): method __init__ (line 602) | def __init__(self, config: ViTMSNConfig) -> None: method forward (line 616) | def forward( FILE: transformers/models/wav2vec2/configuration_wav2vec2.py class Wav2Vec2Config (line 32) | class Wav2Vec2Config(PretrainedConfig): method __init__ (line 206) | def __init__( method inputs_to_logits_ratio (line 345) | def inputs_to_logits_ratio(self): FILE: transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 70) | def set_recursively(key, value, full_name, weight_type, hf_pointer): function rename_dict (line 117) | def rename_dict(key, value, full_name, weight_type, hf_dict): function load_wav2vec2_layer (line 144) | def load_wav2vec2_layer(name, value, hf_model=None, hf_dict=None): function recursively_load_weights (line 172) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function load_conv_layer (line 197) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wav2vec2_checkpoint (line 242) | def convert_wav2vec2_checkpoint( FILE: transformers/models/wav2vec2/convert_wav2vec2_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 36) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 45) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 52) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 71) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: transformers/models/wav2vec2/feature_extraction_wav2vec2.py class Wav2Vec2FeatureExtractor (line 31) | class Wav2Vec2FeatureExtractor(SequenceFeatureExtractor): method __init__ (line 67) | def __init__( method zero_mean_unit_var_norm (line 81) | def zero_mean_unit_var_norm( method __call__ (line 102) | def __call__( FILE: transformers/models/wav2vec2/modeling_flax_wav2vec2.py class FlaxWav2Vec2BaseModelOutput (line 45) | class FlaxWav2Vec2BaseModelOutput(ModelOutput): class FlaxWav2Vec2ForPreTrainingOutput (line 75) | class FlaxWav2Vec2ForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 109) | def _compute_mask_indices( function _sample_negative_indices (line 182) | def _sample_negative_indices(features_shape: Tuple, num_negatives: int, ... class FlaxWav2Vec2LayerNormConvLayer (line 289) | class FlaxWav2Vec2LayerNormConvLayer(nn.Module): method setup (line 294) | def setup(self): method __call__ (line 310) | def __call__(self, hidden_states): class FlaxConvWithWeightNorm (line 317) | class FlaxConvWithWeightNorm(nn.Module): method setup (line 321) | def setup(self): method _get_normed_weights (line 340) | def _get_normed_weights(self): method __call__ (line 346) | def __call__(self, hidden_states): class FlaxWav2Vec2PositionalConvEmbedding (line 353) | class FlaxWav2Vec2PositionalConvEmbedding(nn.Module): method setup (line 357) | def setup(self): method __call__ (line 362) | def __call__(self, hidden_states): class FlaxConvLayersCollection (line 375) | class FlaxConvLayersCollection(nn.Module): method setup (line 379) | def setup(self): method __call__ (line 393) | def __call__(self, hidden_states): class FlaxWav2Vec2FeatureEncoder (line 399) | class FlaxWav2Vec2FeatureEncoder(nn.Module): method setup (line 405) | def setup(self): method __call__ (line 408) | def __call__(self, input_values, freeze_feature_encoder=False): class FlaxWav2Vec2FeatureProjection (line 416) | class FlaxWav2Vec2FeatureProjection(nn.Module): method setup (line 420) | def setup(self): method __call__ (line 429) | def __call__(self, hidden_states, deterministic=True): class FlaxWav2Vec2Attention (line 436) | class FlaxWav2Vec2Attention(nn.Module): method setup (line 444) | def setup(self) -> None: method _split_heads (line 465) | def _split_heads(self, hidden_states): method _merge_heads (line 468) | def _merge_heads(self, hidden_states): method __call__ (line 471) | def __call__( class FlaxWav2Vec2FeedForward (line 527) | class FlaxWav2Vec2FeedForward(nn.Module): method setup (line 531) | def setup(self): method __call__ (line 551) | def __call__(self, hidden_states, deterministic=True): class FlaxWav2Vec2EncoderLayerStableLayerNorm (line 561) | class FlaxWav2Vec2EncoderLayerStableLayerNorm(nn.Module): method setup (line 565) | def setup(self): method __call__ (line 578) | def __call__(self, hidden_states, attention_mask=None, deterministic=T... class FlaxWav2Vec2EncoderLayerStableLayerNormCollection (line 598) | class FlaxWav2Vec2EncoderLayerStableLayerNormCollection(nn.Module): method setup (line 602) | def setup(self): method __call__ (line 608) | def __call__( class FlaxWav2Vec2StableLayerNormEncoder (line 646) | class FlaxWav2Vec2StableLayerNormEncoder(nn.Module): method setup (line 650) | def setup(self): method __call__ (line 656) | def __call__( class FlaxWav2Vec2GumbelVectorQuantizer (line 701) | class FlaxWav2Vec2GumbelVectorQuantizer(nn.Module): method setup (line 710) | def setup(self): method _compute_perplexity (line 733) | def _compute_perplexity(probs, mask=None): method __call__ (line 744) | def __call__(self, hidden_states, mask_time_indices=None, deterministi... class FlaxWav2Vec2Adapter (line 779) | class FlaxWav2Vec2Adapter(nn.Module): method setup (line 783) | def setup(self): method __call__ (line 797) | def __call__(self, hidden_states, deterministic=True): class FlaxWav2Vec2AdapterLayer (line 808) | class FlaxWav2Vec2AdapterLayer(nn.Module): method setup (line 812) | def setup(self): method __call__ (line 822) | def __call__(self, hidden_states): class FlaxWav2Vec2AdapterLayersCollection (line 829) | class FlaxWav2Vec2AdapterLayersCollection(nn.Module): method setup (line 833) | def setup(self): method __call__ (line 839) | def __call__(self, hidden_states): class FlaxWav2Vec2PreTrainedModel (line 846) | class FlaxWav2Vec2PreTrainedModel(FlaxPreTrainedModel): method __init__ (line 857) | def __init__( method init_weights (line 869) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 889) | def __call__( method _get_feat_extract_output_lengths (line 933) | def _get_feat_extract_output_lengths( class FlaxWav2Vec2Module (line 939) | class FlaxWav2Vec2Module(nn.Module): method setup (line 943) | def setup(self): method __call__ (line 957) | def __call__( method _get_feat_extract_output_lengths (line 1009) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1032) | def _get_feature_vector_attention_mask( class FlaxWav2Vec2Model (line 1055) | class FlaxWav2Vec2Model(FlaxWav2Vec2PreTrainedModel): class FlaxWav2Vec2ForCTCModule (line 1098) | class FlaxWav2Vec2ForCTCModule(nn.Module): method setup (line 1102) | def setup(self): method __call__ (line 1111) | def __call__( method _get_feat_extract_output_lengths (line 1143) | def _get_feat_extract_output_lengths( class FlaxWav2Vec2ForCTC (line 1173) | class FlaxWav2Vec2ForCTC(FlaxWav2Vec2PreTrainedModel): class FlaxWav2Vec2ForPreTrainingModule (line 1219) | class FlaxWav2Vec2ForPreTrainingModule(nn.Module): method setup (line 1223) | def setup(self): method __call__ (line 1239) | def __call__( method _get_feat_extract_output_lengths (line 1294) | def _get_feat_extract_output_lengths( class FlaxWav2Vec2ForPreTraining (line 1319) | class FlaxWav2Vec2ForPreTraining(FlaxWav2Vec2PreTrainedModel): method __call__ (line 1324) | def __call__( FILE: transformers/models/wav2vec2/modeling_tf_wav2vec2.py class TFWav2Vec2BaseModelOutput (line 66) | class TFWav2Vec2BaseModelOutput(ModelOutput): function _sample_without_replacement (line 94) | def _sample_without_replacement(distribution, num_samples): function _scatter_values_on_batch_indices (line 104) | def _scatter_values_on_batch_indices(values, batch_indices, output_shape): function _compute_mask_indices (line 119) | def _compute_mask_indices( function _expand_mask (line 194) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFWav2Vec2GroupNorm (line 207) | class TFWav2Vec2GroupNorm(tf.keras.layers.Layer): method __init__ (line 212) | def __init__( method build (line 242) | def build(self, input_shape): method call (line 253) | def call(self, inputs): method get_config (line 269) | def get_config(self): method compute_output_shape (line 286) | def compute_output_shape(self, input_shape): method _reshape_into_groups (line 289) | def _reshape_into_groups(self, inputs, input_shape, tensor_input_shape): method _apply_normalization (line 301) | def _apply_normalization(self, reshaped_inputs, input_shape): method _get_reshaped_weights (line 324) | def _get_reshaped_weights(self, input_shape): method _check_if_input_shape_is_none (line 335) | def _check_if_input_shape_is_none(self, input_shape): method _set_number_of_groups_for_instance_norm (line 346) | def _set_number_of_groups_for_instance_norm(self, input_shape): method _check_size_of_dimensions (line 352) | def _check_size_of_dimensions(self, input_shape): method _check_axis (line 372) | def _check_axis(self): method _create_input_spec (line 378) | def _create_input_spec(self, input_shape): method _add_gamma_weight (line 382) | def _add_gamma_weight(self, input_shape): method _add_beta_weight (line 397) | def _add_beta_weight(self, input_shape): method _create_broadcast_shape (line 412) | def _create_broadcast_shape(self, input_shape): class TFWav2Vec2WeightNormConv1D (line 423) | class TFWav2Vec2WeightNormConv1D(tf.keras.layers.Conv1D): method __init__ (line 426) | def __init__(self, filters, kernel_size, groups, explicit_padding, **k... method _init_norm (line 441) | def _init_norm(self): method _normalize_kernel (line 446) | def _normalize_kernel(self): method build (line 451) | def build(self, input_shape): method call (line 470) | def call(self, inputs): class TFWav2Vec2NoLayerNormConvLayer (line 483) | class TFWav2Vec2NoLayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 484) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 498) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2LayerNormConvLayer (line 504) | class TFWav2Vec2LayerNormConvLayer(tf.keras.layers.Layer): method __init__ (line 505) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 520) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2GroupNormConvLayer (line 527) | class TFWav2Vec2GroupNormConvLayer(tf.keras.layers.Layer): method __init__ (line 528) | def __init__(self, config: Wav2Vec2Config, layer_id: int = 0, **kwargs... method call (line 545) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2PositionalConvEmbedding (line 552) | class TFWav2Vec2PositionalConvEmbedding(tf.keras.layers.Layer): method __init__ (line 553) | def __init__(self, config: Wav2Vec2Config, **kwargs: Any) -> None: method call (line 565) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFWav2Vec2SamePadLayer (line 572) | class TFWav2Vec2SamePadLayer(tf.keras.layers.Layer): method __init__ (line 573) | def __init__(self, num_conv_pos_embeddings, **kwargs): method call (line 577) | def call(self, hidden_states): class TFWav2Vec2FeatureEncoder (line 583) | class TFWav2Vec2FeatureEncoder(tf.keras.layers.Layer): method __init__ (line 584) | def __init__(self, config: Wav2Vec2Config, **kwargs: Any) -> None: method call (line 603) | def call(self, input_values): class TFWav2Vec2FeatureExtractor (line 610) | class TFWav2Vec2FeatureExtractor(TFWav2Vec2FeatureEncoder): method __init__ (line 611) | def __init__(self, config, **kwargs): class TFWav2Vec2FeatureProjection (line 621) | class TFWav2Vec2FeatureProjection(tf.keras.layers.Layer): method __init__ (line 622) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 634) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFWav2Vec2Attention (line 642) | class TFWav2Vec2Attention(tf.keras.layers.Layer): method __init__ (line 645) | def __init__( method _shape (line 673) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 676) | def call( class TFWav2Vec2FeedForward (line 795) | class TFWav2Vec2FeedForward(tf.keras.layers.Layer): method __init__ (line 796) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 817) | def call(self, hidden_states: tf.Tensor, training: bool = False) -> tf... class TFWav2Vec2EncoderLayer (line 827) | class TFWav2Vec2EncoderLayer(tf.keras.layers.Layer): method __init__ (line 828) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 844) | def call( class TFWav2Vec2EncoderLayerStableLayerNorm (line 870) | class TFWav2Vec2EncoderLayerStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 871) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 887) | def call( class TFWav2Vec2Encoder (line 911) | class TFWav2Vec2Encoder(tf.keras.layers.Layer): method __init__ (line 912) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 920) | def call( class TFWav2Vec2EncoderStableLayerNorm (line 976) | class TFWav2Vec2EncoderStableLayerNorm(tf.keras.layers.Layer): method __init__ (line 977) | def __init__(self, config: Wav2Vec2Config, **kwargs): method call (line 987) | def call( class TFWav2Vec2MainLayer (line 1044) | class TFWav2Vec2MainLayer(tf.keras.layers.Layer): method __init__ (line 1047) | def __init__(self, config: Wav2Vec2Config, **kwargs): method build (line 1058) | def build(self, input_shape: tf.TensorShape): method _get_feat_extract_output_lengths (line 1065) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor): method _mask_hidden_states (line 1080) | def _mask_hidden_states(self, hidden_states: tf.Tensor, mask_time_indi... method call (line 1125) | def call( class TFWav2Vec2PreTrainedModel (line 1177) | class TFWav2Vec2PreTrainedModel(TFPreTrainedModel): method input_signature (line 1188) | def input_signature(self): method dummy_inputs (line 1195) | def dummy_inputs(self): method __init__ (line 1201) | def __init__(self, config, *inputs, **kwargs): method _get_feat_extract_output_lengths (line 1208) | def _get_feat_extract_output_lengths(self, input_lengths, add_adapter=... method _get_feature_vector_attention_mask (line 1225) | def _get_feature_vector_attention_mask( class TFWav2Vec2Model (line 1351) | class TFWav2Vec2Model(TFWav2Vec2PreTrainedModel): method __init__ (line 1352) | def __init__(self, config: Wav2Vec2Config, *inputs, **kwargs): method call (line 1360) | def call( class TFWav2Vec2ForCTC (line 1425) | class TFWav2Vec2ForCTC(TFWav2Vec2PreTrainedModel): method __init__ (line 1426) | def __init__(self, config: Wav2Vec2Config, *inputs, **kwargs): method freeze_feature_extractor (line 1433) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1445) | def freeze_feature_encoder(self): method call (line 1455) | def call( class TFWav2Vec2ForSequenceClassification (line 1574) | class TFWav2Vec2ForSequenceClassification(TFWav2Vec2PreTrainedModel): method __init__ (line 1575) | def __init__(self, config): method freeze_feature_extractor (line 1588) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1600) | def freeze_feature_encoder(self): method freeze_base_model (line 1607) | def freeze_base_model(self): method call (line 1616) | def call( FILE: transformers/models/wav2vec2/modeling_wav2vec2.py class Wav2Vec2ForPreTrainingOutput (line 100) | class Wav2Vec2ForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 141) | def _compute_mask_indices( function _sample_negative_indices (line 260) | def _sample_negative_indices( class Wav2Vec2NoLayerNormConvLayer (line 296) | class Wav2Vec2NoLayerNormConvLayer(nn.Module): method __init__ (line 297) | def __init__(self, config, layer_id=0): method forward (line 311) | def forward(self, hidden_states): class Wav2Vec2LayerNormConvLayer (line 317) | class Wav2Vec2LayerNormConvLayer(nn.Module): method __init__ (line 318) | def __init__(self, config, layer_id=0): method forward (line 333) | def forward(self, hidden_states): class Wav2Vec2GroupNormConvLayer (line 344) | class Wav2Vec2GroupNormConvLayer(nn.Module): method __init__ (line 345) | def __init__(self, config, layer_id=0): method forward (line 361) | def forward(self, hidden_states): class Wav2Vec2PositionalConvEmbedding (line 368) | class Wav2Vec2PositionalConvEmbedding(nn.Module): method __init__ (line 369) | def __init__(self, config): method forward (line 396) | def forward(self, hidden_states): class Wav2Vec2SamePadLayer (line 407) | class Wav2Vec2SamePadLayer(nn.Module): method __init__ (line 408) | def __init__(self, num_conv_pos_embeddings): method forward (line 412) | def forward(self, hidden_states): class Wav2Vec2FeatureEncoder (line 418) | class Wav2Vec2FeatureEncoder(nn.Module): method __init__ (line 421) | def __init__(self, config): method _freeze_parameters (line 440) | def _freeze_parameters(self): method forward (line 445) | def forward(self, input_values): class Wav2Vec2FeatureExtractor (line 471) | class Wav2Vec2FeatureExtractor(Wav2Vec2FeatureEncoder): method __init__ (line 472) | def __init__(self, config): class Wav2Vec2FeatureProjection (line 482) | class Wav2Vec2FeatureProjection(nn.Module): method __init__ (line 483) | def __init__(self, config): method forward (line 489) | def forward(self, hidden_states): class Wav2Vec2Attention (line 498) | class Wav2Vec2Attention(nn.Module): method __init__ (line 501) | def __init__( method _shape (line 528) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 531) | def forward( class Wav2Vec2FeedForward (line 652) | class Wav2Vec2FeedForward(nn.Module): method __init__ (line 653) | def __init__(self, config): method forward (line 666) | def forward(self, hidden_states): class Wav2Vec2EncoderLayer (line 676) | class Wav2Vec2EncoderLayer(nn.Module): method __init__ (line 677) | def __init__(self, config): method forward (line 690) | def forward(self, hidden_states, attention_mask=None, output_attention... class Wav2Vec2EncoderLayerStableLayerNorm (line 710) | class Wav2Vec2EncoderLayerStableLayerNorm(nn.Module): method __init__ (line 711) | def __init__(self, config): method forward (line 729) | def forward( class Wav2Vec2Encoder (line 755) | class Wav2Vec2Encoder(nn.Module): method __init__ (line 756) | def __init__(self, config): method forward (line 765) | def forward( class Wav2Vec2EncoderStableLayerNorm (line 842) | class Wav2Vec2EncoderStableLayerNorm(nn.Module): method __init__ (line 843) | def __init__(self, config): method forward (line 854) | def forward( class Wav2Vec2GumbelVectorQuantizer (line 933) | class Wav2Vec2GumbelVectorQuantizer(nn.Module): method __init__ (line 939) | def __init__(self, config): method _compute_perplexity (line 960) | def _compute_perplexity(probs, mask=None): method forward (line 971) | def forward(self, hidden_states, mask_time_indices=None): class Wav2Vec2Adapter (line 1009) | class Wav2Vec2Adapter(nn.Module): method __init__ (line 1010) | def __init__(self, config): method forward (line 1023) | def forward(self, hidden_states): class Wav2Vec2AdapterLayer (line 1040) | class Wav2Vec2AdapterLayer(nn.Module): method __init__ (line 1041) | def __init__(self, config): method forward (line 1051) | def forward(self, hidden_states): class Wav2Vec2AttnAdapterLayer (line 1058) | class Wav2Vec2AttnAdapterLayer(nn.Module): method __init__ (line 1059) | def __init__(self, config): method forward (line 1073) | def forward(self, hidden_states: torch.FloatTensor): class Wav2Vec2PreTrainedModel (line 1083) | class Wav2Vec2PreTrainedModel(PreTrainedModel): method _init_weights (line 1095) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1134) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1157) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 1177) | def _set_gradient_checkpointing(self, module, value=False): method _get_adapters (line 1181) | def _get_adapters(self): method load_adapter (line 1197) | def load_adapter(self, target_lang: str, **kwargs): class Wav2Vec2Model (line 1424) | class Wav2Vec2Model(Wav2Vec2PreTrainedModel): method __init__ (line 1425) | def __init__(self, config: Wav2Vec2Config): method freeze_feature_extractor (line 1445) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1457) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1464) | def _mask_hidden_states( method forward (line 1518) | def forward( class Wav2Vec2ForPreTraining (line 1572) | class Wav2Vec2ForPreTraining(Wav2Vec2PreTrainedModel): method __init__ (line 1573) | def __init__(self, config: Wav2Vec2Config): method set_gumbel_temperature (line 1586) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_extractor (line 1592) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1604) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1612) | def compute_contrastive_logits( method forward (line 1634) | def forward( class Wav2Vec2ForMaskedLM (line 1794) | class Wav2Vec2ForMaskedLM(Wav2Vec2PreTrainedModel): method __init__ (line 1795) | def __init__(self, config): method forward (line 1810) | def forward( class Wav2Vec2ForCTC (line 1843) | class Wav2Vec2ForCTC(Wav2Vec2PreTrainedModel): method __init__ (line 1844) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1872) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1884) | def freeze_feature_encoder(self): method forward (line 1899) | def forward( class Wav2Vec2ForSequenceClassification (line 1978) | class Wav2Vec2ForSequenceClassification(Wav2Vec2PreTrainedModel): method __init__ (line 1979) | def __init__(self, config): method freeze_feature_extractor (line 1996) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2008) | def freeze_feature_encoder(self): method freeze_base_model (line 2015) | def freeze_base_model(self): method forward (line 2032) | def forward( class Wav2Vec2ForAudioFrameClassification (line 2100) | class Wav2Vec2ForAudioFrameClassification(Wav2Vec2PreTrainedModel): method __init__ (line 2101) | def __init__(self, config): method freeze_feature_extractor (line 2117) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2129) | def freeze_feature_encoder(self): method freeze_base_model (line 2136) | def freeze_base_model(self): method forward (line 2152) | def forward( class AMSoftmaxLoss (line 2206) | class AMSoftmaxLoss(nn.Module): method __init__ (line 2207) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 2215) | def forward(self, hidden_states, labels): class TDNNLayer (line 2229) | class TDNNLayer(nn.Module): method __init__ (line 2230) | def __init__(self, config, layer_id=0): method forward (line 2240) | def forward(self, hidden_states): class Wav2Vec2ForXVector (line 2261) | class Wav2Vec2ForXVector(Wav2Vec2PreTrainedModel): method __init__ (line 2262) | def __init__(self, config): method freeze_feature_extractor (line 2281) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 2293) | def freeze_feature_encoder(self): method freeze_base_model (line 2300) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2308) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2331) | def forward( FILE: transformers/models/wav2vec2/processing_wav2vec2.py class Wav2Vec2Processor (line 26) | class Wav2Vec2Processor(ProcessorMixin): method __init__ (line 43) | def __init__(self, feature_extractor, tokenizer): method from_pretrained (line 49) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method __call__ (line 67) | def __call__(self, *args, **kwargs): method pad (line 105) | def pad(self, *args, **kwargs): method batch_decode (line 135) | def batch_decode(self, *args, **kwargs): method decode (line 142) | def decode(self, *args, **kwargs): method as_target_processor (line 150) | def as_target_processor(self): FILE: transformers/models/wav2vec2/tokenization_wav2vec2.py class Wav2Vec2CTCTokenizerOutput (line 106) | class Wav2Vec2CTCTokenizerOutput(ModelOutput): class Wav2Vec2CTCTokenizer (line 127) | class Wav2Vec2CTCTokenizer(PreTrainedTokenizer): method __init__ (line 164) | def __init__( method set_target_lang (line 215) | def set_target_lang(self, target_lang: str): method word_delimiter_token (line 237) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 247) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 257) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 261) | def word_delimiter_token_id(self, value): method vocab_size (line 265) | def vocab_size(self) -> int: method get_vocab (line 268) | def get_vocab(self) -> Dict: method _tokenize (line 271) | def _tokenize(self, text, **kwargs): method _convert_token_to_id (line 280) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 284) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 289) | def convert_tokens_to_string( method _compute_offsets (line 353) | def _compute_offsets( method _get_word_offsets (line 368) | def _get_word_offsets( method prepare_for_tokenization (line 402) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _decode (line 407) | def _decode( method batch_decode (line 460) | def batch_decode( method decode (line 530) | def decode( method save_vocabulary (line 635) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _add_tokens (line 648) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... class Wav2Vec2Tokenizer (line 707) | class Wav2Vec2Tokenizer(PreTrainedTokenizer): method __init__ (line 767) | def __init__( method word_delimiter_token (line 810) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 820) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 830) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 834) | def word_delimiter_token_id(self, value): method __call__ (line 838) | def __call__( method vocab_size (line 896) | def vocab_size(self) -> int: method get_vocab (line 899) | def get_vocab(self) -> Dict: method _convert_token_to_id (line 902) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 906) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 911) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 929) | def _decode( method save_vocabulary (line 962) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/wav2vec2_conformer/configuration_wav2vec2_conformer.py class Wav2Vec2ConformerConfig (line 33) | class Wav2Vec2ConformerConfig(PretrainedConfig): method __init__ (line 212) | def __init__( method inputs_to_logits_ratio (line 359) | def inputs_to_logits_ratio(self): FILE: transformers/models/wav2vec2_conformer/convert_wav2vec2_conformer_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 82) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 119) | def recursively_load_weights(fairseq_model, hf_model, is_headless): function load_conv_layer (line 176) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wav2vec2_conformer_checkpoint (line 221) | def convert_wav2vec2_conformer_checkpoint( FILE: transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py class Wav2Vec2ConformerForPreTrainingOutput (line 74) | class Wav2Vec2ConformerForPreTrainingOutput(ModelOutput): function _compute_mask_indices (line 116) | def _compute_mask_indices( function _sample_negative_indices (line 236) | def _sample_negative_indices( class Wav2Vec2ConformerNoLayerNormConvLayer (line 273) | class Wav2Vec2ConformerNoLayerNormConvLayer(nn.Module): method __init__ (line 274) | def __init__(self, config, layer_id=0): method forward (line 288) | def forward(self, hidden_states): class Wav2Vec2ConformerLayerNormConvLayer (line 295) | class Wav2Vec2ConformerLayerNormConvLayer(nn.Module): method __init__ (line 296) | def __init__(self, config, layer_id=0): method forward (line 311) | def forward(self, hidden_states): class Wav2Vec2ConformerGroupNormConvLayer (line 323) | class Wav2Vec2ConformerGroupNormConvLayer(nn.Module): method __init__ (line 324) | def __init__(self, config, layer_id=0): method forward (line 340) | def forward(self, hidden_states): class Wav2Vec2ConformerPositionalConvEmbedding (line 348) | class Wav2Vec2ConformerPositionalConvEmbedding(nn.Module): method __init__ (line 349) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states): class Wav2Vec2ConformerRotaryPositionalEmbedding (line 387) | class Wav2Vec2ConformerRotaryPositionalEmbedding(nn.Module): method __init__ (line 392) | def __init__(self, config): method forward (line 402) | def forward(self, hidden_states): class Wav2Vec2ConformerRelPositionalEmbedding (line 419) | class Wav2Vec2ConformerRelPositionalEmbedding(nn.Module): method __init__ (line 422) | def __init__(self, config): method extend_pe (line 429) | def extend_pe(self, x): method forward (line 460) | def forward(self, hidden_states: torch.Tensor): class Wav2Vec2ConformerSamePadLayer (line 470) | class Wav2Vec2ConformerSamePadLayer(nn.Module): method __init__ (line 471) | def __init__(self, num_conv_pos_embeddings): method forward (line 475) | def forward(self, hidden_states): class Wav2Vec2ConformerFeatureEncoder (line 482) | class Wav2Vec2ConformerFeatureEncoder(nn.Module): method __init__ (line 485) | def __init__(self, config): method _freeze_parameters (line 505) | def _freeze_parameters(self): method forward (line 510) | def forward(self, input_values): class Wav2Vec2ConformerFeatureProjection (line 537) | class Wav2Vec2ConformerFeatureProjection(nn.Module): method __init__ (line 538) | def __init__(self, config): method forward (line 544) | def forward(self, hidden_states): class Wav2Vec2ConformerFeedForward (line 553) | class Wav2Vec2ConformerFeedForward(nn.Module): method __init__ (line 554) | def __init__(self, config): method forward (line 567) | def forward(self, hidden_states): class Wav2Vec2ConformerConvolutionModule (line 577) | class Wav2Vec2ConformerConvolutionModule(nn.Module): method __init__ (line 580) | def __init__(self, config): method forward (line 615) | def forward(self, hidden_states): class Wav2Vec2ConformerSelfAttention (line 637) | class Wav2Vec2ConformerSelfAttention(nn.Module): method __init__ (line 642) | def __init__(self, config): method forward (line 664) | def forward( method _apply_rotary_embedding (line 726) | def _apply_rotary_embedding(self, hidden_states, relative_position_emb... method _apply_relative_embeddings (line 745) | def _apply_relative_embeddings(self, query, key, relative_position_emb... class Wav2Vec2ConformerEncoderLayer (line 785) | class Wav2Vec2ConformerEncoderLayer(nn.Module): method __init__ (line 788) | def __init__(self, config): method forward (line 810) | def forward( class Wav2Vec2ConformerEncoder (line 852) | class Wav2Vec2ConformerEncoder(nn.Module): method __init__ (line 853) | def __init__(self, config): method forward (line 870) | def forward( class Wav2Vec2ConformerGumbelVectorQuantizer (line 954) | class Wav2Vec2ConformerGumbelVectorQuantizer(nn.Module): method __init__ (line 960) | def __init__(self, config): method _compute_perplexity (line 981) | def _compute_perplexity(probs, mask=None): method forward (line 992) | def forward(self, hidden_states, mask_time_indices=None): class Wav2Vec2ConformerAdapter (line 1031) | class Wav2Vec2ConformerAdapter(nn.Module): method __init__ (line 1032) | def __init__(self, config): method forward (line 1045) | def forward(self, hidden_states): class Wav2Vec2ConformerAdapterLayer (line 1063) | class Wav2Vec2ConformerAdapterLayer(nn.Module): method __init__ (line 1064) | def __init__(self, config): method forward (line 1074) | def forward(self, hidden_states): class Wav2Vec2ConformerPreTrainedModel (line 1081) | class Wav2Vec2ConformerPreTrainedModel(PreTrainedModel): method _init_weights (line 1093) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1137) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1160) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 1180) | def _set_gradient_checkpointing(self, module, value=False): class Wav2Vec2ConformerModel (line 1246) | class Wav2Vec2ConformerModel(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1247) | def __init__(self, config: Wav2Vec2ConformerConfig): method freeze_feature_encoder (line 1265) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1273) | def _mask_hidden_states( method forward (line 1328) | def forward( class Wav2Vec2ConformerForPreTraining (line 1384) | class Wav2Vec2ConformerForPreTraining(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1386) | def __init__(self, config: Wav2Vec2ConformerConfig): method set_gumbel_temperature (line 1400) | def set_gumbel_temperature(self, temperature: int): method freeze_feature_encoder (line 1407) | def freeze_feature_encoder(self): method compute_contrastive_logits (line 1416) | def compute_contrastive_logits( method forward (line 1439) | def forward( class Wav2Vec2ConformerForCTC (line 1605) | class Wav2Vec2ConformerForCTC(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1607) | def __init__(self, config, target_lang=None): method freeze_feature_encoder (line 1636) | def freeze_feature_encoder(self): method forward (line 1652) | def forward( class Wav2Vec2ConformerForSequenceClassification (line 1731) | class Wav2Vec2ConformerForSequenceClassification(Wav2Vec2ConformerPreTra... method __init__ (line 1733) | def __init__(self, config): method freeze_feature_encoder (line 1751) | def freeze_feature_encoder(self): method freeze_base_model (line 1758) | def freeze_base_model(self): method forward (line 1774) | def forward( class Wav2Vec2ConformerForAudioFrameClassification (line 1842) | class Wav2Vec2ConformerForAudioFrameClassification(Wav2Vec2ConformerPreT... method __init__ (line 1844) | def __init__(self, config): method freeze_feature_encoder (line 1861) | def freeze_feature_encoder(self): method freeze_base_model (line 1869) | def freeze_base_model(self): method forward (line 1885) | def forward( class AMSoftmaxLoss (line 1940) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1941) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1949) | def forward(self, hidden_states, labels): class TDNNLayer (line 1964) | class TDNNLayer(nn.Module): method __init__ (line 1965) | def __init__(self, config, layer_id=0): method forward (line 1975) | def forward(self, hidden_states): class Wav2Vec2ConformerForXVector (line 1996) | class Wav2Vec2ConformerForXVector(Wav2Vec2ConformerPreTrainedModel): method __init__ (line 1997) | def __init__(self, config): method freeze_feature_encoder (line 2017) | def freeze_feature_encoder(self): method freeze_base_model (line 2025) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 2034) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 2057) | def forward( FILE: transformers/models/wav2vec2_phoneme/tokenization_wav2vec2_phoneme.py class Wav2Vec2PhonemeCTCTokenizerOutput (line 77) | class Wav2Vec2PhonemeCTCTokenizerOutput(ModelOutput): class Wav2Vec2PhonemeCTCTokenizer (line 94) | class Wav2Vec2PhonemeCTCTokenizer(PreTrainedTokenizer): method __init__ (line 132) | def __init__( method vocab_size (line 173) | def vocab_size(self) -> int: method get_vocab (line 176) | def get_vocab(self) -> Dict: method init_backend (line 179) | def init_backend(self, phonemizer_lang: str): method prepare_for_tokenization (line 191) | def prepare_for_tokenization( method _tokenize (line 235) | def _tokenize(self, text, **kwargs): method phonemize (line 256) | def phonemize(self, text: str, phonemizer_lang: Optional[str] = None) ... method word_delimiter_token (line 275) | def word_delimiter_token(self) -> str: method word_delimiter_token_id (line 284) | def word_delimiter_token_id(self) -> Optional[int]: method word_delimiter_token (line 294) | def word_delimiter_token(self, value): method word_delimiter_token_id (line 298) | def word_delimiter_token_id(self, value): method phone_delimiter_token (line 302) | def phone_delimiter_token(self) -> str: method phone_delimiter_token_id (line 312) | def phone_delimiter_token_id(self) -> Optional[int]: method phone_delimiter_token (line 322) | def phone_delimiter_token(self, value): method phone_delimiter_token_id (line 326) | def phone_delimiter_token_id(self, value): method _convert_token_to_id (line 329) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 333) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 338) | def convert_tokens_to_string( method _compute_offsets (line 389) | def _compute_offsets( method _decode (line 408) | def _decode( method decode (line 455) | def decode( method batch_decode (line 511) | def batch_decode( method save_vocabulary (line 567) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method _add_tokens (line 580) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... FILE: transformers/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.py class Wav2Vec2DecoderWithLMOutput (line 45) | class Wav2Vec2DecoderWithLMOutput(ModelOutput): class Wav2Vec2ProcessorWithLM (line 67) | class Wav2Vec2ProcessorWithLM(ProcessorMixin): method __init__ (line 83) | def __init__( method save_pretrained (line 108) | def save_pretrained(self, save_directory): method from_pretrained (line 113) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method _set_language_model_attribute (line 184) | def _set_language_model_attribute(decoder: "BeamSearchDecoderCTC", att... method language_model (line 188) | def language_model(self): method get_missing_alphabet_tokens (line 192) | def get_missing_alphabet_tokens(decoder, tokenizer): method __call__ (line 214) | def __call__(self, *args, **kwargs): method pad (line 253) | def pad(self, *args, **kwargs): method batch_decode (line 284) | def batch_decode( method decode (line 469) | def decode( method as_target_processor (line 634) | def as_target_processor(self): FILE: transformers/models/wavlm/configuration_wavlm.py class WavLMConfig (line 32) | class WavLMConfig(PretrainedConfig): method __init__ (line 195) | def __init__( method inputs_to_logits_ratio (line 335) | def inputs_to_logits_ratio(self): FILE: transformers/models/wavlm/convert_wavlm_original_pytorch_checkpoint_to_pytorch.py function set_recursively (line 68) | def set_recursively(hf_pointer, key, value, full_name, weight_type): function recursively_load_weights (line 96) | def recursively_load_weights(fairseq_model, hf_model): function load_conv_layer (line 140) | def load_conv_layer(full_name, value, feature_extractor, unused_weights,... function convert_wavlm_checkpoint (line 181) | def convert_wavlm_checkpoint(checkpoint_path, pytorch_dump_folder_path, ... FILE: transformers/models/wavlm/convert_wavlm_original_s3prl_checkpoint_to_pytorch.py function convert_classification (line 36) | def convert_classification(base_model_name, hf_config, downstream_dict): function convert_diarization (line 45) | def convert_diarization(base_model_name, hf_config, downstream_dict): function convert_xvector (line 52) | def convert_xvector(base_model_name, hf_config, downstream_dict): function convert_s3prl_checkpoint (line 71) | def convert_s3prl_checkpoint(base_model_name, config_path, checkpoint_pa... FILE: transformers/models/wavlm/modeling_wavlm.py function _compute_mask_indices (line 76) | def _compute_mask_indices( class WavLMNoLayerNormConvLayer (line 196) | class WavLMNoLayerNormConvLayer(nn.Module): method __init__ (line 197) | def __init__(self, config, layer_id=0): method forward (line 211) | def forward(self, hidden_states): class WavLMLayerNormConvLayer (line 218) | class WavLMLayerNormConvLayer(nn.Module): method __init__ (line 219) | def __init__(self, config, layer_id=0): method forward (line 234) | def forward(self, hidden_states): class WavLMGroupNormConvLayer (line 246) | class WavLMGroupNormConvLayer(nn.Module): method __init__ (line 247) | def __init__(self, config, layer_id=0): method forward (line 263) | def forward(self, hidden_states): class WavLMPositionalConvEmbedding (line 271) | class WavLMPositionalConvEmbedding(nn.Module): method __init__ (line 272) | def __init__(self, config): method forward (line 299) | def forward(self, hidden_states): class WavLMSamePadLayer (line 311) | class WavLMSamePadLayer(nn.Module): method __init__ (line 312) | def __init__(self, num_conv_pos_embeddings): method forward (line 316) | def forward(self, hidden_states): class WavLMFeatureEncoder (line 323) | class WavLMFeatureEncoder(nn.Module): method __init__ (line 326) | def __init__(self, config): method _freeze_parameters (line 343) | def _freeze_parameters(self): method forward (line 348) | def forward(self, input_values): class WavLMFeatureExtractor (line 374) | class WavLMFeatureExtractor(WavLMFeatureEncoder): method __init__ (line 375) | def __init__(self, config): class WavLMFeatureProjection (line 386) | class WavLMFeatureProjection(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 393) | def forward(self, hidden_states): class WavLMAttention (line 401) | class WavLMAttention(nn.Module): method __init__ (line 404) | def __init__( method forward (line 440) | def forward( method torch_multi_head_self_attention (line 481) | def torch_multi_head_self_attention( method compute_bias (line 536) | def compute_bias(self, query_length: int, key_length: int) -> torch.Fl... method _relative_positions_bucket (line 546) | def _relative_positions_bucket(self, relative_positions: torch.FloatTe... class WavLMFeedForward (line 568) | class WavLMFeedForward(nn.Module): method __init__ (line 569) | def __init__(self, config): method forward (line 582) | def forward(self, hidden_states): class WavLMEncoderLayer (line 592) | class WavLMEncoderLayer(nn.Module): method __init__ (line 593) | def __init__(self, config: WavLMConfig, has_relative_position_bias: bo... method forward (line 608) | def forward(self, hidden_states, attention_mask=None, position_bias=No... class WavLMEncoderLayerStableLayerNorm (line 633) | class WavLMEncoderLayerStableLayerNorm(nn.Module): method __init__ (line 634) | def __init__(self, config: WavLMConfig, has_relative_position_bias: bo... method forward (line 649) | def forward(self, hidden_states, attention_mask=None, position_bias=No... class WavLMEncoder (line 670) | class WavLMEncoder(nn.Module): method __init__ (line 671) | def __init__(self, config): method forward (line 682) | def forward( class WavLMEncoderStableLayerNorm (line 758) | class WavLMEncoderStableLayerNorm(nn.Module): method __init__ (line 759) | def __init__(self, config): method forward (line 773) | def forward( class WavLMGumbelVectorQuantizer (line 847) | class WavLMGumbelVectorQuantizer(nn.Module): method __init__ (line 853) | def __init__(self, config): method _compute_perplexity (line 875) | def _compute_perplexity(probs): method forward (line 880) | def forward(self, hidden_states): class WavLMAdapter (line 918) | class WavLMAdapter(nn.Module): method __init__ (line 919) | def __init__(self, config): method forward (line 932) | def forward(self, hidden_states): class WavLMAdapterLayer (line 950) | class WavLMAdapterLayer(nn.Module): method __init__ (line 951) | def __init__(self, config): method forward (line 961) | def forward(self, hidden_states): class WavLMPreTrainedModel (line 968) | class WavLMPreTrainedModel(PreTrainedModel): method _init_weights (line 980) | def _init_weights(self, module): method _get_feat_extract_output_lengths (line 1013) | def _get_feat_extract_output_lengths( method _get_feature_vector_attention_mask (line 1036) | def _get_feature_vector_attention_mask( method _set_gradient_checkpointing (line 1056) | def _set_gradient_checkpointing(self, module, value=False): class WavLMModel (line 1122) | class WavLMModel(WavLMPreTrainedModel): method __init__ (line 1123) | def __init__(self, config: WavLMConfig): method freeze_feature_extractor (line 1143) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1155) | def freeze_feature_encoder(self): method _mask_hidden_states (line 1162) | def _mask_hidden_states( method forward (line 1216) | def forward( class WavLMForCTC (line 1274) | class WavLMForCTC(WavLMPreTrainedModel): method __init__ (line 1275) | def __init__(self, config, target_lang=None): method freeze_feature_extractor (line 1303) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1315) | def freeze_feature_encoder(self): method forward (line 1330) | def forward( class WavLMForSequenceClassification (line 1409) | class WavLMForSequenceClassification(WavLMPreTrainedModel): method __init__ (line 1410) | def __init__(self, config): method freeze_feature_extractor (line 1428) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1441) | def freeze_feature_encoder(self): method freeze_base_model (line 1449) | def freeze_base_model(self): method forward (line 1465) | def forward( class WavLMForAudioFrameClassification (line 1534) | class WavLMForAudioFrameClassification(WavLMPreTrainedModel): method __init__ (line 1535) | def __init__(self, config): method freeze_feature_extractor (line 1551) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1563) | def freeze_feature_encoder(self): method freeze_base_model (line 1570) | def freeze_base_model(self): method forward (line 1586) | def forward( class AMSoftmaxLoss (line 1641) | class AMSoftmaxLoss(nn.Module): method __init__ (line 1642) | def __init__(self, input_dim, num_labels, scale=30.0, margin=0.4): method forward (line 1650) | def forward(self, hidden_states, labels): class TDNNLayer (line 1665) | class TDNNLayer(nn.Module): method __init__ (line 1666) | def __init__(self, config, layer_id=0): method forward (line 1676) | def forward(self, hidden_states): class WavLMForXVector (line 1698) | class WavLMForXVector(WavLMPreTrainedModel): method __init__ (line 1699) | def __init__(self, config): method freeze_feature_extractor (line 1718) | def freeze_feature_extractor(self): method freeze_feature_encoder (line 1730) | def freeze_feature_encoder(self): method freeze_base_model (line 1737) | def freeze_base_model(self): method _get_tdnn_output_lengths (line 1745) | def _get_tdnn_output_lengths(self, input_lengths: Union[torch.LongTens... method forward (line 1768) | def forward( FILE: transformers/models/whisper/configuration_whisper.py class WhisperConfig (line 62) | class WhisperConfig(PretrainedConfig): method __init__ (line 194) | def __init__( class WhisperOnnxConfig (line 280) | class WhisperOnnxConfig(OnnxSeq2SeqConfigWithPast): method inputs (line 282) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method generate_dummy_inputs (line 298) | def generate_dummy_inputs( method atol_for_validation (line 335) | def atol_for_validation(self) -> float: FILE: transformers/models/whisper/convert_openai_to_hf.py function remove_ignore_keys_ (line 42) | def remove_ignore_keys_(state_dict): function rename_keys (line 72) | def rename_keys(s_dict): function make_linear_from_emb (line 86) | def make_linear_from_emb(emb): function _download (line 93) | def _download(url: str, root: str) -> bytes: function convert_openai_whisper_to_tfms (line 131) | def convert_openai_whisper_to_tfms(checkpoint_path, pytorch_dump_folder_... FILE: transformers/models/whisper/english_normalizer.py function remove_symbols_and_diacritics (line 45) | def remove_symbols_and_diacritics(s: str, keep=""): function remove_symbols (line 68) | def remove_symbols(s: str): class BasicTextNormalizer (line 75) | class BasicTextNormalizer: method __init__ (line 76) | def __init__(self, remove_diacritics: bool = False, split_letters: boo... method __call__ (line 80) | def __call__(self, s: str): class EnglishNumberNormalizer (line 94) | class EnglishNumberNormalizer: method __init__ (line 105) | def __init__(self): method process_words (line 211) | def process_words(self, words: List[str]) -> Iterator[str]: method preprocess (line 434) | def preprocess(self, s: str): method postprocess (line 463) | def postprocess(self, s: str): method __call__ (line 488) | def __call__(self, s: str): class EnglishSpellingNormalizer (line 496) | class EnglishSpellingNormalizer: method __init__ (line 503) | def __init__(self, english_spelling_mapping): method __call__ (line 506) | def __call__(self, s: str): class EnglishTextNormalizer (line 510) | class EnglishTextNormalizer: method __init__ (line 511) | def __init__(self, english_spelling_mapping): method __call__ (line 571) | def __call__(self, s: str): FILE: transformers/models/whisper/feature_extraction_whisper.py class WhisperFeatureExtractor (line 32) | class WhisperFeatureExtractor(SequenceFeatureExtractor): method __init__ (line 60) | def __init__( method _np_extract_fbank_features (line 94) | def _np_extract_fbank_features(self, waveform: np.array) -> np.ndarray: method zero_mean_unit_var_norm (line 115) | def zero_mean_unit_var_norm( method __call__ (line 136) | def __call__( method to_dict (line 266) | def to_dict(self) -> Dict[str, Any]: FILE: transformers/models/whisper/modeling_flax_whisper.py class FlaxWhisperAttention (line 178) | class FlaxWhisperAttention(nn.Module): method setup (line 187) | def setup(self) -> None: method __call__ (line 212) | def __call__( method _split_heads (line 300) | def _split_heads(self, hidden_state) -> jnp.ndarray: method _merge_heads (line 303) | def _merge_heads(self, hidden_state) -> jnp.ndarray: method _concatenate_to_cache (line 307) | def _concatenate_to_cache(self, key, value, query, attention_mask) -> ... class FlaxWhisperEncoderLayer (line 338) | class FlaxWhisperEncoderLayer(nn.Module): method setup (line 342) | def setup(self) -> None: method __call__ (line 365) | def __call__( class FlaxWhisperEncoderLayerCollection (line 394) | class FlaxWhisperEncoderLayerCollection(nn.Module): method setup (line 399) | def setup(self): method __call__ (line 413) | def __call__( class FlaxWhisperDecoderLayer (line 457) | class FlaxWhisperDecoderLayer(nn.Module): method setup (line 461) | def setup(self) -> None: method __call__ (line 494) | def __call__( class FlaxWhisperDecoderLayerCollection (line 545) | class FlaxWhisperDecoderLayerCollection(nn.Module): method setup (line 550) | def setup(self): method __call__ (line 564) | def __call__( class FlaxWhisperEncoder (line 623) | class FlaxWhisperEncoder(nn.Module): method setup (line 628) | def setup(self) -> None: method __call__ (line 656) | def __call__( class FlaxWhisperDecoder (line 709) | class FlaxWhisperDecoder(nn.Module): method setup (line 714) | def setup(self) -> None: method __call__ (line 726) | def __call__( class FlaxWhisperModule (line 776) | class FlaxWhisperModule(nn.Module): method setup (line 781) | def setup(self) -> None: method __call__ (line 789) | def __call__( method _get_encoder_module (line 832) | def _get_encoder_module(self): method _get_decoder_module (line 835) | def _get_decoder_module(self): class FlaxWhisperPreTrainedModel (line 839) | class FlaxWhisperPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 845) | def __init__( method enable_gradient_checkpointing (line 858) | def enable_gradient_checkpointing(self): method init_weights (line 865) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 898) | def init_cache(self, batch_size, max_length, encoder_outputs): method encode (line 941) | def encode( method decode (line 997) | def decode( method __call__ (line 1111) | def __call__( class FlaxWhisperModel (line 1165) | class FlaxWhisperModel(FlaxWhisperPreTrainedModel): class FlaxWhisperForConditionalGenerationModule (line 1174) | class FlaxWhisperForConditionalGenerationModule(nn.Module): method setup (line 1179) | def setup(self) -> None: method _get_encoder_module (line 1190) | def _get_encoder_module(self): method _get_decoder_module (line 1193) | def _get_decoder_module(self): method __call__ (line 1196) | def __call__( class FlaxWhisperForConditionalGeneration (line 1244) | class FlaxWhisperForConditionalGeneration(FlaxWhisperPreTrainedModel): method decode (line 1250) | def decode( method generate (line 1382) | def generate( method prepare_inputs_for_generation (line 1447) | def prepare_inputs_for_generation( method update_inputs_for_generation (line 1478) | def update_inputs_for_generation(self, model_outputs, model_kwargs): class FlaxWhisperForAudioClassificationModule (line 1513) | class FlaxWhisperForAudioClassificationModule(nn.Module): method setup (line 1518) | def setup(self) -> None: method __call__ (line 1529) | def __call__( class FlaxWhisperForAudioClassification (line 1574) | class FlaxWhisperForAudioClassification(FlaxWhisperPreTrainedModel): method init_weights (line 1578) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method __call__ (line 1602) | def __call__( FILE: transformers/models/whisper/modeling_tf_whisper.py function shift_tokens_right (line 60) | def shift_tokens_right(input_ids: tf.Tensor, pad_token_id: int, decoder_... function _make_causal_mask (line 85) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 103) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None): class TFWhisperPositionalEmbedding (line 116) | class TFWhisperPositionalEmbedding(tf.keras.layers.Layer): method __init__ (line 117) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method build (line 123) | def build(self, input_shape): method call (line 131) | def call(self, input_ids, past_key_values_length=0): class TFWhisperAttention (line 137) | class TFWhisperAttention(tf.keras.layers.Layer): method __init__ (line 140) | def __init__( method _shape (line 169) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 173) | def call( class TFWhisperEncoderLayer (line 293) | class TFWhisperEncoderLayer(tf.keras.layers.Layer): method __init__ (line 294) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 308) | def call( class TFWhisperDecoderLayer (line 349) | class TFWhisperDecoderLayer(tf.keras.layers.Layer): method __init__ (line 350) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 378) | def call( class TFWhisperPreTrainedModel (line 461) | class TFWhisperPreTrainedModel(TFPreTrainedModel): method _get_feat_extract_output_lengths (line 466) | def _get_feat_extract_output_lengths(self, input_lengths: tf.Tensor) -... method dummy_inputs (line 475) | def dummy_inputs(self) -> Dict[str, tf.Tensor]: method input_signature (line 490) | def input_signature(self): class TFWhisperEncoder (line 593) | class TFWhisperEncoder(tf.keras.layers.Layer): method __init__ (line 604) | def __init__(self, config: WhisperConfig, **kwargs): method call (line 629) | def call( class TFWhisperDecoder (line 725) | class TFWhisperDecoder(tf.keras.layers.Layer): method __init__ (line 734) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 758) | def get_input_embeddings(self): method set_input_embeddings (line 761) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 764) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method call (line 785) | def call( class TFWhisperMainLayer (line 969) | class TFWhisperMainLayer(tf.keras.layers.Layer): method __init__ (line 972) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 978) | def get_input_embeddings(self): method set_input_embeddings (line 981) | def set_input_embeddings(self, value): method get_encoder (line 984) | def get_encoder(self): method get_decoder (line 987) | def get_decoder(self): method call (line 993) | def call( class TFWhisperModel (line 1091) | class TFWhisperModel(TFWhisperPreTrainedModel): method __init__ (line 1092) | def __init__(self, config: WhisperConfig, **kwargs): method get_input_embeddings (line 1097) | def get_input_embeddings(self): method set_input_embeddings (line 1100) | def set_input_embeddings(self, value): method get_encoder (line 1103) | def get_encoder(self): method get_decoder (line 1106) | def get_decoder(self): method decoder (line 1109) | def decoder(self): method encoder (line 1112) | def encoder(self): method call (line 1118) | def call( method serving_output (line 1175) | def serving_output(self, output): class TFWhisperForConditionalGeneration (line 1199) | class TFWhisperForConditionalGeneration(TFWhisperPreTrainedModel, TFCaus... method __init__ (line 1210) | def __init__(self, config: WhisperConfig, **kwargs): method get_encoder (line 1214) | def get_encoder(self): method get_decoder (line 1217) | def get_decoder(self): method get_output_embeddings (line 1220) | def get_output_embeddings(self): method set_output_embeddings (line 1223) | def set_output_embeddings(self, value): method resize_token_embeddings (line 1226) | def resize_token_embeddings(self, new_num_tokens: int) -> tf.keras.lay... method call (line 1233) | def call( method serving_output (line 1328) | def serving_output(self, output): method prepare_inputs_for_generation (line 1347) | def prepare_inputs_for_generation( FILE: transformers/models/whisper/modeling_whisper.py function shift_tokens_right (line 60) | def shift_tokens_right(input_ids: torch.Tensor, pad_token_id: int, decod... function _make_causal_mask (line 77) | def _make_causal_mask( function _expand_mask (line 95) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function _compute_mask_indices (line 110) | def _compute_mask_indices( class WhisperPositionalEmbedding (line 229) | class WhisperPositionalEmbedding(nn.Embedding): method __init__ (line 230) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method forward (line 233) | def forward(self, input_ids, past_key_values_length=0): class WhisperAttention (line 237) | class WhisperAttention(nn.Module): method __init__ (line 240) | def __init__( method _shape (line 268) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 272) | def forward( class WhisperEncoderLayer (line 394) | class WhisperEncoderLayer(nn.Module): method __init__ (line 395) | def __init__(self, config: WhisperConfig): method forward (line 411) | def forward( class WhisperDecoderLayer (line 463) | class WhisperDecoderLayer(nn.Module): method __init__ (line 464) | def __init__(self, config: WhisperConfig): method forward (line 490) | def forward( class WhisperPreTrainedModel (line 580) | class WhisperPreTrainedModel(PreTrainedModel): method _init_weights (line 587) | def _init_weights(self, module): method _set_gradient_checkpointing (line 598) | def _set_gradient_checkpointing(self, module, value=False): method _get_feat_extract_output_lengths (line 602) | def _get_feat_extract_output_lengths(self, input_lengths: torch.LongTe... class WhisperEncoder (line 740) | class WhisperEncoder(WhisperPreTrainedModel): method __init__ (line 749) | def __init__(self, config: WhisperConfig): method _freeze_parameters (line 772) | def _freeze_parameters(self): method get_input_embeddings (line 777) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 780) | def set_input_embeddings(self, value: nn.Module): method forward (line 783) | def forward( class WhisperDecoder (line 886) | class WhisperDecoder(WhisperPreTrainedModel): method __init__ (line 894) | def __init__(self, config: WhisperConfig): method get_input_embeddings (line 914) | def get_input_embeddings(self): method set_input_embeddings (line 917) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 920) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 942) | def forward( class WhisperModel (line 1147) | class WhisperModel(WhisperPreTrainedModel): method __init__ (line 1150) | def __init__(self, config: WhisperConfig): method get_input_embeddings (line 1158) | def get_input_embeddings(self): method set_input_embeddings (line 1161) | def set_input_embeddings(self, value): method get_encoder (line 1164) | def get_encoder(self): method get_decoder (line 1167) | def get_decoder(self): method freeze_encoder (line 1170) | def freeze_encoder(self): method _mask_input_features (line 1177) | def _mask_input_features( method forward (line 1222) | def forward( class WhisperForConditionalGeneration (line 1317) | class WhisperForConditionalGeneration(WhisperPreTrainedModel): method __init__ (line 1328) | def __init__(self, config: WhisperConfig): method get_encoder (line 1336) | def get_encoder(self): method get_decoder (line 1339) | def get_decoder(self): method resize_token_embeddings (line 1342) | def resize_token_embeddings(self, new_num_tokens: int) -> nn.Embedding: method get_output_embeddings (line 1346) | def get_output_embeddings(self): method set_output_embeddings (line 1349) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1352) | def get_input_embeddings(self) -> nn.Module: method freeze_encoder (line 1355) | def freeze_encoder(self): method forward (line 1364) | def forward( method generate (line 1460) | def generate( method prepare_inputs_for_generation (line 1673) | def prepare_inputs_for_generation( method _reorder_cache (line 1696) | def _reorder_cache(past_key_values, beam_idx): class WhisperForAudioClassification (line 1710) | class WhisperForAudioClassification(WhisperPreTrainedModel): method __init__ (line 1711) | def __init__(self, config): method freeze_encoder (line 1724) | def freeze_encoder(self): method get_input_embeddings (line 1731) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 1734) | def set_input_embeddings(self, value: nn.Module): method forward (line 1739) | def forward( FILE: transformers/models/whisper/processing_whisper.py class WhisperProcessor (line 23) | class WhisperProcessor(ProcessorMixin): method __init__ (line 40) | def __init__(self, feature_extractor, tokenizer): method get_decoder_prompt_ids (line 45) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method __call__ (line 48) | def __call__(self, *args, **kwargs): method batch_decode (line 82) | def batch_decode(self, *args, **kwargs): method decode (line 89) | def decode(self, *args, **kwargs): method get_prompt_ids (line 96) | def get_prompt_ids(self, text: str, return_tensors="np"): FILE: transformers/models/whisper/tokenization_whisper.py function bytes_to_unicode (line 51) | def bytes_to_unicode(): function get_pairs (line 79) | def get_pairs(word): class WhisperTokenizer (line 214) | class WhisperTokenizer(PreTrainedTokenizer): method __init__ (line 257) | def __init__( method get_vocab (line 313) | def get_vocab(self): method vocab_size (line 319) | def vocab_size(self) -> int: method bpe (line 323) | def bpe(self, token): method set_prefix_tokens (line 365) | def set_prefix_tokens(self, language: str = None, task: str = None, pr... method prefix_tokens (line 390) | def prefix_tokens(self) -> List[int]: method build_inputs_with_special_tokens (line 425) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 433) | def get_special_tokens_mask( method _tokenize (line 464) | def _tokenize(self, text): method _convert_token_to_id (line 475) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 479) | def _convert_id_to_token(self, index): method _normalize (line 486) | def _normalize(self, text): method _decode_with_timestamps (line 494) | def _decode_with_timestamps(self, token_ids, skip_special_tokens=False... method _compute_offsets (line 513) | def _compute_offsets(self, token_ids, time_precision=0.02): method decode (line 557) | def decode( method _decode (line 608) | def _decode( method convert_tokens_to_string (line 647) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 653) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method prepare_for_tokenization (line 692) | def prepare_for_tokenization(self, text, is_split_into_words=False, **... method _build_conversation_input_ids (line 699) | def _build_conversation_input_ids(self, conversation) -> List[int]: method get_decoder_prompt_ids (line 707) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method _decode_asr (line 717) | def _decode_asr(self, model_outputs, *, return_timestamps, return_lang... method get_prompt_ids (line 726) | def get_prompt_ids(self, text: str, return_tensors="np"): method _strip_prompt (line 741) | def _strip_prompt(token_ids: List[int], prompt_token_id: int, decoder_... function _decode_asr (line 752) | def _decode_asr(tokenizer, model_outputs, *, return_timestamps, return_l... function _find_longest_common_sequence (line 941) | def _find_longest_common_sequence(sequences): FILE: transformers/models/whisper/tokenization_whisper_fast.py class WhisperTokenizerFast (line 88) | class WhisperTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 134) | def __init__( method _batch_encode_plus (line 181) | def _batch_encode_plus(self, *args, **kwargs) -> BatchEncoding: method _encode_plus (line 191) | def _encode_plus(self, *args, **kwargs) -> BatchEncoding: method _decode_with_timestamps (line 202) | def _decode_with_timestamps(self, token_ids, skip_special_tokens=False... method _compute_offsets (line 222) | def _compute_offsets(self, token_ids, time_precision=0.02): method decode (line 267) | def decode( method _decode (line 318) | def _decode(self, *args, normalize: bool = False, **kwargs) -> str: method _normalize (line 333) | def _normalize(self, text): method save_vocabulary (line 341) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method set_prefix_tokens (line 356) | def set_prefix_tokens(self, language: str = None, task: str = None, pr... method prefix_tokens (line 396) | def prefix_tokens(self) -> List[int]: method build_inputs_with_special_tokens (line 431) | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=No... method get_special_tokens_mask (line 439) | def get_special_tokens_mask( method _build_conversation_input_ids (line 470) | def _build_conversation_input_ids(self, conversation) -> List[int]: method get_decoder_prompt_ids (line 479) | def get_decoder_prompt_ids(self, task=None, language=None, no_timestam... method _decode_asr (line 489) | def _decode_asr(self, model_outputs, *, return_timestamps, return_lang... method get_prompt_ids (line 499) | def get_prompt_ids(self, text: str, return_tensors="np"): method _strip_prompt (line 515) | def _strip_prompt(token_ids: List[int], prompt_token_id: int, decoder_... FILE: transformers/models/x_clip/configuration_x_clip.py class XCLIPTextConfig (line 32) | class XCLIPTextConfig(PretrainedConfig): method __init__ (line 87) | def __init__( method from_pretrained (line 120) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class XCLIPVisionConfig (line 136) | class XCLIPVisionConfig(PretrainedConfig): method __init__ (line 201) | def __init__( method from_pretrained (line 245) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... class XCLIPConfig (line 261) | class XCLIPConfig(PretrainedConfig): method __init__ (line 300) | def __init__( method from_text_vision_configs (line 406) | def from_text_vision_configs(cls, text_config: XCLIPTextConfig, vision... method to_dict (line 417) | def to_dict(self): FILE: transformers/models/x_clip/convert_x_clip_original_pytorch_to_hf.py function get_xclip_config (line 35) | def get_xclip_config(model_name, num_frames): function rename_key (line 66) | def rename_key(name): function convert_state_dict (line 120) | def convert_state_dict(orig_state_dict, config): function prepare_video (line 202) | def prepare_video(num_frames): function convert_xclip_checkpoint (line 218) | def convert_xclip_checkpoint(model_name, pytorch_dump_folder_path=None, ... FILE: transformers/models/x_clip/modeling_x_clip.py function _expand_mask (line 50) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function contrastive_loss (line 66) | def contrastive_loss(logits: torch.Tensor) -> torch.Tensor: function x_clip_loss (line 71) | def x_clip_loss(similarity: torch.Tensor) -> torch.Tensor: class XCLIPOutput (line 78) | class XCLIPOutput(ModelOutput): method to_tuple (line 111) | def to_tuple(self) -> Tuple[Any]: class XCLIPVisionEmbeddings (line 121) | class XCLIPVisionEmbeddings(nn.Module): method __init__ (line 122) | def __init__(self, config: XCLIPVisionConfig): method forward (line 144) | def forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor: class XCLIPTextEmbeddings (line 156) | class XCLIPTextEmbeddings(nn.Module): method __init__ (line 157) | def __init__(self, config: XCLIPTextConfig): method forward (line 167) | def forward( class XCLIPAttention (line 188) | class XCLIPAttention(nn.Module): method __init__ (line 191) | def __init__(self, config): method _shape (line 210) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 213) | def forward( class XCLIPMLP (line 293) | class XCLIPMLP(nn.Module): method __init__ (line 294) | def __init__(self, config): method forward (line 301) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XCLIPEncoderLayer (line 309) | class XCLIPEncoderLayer(nn.Module): method __init__ (line 310) | def __init__(self, config: XCLIPConfig): method forward (line 318) | def forward( function drop_path (line 360) | def drop_path(input, drop_prob: float = 0.0, training: bool = False): class XCLIPDropPath (line 381) | class XCLIPDropPath(nn.Module): method __init__ (line 384) | def __init__(self, drop_prob: Optional[float] = None) -> None: method forward (line 388) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: method extra_repr (line 391) | def extra_repr(self) -> str: class XCLIPVisionEncoderLayer (line 395) | class XCLIPVisionEncoderLayer(nn.Module): method __init__ (line 400) | def __init__(self, config: XCLIPConfig): method forward (line 416) | def forward( class XCLIPPreTrainedModel (line 475) | class XCLIPPreTrainedModel(PreTrainedModel): method _init_weights (line 486) | def _init_weights(self, module): method _set_gradient_checkpointing (line 535) | def _set_gradient_checkpointing(self, module, value=False): class XCLIPEncoder (line 637) | class XCLIPEncoder(nn.Module): method __init__ (line 646) | def __init__(self, config: XCLIPConfig): method forward (line 652) | def forward( function _make_causal_mask (line 741) | def _make_causal_mask( class XCLIPTextTransformer (line 758) | class XCLIPTextTransformer(nn.Module): method __init__ (line 759) | def __init__(self, config: XCLIPTextConfig): method forward (line 769) | def forward( class XCLIPTextModel (line 831) | class XCLIPTextModel(XCLIPPreTrainedModel): method __init__ (line 834) | def __init__(self, config: XCLIPTextConfig): method get_input_embeddings (line 840) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 843) | def set_input_embeddings(self, value): method forward (line 848) | def forward( class XCLIPVisionEncoder (line 884) | class XCLIPVisionEncoder(nn.Module): method __init__ (line 893) | def __init__(self, config: XCLIPConfig): method forward (line 899) | def forward( class XCLIPVisionTransformer (line 987) | class XCLIPVisionTransformer(nn.Module): method __init__ (line 992) | def __init__(self, config: XCLIPVisionConfig): method forward (line 1004) | def forward( class XCLIPVisionModel (line 1046) | class XCLIPVisionModel(XCLIPPreTrainedModel): method __init__ (line 1050) | def __init__(self, config: XCLIPVisionConfig): method get_input_embeddings (line 1056) | def get_input_embeddings(self) -> nn.Module: method forward (line 1061) | def forward( class XCLIPMultiframeIntegrationTransformer (line 1143) | class XCLIPMultiframeIntegrationTransformer(nn.Module): method __init__ (line 1148) | def __init__(self, config: XCLIPVisionConfig): method forward (line 1154) | def forward( class XCLIPCrossAttention (line 1189) | class XCLIPCrossAttention(nn.Module): method __init__ (line 1192) | def __init__(self, config): method _shape (line 1208) | def _shape(self, tensor: torch.Tensor, seq_len: int, batch_size: int): method forward (line 1211) | def forward(self, queries, keys, values): class PromptGeneratorLayer (line 1241) | class PromptGeneratorLayer(nn.Module): method __init__ (line 1242) | def __init__(self, config): method forward (line 1256) | def forward(self, x, visual): class XCLIPPromptGenerator (line 1262) | class XCLIPPromptGenerator(nn.Module): method __init__ (line 1265) | def __init__(self, config): method forward (line 1272) | def forward(self, text, visual): class XCLIPModel (line 1281) | class XCLIPModel(XCLIPPreTrainedModel): method __init__ (line 1284) | def __init__(self, config: XCLIPConfig): method get_text_features (line 1329) | def get_text_features( method get_video_features (line 1376) | def get_video_features( method forward (line 1483) | def forward( FILE: transformers/models/x_clip/processing_x_clip.py class XCLIPProcessor (line 25) | class XCLIPProcessor(ProcessorMixin): method __init__ (line 42) | def __init__(self, image_processor=None, tokenizer=None, **kwargs): method __call__ (line 60) | def __call__(self, text=None, videos=None, return_tensors=None, **kwar... method batch_decode (line 114) | def batch_decode(self, *args, **kwargs): method decode (line 121) | def decode(self, *args, **kwargs): method model_input_names (line 129) | def model_input_names(self): method feature_extractor_class (line 133) | def feature_extractor_class(self): method feature_extractor (line 141) | def feature_extractor(self): FILE: transformers/models/xglm/configuration_xglm.py class XGLMConfig (line 29) | class XGLMConfig(PretrainedConfig): method __init__ (line 97) | def __init__( FILE: transformers/models/xglm/convert_xglm_original_ckpt_to_trfms.py function remove_ignore_keys_ (line 10) | def remove_ignore_keys_(state_dict): function make_linear_from_emb (line 21) | def make_linear_from_emb(emb): function convert_fairseq_xglm_checkpoint_from_disk (line 28) | def convert_fairseq_xglm_checkpoint_from_disk(checkpoint_path): FILE: transformers/models/xglm/modeling_flax_xglm.py function create_sinusoidal_positions (line 113) | def create_sinusoidal_positions(n_pos, dim, padding_idx=1): class FlaxXGLMAttention (line 127) | class FlaxXGLMAttention(nn.Module): method setup (line 136) | def setup(self) -> None: method _split_heads (line 163) | def _split_heads(self, hidden_states): method _merge_heads (line 166) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 170) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 202) | def __call__( class FlaxXGLMDecoderLayer (line 296) | class FlaxXGLMDecoderLayer(nn.Module): method setup (line 300) | def setup(self) -> None: method __call__ (line 336) | def __call__( class FlaxXGLMDecoderLayerCollection (line 387) | class FlaxXGLMDecoderLayerCollection(nn.Module): method setup (line 391) | def setup(self): method __call__ (line 397) | def __call__( class FlaxXGLMModule (line 456) | class FlaxXGLMModule(nn.Module): method setup (line 460) | def setup(self): method __call__ (line 483) | def __call__( class FlaxXGLMPreTrainedModel (line 540) | class FlaxXGLMPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 545) | def __init__( method init_weights (line 557) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 592) | def init_cache(self, batch_size, max_length): method __call__ (line 612) | def __call__( class FlaxXGLMModel (line 689) | class FlaxXGLMModel(FlaxXGLMPreTrainedModel): class FlaxXGLMForCausalLMModule (line 701) | class FlaxXGLMForCausalLMModule(nn.Module): method setup (line 705) | def setup(self): method __call__ (line 714) | def __call__( class FlaxXGLMForCausalLM (line 766) | class FlaxXGLMForCausalLM(FlaxXGLMPreTrainedModel): method prepare_inputs_for_generation (line 769) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 790) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/xglm/modeling_tf_xglm.py function create_sinusiodal_positions (line 66) | def create_sinusiodal_positions(num_positions: int, embedding_dim: int, ... function _create_position_ids_from_input_ids (line 89) | def _create_position_ids_from_input_ids( function _create_position_ids_from_inputs_embeds (line 102) | def _create_position_ids_from_inputs_embeds( function _make_causal_mask (line 120) | def _make_causal_mask(input_ids_shape: tf.TensorShape, past_key_values_l... function _expand_mask (line 138) | def _expand_mask(mask: tf.Tensor, tgt_len: Optional[int] = None, past_ke... class TFXGLMAttention (line 152) | class TFXGLMAttention(tf.keras.layers.Layer): method __init__ (line 155) | def __init__( method _shape (line 183) | def _shape(self, tensor: tf.Tensor, seq_len: int, bsz: int): method call (line 186) | def call( class TFXGLMDecoderLayer (line 305) | class TFXGLMDecoderLayer(tf.keras.layers.Layer): method __init__ (line 306) | def __init__(self, config: XGLMConfig, **kwargs: Any) -> None: method call (line 338) | def call( class TFXGLMMainLayer (line 420) | class TFXGLMMainLayer(tf.keras.layers.Layer): method __init__ (line 423) | def __init__( method get_input_embeddings (line 452) | def get_input_embeddings(self) -> TFSharedEmbeddings: method set_input_embeddings (line 455) | def set_input_embeddings(self, value: TFSharedEmbeddings) -> None: method _prepare_decoder_attention_mask (line 458) | def _prepare_decoder_attention_mask( method embed_positions (line 480) | def embed_positions(self, position_ids: np.ndarray | tf.Tensor | None ... method call (line 486) | def call( class TFXGLMPreTrainedModel (line 618) | class TFXGLMPreTrainedModel(TFPreTrainedModel): class TFXGLMModel (line 741) | class TFXGLMModel(TFXGLMPreTrainedModel): method __init__ (line 750) | def __init__( method call (line 764) | def call( class TFXGLMForCausalLM (line 808) | class TFXGLMForCausalLM(TFXGLMPreTrainedModel, TFCausalLanguageModelingL... method __init__ (line 818) | def __init__( method get_output_embeddings (line 831) | def get_output_embeddings(self): method set_output_embeddings (line 834) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 837) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 866) | def call( FILE: transformers/models/xglm/modeling_xglm.py function _make_causal_mask (line 132) | def _make_causal_mask( function _expand_mask (line 150) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class XGLMSinusoidalPositionalEmbedding (line 164) | class XGLMSinusoidalPositionalEmbedding(nn.Module): method __init__ (line 167) | def __init__(self, num_positions: int, embedding_dim: int, padding_idx... method make_weights (line 174) | def make_weights(self, num_embeddings: int, embedding_dim: int, paddin... method get_embedding (line 183) | def get_embedding(num_embeddings: int, embedding_dim: int, padding_idx... method forward (line 204) | def forward(self, position_ids: torch.Tensor = None, past_key_values_l... class XGLMAttention (line 216) | class XGLMAttention(nn.Module): method __init__ (line 219) | def __init__( method _shape (line 246) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 249) | def forward( class XGLMDecoderLayer (line 370) | class XGLMDecoderLayer(nn.Module): method __init__ (line 371) | def __init__(self, config: XGLMConfig): method forward (line 400) | def forward( class XGLMPreTrainedModel (line 490) | class XGLMPreTrainedModel(PreTrainedModel): method _init_weights (line 496) | def _init_weights(self, module): method _set_gradient_checkpointing (line 507) | def _set_gradient_checkpointing(self, module, value=False): class XGLMModel (line 516) | class XGLMModel(XGLMPreTrainedModel): method __init__ (line 525) | def __init__(self, config: XGLMConfig, embed_tokens: Optional[nn.Embed... method get_input_embeddings (line 550) | def get_input_embeddings(self): method set_input_embeddings (line 553) | def set_input_embeddings(self, value): method _prepare_decoder_attention_mask (line 556) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 583) | def forward( class XGLMForCausalLM (line 750) | class XGLMForCausalLM(XGLMPreTrainedModel): method __init__ (line 761) | def __init__(self, config): method get_input_embeddings (line 769) | def get_input_embeddings(self): method set_input_embeddings (line 772) | def set_input_embeddings(self, value): method get_output_embeddings (line 775) | def get_output_embeddings(self): method set_output_embeddings (line 778) | def set_output_embeddings(self, new_embeddings): method forward (line 787) | def forward( method prepare_inputs_for_generation (line 859) | def prepare_inputs_for_generation( method _reorder_cache (line 887) | def _reorder_cache(past_key_values, beam_idx): FILE: transformers/models/xglm/tokenization_xglm.py class XGLMTokenizer (line 43) | class XGLMTokenizer(PreTrainedTokenizer): method __init__ (line 117) | def __init__( method __getstate__ (line 173) | def __getstate__(self): method __setstate__ (line 179) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 189) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 214) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 242) | def create_token_type_ids_from_sequences( method vocab_size (line 267) | def vocab_size(self): method get_vocab (line 270) | def get_vocab(self): method _tokenize (line 275) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 278) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 287) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 293) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 298) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/xglm/tokenization_xglm_fast.py class XGLMTokenizerFast (line 49) | class XGLMTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 103) | def __init__( method build_inputs_with_special_tokens (line 139) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 164) | def create_token_type_ids_from_sequences( method save_vocabulary (line 188) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/xlm/configuration_xlm.py class XLMConfig (line 40) | class XLMConfig(PretrainedConfig): method __init__ (line 160) | def __init__( class XLMOnnxConfig (line 237) | class XLMOnnxConfig(OnnxConfig): method inputs (line 239) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/xlm/convert_xlm_original_pytorch_checkpoint_to_pytorch.py function convert_xlm_checkpoint_to_pytorch (line 31) | def convert_xlm_checkpoint_to_pytorch(xlm_checkpoint_path, pytorch_dump_... FILE: transformers/models/xlm/modeling_tf_xlm.py function create_sinusoidal_embeddings (line 83) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 89) | def get_masks(slen, lengths, causal, padding_mask=None): class TFXLMMultiHeadAttention (line 118) | class TFXLMMultiHeadAttention(tf.keras.layers.Layer): method __init__ (line 121) | def __init__(self, n_heads, dim, config, **kwargs): method prune_heads (line 136) | def prune_heads(self, heads): method call (line 139) | def call(self, input, mask, kv, cache, head_mask, output_attentions, t... class TFXLMTransformerFFN (line 210) | class TFXLMTransformerFFN(tf.keras.layers.Layer): method __init__ (line 211) | def __init__(self, in_dim, dim_hidden, out_dim, config, **kwargs): method call (line 219) | def call(self, input, training=False): class TFXLMMainLayer (line 229) | class TFXLMMainLayer(tf.keras.layers.Layer): method __init__ (line 232) | def __init__(self, config, **kwargs): method build (line 319) | def build(self, input_shape): method get_input_embeddings (line 337) | def get_input_embeddings(self): method set_input_embeddings (line 340) | def set_input_embeddings(self, value): method _prune_heads (line 344) | def _prune_heads(self, heads_to_prune): method call (line 352) | def call( class TFXLMPreTrainedModel (line 517) | class TFXLMPreTrainedModel(TFPreTrainedModel): method dummy_inputs (line 527) | def dummy_inputs(self): class TFXLMWithLMHeadModelOutput (line 543) | class TFXLMWithLMHeadModelOutput(ModelOutput): class TFXLMModel (line 689) | class TFXLMModel(TFXLMPreTrainedModel): method __init__ (line 690) | def __init__(self, config, *inputs, **kwargs): method call (line 701) | def call( class TFXLMPredLayer (line 736) | class TFXLMPredLayer(tf.keras.layers.Layer): method __init__ (line 741) | def __init__(self, config, input_embeddings, **kwargs): method build (line 760) | def build(self, input_shape): method get_output_embeddings (line 766) | def get_output_embeddings(self): method set_output_embeddings (line 769) | def set_output_embeddings(self, value): method get_bias (line 773) | def get_bias(self): method set_bias (line 776) | def set_bias(self, value): method call (line 780) | def call(self, hidden_states): class TFXLMWithLMHeadModel (line 794) | class TFXLMWithLMHeadModel(TFXLMPreTrainedModel): method __init__ (line 795) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 802) | def get_lm_head(self): method get_prefix_bias_name (line 805) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 809) | def prepare_inputs_for_generation(self, inputs, **kwargs): method call (line 830) | def call( class TFXLMForSequenceClassification (line 880) | class TFXLMForSequenceClassification(TFXLMPreTrainedModel, TFSequenceCla... method __init__ (line 881) | def __init__(self, config, *inputs, **kwargs): method call (line 895) | def call( class TFXLMForMultipleChoice (line 958) | class TFXLMForMultipleChoice(TFXLMPreTrainedModel, TFMultipleChoiceLoss): method __init__ (line 959) | def __init__(self, config, *inputs, **kwargs): method dummy_inputs (line 969) | def dummy_inputs(self): method call (line 994) | def call( class TFXLMForTokenClassification (line 1077) | class TFXLMForTokenClassification(TFXLMPreTrainedModel, TFTokenClassific... method __init__ (line 1078) | def __init__(self, config, *inputs, **kwargs): method call (line 1095) | def call( class TFXLMForQuestionAnsweringSimple (line 1157) | class TFXLMForQuestionAnsweringSimple(TFXLMPreTrainedModel, TFQuestionAn... method __init__ (line 1158) | def __init__(self, config, *inputs, **kwargs): method call (line 1172) | def call( FILE: transformers/models/xlm/modeling_xlm.py function create_sinusoidal_embeddings (line 71) | def create_sinusoidal_embeddings(n_pos, dim, out): function get_masks (line 79) | def get_masks(slen, lengths, causal, padding_mask=None): class MultiHeadAttention (line 104) | class MultiHeadAttention(nn.Module): method __init__ (line 107) | def __init__(self, n_heads, dim, config): method prune_heads (line 121) | def prune_heads(self, heads): method forward (line 136) | def forward(self, input, mask, kv=None, cache=None, head_mask=None, ou... class TransformerFFN (line 200) | class TransformerFFN(nn.Module): method __init__ (line 201) | def __init__(self, in_dim, dim_hidden, out_dim, config): method forward (line 210) | def forward(self, input): method ff_chunk (line 213) | def ff_chunk(self, input): class XLMPreTrainedModel (line 221) | class XLMPreTrainedModel(PreTrainedModel): method __init__ (line 231) | def __init__(self, *inputs, **kwargs): method dummy_inputs (line 235) | def dummy_inputs(self): method _init_weights (line 244) | def _init_weights(self, module): class XLMForQuestionAnsweringOutput (line 262) | class XLMForQuestionAnsweringOutput(ModelOutput): class XLMModel (line 393) | class XLMModel(XLMPreTrainedModel): method __init__ (line 396) | def __init__(self, config): method get_input_embeddings (line 466) | def get_input_embeddings(self): method set_input_embeddings (line 469) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 472) | def _prune_heads(self, heads_to_prune): method forward (line 486) | def forward( class XLMPredLayer (line 623) | class XLMPredLayer(nn.Module): method __init__ (line 628) | def __init__(self, config): method forward (line 646) | def forward(self, x, y=None): class XLMWithLMHeadModel (line 672) | class XLMWithLMHeadModel(XLMPreTrainedModel): method __init__ (line 675) | def __init__(self, config): method get_output_embeddings (line 683) | def get_output_embeddings(self): method set_output_embeddings (line 686) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 689) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method forward (line 709) | def forward( class XLMForSequenceClassification (line 769) | class XLMForSequenceClassification(XLMPreTrainedModel): method __init__ (line 770) | def __init__(self, config): method forward (line 787) | def forward( class XLMForQuestionAnsweringSimple (line 871) | class XLMForQuestionAnsweringSimple(XLMPreTrainedModel): method __init__ (line 872) | def __init__(self, config): method forward (line 887) | def forward( class XLMForQuestionAnswering (line 975) | class XLMForQuestionAnswering(XLMPreTrainedModel): method __init__ (line 976) | def __init__(self, config): method forward (line 987) | def forward( class XLMForTokenClassification (line 1096) | class XLMForTokenClassification(XLMPreTrainedModel): method __init__ (line 1097) | def __init__(self, config): method forward (line 1114) | def forward( class XLMForMultipleChoice (line 1180) | class XLMForMultipleChoice(XLMPreTrainedModel): method __init__ (line 1181) | def __init__(self, config, *inputs, **kwargs): method forward (line 1197) | def forward( FILE: transformers/models/xlm/tokenization_xlm.py function get_pairs (line 428) | def get_pairs(word): function lowercase_and_remove_accent (line 441) | def lowercase_and_remove_accent(text): function replace_unicode_punct (line 458) | def replace_unicode_punct(text): function remove_non_printing_char (line 501) | def remove_non_printing_char(text): function romanian_preprocessing (line 514) | def romanian_preprocessing(text): class XLMTokenizer (line 528) | class XLMTokenizer(PreTrainedTokenizer): method __init__ (line 589) | def __init__( method do_lower_case (line 665) | def do_lower_case(self): method moses_punct_norm (line 668) | def moses_punct_norm(self, text, lang): method moses_tokenize (line 676) | def moses_tokenize(self, text, lang): method moses_pipeline (line 684) | def moses_pipeline(self, text, lang): method ja_tokenize (line 690) | def ja_tokenize(self, text): method vocab_size (line 712) | def vocab_size(self): method get_vocab (line 715) | def get_vocab(self): method bpe (line 718) | def bpe(self, token): method _tokenize (line 762) | def _tokenize(self, text, lang="en", bypass_tokenizer=False): method _convert_token_to_id (line 858) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 862) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 866) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 871) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 898) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 926) | def create_token_type_ids_from_sequences( method save_vocabulary (line 955) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method __getstate__ (line 983) | def __getstate__(self): method __setstate__ (line 988) | def __setstate__(self, d): FILE: transformers/models/xlm_prophetnet/configuration_xlm_prophetnet.py class XLMProphetNetConfig (line 33) | class XLMProphetNetConfig(PretrainedConfig): method __init__ (line 109) | def __init__( method num_hidden_layers (line 176) | def num_hidden_layers(self) -> int: method num_hidden_layers (line 180) | def num_hidden_layers(self, value): FILE: transformers/models/xlm_prophetnet/modeling_xlm_prophetnet.py function softmax (line 183) | def softmax(hidden_state, dim, onnx_trace=False): function ngram_attention_bias (line 191) | def ngram_attention_bias(sequence_length, ngram, device, dtype): function compute_relative_buckets (line 209) | def compute_relative_buckets(num_buckets, max_distance, relative_positio... function compute_all_stream_relative_buckets (line 237) | def compute_all_stream_relative_buckets(num_buckets, max_distance, posit... class XLMProphetNetSeq2SeqLMOutput (line 262) | class XLMProphetNetSeq2SeqLMOutput(ModelOutput): method decoder_cross_attentions (line 337) | def decoder_cross_attentions(self): class XLMProphetNetSeq2SeqModelOutput (line 348) | class XLMProphetNetSeq2SeqModelOutput(ModelOutput): method decoder_cross_attentions (line 424) | def decoder_cross_attentions(self): class XLMProphetNetDecoderModelOutput (line 435) | class XLMProphetNetDecoderModelOutput(ModelOutput): class XLMProphetNetDecoderLMOutput (line 496) | class XLMProphetNetDecoderLMOutput(ModelOutput): class XLMProphetNetPreTrainedModel (line 558) | class XLMProphetNetPreTrainedModel(PreTrainedModel): method _init_weights (line 563) | def _init_weights(self, module): method _set_gradient_checkpointing (line 573) | def _set_gradient_checkpointing(self, module, value=False): method _shift_right (line 577) | def _shift_right(self, input_ids): class XLMProphetNetPositionalEmbeddings (line 601) | class XLMProphetNetPositionalEmbeddings(nn.Embedding): method __init__ (line 608) | def __init__(self, config: XLMProphetNetConfig) -> None: method forward (line 612) | def forward(self, inputs_shape, device, attention_mask=None, past_key_... method _forward (line 640) | def _forward(self, position_ids): class XLMProphetNetAttention (line 645) | class XLMProphetNetAttention(nn.Module): method __init__ (line 648) | def __init__( method _shape (line 672) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 675) | def forward( class XLMProphetNetFeedForward (line 775) | class XLMProphetNetFeedForward(nn.Module): method __init__ (line 780) | def __init__(self, config: XLMProphetNetConfig, ffn_dim: int): method forward (line 788) | def forward(self, hidden_states): class XLMProphetNetNgramSelfAttention (line 799) | class XLMProphetNetNgramSelfAttention(nn.Module): method __init__ (line 800) | def __init__(self, config: XLMProphetNetConfig): method _shape (line 829) | def _shape(self, tensor, seq_len, batch_size): method prepare_for_onnx_export_ (line 832) | def prepare_for_onnx_export_(self): method forward (line 835) | def forward( method get_main_relative_pos_embeddings (line 1013) | def get_main_relative_pos_embeddings( method get_predict_relative_pos_embeddings (line 1058) | def get_predict_relative_pos_embeddings( class XLMProphetNetEncoderLayer (line 1119) | class XLMProphetNetEncoderLayer(nn.Module): method __init__ (line 1124) | def __init__(self, config: XLMProphetNetConfig): method forward (line 1134) | def forward( class XLMProphetNetDecoderLayer (line 1163) | class XLMProphetNetDecoderLayer(nn.Module): method __init__ (line 1168) | def __init__(self, config: XLMProphetNetConfig): method forward (line 1183) | def forward( class XLMProphetNetEncoder (line 1252) | class XLMProphetNetEncoder(XLMProphetNetPreTrainedModel): method __init__ (line 1259) | def __init__(self, config: XLMProphetNetConfig, word_embeddings: nn.Em... method get_input_embeddings (line 1276) | def get_input_embeddings(self): method set_input_embeddings (line 1279) | def set_input_embeddings(self, value): method forward (line 1284) | def forward( class XLMProphetNetDecoder (line 1393) | class XLMProphetNetDecoder(XLMProphetNetPreTrainedModel): method __init__ (line 1400) | def __init__(self, config: XLMProphetNetConfig, word_embeddings: Optio... method get_input_embeddings (line 1424) | def get_input_embeddings(self): method set_input_embeddings (line 1427) | def set_input_embeddings(self, value): method forward (line 1432) | def forward( method compute_buffered_relative_buckets (line 1683) | def compute_buffered_relative_buckets(self, position_ids): method prepare_attention_mask (line 1705) | def prepare_attention_mask(self, hidden_states, attention_mask): method prepare_predict_attention_mask (line 1729) | def prepare_predict_attention_mask(self, hidden_states, attention_mask): class XLMProphetNetModel (line 1770) | class XLMProphetNetModel(XLMProphetNetPreTrainedModel): method __init__ (line 1773) | def __init__(self, config: XLMProphetNetConfig): method get_input_embeddings (line 1790) | def get_input_embeddings(self): method set_input_embeddings (line 1793) | def set_input_embeddings(self, value): method get_encoder (line 1798) | def get_encoder(self): method get_decoder (line 1801) | def get_decoder(self): method forward (line 1806) | def forward( class XLMProphetNetForConditionalGeneration (line 1900) | class XLMProphetNetForConditionalGeneration(XLMProphetNetPreTrainedModel): method __init__ (line 1907) | def __init__(self, config: XLMProphetNetConfig): method get_output_embeddings (line 1918) | def get_output_embeddings(self): method set_output_embeddings (line 1921) | def set_output_embeddings(self, new_embeddings): method get_input_embeddings (line 1924) | def get_input_embeddings(self): method forward (line 1929) | def forward( method _compute_loss (line 2035) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2063) | def prepare_inputs_for_generation( method prepare_decoder_input_ids_from_labels (line 2092) | def prepare_decoder_input_ids_from_labels(self, labels: torch.Tensor): method _reorder_cache (line 2097) | def _reorder_cache(past_key_values, beam_idx): method get_encoder (line 2106) | def get_encoder(self): method get_decoder (line 2109) | def get_decoder(self): class XLMProphetNetForCausalLM (line 2119) | class XLMProphetNetForCausalLM(XLMProphetNetPreTrainedModel): method __init__ (line 2122) | def __init__(self, config: XLMProphetNetConfig): method get_input_embeddings (line 2138) | def get_input_embeddings(self): method set_input_embeddings (line 2141) | def set_input_embeddings(self, value): method get_output_embeddings (line 2144) | def get_output_embeddings(self): method set_output_embeddings (line 2147) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 2150) | def set_decoder(self, decoder): method get_decoder (line 2153) | def get_decoder(self): method forward (line 2158) | def forward( method _compute_loss (line 2290) | def _compute_loss(self, logits, labels, ignore_index=-100): method prepare_inputs_for_generation (line 2318) | def prepare_inputs_for_generation( method _reorder_cache (line 2344) | def _reorder_cache(past_key_values, beam_idx): class XLMProphetNetDecoderWrapper (line 2352) | class XLMProphetNetDecoderWrapper(XLMProphetNetPreTrainedModel): method __init__ (line 2358) | def __init__(self, config: XLMProphetNetConfig): method forward (line 2362) | def forward(self, *args, **kwargs): FILE: transformers/models/xlm_prophetnet/tokenization_xlm_prophetnet.py function load_vocab (line 48) | def load_vocab(vocab_file): class XLMProphetNetTokenizer (line 59) | class XLMProphetNetTokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method __getstate__ (line 192) | def __getstate__(self): method __setstate__ (line 197) | def __setstate__(self, d): method get_special_tokens_mask (line 215) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 243) | def create_token_type_ids_from_sequences( method vocab_size (line 268) | def vocab_size(self): method get_vocab (line 271) | def get_vocab(self): method _tokenize (line 276) | def _tokenize(self, text: str) -> str: method _convert_token_to_id (line 279) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 288) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 294) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 299) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method build_inputs_with_special_tokens (line 316) | def build_inputs_with_special_tokens( FILE: transformers/models/xlm_roberta/configuration_xlm_roberta.py class XLMRobertaConfig (line 45) | class XLMRobertaConfig(PretrainedConfig): method __init__ (line 115) | def __init__( class XLMRobertaOnnxConfig (line 157) | class XLMRobertaOnnxConfig(OnnxConfig): method inputs (line 159) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py function create_position_ids_from_input_ids (line 62) | def create_position_ids_from_input_ids(input_ids, padding_idx): class FlaxXLMRobertaEmbeddings (line 147) | class FlaxXLMRobertaEmbeddings(nn.Module): method setup (line 153) | def setup(self): method __call__ (line 175) | def __call__(self, input_ids, token_type_ids, position_ids, attention_... class FlaxXLMRobertaSelfAttention (line 191) | class FlaxXLMRobertaSelfAttention(nn.Module): method setup (line 196) | def setup(self): method _split_heads (line 225) | def _split_heads(self, hidden_states): method _merge_heads (line 228) | def _merge_heads(self, hidden_states): method _concatenate_to_cache (line 233) | def _concatenate_to_cache(self, key, value, query, attention_mask): method __call__ (line 264) | def __call__( class FlaxXLMRobertaSelfOutput (line 363) | class FlaxXLMRobertaSelfOutput(nn.Module): method setup (line 367) | def setup(self): method __call__ (line 376) | def __call__(self, hidden_states, input_tensor, deterministic: bool = ... class FlaxXLMRobertaAttention (line 384) | class FlaxXLMRobertaAttention(nn.Module): method setup (line 389) | def setup(self): method __call__ (line 393) | def __call__( class FlaxXLMRobertaIntermediate (line 427) | class FlaxXLMRobertaIntermediate(nn.Module): method setup (line 431) | def setup(self): method __call__ (line 439) | def __call__(self, hidden_states): class FlaxXLMRobertaOutput (line 446) | class FlaxXLMRobertaOutput(nn.Module): method setup (line 450) | def setup(self): method __call__ (line 459) | def __call__(self, hidden_states, attention_output, deterministic: boo... class FlaxXLMRobertaLayer (line 467) | class FlaxXLMRobertaLayer(nn.Module): method setup (line 471) | def setup(self): method __call__ (line 478) | def __call__( class FlaxXLMRobertaLayerCollection (line 525) | class FlaxXLMRobertaLayerCollection(nn.Module): method setup (line 530) | def setup(self): method __call__ (line 543) | def __call__( class FlaxXLMRobertaEncoder (line 608) | class FlaxXLMRobertaEncoder(nn.Module): method setup (line 613) | def setup(self): method __call__ (line 620) | def __call__( class FlaxXLMRobertaPooler (line 648) | class FlaxXLMRobertaPooler(nn.Module): method setup (line 652) | def setup(self): method __call__ (line 659) | def __call__(self, hidden_states): class FlaxXLMRobertaLMHead (line 666) | class FlaxXLMRobertaLMHead(nn.Module): method setup (line 671) | def setup(self): method __call__ (line 686) | def __call__(self, hidden_states, shared_embedding=None): class FlaxXLMRobertaClassificationHead (line 702) | class FlaxXLMRobertaClassificationHead(nn.Module): method setup (line 706) | def setup(self): method __call__ (line 724) | def __call__(self, hidden_states, deterministic=True): class FlaxXLMRobertaPreTrainedModel (line 735) | class FlaxXLMRobertaPreTrainedModel(FlaxPreTrainedModel): method __init__ (line 746) | def __init__( method enable_gradient_checkpointing (line 760) | def enable_gradient_checkpointing(self): method init_weights (line 767) | def init_weights(self, rng: jax.random.PRNGKey, input_shape: Tuple, pa... method init_cache (line 810) | def init_cache(self, batch_size, max_length): method __call__ (line 830) | def __call__( class FlaxXLMRobertaModule (line 928) | class FlaxXLMRobertaModule(nn.Module): method setup (line 934) | def setup(self): method __call__ (line 943) | def __call__( class FlaxXLMRobertaModel (line 1003) | class FlaxXLMRobertaModel(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForMaskedLMModule (line 1011) | class FlaxXLMRobertaForMaskedLMModule(nn.Module): method setup (line 1016) | def setup(self): method __call__ (line 1025) | def __call__( class FlaxXLMRobertaForMaskedLM (line 1070) | class FlaxXLMRobertaForMaskedLM(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForSequenceClassificationModule (line 1084) | class FlaxXLMRobertaForSequenceClassificationModule(nn.Module): method setup (line 1089) | def setup(self): method __call__ (line 1098) | def __call__( class FlaxXLMRobertaForSequenceClassification (line 1143) | class FlaxXLMRobertaForSequenceClassification(FlaxXLMRobertaPreTrainedMo... class FlaxXLMRobertaForMultipleChoiceModule (line 1156) | class FlaxXLMRobertaForMultipleChoiceModule(nn.Module): method setup (line 1161) | def setup(self): method __call__ (line 1170) | def __call__( class FlaxXLMRobertaForMultipleChoice (line 1224) | class FlaxXLMRobertaForMultipleChoice(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForTokenClassificationModule (line 1240) | class FlaxXLMRobertaForTokenClassificationModule(nn.Module): method setup (line 1245) | def setup(self): method __call__ (line 1260) | def __call__( class FlaxXLMRobertaForTokenClassification (line 1306) | class FlaxXLMRobertaForTokenClassification(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForQuestionAnsweringModule (line 1319) | class FlaxXLMRobertaForQuestionAnsweringModule(nn.Module): method setup (line 1324) | def setup(self): method __call__ (line 1333) | def __call__( class FlaxXLMRobertaForQuestionAnswering (line 1383) | class FlaxXLMRobertaForQuestionAnswering(FlaxXLMRobertaPreTrainedModel): class FlaxXLMRobertaForCausalLMModule (line 1396) | class FlaxXLMRobertaForCausalLMModule(nn.Module): method setup (line 1401) | def setup(self): method __call__ (line 1410) | def __call__( class FlaxXLMRobertaForCausalLM (line 1469) | class FlaxXLMRobertaForCausalLM(FlaxXLMRobertaPreTrainedModel): method prepare_inputs_for_generation (line 1472) | def prepare_inputs_for_generation(self, input_ids, max_length, attenti... method update_inputs_for_generation (line 1493) | def update_inputs_for_generation(self, model_outputs, model_kwargs): FILE: transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py class TFXLMRobertaEmbeddings (line 165) | class TFXLMRobertaEmbeddings(tf.keras.layers.Layer): method __init__ (line 170) | def __init__(self, config, **kwargs): method build (line 181) | def build(self, input_shape: tf.TensorShape): method create_position_ids_from_input_ids (line 205) | def create_position_ids_from_input_ids(self, input_ids, past_key_value... method call (line 219) | def call( class TFXLMRobertaPooler (line 266) | class TFXLMRobertaPooler(tf.keras.layers.Layer): method __init__ (line 267) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 277) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFXLMRobertaSelfAttention (line 287) | class TFXLMRobertaSelfAttention(tf.keras.layers.Layer): method __init__ (line 288) | def __init__(self, config: XLMRobertaConfig, **kwargs): method transpose_for_scores (line 315) | def transpose_for_scores(self, tensor: tf.Tensor, batch_size: int) -> ... method call (line 322) | def call( class TFXLMRobertaSelfOutput (line 405) | class TFXLMRobertaSelfOutput(tf.keras.layers.Layer): method __init__ (line 406) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 415) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFXLMRobertaAttention (line 424) | class TFXLMRobertaAttention(tf.keras.layers.Layer): method __init__ (line 425) | def __init__(self, config: XLMRobertaConfig, **kwargs): method prune_heads (line 431) | def prune_heads(self, heads): method call (line 434) | def call( class TFXLMRobertaIntermediate (line 465) | class TFXLMRobertaIntermediate(tf.keras.layers.Layer): method __init__ (line 466) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 478) | def call(self, hidden_states: tf.Tensor) -> tf.Tensor: class TFXLMRobertaOutput (line 486) | class TFXLMRobertaOutput(tf.keras.layers.Layer): method __init__ (line 487) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 496) | def call(self, hidden_states: tf.Tensor, input_tensor: tf.Tensor, trai... class TFXLMRobertaLayer (line 505) | class TFXLMRobertaLayer(tf.keras.layers.Layer): method __init__ (line 506) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 519) | def call( class TFXLMRobertaEncoder (line 592) | class TFXLMRobertaEncoder(tf.keras.layers.Layer): method __init__ (line 593) | def __init__(self, config: XLMRobertaConfig, **kwargs): method call (line 598) | def call( class TFXLMRobertaMainLayer (line 663) | class TFXLMRobertaMainLayer(tf.keras.layers.Layer): method __init__ (line 666) | def __init__(self, config, add_pooling_layer=True, **kwargs): method get_input_embeddings (line 683) | def get_input_embeddings(self) -> tf.keras.layers.Layer: method set_input_embeddings (line 687) | def set_input_embeddings(self, value: tf.Variable): method _prune_heads (line 692) | def _prune_heads(self, heads_to_prune): method call (line 701) | def call( class TFXLMRobertaPreTrainedModel (line 860) | class TFXLMRobertaPreTrainedModel(TFPreTrainedModel): class TFXLMRobertaModel (line 875) | class TFXLMRobertaModel(TFXLMRobertaPreTrainedModel): method __init__ (line 876) | def __init__(self, config, *inputs, **kwargs): method call (line 887) | def call( class TFXLMRobertaLMHead (line 945) | class TFXLMRobertaLMHead(tf.keras.layers.Layer): method __init__ (line 948) | def __init__(self, config, input_embeddings, **kwargs): method build (line 963) | def build(self, input_shape): method get_output_embeddings (line 968) | def get_output_embeddings(self): method set_output_embeddings (line 971) | def set_output_embeddings(self, value): method get_bias (line 975) | def get_bias(self): method set_bias (line 978) | def set_bias(self, value): method call (line 982) | def call(self, hidden_states): class TFXLMRobertaForMaskedLM (line 999) | class TFXLMRobertaForMaskedLM(TFXLMRobertaPreTrainedModel, TFMaskedLangu... method __init__ (line 1003) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1009) | def get_lm_head(self): method get_prefix_bias_name (line 1012) | def get_prefix_bias_name(self): method call (line 1026) | def call( class TFXLMRobertaForCausalLM (line 1081) | class TFXLMRobertaForCausalLM(TFXLMRobertaPreTrainedModel, TFCausalLangu... method __init__ (line 1085) | def __init__(self, config: XLMRobertaConfig, *inputs, **kwargs): method get_lm_head (line 1094) | def get_lm_head(self): method get_prefix_bias_name (line 1097) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1102) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method call (line 1121) | def call( class TFXLMRobertaClassificationHead (line 1204) | class TFXLMRobertaClassificationHead(tf.keras.layers.Layer): method __init__ (line 1207) | def __init__(self, config, **kwargs): method call (line 1223) | def call(self, features, training=False): class TFXLMRobertaForSequenceClassification (line 1240) | class TFXLMRobertaForSequenceClassification(TFXLMRobertaPreTrainedModel,... method __init__ (line 1244) | def __init__(self, config, *inputs, **kwargs): method call (line 1260) | def call( class TFXLMRobertaForMultipleChoice (line 1317) | class TFXLMRobertaForMultipleChoice(TFXLMRobertaPreTrainedModel, TFMulti... method __init__ (line 1322) | def __init__(self, config, *inputs, **kwargs): method call (line 1340) | def call( class TFXLMRobertaForTokenClassification (line 1410) | class TFXLMRobertaForTokenClassification(TFXLMRobertaPreTrainedModel, TF... method __init__ (line 1415) | def __init__(self, config, *inputs, **kwargs): method call (line 1437) | def call( class TFXLMRobertaForQuestionAnswering (line 1494) | class TFXLMRobertaForQuestionAnswering(TFXLMRobertaPreTrainedModel, TFQu... method __init__ (line 1498) | def __init__(self, config, *inputs, **kwargs): method call (line 1516) | def call( FILE: transformers/models/xlm_roberta/modeling_xlm_roberta.py class XLMRobertaEmbeddings (line 66) | class XLMRobertaEmbeddings(nn.Module): method __init__ (line 72) | def __init__(self, config): method forward (line 95) | def forward( method create_position_ids_from_inputs_embeds (line 135) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XLMRobertaSelfAttention (line 154) | class XLMRobertaSelfAttention(nn.Module): method __init__ (line 155) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 181) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 186) | def forward( class XLMRobertaSelfOutput (line 289) | class XLMRobertaSelfOutput(nn.Module): method __init__ (line 290) | def __init__(self, config): method forward (line 296) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XLMRobertaAttention (line 304) | class XLMRobertaAttention(nn.Module): method __init__ (line 305) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 311) | def prune_heads(self, heads): method forward (line 329) | def forward( class XLMRobertaIntermediate (line 354) | class XLMRobertaIntermediate(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 363) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaOutput (line 370) | class XLMRobertaOutput(nn.Module): method __init__ (line 371) | def __init__(self, config): method forward (line 377) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XLMRobertaLayer (line 385) | class XLMRobertaLayer(nn.Module): method __init__ (line 386) | def __init__(self, config): method forward (line 400) | def forward( method feed_forward_chunk (line 465) | def feed_forward_chunk(self, attention_output): class XLMRobertaEncoder (line 472) | class XLMRobertaEncoder(nn.Module): method __init__ (line 473) | def __init__(self, config): method forward (line 479) | def forward( class XLMRobertaPooler (line 571) | class XLMRobertaPooler(nn.Module): method __init__ (line 572) | def __init__(self, config): method forward (line 577) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaPreTrainedModel (line 587) | class XLMRobertaPreTrainedModel(PreTrainedModel): method _init_weights (line 599) | def _init_weights(self, module): method _set_gradient_checkpointing (line 615) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 619) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class XLMRobertaModel (line 700) | class XLMRobertaModel(XLMRobertaPreTrainedModel): method __init__ (line 719) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 731) | def get_input_embeddings(self): method set_input_embeddings (line 734) | def set_input_embeddings(self, value): method _prune_heads (line 737) | def _prune_heads(self, heads_to_prune): method forward (line 752) | def forward( class XLMRobertaForCausalLM (line 887) | class XLMRobertaForCausalLM(XLMRobertaPreTrainedModel): method __init__ (line 892) | def __init__(self, config): method get_output_embeddings (line 907) | def get_output_embeddings(self): method set_output_embeddings (line 910) | def set_output_embeddings(self, new_embeddings): method forward (line 915) | def forward( method prepare_inputs_for_generation (line 1021) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1033) | def _reorder_cache(self, past_key_values, beam_idx): class XLMRobertaForMaskedLM (line 1045) | class XLMRobertaForMaskedLM(XLMRobertaPreTrainedModel): method __init__ (line 1050) | def __init__(self, config): method get_output_embeddings (line 1068) | def get_output_embeddings(self): method set_output_embeddings (line 1071) | def set_output_embeddings(self, new_embeddings): method forward (line 1083) | def forward( class XLMRobertaLMHead (line 1144) | class XLMRobertaLMHead(nn.Module): method __init__ (line 1147) | def __init__(self, config): method forward (line 1156) | def forward(self, features, **kwargs): method _tie_weights (line 1166) | def _tie_weights(self): class XLMRobertaForSequenceClassification (line 1183) | class XLMRobertaForSequenceClassification(XLMRobertaPreTrainedModel): method __init__ (line 1186) | def __init__(self, config): method forward (line 1205) | def forward( class XLMRobertaForMultipleChoice (line 1285) | class XLMRobertaForMultipleChoice(XLMRobertaPreTrainedModel): method __init__ (line 1288) | def __init__(self, config): method forward (line 1306) | def forward( class XLMRobertaForTokenClassification (line 1382) | class XLMRobertaForTokenClassification(XLMRobertaPreTrainedModel): method __init__ (line 1386) | def __init__(self, config): method forward (line 1408) | def forward( class XLMRobertaClassificationHead (line 1464) | class XLMRobertaClassificationHead(nn.Module): method __init__ (line 1467) | def __init__(self, config): method forward (line 1476) | def forward(self, features, **kwargs): class XLMRobertaForQuestionAnswering (line 1494) | class XLMRobertaForQuestionAnswering(XLMRobertaPreTrainedModel): method __init__ (line 1498) | def __init__(self, config): method forward (line 1516) | def forward( function create_position_ids_from_input_ids (line 1592) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/xlm_roberta/tokenization_xlm_roberta.py class XLMRobertaTokenizer (line 63) | class XLMRobertaTokenizer(PreTrainedTokenizer): method __init__ (line 137) | def __init__( method __getstate__ (line 186) | def __getstate__(self): method __setstate__ (line 192) | def __setstate__(self, d): method build_inputs_with_special_tokens (line 202) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 228) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 256) | def create_token_type_ids_from_sequences( method vocab_size (line 282) | def vocab_size(self): method get_vocab (line 285) | def get_vocab(self): method _tokenize (line 290) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 293) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 302) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 308) | def convert_tokens_to_string(self, tokens): method save_vocabulary (line 313) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/xlm_roberta/tokenization_xlm_roberta_fast.py class XLMRobertaTokenizerFast (line 82) | class XLMRobertaTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 139) | def __init__( method build_inputs_with_special_tokens (line 171) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 197) | def create_token_type_ids_from_sequences( method save_vocabulary (line 222) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/xlm_roberta_xl/configuration_xlm_roberta_xl.py class XLMRobertaXLConfig (line 34) | class XLMRobertaXLConfig(PretrainedConfig): method __init__ (line 102) | def __init__( class XLMRobertaXLOnnxConfig (line 143) | class XLMRobertaXLOnnxConfig(OnnxConfig): method inputs (line 145) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/xlm_roberta_xl/convert_xlm_roberta_xl_original_pytorch_checkpoint_to_pytorch.py function convert_xlm_roberta_xl_checkpoint_to_pytorch (line 47) | def convert_xlm_roberta_xl_checkpoint_to_pytorch( FILE: transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py class XLMRobertaXLEmbeddings (line 60) | class XLMRobertaXLEmbeddings(nn.Module): method __init__ (line 65) | def __init__(self, config): method forward (line 87) | def forward( method create_position_ids_from_inputs_embeds (line 128) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XLMRobertaXLSelfAttention (line 147) | class XLMRobertaXLSelfAttention(nn.Module): method __init__ (line 148) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 174) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 179) | def forward( class XLMRobertaXLSelfOutput (line 281) | class XLMRobertaXLSelfOutput(nn.Module): method __init__ (line 282) | def __init__(self, config): method forward (line 287) | def forward(self, hidden_states, input_tensor): class XLMRobertaXLAttention (line 294) | class XLMRobertaXLAttention(nn.Module): method __init__ (line 295) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 302) | def prune_heads(self, heads): method forward (line 320) | def forward( class XLMRobertaXLIntermediate (line 346) | class XLMRobertaXLIntermediate(nn.Module): method __init__ (line 347) | def __init__(self, config): method forward (line 355) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaXLOutput (line 361) | class XLMRobertaXLOutput(nn.Module): method __init__ (line 362) | def __init__(self, config): method forward (line 366) | def forward(self, hidden_states, input_tensor): class XLMRobertaXLLayer (line 372) | class XLMRobertaXLLayer(nn.Module): method __init__ (line 373) | def __init__(self, config): method forward (line 388) | def forward( method feed_forward_chunk (line 453) | def feed_forward_chunk(self, attention_output): class XLMRobertaXLEncoder (line 460) | class XLMRobertaXLEncoder(nn.Module): method __init__ (line 461) | def __init__(self, config): method forward (line 468) | def forward( class XLMRobertaXLPooler (line 561) | class XLMRobertaXLPooler(nn.Module): method __init__ (line 562) | def __init__(self, config): method forward (line 567) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XLMRobertaXLPreTrainedModel (line 576) | class XLMRobertaXLPreTrainedModel(PreTrainedModel): method _init_weights (line 586) | def _init_weights(self, module): method update_keys_to_ignore (line 602) | def update_keys_to_ignore(self, config, del_keys_to_ignore): class XLMRobertaXLModel (line 671) | class XLMRobertaXLModel(XLMRobertaXLPreTrainedModel): method __init__ (line 685) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 697) | def get_input_embeddings(self): method set_input_embeddings (line 700) | def set_input_embeddings(self, value): method _prune_heads (line 703) | def _prune_heads(self, heads_to_prune): method forward (line 718) | def forward( class XLMRobertaXLForCausalLM (line 852) | class XLMRobertaXLForCausalLM(XLMRobertaXLPreTrainedModel): method __init__ (line 857) | def __init__(self, config): method get_output_embeddings (line 871) | def get_output_embeddings(self): method set_output_embeddings (line 874) | def set_output_embeddings(self, new_embeddings): method forward (line 879) | def forward( method prepare_inputs_for_generation (line 980) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 992) | def _reorder_cache(self, past_key_values, beam_idx): class XLMRobertaXLForMaskedLM (line 1002) | class XLMRobertaXLForMaskedLM(XLMRobertaXLPreTrainedModel): method __init__ (line 1007) | def __init__(self, config): method get_output_embeddings (line 1024) | def get_output_embeddings(self): method set_output_embeddings (line 1027) | def set_output_embeddings(self, new_embeddings): method forward (line 1037) | def forward( class XLMRobertaXLLMHead (line 1095) | class XLMRobertaXLLMHead(nn.Module): method __init__ (line 1098) | def __init__(self, config): method forward (line 1107) | def forward(self, features, **kwargs): method _tie_weights (line 1117) | def _tie_weights(self): class XLMRobertaXLForSequenceClassification (line 1129) | class XLMRobertaXLForSequenceClassification(XLMRobertaXLPreTrainedModel): method __init__ (line 1132) | def __init__(self, config): method forward (line 1148) | def forward( class XLMRobertaXLForMultipleChoice (line 1225) | class XLMRobertaXLForMultipleChoice(XLMRobertaXLPreTrainedModel): method __init__ (line 1228) | def __init__(self, config): method forward (line 1245) | def forward( class XLMRobertaXLForTokenClassification (line 1318) | class XLMRobertaXLForTokenClassification(XLMRobertaXLPreTrainedModel): method __init__ (line 1322) | def __init__(self, config): method forward (line 1341) | def forward( class XLMRobertaXLClassificationHead (line 1403) | class XLMRobertaXLClassificationHead(nn.Module): method __init__ (line 1406) | def __init__(self, config): method forward (line 1415) | def forward(self, features, **kwargs): class XLMRobertaXLForQuestionAnswering (line 1432) | class XLMRobertaXLForQuestionAnswering(XLMRobertaXLPreTrainedModel): method __init__ (line 1436) | def __init__(self, config): method forward (line 1451) | def forward( function create_position_ids_from_input_ids (line 1527) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/xlnet/configuration_xlnet.py class XLNetConfig (line 32) | class XLNetConfig(PretrainedConfig): method __init__ (line 150) | def __init__( method max_position_embeddings (line 233) | def max_position_embeddings(self): method max_position_embeddings (line 238) | def max_position_embeddings(self, value): FILE: transformers/models/xlnet/convert_xlnet_original_tf_checkpoint_to_pytorch.py function convert_xlnet_checkpoint_to_pytorch (line 49) | def convert_xlnet_checkpoint_to_pytorch( FILE: transformers/models/xlnet/modeling_tf_xlnet.py class TFXLNetRelativeAttention (line 69) | class TFXLNetRelativeAttention(tf.keras.layers.Layer): method __init__ (line 70) | def __init__(self, config, **kwargs): method build (line 89) | def build(self, input_shape): method prune_heads (line 120) | def prune_heads(self, heads): method rel_shift (line 123) | def rel_shift(self, x, klen=-1): method rel_attn_core (line 135) | def rel_attn_core( method post_attention (line 179) | def post_attention(self, h, attn_vec, residual=True, training=False): method call (line 192) | def call( class TFXLNetFeedForward (line 332) | class TFXLNetFeedForward(tf.keras.layers.Layer): method __init__ (line 333) | def __init__(self, config, **kwargs): method call (line 348) | def call(self, inp, training=False): class TFXLNetLayer (line 359) | class TFXLNetLayer(tf.keras.layers.Layer): method __init__ (line 360) | def __init__(self, config, **kwargs): method call (line 366) | def call( class TFXLNetLMHead (line 403) | class TFXLNetLMHead(tf.keras.layers.Layer): method __init__ (line 404) | def __init__(self, config, input_embeddings, **kwargs): method build (line 411) | def build(self, input_shape): method get_output_embeddings (line 415) | def get_output_embeddings(self): method set_output_embeddings (line 418) | def set_output_embeddings(self, value): method get_bias (line 422) | def get_bias(self): method set_bias (line 425) | def set_bias(self, value): method call (line 429) | def call(self, hidden_states): class TFXLNetMainLayer (line 436) | class TFXLNetMainLayer(tf.keras.layers.Layer): method __init__ (line 439) | def __init__(self, config, **kwargs): method get_input_embeddings (line 467) | def get_input_embeddings(self): method set_input_embeddings (line 470) | def set_input_embeddings(self, value): method build (line 474) | def build(self, input_shape): method _prune_heads (line 481) | def _prune_heads(self, heads_to_prune): method create_mask (line 484) | def create_mask(self, qlen, mlen): method cache_mem (line 513) | def cache_mem(self, curr_out, prev_mem): method positional_embedding (line 535) | def positional_embedding(pos_seq, inv_freq, bsz=None): method relative_positional_encoding (line 545) | def relative_positional_encoding(self, qlen, klen, bsz=None): method call (line 586) | def call( class TFXLNetPreTrainedModel (line 791) | class TFXLNetPreTrainedModel(TFPreTrainedModel): class TFXLNetModelOutput (line 802) | class TFXLNetModelOutput(ModelOutput): class TFXLNetLMHeadModelOutput (line 836) | class TFXLNetLMHeadModelOutput(ModelOutput): class TFXLNetForSequenceClassificationOutput (line 873) | class TFXLNetForSequenceClassificationOutput(ModelOutput): class TFXLNetForTokenClassificationOutput (line 907) | class TFXLNetForTokenClassificationOutput(ModelOutput): class TFXLNetForMultipleChoiceOutput (line 941) | class TFXLNetForMultipleChoiceOutput(ModelOutput): class TFXLNetForQuestionAnsweringSimpleOutput (line 977) | class TFXLNetForQuestionAnsweringSimpleOutput(ModelOutput): class TFXLNetModel (line 1132) | class TFXLNetModel(TFXLNetPreTrainedModel): method __init__ (line 1133) | def __init__(self, config, *inputs, **kwargs): method call (line 1144) | def call( class TFXLNetLMHeadModel (line 1187) | class TFXLNetLMHeadModel(TFXLNetPreTrainedModel, TFCausalLanguageModelin... method __init__ (line 1188) | def __init__(self, config, *inputs, **kwargs): method get_lm_head (line 1195) | def get_lm_head(self): method get_prefix_bias_name (line 1198) | def get_prefix_bias_name(self): method prepare_inputs_for_generation (line 1202) | def prepare_inputs_for_generation(self, inputs, past_key_values=None, ... method call (line 1244) | def call( class TFXLNetForSequenceClassification (line 1347) | class TFXLNetForSequenceClassification(TFXLNetPreTrainedModel, TFSequenc... method __init__ (line 1348) | def __init__(self, config, *inputs, **kwargs): method call (line 1367) | def call( class TFXLNetForMultipleChoice (line 1434) | class TFXLNetForMultipleChoice(TFXLNetPreTrainedModel, TFMultipleChoiceL... method __init__ (line 1435) | def __init__(self, config, *inputs, **kwargs): method call (line 1453) | def call( class TFXLNetForTokenClassification (line 1535) | class TFXLNetForTokenClassification(TFXLNetPreTrainedModel, TFTokenClass... method __init__ (line 1536) | def __init__(self, config, *inputs, **kwargs): method call (line 1552) | def call( class TFXLNetForQuestionAnsweringSimple (line 1615) | class TFXLNetForQuestionAnsweringSimple(TFXLNetPreTrainedModel, TFQuesti... method __init__ (line 1616) | def __init__(self, config, *inputs, **kwargs): method call (line 1630) | def call( FILE: transformers/models/xlnet/modeling_xlnet.py function build_tf_xlnet_to_pytorch_map (line 53) | def build_tf_xlnet_to_pytorch_map(model, config, tf_weights=None): function load_tf_weights_in_xlnet (line 136) | def load_tf_weights_in_xlnet(model, config, tf_path): class XLNetRelativeAttention (line 203) | class XLNetRelativeAttention(nn.Module): method __init__ (line 204) | def __init__(self, config): method prune_heads (line 232) | def prune_heads(self, heads): method rel_shift (line 236) | def rel_shift(x, klen=-1): method rel_shift_bnij (line 249) | def rel_shift_bnij(x, klen=-1): method rel_attn_core (line 263) | def rel_attn_core( method post_attention (line 315) | def post_attention(self, h, attn_vec, residual=True): method forward (line 327) | def forward( class XLNetFeedForward (line 463) | class XLNetFeedForward(nn.Module): method __init__ (line 464) | def __init__(self, config): method forward (line 475) | def forward(self, inp): class XLNetLayer (line 486) | class XLNetLayer(nn.Module): method __init__ (line 487) | def __init__(self, config): method forward (line 495) | def forward( method ff_chunk (line 531) | def ff_chunk(self, output_x): class XLNetPreTrainedModel (line 536) | class XLNetPreTrainedModel(PreTrainedModel): method _init_weights (line 546) | def _init_weights(self, module): class XLNetModelOutput (line 579) | class XLNetModelOutput(ModelOutput): class XLNetLMHeadModelOutput (line 613) | class XLNetLMHeadModelOutput(ModelOutput): class XLNetForSequenceClassificationOutput (line 650) | class XLNetForSequenceClassificationOutput(ModelOutput): class XLNetForTokenClassificationOutput (line 684) | class XLNetForTokenClassificationOutput(ModelOutput): class XLNetForMultipleChoiceOutput (line 718) | class XLNetForMultipleChoiceOutput(ModelOutput): class XLNetForQuestionAnsweringSimpleOutput (line 754) | class XLNetForQuestionAnsweringSimpleOutput(ModelOutput): class XLNetForQuestionAnsweringOutput (line 791) | class XLNetForQuestionAnsweringOutput(ModelOutput): class XLNetModel (line 931) | class XLNetModel(XLNetPreTrainedModel): method __init__ (line 932) | def __init__(self, config): method get_input_embeddings (line 952) | def get_input_embeddings(self): method set_input_embeddings (line 955) | def set_input_embeddings(self, new_embeddings): method _prune_heads (line 958) | def _prune_heads(self, heads_to_prune): method create_mask (line 961) | def create_mask(self, qlen, mlen): method cache_mem (line 989) | def cache_mem(self, curr_out, prev_mem): method positional_embedding (line 1011) | def positional_embedding(pos_seq, inv_freq, bsz=None): method relative_positional_encoding (line 1021) | def relative_positional_encoding(self, qlen, klen, bsz=None): method forward (line 1065) | def forward( class XLNetLMHeadModel (line 1294) | class XLNetLMHeadModel(XLNetPreTrainedModel): method __init__ (line 1297) | def __init__(self, config): method get_output_embeddings (line 1308) | def get_output_embeddings(self): method set_output_embeddings (line 1311) | def set_output_embeddings(self, new_embeddings): method prepare_inputs_for_generation (line 1314) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method forward (line 1358) | def forward( method _reorder_cache (line 1484) | def _reorder_cache(mems: List[torch.Tensor], beam_idx: torch.Tensor) -... class XLNetForSequenceClassification (line 1500) | class XLNetForSequenceClassification(XLNetPreTrainedModel): method __init__ (line 1501) | def __init__(self, config): method forward (line 1519) | def forward( class XLNetForTokenClassification (line 1609) | class XLNetForTokenClassification(XLNetPreTrainedModel): method __init__ (line 1610) | def __init__(self, config): method forward (line 1626) | def forward( class XLNetForMultipleChoice (line 1696) | class XLNetForMultipleChoice(XLNetPreTrainedModel): method __init__ (line 1697) | def __init__(self, config): method forward (line 1713) | def forward( class XLNetForQuestionAnsweringSimple (line 1799) | class XLNetForQuestionAnsweringSimple(XLNetPreTrainedModel): method __init__ (line 1800) | def __init__(self, config): method forward (line 1816) | def forward( class XLNetForQuestionAnswering (line 1909) | class XLNetForQuestionAnswering(XLNetPreTrainedModel): method __init__ (line 1910) | def __init__(self, config): method forward (line 1925) | def forward( FILE: transformers/models/xlnet/tokenization_xlnet.py class XLNetTokenizer (line 53) | class XLNetTokenizer(PreTrainedTokenizer): method __init__ (line 133) | def __init__( method vocab_size (line 182) | def vocab_size(self): method get_vocab (line 185) | def get_vocab(self): method __getstate__ (line 190) | def __getstate__(self): method __setstate__ (line 195) | def __setstate__(self, d): method preprocess_text (line 205) | def preprocess_text(self, inputs): method _tokenize (line 220) | def _tokenize(self, text: str) -> List[str]: method _convert_token_to_id (line 240) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 244) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 248) | def convert_tokens_to_string(self, tokens): method _decode (line 253) | def _decode( method build_inputs_with_special_tokens (line 298) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 323) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 351) | def create_token_type_ids_from_sequences( method save_vocabulary (line 381) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/xlnet/tokenization_xlnet_fast.py class XLNetTokenizerFast (line 63) | class XLNetTokenizerFast(PreTrainedTokenizerFast): method __init__ (line 130) | def __init__( method build_inputs_with_special_tokens (line 174) | def build_inputs_with_special_tokens( method create_token_type_ids_from_sequences (line 199) | def create_token_type_ids_from_sequences( method save_vocabulary (line 229) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... FILE: transformers/models/xmod/configuration_xmod.py class XmodConfig (line 40) | class XmodConfig(PretrainedConfig): method __init__ (line 124) | def __init__( class XmodOnnxConfig (line 180) | class XmodOnnxConfig(OnnxConfig): method inputs (line 182) | def inputs(self) -> Mapping[str, Mapping[int, str]]: FILE: transformers/models/xmod/convert_xmod_original_pytorch_checkpoint_to_pytorch.py function convert_xmod_checkpoint_to_pytorch (line 41) | def convert_xmod_checkpoint_to_pytorch( FILE: transformers/models/xmod/modeling_xmod.py class XmodEmbeddings (line 59) | class XmodEmbeddings(nn.Module): method __init__ (line 65) | def __init__(self, config): method forward (line 88) | def forward( method create_position_ids_from_inputs_embeds (line 128) | def create_position_ids_from_inputs_embeds(self, inputs_embeds): class XmodSelfAttention (line 147) | class XmodSelfAttention(nn.Module): method __init__ (line 148) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 174) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 179) | def forward( class XmodSelfOutput (line 281) | class XmodSelfOutput(nn.Module): method __init__ (line 283) | def __init__(self, config): method forward (line 289) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class XmodAttention (line 296) | class XmodAttention(nn.Module): method __init__ (line 297) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 305) | def prune_heads(self, heads): method forward (line 323) | def forward( class XmodIntermediate (line 353) | class XmodIntermediate(nn.Module): method __init__ (line 354) | def __init__(self, config): method forward (line 362) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XmodAdapter (line 368) | class XmodAdapter(nn.Module): method __init__ (line 369) | def __init__(self, config): method forward (line 379) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XmodOutput (line 386) | class XmodOutput(nn.Module): method __init__ (line 387) | def __init__(self, config): method forward (line 402) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... method lang_adapter (line 409) | def lang_adapter(self, lang_ids: torch.Tensor, hidden_states: torch.Te... class XmodLayer (line 436) | class XmodLayer(nn.Module): method __init__ (line 437) | def __init__(self, config): method forward (line 452) | def forward( method feed_forward_chunk (line 527) | def feed_forward_chunk(self, attention_output): class XmodEncoder (line 531) | class XmodEncoder(nn.Module): method __init__ (line 532) | def __init__(self, config): method forward (line 541) | def forward( class XmodPooler (line 638) | class XmodPooler(nn.Module): method __init__ (line 639) | def __init__(self, config): method forward (line 644) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class XmodPreTrainedModel (line 653) | class XmodPreTrainedModel(PreTrainedModel): method _init_weights (line 664) | def _init_weights(self, module): method _set_gradient_checkpointing (line 681) | def _set_gradient_checkpointing(self, module, value=False): method update_keys_to_ignore (line 686) | def update_keys_to_ignore(self, config, del_keys_to_ignore): method set_default_language (line 695) | def set_default_language(self, language: str): method freeze_embeddings_and_language_adapters (line 708) | def freeze_embeddings_and_language_adapters(self): class XmodModel (line 798) | class XmodModel(XmodPreTrainedModel): method __init__ (line 817) | def __init__(self, config, add_pooling_layer=True): method get_input_embeddings (line 830) | def get_input_embeddings(self): method set_input_embeddings (line 834) | def set_input_embeddings(self, value): method _prune_heads (line 838) | def _prune_heads(self, heads_to_prune): method forward (line 847) | def forward( class XmodForCausalLM (line 991) | class XmodForCausalLM(XmodPreTrainedModel): method __init__ (line 997) | def __init__(self, config): method get_output_embeddings (line 1013) | def get_output_embeddings(self): method set_output_embeddings (line 1017) | def set_output_embeddings(self, new_embeddings): method forward (line 1021) | def forward( method prepare_inputs_for_generation (line 1129) | def prepare_inputs_for_generation(self, input_ids, past_key_values=Non... method _reorder_cache (line 1142) | def _reorder_cache(self, past_key_values, beam_idx): class XmodForMaskedLM (line 1153) | class XmodForMaskedLM(XmodPreTrainedModel): method __init__ (line 1159) | def __init__(self, config): method get_output_embeddings (line 1178) | def get_output_embeddings(self): method set_output_embeddings (line 1182) | def set_output_embeddings(self, new_embeddings): method forward (line 1186) | def forward( class XmodLMHead (line 1247) | class XmodLMHead(nn.Module): method __init__ (line 1250) | def __init__(self, config): method forward (line 1259) | def forward(self, features, **kwargs): method _tie_weights (line 1269) | def _tie_weights(self): class XmodForSequenceClassification (line 1285) | class XmodForSequenceClassification(XmodPreTrainedModel): method __init__ (line 1289) | def __init__(self, config): method forward (line 1301) | def forward( class XmodForMultipleChoice (line 1380) | class XmodForMultipleChoice(XmodPreTrainedModel): method __init__ (line 1384) | def __init__(self, config): method forward (line 1395) | def forward( class XmodForTokenClassification (line 1471) | class XmodForTokenClassification(XmodPreTrainedModel): method __init__ (line 1476) | def __init__(self, config): method forward (line 1491) | def forward( class XmodClassificationHead (line 1547) | class XmodClassificationHead(nn.Module): method __init__ (line 1550) | def __init__(self, config): method forward (line 1559) | def forward(self, features, **kwargs): class XmodForQuestionAnswering (line 1576) | class XmodForQuestionAnswering(XmodPreTrainedModel): method __init__ (line 1581) | def __init__(self, config): method forward (line 1592) | def forward( function create_position_ids_from_input_ids (line 1670) | def create_position_ids_from_input_ids(input_ids, padding_idx, past_key_... FILE: transformers/models/yolos/configuration_yolos.py class YolosConfig (line 35) | class YolosConfig(PretrainedConfig): method __init__ (line 108) | def __init__( class YolosOnnxConfig (line 162) | class YolosOnnxConfig(OnnxConfig): method inputs (line 166) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method atol_for_validation (line 174) | def atol_for_validation(self) -> float: method default_onnx_opset (line 178) | def default_onnx_opset(self) -> int: FILE: transformers/models/yolos/convert_yolos_to_pytorch.py function get_yolos_config (line 35) | def get_yolos_config(yolos_name: str) -> YolosConfig: function read_in_q_k_v (line 71) | def read_in_q_k_v(state_dict: dict, config: YolosConfig, base_model: boo... function rename_key (line 89) | def rename_key(name: str) -> str: function convert_state_dict (line 126) | def convert_state_dict(orig_state_dict: dict, model: YolosForObjectDetec... function prepare_img (line 151) | def prepare_img() -> torch.Tensor: function convert_yolos_checkpoint (line 158) | def convert_yolos_checkpoint( FILE: transformers/models/yolos/feature_extraction_yolos.py class YolosFeatureExtractor (line 26) | class YolosFeatureExtractor(YolosImageProcessor): method __init__ (line 27) | def __init__(self, *args, **kwargs) -> None: FILE: transformers/models/yolos/image_processing_yolos.py class AnnotionFormat (line 83) | class AnnotionFormat(ExplicitEnum): function get_max_height_width (line 92) | def get_max_height_width(images: List[np.ndarray]) -> List[int]: function get_size_with_aspect_ratio (line 108) | def get_size_with_aspect_ratio(image_size, size, max_size=None) -> Tuple... function get_resize_output_image_size (line 140) | def get_resize_output_image_size( function get_numpy_to_framework_fn (line 164) | def get_numpy_to_framework_fn(arr) -> Callable: function safe_squeeze (line 189) | def safe_squeeze(arr: np.ndarray, axis: Optional[int] = None) -> np.ndar... function normalize_annotation (line 203) | def normalize_annotation(annotation: Dict, image_size: Tuple[int, int]) ... function max_across_indices (line 218) | def max_across_indices(values: Iterable[Any]) -> List[Any]: function make_pixel_mask (line 226) | def make_pixel_mask(image: np.ndarray, output_size: Tuple[int, int]) -> ... function convert_coco_poly_to_mask (line 243) | def convert_coco_poly_to_mask(segmentations, height: int, width: int) ->... function prepare_coco_detection_annotation (line 278) | def prepare_coco_detection_annotation(image, target, return_segmentation... function masks_to_boxes (line 331) | def masks_to_boxes(masks: np.ndarray) -> np.ndarray: function prepare_coco_panoptic_annotation (line 366) | def prepare_coco_panoptic_annotation( function get_segmentation_image (line 404) | def get_segmentation_image( function get_mask_area (line 430) | def get_mask_area(seg_img: np.ndarray, target_size: Tuple[int, int], n_c... function score_labels_from_class_probabilities (line 440) | def score_labels_from_class_probabilities(logits: np.ndarray) -> Tuple[n... function resize_annotation (line 449) | def resize_annotation( function binary_mask_to_rle (line 501) | def binary_mask_to_rle(mask): function convert_segmentation_to_rle (line 524) | def convert_segmentation_to_rle(segmentation): function remove_low_and_no_objects (line 546) | def remove_low_and_no_objects(masks, scores, labels, object_mask_thresho... function check_segment_validity (line 575) | def check_segment_validity(mask_labels, mask_probs, k, mask_threshold=0.... function compute_segments (line 594) | def compute_segments( class YolosImageProcessor (line 654) | class YolosImageProcessor(BaseImageProcessor): method __init__ (line 691) | def __init__( method max_size (line 734) | def max_size(self): method from_dict (line 743) | def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs): method prepare_annotation (line 757) | def prepare_annotation( method prepare (line 783) | def prepare(self, image, target, return_segmentation_masks=False, mask... method convert_coco_poly_to_mask (line 793) | def convert_coco_poly_to_mask(self, *args, **kwargs): method prepare_coco_detection (line 800) | def prepare_coco_detection(self, *args, **kwargs): method prepare_coco_panoptic (line 807) | def prepare_coco_panoptic(self, *args, **kwargs): method resize (line 814) | def resize( method resize_annotation (line 848) | def resize_annotation( method rescale (line 862) | def rescale( method normalize (line 871) | def normalize( method normalize_annotation (line 884) | def normalize_annotation(self, annotation: Dict, image_size: Tuple[int... method _pad_image (line 892) | def _pad_image( method pad (line 913) | def pad( method preprocess (line 945) | def preprocess( method post_process (line 1151) | def post_process(self, outputs, target_sizes): method post_process_object_detection (line 1193) | def post_process_object_detection( FILE: transformers/models/yolos/modeling_yolos.py class YolosObjectDetectionOutput (line 69) | class YolosObjectDetectionOutput(ModelOutput): class YolosEmbeddings (line 113) | class YolosEmbeddings(nn.Module): method __init__ (line 119) | def __init__(self, config: YolosConfig) -> None: method forward (line 134) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class InterpolateInitialPositionEmbeddings (line 156) | class InterpolateInitialPositionEmbeddings(nn.Module): method __init__ (line 157) | def __init__(self, config) -> None: method forward (line 161) | def forward(self, pos_embed, img_size=(800, 1344)) -> torch.Tensor: class InterpolateMidPositionEmbeddings (line 185) | class InterpolateMidPositionEmbeddings(nn.Module): method __init__ (line 186) | def __init__(self, config) -> None: method forward (line 190) | def forward(self, pos_embed, img_size=(800, 1344)) -> torch.Tensor: class YolosPatchEmbeddings (line 218) | class YolosPatchEmbeddings(nn.Module): method __init__ (line 225) | def __init__(self, config): method forward (line 240) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class YolosSelfAttention (line 252) | class YolosSelfAttention(nn.Module): method __init__ (line 253) | def __init__(self, config: YolosConfig) -> None: method transpose_for_scores (line 271) | def transpose_for_scores(self, x: torch.Tensor) -> torch.Tensor: method forward (line 276) | def forward( class YolosSelfOutput (line 313) | class YolosSelfOutput(nn.Module): method __init__ (line 319) | def __init__(self, config: YolosConfig) -> None: method forward (line 324) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YolosAttention (line 332) | class YolosAttention(nn.Module): method __init__ (line 333) | def __init__(self, config: YolosConfig) -> None: method prune_heads (line 339) | def prune_heads(self, heads: Set[int]) -> None: method forward (line 357) | def forward( class YolosIntermediate (line 372) | class YolosIntermediate(nn.Module): method __init__ (line 373) | def __init__(self, config: YolosConfig) -> None: method forward (line 381) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YolosOutput (line 389) | class YolosOutput(nn.Module): method __init__ (line 390) | def __init__(self, config: YolosConfig) -> None: method forward (line 395) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YolosLayer (line 405) | class YolosLayer(nn.Module): method __init__ (line 408) | def __init__(self, config: YolosConfig) -> None: method forward (line 418) | def forward( class YolosEncoder (line 447) | class YolosEncoder(nn.Module): method __init__ (line 448) | def __init__(self, config: YolosConfig) -> None: method forward (line 472) | def forward( class YolosPreTrainedModel (line 531) | class YolosPreTrainedModel(PreTrainedModel): method _init_weights (line 542) | def _init_weights(self, module: Union[nn.Linear, nn.Conv2d, nn.LayerNo... method _set_gradient_checkpointing (line 554) | def _set_gradient_checkpointing(self, module: YolosEncoder, value: boo... class YolosModel (line 597) | class YolosModel(YolosPreTrainedModel): method __init__ (line 598) | def __init__(self, config: YolosConfig, add_pooling_layer: bool = True): method get_input_embeddings (line 611) | def get_input_embeddings(self) -> YolosPatchEmbeddings: method _prune_heads (line 614) | def _prune_heads(self, heads_to_prune: Dict[int, List[int]]) -> None: method forward (line 633) | def forward( class YolosPooler (line 684) | class YolosPooler(nn.Module): method __init__ (line 685) | def __init__(self, config: YolosConfig): method forward (line 690) | def forward(self, hidden_states): class YolosForObjectDetection (line 705) | class YolosForObjectDetection(YolosPreTrainedModel): method __init__ (line 706) | def __init__(self, config: YolosConfig): method _set_aux_loss (line 726) | def _set_aux_loss(self, outputs_class, outputs_coord): method forward (line 734) | def forward( function dice_loss (line 863) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 883) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class YolosLoss (line 915) | class YolosLoss(nn.Module): method __init__ (line 940) | def __init__(self, matcher, num_classes, eos_coef, losses): method loss_labels (line 951) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_cardinality (line 973) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 988) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 1012) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_source_permutation_idx (line 1045) | def _get_source_permutation_idx(self, indices): method _get_target_permutation_idx (line 1051) | def _get_target_permutation_idx(self, indices): method get_loss (line 1057) | def get_loss(self, loss, outputs, targets, indices, num_boxes): method forward (line 1068) | def forward(self, outputs, targets): class YolosMLPPredictionHead (line 1114) | class YolosMLPPredictionHead(nn.Module): method __init__ (line 1123) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 1129) | def forward(self, x): class YolosHungarianMatcher (line 1136) | class YolosHungarianMatcher(nn.Module): method __init__ (line 1153) | def __init__(self, class_cost: float = 1, bbox_cost: float = 1, giou_c... method forward (line 1164) | def forward(self, outputs, targets): function _upcast (line 1215) | def _upcast(t: Tensor) -> Tensor: function box_area (line 1224) | def box_area(boxes: Tensor) -> Tensor: function box_iou (line 1241) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 1258) | def generalized_box_iou(boxes1, boxes2): function _max_by_axis (line 1283) | def _max_by_axis(the_list): class NestedTensor (line 1293) | class NestedTensor(object): method __init__ (line 1294) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 1298) | def to(self, device): method decompose (line 1307) | def decompose(self): method __repr__ (line 1310) | def __repr__(self): function nested_tensor_from_tensor_list (line 1315) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): FILE: transformers/models/yoso/configuration_yoso.py class YosoConfig (line 29) | class YosoConfig(PretrainedConfig): method __init__ (line 99) | def __init__( FILE: transformers/models/yoso/convert_yoso_pytorch_to_pytorch.py function rename_key (line 24) | def rename_key(orig_key): function convert_checkpoint_helper (line 62) | def convert_checkpoint_helper(max_position_embeddings, orig_state_dict): function convert_yoso_checkpoint (line 77) | def convert_yoso_checkpoint(checkpoint_path, yoso_config_file, pytorch_d... FILE: transformers/models/yoso/modeling_yoso.py function load_cuda_kernels (line 53) | def load_cuda_kernels(): function to_contiguous (line 76) | def to_contiguous(input_tensors): function normalize (line 90) | def normalize(input_tensors): function hashing (line 100) | def hashing(query, key, num_hash, hash_len): class YosoCumulation (line 119) | class YosoCumulation(torch.autograd.Function): method forward (line 121) | def forward(ctx, query_mask, key_mask, query, key, value, config): method backward (line 134) | def backward(ctx, grad): class YosoLSHCumulation (line 150) | class YosoLSHCumulation(torch.autograd.Function): method forward (line 152) | def forward(ctx, query_mask, key_mask, query, key, value, config): method backward (line 190) | def backward(ctx, grad): class YosoEmbeddings (line 240) | class YosoEmbeddings(nn.Module): method __init__ (line 243) | def __init__(self, config): method forward (line 263) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class YosoSelfAttention (line 298) | class YosoSelfAttention(nn.Module): method __init__ (line 299) | def __init__(self, config, position_embedding_type=None): method transpose_for_scores (line 344) | def transpose_for_scores(self, layer): method forward (line 349) | def forward(self, hidden_states, attention_mask=None, output_attention... class YosoSelfOutput (line 432) | class YosoSelfOutput(nn.Module): method __init__ (line 433) | def __init__(self, config): method forward (line 439) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YosoAttention (line 446) | class YosoAttention(nn.Module): method __init__ (line 447) | def __init__(self, config, position_embedding_type=None): method prune_heads (line 453) | def prune_heads(self, heads): method forward (line 471) | def forward(self, hidden_states, attention_mask=None, output_attention... class YosoIntermediate (line 479) | class YosoIntermediate(nn.Module): method __init__ (line 480) | def __init__(self, config): method forward (line 488) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YosoOutput (line 495) | class YosoOutput(nn.Module): method __init__ (line 496) | def __init__(self, config): method forward (line 502) | def forward(self, hidden_states: torch.Tensor, input_tensor: torch.Ten... class YosoLayer (line 509) | class YosoLayer(nn.Module): method __init__ (line 510) | def __init__(self, config): method forward (line 519) | def forward(self, hidden_states, attention_mask=None, output_attention... method feed_forward_chunk (line 532) | def feed_forward_chunk(self, attention_output): class YosoEncoder (line 538) | class YosoEncoder(nn.Module): method __init__ (line 539) | def __init__(self, config): method forward (line 545) | def forward( class YosoPredictionHeadTransform (line 594) | class YosoPredictionHeadTransform(nn.Module): method __init__ (line 595) | def __init__(self, config): method forward (line 604) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class YosoLMPredictionHead (line 612) | class YosoLMPredictionHead(nn.Module): method __init__ (line 613) | def __init__(self, config): method forward (line 626) | def forward(self, hidden_states): class YosoOnlyMLMHead (line 633) | class YosoOnlyMLMHead(nn.Module): method __init__ (line 634) | def __init__(self, config): method forward (line 638) | def forward(self, sequence_output: torch.Tensor) -> torch.Tensor: class YosoPreTrainedModel (line 643) | class YosoPreTrainedModel(PreTrainedModel): method _init_weights (line 654) | def _init_weights(self, module): method _set_gradient_checkpointing (line 670) | def _set_gradient_checkpointing(self, module, value=False): class YosoModel (line 740) | class YosoModel(YosoPreTrainedModel): method __init__ (line 741) | def __init__(self, config): method get_input_embeddings (line 751) | def get_input_embeddings(self): method set_input_embeddings (line 754) | def set_input_embeddings(self, value): method _prune_heads (line 757) | def _prune_heads(self, heads_to_prune): method forward (line 771) | def forward( class YosoForMaskedLM (line 851) | class YosoForMaskedLM(YosoPreTrainedModel): method __init__ (line 858) | def __init__(self, config): method get_output_embeddings (line 867) | def get_output_embeddings(self): method set_output_embeddings (line 870) | def set_output_embeddings(self, new_embeddings): method forward (line 879) | def forward( class YosoClassificationHead (line 932) | class YosoClassificationHead(nn.Module): method __init__ (line 935) | def __init__(self, config): method forward (line 943) | def forward(self, features, **kwargs): class YosoForSequenceClassification (line 958) | class YosoForSequenceClassification(YosoPreTrainedModel): method __init__ (line 959) | def __init__(self, config): method forward (line 974) | def forward( class YosoForMultipleChoice (line 1049) | class YosoForMultipleChoice(YosoPreTrainedModel): method __init__ (line 1050) | def __init__(self, config): method forward (line 1066) | def forward( class YosoForTokenClassification (line 1140) | class YosoForTokenClassification(YosoPreTrainedModel): method __init__ (line 1141) | def __init__(self, config): method forward (line 1158) | def forward( class YosoForQuestionAnswering (line 1225) | class YosoForQuestionAnswering(YosoPreTrainedModel): method __init__ (line 1226) | def __init__(self, config): method forward (line 1244) | def forward( FILE: transformers/onnx/__main__.py function export_with_optimum (line 35) | def export_with_optimum(args): function export_with_transformers (line 69) | def export_with_transformers(args): function main (line 186) | def main(): FILE: transformers/onnx/config.py class PatchingSpec (line 48) | class PatchingSpec: class OnnxConfig (line 68) | class OnnxConfig(ABC): method __init__ (line 111) | def __init__(self, config: "PretrainedConfig", task: str = "default", ... method from_model_config (line 128) | def from_model_config(cls, config: "PretrainedConfig", task: str = "de... method inputs (line 142) | def inputs(self) -> Mapping[str, Mapping[int, str]]: method outputs (line 152) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method values_override (line 163) | def values_override(self) -> Optional[Mapping[str, Any]]: method default_batch_size (line 176) | def default_batch_size(self) -> int: method default_sequence_length (line 187) | def default_sequence_length(self) -> int: method default_num_choices (line 197) | def default_num_choices(self) -> int: method default_onnx_opset (line 207) | def default_onnx_opset(self) -> int: method atol_for_validation (line 217) | def atol_for_validation(self) -> float: method is_torch_support_available (line 227) | def is_torch_support_available(self) -> bool: method use_external_data_format (line 242) | def use_external_data_format(num_parameters: int) -> bool: method _generate_dummy_images (line 258) | def _generate_dummy_images( method _generate_dummy_audio (line 267) | def _generate_dummy_audio( method generate_dummy_inputs (line 280) | def generate_dummy_inputs( method generate_dummy_inputs_onnxruntime (line 400) | def generate_dummy_inputs_onnxruntime(self, reference_model_inputs: Ma... method patch_ops (line 414) | def patch_ops(self): method restore_ops (line 419) | def restore_ops(self): method flatten_output_collection_property (line 425) | def flatten_output_collection_property(cls, name: str, field: Iterable... class OnnxConfigWithPast (line 443) | class OnnxConfigWithPast(OnnxConfig, ABC): method __init__ (line 444) | def __init__( method with_past (line 455) | def with_past(cls, config: "PretrainedConfig", task: str = "default") ... method outputs (line 468) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method values_override (line 476) | def values_override(self) -> Optional[Mapping[str, Any]]: method num_layers (line 483) | def num_layers(self) -> int: method num_attention_heads (line 496) | def num_attention_heads(self) -> int: method generate_dummy_inputs (line 508) | def generate_dummy_inputs( method fill_with_past_key_values_ (line 550) | def fill_with_past_key_values_( method _flatten_past_key_values_ (line 575) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): method flatten_output_collection_property (line 579) | def flatten_output_collection_property(self, name: str, field: Iterabl... class OnnxSeq2SeqConfigWithPast (line 590) | class OnnxSeq2SeqConfigWithPast(OnnxConfigWithPast): method outputs (line 592) | def outputs(self) -> Mapping[str, Mapping[int, str]]: method num_layers (line 609) | def num_layers(self) -> Tuple[int]: method num_attention_heads (line 625) | def num_attention_heads(self) -> Tuple[int]: method generate_dummy_inputs (line 640) | def generate_dummy_inputs( method fill_with_past_key_values_ (line 709) | def fill_with_past_key_values_(self, inputs_or_outputs: Mapping[str, M... method _flatten_past_key_values_ (line 737) | def _flatten_past_key_values_(self, flattened_output, name, idx, t): FILE: transformers/onnx/convert.py function check_onnxruntime_requirements (line 54) | def check_onnxruntime_requirements(minimum_version: Version): function export_pytorch (line 83) | def export_pytorch( function export_tensorflow (line 219) | def export_tensorflow( function export (line 285) | def export( function validate_model_outputs (line 351) | def validate_model_outputs( function ensure_model_and_config_inputs_match (line 474) | def ensure_model_and_config_inputs_match( FILE: transformers/onnx/features.py function supported_features_mapping (line 55) | def supported_features_mapping( class FeaturesManager (line 85) | class FeaturesManager: method get_supported_features_for_model_type (line 557) | def get_supported_features_for_model_type( method feature_to_task (line 583) | def feature_to_task(feature: str) -> str: method _validate_framework_choice (line 587) | def _validate_framework_choice(framework: str): method get_model_class_for_feature (line 602) | def get_model_class_for_feature(feature: str, framework: str = "pt") -... method determine_framework (line 629) | def determine_framework(model: str, framework: str = None) -> str: method get_model_from_feature (line 679) | def get_model_from_feature( method check_supported_model_or_raise (line 712) | def check_supported_model_or_raise( method get_config (line 736) | def get_config(model_type: str, feature: str) -> OnnxConfig: FILE: transformers/onnx/utils.py class ParameterFormat (line 24) | class ParameterFormat(Enum): method size (line 28) | def size(self) -> int: function compute_effective_axis_dimension (line 38) | def compute_effective_axis_dimension(dimension: int, fixed_dimension: in... function compute_serialized_parameters_size (line 57) | def compute_serialized_parameters_size(num_parameters: int, dtype: Param... function get_preprocessor (line 71) | def get_preprocessor(model_name: str) -> Optional[Union["AutoTokenizer",... FILE: transformers/optimization.py function _get_constant_lambda (line 35) | def _get_constant_lambda(_=None): function get_constant_schedule (line 39) | def get_constant_schedule(optimizer: Optimizer, last_epoch: int = -1): function get_reduce_on_plateau_schedule (line 56) | def get_reduce_on_plateau_schedule(optimizer: Optimizer): function _get_constant_schedule_with_warmup_lr_lambda (line 71) | def _get_constant_schedule_with_warmup_lr_lambda(current_step: int, *, n... function get_constant_schedule_with_warmup (line 77) | def get_constant_schedule_with_warmup(optimizer: Optimizer, num_warmup_s... function _get_linear_schedule_with_warmup_lr_lambda (line 98) | def _get_linear_schedule_with_warmup_lr_lambda(current_step: int, *, num... function get_linear_schedule_with_warmup (line 104) | def get_linear_schedule_with_warmup(optimizer, num_warmup_steps, num_tra... function _get_cosine_schedule_with_warmup_lr_lambda (line 131) | def _get_cosine_schedule_with_warmup_lr_lambda( function get_cosine_schedule_with_warmup (line 140) | def get_cosine_schedule_with_warmup( function _get_cosine_with_hard_restarts_schedule_with_warmup_lr_lambda (line 174) | def _get_cosine_with_hard_restarts_schedule_with_warmup_lr_lambda( function get_cosine_with_hard_restarts_schedule_with_warmup (line 185) | def get_cosine_with_hard_restarts_schedule_with_warmup( function _get_polynomial_decay_schedule_with_warmup_lr_lambda (line 218) | def _get_polynomial_decay_schedule_with_warmup_lr_lambda( function get_polynomial_decay_schedule_with_warmup (line 239) | def get_polynomial_decay_schedule_with_warmup( function _get_inverse_sqrt_schedule_lr_lambda (line 285) | def _get_inverse_sqrt_schedule_lr_lambda(current_step: int, *, num_warmu... function get_inverse_sqrt_schedule (line 293) | def get_inverse_sqrt_schedule( function get_scheduler (line 335) | def get_scheduler( class AdamW (line 378) | class AdamW(Optimizer): method __init__ (line 400) | def __init__( method step (line 430) | def step(self, closure: Callable = None): class Adafactor (line 492) | class Adafactor(Optimizer): method __init__ (line 577) | def __init__( method _get_lr (line 610) | def _get_lr(param_group, param_state): method _get_options (line 621) | def _get_options(param_group, param_shape): method _rms (line 627) | def _rms(tensor): method _approx_sq_grad (line 631) | def _approx_sq_grad(exp_avg_sq_row, exp_avg_sq_col): method step (line 639) | def step(self, closure=None): class AdafactorSchedule (line 733) | class AdafactorSchedule(LambdaLR): method __init__ (line 741) | def __init__(self, optimizer, initial_lr=0.0): method get_lr (line 751) | def get_lr(self): function get_adafactor_schedule (line 763) | def get_adafactor_schedule(optimizer, initial_lr=0.0): FILE: transformers/optimization_tf.py class WarmUp (line 30) | class WarmUp(tf.keras.optimizers.schedules.LearningRateSchedule): method __init__ (line 48) | def __init__( method __call__ (line 63) | def __call__(self, step): method get_config (line 78) | def get_config(self): function create_optimizer (line 88) | def create_optimizer( class AdamWeightDecay (line 172) | class AdamWeightDecay(Adam): method __init__ (line 211) | def __init__( method from_config (line 230) | def from_config(cls, config): method _prepare_local (line 235) | def _prepare_local(self, var_device, var_dtype, apply_state): method _decay_weights_op (line 241) | def _decay_weights_op(self, var, learning_rate, apply_state): method apply_gradients (line 250) | def apply_gradients(self, grads_and_vars, name=None, **kwargs): method _get_lr (line 254) | def _get_lr(self, var_device, var_dtype, apply_state): method _resource_apply_dense (line 267) | def _resource_apply_dense(self, grad, var, apply_state=None): method _resource_apply_sparse (line 273) | def _resource_apply_sparse(self, grad, var, indices, apply_state=None): method get_config (line 279) | def get_config(self): method _do_use_weight_decay (line 284) | def _do_use_weight_decay(self, param_name): class GradientAccumulator (line 302) | class GradientAccumulator(object): method __init__ (line 313) | def __init__(self): method step (line 319) | def step(self): method gradients (line 332) | def gradients(self): method __call__ (line 338) | def __call__(self, gradients): method reset (line 364) | def reset(self): FILE: transformers/pipelines/__init__.py function get_supported_tasks (line 421) | def get_supported_tasks() -> List[str]: function get_task (line 428) | def get_task(model: str, use_auth_token: Optional[str] = None) -> str: function check_task (line 445) | def check_task(task: str) -> Tuple[str, Dict, Any]: function clean_custom_task (line 490) | def clean_custom_task(task_info): function pipeline (line 506) | def pipeline( FILE: transformers/pipelines/audio_classification.py function ffmpeg_read (line 30) | def ffmpeg_read(bpayload: bytes, sampling_rate: int) -> np.array: class AudioClassificationPipeline (line 67) | class AudioClassificationPipeline(Pipeline): method __init__ (line 93) | def __init__(self, *args, **kwargs): method __call__ (line 103) | def __call__( method _sanitize_parameters (line 132) | def _sanitize_parameters(self, top_k=None, **kwargs): method preprocess (line 141) | def preprocess(self, inputs): method _forward (line 164) | def _forward(self, model_inputs): method postprocess (line 168) | def postprocess(self, model_outputs, top_k=5): FILE: transformers/pipelines/audio_utils.py function ffmpeg_read (line 10) | def ffmpeg_read(bpayload: bytes, sampling_rate: int) -> np.array: function ffmpeg_microphone (line 45) | def ffmpeg_microphone( function ffmpeg_microphone_live (line 98) | def ffmpeg_microphone_live( function chunk_bytes_iter (line 176) | def chunk_bytes_iter(iterator, chunk_len: int, stride: Tuple[int, int], ... function _ffmpeg_stream (line 211) | def _ffmpeg_stream(ffmpeg_command, buflen: int): FILE: transformers/pipelines/automatic_speech_recognition.py function rescale_stride (line 36) | def rescale_stride(stride, ratio): function chunk_iter (line 56) | def chunk_iter(inputs, feature_extractor, chunk_len, stride_left, stride... function _fast_find_longest_common_sequence (line 85) | def _fast_find_longest_common_sequence(sequence_left, sequence_right): function _find_longest_common_sequence (line 105) | def _find_longest_common_sequence(sequences, tokenizer): class AutomaticSpeechRecognitionPipeline (line 130) | class AutomaticSpeechRecognitionPipeline(ChunkPipeline): method __init__ (line 196) | def __init__( method __call__ (line 225) | def __call__( method _sanitize_parameters (line 274) | def _sanitize_parameters( method preprocess (line 316) | def preprocess(self, inputs, chunk_length_s=0, stride_length_s=None, i... method _forward (line 419) | def _forward(self, model_inputs, return_timestamps=False, generate_kwa... method postprocess (line 480) | def postprocess( function _find_timestamp_sequence (line 582) | def _find_timestamp_sequence(sequences, tokenizer, feature_extractor, ma... FILE: transformers/pipelines/base.py function no_collate_fn (line 68) | def no_collate_fn(items): function _pad (line 74) | def _pad(items, key, padding_value, padding_side): function pad_collate_fn (line 124) | def pad_collate_fn(tokenizer, feature_extractor): function infer_framework_load_model (line 187) | def infer_framework_load_model( function infer_framework_from_model (line 284) | def infer_framework_from_model( function get_framework (line 323) | def get_framework(model, revision: Optional[str] = None): function get_default_model_and_revision (line 357) | def get_default_model_and_revision( class PipelineException (line 401) | class PipelineException(Exception): method __init__ (line 411) | def __init__(self, task: str, model: str, reason: str): class ArgumentHandler (line 418) | class ArgumentHandler(ABC): method __call__ (line 424) | def __call__(self, *args, **kwargs): class PipelineDataFormat (line 428) | class PipelineDataFormat: method __init__ (line 450) | def __init__( method __iter__ (line 474) | def __iter__(self): method save (line 478) | def save(self, data: Union[dict, List[dict]]): method save_binary (line 487) | def save_binary(self, data: Union[dict, List[dict]]) -> str: method from_str (line 506) | def from_str( class CsvPipelineDataFormat (line 541) | class CsvPipelineDataFormat(PipelineDataFormat): method __init__ (line 553) | def __init__( method __iter__ (line 562) | def __iter__(self): method save (line 571) | def save(self, data: List[dict]): class JsonPipelineDataFormat (line 585) | class JsonPipelineDataFormat(PipelineDataFormat): method __init__ (line 597) | def __init__( method __iter__ (line 609) | def __iter__(self): method save (line 616) | def save(self, data: dict): class PipedPipelineDataFormat (line 627) | class PipedPipelineDataFormat(PipelineDataFormat): method __iter__ (line 641) | def __iter__(self): method save (line 656) | def save(self, data: dict): method save_binary (line 665) | def save_binary(self, data: Union[dict, List[dict]]) -> str: class _ScikitCompat (line 675) | class _ScikitCompat(ABC): method transform (line 681) | def transform(self, X): method predict (line 685) | def predict(self, X): class Pipeline (line 734) | class Pipeline(_ScikitCompat): method __init__ (line 753) | def __init__( method save_pretrained (line 824) | def save_pretrained(self, save_directory: str, safe_serialization: boo... method transform (line 871) | def transform(self, X): method predict (line 877) | def predict(self, X): method device_placement (line 884) | def device_placement(self): method ensure_tensor_on_device (line 909) | def ensure_tensor_on_device(self, **inputs): method _ensure_tensor_on_device (line 923) | def _ensure_tensor_on_device(self, inputs, device): method check_model_type (line 943) | def check_model_type(self, supported_models: Union[List[str], dict]): method _sanitize_parameters (line 967) | def _sanitize_parameters(self, **pipeline_parameters): method preprocess (line 980) | def preprocess(self, input_: Any, **preprocess_parameters: Dict) -> Di... method _forward (line 988) | def _forward(self, input_tensors: Dict[str, GenericTensor], **forward_... method postprocess (line 1001) | def postprocess(self, model_outputs: ModelOutput, **postprocess_parame... method get_inference_context (line 1009) | def get_inference_context(self): method forward (line 1017) | def forward(self, model_inputs, **forward_params): method get_iterator (line 1032) | def get_iterator( method __call__ (line 1057) | def __call__(self, inputs, *args, num_workers=None, batch_size=None, *... method run_multi (line 1122) | def run_multi(self, inputs, preprocess_params, forward_params, postpro... method run_single (line 1125) | def run_single(self, inputs, preprocess_params, forward_params, postpr... method iterate (line 1131) | def iterate(self, inputs, preprocess_params, forward_params, postproce... class ChunkPipeline (line 1138) | class ChunkPipeline(Pipeline): method run_single (line 1139) | def run_single(self, inputs, preprocess_params, forward_params, postpr... method get_iterator (line 1147) | def get_iterator( class PipelineRegistry (line 1170) | class PipelineRegistry: method __init__ (line 1171) | def __init__(self, supported_tasks: Dict[str, Any], task_aliases: Dict... method get_supported_tasks (line 1175) | def get_supported_tasks(self) -> List[str]: method check_task (line 1180) | def check_task(self, task: str) -> Tuple[str, Dict, Any]: method register_pipeline (line 1199) | def register_pipeline( method to_dict (line 1234) | def to_dict(self): FILE: transformers/pipelines/conversational.py class Conversation (line 18) | class Conversation: method __init__ (line 56) | def __init__( method __eq__ (line 71) | def __eq__(self, other): method add_user_input (line 82) | def add_user_input(self, text: str, overwrite: bool = False): method mark_processed (line 106) | def mark_processed(self): method append_response (line 115) | def append_response(self, response: str): method iter_texts (line 124) | def iter_texts(self): method __repr__ (line 137) | def __repr__(self): class ConversationalPipeline (line 163) | class ConversationalPipeline(Pipeline): method __init__ (line 195) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 200) | def _sanitize_parameters( method __call__ (line 222) | def __call__(self, conversations: Union[Conversation, List[Conversatio... method preprocess (line 248) | def preprocess(self, conversation: Conversation, min_length_for_respon... method _forward (line 268) | def _forward(self, model_inputs, minimum_tokens=10, **generate_kwargs): method postprocess (line 287) | def postprocess(self, model_outputs, clean_up_tokenization_spaces=True): method _legacy_parse_and_tokenize (line 299) | def _legacy_parse_and_tokenize(self, conversation: Conversation) -> Dict: FILE: transformers/pipelines/depth_estimation.py class DepthEstimationPipeline (line 23) | class DepthEstimationPipeline(Pipeline): method __init__ (line 48) | def __init__(self, *args, **kwargs): method __call__ (line 53) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method _sanitize_parameters (line 84) | def _sanitize_parameters(self, **kwargs): method preprocess (line 87) | def preprocess(self, image): method _forward (line 93) | def _forward(self, model_inputs): method postprocess (line 97) | def postprocess(self, model_outputs): FILE: transformers/pipelines/document_question_answering.py function normalize_box (line 53) | def normalize_box(box, width, height): function apply_tesseract (line 62) | def apply_tesseract(image: "Image.Image", lang: Optional[str], tesseract... class ModelType (line 95) | class ModelType(ExplicitEnum): class DocumentQuestionAnsweringPipeline (line 102) | class DocumentQuestionAnsweringPipeline(ChunkPipeline): method __init__ (line 132) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 151) | def _sanitize_parameters( method __call__ (line 191) | def __call__( method preprocess (line 267) | def preprocess( method _forward (line 415) | def _forward(self, model_inputs): method postprocess (line 434) | def postprocess(self, model_outputs, top_k=1, **kwargs): method postprocess_encoder_decoder_single (line 443) | def postprocess_encoder_decoder_single(self, model_outputs, **kwargs): method postprocess_extractive_qa (line 459) | def postprocess_extractive_qa( FILE: transformers/pipelines/feature_extraction.py class FeatureExtractionPipeline (line 7) | class FeatureExtractionPipeline(Pipeline): method _sanitize_parameters (line 60) | def _sanitize_parameters(self, truncation=None, tokenize_kwargs=None, ... method preprocess (line 79) | def preprocess(self, inputs, **tokenize_kwargs) -> Dict[str, GenericTe... method _forward (line 84) | def _forward(self, model_inputs): method postprocess (line 88) | def postprocess(self, model_outputs, return_tensors=False): method __call__ (line 97) | def __call__(self, *args, **kwargs): FILE: transformers/pipelines/fill_mask.py class FillMaskPipeline (line 34) | class FillMaskPipeline(Pipeline): method get_masked_index (line 66) | def get_masked_index(self, input_ids: GenericTensor) -> np.ndarray: method _ensure_exactly_one_mask_token (line 75) | def _ensure_exactly_one_mask_token(self, input_ids: GenericTensor) -> ... method ensure_exactly_one_mask_token (line 85) | def ensure_exactly_one_mask_token(self, model_inputs: GenericTensor): method preprocess (line 93) | def preprocess(self, inputs, return_tensors=None, **preprocess_paramet... method _forward (line 100) | def _forward(self, model_inputs): method postprocess (line 105) | def postprocess(self, model_outputs, top_k=5, target_ids=None): method get_target_ids (line 160) | def get_target_ids(self, targets, top_k=None): method _sanitize_parameters (line 201) | def _sanitize_parameters(self, top_k=None, targets=None): method __call__ (line 217) | def __call__(self, inputs, *args, **kwargs): FILE: transformers/pipelines/image_classification.py class ImageClassificationPipeline (line 32) | class ImageClassificationPipeline(Pipeline): method __init__ (line 56) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 65) | def _sanitize_parameters(self, top_k=None): method __call__ (line 71) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method preprocess (line 102) | def preprocess(self, image): method _forward (line 107) | def _forward(self, model_inputs): method postprocess (line 111) | def postprocess(self, model_outputs, top_k=5): FILE: transformers/pipelines/image_segmentation.py class ImageSegmentationPipeline (line 31) | class ImageSegmentationPipeline(Pipeline): method __init__ (line 67) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 83) | def _sanitize_parameters(self, **kwargs): method __call__ (line 98) | def __call__(self, images, **kwargs) -> Union[Predictions, List[Predic... method preprocess (line 139) | def preprocess(self, image, subtask=None): method _forward (line 159) | def _forward(self, model_inputs): method postprocess (line 165) | def postprocess( FILE: transformers/pipelines/image_to_text.py class ImageToTextPipeline (line 31) | class ImageToTextPipeline(Pipeline): method __init__ (line 54) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 61) | def _sanitize_parameters(self, max_new_tokens=None, generate_kwargs=No... method __call__ (line 81) | def __call__(self, images: Union[str, List[str], "Image.Image", List["... method preprocess (line 108) | def preprocess(self, image, prompt=None): method _forward (line 147) | def _forward(self, model_inputs, generate_kwargs=None): method postprocess (line 158) | def postprocess(self, model_outputs): FILE: transformers/pipelines/mask_generation.py class MaskGenerationPipeline (line 23) | class MaskGenerationPipeline(ChunkPipeline): method __init__ (line 91) | def __init__(self, **kwargs): method _sanitize_parameters (line 101) | def _sanitize_parameters(self, **kwargs): method __call__ (line 133) | def __call__(self, image, *args, num_workers=None, batch_size=None, **... method preprocess (line 170) | def preprocess( method _forward (line 215) | def _forward( method postprocess (line 253) | def postprocess( FILE: transformers/pipelines/object_detection.py class ObjectDetectionPipeline (line 24) | class ObjectDetectionPipeline(Pipeline): method __init__ (line 49) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 60) | def _sanitize_parameters(self, **kwargs): method __call__ (line 66) | def __call__(self, *args, **kwargs) -> Union[Predictions, List[Predict... method preprocess (line 97) | def preprocess(self, image): method _forward (line 106) | def _forward(self, model_inputs): method postprocess (line 114) | def postprocess(self, model_outputs, threshold=0.9): method _get_bounding_box (line 159) | def _get_bounding_box(self, box: "torch.Tensor") -> Dict[str, int]: FILE: transformers/pipelines/pt_utils.py class PipelineDataset (line 8) | class PipelineDataset(Dataset): method __init__ (line 9) | def __init__(self, dataset, process, params): method __len__ (line 14) | def __len__(self): method __getitem__ (line 17) | def __getitem__(self, i): class PipelineIterator (line 23) | class PipelineIterator(IterableDataset): method __init__ (line 24) | def __init__(self, loader, infer, params, loader_batch_size=None): method __len__ (line 63) | def __len__(self): method __iter__ (line 66) | def __iter__(self): method loader_batch_item (line 70) | def loader_batch_item(self): method __next__ (line 117) | def __next__(self): class PipelineChunkIterator (line 151) | class PipelineChunkIterator(PipelineIterator): method __init__ (line 152) | def __init__(self, loader, infer, params, loader_batch_size=None): method __iter__ (line 172) | def __iter__(self): method __next__ (line 177) | def __next__(self): class PipelinePackIterator (line 196) | class PipelinePackIterator(PipelineIterator): method __iter__ (line 242) | def __iter__(self): method __next__ (line 246) | def __next__(self): class KeyDataset (line 296) | class KeyDataset(Dataset): method __init__ (line 297) | def __init__(self, dataset: Dataset, key: str): method __len__ (line 301) | def __len__(self): method __getitem__ (line 304) | def __getitem__(self, i): class KeyPairDataset (line 308) | class KeyPairDataset(Dataset): method __init__ (line 309) | def __init__(self, dataset: Dataset, key1: str, key2: str): method __len__ (line 314) | def __len__(self): method __getitem__ (line 317) | def __getitem__(self, i): FILE: transformers/pipelines/question_answering.py function decode_spans (line 45) | def decode_spans( function select_starts_ends (line 95) | def select_starts_ends( class QuestionAnsweringArgumentHandler (line 149) | class QuestionAnsweringArgumentHandler(ArgumentHandler): method normalize (line 158) | def normalize(self, item): method __call__ (line 173) | def __call__(self, *args, **kwargs): class QuestionAnsweringPipeline (line 224) | class QuestionAnsweringPipeline(ChunkPipeline): method __init__ (line 252) | def __init__( method create_sample (line 276) | def create_sample( method _sanitize_parameters (line 297) | def _sanitize_parameters( method __call__ (line 340) | def __call__(self, *args, **kwargs): method preprocess (line 393) | def preprocess(self, example, padding="do_not_pad", doc_stride=None, m... method _forward (line 510) | def _forward(self, inputs): method postprocess (line 520) | def postprocess( method get_indices (line 605) | def get_indices( method span_to_answer (line 623) | def span_to_answer(self, text: str, start: int, end: int) -> Dict[str,... FILE: transformers/pipelines/table_question_answering.py class TableQuestionAnsweringArgumentHandler (line 34) | class TableQuestionAnsweringArgumentHandler(ArgumentHandler): method __call__ (line 39) | def __call__(self, table=None, query=None, **kwargs): class TableQuestionAnsweringPipeline (line 88) | class TableQuestionAnsweringPipeline(Pipeline): method __init__ (line 121) | def __init__(self, args_parser=TableQuestionAnsweringArgumentHandler()... method batch_inference (line 141) | def batch_inference(self, **inputs): method sequential_inference (line 144) | def sequential_inference(self, **inputs): method __call__ (line 273) | def __call__(self, *args, **kwargs): method _sanitize_parameters (line 355) | def _sanitize_parameters(self, sequential=None, padding=None, truncati... method preprocess (line 367) | def preprocess(self, pipeline_input, sequential=None, padding=True, tr... method _forward (line 383) | def _forward(self, model_inputs, sequential=False): method postprocess (line 396) | def postprocess(self, model_outputs): FILE: transformers/pipelines/text2text_generation.py class ReturnType (line 20) | class ReturnType(enum.Enum): class Text2TextGenerationPipeline (line 26) | class Text2TextGenerationPipeline(Pipeline): method __init__ (line 64) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 73) | def _sanitize_parameters( method check_inputs (line 109) | def check_inputs(self, input_length: int, min_length: int, max_length:... method _parse_and_tokenize (line 115) | def _parse_and_tokenize(self, *args, truncation): method __call__ (line 136) | def __call__(self, *args, **kwargs): method preprocess (line 174) | def preprocess(self, inputs, truncation=TruncationStrategy.DO_NOT_TRUN... method _forward (line 178) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 195) | def postprocess(self, model_outputs, return_type=ReturnType.TEXT, clea... class SummarizationPipeline (line 213) | class SummarizationPipeline(Text2TextGenerationPipeline): method __call__ (line 241) | def __call__(self, *args, **kwargs): method check_inputs (line 267) | def check_inputs(self, input_length: int, min_length: int, max_length:... class TranslationPipeline (line 283) | class TranslationPipeline(Text2TextGenerationPipeline): method check_inputs (line 305) | def check_inputs(self, input_length: int, min_length: int, max_length:... method preprocess (line 313) | def preprocess(self, *args, truncation=TruncationStrategy.DO_NOT_TRUNC... method _sanitize_parameters (line 321) | def _sanitize_parameters(self, src_lang=None, tgt_lang=None, **kwargs): method __call__ (line 337) | def __call__(self, *args, **kwargs): FILE: transformers/pipelines/text_classification.py function sigmoid (line 17) | def sigmoid(_outputs): function softmax (line 21) | def softmax(_outputs): class ClassificationFunction (line 27) | class ClassificationFunction(ExplicitEnum): class TextClassificationPipeline (line 48) | class TextClassificationPipeline(Pipeline): method __init__ (line 82) | def __init__(self, **kwargs): method _sanitize_parameters (line 91) | def _sanitize_parameters(self, return_all_scores=None, function_to_app... method __call__ (line 121) | def __call__(self, *args, **kwargs): method preprocess (line 164) | def preprocess(self, inputs, **tokenizer_kwargs) -> Dict[str, GenericT... method _forward (line 181) | def _forward(self, model_inputs): method postprocess (line 184) | def postprocess(self, model_outputs, function_to_apply=None, top_k=1, ... FILE: transformers/pipelines/text_generation.py class ReturnType (line 14) | class ReturnType(enum.Enum): class TextGenerationPipeline (line 21) | class TextGenerationPipeline(Pipeline): method __init__ (line 63) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 90) | def _sanitize_parameters( method _parse_and_tokenize (line 150) | def _parse_and_tokenize(self, *args, **kwargs): method __call__ (line 160) | def __call__(self, text_inputs, **kwargs): method preprocess (line 203) | def preprocess(self, prompt_text, prefix="", handle_long_generation=No... method _forward (line 231) | def _forward(self, model_inputs, **generate_kwargs): method postprocess (line 271) | def postprocess(self, model_outputs, return_type=ReturnType.FULL_TEXT,... FILE: transformers/pipelines/token_classification.py class TokenClassificationArgumentHandler (line 25) | class TokenClassificationArgumentHandler(ArgumentHandler): method __call__ (line 30) | def __call__(self, inputs: Union[str, List[str]], **kwargs): class AggregationStrategy (line 51) | class AggregationStrategy(ExplicitEnum): class TokenClassificationPipeline (line 96) | class TokenClassificationPipeline(ChunkPipeline): method __init__ (line 135) | def __init__(self, args_parser=TokenClassificationArgumentHandler(), *... method _sanitize_parameters (line 146) | def _sanitize_parameters( method __call__ (line 219) | def __call__(self, inputs: Union[str, List[str]], **kwargs): method preprocess (line 251) | def preprocess(self, sentence, offset_mapping=None, **preprocess_params): method _forward (line 277) | def _forward(self, model_inputs): method postprocess (line 298) | def postprocess(self, all_outputs, aggregation_strategy=AggregationStr... method aggregate_overlapping_entities (line 336) | def aggregate_overlapping_entities(self, entities): method gather_pre_entities (line 356) | def gather_pre_entities( method aggregate (line 418) | def aggregate(self, pre_entities: List[dict], aggregation_strategy: Ag... method aggregate_word (line 440) | def aggregate_word(self, entities: List[dict], aggregation_strategy: A... method aggregate_words (line 470) | def aggregate_words(self, entities: List[dict], aggregation_strategy: ... method group_sub_entities (line 497) | def group_sub_entities(self, entities: List[dict]) -> dict: method get_tag (line 518) | def get_tag(self, entity_name: str) -> Tuple[str, str]: method group_entities (line 532) | def group_entities(self, entities: List[dict]) -> List[dict]: FILE: transformers/pipelines/video_classification.py class VideoClassificationPipeline (line 22) | class VideoClassificationPipeline(Pipeline): method __init__ (line 34) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 39) | def _sanitize_parameters(self, top_k=None, num_frames=None, frame_samp... method __call__ (line 51) | def __call__(self, videos: Union[str, List[str]], **kwargs): method preprocess (line 86) | def preprocess(self, video, num_frames=None, frame_sampling_rate=1): method _forward (line 106) | def _forward(self, model_inputs): method postprocess (line 110) | def postprocess(self, model_outputs, top_k=5): FILE: transformers/pipelines/visual_question_answering.py class VisualQuestionAnsweringPipeline (line 19) | class VisualQuestionAnsweringPipeline(Pipeline): method __init__ (line 54) | def __init__(self, *args, **kwargs): method _sanitize_parameters (line 58) | def _sanitize_parameters(self, top_k=None, padding=None, truncation=No... method __call__ (line 68) | def __call__(self, image: Union["Image.Image", str], question: str = N... method preprocess (line 112) | def preprocess(self, inputs, padding=False, truncation=False): method _forward (line 121) | def _forward(self, model_inputs): method postprocess (line 125) | def postprocess(self, model_outputs, top_k=5): FILE: transformers/pipelines/zero_shot_audio_classification.py class ZeroShotAudioClassificationPipeline (line 33) | class ZeroShotAudioClassificationPipeline(Pipeline): method __init__ (line 57) | def __init__(self, **kwargs): method __call__ (line 64) | def __call__(self, audios: Union[np.ndarray, bytes, str], **kwargs): method _sanitize_parameters (line 88) | def _sanitize_parameters(self, **kwargs): method preprocess (line 97) | def preprocess(self, audio, candidate_labels=None, hypothesis_template... method _forward (line 124) | def _forward(self, model_inputs): method postprocess (line 141) | def postprocess(self, model_outputs): FILE: transformers/pipelines/zero_shot_classification.py class ZeroShotClassificationArgumentHandler (line 13) | class ZeroShotClassificationArgumentHandler(ArgumentHandler): method _parse_labels (line 19) | def _parse_labels(self, labels): method __call__ (line 24) | def __call__(self, sequences, labels, hypothesis_template): class ZeroShotClassificationPipeline (line 46) | class ZeroShotClassificationPipeline(ChunkPipeline): method __init__ (line 86) | def __init__(self, args_parser=ZeroShotClassificationArgumentHandler()... method entailment_id (line 96) | def entailment_id(self): method _parse_and_tokenize (line 102) | def _parse_and_tokenize( method _sanitize_parameters (line 144) | def _sanitize_parameters(self, **kwargs): method __call__ (line 162) | def __call__( method preprocess (line 207) | def preprocess(self, inputs, candidate_labels=None, hypothesis_templat... method _forward (line 220) | def _forward(self, inputs): method postprocess (line 234) | def postprocess(self, model_outputs, multi_label=False): FILE: transformers/pipelines/zero_shot_image_classification.py class ZeroShotImageClassificationPipeline (line 31) | class ZeroShotImageClassificationPipeline(Pipeline): method __init__ (line 64) | def __init__(self, **kwargs): method __call__ (line 74) | def __call__(self, images: Union[str, List[str], "Image", List["Image"... method _sanitize_parameters (line 103) | def _sanitize_parameters(self, **kwargs): method preprocess (line 112) | def preprocess(self, image, candidate_labels=None, hypothesis_template... method _forward (line 121) | def _forward(self, model_inputs): method postprocess (line 138) | def postprocess(self, model_outputs): FILE: transformers/pipelines/zero_shot_object_detection.py class ZeroShotObjectDetectionPipeline (line 23) | class ZeroShotObjectDetectionPipeline(ChunkPipeline): method __init__ (line 56) | def __init__(self, **kwargs): method __call__ (line 65) | def __call__( method _sanitize_parameters (line 134) | def _sanitize_parameters(self, **kwargs): method preprocess (line 142) | def preprocess(self, inputs): method _forward (line 160) | def _forward(self, model_inputs): method postprocess (line 170) | def postprocess(self, model_outputs, threshold=0.1, top_k=None): method _get_bounding_box (line 192) | def _get_bounding_box(self, box: "torch.Tensor") -> Dict[str, int]: FILE: transformers/processing_utils.py class ProcessorMixin (line 40) | class ProcessorMixin(PushToHubMixin): method __init__ (line 52) | def __init__(self, *args, **kwargs): method __repr__ (line 86) | def __repr__(self): method save_pretrained (line 91) | def save_pretrained(self, save_directory, push_to_hub: bool = False, *... method from_pretrained (line 154) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method register_for_auto_class (line 188) | def register_for_auto_class(cls, auto_class="AutoProcessor"): method _get_arguments_from_pretrained (line 214) | def _get_arguments_from_pretrained(cls, pretrained_model_name_or_path,... method model_input_names (line 232) | def model_input_names(self): FILE: transformers/pytorch_utils.py function softmax_backward_data (line 35) | def softmax_backward_data(parent, grad_output, output, dim, self): function prune_linear_layer (line 49) | def prune_linear_layer(layer: nn.Linear, index: torch.LongTensor, dim: i... class Conv1D (line 83) | class Conv1D(nn.Module): method __init__ (line 94) | def __init__(self, nf, nx): method forward (line 101) | def forward(self, x): function prune_conv1d_layer (line 108) | def prune_conv1d_layer(layer: Conv1D, index: torch.LongTensor, dim: int ... function prune_layer (line 141) | def prune_layer( function apply_chunking_to_forward (line 165) | def apply_chunking_to_forward( function find_pruneable_heads_and_indices (line 240) | def find_pruneable_heads_and_indices( function meshgrid (line 267) | def meshgrid( function id_tensor_storage (line 283) | def id_tensor_storage(tensor: torch.Tensor) -> Tuple[torch.device, int, ... FILE: transformers/sagemaker/trainer_sm.py class SageMakerTrainer (line 23) | class SageMakerTrainer(Trainer): method __init__ (line 24) | def __init__(self, args=None, **kwargs): FILE: transformers/sagemaker/training_args_sm.py function is_sagemaker_model_parallel_available (line 32) | def is_sagemaker_model_parallel_available(): class SageMakerTrainingArguments (line 63) | class SageMakerTrainingArguments(TrainingArguments): method __post_init__ (line 69) | def __post_init__(self): method _setup_devices (line 78) | def _setup_devices(self) -> "torch.device": method world_size (line 124) | def world_size(self): method place_model_on_device (line 131) | def place_model_on_device(self): method _no_sync_in_gradient_accumulation (line 135) | def _no_sync_in_gradient_accumulation(self): FILE: transformers/testing_utils.py function parse_flag_from_env (line 132) | def parse_flag_from_env(key, default=False): function parse_int_from_env (line 148) | def parse_int_from_env(key, default=None): function is_pt_tf_cross_test (line 171) | def is_pt_tf_cross_test(test_case): function is_pt_flax_cross_test (line 190) | def is_pt_flax_cross_test(test_case): function is_staging_test (line 209) | def is_staging_test(test_case): function is_pipeline_test (line 226) | def is_pipeline_test(test_case): function is_tool_test (line 242) | def is_tool_test(test_case): function slow (line 257) | def slow(test_case): function tooslow (line 267) | def tooslow(test_case): function custom_tokenizers (line 278) | def custom_tokenizers(test_case): function require_bs4 (line 288) | def require_bs4(test_case): function require_accelerate (line 295) | def require_accelerate(test_case): function require_safetensors (line 302) | def require_safetensors(test_case): function require_rjieba (line 309) | def require_rjieba(test_case): function require_jieba (line 316) | def require_jieba(test_case): function require_tf2onnx (line 323) | def require_tf2onnx(test_case): function require_onnx (line 327) | def require_onnx(test_case): function require_timm (line 331) | def require_timm(test_case): function require_natten (line 341) | def require_natten(test_case): function require_torch (line 351) | def require_torch(test_case): function require_torchvision (line 361) | def require_torchvision(test_case): function require_torch_or_tf (line 371) | def require_torch_or_tf(test_case): function require_intel_extension_for_pytorch (line 383) | def require_intel_extension_for_pytorch(test_case): function require_tensorflow_probability (line 398) | def require_tensorflow_probability(test_case): function require_torchaudio (line 410) | def require_torchaudio(test_case): function require_tf (line 417) | def require_tf(test_case): function require_flax (line 424) | def require_flax(test_case): function require_sentencepiece (line 431) | def require_sentencepiece(test_case): function require_scipy (line 438) | def require_scipy(test_case): function require_tokenizers (line 445) | def require_tokenizers(test_case): function require_tensorflow_text (line 452) | def require_tensorflow_text(test_case): function require_keras_nlp (line 460) | def require_keras_nlp(test_case): function require_pandas (line 467) | def require_pandas(test_case): function require_pytesseract (line 474) | def require_pytesseract(test_case): function require_pytorch_quantization (line 481) | def require_pytorch_quantization(test_case): function require_vision (line 491) | def require_vision(test_case): function require_ftfy (line 499) | def require_ftfy(test_case): function require_spacy (line 506) | def require_spacy(test_case): function require_decord (line 513) | def require_decord(test_case): function require_torch_multi_gpu (line 520) | def require_torch_multi_gpu(test_case): function require_torch_non_multi_gpu (line 535) | def require_torch_non_multi_gpu(test_case): function require_torch_up_to_2_gpus (line 547) | def require_torch_up_to_2_gpus(test_case): function require_torch_tpu (line 559) | def require_torch_tpu(test_case): function require_torch_neuroncore (line 566) | def require_torch_neuroncore(test_case): function require_torchdynamo (line 594) | def require_torchdynamo(test_case): function require_torch_tensorrt_fx (line 599) | def require_torch_tensorrt_fx(test_case): function require_torch_gpu (line 604) | def require_torch_gpu(test_case): function require_torch_bf16_gpu (line 609) | def require_torch_bf16_gpu(test_case): function require_torch_bf16_cpu (line 617) | def require_torch_bf16_cpu(test_case): function require_torch_tf32 (line 625) | def require_torch_tf32(test_case): function require_detectron2 (line 632) | def require_detectron2(test_case): function require_faiss (line 637) | def require_faiss(test_case): function require_optuna (line 642) | def require_optuna(test_case): function require_ray (line 652) | def require_ray(test_case): function require_sigopt (line 662) | def require_sigopt(test_case): function require_wandb (line 672) | def require_wandb(test_case): function require_clearml (line 682) | def require_clearml(test_case): function require_soundfile (line 692) | def require_soundfile(test_case): function require_deepspeed (line 702) | def require_deepspeed(test_case): function require_fairscale (line 709) | def require_fairscale(test_case): function require_apex (line 716) | def require_apex(test_case): function require_bitsandbytes (line 723) | def require_bitsandbytes(test_case): function require_optimum (line 730) | def require_optimum(test_case): function require_phonemizer (line 737) | def require_phonemizer(test_case): function require_pyctcdecode (line 744) | def require_pyctcdecode(test_case): function require_librosa (line 751) | def require_librosa(test_case): function cmd_exists (line 758) | def cmd_exists(cmd): function require_usr_bin_time (line 762) | def require_usr_bin_time(test_case): function require_sudachi (line 769) | def require_sudachi(test_case): function require_jumanpp (line 776) | def require_jumanpp(test_case): function require_cython (line 783) | def require_cython(test_case): function get_gpu_count (line 790) | def get_gpu_count(): function get_tests_dir (line 810) | def get_tests_dir(append_path=None): function apply_print_resets (line 848) | def apply_print_resets(buf): function assert_screenout (line 852) | def assert_screenout(out, what): class CaptureStd (line 858) | class CaptureStd: method __init__ (line 907) | def __init__(self, out=True, err=True, replay=True): method __enter__ (line 924) | def __enter__(self): method __exit__ (line 935) | def __exit__(self, *exc): method __repr__ (line 950) | def __repr__(self): class CaptureStdout (line 965) | class CaptureStdout(CaptureStd): method __init__ (line 968) | def __init__(self, replay=True): class CaptureStderr (line 972) | class CaptureStderr(CaptureStd): method __init__ (line 975) | def __init__(self, replay=True): class CaptureLogger (line 979) | class CaptureLogger: method __init__ (line 1004) | def __init__(self, logger): method __enter__ (line 1010) | def __enter__(self): method __exit__ (line 1014) | def __exit__(self, *exc): method __repr__ (line 1018) | def __repr__(self): function LoggingLevel (line 1023) | def LoggingLevel(level): function ExtendSysPath (line 1045) | def ExtendSysPath(path: Union[str, os.PathLike]) -> Iterator[None]: class TestCasePlus (line 1065) | class TestCasePlus(unittest.TestCase): method setUp (line 1144) | def setUp(self): method test_file_path (line 1165) | def test_file_path(self): method test_file_path_str (line 1169) | def test_file_path_str(self): method test_file_dir (line 1173) | def test_file_dir(self): method test_file_dir_str (line 1177) | def test_file_dir_str(self): method tests_dir (line 1181) | def tests_dir(self): method tests_dir_str (line 1185) | def tests_dir_str(self): method examples_dir (line 1189) | def examples_dir(self): method examples_dir_str (line 1193) | def examples_dir_str(self): method repo_root_dir (line 1197) | def repo_root_dir(self): method repo_root_dir_str (line 1201) | def repo_root_dir_str(self): method src_dir (line 1205) | def src_dir(self): method src_dir_str (line 1209) | def src_dir_str(self): method get_env (line 1212) | def get_env(self): method get_auto_remove_tmp_dir (line 1232) | def get_auto_remove_tmp_dir(self, tmp_dir=None, before=None, after=None): method python_one_liner_max_rss (line 1300) | def python_one_liner_max_rss(self, one_liner_str): method tearDown (line 1333) | def tearDown(self): function mockenv (line 1348) | def mockenv(**kwargs): function mockenv_context (line 1361) | def mockenv_context(*remove, **update): function pytest_addoption_shared (line 1397) | def pytest_addoption_shared(parser): function pytest_terminal_summary_main (line 1416) | def pytest_terminal_summary_main(tr, id): class _RunOutput (line 1555) | class _RunOutput: method __init__ (line 1556) | def __init__(self, returncode, stdout, stderr): function _read_stream (line 1562) | async def _read_stream(stream, callback): function _stream_subprocess (line 1571) | async def _stream_subprocess(cmd, env=None, stdin=None, timeout=None, qu... function execute_subprocess_async (line 1612) | def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, qui... function pytest_xdist_worker_id (line 1634) | def pytest_xdist_worker_id(): function get_torch_dist_unique_port (line 1644) | def get_torch_dist_unique_port(): function nested_simplify (line 1656) | def nested_simplify(obj, decimals=3): function check_json_file_has_correct_format (line 1687) | def check_json_file_has_correct_format(file_path): function to_2tuple (line 1704) | def to_2tuple(x): class SubprocessCallException (line 1711) | class SubprocessCallException(Exception): function run_command (line 1715) | def run_command(command: List[str], return_stdout=False): class RequestCounter (line 1732) | class RequestCounter: method __enter__ (line 1737) | def __enter__(self): method __exit__ (line 1749) | def __exit__(self, *args, **kwargs): method new_request (line 1752) | def new_request(self, method, **kwargs): function is_flaky (line 1763) | def is_flaky(max_attempts: int = 5, wait_before_retry: Optional[float] =... function run_test_in_subprocess (line 1799) | def run_test_in_subprocess(test_case, target_func, inputs=None, timeout=... function preprocess_string (line 1852) | def preprocess_string(string, skip_cuda_tests): class HfDocTestParser (line 1879) | class HfDocTestParser(doctest.DocTestParser): method parse (line 1916) | def parse(self, string, name=""): class HfDoctestModule (line 1925) | class HfDoctestModule(Module): method collect (line 1931) | def collect(self) -> Iterable[DoctestItem]: FILE: transformers/tf_utils.py function shape_list (line 26) | def shape_list(tensor: Union[tf.Tensor, np.ndarray]) -> List[int]: function stable_softmax (line 49) | def stable_softmax(logits: tf.Tensor, axis: Optional[int] = None, name: ... function functional_layernorm (line 73) | def functional_layernorm(inputs, weight, bias, epsilon=1e-5, axis=-1): function flatten (line 105) | def flatten(input, start_dim=0, end_dim=-1): function invert_attention_mask (line 123) | def invert_attention_mask(encoder_attention_mask: tf.Tensor) -> tf.Tensor: function check_embeddings_within_bounds (line 151) | def check_embeddings_within_bounds(tensor: tf.Tensor, embed_dim: int, te... function save_attributes_to_hdf5_group (line 171) | def save_attributes_to_hdf5_group(group, name, data): function load_attributes_from_hdf5_group (line 218) | def load_attributes_from_hdf5_group(group, name): function expand_1d (line 246) | def expand_1d(data): FILE: transformers/time_series_utils.py class AffineTransformed (line 34) | class AffineTransformed(TransformedDistribution): method __init__ (line 35) | def __init__(self, base_distribution: Distribution, loc=None, scale=No... method mean (line 42) | def mean(self): method variance (line 49) | def variance(self): method stddev (line 56) | def stddev(self): class ParameterProjection (line 63) | class ParameterProjection(nn.Module): method __init__ (line 64) | def __init__( method forward (line 72) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor]: class LambdaLayer (line 78) | class LambdaLayer(nn.Module): method __init__ (line 79) | def __init__(self, function): method forward (line 83) | def forward(self, x, *args): class DistributionOutput (line 87) | class DistributionOutput: method __init__ (line 92) | def __init__(self, dim: int = 1) -> None: method _base_distribution (line 96) | def _base_distribution(self, distr_args): method distribution (line 102) | def distribution( method event_shape (line 115) | def event_shape(self) -> Tuple: method event_dim (line 122) | def event_dim(self) -> int: method value_in_support (line 130) | def value_in_support(self) -> float: method get_parameter_projection (line 137) | def get_parameter_projection(self, in_features: int) -> nn.Module: method domain_map (line 147) | def domain_map(self, *args: torch.Tensor): method squareplus (line 156) | def squareplus(x: torch.Tensor) -> torch.Tensor: class StudentTOutput (line 164) | class StudentTOutput(DistributionOutput): method domain_map (line 173) | def domain_map(cls, df: torch.Tensor, loc: torch.Tensor, scale: torch.... class NormalOutput (line 179) | class NormalOutput(DistributionOutput): method domain_map (line 188) | def domain_map(cls, loc: torch.Tensor, scale: torch.Tensor): class NegativeBinomialOutput (line 193) | class NegativeBinomialOutput(DistributionOutput): method domain_map (line 202) | def domain_map(cls, total_count: torch.Tensor, logits: torch.Tensor): method _base_distribution (line 206) | def _base_distribution(self, distr_args) -> Distribution: method distribution (line 216) | def distribution( FILE: transformers/tokenization_utils.py class Trie (line 52) | class Trie: method __init__ (line 58) | def __init__(self): method add (line 61) | def add(self, word: str): method split (line 90) | def split(self, text: str) -> List[str]: method cut_text (line 243) | def cut_text(self, text, offsets): function _is_whitespace (line 268) | def _is_whitespace(char): function _is_control (line 280) | def _is_control(char): function _is_punctuation (line 292) | def _is_punctuation(char): function _is_end_of_word (line 307) | def _is_end_of_word(text): function _is_start_of_word (line 313) | def _is_start_of_word(text): function _insert_one_token_to_ordered_list (line 319) | def _insert_one_token_to_ordered_list(token_list: List[str], new_token: ... class PreTrainedTokenizer (line 333) | class PreTrainedTokenizer(PreTrainedTokenizerBase): method __init__ (line 346) | def __init__(self, **kwargs): method is_fast (line 359) | def is_fast(self) -> bool: method vocab_size (line 363) | def vocab_size(self) -> int: method get_added_vocab (line 369) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 378) | def __len__(self): method _add_tokens (line 384) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method _create_trie (line 449) | def _create_trie(self, unique_no_split_tokens): method num_special_tokens_to_add (line 458) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method tokenize (line 481) | def tokenize(self, text: TextInput, **kwargs) -> List[str]: method _tokenize (line 551) | def _tokenize(self, text, **kwargs): method convert_tokens_to_ids (line 560) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 582) | def _convert_token_to_id_with_added_voc(self, token): method _convert_token_to_id (line 590) | def _convert_token_to_id(self, token): method _encode_plus (line 593) | def _encode_plus( method _batch_encode_plus (line 671) | def _batch_encode_plus( method _batch_prepare_for_model (line 757) | def _batch_prepare_for_model( method prepare_for_tokenization (line 821) | def prepare_for_tokenization( method get_special_tokens_mask (line 845) | def get_special_tokens_mask( method convert_ids_to_tokens (line 876) | def convert_ids_to_tokens(self, ids: int, skip_special_tokens: bool = ... method convert_ids_to_tokens (line 880) | def convert_ids_to_tokens(self, ids: List[int], skip_special_tokens: b... method convert_ids_to_tokens (line 883) | def convert_ids_to_tokens( method _convert_id_to_token (line 915) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 918) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 921) | def _decode( FILE: transformers/tokenization_utils_base.py class AddedToken (line 80) | class AddedToken: method __getstate__ (line 92) | def __getstate__(self): class EncodingFast (line 96) | class EncodingFast: class TruncationStrategy (line 126) | class TruncationStrategy(ExplicitEnum): class CharSpan (line 138) | class CharSpan(NamedTuple): class TokenSpan (line 151) | class TokenSpan(NamedTuple): class BatchEncoding (line 164) | class BatchEncoding(UserDict): method __init__ (line 191) | def __init__( method n_sequences (line 214) | def n_sequences(self) -> Optional[int]: method is_fast (line 223) | def is_fast(self) -> bool: method __getitem__ (line 230) | def __getitem__(self, item: Union[int, str]) -> Union[Any, EncodingFast]: method __getattr__ (line 252) | def __getattr__(self, item: str): method __getstate__ (line 258) | def __getstate__(self): method __setstate__ (line 261) | def __setstate__(self, state): method keys (line 268) | def keys(self): method values (line 271) | def values(self): method items (line 274) | def items(self): method encodings (line 282) | def encodings(self) -> Optional[List[EncodingFast]]: method tokens (line 289) | def tokens(self, batch_index: int = 0) -> List[str]: method sequence_ids (line 307) | def sequence_ids(self, batch_index: int = 0) -> List[Optional[int]]: method words (line 331) | def words(self, batch_index: int = 0) -> List[Optional[int]]: method word_ids (line 355) | def word_ids(self, batch_index: int = 0) -> List[Optional[int]]: method token_to_sequence (line 374) | def token_to_sequence(self, batch_or_token_index: int, token_index: Op... method token_to_word (line 413) | def token_to_word(self, batch_or_token_index: int, token_index: Option... method word_to_tokens (line 451) | def word_to_tokens( method token_to_chars (line 504) | def token_to_chars(self, batch_or_token_index: int, token_index: Optio... method char_to_token (line 543) | def char_to_token( method word_to_chars (line 584) | def word_to_chars( method char_to_word (line 629) | def char_to_word(self, batch_or_char_index: int, char_index: Optional[... method convert_to_tensors (line 668) | def convert_to_tensors( method to (line 756) | def to(self, device: Union[str, "torch.device"]) -> "BatchEncoding": class SpecialTokensMixin (line 778) | class SpecialTokensMixin: method __init__ (line 816) | def __init__(self, verbose=True, **kwargs): method sanitize_special_tokens (line 846) | def sanitize_special_tokens(self) -> int: method add_special_tokens (line 858) | def add_special_tokens( method add_tokens (line 952) | def add_tokens( method _add_tokens (line 1001) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method bos_token (line 1005) | def bos_token(self) -> str: method eos_token (line 1016) | def eos_token(self) -> str: method unk_token (line 1027) | def unk_token(self) -> str: method sep_token (line 1038) | def sep_token(self) -> str: method pad_token (line 1050) | def pad_token(self) -> str: method cls_token (line 1061) | def cls_token(self) -> str: method mask_token (line 1073) | def mask_token(self) -> str: method additional_special_tokens (line 1085) | def additional_special_tokens(self) -> List[str]: method bos_token (line 1097) | def bos_token(self, value): method eos_token (line 1101) | def eos_token(self, value): method unk_token (line 1105) | def unk_token(self, value): method sep_token (line 1109) | def sep_token(self, value): method pad_token (line 1113) | def pad_token(self, value): method cls_token (line 1117) | def cls_token(self, value): method mask_token (line 1121) | def mask_token(self, value): method additional_special_tokens (line 1125) | def additional_special_tokens(self, value): method bos_token_id (line 1129) | def bos_token_id(self) -> Optional[int]: method eos_token_id (line 1139) | def eos_token_id(self) -> Optional[int]: method unk_token_id (line 1149) | def unk_token_id(self) -> Optional[int]: method sep_token_id (line 1158) | def sep_token_id(self) -> Optional[int]: method pad_token_id (line 1168) | def pad_token_id(self) -> Optional[int]: method pad_token_type_id (line 1177) | def pad_token_type_id(self) -> int: method cls_token_id (line 1184) | def cls_token_id(self) -> Optional[int]: method mask_token_id (line 1196) | def mask_token_id(self) -> Optional[int]: method additional_special_tokens_ids (line 1206) | def additional_special_tokens_ids(self) -> List[int]: method bos_token_id (line 1214) | def bos_token_id(self, value): method eos_token_id (line 1218) | def eos_token_id(self, value): method unk_token_id (line 1222) | def unk_token_id(self, value): method sep_token_id (line 1226) | def sep_token_id(self, value): method pad_token_id (line 1230) | def pad_token_id(self, value): method cls_token_id (line 1234) | def cls_token_id(self, value): method mask_token_id (line 1238) | def mask_token_id(self, value): method additional_special_tokens_ids (line 1242) | def additional_special_tokens_ids(self, values): method special_tokens_map (line 1246) | def special_tokens_map(self) -> Dict[str, Union[str, List[str]]]: method special_tokens_map_extended (line 1265) | def special_tokens_map_extended(self) -> Dict[str, Union[str, AddedTok... method all_special_tokens (line 1281) | def all_special_tokens(self) -> List[str]: method all_special_tokens_extended (line 1291) | def all_special_tokens_extended(self) -> List[Union[str, AddedToken]]: method all_special_ids (line 1307) | def all_special_ids(self) -> List[int]: class PreTrainedTokenizerBase (line 1494) | class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin): method __init__ (line 1514) | def __init__(self, **kwargs): method max_len_single_sentence (line 1551) | def max_len_single_sentence(self) -> int: method max_len_sentences_pair (line 1558) | def max_len_sentences_pair(self) -> int: method max_len_single_sentence (line 1565) | def max_len_single_sentence(self, value) -> int: method max_len_sentences_pair (line 1579) | def max_len_sentences_pair(self, value) -> int: method _set_processor_class (line 1590) | def _set_processor_class(self, processor_class: str): method __repr__ (line 1594) | def __repr__(self) -> str: method __len__ (line 1602) | def __len__(self) -> int: method get_vocab (line 1605) | def get_vocab(self) -> Dict[str, int]: method from_pretrained (line 1618) | def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.... method _from_pretrained (line 1839) | def _from_pretrained( method _eventually_correct_t5_max_length (line 2071) | def _eventually_correct_t5_max_length(pretrained_model_name_or_path, m... method save_pretrained (line 2078) | def save_pretrained( method _save_pretrained (line 2223) | def _save_pretrained( method save_vocabulary (line 2257) | def save_vocabulary(self, save_directory: str, filename_prefix: Option... method tokenize (line 2275) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method encode (line 2305) | def encode( method num_special_tokens_to_add (line 2346) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method _get_padding_truncation_strategies (line 2349) | def _get_padding_truncation_strategies( method __call__ (line 2488) | def __call__( method _call_one (line 2576) | def _call_one( method encode_plus (line 2689) | def encode_plus( method _encode_plus (line 2761) | def _encode_plus( method batch_encode_plus (line 2785) | def batch_encode_plus( method _batch_encode_plus (line 2858) | def _batch_encode_plus( method pad (line 2887) | def pad( method create_token_type_ids_from_sequences (line 3060) | def create_token_type_ids_from_sequences( method build_inputs_with_special_tokens (line 3080) | def build_inputs_with_special_tokens( method prepare_for_model (line 3101) | def prepare_for_model( method truncate_sequences (line 3236) | def truncate_sequences( method _pad (line 3355) | def _pad( method convert_tokens_to_string (line 3432) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method batch_decode (line 3445) | def batch_decode( method decode (line 3479) | def decode( method _decode (line 3516) | def _decode( method get_special_tokens_mask (line 3525) | def get_special_tokens_mask( method clean_up_tokenization (line 3557) | def clean_up_tokenization(out_string: str) -> str: method _eventual_warn_about_too_long_sequence (line 3581) | def _eventual_warn_about_too_long_sequence(self, ids: List[int], max_l... method _switch_to_input_mode (line 3601) | def _switch_to_input_mode(self): method _switch_to_target_mode (line 3607) | def _switch_to_target_mode(self): method as_target_tokenizer (line 3614) | def as_target_tokenizer(self): method register_for_auto_class (line 3631) | def register_for_auto_class(cls, auto_class="AutoTokenizer"): method prepare_seq2seq_batch (line 3656) | def prepare_seq2seq_batch( function get_fast_tokenizer_file (line 3779) | def get_fast_tokenizer_file(tokenization_files: List[str]) -> str: FILE: transformers/tokenization_utils_fast.py class PreTrainedTokenizerFast (line 78) | class PreTrainedTokenizerFast(PreTrainedTokenizerBase): method __init__ (line 95) | def __init__(self, *args, **kwargs): method is_fast (line 139) | def is_fast(self) -> bool: method vocab_size (line 143) | def vocab_size(self) -> int: method get_vocab (line 149) | def get_vocab(self) -> Dict[str, int]: method vocab (line 153) | def vocab(self) -> Dict[str, int]: method get_added_vocab (line 156) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 168) | def __len__(self) -> int: method backend_tokenizer (line 175) | def backend_tokenizer(self) -> TokenizerFast: method decoder (line 182) | def decoder(self) -> DecoderFast: method _convert_encoding (line 188) | def _convert_encoding( method convert_tokens_to_ids (line 235) | def convert_tokens_to_ids(self, tokens: Union[str, List[str]]) -> Unio... method _convert_token_to_id_with_added_voc (line 254) | def _convert_token_to_id_with_added_voc(self, token: str) -> int: method _convert_id_to_token (line 260) | def _convert_id_to_token(self, index: int) -> Optional[str]: method _add_tokens (line 263) | def _add_tokens(self, new_tokens: List[Union[str, AddedToken]], specia... method num_special_tokens_to_add (line 269) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method convert_ids_to_tokens (line 290) | def convert_ids_to_tokens( method tokenize (line 316) | def tokenize(self, text: str, pair: Optional[str] = None, add_special_... method set_truncation_and_padding (line 319) | def set_truncation_and_padding( method _batch_encode_plus (line 390) | def _batch_encode_plus( method _encode_plus (line 475) | def _encode_plus( method convert_tokens_to_string (line 532) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method _decode (line 535) | def _decode( method _save_pretrained (line 559) | def _save_pretrained( method train_new_from_iterator (line 607) | def train_new_from_iterator( FILE: transformers/tools/agents.py class PreTool (line 59) | class PreTool: function get_remote_tools (line 76) | def get_remote_tools(organization="huggingface-tools"): function _setup_default_tools (line 91) | def _setup_default_tools(): function resolve_tools (line 121) | def resolve_tools(code, toolbox, remote=False, cached_tools=None): function get_tool_creation_code (line 140) | def get_tool_creation_code(code, toolbox, remote=False): function clean_code_for_chat (line 156) | def clean_code_for_chat(result): function clean_code_for_run (line 174) | def clean_code_for_run(result): class Agent (line 190) | class Agent: method __init__ (line 208) | def __init__(self, chat_prompt_template=None, run_prompt_template=None... method toolbox (line 236) | def toolbox(self) -> Dict[str, Tool]: method format_prompt (line 240) | def format_prompt(self, task, chat_mode=False): method set_stream (line 253) | def set_stream(self, streamer): method chat (line 262) | def chat(self, task, *, return_code=False, remote=False, **kwargs): method prepare_for_new_chat (line 304) | def prepare_for_new_chat(self): method run (line 312) | def run(self, task, *, return_code=False, remote=False, **kwargs): method generate_one (line 349) | def generate_one(self, prompt, stop): method generate_many (line 353) | def generate_many(self, prompts, stop): class OpenAiAgent (line 358) | class OpenAiAgent(Agent): method __init__ (line 396) | def __init__( method generate_many (line 424) | def generate_many(self, prompts, stop): method generate_one (line 430) | def generate_one(self, prompt, stop): method _chat_generate (line 436) | def _chat_generate(self, prompt, stop): method _completion_generate (line 445) | def _completion_generate(self, prompts, stop): class AzureOpenAiAgent (line 456) | class AzureOpenAiAgent(Agent): method __init__ (line 504) | def __init__( method generate_many (line 550) | def generate_many(self, prompts, stop): method generate_one (line 556) | def generate_one(self, prompt, stop): method _chat_generate (line 562) | def _chat_generate(self, prompt, stop): method _completion_generate (line 571) | def _completion_generate(self, prompts, stop): class HfAgent (line 582) | class HfAgent(Agent): method __init__ (line 614) | def __init__( method generate_one (line 630) | def generate_one(self, prompt, stop): class LocalAgent (line 653) | class LocalAgent(Agent): method __init__ (line 689) | def __init__(self, model, tokenizer, chat_prompt_template=None, run_pr... method from_pretrained (line 699) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs): method _model_device (line 724) | def _model_device(self): method generate_one (line 730) | def generate_one(self, prompt, stop): class StopSequenceCriteria (line 746) | class StopSequenceCriteria(StoppingCriteria): method __init__ (line 757) | def __init__(self, stop_sequences, tokenizer): method __call__ (line 763) | def __call__(self, input_ids, scores, **kwargs) -> bool: FILE: transformers/tools/base.py function get_repo_type (line 54) | def get_repo_type(repo_id, repo_type=None, **hub_kwargs): class Tool (line 80) | class Tool: method __init__ (line 108) | def __init__(self, *args, **kwargs): method __call__ (line 111) | def __call__(self, *args, **kwargs): method setup (line 114) | def setup(self): method save (line 121) | def save(self, output_dir): method from_hub (line 176) | def from_hub( method push_to_hub (line 285) | def push_to_hub( method from_gradio (line 330) | def from_gradio(gradio_tool): class RemoteTool (line 345) | class RemoteTool(Tool): method __init__ (line 360) | def __init__(self, endpoint_url=None, token=None, tool_class=None): method prepare_inputs (line 365) | def prepare_inputs(self, *args, **kwargs): method extract_outputs (line 408) | def extract_outputs(self, outputs): method __call__ (line 415) | def __call__(self, *args, **kwargs): class PipelineTool (line 427) | class PipelineTool(Tool): method __init__ (line 470) | def __init__( method setup (line 507) | def setup(self): method encode (line 533) | def encode(self, raw_inputs): method forward (line 539) | def forward(self, inputs): method decode (line 546) | def decode(self, outputs): method __call__ (line 552) | def __call__(self, *args, **kwargs): function launch_gradio_demo (line 563) | def launch_gradio_demo(tool_class: Tool): function get_default_device (line 591) | def get_default_device(): function get_default_endpoints (line 617) | def get_default_endpoints(): function supports_remote (line 624) | def supports_remote(task_or_repo_id): function load_tool (line 629) | def load_tool(task_or_repo_id, model_repo_id=None, remote=False, token=N... function add_description (line 683) | def add_description(description): class EndpointClient (line 697) | class EndpointClient: method __init__ (line 698) | def __init__(self, endpoint_url: str, token: Optional[str] = None): method encode_image (line 703) | def encode_image(image): method decode_image (line 710) | def decode_image(raw_image): method __call__ (line 722) | def __call__( FILE: transformers/tools/document_question_answering.py class DocumentQuestionAnsweringTool (line 29) | class DocumentQuestionAnsweringTool(PipelineTool): method __init__ (line 43) | def __init__(self, *args, **kwargs): method encode (line 49) | def encode(self, document: "Image", question: str): method forward (line 59) | def forward(self, inputs): method decode (line 73) | def decode(self, outputs): FILE: transformers/tools/evaluate_agent.py function classifier (line 22) | def classifier(text, labels): function translator (line 26) | def translator(text, src_lang, tgt_lang): function speaker (line 30) | def speaker(text): function transcriber (line 34) | def transcriber(audio): function image_generator (line 40) | def image_generator(prompt): function image_captioner (line 44) | def image_captioner(image): function image_transformer (line 50) | def image_transformer(image, prompt): function question_answerer (line 56) | def question_answerer(text, question): function image_qa (line 60) | def image_qa(image, question): function text_downloader (line 66) | def text_downloader(url): function summarizer (line 70) | def summarizer(text): function video_generator (line 74) | def video_generator(prompt, seconds=2): function document_qa (line 78) | def document_qa(image, question): function image_segmenter (line 82) | def image_segmenter(image, prompt): class Problem (line 104) | class Problem: method __init__ (line 120) | def __init__(self, task, inputs, answer): function get_theoretical_tools (line 400) | def get_theoretical_tools(agent_answer, theoretical_answer, code_answer): function evaluate_code (line 416) | def evaluate_code(code, inputs=None, state=None, verbose=False, return_i... function score_code (line 443) | def score_code(agent_answer, theoretical_answer, verbose: bool = False): function evaluate_one_result (line 462) | def evaluate_one_result(explanation, code, agent_answer, theoretical_ans... function evaluate_agent (line 505) | def evaluate_agent(agent, batch_size=8, verbose=False, return_errors=Fal... function evaluate_chat_agent (line 594) | def evaluate_chat_agent(agent, verbose=False, return_errors=False): FILE: transformers/tools/image_captioning.py class ImageCaptioningTool (line 28) | class ImageCaptioningTool(PipelineTool): method __init__ (line 40) | def __init__(self, *args, **kwargs): method encode (line 44) | def encode(self, image: "Image"): method forward (line 47) | def forward(self, inputs): method decode (line 50) | def decode(self, outputs): FILE: transformers/tools/image_question_answering.py class ImageQuestionAnsweringTool (line 30) | class ImageQuestionAnsweringTool(PipelineTool): method __init__ (line 44) | def __init__(self, *args, **kwargs): method encode (line 48) | def encode(self, image: "Image", question: str): method forward (line 51) | def forward(self, inputs): method decode (line 55) | def decode(self, outputs): FILE: transformers/tools/image_segmentation.py class ImageSegmentationTool (line 29) | class ImageSegmentationTool(PipelineTool): method __init__ (line 42) | def __init__(self, *args, **kwargs): method encode (line 46) | def encode(self, image: "Image", label: str): method forward (line 50) | def forward(self, inputs): method decode (line 55) | def decode(self, outputs): FILE: transformers/tools/prompts.py function download_prompt (line 33) | def download_prompt(prompt_or_repo_id, agent_name, mode="run"): FILE: transformers/tools/python_interpreter.py class InterpretorError (line 23) | class InterpretorError(ValueError): function evaluate (line 32) | def evaluate(code: str, tools: Dict[str, Callable], state=None, chat_mod... function evaluate_ast (line 78) | def evaluate_ast(expression: ast.AST, state: Dict[str, Any], tools: Dict... function evaluate_assign (line 137) | def evaluate_assign(assign, state, tools): function evaluate_call (line 151) | def evaluate_call(call, state, tools): function evaluate_subscript (line 170) | def evaluate_subscript(subscript, state, tools): function evaluate_name (line 185) | def evaluate_name(name, state, tools): function evaluate_condition (line 194) | def evaluate_condition(condition, state, tools): function evaluate_if (line 226) | def evaluate_if(if_statement, state, tools): FILE: transformers/tools/speech_to_text.py class SpeechToTextTool (line 21) | class SpeechToTextTool(PipelineTool): method encode (line 34) | def encode(self, audio): method forward (line 37) | def forward(self, inputs): method decode (line 40) | def decode(self, outputs): FILE: transformers/tools/text_classification.py class TextClassificationTool (line 23) | class TextClassificationTool(PipelineTool): method setup (line 48) | def setup(self): method encode (line 58) | def encode(self, text, labels): method decode (line 67) | def decode(self, outputs): FILE: transformers/tools/text_question_answering.py class TextQuestionAnsweringTool (line 26) | class TextQuestionAnsweringTool(PipelineTool): method encode (line 39) | def encode(self, text: str, question: str): method forward (line 43) | def forward(self, inputs): method decode (line 51) | def decode(self, outputs): FILE: transformers/tools/text_summarization.py class TextSummarizationTool (line 21) | class TextSummarizationTool(PipelineTool): method encode (line 45) | def encode(self, text): method forward (line 48) | def forward(self, inputs): method decode (line 51) | def decode(self, outputs): FILE: transformers/tools/text_to_speech.py class TextToSpeechTool (line 28) | class TextToSpeechTool(PipelineTool): method setup (line 42) | def setup(self): method encode (line 47) | def encode(self, text, speaker_embeddings=None): method forward (line 59) | def forward(self, inputs): method decode (line 63) | def decode(self, outputs): FILE: transformers/tools/translation.py class TranslationTool (line 229) | class TranslationTool(PipelineTool): method encode (line 256) | def encode(self, text, src_lang, tgt_lang): method forward (line 267) | def forward(self, inputs): method decode (line 270) | def decode(self, outputs): FILE: transformers/trainer.py class Trainer (line 240) | class Trainer: method __init__ (line 325) | def __init__( method add_callback (line 715) | def add_callback(self, callback): method pop_callback (line 726) | def pop_callback(self, callback): method remove_callback (line 742) | def remove_callback(self, callback): method _move_model_to_device (line 753) | def _move_model_to_device(self, model, device): method _set_signature_columns_if_needed (line 759) | def _set_signature_columns_if_needed(self): method _remove_unused_columns (line 767) | def _remove_unused_columns(self, dataset: "datasets.Dataset", descript... method _get_collator_with_removed_columns (line 793) | def _get_collator_with_removed_columns( method _get_train_sampler (line 811) | def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]: method get_train_dataloader (line 882) | def get_train_dataloader(self) -> DataLoader: method _get_eval_sampler (line 932) | def _get_eval_sampler(self, eval_dataset: Dataset) -> Optional[torch.u... method get_eval_dataloader (line 961) | def get_eval_dataloader(self, eval_dataset: Optional[Dataset] = None) ... method get_test_dataloader (line 1011) | def get_test_dataloader(self, test_dataset: Dataset) -> DataLoader: method create_optimizer_and_scheduler (line 1059) | def create_optimizer_and_scheduler(self, num_training_steps: int): method create_optimizer (line 1075) | def create_optimizer(self): method get_optimizer_cls_and_kwargs (line 1132) | def get_optimizer_cls_and_kwargs(args: TrainingArguments) -> Tuple[Any... method create_scheduler (line 1254) | def create_scheduler(self, num_training_steps: int, optimizer: torch.o... method num_examples (line 1271) | def num_examples(self, dataloader: DataLoader) -> int: method _hp_search_setup (line 1285) | def _hp_search_setup(self, trial: Union["optuna.Trial", Dict[str, Any]]): method _report_to_hp_search (line 1332) | def _report_to_hp_search(self, trial: Union["optuna.Trial", Dict[str, ... method _tune_save_checkpoint (line 1350) | def _tune_save_checkpoint(self): method call_model_init (line 1363) | def call_model_init(self, trial=None): method torch_jit_model_eval (line 1377) | def torch_jit_model_eval(self, model, dataloader, training=False): method ipex_optimize_model (line 1415) | def ipex_optimize_model(self, model, training=False, dtype=torch.float... method _wrap_model (line 1438) | def _wrap_model(self, model, training=True, dataloader=None): method train (line 1566) | def train( method _inner_training_loop (line 1652) | def _inner_training_loop( method _get_output_dir (line 2094) | def _get_output_dir(self, trial): method _load_from_checkpoint (line 2114) | def _load_from_checkpoint(self, resume_from_checkpoint, model=None): method _load_best_model (line 2187) | def _load_best_model(self): method _issue_warnings_after_load (line 2274) | def _issue_warnings_after_load(self, load_result): method _maybe_log_save_evaluate (line 2287) | def _maybe_log_save_evaluate(self, tr_loss, model, trial, epoch, ignor... method _load_rng_state (line 2335) | def _load_rng_state(self, checkpoint): method _save_checkpoint (line 2376) | def _save_checkpoint(self, model, trial, metrics=None): method _load_optimizer_and_scheduler (line 2492) | def _load_optimizer_and_scheduler(self, checkpoint): method hyperparameter_search (line 2561) | def hyperparameter_search( method log (line 2657) | def log(self, logs: Dict[str, float]) -> None: method _prepare_input (line 2674) | def _prepare_input(self, data: Union[torch.Tensor, Any]) -> Union[torc... method _prepare_inputs (line 2692) | def _prepare_inputs(self, inputs: Dict[str, Union[torch.Tensor, Any]])... method compute_loss_context_manager (line 2708) | def compute_loss_context_manager(self): method autocast_smart_context_manager (line 2714) | def autocast_smart_context_manager(self, cache_enabled: Optional[bool]... method training_step (line 2733) | def training_step(self, model: nn.Module, inputs: Dict[str, Union[torc... method compute_loss (line 2774) | def compute_loss(self, model, inputs, return_outputs=False): method is_local_process_zero (line 2810) | def is_local_process_zero(self) -> bool: method is_world_process_zero (line 2817) | def is_world_process_zero(self) -> bool: method save_model (line 2829) | def save_model(self, output_dir: Optional[str] = None, _internal_call:... method _save_tpu (line 2898) | def _save_tpu(self, output_dir: Optional[str] = None): method _save (line 2926) | def _save(self, output_dir: Optional[str] = None, state_dict=None): method store_flos (line 2960) | def store_flos(self): method _sorted_checkpoints (line 2971) | def _sorted_checkpoints( method _rotate_checkpoints (line 2995) | def _rotate_checkpoints(self, use_mtime=False, output_dir=None) -> None: method evaluate (line 3020) | def evaluate( method predict (line 3091) | def predict( method evaluation_loop (line 3153) | def evaluation_loop( method _nested_gather (line 3376) | def _nested_gather(self, tensors, name=None): method _pad_across_processes (line 3396) | def _pad_across_processes(self, tensor, pad_index=-100): method prediction_step (line 3430) | def prediction_step( method floating_point_ops (line 3536) | def floating_point_ops(self, inputs: Dict[str, Union[torch.Tensor, Any... method init_git_repo (line 3554) | def init_git_repo(self, at_init: bool = False): method create_model_card (line 3601) | def create_model_card( method _push_from_checkpoint (line 3657) | def _push_from_checkpoint(self, checkpoint_folder): method push_to_hub (line 3702) | def push_to_hub(self, commit_message: Optional[str] = "End of training... method prediction_loop (line 3762) | def prediction_loop( method _gather_and_numpify (line 3916) | def _gather_and_numpify(self, tensors, name): method _add_sm_patterns_to_gitignore (line 3932) | def _add_sm_patterns_to_gitignore(self) -> None: method create_accelerator_and_postprocess (line 3971) | def create_accelerator_and_postprocess(self): FILE: transformers/trainer_callback.py class TrainerState (line 35) | class TrainerState: method __post_init__ (line 91) | def __post_init__(self): method save_to_json (line 95) | def save_to_json(self, json_path: str): method load_from_json (line 102) | def load_from_json(cls, json_path: str): class TrainerControl (line 110) | class TrainerControl: method _new_training (line 144) | def _new_training(self): method _new_epoch (line 148) | def _new_epoch(self): method _new_step (line 152) | def _new_step(self): class TrainerCallback (line 159) | class TrainerCallback: method on_init_end (line 209) | def on_init_end(self, args: TrainingArguments, state: TrainerState, co... method on_train_begin (line 215) | def on_train_begin(self, args: TrainingArguments, state: TrainerState,... method on_train_end (line 221) | def on_train_end(self, args: TrainingArguments, state: TrainerState, c... method on_epoch_begin (line 227) | def on_epoch_begin(self, args: TrainingArguments, state: TrainerState,... method on_epoch_end (line 233) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... method on_step_begin (line 239) | def on_step_begin(self, args: TrainingArguments, state: TrainerState, ... method on_substep_end (line 246) | def on_substep_end(self, args: TrainingArguments, state: TrainerState,... method on_step_end (line 252) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_evaluate (line 259) | def on_evaluate(self, args: TrainingArguments, state: TrainerState, co... method on_predict (line 265) | def on_predict(self, args: TrainingArguments, state: TrainerState, con... method on_save (line 271) | def on_save(self, args: TrainingArguments, state: TrainerState, contro... method on_log (line 277) | def on_log(self, args: TrainingArguments, state: TrainerState, control... method on_prediction_step (line 283) | def on_prediction_step(self, args: TrainingArguments, state: TrainerSt... class CallbackHandler (line 290) | class CallbackHandler(TrainerCallback): method __init__ (line 293) | def __init__(self, callbacks, model, tokenizer, optimizer, lr_scheduler): method add_callback (line 312) | def add_callback(self, callback): method pop_callback (line 323) | def pop_callback(self, callback): method remove_callback (line 335) | def remove_callback(self, callback): method callback_list (line 345) | def callback_list(self): method on_init_end (line 348) | def on_init_end(self, args: TrainingArguments, state: TrainerState, co... method on_train_begin (line 351) | def on_train_begin(self, args: TrainingArguments, state: TrainerState,... method on_train_end (line 355) | def on_train_end(self, args: TrainingArguments, state: TrainerState, c... method on_epoch_begin (line 358) | def on_epoch_begin(self, args: TrainingArguments, state: TrainerState,... method on_epoch_end (line 362) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... method on_step_begin (line 365) | def on_step_begin(self, args: TrainingArguments, state: TrainerState, ... method on_substep_end (line 371) | def on_substep_end(self, args: TrainingArguments, state: TrainerState,... method on_step_end (line 374) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_evaluate (line 377) | def on_evaluate(self, args: TrainingArguments, state: TrainerState, co... method on_predict (line 381) | def on_predict(self, args: TrainingArguments, state: TrainerState, con... method on_save (line 384) | def on_save(self, args: TrainingArguments, state: TrainerState, contro... method on_log (line 388) | def on_log(self, args: TrainingArguments, state: TrainerState, control... method on_prediction_step (line 392) | def on_prediction_step(self, args: TrainingArguments, state: TrainerSt... method call_event (line 395) | def call_event(self, event, args, state, control, **kwargs): class DefaultFlowCallback (line 415) | class DefaultFlowCallback(TrainerCallback): method on_step_end (line 420) | def on_step_end(self, args: TrainingArguments, state: TrainerState, co... method on_epoch_end (line 449) | def on_epoch_end(self, args: TrainingArguments, state: TrainerState, c... class ProgressCallback (line 465) | class ProgressCallback(TrainerCallback): method __init__ (line 470) | def __init__(self): method on_train_begin (line 474) | def on_train_begin(self, args, state, control, **kwargs): method on_step_end (line 479) | def on_step_end(self, args, state, control, **kwargs): method on_prediction_step (line 484) | def on_prediction_step(self, args, state, control, eval_dataloader=Non... method on_evaluate (line 490) | def on_evaluate(self, args, state, control, **kwargs): method on_predict (line 496) | def on_predict(self, args, state, control, **kwargs): method on_log (line 502) | def on_log(self, args, state, control, logs=None, **kwargs): method on_train_end (line 507) | def on_train_end(self, args, state, control, **kwargs): class PrinterCallback (line 513) | class PrinterCallback(TrainerCallback): method on_log (line 518) | def on_log(self, args, state, control, logs=None, **kwargs): class EarlyStoppingCallback (line 524) | class EarlyStoppingCallback(TrainerCallback): method __init__ (line 541) | def __init__(self, early_stopping_patience: int = 1, early_stopping_th... method check_metric_value (line 547) | def check_metric_value(self, args, state, control, metric_value): method on_train_begin (line 558) | def on_train_begin(self, args, state, control, **kwargs): method on_evaluate (line 567) | def on_evaluate(self, args, state, control, metrics, **kwargs): FILE: transformers/trainer_pt_utils.py function atleast_1d (line 58) | def atleast_1d(tensor_or_array: Union[torch.Tensor, np.ndarray]): function torch_pad_and_concatenate (line 69) | def torch_pad_and_concatenate(tensor1, tensor2, padding_index=-100): function numpy_pad_and_concatenate (line 87) | def numpy_pad_and_concatenate(array1, array2, padding_index=-100): function nested_concat (line 105) | def nested_concat(tensors, new_tensors, padding_index=-100): function find_batch_size (line 127) | def find_batch_size(tensors): function nested_numpify (line 147) | def nested_numpify(tensors): function nested_detach (line 163) | def nested_detach(tensors): function nested_xla_mesh_reduce (line 172) | def nested_xla_mesh_reduce(tensors, name): function distributed_concat (line 189) | def distributed_concat(tensor: Any, num_total_examples: Optional[int] = ... function distributed_broadcast_scalars (line 208) | def distributed_broadcast_scalars( function reissue_pt_warnings (line 227) | def reissue_pt_warnings(caught_warnings): function torch_distributed_zero_first (line 236) | def torch_distributed_zero_first(local_rank: int): class DistributedSamplerWithLoop (line 250) | class DistributedSamplerWithLoop(DistributedSampler): method __init__ (line 264) | def __init__(self, dataset, batch_size, **kwargs): method __iter__ (line 268) | def __iter__(self): class SequentialDistributedSampler (line 278) | class SequentialDistributedSampler(Sampler): method __init__ (line 288) | def __init__(self, dataset, num_replicas=None, rank=None, batch_size=N... method __iter__ (line 313) | def __iter__(self): method __len__ (line 330) | def __len__(self): function get_tpu_sampler (line 334) | def get_tpu_sampler(dataset: torch.utils.data.Dataset, batch_size: int): function nested_new_like (line 340) | def nested_new_like(arrays, num_samples, padding_index=-100): function expand_like (line 347) | def expand_like(arrays, new_seq_length, padding_index=-100): function nested_truncate (line 354) | def nested_truncate(tensors, limit): class DistributedTensorGatherer (line 364) | class DistributedTensorGatherer: method __init__ (line 410) | def __init__(self, world_size, num_samples, make_multiple_of=None, pad... method add_arrays (line 424) | def add_arrays(self, arrays): method _nested_set_tensors (line 439) | def _nested_set_tensors(self, storage, arrays): method finalize (line 460) | def finalize(self): class LabelSmoother (line 473) | class LabelSmoother: method __call__ (line 487) | def __call__(self, model_output, labels, shift_labels=False): function get_length_grouped_indices (line 515) | def get_length_grouped_indices(lengths, batch_size, mega_batch_mult=None... class LengthGroupedSampler (line 550) | class LengthGroupedSampler(Sampler): method __init__ (line 556) | def __init__( method __len__ (line 588) | def __len__(self): method __iter__ (line 591) | def __iter__(self): class DistributedLengthGroupedSampler (line 596) | class DistributedLengthGroupedSampler(DistributedSampler): method __init__ (line 603) | def __init__( method __iter__ (line 663) | def __iter__(self) -> Iterator: class ShardSampler (line 684) | class ShardSampler(Sampler): method __init__ (line 693) | def __init__( method __iter__ (line 712) | def __iter__(self): method __len__ (line 726) | def __len__(self): class IterableDatasetShard (line 731) | class IterableDatasetShard(IterableDataset): method __init__ (line 772) | def __init__( method set_epoch (line 790) | def set_epoch(self, epoch): method __iter__ (line 795) | def __iter__(self): method __len__ (line 828) | def __len__(self): function _get_learning_rate (line 840) | def _get_learning_rate(self): function _secs2timedelta (line 863) | def _secs2timedelta(secs): function metrics_format (line 872) | def metrics_format(self, metrics: Dict[str, float]) -> Dict[str, float]: function log_metrics (line 898) | def log_metrics(self, split, metrics): function save_metrics (line 988) | def save_metrics(self, split, metrics, combined=True): function save_state (line 1026) | def save_state(self): function get_model_param_count (line 1039) | def get_model_param_count(model, trainable_only=False): function get_parameter_names (line 1056) | def get_parameter_names(model, forbidden_layer_types): function get_module_class_from_name (line 1072) | def get_module_class_from_name(module, name): function smp_forward_backward (line 1096) | def smp_forward_backward(model, inputs, gradient_accumulation_steps=1): function smp_forward_only (line 1104) | def smp_forward_only(model, inputs): function smp_gather (line 1107) | def smp_gather(tensor): function smp_nested_concat (line 1120) | def smp_nested_concat(tensor): FILE: transformers/trainer_seq2seq.py class Seq2SeqTrainer (line 41) | class Seq2SeqTrainer(Trainer): method __init__ (line 42) | def __init__( method load_generation_config (line 77) | def load_generation_config(gen_config_arg: Union[str, GenerationConfig... method evaluate (line 112) | def evaluate( method predict (line 161) | def predict( method prediction_step (line 218) | def prediction_step( method _pad_tensors_to_max_len (line 317) | def _pad_tensors_to_max_len(self, tensor, max_length): FILE: transformers/trainer_tf.py class TFTrainer (line 61) | class TFTrainer: method __init__ (line 94) | def __init__( method get_train_tfdataset (line 149) | def get_train_tfdataset(self) -> tf.data.Dataset: method get_eval_tfdataset (line 173) | def get_eval_tfdataset(self, eval_dataset: Optional[tf.data.Dataset] =... method get_test_tfdataset (line 206) | def get_test_tfdataset(self, test_dataset: tf.data.Dataset) -> tf.data... method create_optimizer_and_scheduler (line 231) | def create_optimizer_and_scheduler(self, num_training_steps: int): method setup_wandb (line 256) | def setup_wandb(self): method setup_comet (line 275) | def setup_comet(self): method prediction_loop (line 305) | def prediction_loop( method log (line 391) | def log(self, logs: Dict[str, float]) -> None: method evaluate (line 423) | def evaluate(self, eval_dataset: Optional[tf.data.Dataset] = None) -> ... method prediction_step (line 451) | def prediction_step( method distributed_prediction_steps (line 467) | def distributed_prediction_steps(self, batch): method train (line 475) | def train(self) -> None: method training_step (line 630) | def training_step(self, features, labels, nb_instances_in_global_batch): method apply_gradients (line 651) | def apply_gradients(self, features, labels, nb_instances_in_global_bat... method distributed_training_steps (line 705) | def distributed_training_steps(self, batch): method _compute_nb_instances (line 713) | def _compute_nb_instances(batch): method _get_step_inputs (line 723) | def _get_step_inputs(batch, nb_instances): method run_model (line 734) | def run_model(self, features, labels, training): method predict (line 764) | def predict(self, test_dataset: tf.data.Dataset) -> PredictionOutput: method save_model (line 790) | def save_model(self, output_dir: Optional[str] = None): FILE: transformers/trainer_utils.py function seed_worker (line 50) | def seed_worker(_): function enable_full_determinism (line 58) | def enable_full_determinism(seed: int): function set_seed (line 83) | def set_seed(seed: int): class EvalPrediction (line 100) | class EvalPrediction: method __init__ (line 110) | def __init__( method __iter__ (line 120) | def __iter__(self): method __getitem__ (line 126) | def __getitem__(self, idx): class EvalLoopOutput (line 139) | class EvalLoopOutput(NamedTuple): class PredictionOutput (line 146) | class PredictionOutput(NamedTuple): class TrainOutput (line 152) | class TrainOutput(NamedTuple): function get_last_checkpoint (line 162) | def get_last_checkpoint(folder): class IntervalStrategy (line 174) | class IntervalStrategy(ExplicitEnum): class EvaluationStrategy (line 180) | class EvaluationStrategy(ExplicitEnum): class HubStrategy (line 186) | class HubStrategy(ExplicitEnum): class BestRun (line 193) | class BestRun(NamedTuple): function default_compute_objective (line 215) | def default_compute_objective(metrics: Dict[str, float]) -> float: function default_hp_space_optuna (line 240) | def default_hp_space_optuna(trial) -> Dict[str, float]: function default_hp_space_ray (line 252) | def default_hp_space_ray(trial) -> Dict[str, float]: function default_hp_space_sigopt (line 266) | def default_hp_space_sigopt(trial): function default_hp_space_wandb (line 279) | def default_hp_space_wandb(trial) -> Dict[str, float]: class HPSearchBackend (line 297) | class HPSearchBackend(ExplicitEnum): function is_main_process (line 312) | def is_main_process(local_rank): function total_processes_number (line 324) | def total_processes_number(local_rank): function speed_metrics (line 339) | def speed_metrics(split, start_time, num_samples=None, num_steps=None): class SchedulerType (line 364) | class SchedulerType(ExplicitEnum): class TrainerMemoryTracker (line 375) | class TrainerMemoryTracker: method __init__ (line 407) | def __init__(self, skip_memory_metrics=False): method derive_stage (line 433) | def derive_stage(self): method cpu_mem_used (line 443) | def cpu_mem_used(self): method peak_monitor_func (line 447) | def peak_monitor_func(self): method start (line 459) | def start(self): method stop (line 489) | def stop(self, stage): method update_metrics (line 533) | def update_metrics(self, stage, metrics): method stop_and_update_metrics (line 574) | def stop_and_update_metrics(self, metrics=None): function has_length (line 587) | def has_length(dataset): function denumpify_detensorize (line 598) | def denumpify_detensorize(metrics): function number_of_arguments (line 613) | def number_of_arguments(func): class ShardedDDPOption (line 623) | class ShardedDDPOption(ExplicitEnum): function find_executable_batch_size (line 631) | def find_executable_batch_size( class FSDPOption (line 662) | class FSDPOption(ExplicitEnum): class RemoveColumnsCollator (line 670) | class RemoveColumnsCollator: method __init__ (line 673) | def __init__( method _remove_columns (line 688) | def _remove_columns(self, feature: dict) -> dict: method __call__ (line 704) | def __call__(self, features: List[dict]): FILE: transformers/training_args.py function default_logdir (line 102) | def default_logdir() -> str: function get_int_from_env (line 113) | def get_int_from_env(env_keys, default): function get_xla_device_type (line 122) | def get_xla_device_type(device: "torch.device") -> Optional[str]: class OptimizerNames (line 131) | class OptimizerNames(ExplicitEnum): class TrainingArguments (line 156) | class TrainingArguments: method __post_init__ (line 1168) | def __post_init__(self): method __str__ (line 1616) | def __str__(self): method train_batch_size (line 1632) | def train_batch_size(self) -> int: method eval_batch_size (line 1646) | def eval_batch_size(self) -> int: method ddp_timeout_delta (line 1660) | def ddp_timeout_delta(self) -> timedelta: method _setup_devices (line 1667) | def _setup_devices(self) -> "torch.device": method device (line 1759) | def device(self) -> "torch.device": method n_gpu (line 1767) | def n_gpu(self): method parallel_mode (line 1782) | def parallel_mode(self): method world_size (line 1809) | def world_size(self): method process_index (line 1826) | def process_index(self): method local_process_index (line 1842) | def local_process_index(self): method should_log (line 1858) | def should_log(self): method should_save (line 1871) | def should_save(self): method get_process_log_level (line 1883) | def get_process_log_level(self): method place_model_on_device (line 1906) | def place_model_on_device(self): method _no_sync_in_gradient_accumulation (line 1913) | def _no_sync_in_gradient_accumulation(self): method main_process_first (line 1922) | def main_process_first(self, local=True, desc="work"): method get_warmup_steps (line 1976) | def get_warmup_steps(self, num_training_steps: int): method to_dict (line 1985) | def to_dict(self): method to_json_string (line 2002) | def to_json_string(self): method to_sanitized_dict (line 2008) | def to_sanitized_dict(self) -> Dict[str, Any]: method set_training (line 2022) | def set_training( method set_evaluate (line 2097) | def set_evaluate( method set_testing (line 2158) | def set_testing( method set_save (line 2198) | def set_save( method set_logging (line 2247) | def set_logging( method set_push_to_hub (line 2321) | def set_push_to_hub( method set_optimizer (line 2386) | def set_optimizer( method set_lr_scheduler (line 2437) | def set_lr_scheduler( method set_dataloader (line 2482) | def set_dataloader( class ParallelMode (line 2540) | class ParallelMode(Enum): FILE: transformers/training_args_seq2seq.py class Seq2SeqTrainingArguments (line 30) | class Seq2SeqTrainingArguments(TrainingArguments): method to_dict (line 87) | def to_dict(self): FILE: transformers/training_args_tf.py class TFTrainingArguments (line 30) | class TFTrainingArguments(TrainingArguments): method _setup_strategy (line 188) | def _setup_strategy(self) -> Tuple["tf.distribute.Strategy", int]: method strategy (line 237) | def strategy(self) -> "tf.distribute.Strategy": method n_replicas (line 245) | def n_replicas(self) -> int: method should_log (line 253) | def should_log(self): method train_batch_size (line 260) | def train_batch_size(self) -> int: method eval_batch_size (line 273) | def eval_batch_size(self) -> int: method n_gpu (line 286) | def n_gpu(self) -> int: FILE: transformers/utils/__init__.py function check_min_version (line 205) | def check_min_version(min_version): FILE: transformers/utils/backbone_utils.py class BackboneType (line 23) | class BackboneType(enum.Enum): function verify_out_features_out_indices (line 28) | def verify_out_features_out_indices( function _align_output_features_output_indices (line 56) | def _align_output_features_output_indices( function get_aligned_output_features_output_indices (line 87) | def get_aligned_output_features_output_indices( class BackboneMixin (line 118) | class BackboneMixin: method _init_timm_backbone (line 121) | def _init_timm_backbone(self, config) -> None: method _init_transformers_backbone (line 142) | def _init_transformers_backbone(self, config) -> None: method _init_backbone (line 154) | def _init_backbone(self, config) -> None: method out_features (line 172) | def out_features(self): method out_features (line 176) | def out_features(self, out_features: List[str]): method out_indices (line 185) | def out_indices(self): method out_indices (line 189) | def out_indices(self, out_indices: Union[Tuple[int], List[int]]): method out_feature_channels (line 198) | def out_feature_channels(self): method channels (line 204) | def channels(self): method forward_with_filtered_kwargs (line 207) | def forward_with_filtered_kwargs(self, *args, **kwargs): method forward (line 212) | def forward( method to_dict (line 221) | def to_dict(self): class BackboneConfigMixin (line 232) | class BackboneConfigMixin: method out_features (line 238) | def out_features(self): method out_features (line 242) | def out_features(self, out_features: List[str]): method out_indices (line 251) | def out_indices(self): method out_indices (line 255) | def out_indices(self, out_indices: Union[Tuple[int], List[int]]): method to_dict (line 263) | def to_dict(self): FILE: transformers/utils/bitsandbytes.py function set_module_quantized_tensor_to_device (line 22) | def set_module_quantized_tensor_to_device(module, tensor_name, device, v... function _replace_with_bnb_linear (line 112) | def _replace_with_bnb_linear( function replace_with_bnb_linear (line 169) | def replace_with_bnb_linear(model, modules_to_not_convert=None, current_... function replace_8bit_linear (line 212) | def replace_8bit_linear(*args, **kwargs): function set_module_8bit_tensor_to_device (line 221) | def set_module_8bit_tensor_to_device(*args, **kwargs): function get_keys_to_not_convert (line 229) | def get_keys_to_not_convert(model): FILE: transformers/utils/doc.py function add_start_docstrings (line 23) | def add_start_docstrings(*docstr): function add_start_docstrings_to_model_forward (line 31) | def add_start_docstrings_to_model_forward(*docstr): function add_end_docstrings (line 53) | def add_end_docstrings(*docstr): function _get_indent (line 79) | def _get_indent(t): function _convert_output_args_doc (line 85) | def _convert_output_args_doc(output_args_doc): function _prepare_output_docstrings (line 111) | def _prepare_output_docstrings(output_type, config_class, min_indent=None): function filter_outputs_from_example (line 1045) | def filter_outputs_from_example(docstring, **kwargs): function add_code_sample_docstrings (line 1059) | def add_code_sample_docstrings( function replace_return_docstrings (line 1147) | def replace_return_docstrings(output_type=None, config_class=None): function copy_func (line 1169) | def copy_func(f): FILE: transformers/utils/dummy_detectron2_objects.py class LayoutLMv2Model (line 8) | class LayoutLMv2Model: method __init__ (line 9) | def __init__(self, *args, **kwargs): method from_pretrained (line 13) | def from_pretrained(cls, *args, **kwargs): FILE: transformers/utils/dummy_flax_objects.py class FlaxForcedBOSTokenLogitsProcessor (line 5) | class FlaxForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class FlaxForcedEOSTokenLogitsProcessor (line 12) | class FlaxForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class FlaxGenerationMixin (line 19) | class FlaxGenerationMixin(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class FlaxLogitsProcessor (line 26) | class FlaxLogitsProcessor(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class FlaxLogitsProcessorList (line 33) | class FlaxLogitsProcessorList(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class FlaxLogitsWarper (line 40) | class FlaxLogitsWarper(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class FlaxMinLengthLogitsProcessor (line 47) | class FlaxMinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class FlaxTemperatureLogitsWarper (line 54) | class FlaxTemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class FlaxTopKLogitsWarper (line 61) | class FlaxTopKLogitsWarper(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class FlaxTopPLogitsWarper (line 68) | class FlaxTopPLogitsWarper(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class FlaxPreTrainedModel (line 75) | class FlaxPreTrainedModel(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class FlaxAlbertForMaskedLM (line 82) | class FlaxAlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class FlaxAlbertForMultipleChoice (line 89) | class FlaxAlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class FlaxAlbertForPreTraining (line 96) | class FlaxAlbertForPreTraining(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class FlaxAlbertForQuestionAnswering (line 103) | class FlaxAlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class FlaxAlbertForSequenceClassification (line 110) | class FlaxAlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class FlaxAlbertForTokenClassification (line 117) | class FlaxAlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class FlaxAlbertModel (line 124) | class FlaxAlbertModel(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class FlaxAlbertPreTrainedModel (line 131) | class FlaxAlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class FlaxAutoModel (line 177) | class FlaxAutoModel(metaclass=DummyObject): method __init__ (line 180) | def __init__(self, *args, **kwargs): class FlaxAutoModelForCausalLM (line 184) | class FlaxAutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 187) | def __init__(self, *args, **kwargs): class FlaxAutoModelForImageClassification (line 191) | class FlaxAutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 194) | def __init__(self, *args, **kwargs): class FlaxAutoModelForMaskedLM (line 198) | class FlaxAutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 201) | def __init__(self, *args, **kwargs): class FlaxAutoModelForMultipleChoice (line 205) | class FlaxAutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 208) | def __init__(self, *args, **kwargs): class FlaxAutoModelForNextSentencePrediction (line 212) | class FlaxAutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 215) | def __init__(self, *args, **kwargs): class FlaxAutoModelForPreTraining (line 219) | class FlaxAutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 222) | def __init__(self, *args, **kwargs): class FlaxAutoModelForQuestionAnswering (line 226) | class FlaxAutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 229) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSeq2SeqLM (line 233) | class FlaxAutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 236) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSequenceClassification (line 240) | class FlaxAutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 243) | def __init__(self, *args, **kwargs): class FlaxAutoModelForSpeechSeq2Seq (line 247) | class FlaxAutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 250) | def __init__(self, *args, **kwargs): class FlaxAutoModelForTokenClassification (line 254) | class FlaxAutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 257) | def __init__(self, *args, **kwargs): class FlaxAutoModelForVision2Seq (line 261) | class FlaxAutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 264) | def __init__(self, *args, **kwargs): class FlaxBartDecoderPreTrainedModel (line 268) | class FlaxBartDecoderPreTrainedModel(metaclass=DummyObject): method __init__ (line 271) | def __init__(self, *args, **kwargs): class FlaxBartForCausalLM (line 275) | class FlaxBartForCausalLM(metaclass=DummyObject): method __init__ (line 278) | def __init__(self, *args, **kwargs): class FlaxBartForConditionalGeneration (line 282) | class FlaxBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 285) | def __init__(self, *args, **kwargs): class FlaxBartForQuestionAnswering (line 289) | class FlaxBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 292) | def __init__(self, *args, **kwargs): class FlaxBartForSequenceClassification (line 296) | class FlaxBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 299) | def __init__(self, *args, **kwargs): class FlaxBartModel (line 303) | class FlaxBartModel(metaclass=DummyObject): method __init__ (line 306) | def __init__(self, *args, **kwargs): class FlaxBartPreTrainedModel (line 310) | class FlaxBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 313) | def __init__(self, *args, **kwargs): class FlaxBeitForImageClassification (line 317) | class FlaxBeitForImageClassification(metaclass=DummyObject): method __init__ (line 320) | def __init__(self, *args, **kwargs): class FlaxBeitForMaskedImageModeling (line 324) | class FlaxBeitForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 327) | def __init__(self, *args, **kwargs): class FlaxBeitModel (line 331) | class FlaxBeitModel(metaclass=DummyObject): method __init__ (line 334) | def __init__(self, *args, **kwargs): class FlaxBeitPreTrainedModel (line 338) | class FlaxBeitPreTrainedModel(metaclass=DummyObject): method __init__ (line 341) | def __init__(self, *args, **kwargs): class FlaxBertForCausalLM (line 345) | class FlaxBertForCausalLM(metaclass=DummyObject): method __init__ (line 348) | def __init__(self, *args, **kwargs): class FlaxBertForMaskedLM (line 352) | class FlaxBertForMaskedLM(metaclass=DummyObject): method __init__ (line 355) | def __init__(self, *args, **kwargs): class FlaxBertForMultipleChoice (line 359) | class FlaxBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 362) | def __init__(self, *args, **kwargs): class FlaxBertForNextSentencePrediction (line 366) | class FlaxBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 369) | def __init__(self, *args, **kwargs): class FlaxBertForPreTraining (line 373) | class FlaxBertForPreTraining(metaclass=DummyObject): method __init__ (line 376) | def __init__(self, *args, **kwargs): class FlaxBertForQuestionAnswering (line 380) | class FlaxBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 383) | def __init__(self, *args, **kwargs): class FlaxBertForSequenceClassification (line 387) | class FlaxBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 390) | def __init__(self, *args, **kwargs): class FlaxBertForTokenClassification (line 394) | class FlaxBertForTokenClassification(metaclass=DummyObject): method __init__ (line 397) | def __init__(self, *args, **kwargs): class FlaxBertModel (line 401) | class FlaxBertModel(metaclass=DummyObject): method __init__ (line 404) | def __init__(self, *args, **kwargs): class FlaxBertPreTrainedModel (line 408) | class FlaxBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 411) | def __init__(self, *args, **kwargs): class FlaxBigBirdForCausalLM (line 415) | class FlaxBigBirdForCausalLM(metaclass=DummyObject): method __init__ (line 418) | def __init__(self, *args, **kwargs): class FlaxBigBirdForMaskedLM (line 422) | class FlaxBigBirdForMaskedLM(metaclass=DummyObject): method __init__ (line 425) | def __init__(self, *args, **kwargs): class FlaxBigBirdForMultipleChoice (line 429) | class FlaxBigBirdForMultipleChoice(metaclass=DummyObject): method __init__ (line 432) | def __init__(self, *args, **kwargs): class FlaxBigBirdForPreTraining (line 436) | class FlaxBigBirdForPreTraining(metaclass=DummyObject): method __init__ (line 439) | def __init__(self, *args, **kwargs): class FlaxBigBirdForQuestionAnswering (line 443) | class FlaxBigBirdForQuestionAnswering(metaclass=DummyObject): method __init__ (line 446) | def __init__(self, *args, **kwargs): class FlaxBigBirdForSequenceClassification (line 450) | class FlaxBigBirdForSequenceClassification(metaclass=DummyObject): method __init__ (line 453) | def __init__(self, *args, **kwargs): class FlaxBigBirdForTokenClassification (line 457) | class FlaxBigBirdForTokenClassification(metaclass=DummyObject): method __init__ (line 460) | def __init__(self, *args, **kwargs): class FlaxBigBirdModel (line 464) | class FlaxBigBirdModel(metaclass=DummyObject): method __init__ (line 467) | def __init__(self, *args, **kwargs): class FlaxBigBirdPreTrainedModel (line 471) | class FlaxBigBirdPreTrainedModel(metaclass=DummyObject): method __init__ (line 474) | def __init__(self, *args, **kwargs): class FlaxBlenderbotForConditionalGeneration (line 478) | class FlaxBlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 481) | def __init__(self, *args, **kwargs): class FlaxBlenderbotModel (line 485) | class FlaxBlenderbotModel(metaclass=DummyObject): method __init__ (line 488) | def __init__(self, *args, **kwargs): class FlaxBlenderbotPreTrainedModel (line 492) | class FlaxBlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 495) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallForConditionalGeneration (line 499) | class FlaxBlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 502) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallModel (line 506) | class FlaxBlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 509) | def __init__(self, *args, **kwargs): class FlaxBlenderbotSmallPreTrainedModel (line 513) | class FlaxBlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 516) | def __init__(self, *args, **kwargs): class FlaxCLIPModel (line 520) | class FlaxCLIPModel(metaclass=DummyObject): method __init__ (line 523) | def __init__(self, *args, **kwargs): class FlaxCLIPPreTrainedModel (line 527) | class FlaxCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 530) | def __init__(self, *args, **kwargs): class FlaxCLIPTextModel (line 534) | class FlaxCLIPTextModel(metaclass=DummyObject): method __init__ (line 537) | def __init__(self, *args, **kwargs): class FlaxCLIPTextPreTrainedModel (line 541) | class FlaxCLIPTextPreTrainedModel(metaclass=DummyObject): method __init__ (line 544) | def __init__(self, *args, **kwargs): class FlaxCLIPVisionModel (line 548) | class FlaxCLIPVisionModel(metaclass=DummyObject): method __init__ (line 551) | def __init__(self, *args, **kwargs): class FlaxCLIPVisionPreTrainedModel (line 555) | class FlaxCLIPVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 558) | def __init__(self, *args, **kwargs): class FlaxDistilBertForMaskedLM (line 562) | class FlaxDistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 565) | def __init__(self, *args, **kwargs): class FlaxDistilBertForMultipleChoice (line 569) | class FlaxDistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 572) | def __init__(self, *args, **kwargs): class FlaxDistilBertForQuestionAnswering (line 576) | class FlaxDistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 579) | def __init__(self, *args, **kwargs): class FlaxDistilBertForSequenceClassification (line 583) | class FlaxDistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 586) | def __init__(self, *args, **kwargs): class FlaxDistilBertForTokenClassification (line 590) | class FlaxDistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 593) | def __init__(self, *args, **kwargs): class FlaxDistilBertModel (line 597) | class FlaxDistilBertModel(metaclass=DummyObject): method __init__ (line 600) | def __init__(self, *args, **kwargs): class FlaxDistilBertPreTrainedModel (line 604) | class FlaxDistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 607) | def __init__(self, *args, **kwargs): class FlaxElectraForCausalLM (line 611) | class FlaxElectraForCausalLM(metaclass=DummyObject): method __init__ (line 614) | def __init__(self, *args, **kwargs): class FlaxElectraForMaskedLM (line 618) | class FlaxElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 621) | def __init__(self, *args, **kwargs): class FlaxElectraForMultipleChoice (line 625) | class FlaxElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 628) | def __init__(self, *args, **kwargs): class FlaxElectraForPreTraining (line 632) | class FlaxElectraForPreTraining(metaclass=DummyObject): method __init__ (line 635) | def __init__(self, *args, **kwargs): class FlaxElectraForQuestionAnswering (line 639) | class FlaxElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 642) | def __init__(self, *args, **kwargs): class FlaxElectraForSequenceClassification (line 646) | class FlaxElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 649) | def __init__(self, *args, **kwargs): class FlaxElectraForTokenClassification (line 653) | class FlaxElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 656) | def __init__(self, *args, **kwargs): class FlaxElectraModel (line 660) | class FlaxElectraModel(metaclass=DummyObject): method __init__ (line 663) | def __init__(self, *args, **kwargs): class FlaxElectraPreTrainedModel (line 667) | class FlaxElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 670) | def __init__(self, *args, **kwargs): class FlaxEncoderDecoderModel (line 674) | class FlaxEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 677) | def __init__(self, *args, **kwargs): class FlaxGPT2LMHeadModel (line 681) | class FlaxGPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 684) | def __init__(self, *args, **kwargs): class FlaxGPT2Model (line 688) | class FlaxGPT2Model(metaclass=DummyObject): method __init__ (line 691) | def __init__(self, *args, **kwargs): class FlaxGPT2PreTrainedModel (line 695) | class FlaxGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 698) | def __init__(self, *args, **kwargs): class FlaxGPTNeoForCausalLM (line 702) | class FlaxGPTNeoForCausalLM(metaclass=DummyObject): method __init__ (line 705) | def __init__(self, *args, **kwargs): class FlaxGPTNeoModel (line 709) | class FlaxGPTNeoModel(metaclass=DummyObject): method __init__ (line 712) | def __init__(self, *args, **kwargs): class FlaxGPTNeoPreTrainedModel (line 716) | class FlaxGPTNeoPreTrainedModel(metaclass=DummyObject): method __init__ (line 719) | def __init__(self, *args, **kwargs): class FlaxGPTJForCausalLM (line 723) | class FlaxGPTJForCausalLM(metaclass=DummyObject): method __init__ (line 726) | def __init__(self, *args, **kwargs): class FlaxGPTJModel (line 730) | class FlaxGPTJModel(metaclass=DummyObject): method __init__ (line 733) | def __init__(self, *args, **kwargs): class FlaxGPTJPreTrainedModel (line 737) | class FlaxGPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 740) | def __init__(self, *args, **kwargs): class FlaxLongT5ForConditionalGeneration (line 744) | class FlaxLongT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 747) | def __init__(self, *args, **kwargs): class FlaxLongT5Model (line 751) | class FlaxLongT5Model(metaclass=DummyObject): method __init__ (line 754) | def __init__(self, *args, **kwargs): class FlaxLongT5PreTrainedModel (line 758) | class FlaxLongT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 761) | def __init__(self, *args, **kwargs): class FlaxMarianModel (line 765) | class FlaxMarianModel(metaclass=DummyObject): method __init__ (line 768) | def __init__(self, *args, **kwargs): class FlaxMarianMTModel (line 772) | class FlaxMarianMTModel(metaclass=DummyObject): method __init__ (line 775) | def __init__(self, *args, **kwargs): class FlaxMarianPreTrainedModel (line 779) | class FlaxMarianPreTrainedModel(metaclass=DummyObject): method __init__ (line 782) | def __init__(self, *args, **kwargs): class FlaxMBartForConditionalGeneration (line 786) | class FlaxMBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 789) | def __init__(self, *args, **kwargs): class FlaxMBartForQuestionAnswering (line 793) | class FlaxMBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 796) | def __init__(self, *args, **kwargs): class FlaxMBartForSequenceClassification (line 800) | class FlaxMBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 803) | def __init__(self, *args, **kwargs): class FlaxMBartModel (line 807) | class FlaxMBartModel(metaclass=DummyObject): method __init__ (line 810) | def __init__(self, *args, **kwargs): class FlaxMBartPreTrainedModel (line 814) | class FlaxMBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 817) | def __init__(self, *args, **kwargs): class FlaxMT5EncoderModel (line 821) | class FlaxMT5EncoderModel(metaclass=DummyObject): method __init__ (line 824) | def __init__(self, *args, **kwargs): class FlaxMT5ForConditionalGeneration (line 828) | class FlaxMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 831) | def __init__(self, *args, **kwargs): class FlaxMT5Model (line 835) | class FlaxMT5Model(metaclass=DummyObject): method __init__ (line 838) | def __init__(self, *args, **kwargs): class FlaxOPTForCausalLM (line 842) | class FlaxOPTForCausalLM(metaclass=DummyObject): method __init__ (line 845) | def __init__(self, *args, **kwargs): class FlaxOPTModel (line 849) | class FlaxOPTModel(metaclass=DummyObject): method __init__ (line 852) | def __init__(self, *args, **kwargs): class FlaxOPTPreTrainedModel (line 856) | class FlaxOPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 859) | def __init__(self, *args, **kwargs): class FlaxPegasusForConditionalGeneration (line 863) | class FlaxPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 866) | def __init__(self, *args, **kwargs): class FlaxPegasusModel (line 870) | class FlaxPegasusModel(metaclass=DummyObject): method __init__ (line 873) | def __init__(self, *args, **kwargs): class FlaxPegasusPreTrainedModel (line 877) | class FlaxPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 880) | def __init__(self, *args, **kwargs): class FlaxRegNetForImageClassification (line 884) | class FlaxRegNetForImageClassification(metaclass=DummyObject): method __init__ (line 887) | def __init__(self, *args, **kwargs): class FlaxRegNetModel (line 891) | class FlaxRegNetModel(metaclass=DummyObject): method __init__ (line 894) | def __init__(self, *args, **kwargs): class FlaxRegNetPreTrainedModel (line 898) | class FlaxRegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 901) | def __init__(self, *args, **kwargs): class FlaxResNetForImageClassification (line 905) | class FlaxResNetForImageClassification(metaclass=DummyObject): method __init__ (line 908) | def __init__(self, *args, **kwargs): class FlaxResNetModel (line 912) | class FlaxResNetModel(metaclass=DummyObject): method __init__ (line 915) | def __init__(self, *args, **kwargs): class FlaxResNetPreTrainedModel (line 919) | class FlaxResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 922) | def __init__(self, *args, **kwargs): class FlaxRobertaForCausalLM (line 926) | class FlaxRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 929) | def __init__(self, *args, **kwargs): class FlaxRobertaForMaskedLM (line 933) | class FlaxRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 936) | def __init__(self, *args, **kwargs): class FlaxRobertaForMultipleChoice (line 940) | class FlaxRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 943) | def __init__(self, *args, **kwargs): class FlaxRobertaForQuestionAnswering (line 947) | class FlaxRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 950) | def __init__(self, *args, **kwargs): class FlaxRobertaForSequenceClassification (line 954) | class FlaxRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 957) | def __init__(self, *args, **kwargs): class FlaxRobertaForTokenClassification (line 961) | class FlaxRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 964) | def __init__(self, *args, **kwargs): class FlaxRobertaModel (line 968) | class FlaxRobertaModel(metaclass=DummyObject): method __init__ (line 971) | def __init__(self, *args, **kwargs): class FlaxRobertaPreTrainedModel (line 975) | class FlaxRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 978) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForCausalLM (line 982) | class FlaxRobertaPreLayerNormForCausalLM(metaclass=DummyObject): method __init__ (line 985) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForMaskedLM (line 989) | class FlaxRobertaPreLayerNormForMaskedLM(metaclass=DummyObject): method __init__ (line 992) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForMultipleChoice (line 996) | class FlaxRobertaPreLayerNormForMultipleChoice(metaclass=DummyObject): method __init__ (line 999) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForQuestionAnswering (line 1003) | class FlaxRobertaPreLayerNormForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1006) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForSequenceClassification (line 1010) | class FlaxRobertaPreLayerNormForSequenceClassification(metaclass=DummyOb... method __init__ (line 1013) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormForTokenClassification (line 1017) | class FlaxRobertaPreLayerNormForTokenClassification(metaclass=DummyObject): method __init__ (line 1020) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormModel (line 1024) | class FlaxRobertaPreLayerNormModel(metaclass=DummyObject): method __init__ (line 1027) | def __init__(self, *args, **kwargs): class FlaxRobertaPreLayerNormPreTrainedModel (line 1031) | class FlaxRobertaPreLayerNormPreTrainedModel(metaclass=DummyObject): method __init__ (line 1034) | def __init__(self, *args, **kwargs): class FlaxRoFormerForMaskedLM (line 1038) | class FlaxRoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 1041) | def __init__(self, *args, **kwargs): class FlaxRoFormerForMultipleChoice (line 1045) | class FlaxRoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 1048) | def __init__(self, *args, **kwargs): class FlaxRoFormerForQuestionAnswering (line 1052) | class FlaxRoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1055) | def __init__(self, *args, **kwargs): class FlaxRoFormerForSequenceClassification (line 1059) | class FlaxRoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 1062) | def __init__(self, *args, **kwargs): class FlaxRoFormerForTokenClassification (line 1066) | class FlaxRoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 1069) | def __init__(self, *args, **kwargs): class FlaxRoFormerModel (line 1073) | class FlaxRoFormerModel(metaclass=DummyObject): method __init__ (line 1076) | def __init__(self, *args, **kwargs): class FlaxRoFormerPreTrainedModel (line 1080) | class FlaxRoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1083) | def __init__(self, *args, **kwargs): class FlaxSpeechEncoderDecoderModel (line 1087) | class FlaxSpeechEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1090) | def __init__(self, *args, **kwargs): class FlaxT5EncoderModel (line 1094) | class FlaxT5EncoderModel(metaclass=DummyObject): method __init__ (line 1097) | def __init__(self, *args, **kwargs): class FlaxT5ForConditionalGeneration (line 1101) | class FlaxT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1104) | def __init__(self, *args, **kwargs): class FlaxT5Model (line 1108) | class FlaxT5Model(metaclass=DummyObject): method __init__ (line 1111) | def __init__(self, *args, **kwargs): class FlaxT5PreTrainedModel (line 1115) | class FlaxT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 1118) | def __init__(self, *args, **kwargs): class FlaxVisionEncoderDecoderModel (line 1122) | class FlaxVisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1125) | def __init__(self, *args, **kwargs): class FlaxVisionTextDualEncoderModel (line 1129) | class FlaxVisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 1132) | def __init__(self, *args, **kwargs): class FlaxViTForImageClassification (line 1136) | class FlaxViTForImageClassification(metaclass=DummyObject): method __init__ (line 1139) | def __init__(self, *args, **kwargs): class FlaxViTModel (line 1143) | class FlaxViTModel(metaclass=DummyObject): method __init__ (line 1146) | def __init__(self, *args, **kwargs): class FlaxViTPreTrainedModel (line 1150) | class FlaxViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1153) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2ForCTC (line 1157) | class FlaxWav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 1160) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2ForPreTraining (line 1164) | class FlaxWav2Vec2ForPreTraining(metaclass=DummyObject): method __init__ (line 1167) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2Model (line 1171) | class FlaxWav2Vec2Model(metaclass=DummyObject): method __init__ (line 1174) | def __init__(self, *args, **kwargs): class FlaxWav2Vec2PreTrainedModel (line 1178) | class FlaxWav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1181) | def __init__(self, *args, **kwargs): class FlaxWhisperForAudioClassification (line 1185) | class FlaxWhisperForAudioClassification(metaclass=DummyObject): method __init__ (line 1188) | def __init__(self, *args, **kwargs): class FlaxWhisperForConditionalGeneration (line 1192) | class FlaxWhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1195) | def __init__(self, *args, **kwargs): class FlaxWhisperModel (line 1199) | class FlaxWhisperModel(metaclass=DummyObject): method __init__ (line 1202) | def __init__(self, *args, **kwargs): class FlaxWhisperPreTrainedModel (line 1206) | class FlaxWhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 1209) | def __init__(self, *args, **kwargs): class FlaxXGLMForCausalLM (line 1213) | class FlaxXGLMForCausalLM(metaclass=DummyObject): method __init__ (line 1216) | def __init__(self, *args, **kwargs): class FlaxXGLMModel (line 1220) | class FlaxXGLMModel(metaclass=DummyObject): method __init__ (line 1223) | def __init__(self, *args, **kwargs): class FlaxXGLMPreTrainedModel (line 1227) | class FlaxXGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 1230) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForCausalLM (line 1237) | class FlaxXLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 1240) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForMaskedLM (line 1244) | class FlaxXLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 1247) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForMultipleChoice (line 1251) | class FlaxXLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 1254) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForQuestionAnswering (line 1258) | class FlaxXLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1261) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForSequenceClassification (line 1265) | class FlaxXLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 1268) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaForTokenClassification (line 1272) | class FlaxXLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 1275) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaModel (line 1279) | class FlaxXLMRobertaModel(metaclass=DummyObject): method __init__ (line 1282) | def __init__(self, *args, **kwargs): class FlaxXLMRobertaPreTrainedModel (line 1286) | class FlaxXLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 1289) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_keras_nlp_objects.py class TFGPT2Tokenizer (line 5) | class TFGPT2Tokenizer(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_pt_objects.py class PyTorchBenchmark (line 5) | class PyTorchBenchmark(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class PyTorchBenchmarkArguments (line 12) | class PyTorchBenchmarkArguments(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class GlueDataset (line 19) | class GlueDataset(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class GlueDataTrainingArguments (line 26) | class GlueDataTrainingArguments(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class LineByLineTextDataset (line 33) | class LineByLineTextDataset(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class LineByLineWithRefDataset (line 40) | class LineByLineWithRefDataset(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class LineByLineWithSOPTextDataset (line 47) | class LineByLineWithSOPTextDataset(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class SquadDataset (line 54) | class SquadDataset(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class SquadDataTrainingArguments (line 61) | class SquadDataTrainingArguments(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class TextDataset (line 68) | class TextDataset(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class TextDatasetForNextSentencePrediction (line 75) | class TextDatasetForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class BeamScorer (line 82) | class BeamScorer(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class BeamSearchScorer (line 89) | class BeamSearchScorer(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class ConstrainedBeamSearchScorer (line 96) | class ConstrainedBeamSearchScorer(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class Constraint (line 103) | class Constraint(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class ConstraintListState (line 110) | class ConstraintListState(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class DisjunctiveConstraint (line 117) | class DisjunctiveConstraint(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class ForcedBOSTokenLogitsProcessor (line 124) | class ForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class ForcedEOSTokenLogitsProcessor (line 131) | class ForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class GenerationMixin (line 138) | class GenerationMixin(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class HammingDiversityLogitsProcessor (line 145) | class HammingDiversityLogitsProcessor(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class InfNanRemoveLogitsProcessor (line 152) | class InfNanRemoveLogitsProcessor(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class LogitsProcessor (line 159) | class LogitsProcessor(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class LogitsProcessorList (line 166) | class LogitsProcessorList(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class LogitsWarper (line 173) | class LogitsWarper(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class MaxLengthCriteria (line 180) | class MaxLengthCriteria(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class MaxTimeCriteria (line 187) | class MaxTimeCriteria(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class MinLengthLogitsProcessor (line 194) | class MinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class MinNewTokensLengthLogitsProcessor (line 201) | class MinNewTokensLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class NoBadWordsLogitsProcessor (line 208) | class NoBadWordsLogitsProcessor(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class NoRepeatNGramLogitsProcessor (line 215) | class NoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class PhrasalConstraint (line 222) | class PhrasalConstraint(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class PrefixConstrainedLogitsProcessor (line 229) | class PrefixConstrainedLogitsProcessor(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class RepetitionPenaltyLogitsProcessor (line 236) | class RepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class StoppingCriteria (line 243) | class StoppingCriteria(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class StoppingCriteriaList (line 250) | class StoppingCriteriaList(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class TemperatureLogitsWarper (line 257) | class TemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class TopKLogitsWarper (line 264) | class TopKLogitsWarper(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class TopPLogitsWarper (line 271) | class TopPLogitsWarper(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class TypicalLogitsWarper (line 278) | class TypicalLogitsWarper(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): function top_k_top_p_filtering (line 285) | def top_k_top_p_filtering(*args, **kwargs): class PreTrainedModel (line 289) | class PreTrainedModel(metaclass=DummyObject): method __init__ (line 292) | def __init__(self, *args, **kwargs): class AlbertForMaskedLM (line 299) | class AlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class AlbertForMultipleChoice (line 306) | class AlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class AlbertForPreTraining (line 313) | class AlbertForPreTraining(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class AlbertForQuestionAnswering (line 320) | class AlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class AlbertForSequenceClassification (line 327) | class AlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class AlbertForTokenClassification (line 334) | class AlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class AlbertModel (line 341) | class AlbertModel(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class AlbertPreTrainedModel (line 348) | class AlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): function load_tf_weights_in_albert (line 355) | def load_tf_weights_in_albert(*args, **kwargs): class AlignModel (line 362) | class AlignModel(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class AlignPreTrainedModel (line 369) | class AlignPreTrainedModel(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class AlignTextModel (line 376) | class AlignTextModel(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class AlignVisionModel (line 383) | class AlignVisionModel(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class AltCLIPModel (line 393) | class AltCLIPModel(metaclass=DummyObject): method __init__ (line 396) | def __init__(self, *args, **kwargs): class AltCLIPPreTrainedModel (line 400) | class AltCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 403) | def __init__(self, *args, **kwargs): class AltCLIPTextModel (line 407) | class AltCLIPTextModel(metaclass=DummyObject): method __init__ (line 410) | def __init__(self, *args, **kwargs): class AltCLIPVisionModel (line 414) | class AltCLIPVisionModel(metaclass=DummyObject): method __init__ (line 417) | def __init__(self, *args, **kwargs): class ASTForAudioClassification (line 424) | class ASTForAudioClassification(metaclass=DummyObject): method __init__ (line 427) | def __init__(self, *args, **kwargs): class ASTModel (line 431) | class ASTModel(metaclass=DummyObject): method __init__ (line 434) | def __init__(self, *args, **kwargs): class ASTPreTrainedModel (line 438) | class ASTPreTrainedModel(metaclass=DummyObject): method __init__ (line 441) | def __init__(self, *args, **kwargs): class AutoBackbone (line 544) | class AutoBackbone(metaclass=DummyObject): method __init__ (line 547) | def __init__(self, *args, **kwargs): class AutoModel (line 551) | class AutoModel(metaclass=DummyObject): method __init__ (line 554) | def __init__(self, *args, **kwargs): class AutoModelForAudioClassification (line 558) | class AutoModelForAudioClassification(metaclass=DummyObject): method __init__ (line 561) | def __init__(self, *args, **kwargs): class AutoModelForAudioFrameClassification (line 565) | class AutoModelForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 568) | def __init__(self, *args, **kwargs): class AutoModelForAudioXVector (line 572) | class AutoModelForAudioXVector(metaclass=DummyObject): method __init__ (line 575) | def __init__(self, *args, **kwargs): class AutoModelForCausalLM (line 579) | class AutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 582) | def __init__(self, *args, **kwargs): class AutoModelForCTC (line 586) | class AutoModelForCTC(metaclass=DummyObject): method __init__ (line 589) | def __init__(self, *args, **kwargs): class AutoModelForDepthEstimation (line 593) | class AutoModelForDepthEstimation(metaclass=DummyObject): method __init__ (line 596) | def __init__(self, *args, **kwargs): class AutoModelForDocumentQuestionAnswering (line 600) | class AutoModelForDocumentQuestionAnswering(metaclass=DummyObject): method __init__ (line 603) | def __init__(self, *args, **kwargs): class AutoModelForImageClassification (line 607) | class AutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 610) | def __init__(self, *args, **kwargs): class AutoModelForImageSegmentation (line 614) | class AutoModelForImageSegmentation(metaclass=DummyObject): method __init__ (line 617) | def __init__(self, *args, **kwargs): class AutoModelForInstanceSegmentation (line 621) | class AutoModelForInstanceSegmentation(metaclass=DummyObject): method __init__ (line 624) | def __init__(self, *args, **kwargs): class AutoModelForMaskedImageModeling (line 628) | class AutoModelForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 631) | def __init__(self, *args, **kwargs): class AutoModelForMaskedLM (line 635) | class AutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): class AutoModelForMaskGeneration (line 642) | class AutoModelForMaskGeneration(metaclass=DummyObject): method __init__ (line 645) | def __init__(self, *args, **kwargs): class AutoModelForMultipleChoice (line 649) | class AutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 652) | def __init__(self, *args, **kwargs): class AutoModelForNextSentencePrediction (line 656) | class AutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 659) | def __init__(self, *args, **kwargs): class AutoModelForObjectDetection (line 663) | class AutoModelForObjectDetection(metaclass=DummyObject): method __init__ (line 666) | def __init__(self, *args, **kwargs): class AutoModelForPreTraining (line 670) | class AutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 673) | def __init__(self, *args, **kwargs): class AutoModelForQuestionAnswering (line 677) | class AutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 680) | def __init__(self, *args, **kwargs): class AutoModelForSemanticSegmentation (line 684) | class AutoModelForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 687) | def __init__(self, *args, **kwargs): class AutoModelForSeq2SeqLM (line 691) | class AutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 694) | def __init__(self, *args, **kwargs): class AutoModelForSequenceClassification (line 698) | class AutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 701) | def __init__(self, *args, **kwargs): class AutoModelForSpeechSeq2Seq (line 705) | class AutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 708) | def __init__(self, *args, **kwargs): class AutoModelForTableQuestionAnswering (line 712) | class AutoModelForTableQuestionAnswering(metaclass=DummyObject): method __init__ (line 715) | def __init__(self, *args, **kwargs): class AutoModelForTokenClassification (line 719) | class AutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 722) | def __init__(self, *args, **kwargs): class AutoModelForUniversalSegmentation (line 726) | class AutoModelForUniversalSegmentation(metaclass=DummyObject): method __init__ (line 729) | def __init__(self, *args, **kwargs): class AutoModelForVideoClassification (line 733) | class AutoModelForVideoClassification(metaclass=DummyObject): method __init__ (line 736) | def __init__(self, *args, **kwargs): class AutoModelForVision2Seq (line 740) | class AutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 743) | def __init__(self, *args, **kwargs): class AutoModelForVisualQuestionAnswering (line 747) | class AutoModelForVisualQuestionAnswering(metaclass=DummyObject): method __init__ (line 750) | def __init__(self, *args, **kwargs): class AutoModelForZeroShotImageClassification (line 754) | class AutoModelForZeroShotImageClassification(metaclass=DummyObject): method __init__ (line 757) | def __init__(self, *args, **kwargs): class AutoModelForZeroShotObjectDetection (line 761) | class AutoModelForZeroShotObjectDetection(metaclass=DummyObject): method __init__ (line 764) | def __init__(self, *args, **kwargs): class AutoModelWithLMHead (line 768) | class AutoModelWithLMHead(metaclass=DummyObject): method __init__ (line 771) | def __init__(self, *args, **kwargs): class AutoformerForPrediction (line 778) | class AutoformerForPrediction(metaclass=DummyObject): method __init__ (line 781) | def __init__(self, *args, **kwargs): class AutoformerModel (line 785) | class AutoformerModel(metaclass=DummyObject): method __init__ (line 788) | def __init__(self, *args, **kwargs): class AutoformerPreTrainedModel (line 792) | class AutoformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 795) | def __init__(self, *args, **kwargs): class BartForCausalLM (line 802) | class BartForCausalLM(metaclass=DummyObject): method __init__ (line 805) | def __init__(self, *args, **kwargs): class BartForConditionalGeneration (line 809) | class BartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 812) | def __init__(self, *args, **kwargs): class BartForQuestionAnswering (line 816) | class BartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 819) | def __init__(self, *args, **kwargs): class BartForSequenceClassification (line 823) | class BartForSequenceClassification(metaclass=DummyObject): method __init__ (line 826) | def __init__(self, *args, **kwargs): class BartModel (line 830) | class BartModel(metaclass=DummyObject): method __init__ (line 833) | def __init__(self, *args, **kwargs): class BartPretrainedModel (line 837) | class BartPretrainedModel(metaclass=DummyObject): method __init__ (line 840) | def __init__(self, *args, **kwargs): class PretrainedBartModel (line 844) | class PretrainedBartModel(metaclass=DummyObject): method __init__ (line 847) | def __init__(self, *args, **kwargs): class BeitForImageClassification (line 854) | class BeitForImageClassification(metaclass=DummyObject): method __init__ (line 857) | def __init__(self, *args, **kwargs): class BeitForMaskedImageModeling (line 861) | class BeitForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 864) | def __init__(self, *args, **kwargs): class BeitForSemanticSegmentation (line 868) | class BeitForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 871) | def __init__(self, *args, **kwargs): class BeitModel (line 875) | class BeitModel(metaclass=DummyObject): method __init__ (line 878) | def __init__(self, *args, **kwargs): class BeitPreTrainedModel (line 882) | class BeitPreTrainedModel(metaclass=DummyObject): method __init__ (line 885) | def __init__(self, *args, **kwargs): class BertForMaskedLM (line 892) | class BertForMaskedLM(metaclass=DummyObject): method __init__ (line 895) | def __init__(self, *args, **kwargs): class BertForMultipleChoice (line 899) | class BertForMultipleChoice(metaclass=DummyObject): method __init__ (line 902) | def __init__(self, *args, **kwargs): class BertForNextSentencePrediction (line 906) | class BertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 909) | def __init__(self, *args, **kwargs): class BertForPreTraining (line 913) | class BertForPreTraining(metaclass=DummyObject): method __init__ (line 916) | def __init__(self, *args, **kwargs): class BertForQuestionAnswering (line 920) | class BertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 923) | def __init__(self, *args, **kwargs): class BertForSequenceClassification (line 927) | class BertForSequenceClassification(metaclass=DummyObject): method __init__ (line 930) | def __init__(self, *args, **kwargs): class BertForTokenClassification (line 934) | class BertForTokenClassification(metaclass=DummyObject): method __init__ (line 937) | def __init__(self, *args, **kwargs): class BertLayer (line 941) | class BertLayer(metaclass=DummyObject): method __init__ (line 944) | def __init__(self, *args, **kwargs): class BertLMHeadModel (line 948) | class BertLMHeadModel(metaclass=DummyObject): method __init__ (line 951) | def __init__(self, *args, **kwargs): class BertModel (line 955) | class BertModel(metaclass=DummyObject): method __init__ (line 958) | def __init__(self, *args, **kwargs): class BertPreTrainedModel (line 962) | class BertPreTrainedModel(metaclass=DummyObject): method __init__ (line 965) | def __init__(self, *args, **kwargs): function load_tf_weights_in_bert (line 969) | def load_tf_weights_in_bert(*args, **kwargs): class BertGenerationDecoder (line 973) | class BertGenerationDecoder(metaclass=DummyObject): method __init__ (line 976) | def __init__(self, *args, **kwargs): class BertGenerationEncoder (line 980) | class BertGenerationEncoder(metaclass=DummyObject): method __init__ (line 983) | def __init__(self, *args, **kwargs): class BertGenerationPreTrainedModel (line 987) | class BertGenerationPreTrainedModel(metaclass=DummyObject): method __init__ (line 990) | def __init__(self, *args, **kwargs): function load_tf_weights_in_bert_generation (line 994) | def load_tf_weights_in_bert_generation(*args, **kwargs): class BigBirdForCausalLM (line 1001) | class BigBirdForCausalLM(metaclass=DummyObject): method __init__ (line 1004) | def __init__(self, *args, **kwargs): class BigBirdForMaskedLM (line 1008) | class BigBirdForMaskedLM(metaclass=DummyObject): method __init__ (line 1011) | def __init__(self, *args, **kwargs): class BigBirdForMultipleChoice (line 1015) | class BigBirdForMultipleChoice(metaclass=DummyObject): method __init__ (line 1018) | def __init__(self, *args, **kwargs): class BigBirdForPreTraining (line 1022) | class BigBirdForPreTraining(metaclass=DummyObject): method __init__ (line 1025) | def __init__(self, *args, **kwargs): class BigBirdForQuestionAnswering (line 1029) | class BigBirdForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1032) | def __init__(self, *args, **kwargs): class BigBirdForSequenceClassification (line 1036) | class BigBirdForSequenceClassification(metaclass=DummyObject): method __init__ (line 1039) | def __init__(self, *args, **kwargs): class BigBirdForTokenClassification (line 1043) | class BigBirdForTokenClassification(metaclass=DummyObject): method __init__ (line 1046) | def __init__(self, *args, **kwargs): class BigBirdLayer (line 1050) | class BigBirdLayer(metaclass=DummyObject): method __init__ (line 1053) | def __init__(self, *args, **kwargs): class BigBirdModel (line 1057) | class BigBirdModel(metaclass=DummyObject): method __init__ (line 1060) | def __init__(self, *args, **kwargs): class BigBirdPreTrainedModel (line 1064) | class BigBirdPreTrainedModel(metaclass=DummyObject): method __init__ (line 1067) | def __init__(self, *args, **kwargs): function load_tf_weights_in_big_bird (line 1071) | def load_tf_weights_in_big_bird(*args, **kwargs): class BigBirdPegasusForCausalLM (line 1078) | class BigBirdPegasusForCausalLM(metaclass=DummyObject): method __init__ (line 1081) | def __init__(self, *args, **kwargs): class BigBirdPegasusForConditionalGeneration (line 1085) | class BigBirdPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1088) | def __init__(self, *args, **kwargs): class BigBirdPegasusForQuestionAnswering (line 1092) | class BigBirdPegasusForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1095) | def __init__(self, *args, **kwargs): class BigBirdPegasusForSequenceClassification (line 1099) | class BigBirdPegasusForSequenceClassification(metaclass=DummyObject): method __init__ (line 1102) | def __init__(self, *args, **kwargs): class BigBirdPegasusModel (line 1106) | class BigBirdPegasusModel(metaclass=DummyObject): method __init__ (line 1109) | def __init__(self, *args, **kwargs): class BigBirdPegasusPreTrainedModel (line 1113) | class BigBirdPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 1116) | def __init__(self, *args, **kwargs): class BioGptForCausalLM (line 1123) | class BioGptForCausalLM(metaclass=DummyObject): method __init__ (line 1126) | def __init__(self, *args, **kwargs): class BioGptForSequenceClassification (line 1130) | class BioGptForSequenceClassification(metaclass=DummyObject): method __init__ (line 1133) | def __init__(self, *args, **kwargs): class BioGptForTokenClassification (line 1137) | class BioGptForTokenClassification(metaclass=DummyObject): method __init__ (line 1140) | def __init__(self, *args, **kwargs): class BioGptModel (line 1144) | class BioGptModel(metaclass=DummyObject): method __init__ (line 1147) | def __init__(self, *args, **kwargs): class BioGptPreTrainedModel (line 1151) | class BioGptPreTrainedModel(metaclass=DummyObject): method __init__ (line 1154) | def __init__(self, *args, **kwargs): class BitBackbone (line 1161) | class BitBackbone(metaclass=DummyObject): method __init__ (line 1164) | def __init__(self, *args, **kwargs): class BitForImageClassification (line 1168) | class BitForImageClassification(metaclass=DummyObject): method __init__ (line 1171) | def __init__(self, *args, **kwargs): class BitModel (line 1175) | class BitModel(metaclass=DummyObject): method __init__ (line 1178) | def __init__(self, *args, **kwargs): class BitPreTrainedModel (line 1182) | class BitPreTrainedModel(metaclass=DummyObject): method __init__ (line 1185) | def __init__(self, *args, **kwargs): class BlenderbotForCausalLM (line 1192) | class BlenderbotForCausalLM(metaclass=DummyObject): method __init__ (line 1195) | def __init__(self, *args, **kwargs): class BlenderbotForConditionalGeneration (line 1199) | class BlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1202) | def __init__(self, *args, **kwargs): class BlenderbotModel (line 1206) | class BlenderbotModel(metaclass=DummyObject): method __init__ (line 1209) | def __init__(self, *args, **kwargs): class BlenderbotPreTrainedModel (line 1213) | class BlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 1216) | def __init__(self, *args, **kwargs): class BlenderbotSmallForCausalLM (line 1223) | class BlenderbotSmallForCausalLM(metaclass=DummyObject): method __init__ (line 1226) | def __init__(self, *args, **kwargs): class BlenderbotSmallForConditionalGeneration (line 1230) | class BlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1233) | def __init__(self, *args, **kwargs): class BlenderbotSmallModel (line 1237) | class BlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 1240) | def __init__(self, *args, **kwargs): class BlenderbotSmallPreTrainedModel (line 1244) | class BlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 1247) | def __init__(self, *args, **kwargs): class BlipForConditionalGeneration (line 1254) | class BlipForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1257) | def __init__(self, *args, **kwargs): class BlipForImageTextRetrieval (line 1261) | class BlipForImageTextRetrieval(metaclass=DummyObject): method __init__ (line 1264) | def __init__(self, *args, **kwargs): class BlipForQuestionAnswering (line 1268) | class BlipForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1271) | def __init__(self, *args, **kwargs): class BlipModel (line 1275) | class BlipModel(metaclass=DummyObject): method __init__ (line 1278) | def __init__(self, *args, **kwargs): class BlipPreTrainedModel (line 1282) | class BlipPreTrainedModel(metaclass=DummyObject): method __init__ (line 1285) | def __init__(self, *args, **kwargs): class BlipTextModel (line 1289) | class BlipTextModel(metaclass=DummyObject): method __init__ (line 1292) | def __init__(self, *args, **kwargs): class BlipVisionModel (line 1296) | class BlipVisionModel(metaclass=DummyObject): method __init__ (line 1299) | def __init__(self, *args, **kwargs): class Blip2ForConditionalGeneration (line 1306) | class Blip2ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1309) | def __init__(self, *args, **kwargs): class Blip2Model (line 1313) | class Blip2Model(metaclass=DummyObject): method __init__ (line 1316) | def __init__(self, *args, **kwargs): class Blip2PreTrainedModel (line 1320) | class Blip2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1323) | def __init__(self, *args, **kwargs): class Blip2QFormerModel (line 1327) | class Blip2QFormerModel(metaclass=DummyObject): method __init__ (line 1330) | def __init__(self, *args, **kwargs): class Blip2VisionModel (line 1334) | class Blip2VisionModel(metaclass=DummyObject): method __init__ (line 1337) | def __init__(self, *args, **kwargs): class BloomForCausalLM (line 1344) | class BloomForCausalLM(metaclass=DummyObject): method __init__ (line 1347) | def __init__(self, *args, **kwargs): class BloomForQuestionAnswering (line 1351) | class BloomForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1354) | def __init__(self, *args, **kwargs): class BloomForSequenceClassification (line 1358) | class BloomForSequenceClassification(metaclass=DummyObject): method __init__ (line 1361) | def __init__(self, *args, **kwargs): class BloomForTokenClassification (line 1365) | class BloomForTokenClassification(metaclass=DummyObject): method __init__ (line 1368) | def __init__(self, *args, **kwargs): class BloomModel (line 1372) | class BloomModel(metaclass=DummyObject): method __init__ (line 1375) | def __init__(self, *args, **kwargs): class BloomPreTrainedModel (line 1379) | class BloomPreTrainedModel(metaclass=DummyObject): method __init__ (line 1382) | def __init__(self, *args, **kwargs): class BridgeTowerForContrastiveLearning (line 1389) | class BridgeTowerForContrastiveLearning(metaclass=DummyObject): method __init__ (line 1392) | def __init__(self, *args, **kwargs): class BridgeTowerForImageAndTextRetrieval (line 1396) | class BridgeTowerForImageAndTextRetrieval(metaclass=DummyObject): method __init__ (line 1399) | def __init__(self, *args, **kwargs): class BridgeTowerForMaskedLM (line 1403) | class BridgeTowerForMaskedLM(metaclass=DummyObject): method __init__ (line 1406) | def __init__(self, *args, **kwargs): class BridgeTowerModel (line 1410) | class BridgeTowerModel(metaclass=DummyObject): method __init__ (line 1413) | def __init__(self, *args, **kwargs): class BridgeTowerPreTrainedModel (line 1417) | class BridgeTowerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1420) | def __init__(self, *args, **kwargs): class CamembertForCausalLM (line 1427) | class CamembertForCausalLM(metaclass=DummyObject): method __init__ (line 1430) | def __init__(self, *args, **kwargs): class CamembertForMaskedLM (line 1434) | class CamembertForMaskedLM(metaclass=DummyObject): method __init__ (line 1437) | def __init__(self, *args, **kwargs): class CamembertForMultipleChoice (line 1441) | class CamembertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1444) | def __init__(self, *args, **kwargs): class CamembertForQuestionAnswering (line 1448) | class CamembertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1451) | def __init__(self, *args, **kwargs): class CamembertForSequenceClassification (line 1455) | class CamembertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1458) | def __init__(self, *args, **kwargs): class CamembertForTokenClassification (line 1462) | class CamembertForTokenClassification(metaclass=DummyObject): method __init__ (line 1465) | def __init__(self, *args, **kwargs): class CamembertModel (line 1469) | class CamembertModel(metaclass=DummyObject): method __init__ (line 1472) | def __init__(self, *args, **kwargs): class CamembertPreTrainedModel (line 1476) | class CamembertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1479) | def __init__(self, *args, **kwargs): class CanineForMultipleChoice (line 1486) | class CanineForMultipleChoice(metaclass=DummyObject): method __init__ (line 1489) | def __init__(self, *args, **kwargs): class CanineForQuestionAnswering (line 1493) | class CanineForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1496) | def __init__(self, *args, **kwargs): class CanineForSequenceClassification (line 1500) | class CanineForSequenceClassification(metaclass=DummyObject): method __init__ (line 1503) | def __init__(self, *args, **kwargs): class CanineForTokenClassification (line 1507) | class CanineForTokenClassification(metaclass=DummyObject): method __init__ (line 1510) | def __init__(self, *args, **kwargs): class CanineLayer (line 1514) | class CanineLayer(metaclass=DummyObject): method __init__ (line 1517) | def __init__(self, *args, **kwargs): class CanineModel (line 1521) | class CanineModel(metaclass=DummyObject): method __init__ (line 1524) | def __init__(self, *args, **kwargs): class CaninePreTrainedModel (line 1528) | class CaninePreTrainedModel(metaclass=DummyObject): method __init__ (line 1531) | def __init__(self, *args, **kwargs): function load_tf_weights_in_canine (line 1535) | def load_tf_weights_in_canine(*args, **kwargs): class ChineseCLIPModel (line 1542) | class ChineseCLIPModel(metaclass=DummyObject): method __init__ (line 1545) | def __init__(self, *args, **kwargs): class ChineseCLIPPreTrainedModel (line 1549) | class ChineseCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 1552) | def __init__(self, *args, **kwargs): class ChineseCLIPTextModel (line 1556) | class ChineseCLIPTextModel(metaclass=DummyObject): method __init__ (line 1559) | def __init__(self, *args, **kwargs): class ChineseCLIPVisionModel (line 1563) | class ChineseCLIPVisionModel(metaclass=DummyObject): method __init__ (line 1566) | def __init__(self, *args, **kwargs): class ClapAudioModel (line 1573) | class ClapAudioModel(metaclass=DummyObject): method __init__ (line 1576) | def __init__(self, *args, **kwargs): class ClapAudioModelWithProjection (line 1580) | class ClapAudioModelWithProjection(metaclass=DummyObject): method __init__ (line 1583) | def __init__(self, *args, **kwargs): class ClapFeatureExtractor (line 1587) | class ClapFeatureExtractor(metaclass=DummyObject): method __init__ (line 1590) | def __init__(self, *args, **kwargs): class ClapModel (line 1594) | class ClapModel(metaclass=DummyObject): method __init__ (line 1597) | def __init__(self, *args, **kwargs): class ClapPreTrainedModel (line 1601) | class ClapPreTrainedModel(metaclass=DummyObject): method __init__ (line 1604) | def __init__(self, *args, **kwargs): class ClapTextModel (line 1608) | class ClapTextModel(metaclass=DummyObject): method __init__ (line 1611) | def __init__(self, *args, **kwargs): class ClapTextModelWithProjection (line 1615) | class ClapTextModelWithProjection(metaclass=DummyObject): method __init__ (line 1618) | def __init__(self, *args, **kwargs): class CLIPModel (line 1625) | class CLIPModel(metaclass=DummyObject): method __init__ (line 1628) | def __init__(self, *args, **kwargs): class CLIPPreTrainedModel (line 1632) | class CLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 1635) | def __init__(self, *args, **kwargs): class CLIPTextModel (line 1639) | class CLIPTextModel(metaclass=DummyObject): method __init__ (line 1642) | def __init__(self, *args, **kwargs): class CLIPTextModelWithProjection (line 1646) | class CLIPTextModelWithProjection(metaclass=DummyObject): method __init__ (line 1649) | def __init__(self, *args, **kwargs): class CLIPVisionModel (line 1653) | class CLIPVisionModel(metaclass=DummyObject): method __init__ (line 1656) | def __init__(self, *args, **kwargs): class CLIPVisionModelWithProjection (line 1660) | class CLIPVisionModelWithProjection(metaclass=DummyObject): method __init__ (line 1663) | def __init__(self, *args, **kwargs): class CLIPSegForImageSegmentation (line 1670) | class CLIPSegForImageSegmentation(metaclass=DummyObject): method __init__ (line 1673) | def __init__(self, *args, **kwargs): class CLIPSegModel (line 1677) | class CLIPSegModel(metaclass=DummyObject): method __init__ (line 1680) | def __init__(self, *args, **kwargs): class CLIPSegPreTrainedModel (line 1684) | class CLIPSegPreTrainedModel(metaclass=DummyObject): method __init__ (line 1687) | def __init__(self, *args, **kwargs): class CLIPSegTextModel (line 1691) | class CLIPSegTextModel(metaclass=DummyObject): method __init__ (line 1694) | def __init__(self, *args, **kwargs): class CLIPSegVisionModel (line 1698) | class CLIPSegVisionModel(metaclass=DummyObject): method __init__ (line 1701) | def __init__(self, *args, **kwargs): class CodeGenForCausalLM (line 1708) | class CodeGenForCausalLM(metaclass=DummyObject): method __init__ (line 1711) | def __init__(self, *args, **kwargs): class CodeGenModel (line 1715) | class CodeGenModel(metaclass=DummyObject): method __init__ (line 1718) | def __init__(self, *args, **kwargs): class CodeGenPreTrainedModel (line 1722) | class CodeGenPreTrainedModel(metaclass=DummyObject): method __init__ (line 1725) | def __init__(self, *args, **kwargs): class ConditionalDetrForObjectDetection (line 1732) | class ConditionalDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 1735) | def __init__(self, *args, **kwargs): class ConditionalDetrForSegmentation (line 1739) | class ConditionalDetrForSegmentation(metaclass=DummyObject): method __init__ (line 1742) | def __init__(self, *args, **kwargs): class ConditionalDetrModel (line 1746) | class ConditionalDetrModel(metaclass=DummyObject): method __init__ (line 1749) | def __init__(self, *args, **kwargs): class ConditionalDetrPreTrainedModel (line 1753) | class ConditionalDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 1756) | def __init__(self, *args, **kwargs): class ConvBertForMaskedLM (line 1763) | class ConvBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1766) | def __init__(self, *args, **kwargs): class ConvBertForMultipleChoice (line 1770) | class ConvBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1773) | def __init__(self, *args, **kwargs): class ConvBertForQuestionAnswering (line 1777) | class ConvBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1780) | def __init__(self, *args, **kwargs): class ConvBertForSequenceClassification (line 1784) | class ConvBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1787) | def __init__(self, *args, **kwargs): class ConvBertForTokenClassification (line 1791) | class ConvBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1794) | def __init__(self, *args, **kwargs): class ConvBertLayer (line 1798) | class ConvBertLayer(metaclass=DummyObject): method __init__ (line 1801) | def __init__(self, *args, **kwargs): class ConvBertModel (line 1805) | class ConvBertModel(metaclass=DummyObject): method __init__ (line 1808) | def __init__(self, *args, **kwargs): class ConvBertPreTrainedModel (line 1812) | class ConvBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1815) | def __init__(self, *args, **kwargs): function load_tf_weights_in_convbert (line 1819) | def load_tf_weights_in_convbert(*args, **kwargs): class ConvNextBackbone (line 1826) | class ConvNextBackbone(metaclass=DummyObject): method __init__ (line 1829) | def __init__(self, *args, **kwargs): class ConvNextForImageClassification (line 1833) | class ConvNextForImageClassification(metaclass=DummyObject): method __init__ (line 1836) | def __init__(self, *args, **kwargs): class ConvNextModel (line 1840) | class ConvNextModel(metaclass=DummyObject): method __init__ (line 1843) | def __init__(self, *args, **kwargs): class ConvNextPreTrainedModel (line 1847) | class ConvNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 1850) | def __init__(self, *args, **kwargs): class ConvNextV2Backbone (line 1857) | class ConvNextV2Backbone(metaclass=DummyObject): method __init__ (line 1860) | def __init__(self, *args, **kwargs): class ConvNextV2ForImageClassification (line 1864) | class ConvNextV2ForImageClassification(metaclass=DummyObject): method __init__ (line 1867) | def __init__(self, *args, **kwargs): class ConvNextV2Model (line 1871) | class ConvNextV2Model(metaclass=DummyObject): method __init__ (line 1874) | def __init__(self, *args, **kwargs): class ConvNextV2PreTrainedModel (line 1878) | class ConvNextV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1881) | def __init__(self, *args, **kwargs): class CpmAntForCausalLM (line 1888) | class CpmAntForCausalLM(metaclass=DummyObject): method __init__ (line 1891) | def __init__(self, *args, **kwargs): class CpmAntModel (line 1895) | class CpmAntModel(metaclass=DummyObject): method __init__ (line 1898) | def __init__(self, *args, **kwargs): class CpmAntPreTrainedModel (line 1902) | class CpmAntPreTrainedModel(metaclass=DummyObject): method __init__ (line 1905) | def __init__(self, *args, **kwargs): class CTRLForSequenceClassification (line 1912) | class CTRLForSequenceClassification(metaclass=DummyObject): method __init__ (line 1915) | def __init__(self, *args, **kwargs): class CTRLLMHeadModel (line 1919) | class CTRLLMHeadModel(metaclass=DummyObject): method __init__ (line 1922) | def __init__(self, *args, **kwargs): class CTRLModel (line 1926) | class CTRLModel(metaclass=DummyObject): method __init__ (line 1929) | def __init__(self, *args, **kwargs): class CTRLPreTrainedModel (line 1933) | class CTRLPreTrainedModel(metaclass=DummyObject): method __init__ (line 1936) | def __init__(self, *args, **kwargs): class CvtForImageClassification (line 1943) | class CvtForImageClassification(metaclass=DummyObject): method __init__ (line 1946) | def __init__(self, *args, **kwargs): class CvtModel (line 1950) | class CvtModel(metaclass=DummyObject): method __init__ (line 1953) | def __init__(self, *args, **kwargs): class CvtPreTrainedModel (line 1957) | class CvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 1960) | def __init__(self, *args, **kwargs): class Data2VecAudioForAudioFrameClassification (line 1973) | class Data2VecAudioForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 1976) | def __init__(self, *args, **kwargs): class Data2VecAudioForCTC (line 1980) | class Data2VecAudioForCTC(metaclass=DummyObject): method __init__ (line 1983) | def __init__(self, *args, **kwargs): class Data2VecAudioForSequenceClassification (line 1987) | class Data2VecAudioForSequenceClassification(metaclass=DummyObject): method __init__ (line 1990) | def __init__(self, *args, **kwargs): class Data2VecAudioForXVector (line 1994) | class Data2VecAudioForXVector(metaclass=DummyObject): method __init__ (line 1997) | def __init__(self, *args, **kwargs): class Data2VecAudioModel (line 2001) | class Data2VecAudioModel(metaclass=DummyObject): method __init__ (line 2004) | def __init__(self, *args, **kwargs): class Data2VecAudioPreTrainedModel (line 2008) | class Data2VecAudioPreTrainedModel(metaclass=DummyObject): method __init__ (line 2011) | def __init__(self, *args, **kwargs): class Data2VecTextForCausalLM (line 2015) | class Data2VecTextForCausalLM(metaclass=DummyObject): method __init__ (line 2018) | def __init__(self, *args, **kwargs): class Data2VecTextForMaskedLM (line 2022) | class Data2VecTextForMaskedLM(metaclass=DummyObject): method __init__ (line 2025) | def __init__(self, *args, **kwargs): class Data2VecTextForMultipleChoice (line 2029) | class Data2VecTextForMultipleChoice(metaclass=DummyObject): method __init__ (line 2032) | def __init__(self, *args, **kwargs): class Data2VecTextForQuestionAnswering (line 2036) | class Data2VecTextForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2039) | def __init__(self, *args, **kwargs): class Data2VecTextForSequenceClassification (line 2043) | class Data2VecTextForSequenceClassification(metaclass=DummyObject): method __init__ (line 2046) | def __init__(self, *args, **kwargs): class Data2VecTextForTokenClassification (line 2050) | class Data2VecTextForTokenClassification(metaclass=DummyObject): method __init__ (line 2053) | def __init__(self, *args, **kwargs): class Data2VecTextModel (line 2057) | class Data2VecTextModel(metaclass=DummyObject): method __init__ (line 2060) | def __init__(self, *args, **kwargs): class Data2VecTextPreTrainedModel (line 2064) | class Data2VecTextPreTrainedModel(metaclass=DummyObject): method __init__ (line 2067) | def __init__(self, *args, **kwargs): class Data2VecVisionForImageClassification (line 2071) | class Data2VecVisionForImageClassification(metaclass=DummyObject): method __init__ (line 2074) | def __init__(self, *args, **kwargs): class Data2VecVisionForSemanticSegmentation (line 2078) | class Data2VecVisionForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 2081) | def __init__(self, *args, **kwargs): class Data2VecVisionModel (line 2085) | class Data2VecVisionModel(metaclass=DummyObject): method __init__ (line 2088) | def __init__(self, *args, **kwargs): class Data2VecVisionPreTrainedModel (line 2092) | class Data2VecVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 2095) | def __init__(self, *args, **kwargs): class DebertaForMaskedLM (line 2102) | class DebertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2105) | def __init__(self, *args, **kwargs): class DebertaForQuestionAnswering (line 2109) | class DebertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2112) | def __init__(self, *args, **kwargs): class DebertaForSequenceClassification (line 2116) | class DebertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2119) | def __init__(self, *args, **kwargs): class DebertaForTokenClassification (line 2123) | class DebertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2126) | def __init__(self, *args, **kwargs): class DebertaModel (line 2130) | class DebertaModel(metaclass=DummyObject): method __init__ (line 2133) | def __init__(self, *args, **kwargs): class DebertaPreTrainedModel (line 2137) | class DebertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2140) | def __init__(self, *args, **kwargs): class DebertaV2ForMaskedLM (line 2147) | class DebertaV2ForMaskedLM(metaclass=DummyObject): method __init__ (line 2150) | def __init__(self, *args, **kwargs): class DebertaV2ForMultipleChoice (line 2154) | class DebertaV2ForMultipleChoice(metaclass=DummyObject): method __init__ (line 2157) | def __init__(self, *args, **kwargs): class DebertaV2ForQuestionAnswering (line 2161) | class DebertaV2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2164) | def __init__(self, *args, **kwargs): class DebertaV2ForSequenceClassification (line 2168) | class DebertaV2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2171) | def __init__(self, *args, **kwargs): class DebertaV2ForTokenClassification (line 2175) | class DebertaV2ForTokenClassification(metaclass=DummyObject): method __init__ (line 2178) | def __init__(self, *args, **kwargs): class DebertaV2Model (line 2182) | class DebertaV2Model(metaclass=DummyObject): method __init__ (line 2185) | def __init__(self, *args, **kwargs): class DebertaV2PreTrainedModel (line 2189) | class DebertaV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2192) | def __init__(self, *args, **kwargs): class DecisionTransformerGPT2Model (line 2199) | class DecisionTransformerGPT2Model(metaclass=DummyObject): method __init__ (line 2202) | def __init__(self, *args, **kwargs): class DecisionTransformerGPT2PreTrainedModel (line 2206) | class DecisionTransformerGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2209) | def __init__(self, *args, **kwargs): class DecisionTransformerModel (line 2213) | class DecisionTransformerModel(metaclass=DummyObject): method __init__ (line 2216) | def __init__(self, *args, **kwargs): class DecisionTransformerPreTrainedModel (line 2220) | class DecisionTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2223) | def __init__(self, *args, **kwargs): class DeformableDetrForObjectDetection (line 2230) | class DeformableDetrForObjectDetection(metaclass=DummyObject): method __init__ (line 2233) | def __init__(self, *args, **kwargs): class DeformableDetrModel (line 2237) | class DeformableDetrModel(metaclass=DummyObject): method __init__ (line 2240) | def __init__(self, *args, **kwargs): class DeformableDetrPreTrainedModel (line 2244) | class DeformableDetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 2247) | def __init__(self, *args, **kwargs): class DeiTForImageClassification (line 2254) | class DeiTForImageClassification(metaclass=DummyObject): method __init__ (line 2257) | def __init__(self, *args, **kwargs): class DeiTForImageClassificationWithTeacher (line 2261) | class DeiTForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 2264) | def __init__(self, *args, **kwargs): class DeiTForMaskedImageModeling (line 2268) | class DeiTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 2271) | def __init__(self, *args, **kwargs): class DeiTModel (line 2275) | class DeiTModel(metaclass=DummyObject): method __init__ (line 2278) | def __init__(self, *args, **kwargs): class DeiTPreTrainedModel (line 2282) | class DeiTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2285) | def __init__(self, *args, **kwargs): class DetaForObjectDetection (line 2292) | class DetaForObjectDetection(metaclass=DummyObject): method __init__ (line 2295) | def __init__(self, *args, **kwargs): class DetaModel (line 2299) | class DetaModel(metaclass=DummyObject): method __init__ (line 2302) | def __init__(self, *args, **kwargs): class DetaPreTrainedModel (line 2306) | class DetaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2309) | def __init__(self, *args, **kwargs): class DetrForObjectDetection (line 2316) | class DetrForObjectDetection(metaclass=DummyObject): method __init__ (line 2319) | def __init__(self, *args, **kwargs): class DetrForSegmentation (line 2323) | class DetrForSegmentation(metaclass=DummyObject): method __init__ (line 2326) | def __init__(self, *args, **kwargs): class DetrModel (line 2330) | class DetrModel(metaclass=DummyObject): method __init__ (line 2333) | def __init__(self, *args, **kwargs): class DetrPreTrainedModel (line 2337) | class DetrPreTrainedModel(metaclass=DummyObject): method __init__ (line 2340) | def __init__(self, *args, **kwargs): class DinatBackbone (line 2347) | class DinatBackbone(metaclass=DummyObject): method __init__ (line 2350) | def __init__(self, *args, **kwargs): class DinatForImageClassification (line 2354) | class DinatForImageClassification(metaclass=DummyObject): method __init__ (line 2357) | def __init__(self, *args, **kwargs): class DinatModel (line 2361) | class DinatModel(metaclass=DummyObject): method __init__ (line 2364) | def __init__(self, *args, **kwargs): class DinatPreTrainedModel (line 2368) | class DinatPreTrainedModel(metaclass=DummyObject): method __init__ (line 2371) | def __init__(self, *args, **kwargs): class DistilBertForMaskedLM (line 2378) | class DistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 2381) | def __init__(self, *args, **kwargs): class DistilBertForMultipleChoice (line 2385) | class DistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2388) | def __init__(self, *args, **kwargs): class DistilBertForQuestionAnswering (line 2392) | class DistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2395) | def __init__(self, *args, **kwargs): class DistilBertForSequenceClassification (line 2399) | class DistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2402) | def __init__(self, *args, **kwargs): class DistilBertForTokenClassification (line 2406) | class DistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 2409) | def __init__(self, *args, **kwargs): class DistilBertModel (line 2413) | class DistilBertModel(metaclass=DummyObject): method __init__ (line 2416) | def __init__(self, *args, **kwargs): class DistilBertPreTrainedModel (line 2420) | class DistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2423) | def __init__(self, *args, **kwargs): class DonutSwinModel (line 2430) | class DonutSwinModel(metaclass=DummyObject): method __init__ (line 2433) | def __init__(self, *args, **kwargs): class DonutSwinPreTrainedModel (line 2437) | class DonutSwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 2440) | def __init__(self, *args, **kwargs): class DPRContextEncoder (line 2453) | class DPRContextEncoder(metaclass=DummyObject): method __init__ (line 2456) | def __init__(self, *args, **kwargs): class DPRPretrainedContextEncoder (line 2460) | class DPRPretrainedContextEncoder(metaclass=DummyObject): method __init__ (line 2463) | def __init__(self, *args, **kwargs): class DPRPreTrainedModel (line 2467) | class DPRPreTrainedModel(metaclass=DummyObject): method __init__ (line 2470) | def __init__(self, *args, **kwargs): class DPRPretrainedQuestionEncoder (line 2474) | class DPRPretrainedQuestionEncoder(metaclass=DummyObject): method __init__ (line 2477) | def __init__(self, *args, **kwargs): class DPRPretrainedReader (line 2481) | class DPRPretrainedReader(metaclass=DummyObject): method __init__ (line 2484) | def __init__(self, *args, **kwargs): class DPRQuestionEncoder (line 2488) | class DPRQuestionEncoder(metaclass=DummyObject): method __init__ (line 2491) | def __init__(self, *args, **kwargs): class DPRReader (line 2495) | class DPRReader(metaclass=DummyObject): method __init__ (line 2498) | def __init__(self, *args, **kwargs): class DPTForDepthEstimation (line 2505) | class DPTForDepthEstimation(metaclass=DummyObject): method __init__ (line 2508) | def __init__(self, *args, **kwargs): class DPTForSemanticSegmentation (line 2512) | class DPTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 2515) | def __init__(self, *args, **kwargs): class DPTModel (line 2519) | class DPTModel(metaclass=DummyObject): method __init__ (line 2522) | def __init__(self, *args, **kwargs): class DPTPreTrainedModel (line 2526) | class DPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2529) | def __init__(self, *args, **kwargs): class EfficientFormerForImageClassification (line 2536) | class EfficientFormerForImageClassification(metaclass=DummyObject): method __init__ (line 2539) | def __init__(self, *args, **kwargs): class EfficientFormerForImageClassificationWithTeacher (line 2543) | class EfficientFormerForImageClassificationWithTeacher(metaclass=DummyOb... method __init__ (line 2546) | def __init__(self, *args, **kwargs): class EfficientFormerModel (line 2550) | class EfficientFormerModel(metaclass=DummyObject): method __init__ (line 2553) | def __init__(self, *args, **kwargs): class EfficientFormerPreTrainedModel (line 2557) | class EfficientFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2560) | def __init__(self, *args, **kwargs): class EfficientNetForImageClassification (line 2567) | class EfficientNetForImageClassification(metaclass=DummyObject): method __init__ (line 2570) | def __init__(self, *args, **kwargs): class EfficientNetModel (line 2574) | class EfficientNetModel(metaclass=DummyObject): method __init__ (line 2577) | def __init__(self, *args, **kwargs): class EfficientNetPreTrainedModel (line 2581) | class EfficientNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2584) | def __init__(self, *args, **kwargs): class ElectraForCausalLM (line 2591) | class ElectraForCausalLM(metaclass=DummyObject): method __init__ (line 2594) | def __init__(self, *args, **kwargs): class ElectraForMaskedLM (line 2598) | class ElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 2601) | def __init__(self, *args, **kwargs): class ElectraForMultipleChoice (line 2605) | class ElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 2608) | def __init__(self, *args, **kwargs): class ElectraForPreTraining (line 2612) | class ElectraForPreTraining(metaclass=DummyObject): method __init__ (line 2615) | def __init__(self, *args, **kwargs): class ElectraForQuestionAnswering (line 2619) | class ElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2622) | def __init__(self, *args, **kwargs): class ElectraForSequenceClassification (line 2626) | class ElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 2629) | def __init__(self, *args, **kwargs): class ElectraForTokenClassification (line 2633) | class ElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 2636) | def __init__(self, *args, **kwargs): class ElectraModel (line 2640) | class ElectraModel(metaclass=DummyObject): method __init__ (line 2643) | def __init__(self, *args, **kwargs): class ElectraPreTrainedModel (line 2647) | class ElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 2650) | def __init__(self, *args, **kwargs): function load_tf_weights_in_electra (line 2654) | def load_tf_weights_in_electra(*args, **kwargs): class EncoderDecoderModel (line 2658) | class EncoderDecoderModel(metaclass=DummyObject): method __init__ (line 2661) | def __init__(self, *args, **kwargs): class ErnieForCausalLM (line 2668) | class ErnieForCausalLM(metaclass=DummyObject): method __init__ (line 2671) | def __init__(self, *args, **kwargs): class ErnieForMaskedLM (line 2675) | class ErnieForMaskedLM(metaclass=DummyObject): method __init__ (line 2678) | def __init__(self, *args, **kwargs): class ErnieForMultipleChoice (line 2682) | class ErnieForMultipleChoice(metaclass=DummyObject): method __init__ (line 2685) | def __init__(self, *args, **kwargs): class ErnieForNextSentencePrediction (line 2689) | class ErnieForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 2692) | def __init__(self, *args, **kwargs): class ErnieForPreTraining (line 2696) | class ErnieForPreTraining(metaclass=DummyObject): method __init__ (line 2699) | def __init__(self, *args, **kwargs): class ErnieForQuestionAnswering (line 2703) | class ErnieForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2706) | def __init__(self, *args, **kwargs): class ErnieForSequenceClassification (line 2710) | class ErnieForSequenceClassification(metaclass=DummyObject): method __init__ (line 2713) | def __init__(self, *args, **kwargs): class ErnieForTokenClassification (line 2717) | class ErnieForTokenClassification(metaclass=DummyObject): method __init__ (line 2720) | def __init__(self, *args, **kwargs): class ErnieModel (line 2724) | class ErnieModel(metaclass=DummyObject): method __init__ (line 2727) | def __init__(self, *args, **kwargs): class ErniePreTrainedModel (line 2731) | class ErniePreTrainedModel(metaclass=DummyObject): method __init__ (line 2734) | def __init__(self, *args, **kwargs): class ErnieMForInformationExtraction (line 2741) | class ErnieMForInformationExtraction(metaclass=DummyObject): method __init__ (line 2744) | def __init__(self, *args, **kwargs): class ErnieMForMultipleChoice (line 2748) | class ErnieMForMultipleChoice(metaclass=DummyObject): method __init__ (line 2751) | def __init__(self, *args, **kwargs): class ErnieMForQuestionAnswering (line 2755) | class ErnieMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2758) | def __init__(self, *args, **kwargs): class ErnieMForSequenceClassification (line 2762) | class ErnieMForSequenceClassification(metaclass=DummyObject): method __init__ (line 2765) | def __init__(self, *args, **kwargs): class ErnieMForTokenClassification (line 2769) | class ErnieMForTokenClassification(metaclass=DummyObject): method __init__ (line 2772) | def __init__(self, *args, **kwargs): class ErnieMModel (line 2776) | class ErnieMModel(metaclass=DummyObject): method __init__ (line 2779) | def __init__(self, *args, **kwargs): class ErnieMPreTrainedModel (line 2783) | class ErnieMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2786) | def __init__(self, *args, **kwargs): class EsmFoldPreTrainedModel (line 2793) | class EsmFoldPreTrainedModel(metaclass=DummyObject): method __init__ (line 2796) | def __init__(self, *args, **kwargs): class EsmForMaskedLM (line 2800) | class EsmForMaskedLM(metaclass=DummyObject): method __init__ (line 2803) | def __init__(self, *args, **kwargs): class EsmForProteinFolding (line 2807) | class EsmForProteinFolding(metaclass=DummyObject): method __init__ (line 2810) | def __init__(self, *args, **kwargs): class EsmForSequenceClassification (line 2814) | class EsmForSequenceClassification(metaclass=DummyObject): method __init__ (line 2817) | def __init__(self, *args, **kwargs): class EsmForTokenClassification (line 2821) | class EsmForTokenClassification(metaclass=DummyObject): method __init__ (line 2824) | def __init__(self, *args, **kwargs): class EsmModel (line 2828) | class EsmModel(metaclass=DummyObject): method __init__ (line 2831) | def __init__(self, *args, **kwargs): class EsmPreTrainedModel (line 2835) | class EsmPreTrainedModel(metaclass=DummyObject): method __init__ (line 2838) | def __init__(self, *args, **kwargs): class FlaubertForMultipleChoice (line 2845) | class FlaubertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2848) | def __init__(self, *args, **kwargs): class FlaubertForQuestionAnswering (line 2852) | class FlaubertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2855) | def __init__(self, *args, **kwargs): class FlaubertForQuestionAnsweringSimple (line 2859) | class FlaubertForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2862) | def __init__(self, *args, **kwargs): class FlaubertForSequenceClassification (line 2866) | class FlaubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2869) | def __init__(self, *args, **kwargs): class FlaubertForTokenClassification (line 2873) | class FlaubertForTokenClassification(metaclass=DummyObject): method __init__ (line 2876) | def __init__(self, *args, **kwargs): class FlaubertModel (line 2880) | class FlaubertModel(metaclass=DummyObject): method __init__ (line 2883) | def __init__(self, *args, **kwargs): class FlaubertPreTrainedModel (line 2887) | class FlaubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2890) | def __init__(self, *args, **kwargs): class FlaubertWithLMHeadModel (line 2894) | class FlaubertWithLMHeadModel(metaclass=DummyObject): method __init__ (line 2897) | def __init__(self, *args, **kwargs): class FlavaForPreTraining (line 2904) | class FlavaForPreTraining(metaclass=DummyObject): method __init__ (line 2907) | def __init__(self, *args, **kwargs): class FlavaImageCodebook (line 2911) | class FlavaImageCodebook(metaclass=DummyObject): method __init__ (line 2914) | def __init__(self, *args, **kwargs): class FlavaImageModel (line 2918) | class FlavaImageModel(metaclass=DummyObject): method __init__ (line 2921) | def __init__(self, *args, **kwargs): class FlavaModel (line 2925) | class FlavaModel(metaclass=DummyObject): method __init__ (line 2928) | def __init__(self, *args, **kwargs): class FlavaMultimodalModel (line 2932) | class FlavaMultimodalModel(metaclass=DummyObject): method __init__ (line 2935) | def __init__(self, *args, **kwargs): class FlavaPreTrainedModel (line 2939) | class FlavaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2942) | def __init__(self, *args, **kwargs): class FlavaTextModel (line 2946) | class FlavaTextModel(metaclass=DummyObject): method __init__ (line 2949) | def __init__(self, *args, **kwargs): class FNetForMaskedLM (line 2956) | class FNetForMaskedLM(metaclass=DummyObject): method __init__ (line 2959) | def __init__(self, *args, **kwargs): class FNetForMultipleChoice (line 2963) | class FNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 2966) | def __init__(self, *args, **kwargs): class FNetForNextSentencePrediction (line 2970) | class FNetForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 2973) | def __init__(self, *args, **kwargs): class FNetForPreTraining (line 2977) | class FNetForPreTraining(metaclass=DummyObject): method __init__ (line 2980) | def __init__(self, *args, **kwargs): class FNetForQuestionAnswering (line 2984) | class FNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2987) | def __init__(self, *args, **kwargs): class FNetForSequenceClassification (line 2991) | class FNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 2994) | def __init__(self, *args, **kwargs): class FNetForTokenClassification (line 2998) | class FNetForTokenClassification(metaclass=DummyObject): method __init__ (line 3001) | def __init__(self, *args, **kwargs): class FNetLayer (line 3005) | class FNetLayer(metaclass=DummyObject): method __init__ (line 3008) | def __init__(self, *args, **kwargs): class FNetModel (line 3012) | class FNetModel(metaclass=DummyObject): method __init__ (line 3015) | def __init__(self, *args, **kwargs): class FNetPreTrainedModel (line 3019) | class FNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 3022) | def __init__(self, *args, **kwargs): class FocalNetBackbone (line 3029) | class FocalNetBackbone(metaclass=DummyObject): method __init__ (line 3032) | def __init__(self, *args, **kwargs): class FocalNetForImageClassification (line 3036) | class FocalNetForImageClassification(metaclass=DummyObject): method __init__ (line 3039) | def __init__(self, *args, **kwargs): class FocalNetForMaskedImageModeling (line 3043) | class FocalNetForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 3046) | def __init__(self, *args, **kwargs): class FocalNetModel (line 3050) | class FocalNetModel(metaclass=DummyObject): method __init__ (line 3053) | def __init__(self, *args, **kwargs): class FocalNetPreTrainedModel (line 3057) | class FocalNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 3060) | def __init__(self, *args, **kwargs): class FSMTForConditionalGeneration (line 3064) | class FSMTForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3067) | def __init__(self, *args, **kwargs): class FSMTModel (line 3071) | class FSMTModel(metaclass=DummyObject): method __init__ (line 3074) | def __init__(self, *args, **kwargs): class PretrainedFSMTModel (line 3078) | class PretrainedFSMTModel(metaclass=DummyObject): method __init__ (line 3081) | def __init__(self, *args, **kwargs): class FunnelBaseModel (line 3088) | class FunnelBaseModel(metaclass=DummyObject): method __init__ (line 3091) | def __init__(self, *args, **kwargs): class FunnelForMaskedLM (line 3095) | class FunnelForMaskedLM(metaclass=DummyObject): method __init__ (line 3098) | def __init__(self, *args, **kwargs): class FunnelForMultipleChoice (line 3102) | class FunnelForMultipleChoice(metaclass=DummyObject): method __init__ (line 3105) | def __init__(self, *args, **kwargs): class FunnelForPreTraining (line 3109) | class FunnelForPreTraining(metaclass=DummyObject): method __init__ (line 3112) | def __init__(self, *args, **kwargs): class FunnelForQuestionAnswering (line 3116) | class FunnelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3119) | def __init__(self, *args, **kwargs): class FunnelForSequenceClassification (line 3123) | class FunnelForSequenceClassification(metaclass=DummyObject): method __init__ (line 3126) | def __init__(self, *args, **kwargs): class FunnelForTokenClassification (line 3130) | class FunnelForTokenClassification(metaclass=DummyObject): method __init__ (line 3133) | def __init__(self, *args, **kwargs): class FunnelModel (line 3137) | class FunnelModel(metaclass=DummyObject): method __init__ (line 3140) | def __init__(self, *args, **kwargs): class FunnelPreTrainedModel (line 3144) | class FunnelPreTrainedModel(metaclass=DummyObject): method __init__ (line 3147) | def __init__(self, *args, **kwargs): function load_tf_weights_in_funnel (line 3151) | def load_tf_weights_in_funnel(*args, **kwargs): class GitForCausalLM (line 3158) | class GitForCausalLM(metaclass=DummyObject): method __init__ (line 3161) | def __init__(self, *args, **kwargs): class GitModel (line 3165) | class GitModel(metaclass=DummyObject): method __init__ (line 3168) | def __init__(self, *args, **kwargs): class GitPreTrainedModel (line 3172) | class GitPreTrainedModel(metaclass=DummyObject): method __init__ (line 3175) | def __init__(self, *args, **kwargs): class GitVisionModel (line 3179) | class GitVisionModel(metaclass=DummyObject): method __init__ (line 3182) | def __init__(self, *args, **kwargs): class GLPNForDepthEstimation (line 3189) | class GLPNForDepthEstimation(metaclass=DummyObject): method __init__ (line 3192) | def __init__(self, *args, **kwargs): class GLPNModel (line 3196) | class GLPNModel(metaclass=DummyObject): method __init__ (line 3199) | def __init__(self, *args, **kwargs): class GLPNPreTrainedModel (line 3203) | class GLPNPreTrainedModel(metaclass=DummyObject): method __init__ (line 3206) | def __init__(self, *args, **kwargs): class GPT2DoubleHeadsModel (line 3213) | class GPT2DoubleHeadsModel(metaclass=DummyObject): method __init__ (line 3216) | def __init__(self, *args, **kwargs): class GPT2ForQuestionAnswering (line 3220) | class GPT2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3223) | def __init__(self, *args, **kwargs): class GPT2ForSequenceClassification (line 3227) | class GPT2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 3230) | def __init__(self, *args, **kwargs): class GPT2ForTokenClassification (line 3234) | class GPT2ForTokenClassification(metaclass=DummyObject): method __init__ (line 3237) | def __init__(self, *args, **kwargs): class GPT2LMHeadModel (line 3241) | class GPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 3244) | def __init__(self, *args, **kwargs): class GPT2Model (line 3248) | class GPT2Model(metaclass=DummyObject): method __init__ (line 3251) | def __init__(self, *args, **kwargs): class GPT2PreTrainedModel (line 3255) | class GPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 3258) | def __init__(self, *args, **kwargs): function load_tf_weights_in_gpt2 (line 3262) | def load_tf_weights_in_gpt2(*args, **kwargs): class GPTBigCodeForCausalLM (line 3269) | class GPTBigCodeForCausalLM(metaclass=DummyObject): method __init__ (line 3272) | def __init__(self, *args, **kwargs): class GPTBigCodeForSequenceClassification (line 3276) | class GPTBigCodeForSequenceClassification(metaclass=DummyObject): method __init__ (line 3279) | def __init__(self, *args, **kwargs): class GPTBigCodeForTokenClassification (line 3283) | class GPTBigCodeForTokenClassification(metaclass=DummyObject): method __init__ (line 3286) | def __init__(self, *args, **kwargs): class GPTBigCodeModel (line 3290) | class GPTBigCodeModel(metaclass=DummyObject): method __init__ (line 3293) | def __init__(self, *args, **kwargs): class GPTBigCodePreTrainedModel (line 3297) | class GPTBigCodePreTrainedModel(metaclass=DummyObject): method __init__ (line 3300) | def __init__(self, *args, **kwargs): class GPTNeoForCausalLM (line 3307) | class GPTNeoForCausalLM(metaclass=DummyObject): method __init__ (line 3310) | def __init__(self, *args, **kwargs): class GPTNeoForQuestionAnswering (line 3314) | class GPTNeoForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3317) | def __init__(self, *args, **kwargs): class GPTNeoForSequenceClassification (line 3321) | class GPTNeoForSequenceClassification(metaclass=DummyObject): method __init__ (line 3324) | def __init__(self, *args, **kwargs): class GPTNeoForTokenClassification (line 3328) | class GPTNeoForTokenClassification(metaclass=DummyObject): method __init__ (line 3331) | def __init__(self, *args, **kwargs): class GPTNeoModel (line 3335) | class GPTNeoModel(metaclass=DummyObject): method __init__ (line 3338) | def __init__(self, *args, **kwargs): class GPTNeoPreTrainedModel (line 3342) | class GPTNeoPreTrainedModel(metaclass=DummyObject): method __init__ (line 3345) | def __init__(self, *args, **kwargs): function load_tf_weights_in_gpt_neo (line 3349) | def load_tf_weights_in_gpt_neo(*args, **kwargs): class GPTNeoXForCausalLM (line 3356) | class GPTNeoXForCausalLM(metaclass=DummyObject): method __init__ (line 3359) | def __init__(self, *args, **kwargs): class GPTNeoXForQuestionAnswering (line 3363) | class GPTNeoXForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3366) | def __init__(self, *args, **kwargs): class GPTNeoXForSequenceClassification (line 3370) | class GPTNeoXForSequenceClassification(metaclass=DummyObject): method __init__ (line 3373) | def __init__(self, *args, **kwargs): class GPTNeoXForTokenClassification (line 3377) | class GPTNeoXForTokenClassification(metaclass=DummyObject): method __init__ (line 3380) | def __init__(self, *args, **kwargs): class GPTNeoXLayer (line 3384) | class GPTNeoXLayer(metaclass=DummyObject): method __init__ (line 3387) | def __init__(self, *args, **kwargs): class GPTNeoXModel (line 3391) | class GPTNeoXModel(metaclass=DummyObject): method __init__ (line 3394) | def __init__(self, *args, **kwargs): class GPTNeoXPreTrainedModel (line 3398) | class GPTNeoXPreTrainedModel(metaclass=DummyObject): method __init__ (line 3401) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseForCausalLM (line 3408) | class GPTNeoXJapaneseForCausalLM(metaclass=DummyObject): method __init__ (line 3411) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseLayer (line 3415) | class GPTNeoXJapaneseLayer(metaclass=DummyObject): method __init__ (line 3418) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseModel (line 3422) | class GPTNeoXJapaneseModel(metaclass=DummyObject): method __init__ (line 3425) | def __init__(self, *args, **kwargs): class GPTNeoXJapanesePreTrainedModel (line 3429) | class GPTNeoXJapanesePreTrainedModel(metaclass=DummyObject): method __init__ (line 3432) | def __init__(self, *args, **kwargs): class GPTJForCausalLM (line 3439) | class GPTJForCausalLM(metaclass=DummyObject): method __init__ (line 3442) | def __init__(self, *args, **kwargs): class GPTJForQuestionAnswering (line 3446) | class GPTJForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3449) | def __init__(self, *args, **kwargs): class GPTJForSequenceClassification (line 3453) | class GPTJForSequenceClassification(metaclass=DummyObject): method __init__ (line 3456) | def __init__(self, *args, **kwargs): class GPTJModel (line 3460) | class GPTJModel(metaclass=DummyObject): method __init__ (line 3463) | def __init__(self, *args, **kwargs): class GPTJPreTrainedModel (line 3467) | class GPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 3470) | def __init__(self, *args, **kwargs): class GPTSanJapaneseForConditionalGeneration (line 3477) | class GPTSanJapaneseForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3480) | def __init__(self, *args, **kwargs): class GPTSanJapaneseModel (line 3484) | class GPTSanJapaneseModel(metaclass=DummyObject): method __init__ (line 3487) | def __init__(self, *args, **kwargs): class GPTSanJapanesePreTrainedModel (line 3491) | class GPTSanJapanesePreTrainedModel(metaclass=DummyObject): method __init__ (line 3494) | def __init__(self, *args, **kwargs): class GraphormerForGraphClassification (line 3501) | class GraphormerForGraphClassification(metaclass=DummyObject): method __init__ (line 3504) | def __init__(self, *args, **kwargs): class GraphormerModel (line 3508) | class GraphormerModel(metaclass=DummyObject): method __init__ (line 3511) | def __init__(self, *args, **kwargs): class GraphormerPreTrainedModel (line 3515) | class GraphormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 3518) | def __init__(self, *args, **kwargs): class GroupViTModel (line 3525) | class GroupViTModel(metaclass=DummyObject): method __init__ (line 3528) | def __init__(self, *args, **kwargs): class GroupViTPreTrainedModel (line 3532) | class GroupViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3535) | def __init__(self, *args, **kwargs): class GroupViTTextModel (line 3539) | class GroupViTTextModel(metaclass=DummyObject): method __init__ (line 3542) | def __init__(self, *args, **kwargs): class GroupViTVisionModel (line 3546) | class GroupViTVisionModel(metaclass=DummyObject): method __init__ (line 3549) | def __init__(self, *args, **kwargs): class HubertForCTC (line 3556) | class HubertForCTC(metaclass=DummyObject): method __init__ (line 3559) | def __init__(self, *args, **kwargs): class HubertForSequenceClassification (line 3563) | class HubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3566) | def __init__(self, *args, **kwargs): class HubertModel (line 3570) | class HubertModel(metaclass=DummyObject): method __init__ (line 3573) | def __init__(self, *args, **kwargs): class HubertPreTrainedModel (line 3577) | class HubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3580) | def __init__(self, *args, **kwargs): class IBertForMaskedLM (line 3587) | class IBertForMaskedLM(metaclass=DummyObject): method __init__ (line 3590) | def __init__(self, *args, **kwargs): class IBertForMultipleChoice (line 3594) | class IBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 3597) | def __init__(self, *args, **kwargs): class IBertForQuestionAnswering (line 3601) | class IBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3604) | def __init__(self, *args, **kwargs): class IBertForSequenceClassification (line 3608) | class IBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 3611) | def __init__(self, *args, **kwargs): class IBertForTokenClassification (line 3615) | class IBertForTokenClassification(metaclass=DummyObject): method __init__ (line 3618) | def __init__(self, *args, **kwargs): class IBertModel (line 3622) | class IBertModel(metaclass=DummyObject): method __init__ (line 3625) | def __init__(self, *args, **kwargs): class IBertPreTrainedModel (line 3629) | class IBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 3632) | def __init__(self, *args, **kwargs): class ImageGPTForCausalImageModeling (line 3639) | class ImageGPTForCausalImageModeling(metaclass=DummyObject): method __init__ (line 3642) | def __init__(self, *args, **kwargs): class ImageGPTForImageClassification (line 3646) | class ImageGPTForImageClassification(metaclass=DummyObject): method __init__ (line 3649) | def __init__(self, *args, **kwargs): class ImageGPTModel (line 3653) | class ImageGPTModel(metaclass=DummyObject): method __init__ (line 3656) | def __init__(self, *args, **kwargs): class ImageGPTPreTrainedModel (line 3660) | class ImageGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 3663) | def __init__(self, *args, **kwargs): function load_tf_weights_in_imagegpt (line 3667) | def load_tf_weights_in_imagegpt(*args, **kwargs): class InformerForPrediction (line 3674) | class InformerForPrediction(metaclass=DummyObject): method __init__ (line 3677) | def __init__(self, *args, **kwargs): class InformerModel (line 3681) | class InformerModel(metaclass=DummyObject): method __init__ (line 3684) | def __init__(self, *args, **kwargs): class InformerPreTrainedModel (line 3688) | class InformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 3691) | def __init__(self, *args, **kwargs): class JukeboxModel (line 3698) | class JukeboxModel(metaclass=DummyObject): method __init__ (line 3701) | def __init__(self, *args, **kwargs): class JukeboxPreTrainedModel (line 3705) | class JukeboxPreTrainedModel(metaclass=DummyObject): method __init__ (line 3708) | def __init__(self, *args, **kwargs): class JukeboxPrior (line 3712) | class JukeboxPrior(metaclass=DummyObject): method __init__ (line 3715) | def __init__(self, *args, **kwargs): class JukeboxVQVAE (line 3719) | class JukeboxVQVAE(metaclass=DummyObject): method __init__ (line 3722) | def __init__(self, *args, **kwargs): class LayoutLMForMaskedLM (line 3729) | class LayoutLMForMaskedLM(metaclass=DummyObject): method __init__ (line 3732) | def __init__(self, *args, **kwargs): class LayoutLMForQuestionAnswering (line 3736) | class LayoutLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3739) | def __init__(self, *args, **kwargs): class LayoutLMForSequenceClassification (line 3743) | class LayoutLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 3746) | def __init__(self, *args, **kwargs): class LayoutLMForTokenClassification (line 3750) | class LayoutLMForTokenClassification(metaclass=DummyObject): method __init__ (line 3753) | def __init__(self, *args, **kwargs): class LayoutLMModel (line 3757) | class LayoutLMModel(metaclass=DummyObject): method __init__ (line 3760) | def __init__(self, *args, **kwargs): class LayoutLMPreTrainedModel (line 3764) | class LayoutLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 3767) | def __init__(self, *args, **kwargs): class LayoutLMv2ForQuestionAnswering (line 3774) | class LayoutLMv2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3777) | def __init__(self, *args, **kwargs): class LayoutLMv2ForSequenceClassification (line 3781) | class LayoutLMv2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 3784) | def __init__(self, *args, **kwargs): class LayoutLMv2ForTokenClassification (line 3788) | class LayoutLMv2ForTokenClassification(metaclass=DummyObject): method __init__ (line 3791) | def __init__(self, *args, **kwargs): class LayoutLMv2Model (line 3795) | class LayoutLMv2Model(metaclass=DummyObject): method __init__ (line 3798) | def __init__(self, *args, **kwargs): class LayoutLMv2PreTrainedModel (line 3802) | class LayoutLMv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 3805) | def __init__(self, *args, **kwargs): class LayoutLMv3ForQuestionAnswering (line 3812) | class LayoutLMv3ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3815) | def __init__(self, *args, **kwargs): class LayoutLMv3ForSequenceClassification (line 3819) | class LayoutLMv3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 3822) | def __init__(self, *args, **kwargs): class LayoutLMv3ForTokenClassification (line 3826) | class LayoutLMv3ForTokenClassification(metaclass=DummyObject): method __init__ (line 3829) | def __init__(self, *args, **kwargs): class LayoutLMv3Model (line 3833) | class LayoutLMv3Model(metaclass=DummyObject): method __init__ (line 3836) | def __init__(self, *args, **kwargs): class LayoutLMv3PreTrainedModel (line 3840) | class LayoutLMv3PreTrainedModel(metaclass=DummyObject): method __init__ (line 3843) | def __init__(self, *args, **kwargs): class LEDForConditionalGeneration (line 3850) | class LEDForConditionalGeneration(metaclass=DummyObject): method __init__ (line 3853) | def __init__(self, *args, **kwargs): class LEDForQuestionAnswering (line 3857) | class LEDForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3860) | def __init__(self, *args, **kwargs): class LEDForSequenceClassification (line 3864) | class LEDForSequenceClassification(metaclass=DummyObject): method __init__ (line 3867) | def __init__(self, *args, **kwargs): class LEDModel (line 3871) | class LEDModel(metaclass=DummyObject): method __init__ (line 3874) | def __init__(self, *args, **kwargs): class LEDPreTrainedModel (line 3878) | class LEDPreTrainedModel(metaclass=DummyObject): method __init__ (line 3881) | def __init__(self, *args, **kwargs): class LevitForImageClassification (line 3888) | class LevitForImageClassification(metaclass=DummyObject): method __init__ (line 3891) | def __init__(self, *args, **kwargs): class LevitForImageClassificationWithTeacher (line 3895) | class LevitForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 3898) | def __init__(self, *args, **kwargs): class LevitModel (line 3902) | class LevitModel(metaclass=DummyObject): method __init__ (line 3905) | def __init__(self, *args, **kwargs): class LevitPreTrainedModel (line 3909) | class LevitPreTrainedModel(metaclass=DummyObject): method __init__ (line 3912) | def __init__(self, *args, **kwargs): class LiltForQuestionAnswering (line 3919) | class LiltForQuestionAnswering(metaclass=DummyObject): method __init__ (line 3922) | def __init__(self, *args, **kwargs): class LiltForSequenceClassification (line 3926) | class LiltForSequenceClassification(metaclass=DummyObject): method __init__ (line 3929) | def __init__(self, *args, **kwargs): class LiltForTokenClassification (line 3933) | class LiltForTokenClassification(metaclass=DummyObject): method __init__ (line 3936) | def __init__(self, *args, **kwargs): class LiltModel (line 3940) | class LiltModel(metaclass=DummyObject): method __init__ (line 3943) | def __init__(self, *args, **kwargs): class LiltPreTrainedModel (line 3947) | class LiltPreTrainedModel(metaclass=DummyObject): method __init__ (line 3950) | def __init__(self, *args, **kwargs): class LlamaForCausalLM (line 3954) | class LlamaForCausalLM(metaclass=DummyObject): method __init__ (line 3957) | def __init__(self, *args, **kwargs): class LlamaForSequenceClassification (line 3961) | class LlamaForSequenceClassification(metaclass=DummyObject): method __init__ (line 3964) | def __init__(self, *args, **kwargs): class LlamaModel (line 3968) | class LlamaModel(metaclass=DummyObject): method __init__ (line 3971) | def __init__(self, *args, **kwargs): class LlamaPreTrainedModel (line 3975) | class LlamaPreTrainedModel(metaclass=DummyObject): method __init__ (line 3978) | def __init__(self, *args, **kwargs): class LongformerForMaskedLM (line 3985) | class LongformerForMaskedLM(metaclass=DummyObject): method __init__ (line 3988) | def __init__(self, *args, **kwargs): class LongformerForMultipleChoice (line 3992) | class LongformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 3995) | def __init__(self, *args, **kwargs): class LongformerForQuestionAnswering (line 3999) | class LongformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4002) | def __init__(self, *args, **kwargs): class LongformerForSequenceClassification (line 4006) | class LongformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 4009) | def __init__(self, *args, **kwargs): class LongformerForTokenClassification (line 4013) | class LongformerForTokenClassification(metaclass=DummyObject): method __init__ (line 4016) | def __init__(self, *args, **kwargs): class LongformerModel (line 4020) | class LongformerModel(metaclass=DummyObject): method __init__ (line 4023) | def __init__(self, *args, **kwargs): class LongformerPreTrainedModel (line 4027) | class LongformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4030) | def __init__(self, *args, **kwargs): class LongformerSelfAttention (line 4034) | class LongformerSelfAttention(metaclass=DummyObject): method __init__ (line 4037) | def __init__(self, *args, **kwargs): class LongT5EncoderModel (line 4044) | class LongT5EncoderModel(metaclass=DummyObject): method __init__ (line 4047) | def __init__(self, *args, **kwargs): class LongT5ForConditionalGeneration (line 4051) | class LongT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4054) | def __init__(self, *args, **kwargs): class LongT5Model (line 4058) | class LongT5Model(metaclass=DummyObject): method __init__ (line 4061) | def __init__(self, *args, **kwargs): class LongT5PreTrainedModel (line 4065) | class LongT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 4068) | def __init__(self, *args, **kwargs): class LukeForEntityClassification (line 4075) | class LukeForEntityClassification(metaclass=DummyObject): method __init__ (line 4078) | def __init__(self, *args, **kwargs): class LukeForEntityPairClassification (line 4082) | class LukeForEntityPairClassification(metaclass=DummyObject): method __init__ (line 4085) | def __init__(self, *args, **kwargs): class LukeForEntitySpanClassification (line 4089) | class LukeForEntitySpanClassification(metaclass=DummyObject): method __init__ (line 4092) | def __init__(self, *args, **kwargs): class LukeForMaskedLM (line 4096) | class LukeForMaskedLM(metaclass=DummyObject): method __init__ (line 4099) | def __init__(self, *args, **kwargs): class LukeForMultipleChoice (line 4103) | class LukeForMultipleChoice(metaclass=DummyObject): method __init__ (line 4106) | def __init__(self, *args, **kwargs): class LukeForQuestionAnswering (line 4110) | class LukeForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4113) | def __init__(self, *args, **kwargs): class LukeForSequenceClassification (line 4117) | class LukeForSequenceClassification(metaclass=DummyObject): method __init__ (line 4120) | def __init__(self, *args, **kwargs): class LukeForTokenClassification (line 4124) | class LukeForTokenClassification(metaclass=DummyObject): method __init__ (line 4127) | def __init__(self, *args, **kwargs): class LukeModel (line 4131) | class LukeModel(metaclass=DummyObject): method __init__ (line 4134) | def __init__(self, *args, **kwargs): class LukePreTrainedModel (line 4138) | class LukePreTrainedModel(metaclass=DummyObject): method __init__ (line 4141) | def __init__(self, *args, **kwargs): class LxmertEncoder (line 4145) | class LxmertEncoder(metaclass=DummyObject): method __init__ (line 4148) | def __init__(self, *args, **kwargs): class LxmertForPreTraining (line 4152) | class LxmertForPreTraining(metaclass=DummyObject): method __init__ (line 4155) | def __init__(self, *args, **kwargs): class LxmertForQuestionAnswering (line 4159) | class LxmertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4162) | def __init__(self, *args, **kwargs): class LxmertModel (line 4166) | class LxmertModel(metaclass=DummyObject): method __init__ (line 4169) | def __init__(self, *args, **kwargs): class LxmertPreTrainedModel (line 4173) | class LxmertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4176) | def __init__(self, *args, **kwargs): class LxmertVisualFeatureEncoder (line 4180) | class LxmertVisualFeatureEncoder(metaclass=DummyObject): method __init__ (line 4183) | def __init__(self, *args, **kwargs): class LxmertXLayer (line 4187) | class LxmertXLayer(metaclass=DummyObject): method __init__ (line 4190) | def __init__(self, *args, **kwargs): class M2M100ForConditionalGeneration (line 4197) | class M2M100ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4200) | def __init__(self, *args, **kwargs): class M2M100Model (line 4204) | class M2M100Model(metaclass=DummyObject): method __init__ (line 4207) | def __init__(self, *args, **kwargs): class M2M100PreTrainedModel (line 4211) | class M2M100PreTrainedModel(metaclass=DummyObject): method __init__ (line 4214) | def __init__(self, *args, **kwargs): class MarianForCausalLM (line 4218) | class MarianForCausalLM(metaclass=DummyObject): method __init__ (line 4221) | def __init__(self, *args, **kwargs): class MarianModel (line 4225) | class MarianModel(metaclass=DummyObject): method __init__ (line 4228) | def __init__(self, *args, **kwargs): class MarianMTModel (line 4232) | class MarianMTModel(metaclass=DummyObject): method __init__ (line 4235) | def __init__(self, *args, **kwargs): class MarkupLMForQuestionAnswering (line 4242) | class MarkupLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4245) | def __init__(self, *args, **kwargs): class MarkupLMForSequenceClassification (line 4249) | class MarkupLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 4252) | def __init__(self, *args, **kwargs): class MarkupLMForTokenClassification (line 4256) | class MarkupLMForTokenClassification(metaclass=DummyObject): method __init__ (line 4259) | def __init__(self, *args, **kwargs): class MarkupLMModel (line 4263) | class MarkupLMModel(metaclass=DummyObject): method __init__ (line 4266) | def __init__(self, *args, **kwargs): class MarkupLMPreTrainedModel (line 4270) | class MarkupLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 4273) | def __init__(self, *args, **kwargs): class Mask2FormerForUniversalSegmentation (line 4280) | class Mask2FormerForUniversalSegmentation(metaclass=DummyObject): method __init__ (line 4283) | def __init__(self, *args, **kwargs): class Mask2FormerModel (line 4287) | class Mask2FormerModel(metaclass=DummyObject): method __init__ (line 4290) | def __init__(self, *args, **kwargs): class Mask2FormerPreTrainedModel (line 4294) | class Mask2FormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4297) | def __init__(self, *args, **kwargs): class MaskFormerForInstanceSegmentation (line 4304) | class MaskFormerForInstanceSegmentation(metaclass=DummyObject): method __init__ (line 4307) | def __init__(self, *args, **kwargs): class MaskFormerModel (line 4311) | class MaskFormerModel(metaclass=DummyObject): method __init__ (line 4314) | def __init__(self, *args, **kwargs): class MaskFormerPreTrainedModel (line 4318) | class MaskFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 4321) | def __init__(self, *args, **kwargs): class MaskFormerSwinBackbone (line 4325) | class MaskFormerSwinBackbone(metaclass=DummyObject): method __init__ (line 4328) | def __init__(self, *args, **kwargs): class MBartForCausalLM (line 4332) | class MBartForCausalLM(metaclass=DummyObject): method __init__ (line 4335) | def __init__(self, *args, **kwargs): class MBartForConditionalGeneration (line 4339) | class MBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4342) | def __init__(self, *args, **kwargs): class MBartForQuestionAnswering (line 4346) | class MBartForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4349) | def __init__(self, *args, **kwargs): class MBartForSequenceClassification (line 4353) | class MBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 4356) | def __init__(self, *args, **kwargs): class MBartModel (line 4360) | class MBartModel(metaclass=DummyObject): method __init__ (line 4363) | def __init__(self, *args, **kwargs): class MBartPreTrainedModel (line 4367) | class MBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 4370) | def __init__(self, *args, **kwargs): class MCTCTForCTC (line 4377) | class MCTCTForCTC(metaclass=DummyObject): method __init__ (line 4380) | def __init__(self, *args, **kwargs): class MCTCTModel (line 4384) | class MCTCTModel(metaclass=DummyObject): method __init__ (line 4387) | def __init__(self, *args, **kwargs): class MCTCTPreTrainedModel (line 4391) | class MCTCTPreTrainedModel(metaclass=DummyObject): method __init__ (line 4394) | def __init__(self, *args, **kwargs): class MegaForCausalLM (line 4401) | class MegaForCausalLM(metaclass=DummyObject): method __init__ (line 4404) | def __init__(self, *args, **kwargs): class MegaForMaskedLM (line 4408) | class MegaForMaskedLM(metaclass=DummyObject): method __init__ (line 4411) | def __init__(self, *args, **kwargs): class MegaForMultipleChoice (line 4415) | class MegaForMultipleChoice(metaclass=DummyObject): method __init__ (line 4418) | def __init__(self, *args, **kwargs): class MegaForQuestionAnswering (line 4422) | class MegaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4425) | def __init__(self, *args, **kwargs): class MegaForSequenceClassification (line 4429) | class MegaForSequenceClassification(metaclass=DummyObject): method __init__ (line 4432) | def __init__(self, *args, **kwargs): class MegaForTokenClassification (line 4436) | class MegaForTokenClassification(metaclass=DummyObject): method __init__ (line 4439) | def __init__(self, *args, **kwargs): class MegaModel (line 4443) | class MegaModel(metaclass=DummyObject): method __init__ (line 4446) | def __init__(self, *args, **kwargs): class MegaPreTrainedModel (line 4450) | class MegaPreTrainedModel(metaclass=DummyObject): method __init__ (line 4453) | def __init__(self, *args, **kwargs): class MegatronBertForCausalLM (line 4460) | class MegatronBertForCausalLM(metaclass=DummyObject): method __init__ (line 4463) | def __init__(self, *args, **kwargs): class MegatronBertForMaskedLM (line 4467) | class MegatronBertForMaskedLM(metaclass=DummyObject): method __init__ (line 4470) | def __init__(self, *args, **kwargs): class MegatronBertForMultipleChoice (line 4474) | class MegatronBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 4477) | def __init__(self, *args, **kwargs): class MegatronBertForNextSentencePrediction (line 4481) | class MegatronBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 4484) | def __init__(self, *args, **kwargs): class MegatronBertForPreTraining (line 4488) | class MegatronBertForPreTraining(metaclass=DummyObject): method __init__ (line 4491) | def __init__(self, *args, **kwargs): class MegatronBertForQuestionAnswering (line 4495) | class MegatronBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4498) | def __init__(self, *args, **kwargs): class MegatronBertForSequenceClassification (line 4502) | class MegatronBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4505) | def __init__(self, *args, **kwargs): class MegatronBertForTokenClassification (line 4509) | class MegatronBertForTokenClassification(metaclass=DummyObject): method __init__ (line 4512) | def __init__(self, *args, **kwargs): class MegatronBertModel (line 4516) | class MegatronBertModel(metaclass=DummyObject): method __init__ (line 4519) | def __init__(self, *args, **kwargs): class MegatronBertPreTrainedModel (line 4523) | class MegatronBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4526) | def __init__(self, *args, **kwargs): class MgpstrForSceneTextRecognition (line 4533) | class MgpstrForSceneTextRecognition(metaclass=DummyObject): method __init__ (line 4536) | def __init__(self, *args, **kwargs): class MgpstrModel (line 4540) | class MgpstrModel(metaclass=DummyObject): method __init__ (line 4543) | def __init__(self, *args, **kwargs): class MgpstrPreTrainedModel (line 4547) | class MgpstrPreTrainedModel(metaclass=DummyObject): method __init__ (line 4550) | def __init__(self, *args, **kwargs): class MMBTForClassification (line 4554) | class MMBTForClassification(metaclass=DummyObject): method __init__ (line 4557) | def __init__(self, *args, **kwargs): class MMBTModel (line 4561) | class MMBTModel(metaclass=DummyObject): method __init__ (line 4564) | def __init__(self, *args, **kwargs): class ModalEmbeddings (line 4568) | class ModalEmbeddings(metaclass=DummyObject): method __init__ (line 4571) | def __init__(self, *args, **kwargs): class MobileBertForMaskedLM (line 4578) | class MobileBertForMaskedLM(metaclass=DummyObject): method __init__ (line 4581) | def __init__(self, *args, **kwargs): class MobileBertForMultipleChoice (line 4585) | class MobileBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 4588) | def __init__(self, *args, **kwargs): class MobileBertForNextSentencePrediction (line 4592) | class MobileBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 4595) | def __init__(self, *args, **kwargs): class MobileBertForPreTraining (line 4599) | class MobileBertForPreTraining(metaclass=DummyObject): method __init__ (line 4602) | def __init__(self, *args, **kwargs): class MobileBertForQuestionAnswering (line 4606) | class MobileBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4609) | def __init__(self, *args, **kwargs): class MobileBertForSequenceClassification (line 4613) | class MobileBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 4616) | def __init__(self, *args, **kwargs): class MobileBertForTokenClassification (line 4620) | class MobileBertForTokenClassification(metaclass=DummyObject): method __init__ (line 4623) | def __init__(self, *args, **kwargs): class MobileBertLayer (line 4627) | class MobileBertLayer(metaclass=DummyObject): method __init__ (line 4630) | def __init__(self, *args, **kwargs): class MobileBertModel (line 4634) | class MobileBertModel(metaclass=DummyObject): method __init__ (line 4637) | def __init__(self, *args, **kwargs): class MobileBertPreTrainedModel (line 4641) | class MobileBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 4644) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilebert (line 4648) | def load_tf_weights_in_mobilebert(*args, **kwargs): class MobileNetV1ForImageClassification (line 4655) | class MobileNetV1ForImageClassification(metaclass=DummyObject): method __init__ (line 4658) | def __init__(self, *args, **kwargs): class MobileNetV1Model (line 4662) | class MobileNetV1Model(metaclass=DummyObject): method __init__ (line 4665) | def __init__(self, *args, **kwargs): class MobileNetV1PreTrainedModel (line 4669) | class MobileNetV1PreTrainedModel(metaclass=DummyObject): method __init__ (line 4672) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilenet_v1 (line 4676) | def load_tf_weights_in_mobilenet_v1(*args, **kwargs): class MobileNetV2ForImageClassification (line 4683) | class MobileNetV2ForImageClassification(metaclass=DummyObject): method __init__ (line 4686) | def __init__(self, *args, **kwargs): class MobileNetV2ForSemanticSegmentation (line 4690) | class MobileNetV2ForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 4693) | def __init__(self, *args, **kwargs): class MobileNetV2Model (line 4697) | class MobileNetV2Model(metaclass=DummyObject): method __init__ (line 4700) | def __init__(self, *args, **kwargs): class MobileNetV2PreTrainedModel (line 4704) | class MobileNetV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4707) | def __init__(self, *args, **kwargs): function load_tf_weights_in_mobilenet_v2 (line 4711) | def load_tf_weights_in_mobilenet_v2(*args, **kwargs): class MobileViTForImageClassification (line 4718) | class MobileViTForImageClassification(metaclass=DummyObject): method __init__ (line 4721) | def __init__(self, *args, **kwargs): class MobileViTForSemanticSegmentation (line 4725) | class MobileViTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 4728) | def __init__(self, *args, **kwargs): class MobileViTModel (line 4732) | class MobileViTModel(metaclass=DummyObject): method __init__ (line 4735) | def __init__(self, *args, **kwargs): class MobileViTPreTrainedModel (line 4739) | class MobileViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 4742) | def __init__(self, *args, **kwargs): class MobileViTV2ForImageClassification (line 4749) | class MobileViTV2ForImageClassification(metaclass=DummyObject): method __init__ (line 4752) | def __init__(self, *args, **kwargs): class MobileViTV2ForSemanticSegmentation (line 4756) | class MobileViTV2ForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 4759) | def __init__(self, *args, **kwargs): class MobileViTV2Model (line 4763) | class MobileViTV2Model(metaclass=DummyObject): method __init__ (line 4766) | def __init__(self, *args, **kwargs): class MobileViTV2PreTrainedModel (line 4770) | class MobileViTV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 4773) | def __init__(self, *args, **kwargs): class MPNetForMaskedLM (line 4780) | class MPNetForMaskedLM(metaclass=DummyObject): method __init__ (line 4783) | def __init__(self, *args, **kwargs): class MPNetForMultipleChoice (line 4787) | class MPNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 4790) | def __init__(self, *args, **kwargs): class MPNetForQuestionAnswering (line 4794) | class MPNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4797) | def __init__(self, *args, **kwargs): class MPNetForSequenceClassification (line 4801) | class MPNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 4804) | def __init__(self, *args, **kwargs): class MPNetForTokenClassification (line 4808) | class MPNetForTokenClassification(metaclass=DummyObject): method __init__ (line 4811) | def __init__(self, *args, **kwargs): class MPNetLayer (line 4815) | class MPNetLayer(metaclass=DummyObject): method __init__ (line 4818) | def __init__(self, *args, **kwargs): class MPNetModel (line 4822) | class MPNetModel(metaclass=DummyObject): method __init__ (line 4825) | def __init__(self, *args, **kwargs): class MPNetPreTrainedModel (line 4829) | class MPNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 4832) | def __init__(self, *args, **kwargs): class MT5EncoderModel (line 4836) | class MT5EncoderModel(metaclass=DummyObject): method __init__ (line 4839) | def __init__(self, *args, **kwargs): class MT5ForConditionalGeneration (line 4843) | class MT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4846) | def __init__(self, *args, **kwargs): class MT5Model (line 4850) | class MT5Model(metaclass=DummyObject): method __init__ (line 4853) | def __init__(self, *args, **kwargs): class MT5PreTrainedModel (line 4857) | class MT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 4860) | def __init__(self, *args, **kwargs): class MvpForCausalLM (line 4867) | class MvpForCausalLM(metaclass=DummyObject): method __init__ (line 4870) | def __init__(self, *args, **kwargs): class MvpForConditionalGeneration (line 4874) | class MvpForConditionalGeneration(metaclass=DummyObject): method __init__ (line 4877) | def __init__(self, *args, **kwargs): class MvpForQuestionAnswering (line 4881) | class MvpForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4884) | def __init__(self, *args, **kwargs): class MvpForSequenceClassification (line 4888) | class MvpForSequenceClassification(metaclass=DummyObject): method __init__ (line 4891) | def __init__(self, *args, **kwargs): class MvpModel (line 4895) | class MvpModel(metaclass=DummyObject): method __init__ (line 4898) | def __init__(self, *args, **kwargs): class MvpPreTrainedModel (line 4902) | class MvpPreTrainedModel(metaclass=DummyObject): method __init__ (line 4905) | def __init__(self, *args, **kwargs): class NatBackbone (line 4912) | class NatBackbone(metaclass=DummyObject): method __init__ (line 4915) | def __init__(self, *args, **kwargs): class NatForImageClassification (line 4919) | class NatForImageClassification(metaclass=DummyObject): method __init__ (line 4922) | def __init__(self, *args, **kwargs): class NatModel (line 4926) | class NatModel(metaclass=DummyObject): method __init__ (line 4929) | def __init__(self, *args, **kwargs): class NatPreTrainedModel (line 4933) | class NatPreTrainedModel(metaclass=DummyObject): method __init__ (line 4936) | def __init__(self, *args, **kwargs): class NezhaForMaskedLM (line 4943) | class NezhaForMaskedLM(metaclass=DummyObject): method __init__ (line 4946) | def __init__(self, *args, **kwargs): class NezhaForMultipleChoice (line 4950) | class NezhaForMultipleChoice(metaclass=DummyObject): method __init__ (line 4953) | def __init__(self, *args, **kwargs): class NezhaForNextSentencePrediction (line 4957) | class NezhaForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 4960) | def __init__(self, *args, **kwargs): class NezhaForPreTraining (line 4964) | class NezhaForPreTraining(metaclass=DummyObject): method __init__ (line 4967) | def __init__(self, *args, **kwargs): class NezhaForQuestionAnswering (line 4971) | class NezhaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 4974) | def __init__(self, *args, **kwargs): class NezhaForSequenceClassification (line 4978) | class NezhaForSequenceClassification(metaclass=DummyObject): method __init__ (line 4981) | def __init__(self, *args, **kwargs): class NezhaForTokenClassification (line 4985) | class NezhaForTokenClassification(metaclass=DummyObject): method __init__ (line 4988) | def __init__(self, *args, **kwargs): class NezhaModel (line 4992) | class NezhaModel(metaclass=DummyObject): method __init__ (line 4995) | def __init__(self, *args, **kwargs): class NezhaPreTrainedModel (line 4999) | class NezhaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5002) | def __init__(self, *args, **kwargs): class NllbMoeForConditionalGeneration (line 5009) | class NllbMoeForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5012) | def __init__(self, *args, **kwargs): class NllbMoeModel (line 5016) | class NllbMoeModel(metaclass=DummyObject): method __init__ (line 5019) | def __init__(self, *args, **kwargs): class NllbMoePreTrainedModel (line 5023) | class NllbMoePreTrainedModel(metaclass=DummyObject): method __init__ (line 5026) | def __init__(self, *args, **kwargs): class NllbMoeSparseMLP (line 5030) | class NllbMoeSparseMLP(metaclass=DummyObject): method __init__ (line 5033) | def __init__(self, *args, **kwargs): class NllbMoeTop2Router (line 5037) | class NllbMoeTop2Router(metaclass=DummyObject): method __init__ (line 5040) | def __init__(self, *args, **kwargs): class NystromformerForMaskedLM (line 5047) | class NystromformerForMaskedLM(metaclass=DummyObject): method __init__ (line 5050) | def __init__(self, *args, **kwargs): class NystromformerForMultipleChoice (line 5054) | class NystromformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 5057) | def __init__(self, *args, **kwargs): class NystromformerForQuestionAnswering (line 5061) | class NystromformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5064) | def __init__(self, *args, **kwargs): class NystromformerForSequenceClassification (line 5068) | class NystromformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 5071) | def __init__(self, *args, **kwargs): class NystromformerForTokenClassification (line 5075) | class NystromformerForTokenClassification(metaclass=DummyObject): method __init__ (line 5078) | def __init__(self, *args, **kwargs): class NystromformerLayer (line 5082) | class NystromformerLayer(metaclass=DummyObject): method __init__ (line 5085) | def __init__(self, *args, **kwargs): class NystromformerModel (line 5089) | class NystromformerModel(metaclass=DummyObject): method __init__ (line 5092) | def __init__(self, *args, **kwargs): class NystromformerPreTrainedModel (line 5096) | class NystromformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5099) | def __init__(self, *args, **kwargs): class OneFormerForUniversalSegmentation (line 5106) | class OneFormerForUniversalSegmentation(metaclass=DummyObject): method __init__ (line 5109) | def __init__(self, *args, **kwargs): class OneFormerModel (line 5113) | class OneFormerModel(metaclass=DummyObject): method __init__ (line 5116) | def __init__(self, *args, **kwargs): class OneFormerPreTrainedModel (line 5120) | class OneFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5123) | def __init__(self, *args, **kwargs): class OpenLlamaForCausalLM (line 5127) | class OpenLlamaForCausalLM(metaclass=DummyObject): method __init__ (line 5130) | def __init__(self, *args, **kwargs): class OpenLlamaForSequenceClassification (line 5134) | class OpenLlamaForSequenceClassification(metaclass=DummyObject): method __init__ (line 5137) | def __init__(self, *args, **kwargs): class OpenLlamaModel (line 5141) | class OpenLlamaModel(metaclass=DummyObject): method __init__ (line 5144) | def __init__(self, *args, **kwargs): class OpenLlamaPreTrainedModel (line 5148) | class OpenLlamaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5151) | def __init__(self, *args, **kwargs): class OpenAIGPTDoubleHeadsModel (line 5158) | class OpenAIGPTDoubleHeadsModel(metaclass=DummyObject): method __init__ (line 5161) | def __init__(self, *args, **kwargs): class OpenAIGPTForSequenceClassification (line 5165) | class OpenAIGPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 5168) | def __init__(self, *args, **kwargs): class OpenAIGPTLMHeadModel (line 5172) | class OpenAIGPTLMHeadModel(metaclass=DummyObject): method __init__ (line 5175) | def __init__(self, *args, **kwargs): class OpenAIGPTModel (line 5179) | class OpenAIGPTModel(metaclass=DummyObject): method __init__ (line 5182) | def __init__(self, *args, **kwargs): class OpenAIGPTPreTrainedModel (line 5186) | class OpenAIGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 5189) | def __init__(self, *args, **kwargs): function load_tf_weights_in_openai_gpt (line 5193) | def load_tf_weights_in_openai_gpt(*args, **kwargs): class OPTForCausalLM (line 5200) | class OPTForCausalLM(metaclass=DummyObject): method __init__ (line 5203) | def __init__(self, *args, **kwargs): class OPTForQuestionAnswering (line 5207) | class OPTForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5210) | def __init__(self, *args, **kwargs): class OPTForSequenceClassification (line 5214) | class OPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 5217) | def __init__(self, *args, **kwargs): class OPTModel (line 5221) | class OPTModel(metaclass=DummyObject): method __init__ (line 5224) | def __init__(self, *args, **kwargs): class OPTPreTrainedModel (line 5228) | class OPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 5231) | def __init__(self, *args, **kwargs): class OwlViTForObjectDetection (line 5238) | class OwlViTForObjectDetection(metaclass=DummyObject): method __init__ (line 5241) | def __init__(self, *args, **kwargs): class OwlViTModel (line 5245) | class OwlViTModel(metaclass=DummyObject): method __init__ (line 5248) | def __init__(self, *args, **kwargs): class OwlViTPreTrainedModel (line 5252) | class OwlViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 5255) | def __init__(self, *args, **kwargs): class OwlViTTextModel (line 5259) | class OwlViTTextModel(metaclass=DummyObject): method __init__ (line 5262) | def __init__(self, *args, **kwargs): class OwlViTVisionModel (line 5266) | class OwlViTVisionModel(metaclass=DummyObject): method __init__ (line 5269) | def __init__(self, *args, **kwargs): class PegasusForCausalLM (line 5273) | class PegasusForCausalLM(metaclass=DummyObject): method __init__ (line 5276) | def __init__(self, *args, **kwargs): class PegasusForConditionalGeneration (line 5280) | class PegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5283) | def __init__(self, *args, **kwargs): class PegasusModel (line 5287) | class PegasusModel(metaclass=DummyObject): method __init__ (line 5290) | def __init__(self, *args, **kwargs): class PegasusPreTrainedModel (line 5294) | class PegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 5297) | def __init__(self, *args, **kwargs): class PegasusXForConditionalGeneration (line 5304) | class PegasusXForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5307) | def __init__(self, *args, **kwargs): class PegasusXModel (line 5311) | class PegasusXModel(metaclass=DummyObject): method __init__ (line 5314) | def __init__(self, *args, **kwargs): class PegasusXPreTrainedModel (line 5318) | class PegasusXPreTrainedModel(metaclass=DummyObject): method __init__ (line 5321) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationConvProcessing (line 5328) | class PerceiverForImageClassificationConvProcessing(metaclass=DummyObject): method __init__ (line 5331) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationFourier (line 5335) | class PerceiverForImageClassificationFourier(metaclass=DummyObject): method __init__ (line 5338) | def __init__(self, *args, **kwargs): class PerceiverForImageClassificationLearned (line 5342) | class PerceiverForImageClassificationLearned(metaclass=DummyObject): method __init__ (line 5345) | def __init__(self, *args, **kwargs): class PerceiverForMaskedLM (line 5349) | class PerceiverForMaskedLM(metaclass=DummyObject): method __init__ (line 5352) | def __init__(self, *args, **kwargs): class PerceiverForMultimodalAutoencoding (line 5356) | class PerceiverForMultimodalAutoencoding(metaclass=DummyObject): method __init__ (line 5359) | def __init__(self, *args, **kwargs): class PerceiverForOpticalFlow (line 5363) | class PerceiverForOpticalFlow(metaclass=DummyObject): method __init__ (line 5366) | def __init__(self, *args, **kwargs): class PerceiverForSequenceClassification (line 5370) | class PerceiverForSequenceClassification(metaclass=DummyObject): method __init__ (line 5373) | def __init__(self, *args, **kwargs): class PerceiverLayer (line 5377) | class PerceiverLayer(metaclass=DummyObject): method __init__ (line 5380) | def __init__(self, *args, **kwargs): class PerceiverModel (line 5384) | class PerceiverModel(metaclass=DummyObject): method __init__ (line 5387) | def __init__(self, *args, **kwargs): class PerceiverPreTrainedModel (line 5391) | class PerceiverPreTrainedModel(metaclass=DummyObject): method __init__ (line 5394) | def __init__(self, *args, **kwargs): class Pix2StructForConditionalGeneration (line 5401) | class Pix2StructForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5404) | def __init__(self, *args, **kwargs): class Pix2StructPreTrainedModel (line 5408) | class Pix2StructPreTrainedModel(metaclass=DummyObject): method __init__ (line 5411) | def __init__(self, *args, **kwargs): class Pix2StructTextModel (line 5415) | class Pix2StructTextModel(metaclass=DummyObject): method __init__ (line 5418) | def __init__(self, *args, **kwargs): class Pix2StructVisionModel (line 5422) | class Pix2StructVisionModel(metaclass=DummyObject): method __init__ (line 5425) | def __init__(self, *args, **kwargs): class PLBartForCausalLM (line 5432) | class PLBartForCausalLM(metaclass=DummyObject): method __init__ (line 5435) | def __init__(self, *args, **kwargs): class PLBartForConditionalGeneration (line 5439) | class PLBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5442) | def __init__(self, *args, **kwargs): class PLBartForSequenceClassification (line 5446) | class PLBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 5449) | def __init__(self, *args, **kwargs): class PLBartModel (line 5453) | class PLBartModel(metaclass=DummyObject): method __init__ (line 5456) | def __init__(self, *args, **kwargs): class PLBartPreTrainedModel (line 5460) | class PLBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 5463) | def __init__(self, *args, **kwargs): class PoolFormerForImageClassification (line 5470) | class PoolFormerForImageClassification(metaclass=DummyObject): method __init__ (line 5473) | def __init__(self, *args, **kwargs): class PoolFormerModel (line 5477) | class PoolFormerModel(metaclass=DummyObject): method __init__ (line 5480) | def __init__(self, *args, **kwargs): class PoolFormerPreTrainedModel (line 5484) | class PoolFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5487) | def __init__(self, *args, **kwargs): class ProphetNetDecoder (line 5494) | class ProphetNetDecoder(metaclass=DummyObject): method __init__ (line 5497) | def __init__(self, *args, **kwargs): class ProphetNetEncoder (line 5501) | class ProphetNetEncoder(metaclass=DummyObject): method __init__ (line 5504) | def __init__(self, *args, **kwargs): class ProphetNetForCausalLM (line 5508) | class ProphetNetForCausalLM(metaclass=DummyObject): method __init__ (line 5511) | def __init__(self, *args, **kwargs): class ProphetNetForConditionalGeneration (line 5515) | class ProphetNetForConditionalGeneration(metaclass=DummyObject): method __init__ (line 5518) | def __init__(self, *args, **kwargs): class ProphetNetModel (line 5522) | class ProphetNetModel(metaclass=DummyObject): method __init__ (line 5525) | def __init__(self, *args, **kwargs): class ProphetNetPreTrainedModel (line 5529) | class ProphetNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 5532) | def __init__(self, *args, **kwargs): class QDQBertForMaskedLM (line 5539) | class QDQBertForMaskedLM(metaclass=DummyObject): method __init__ (line 5542) | def __init__(self, *args, **kwargs): class QDQBertForMultipleChoice (line 5546) | class QDQBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 5549) | def __init__(self, *args, **kwargs): class QDQBertForNextSentencePrediction (line 5553) | class QDQBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 5556) | def __init__(self, *args, **kwargs): class QDQBertForQuestionAnswering (line 5560) | class QDQBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5563) | def __init__(self, *args, **kwargs): class QDQBertForSequenceClassification (line 5567) | class QDQBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 5570) | def __init__(self, *args, **kwargs): class QDQBertForTokenClassification (line 5574) | class QDQBertForTokenClassification(metaclass=DummyObject): method __init__ (line 5577) | def __init__(self, *args, **kwargs): class QDQBertLayer (line 5581) | class QDQBertLayer(metaclass=DummyObject): method __init__ (line 5584) | def __init__(self, *args, **kwargs): class QDQBertLMHeadModel (line 5588) | class QDQBertLMHeadModel(metaclass=DummyObject): method __init__ (line 5591) | def __init__(self, *args, **kwargs): class QDQBertModel (line 5595) | class QDQBertModel(metaclass=DummyObject): method __init__ (line 5598) | def __init__(self, *args, **kwargs): class QDQBertPreTrainedModel (line 5602) | class QDQBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5605) | def __init__(self, *args, **kwargs): function load_tf_weights_in_qdqbert (line 5609) | def load_tf_weights_in_qdqbert(*args, **kwargs): class RagModel (line 5613) | class RagModel(metaclass=DummyObject): method __init__ (line 5616) | def __init__(self, *args, **kwargs): class RagPreTrainedModel (line 5620) | class RagPreTrainedModel(metaclass=DummyObject): method __init__ (line 5623) | def __init__(self, *args, **kwargs): class RagSequenceForGeneration (line 5627) | class RagSequenceForGeneration(metaclass=DummyObject): method __init__ (line 5630) | def __init__(self, *args, **kwargs): class RagTokenForGeneration (line 5634) | class RagTokenForGeneration(metaclass=DummyObject): method __init__ (line 5637) | def __init__(self, *args, **kwargs): class RealmEmbedder (line 5644) | class RealmEmbedder(metaclass=DummyObject): method __init__ (line 5647) | def __init__(self, *args, **kwargs): class RealmForOpenQA (line 5651) | class RealmForOpenQA(metaclass=DummyObject): method __init__ (line 5654) | def __init__(self, *args, **kwargs): class RealmKnowledgeAugEncoder (line 5658) | class RealmKnowledgeAugEncoder(metaclass=DummyObject): method __init__ (line 5661) | def __init__(self, *args, **kwargs): class RealmPreTrainedModel (line 5665) | class RealmPreTrainedModel(metaclass=DummyObject): method __init__ (line 5668) | def __init__(self, *args, **kwargs): class RealmReader (line 5672) | class RealmReader(metaclass=DummyObject): method __init__ (line 5675) | def __init__(self, *args, **kwargs): class RealmRetriever (line 5679) | class RealmRetriever(metaclass=DummyObject): method __init__ (line 5682) | def __init__(self, *args, **kwargs): class RealmScorer (line 5686) | class RealmScorer(metaclass=DummyObject): method __init__ (line 5689) | def __init__(self, *args, **kwargs): function load_tf_weights_in_realm (line 5693) | def load_tf_weights_in_realm(*args, **kwargs): class ReformerAttention (line 5700) | class ReformerAttention(metaclass=DummyObject): method __init__ (line 5703) | def __init__(self, *args, **kwargs): class ReformerForMaskedLM (line 5707) | class ReformerForMaskedLM(metaclass=DummyObject): method __init__ (line 5710) | def __init__(self, *args, **kwargs): class ReformerForQuestionAnswering (line 5714) | class ReformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5717) | def __init__(self, *args, **kwargs): class ReformerForSequenceClassification (line 5721) | class ReformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 5724) | def __init__(self, *args, **kwargs): class ReformerLayer (line 5728) | class ReformerLayer(metaclass=DummyObject): method __init__ (line 5731) | def __init__(self, *args, **kwargs): class ReformerModel (line 5735) | class ReformerModel(metaclass=DummyObject): method __init__ (line 5738) | def __init__(self, *args, **kwargs): class ReformerModelWithLMHead (line 5742) | class ReformerModelWithLMHead(metaclass=DummyObject): method __init__ (line 5745) | def __init__(self, *args, **kwargs): class ReformerPreTrainedModel (line 5749) | class ReformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 5752) | def __init__(self, *args, **kwargs): class RegNetForImageClassification (line 5759) | class RegNetForImageClassification(metaclass=DummyObject): method __init__ (line 5762) | def __init__(self, *args, **kwargs): class RegNetModel (line 5766) | class RegNetModel(metaclass=DummyObject): method __init__ (line 5769) | def __init__(self, *args, **kwargs): class RegNetPreTrainedModel (line 5773) | class RegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 5776) | def __init__(self, *args, **kwargs): class RemBertForCausalLM (line 5783) | class RemBertForCausalLM(metaclass=DummyObject): method __init__ (line 5786) | def __init__(self, *args, **kwargs): class RemBertForMaskedLM (line 5790) | class RemBertForMaskedLM(metaclass=DummyObject): method __init__ (line 5793) | def __init__(self, *args, **kwargs): class RemBertForMultipleChoice (line 5797) | class RemBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 5800) | def __init__(self, *args, **kwargs): class RemBertForQuestionAnswering (line 5804) | class RemBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5807) | def __init__(self, *args, **kwargs): class RemBertForSequenceClassification (line 5811) | class RemBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 5814) | def __init__(self, *args, **kwargs): class RemBertForTokenClassification (line 5818) | class RemBertForTokenClassification(metaclass=DummyObject): method __init__ (line 5821) | def __init__(self, *args, **kwargs): class RemBertLayer (line 5825) | class RemBertLayer(metaclass=DummyObject): method __init__ (line 5828) | def __init__(self, *args, **kwargs): class RemBertModel (line 5832) | class RemBertModel(metaclass=DummyObject): method __init__ (line 5835) | def __init__(self, *args, **kwargs): class RemBertPreTrainedModel (line 5839) | class RemBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5842) | def __init__(self, *args, **kwargs): function load_tf_weights_in_rembert (line 5846) | def load_tf_weights_in_rembert(*args, **kwargs): class ResNetBackbone (line 5853) | class ResNetBackbone(metaclass=DummyObject): method __init__ (line 5856) | def __init__(self, *args, **kwargs): class ResNetForImageClassification (line 5860) | class ResNetForImageClassification(metaclass=DummyObject): method __init__ (line 5863) | def __init__(self, *args, **kwargs): class ResNetModel (line 5867) | class ResNetModel(metaclass=DummyObject): method __init__ (line 5870) | def __init__(self, *args, **kwargs): class ResNetPreTrainedModel (line 5874) | class ResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 5877) | def __init__(self, *args, **kwargs): class RetriBertModel (line 5884) | class RetriBertModel(metaclass=DummyObject): method __init__ (line 5887) | def __init__(self, *args, **kwargs): class RetriBertPreTrainedModel (line 5891) | class RetriBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 5894) | def __init__(self, *args, **kwargs): class RobertaForCausalLM (line 5901) | class RobertaForCausalLM(metaclass=DummyObject): method __init__ (line 5904) | def __init__(self, *args, **kwargs): class RobertaForMaskedLM (line 5908) | class RobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 5911) | def __init__(self, *args, **kwargs): class RobertaForMultipleChoice (line 5915) | class RobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 5918) | def __init__(self, *args, **kwargs): class RobertaForQuestionAnswering (line 5922) | class RobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5925) | def __init__(self, *args, **kwargs): class RobertaForSequenceClassification (line 5929) | class RobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 5932) | def __init__(self, *args, **kwargs): class RobertaForTokenClassification (line 5936) | class RobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 5939) | def __init__(self, *args, **kwargs): class RobertaModel (line 5943) | class RobertaModel(metaclass=DummyObject): method __init__ (line 5946) | def __init__(self, *args, **kwargs): class RobertaPreTrainedModel (line 5950) | class RobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 5953) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForCausalLM (line 5960) | class RobertaPreLayerNormForCausalLM(metaclass=DummyObject): method __init__ (line 5963) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForMaskedLM (line 5967) | class RobertaPreLayerNormForMaskedLM(metaclass=DummyObject): method __init__ (line 5970) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForMultipleChoice (line 5974) | class RobertaPreLayerNormForMultipleChoice(metaclass=DummyObject): method __init__ (line 5977) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForQuestionAnswering (line 5981) | class RobertaPreLayerNormForQuestionAnswering(metaclass=DummyObject): method __init__ (line 5984) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForSequenceClassification (line 5988) | class RobertaPreLayerNormForSequenceClassification(metaclass=DummyObject): method __init__ (line 5991) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormForTokenClassification (line 5995) | class RobertaPreLayerNormForTokenClassification(metaclass=DummyObject): method __init__ (line 5998) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormModel (line 6002) | class RobertaPreLayerNormModel(metaclass=DummyObject): method __init__ (line 6005) | def __init__(self, *args, **kwargs): class RobertaPreLayerNormPreTrainedModel (line 6009) | class RobertaPreLayerNormPreTrainedModel(metaclass=DummyObject): method __init__ (line 6012) | def __init__(self, *args, **kwargs): class RoCBertForCausalLM (line 6019) | class RoCBertForCausalLM(metaclass=DummyObject): method __init__ (line 6022) | def __init__(self, *args, **kwargs): class RoCBertForMaskedLM (line 6026) | class RoCBertForMaskedLM(metaclass=DummyObject): method __init__ (line 6029) | def __init__(self, *args, **kwargs): class RoCBertForMultipleChoice (line 6033) | class RoCBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 6036) | def __init__(self, *args, **kwargs): class RoCBertForPreTraining (line 6040) | class RoCBertForPreTraining(metaclass=DummyObject): method __init__ (line 6043) | def __init__(self, *args, **kwargs): class RoCBertForQuestionAnswering (line 6047) | class RoCBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6050) | def __init__(self, *args, **kwargs): class RoCBertForSequenceClassification (line 6054) | class RoCBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 6057) | def __init__(self, *args, **kwargs): class RoCBertForTokenClassification (line 6061) | class RoCBertForTokenClassification(metaclass=DummyObject): method __init__ (line 6064) | def __init__(self, *args, **kwargs): class RoCBertLayer (line 6068) | class RoCBertLayer(metaclass=DummyObject): method __init__ (line 6071) | def __init__(self, *args, **kwargs): class RoCBertModel (line 6075) | class RoCBertModel(metaclass=DummyObject): method __init__ (line 6078) | def __init__(self, *args, **kwargs): class RoCBertPreTrainedModel (line 6082) | class RoCBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 6085) | def __init__(self, *args, **kwargs): function load_tf_weights_in_roc_bert (line 6089) | def load_tf_weights_in_roc_bert(*args, **kwargs): class RoFormerForCausalLM (line 6096) | class RoFormerForCausalLM(metaclass=DummyObject): method __init__ (line 6099) | def __init__(self, *args, **kwargs): class RoFormerForMaskedLM (line 6103) | class RoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 6106) | def __init__(self, *args, **kwargs): class RoFormerForMultipleChoice (line 6110) | class RoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 6113) | def __init__(self, *args, **kwargs): class RoFormerForQuestionAnswering (line 6117) | class RoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6120) | def __init__(self, *args, **kwargs): class RoFormerForSequenceClassification (line 6124) | class RoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 6127) | def __init__(self, *args, **kwargs): class RoFormerForTokenClassification (line 6131) | class RoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 6134) | def __init__(self, *args, **kwargs): class RoFormerLayer (line 6138) | class RoFormerLayer(metaclass=DummyObject): method __init__ (line 6141) | def __init__(self, *args, **kwargs): class RoFormerModel (line 6145) | class RoFormerModel(metaclass=DummyObject): method __init__ (line 6148) | def __init__(self, *args, **kwargs): class RoFormerPreTrainedModel (line 6152) | class RoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6155) | def __init__(self, *args, **kwargs): function load_tf_weights_in_roformer (line 6159) | def load_tf_weights_in_roformer(*args, **kwargs): class RwkvForCausalLM (line 6166) | class RwkvForCausalLM(metaclass=DummyObject): method __init__ (line 6169) | def __init__(self, *args, **kwargs): class RwkvModel (line 6173) | class RwkvModel(metaclass=DummyObject): method __init__ (line 6176) | def __init__(self, *args, **kwargs): class RwkvPreTrainedModel (line 6180) | class RwkvPreTrainedModel(metaclass=DummyObject): method __init__ (line 6183) | def __init__(self, *args, **kwargs): class SamModel (line 6190) | class SamModel(metaclass=DummyObject): method __init__ (line 6193) | def __init__(self, *args, **kwargs): class SamPreTrainedModel (line 6197) | class SamPreTrainedModel(metaclass=DummyObject): method __init__ (line 6200) | def __init__(self, *args, **kwargs): class SegformerDecodeHead (line 6207) | class SegformerDecodeHead(metaclass=DummyObject): method __init__ (line 6210) | def __init__(self, *args, **kwargs): class SegformerForImageClassification (line 6214) | class SegformerForImageClassification(metaclass=DummyObject): method __init__ (line 6217) | def __init__(self, *args, **kwargs): class SegformerForSemanticSegmentation (line 6221) | class SegformerForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 6224) | def __init__(self, *args, **kwargs): class SegformerLayer (line 6228) | class SegformerLayer(metaclass=DummyObject): method __init__ (line 6231) | def __init__(self, *args, **kwargs): class SegformerModel (line 6235) | class SegformerModel(metaclass=DummyObject): method __init__ (line 6238) | def __init__(self, *args, **kwargs): class SegformerPreTrainedModel (line 6242) | class SegformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6245) | def __init__(self, *args, **kwargs): class SEWForCTC (line 6252) | class SEWForCTC(metaclass=DummyObject): method __init__ (line 6255) | def __init__(self, *args, **kwargs): class SEWForSequenceClassification (line 6259) | class SEWForSequenceClassification(metaclass=DummyObject): method __init__ (line 6262) | def __init__(self, *args, **kwargs): class SEWModel (line 6266) | class SEWModel(metaclass=DummyObject): method __init__ (line 6269) | def __init__(self, *args, **kwargs): class SEWPreTrainedModel (line 6273) | class SEWPreTrainedModel(metaclass=DummyObject): method __init__ (line 6276) | def __init__(self, *args, **kwargs): class SEWDForCTC (line 6283) | class SEWDForCTC(metaclass=DummyObject): method __init__ (line 6286) | def __init__(self, *args, **kwargs): class SEWDForSequenceClassification (line 6290) | class SEWDForSequenceClassification(metaclass=DummyObject): method __init__ (line 6293) | def __init__(self, *args, **kwargs): class SEWDModel (line 6297) | class SEWDModel(metaclass=DummyObject): method __init__ (line 6300) | def __init__(self, *args, **kwargs): class SEWDPreTrainedModel (line 6304) | class SEWDPreTrainedModel(metaclass=DummyObject): method __init__ (line 6307) | def __init__(self, *args, **kwargs): class SpeechEncoderDecoderModel (line 6311) | class SpeechEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 6314) | def __init__(self, *args, **kwargs): class Speech2TextForConditionalGeneration (line 6321) | class Speech2TextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6324) | def __init__(self, *args, **kwargs): class Speech2TextModel (line 6328) | class Speech2TextModel(metaclass=DummyObject): method __init__ (line 6331) | def __init__(self, *args, **kwargs): class Speech2TextPreTrainedModel (line 6335) | class Speech2TextPreTrainedModel(metaclass=DummyObject): method __init__ (line 6338) | def __init__(self, *args, **kwargs): class Speech2Text2ForCausalLM (line 6342) | class Speech2Text2ForCausalLM(metaclass=DummyObject): method __init__ (line 6345) | def __init__(self, *args, **kwargs): class Speech2Text2PreTrainedModel (line 6349) | class Speech2Text2PreTrainedModel(metaclass=DummyObject): method __init__ (line 6352) | def __init__(self, *args, **kwargs): class SpeechT5ForSpeechToSpeech (line 6359) | class SpeechT5ForSpeechToSpeech(metaclass=DummyObject): method __init__ (line 6362) | def __init__(self, *args, **kwargs): class SpeechT5ForSpeechToText (line 6366) | class SpeechT5ForSpeechToText(metaclass=DummyObject): method __init__ (line 6369) | def __init__(self, *args, **kwargs): class SpeechT5ForTextToSpeech (line 6373) | class SpeechT5ForTextToSpeech(metaclass=DummyObject): method __init__ (line 6376) | def __init__(self, *args, **kwargs): class SpeechT5HifiGan (line 6380) | class SpeechT5HifiGan(metaclass=DummyObject): method __init__ (line 6383) | def __init__(self, *args, **kwargs): class SpeechT5Model (line 6387) | class SpeechT5Model(metaclass=DummyObject): method __init__ (line 6390) | def __init__(self, *args, **kwargs): class SpeechT5PreTrainedModel (line 6394) | class SpeechT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 6397) | def __init__(self, *args, **kwargs): class SplinterForPreTraining (line 6404) | class SplinterForPreTraining(metaclass=DummyObject): method __init__ (line 6407) | def __init__(self, *args, **kwargs): class SplinterForQuestionAnswering (line 6411) | class SplinterForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6414) | def __init__(self, *args, **kwargs): class SplinterLayer (line 6418) | class SplinterLayer(metaclass=DummyObject): method __init__ (line 6421) | def __init__(self, *args, **kwargs): class SplinterModel (line 6425) | class SplinterModel(metaclass=DummyObject): method __init__ (line 6428) | def __init__(self, *args, **kwargs): class SplinterPreTrainedModel (line 6432) | class SplinterPreTrainedModel(metaclass=DummyObject): method __init__ (line 6435) | def __init__(self, *args, **kwargs): class SqueezeBertForMaskedLM (line 6442) | class SqueezeBertForMaskedLM(metaclass=DummyObject): method __init__ (line 6445) | def __init__(self, *args, **kwargs): class SqueezeBertForMultipleChoice (line 6449) | class SqueezeBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 6452) | def __init__(self, *args, **kwargs): class SqueezeBertForQuestionAnswering (line 6456) | class SqueezeBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6459) | def __init__(self, *args, **kwargs): class SqueezeBertForSequenceClassification (line 6463) | class SqueezeBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 6466) | def __init__(self, *args, **kwargs): class SqueezeBertForTokenClassification (line 6470) | class SqueezeBertForTokenClassification(metaclass=DummyObject): method __init__ (line 6473) | def __init__(self, *args, **kwargs): class SqueezeBertModel (line 6477) | class SqueezeBertModel(metaclass=DummyObject): method __init__ (line 6480) | def __init__(self, *args, **kwargs): class SqueezeBertModule (line 6484) | class SqueezeBertModule(metaclass=DummyObject): method __init__ (line 6487) | def __init__(self, *args, **kwargs): class SqueezeBertPreTrainedModel (line 6491) | class SqueezeBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 6494) | def __init__(self, *args, **kwargs): class SwiftFormerForImageClassification (line 6501) | class SwiftFormerForImageClassification(metaclass=DummyObject): method __init__ (line 6504) | def __init__(self, *args, **kwargs): class SwiftFormerModel (line 6508) | class SwiftFormerModel(metaclass=DummyObject): method __init__ (line 6511) | def __init__(self, *args, **kwargs): class SwiftFormerPreTrainedModel (line 6515) | class SwiftFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6518) | def __init__(self, *args, **kwargs): class SwinBackbone (line 6525) | class SwinBackbone(metaclass=DummyObject): method __init__ (line 6528) | def __init__(self, *args, **kwargs): class SwinForImageClassification (line 6532) | class SwinForImageClassification(metaclass=DummyObject): method __init__ (line 6535) | def __init__(self, *args, **kwargs): class SwinForMaskedImageModeling (line 6539) | class SwinForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 6542) | def __init__(self, *args, **kwargs): class SwinModel (line 6546) | class SwinModel(metaclass=DummyObject): method __init__ (line 6549) | def __init__(self, *args, **kwargs): class SwinPreTrainedModel (line 6553) | class SwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 6556) | def __init__(self, *args, **kwargs): class Swin2SRForImageSuperResolution (line 6563) | class Swin2SRForImageSuperResolution(metaclass=DummyObject): method __init__ (line 6566) | def __init__(self, *args, **kwargs): class Swin2SRModel (line 6570) | class Swin2SRModel(metaclass=DummyObject): method __init__ (line 6573) | def __init__(self, *args, **kwargs): class Swin2SRPreTrainedModel (line 6577) | class Swin2SRPreTrainedModel(metaclass=DummyObject): method __init__ (line 6580) | def __init__(self, *args, **kwargs): class Swinv2ForImageClassification (line 6587) | class Swinv2ForImageClassification(metaclass=DummyObject): method __init__ (line 6590) | def __init__(self, *args, **kwargs): class Swinv2ForMaskedImageModeling (line 6594) | class Swinv2ForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 6597) | def __init__(self, *args, **kwargs): class Swinv2Model (line 6601) | class Swinv2Model(metaclass=DummyObject): method __init__ (line 6604) | def __init__(self, *args, **kwargs): class Swinv2PreTrainedModel (line 6608) | class Swinv2PreTrainedModel(metaclass=DummyObject): method __init__ (line 6611) | def __init__(self, *args, **kwargs): class SwitchTransformersEncoderModel (line 6618) | class SwitchTransformersEncoderModel(metaclass=DummyObject): method __init__ (line 6621) | def __init__(self, *args, **kwargs): class SwitchTransformersForConditionalGeneration (line 6625) | class SwitchTransformersForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6628) | def __init__(self, *args, **kwargs): class SwitchTransformersModel (line 6632) | class SwitchTransformersModel(metaclass=DummyObject): method __init__ (line 6635) | def __init__(self, *args, **kwargs): class SwitchTransformersPreTrainedModel (line 6639) | class SwitchTransformersPreTrainedModel(metaclass=DummyObject): method __init__ (line 6642) | def __init__(self, *args, **kwargs): class SwitchTransformersSparseMLP (line 6646) | class SwitchTransformersSparseMLP(metaclass=DummyObject): method __init__ (line 6649) | def __init__(self, *args, **kwargs): class SwitchTransformersTop1Router (line 6653) | class SwitchTransformersTop1Router(metaclass=DummyObject): method __init__ (line 6656) | def __init__(self, *args, **kwargs): class T5EncoderModel (line 6663) | class T5EncoderModel(metaclass=DummyObject): method __init__ (line 6666) | def __init__(self, *args, **kwargs): class T5ForConditionalGeneration (line 6670) | class T5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 6673) | def __init__(self, *args, **kwargs): class T5Model (line 6677) | class T5Model(metaclass=DummyObject): method __init__ (line 6680) | def __init__(self, *args, **kwargs): class T5PreTrainedModel (line 6684) | class T5PreTrainedModel(metaclass=DummyObject): method __init__ (line 6687) | def __init__(self, *args, **kwargs): function load_tf_weights_in_t5 (line 6691) | def load_tf_weights_in_t5(*args, **kwargs): class TableTransformerForObjectDetection (line 6698) | class TableTransformerForObjectDetection(metaclass=DummyObject): method __init__ (line 6701) | def __init__(self, *args, **kwargs): class TableTransformerModel (line 6705) | class TableTransformerModel(metaclass=DummyObject): method __init__ (line 6708) | def __init__(self, *args, **kwargs): class TableTransformerPreTrainedModel (line 6712) | class TableTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6715) | def __init__(self, *args, **kwargs): class TapasForMaskedLM (line 6722) | class TapasForMaskedLM(metaclass=DummyObject): method __init__ (line 6725) | def __init__(self, *args, **kwargs): class TapasForQuestionAnswering (line 6729) | class TapasForQuestionAnswering(metaclass=DummyObject): method __init__ (line 6732) | def __init__(self, *args, **kwargs): class TapasForSequenceClassification (line 6736) | class TapasForSequenceClassification(metaclass=DummyObject): method __init__ (line 6739) | def __init__(self, *args, **kwargs): class TapasModel (line 6743) | class TapasModel(metaclass=DummyObject): method __init__ (line 6746) | def __init__(self, *args, **kwargs): class TapasPreTrainedModel (line 6750) | class TapasPreTrainedModel(metaclass=DummyObject): method __init__ (line 6753) | def __init__(self, *args, **kwargs): function load_tf_weights_in_tapas (line 6757) | def load_tf_weights_in_tapas(*args, **kwargs): class TimeSeriesTransformerForPrediction (line 6764) | class TimeSeriesTransformerForPrediction(metaclass=DummyObject): method __init__ (line 6767) | def __init__(self, *args, **kwargs): class TimeSeriesTransformerModel (line 6771) | class TimeSeriesTransformerModel(metaclass=DummyObject): method __init__ (line 6774) | def __init__(self, *args, **kwargs): class TimeSeriesTransformerPreTrainedModel (line 6778) | class TimeSeriesTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6781) | def __init__(self, *args, **kwargs): class TimesformerForVideoClassification (line 6788) | class TimesformerForVideoClassification(metaclass=DummyObject): method __init__ (line 6791) | def __init__(self, *args, **kwargs): class TimesformerModel (line 6795) | class TimesformerModel(metaclass=DummyObject): method __init__ (line 6798) | def __init__(self, *args, **kwargs): class TimesformerPreTrainedModel (line 6802) | class TimesformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6805) | def __init__(self, *args, **kwargs): class TimmBackbone (line 6809) | class TimmBackbone(metaclass=DummyObject): method __init__ (line 6812) | def __init__(self, *args, **kwargs): class TrajectoryTransformerModel (line 6819) | class TrajectoryTransformerModel(metaclass=DummyObject): method __init__ (line 6822) | def __init__(self, *args, **kwargs): class TrajectoryTransformerPreTrainedModel (line 6826) | class TrajectoryTransformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 6829) | def __init__(self, *args, **kwargs): class AdaptiveEmbedding (line 6836) | class AdaptiveEmbedding(metaclass=DummyObject): method __init__ (line 6839) | def __init__(self, *args, **kwargs): class TransfoXLForSequenceClassification (line 6843) | class TransfoXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 6846) | def __init__(self, *args, **kwargs): class TransfoXLLMHeadModel (line 6850) | class TransfoXLLMHeadModel(metaclass=DummyObject): method __init__ (line 6853) | def __init__(self, *args, **kwargs): class TransfoXLModel (line 6857) | class TransfoXLModel(metaclass=DummyObject): method __init__ (line 6860) | def __init__(self, *args, **kwargs): class TransfoXLPreTrainedModel (line 6864) | class TransfoXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 6867) | def __init__(self, *args, **kwargs): function load_tf_weights_in_transfo_xl (line 6871) | def load_tf_weights_in_transfo_xl(*args, **kwargs): class TrOCRForCausalLM (line 6878) | class TrOCRForCausalLM(metaclass=DummyObject): method __init__ (line 6881) | def __init__(self, *args, **kwargs): class TrOCRPreTrainedModel (line 6885) | class TrOCRPreTrainedModel(metaclass=DummyObject): method __init__ (line 6888) | def __init__(self, *args, **kwargs): class TvltForAudioVisualClassification (line 6895) | class TvltForAudioVisualClassification(metaclass=DummyObject): method __init__ (line 6898) | def __init__(self, *args, **kwargs): class TvltForPreTraining (line 6902) | class TvltForPreTraining(metaclass=DummyObject): method __init__ (line 6905) | def __init__(self, *args, **kwargs): class TvltModel (line 6909) | class TvltModel(metaclass=DummyObject): method __init__ (line 6912) | def __init__(self, *args, **kwargs): class TvltPreTrainedModel (line 6916) | class TvltPreTrainedModel(metaclass=DummyObject): method __init__ (line 6919) | def __init__(self, *args, **kwargs): class UniSpeechForCTC (line 6926) | class UniSpeechForCTC(metaclass=DummyObject): method __init__ (line 6929) | def __init__(self, *args, **kwargs): class UniSpeechForPreTraining (line 6933) | class UniSpeechForPreTraining(metaclass=DummyObject): method __init__ (line 6936) | def __init__(self, *args, **kwargs): class UniSpeechForSequenceClassification (line 6940) | class UniSpeechForSequenceClassification(metaclass=DummyObject): method __init__ (line 6943) | def __init__(self, *args, **kwargs): class UniSpeechModel (line 6947) | class UniSpeechModel(metaclass=DummyObject): method __init__ (line 6950) | def __init__(self, *args, **kwargs): class UniSpeechPreTrainedModel (line 6954) | class UniSpeechPreTrainedModel(metaclass=DummyObject): method __init__ (line 6957) | def __init__(self, *args, **kwargs): class UniSpeechSatForAudioFrameClassification (line 6964) | class UniSpeechSatForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 6967) | def __init__(self, *args, **kwargs): class UniSpeechSatForCTC (line 6971) | class UniSpeechSatForCTC(metaclass=DummyObject): method __init__ (line 6974) | def __init__(self, *args, **kwargs): class UniSpeechSatForPreTraining (line 6978) | class UniSpeechSatForPreTraining(metaclass=DummyObject): method __init__ (line 6981) | def __init__(self, *args, **kwargs): class UniSpeechSatForSequenceClassification (line 6985) | class UniSpeechSatForSequenceClassification(metaclass=DummyObject): method __init__ (line 6988) | def __init__(self, *args, **kwargs): class UniSpeechSatForXVector (line 6992) | class UniSpeechSatForXVector(metaclass=DummyObject): method __init__ (line 6995) | def __init__(self, *args, **kwargs): class UniSpeechSatModel (line 6999) | class UniSpeechSatModel(metaclass=DummyObject): method __init__ (line 7002) | def __init__(self, *args, **kwargs): class UniSpeechSatPreTrainedModel (line 7006) | class UniSpeechSatPreTrainedModel(metaclass=DummyObject): method __init__ (line 7009) | def __init__(self, *args, **kwargs): class UperNetForSemanticSegmentation (line 7013) | class UperNetForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 7016) | def __init__(self, *args, **kwargs): class UperNetPreTrainedModel (line 7020) | class UperNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7023) | def __init__(self, *args, **kwargs): class VanForImageClassification (line 7030) | class VanForImageClassification(metaclass=DummyObject): method __init__ (line 7033) | def __init__(self, *args, **kwargs): class VanModel (line 7037) | class VanModel(metaclass=DummyObject): method __init__ (line 7040) | def __init__(self, *args, **kwargs): class VanPreTrainedModel (line 7044) | class VanPreTrainedModel(metaclass=DummyObject): method __init__ (line 7047) | def __init__(self, *args, **kwargs): class VideoMAEForPreTraining (line 7054) | class VideoMAEForPreTraining(metaclass=DummyObject): method __init__ (line 7057) | def __init__(self, *args, **kwargs): class VideoMAEForVideoClassification (line 7061) | class VideoMAEForVideoClassification(metaclass=DummyObject): method __init__ (line 7064) | def __init__(self, *args, **kwargs): class VideoMAEModel (line 7068) | class VideoMAEModel(metaclass=DummyObject): method __init__ (line 7071) | def __init__(self, *args, **kwargs): class VideoMAEPreTrainedModel (line 7075) | class VideoMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 7078) | def __init__(self, *args, **kwargs): class ViltForImageAndTextRetrieval (line 7085) | class ViltForImageAndTextRetrieval(metaclass=DummyObject): method __init__ (line 7088) | def __init__(self, *args, **kwargs): class ViltForImagesAndTextClassification (line 7092) | class ViltForImagesAndTextClassification(metaclass=DummyObject): method __init__ (line 7095) | def __init__(self, *args, **kwargs): class ViltForMaskedLM (line 7099) | class ViltForMaskedLM(metaclass=DummyObject): method __init__ (line 7102) | def __init__(self, *args, **kwargs): class ViltForQuestionAnswering (line 7106) | class ViltForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7109) | def __init__(self, *args, **kwargs): class ViltForTokenClassification (line 7113) | class ViltForTokenClassification(metaclass=DummyObject): method __init__ (line 7116) | def __init__(self, *args, **kwargs): class ViltLayer (line 7120) | class ViltLayer(metaclass=DummyObject): method __init__ (line 7123) | def __init__(self, *args, **kwargs): class ViltModel (line 7127) | class ViltModel(metaclass=DummyObject): method __init__ (line 7130) | def __init__(self, *args, **kwargs): class ViltPreTrainedModel (line 7134) | class ViltPreTrainedModel(metaclass=DummyObject): method __init__ (line 7137) | def __init__(self, *args, **kwargs): class VisionEncoderDecoderModel (line 7141) | class VisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 7144) | def __init__(self, *args, **kwargs): class VisionTextDualEncoderModel (line 7148) | class VisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 7151) | def __init__(self, *args, **kwargs): class VisualBertForMultipleChoice (line 7158) | class VisualBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 7161) | def __init__(self, *args, **kwargs): class VisualBertForPreTraining (line 7165) | class VisualBertForPreTraining(metaclass=DummyObject): method __init__ (line 7168) | def __init__(self, *args, **kwargs): class VisualBertForQuestionAnswering (line 7172) | class VisualBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7175) | def __init__(self, *args, **kwargs): class VisualBertForRegionToPhraseAlignment (line 7179) | class VisualBertForRegionToPhraseAlignment(metaclass=DummyObject): method __init__ (line 7182) | def __init__(self, *args, **kwargs): class VisualBertForVisualReasoning (line 7186) | class VisualBertForVisualReasoning(metaclass=DummyObject): method __init__ (line 7189) | def __init__(self, *args, **kwargs): class VisualBertLayer (line 7193) | class VisualBertLayer(metaclass=DummyObject): method __init__ (line 7196) | def __init__(self, *args, **kwargs): class VisualBertModel (line 7200) | class VisualBertModel(metaclass=DummyObject): method __init__ (line 7203) | def __init__(self, *args, **kwargs): class VisualBertPreTrainedModel (line 7207) | class VisualBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 7210) | def __init__(self, *args, **kwargs): class ViTForImageClassification (line 7217) | class ViTForImageClassification(metaclass=DummyObject): method __init__ (line 7220) | def __init__(self, *args, **kwargs): class ViTForMaskedImageModeling (line 7224) | class ViTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 7227) | def __init__(self, *args, **kwargs): class ViTModel (line 7231) | class ViTModel(metaclass=DummyObject): method __init__ (line 7234) | def __init__(self, *args, **kwargs): class ViTPreTrainedModel (line 7238) | class ViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 7241) | def __init__(self, *args, **kwargs): class ViTHybridForImageClassification (line 7248) | class ViTHybridForImageClassification(metaclass=DummyObject): method __init__ (line 7251) | def __init__(self, *args, **kwargs): class ViTHybridModel (line 7255) | class ViTHybridModel(metaclass=DummyObject): method __init__ (line 7258) | def __init__(self, *args, **kwargs): class ViTHybridPreTrainedModel (line 7262) | class ViTHybridPreTrainedModel(metaclass=DummyObject): method __init__ (line 7265) | def __init__(self, *args, **kwargs): class ViTMAEForPreTraining (line 7272) | class ViTMAEForPreTraining(metaclass=DummyObject): method __init__ (line 7275) | def __init__(self, *args, **kwargs): class ViTMAELayer (line 7279) | class ViTMAELayer(metaclass=DummyObject): method __init__ (line 7282) | def __init__(self, *args, **kwargs): class ViTMAEModel (line 7286) | class ViTMAEModel(metaclass=DummyObject): method __init__ (line 7289) | def __init__(self, *args, **kwargs): class ViTMAEPreTrainedModel (line 7293) | class ViTMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 7296) | def __init__(self, *args, **kwargs): class ViTMSNForImageClassification (line 7303) | class ViTMSNForImageClassification(metaclass=DummyObject): method __init__ (line 7306) | def __init__(self, *args, **kwargs): class ViTMSNModel (line 7310) | class ViTMSNModel(metaclass=DummyObject): method __init__ (line 7313) | def __init__(self, *args, **kwargs): class ViTMSNPreTrainedModel (line 7317) | class ViTMSNPreTrainedModel(metaclass=DummyObject): method __init__ (line 7320) | def __init__(self, *args, **kwargs): class Wav2Vec2ForAudioFrameClassification (line 7327) | class Wav2Vec2ForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 7330) | def __init__(self, *args, **kwargs): class Wav2Vec2ForCTC (line 7334) | class Wav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 7337) | def __init__(self, *args, **kwargs): class Wav2Vec2ForMaskedLM (line 7341) | class Wav2Vec2ForMaskedLM(metaclass=DummyObject): method __init__ (line 7344) | def __init__(self, *args, **kwargs): class Wav2Vec2ForPreTraining (line 7348) | class Wav2Vec2ForPreTraining(metaclass=DummyObject): method __init__ (line 7351) | def __init__(self, *args, **kwargs): class Wav2Vec2ForSequenceClassification (line 7355) | class Wav2Vec2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 7358) | def __init__(self, *args, **kwargs): class Wav2Vec2ForXVector (line 7362) | class Wav2Vec2ForXVector(metaclass=DummyObject): method __init__ (line 7365) | def __init__(self, *args, **kwargs): class Wav2Vec2Model (line 7369) | class Wav2Vec2Model(metaclass=DummyObject): method __init__ (line 7372) | def __init__(self, *args, **kwargs): class Wav2Vec2PreTrainedModel (line 7376) | class Wav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 7379) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForAudioFrameClassification (line 7386) | class Wav2Vec2ConformerForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 7389) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForCTC (line 7393) | class Wav2Vec2ConformerForCTC(metaclass=DummyObject): method __init__ (line 7396) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForPreTraining (line 7400) | class Wav2Vec2ConformerForPreTraining(metaclass=DummyObject): method __init__ (line 7403) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForSequenceClassification (line 7407) | class Wav2Vec2ConformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 7410) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerForXVector (line 7414) | class Wav2Vec2ConformerForXVector(metaclass=DummyObject): method __init__ (line 7417) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerModel (line 7421) | class Wav2Vec2ConformerModel(metaclass=DummyObject): method __init__ (line 7424) | def __init__(self, *args, **kwargs): class Wav2Vec2ConformerPreTrainedModel (line 7428) | class Wav2Vec2ConformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 7431) | def __init__(self, *args, **kwargs): class WavLMForAudioFrameClassification (line 7438) | class WavLMForAudioFrameClassification(metaclass=DummyObject): method __init__ (line 7441) | def __init__(self, *args, **kwargs): class WavLMForCTC (line 7445) | class WavLMForCTC(metaclass=DummyObject): method __init__ (line 7448) | def __init__(self, *args, **kwargs): class WavLMForSequenceClassification (line 7452) | class WavLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 7455) | def __init__(self, *args, **kwargs): class WavLMForXVector (line 7459) | class WavLMForXVector(metaclass=DummyObject): method __init__ (line 7462) | def __init__(self, *args, **kwargs): class WavLMModel (line 7466) | class WavLMModel(metaclass=DummyObject): method __init__ (line 7469) | def __init__(self, *args, **kwargs): class WavLMPreTrainedModel (line 7473) | class WavLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 7476) | def __init__(self, *args, **kwargs): class WhisperForAudioClassification (line 7483) | class WhisperForAudioClassification(metaclass=DummyObject): method __init__ (line 7486) | def __init__(self, *args, **kwargs): class WhisperForConditionalGeneration (line 7490) | class WhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7493) | def __init__(self, *args, **kwargs): class WhisperModel (line 7497) | class WhisperModel(metaclass=DummyObject): method __init__ (line 7500) | def __init__(self, *args, **kwargs): class WhisperPreTrainedModel (line 7504) | class WhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 7507) | def __init__(self, *args, **kwargs): class XCLIPModel (line 7514) | class XCLIPModel(metaclass=DummyObject): method __init__ (line 7517) | def __init__(self, *args, **kwargs): class XCLIPPreTrainedModel (line 7521) | class XCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 7524) | def __init__(self, *args, **kwargs): class XCLIPTextModel (line 7528) | class XCLIPTextModel(metaclass=DummyObject): method __init__ (line 7531) | def __init__(self, *args, **kwargs): class XCLIPVisionModel (line 7535) | class XCLIPVisionModel(metaclass=DummyObject): method __init__ (line 7538) | def __init__(self, *args, **kwargs): class XGLMForCausalLM (line 7545) | class XGLMForCausalLM(metaclass=DummyObject): method __init__ (line 7548) | def __init__(self, *args, **kwargs): class XGLMModel (line 7552) | class XGLMModel(metaclass=DummyObject): method __init__ (line 7555) | def __init__(self, *args, **kwargs): class XGLMPreTrainedModel (line 7559) | class XGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 7562) | def __init__(self, *args, **kwargs): class XLMForMultipleChoice (line 7569) | class XLMForMultipleChoice(metaclass=DummyObject): method __init__ (line 7572) | def __init__(self, *args, **kwargs): class XLMForQuestionAnswering (line 7576) | class XLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7579) | def __init__(self, *args, **kwargs): class XLMForQuestionAnsweringSimple (line 7583) | class XLMForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 7586) | def __init__(self, *args, **kwargs): class XLMForSequenceClassification (line 7590) | class XLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 7593) | def __init__(self, *args, **kwargs): class XLMForTokenClassification (line 7597) | class XLMForTokenClassification(metaclass=DummyObject): method __init__ (line 7600) | def __init__(self, *args, **kwargs): class XLMModel (line 7604) | class XLMModel(metaclass=DummyObject): method __init__ (line 7607) | def __init__(self, *args, **kwargs): class XLMPreTrainedModel (line 7611) | class XLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 7614) | def __init__(self, *args, **kwargs): class XLMWithLMHeadModel (line 7618) | class XLMWithLMHeadModel(metaclass=DummyObject): method __init__ (line 7621) | def __init__(self, *args, **kwargs): class XLMProphetNetDecoder (line 7628) | class XLMProphetNetDecoder(metaclass=DummyObject): method __init__ (line 7631) | def __init__(self, *args, **kwargs): class XLMProphetNetEncoder (line 7635) | class XLMProphetNetEncoder(metaclass=DummyObject): method __init__ (line 7638) | def __init__(self, *args, **kwargs): class XLMProphetNetForCausalLM (line 7642) | class XLMProphetNetForCausalLM(metaclass=DummyObject): method __init__ (line 7645) | def __init__(self, *args, **kwargs): class XLMProphetNetForConditionalGeneration (line 7649) | class XLMProphetNetForConditionalGeneration(metaclass=DummyObject): method __init__ (line 7652) | def __init__(self, *args, **kwargs): class XLMProphetNetModel (line 7656) | class XLMProphetNetModel(metaclass=DummyObject): method __init__ (line 7659) | def __init__(self, *args, **kwargs): class XLMProphetNetPreTrainedModel (line 7663) | class XLMProphetNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7666) | def __init__(self, *args, **kwargs): class XLMRobertaForCausalLM (line 7673) | class XLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 7676) | def __init__(self, *args, **kwargs): class XLMRobertaForMaskedLM (line 7680) | class XLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 7683) | def __init__(self, *args, **kwargs): class XLMRobertaForMultipleChoice (line 7687) | class XLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 7690) | def __init__(self, *args, **kwargs): class XLMRobertaForQuestionAnswering (line 7694) | class XLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7697) | def __init__(self, *args, **kwargs): class XLMRobertaForSequenceClassification (line 7701) | class XLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 7704) | def __init__(self, *args, **kwargs): class XLMRobertaForTokenClassification (line 7708) | class XLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 7711) | def __init__(self, *args, **kwargs): class XLMRobertaModel (line 7715) | class XLMRobertaModel(metaclass=DummyObject): method __init__ (line 7718) | def __init__(self, *args, **kwargs): class XLMRobertaPreTrainedModel (line 7722) | class XLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 7725) | def __init__(self, *args, **kwargs): class XLMRobertaXLForCausalLM (line 7732) | class XLMRobertaXLForCausalLM(metaclass=DummyObject): method __init__ (line 7735) | def __init__(self, *args, **kwargs): class XLMRobertaXLForMaskedLM (line 7739) | class XLMRobertaXLForMaskedLM(metaclass=DummyObject): method __init__ (line 7742) | def __init__(self, *args, **kwargs): class XLMRobertaXLForMultipleChoice (line 7746) | class XLMRobertaXLForMultipleChoice(metaclass=DummyObject): method __init__ (line 7749) | def __init__(self, *args, **kwargs): class XLMRobertaXLForQuestionAnswering (line 7753) | class XLMRobertaXLForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7756) | def __init__(self, *args, **kwargs): class XLMRobertaXLForSequenceClassification (line 7760) | class XLMRobertaXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 7763) | def __init__(self, *args, **kwargs): class XLMRobertaXLForTokenClassification (line 7767) | class XLMRobertaXLForTokenClassification(metaclass=DummyObject): method __init__ (line 7770) | def __init__(self, *args, **kwargs): class XLMRobertaXLModel (line 7774) | class XLMRobertaXLModel(metaclass=DummyObject): method __init__ (line 7777) | def __init__(self, *args, **kwargs): class XLMRobertaXLPreTrainedModel (line 7781) | class XLMRobertaXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 7784) | def __init__(self, *args, **kwargs): class XLNetForMultipleChoice (line 7791) | class XLNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 7794) | def __init__(self, *args, **kwargs): class XLNetForQuestionAnswering (line 7798) | class XLNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7801) | def __init__(self, *args, **kwargs): class XLNetForQuestionAnsweringSimple (line 7805) | class XLNetForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 7808) | def __init__(self, *args, **kwargs): class XLNetForSequenceClassification (line 7812) | class XLNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 7815) | def __init__(self, *args, **kwargs): class XLNetForTokenClassification (line 7819) | class XLNetForTokenClassification(metaclass=DummyObject): method __init__ (line 7822) | def __init__(self, *args, **kwargs): class XLNetLMHeadModel (line 7826) | class XLNetLMHeadModel(metaclass=DummyObject): method __init__ (line 7829) | def __init__(self, *args, **kwargs): class XLNetModel (line 7833) | class XLNetModel(metaclass=DummyObject): method __init__ (line 7836) | def __init__(self, *args, **kwargs): class XLNetPreTrainedModel (line 7840) | class XLNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 7843) | def __init__(self, *args, **kwargs): function load_tf_weights_in_xlnet (line 7847) | def load_tf_weights_in_xlnet(*args, **kwargs): class XmodForCausalLM (line 7854) | class XmodForCausalLM(metaclass=DummyObject): method __init__ (line 7857) | def __init__(self, *args, **kwargs): class XmodForMaskedLM (line 7861) | class XmodForMaskedLM(metaclass=DummyObject): method __init__ (line 7864) | def __init__(self, *args, **kwargs): class XmodForMultipleChoice (line 7868) | class XmodForMultipleChoice(metaclass=DummyObject): method __init__ (line 7871) | def __init__(self, *args, **kwargs): class XmodForQuestionAnswering (line 7875) | class XmodForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7878) | def __init__(self, *args, **kwargs): class XmodForSequenceClassification (line 7882) | class XmodForSequenceClassification(metaclass=DummyObject): method __init__ (line 7885) | def __init__(self, *args, **kwargs): class XmodForTokenClassification (line 7889) | class XmodForTokenClassification(metaclass=DummyObject): method __init__ (line 7892) | def __init__(self, *args, **kwargs): class XmodModel (line 7896) | class XmodModel(metaclass=DummyObject): method __init__ (line 7899) | def __init__(self, *args, **kwargs): class XmodPreTrainedModel (line 7903) | class XmodPreTrainedModel(metaclass=DummyObject): method __init__ (line 7906) | def __init__(self, *args, **kwargs): class YolosForObjectDetection (line 7913) | class YolosForObjectDetection(metaclass=DummyObject): method __init__ (line 7916) | def __init__(self, *args, **kwargs): class YolosModel (line 7920) | class YolosModel(metaclass=DummyObject): method __init__ (line 7923) | def __init__(self, *args, **kwargs): class YolosPreTrainedModel (line 7927) | class YolosPreTrainedModel(metaclass=DummyObject): method __init__ (line 7930) | def __init__(self, *args, **kwargs): class YosoForMaskedLM (line 7937) | class YosoForMaskedLM(metaclass=DummyObject): method __init__ (line 7940) | def __init__(self, *args, **kwargs): class YosoForMultipleChoice (line 7944) | class YosoForMultipleChoice(metaclass=DummyObject): method __init__ (line 7947) | def __init__(self, *args, **kwargs): class YosoForQuestionAnswering (line 7951) | class YosoForQuestionAnswering(metaclass=DummyObject): method __init__ (line 7954) | def __init__(self, *args, **kwargs): class YosoForSequenceClassification (line 7958) | class YosoForSequenceClassification(metaclass=DummyObject): method __init__ (line 7961) | def __init__(self, *args, **kwargs): class YosoForTokenClassification (line 7965) | class YosoForTokenClassification(metaclass=DummyObject): method __init__ (line 7968) | def __init__(self, *args, **kwargs): class YosoLayer (line 7972) | class YosoLayer(metaclass=DummyObject): method __init__ (line 7975) | def __init__(self, *args, **kwargs): class YosoModel (line 7979) | class YosoModel(metaclass=DummyObject): method __init__ (line 7982) | def __init__(self, *args, **kwargs): class YosoPreTrainedModel (line 7986) | class YosoPreTrainedModel(metaclass=DummyObject): method __init__ (line 7989) | def __init__(self, *args, **kwargs): class Adafactor (line 7993) | class Adafactor(metaclass=DummyObject): method __init__ (line 7996) | def __init__(self, *args, **kwargs): class AdamW (line 8000) | class AdamW(metaclass=DummyObject): method __init__ (line 8003) | def __init__(self, *args, **kwargs): function get_constant_schedule (line 8007) | def get_constant_schedule(*args, **kwargs): function get_constant_schedule_with_warmup (line 8011) | def get_constant_schedule_with_warmup(*args, **kwargs): function get_cosine_schedule_with_warmup (line 8015) | def get_cosine_schedule_with_warmup(*args, **kwargs): function get_cosine_with_hard_restarts_schedule_with_warmup (line 8019) | def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs): function get_inverse_sqrt_schedule (line 8023) | def get_inverse_sqrt_schedule(*args, **kwargs): function get_linear_schedule_with_warmup (line 8027) | def get_linear_schedule_with_warmup(*args, **kwargs): function get_polynomial_decay_schedule_with_warmup (line 8031) | def get_polynomial_decay_schedule_with_warmup(*args, **kwargs): function get_scheduler (line 8035) | def get_scheduler(*args, **kwargs): class Conv1D (line 8039) | class Conv1D(metaclass=DummyObject): method __init__ (line 8042) | def __init__(self, *args, **kwargs): function apply_chunking_to_forward (line 8046) | def apply_chunking_to_forward(*args, **kwargs): function prune_layer (line 8050) | def prune_layer(*args, **kwargs): class Trainer (line 8054) | class Trainer(metaclass=DummyObject): method __init__ (line 8057) | def __init__(self, *args, **kwargs): function torch_distributed_zero_first (line 8061) | def torch_distributed_zero_first(*args, **kwargs): class Seq2SeqTrainer (line 8065) | class Seq2SeqTrainer(metaclass=DummyObject): method __init__ (line 8068) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_sentencepiece_and_tokenizers_objects.py function convert_slow_tokenizer (line 8) | def convert_slow_tokenizer(*args, **kwargs): FILE: transformers/utils/dummy_sentencepiece_objects.py class AlbertTokenizer (line 5) | class AlbertTokenizer(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class BarthezTokenizer (line 12) | class BarthezTokenizer(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class BartphoTokenizer (line 19) | class BartphoTokenizer(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class BertGenerationTokenizer (line 26) | class BertGenerationTokenizer(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class BigBirdTokenizer (line 33) | class BigBirdTokenizer(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class CamembertTokenizer (line 40) | class CamembertTokenizer(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class CpmTokenizer (line 47) | class CpmTokenizer(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class DebertaV2Tokenizer (line 54) | class DebertaV2Tokenizer(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class ErnieMTokenizer (line 61) | class ErnieMTokenizer(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class FNetTokenizer (line 68) | class FNetTokenizer(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class GPTSw3Tokenizer (line 75) | class GPTSw3Tokenizer(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class LayoutXLMTokenizer (line 82) | class LayoutXLMTokenizer(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class LlamaTokenizer (line 89) | class LlamaTokenizer(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class M2M100Tokenizer (line 96) | class M2M100Tokenizer(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class MarianTokenizer (line 103) | class MarianTokenizer(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class MBart50Tokenizer (line 110) | class MBart50Tokenizer(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class MBartTokenizer (line 117) | class MBartTokenizer(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class MLukeTokenizer (line 124) | class MLukeTokenizer(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class MT5Tokenizer (line 131) | class MT5Tokenizer(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class NllbTokenizer (line 138) | class NllbTokenizer(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class PegasusTokenizer (line 145) | class PegasusTokenizer(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class PLBartTokenizer (line 152) | class PLBartTokenizer(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class ReformerTokenizer (line 159) | class ReformerTokenizer(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class RemBertTokenizer (line 166) | class RemBertTokenizer(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class Speech2TextTokenizer (line 173) | class Speech2TextTokenizer(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class SpeechT5Tokenizer (line 180) | class SpeechT5Tokenizer(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class T5Tokenizer (line 187) | class T5Tokenizer(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class XGLMTokenizer (line 194) | class XGLMTokenizer(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class XLMProphetNetTokenizer (line 201) | class XLMProphetNetTokenizer(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class XLMRobertaTokenizer (line 208) | class XLMRobertaTokenizer(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class XLNetTokenizer (line 215) | class XLNetTokenizer(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_speech_objects.py class ASTFeatureExtractor (line 5) | class ASTFeatureExtractor(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class MCTCTFeatureExtractor (line 12) | class MCTCTFeatureExtractor(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class Speech2TextFeatureExtractor (line 19) | class Speech2TextFeatureExtractor(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class SpeechT5FeatureExtractor (line 26) | class SpeechT5FeatureExtractor(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class TvltFeatureExtractor (line 33) | class TvltFeatureExtractor(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_tensorflow_text_objects.py class TFBertTokenizer (line 5) | class TFBertTokenizer(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_tf_objects.py class TensorFlowBenchmarkArguments (line 5) | class TensorFlowBenchmarkArguments(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class TensorFlowBenchmark (line 12) | class TensorFlowBenchmark(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class TFForcedBOSTokenLogitsProcessor (line 19) | class TFForcedBOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class TFForcedEOSTokenLogitsProcessor (line 26) | class TFForcedEOSTokenLogitsProcessor(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class TFGenerationMixin (line 33) | class TFGenerationMixin(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class TFLogitsProcessor (line 40) | class TFLogitsProcessor(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class TFLogitsProcessorList (line 47) | class TFLogitsProcessorList(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class TFLogitsWarper (line 54) | class TFLogitsWarper(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class TFMinLengthLogitsProcessor (line 61) | class TFMinLengthLogitsProcessor(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class TFNoBadWordsLogitsProcessor (line 68) | class TFNoBadWordsLogitsProcessor(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class TFNoRepeatNGramLogitsProcessor (line 75) | class TFNoRepeatNGramLogitsProcessor(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class TFRepetitionPenaltyLogitsProcessor (line 82) | class TFRepetitionPenaltyLogitsProcessor(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class TFTemperatureLogitsWarper (line 89) | class TFTemperatureLogitsWarper(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class TFTopKLogitsWarper (line 96) | class TFTopKLogitsWarper(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class TFTopPLogitsWarper (line 103) | class TFTopPLogitsWarper(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): function tf_top_k_top_p_filtering (line 110) | def tf_top_k_top_p_filtering(*args, **kwargs): class KerasMetricCallback (line 114) | class KerasMetricCallback(metaclass=DummyObject): method __init__ (line 117) | def __init__(self, *args, **kwargs): class PushToHubCallback (line 121) | class PushToHubCallback(metaclass=DummyObject): method __init__ (line 124) | def __init__(self, *args, **kwargs): class TFPreTrainedModel (line 128) | class TFPreTrainedModel(metaclass=DummyObject): method __init__ (line 131) | def __init__(self, *args, **kwargs): class TFSequenceSummary (line 135) | class TFSequenceSummary(metaclass=DummyObject): method __init__ (line 138) | def __init__(self, *args, **kwargs): class TFSharedEmbeddings (line 142) | class TFSharedEmbeddings(metaclass=DummyObject): method __init__ (line 145) | def __init__(self, *args, **kwargs): function shape_list (line 149) | def shape_list(*args, **kwargs): class TFAlbertForMaskedLM (line 156) | class TFAlbertForMaskedLM(metaclass=DummyObject): method __init__ (line 159) | def __init__(self, *args, **kwargs): class TFAlbertForMultipleChoice (line 163) | class TFAlbertForMultipleChoice(metaclass=DummyObject): method __init__ (line 166) | def __init__(self, *args, **kwargs): class TFAlbertForPreTraining (line 170) | class TFAlbertForPreTraining(metaclass=DummyObject): method __init__ (line 173) | def __init__(self, *args, **kwargs): class TFAlbertForQuestionAnswering (line 177) | class TFAlbertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 180) | def __init__(self, *args, **kwargs): class TFAlbertForSequenceClassification (line 184) | class TFAlbertForSequenceClassification(metaclass=DummyObject): method __init__ (line 187) | def __init__(self, *args, **kwargs): class TFAlbertForTokenClassification (line 191) | class TFAlbertForTokenClassification(metaclass=DummyObject): method __init__ (line 194) | def __init__(self, *args, **kwargs): class TFAlbertMainLayer (line 198) | class TFAlbertMainLayer(metaclass=DummyObject): method __init__ (line 201) | def __init__(self, *args, **kwargs): class TFAlbertModel (line 205) | class TFAlbertModel(metaclass=DummyObject): method __init__ (line 208) | def __init__(self, *args, **kwargs): class TFAlbertPreTrainedModel (line 212) | class TFAlbertPreTrainedModel(metaclass=DummyObject): method __init__ (line 215) | def __init__(self, *args, **kwargs): class TFAutoModel (line 276) | class TFAutoModel(metaclass=DummyObject): method __init__ (line 279) | def __init__(self, *args, **kwargs): class TFAutoModelForCausalLM (line 283) | class TFAutoModelForCausalLM(metaclass=DummyObject): method __init__ (line 286) | def __init__(self, *args, **kwargs): class TFAutoModelForDocumentQuestionAnswering (line 290) | class TFAutoModelForDocumentQuestionAnswering(metaclass=DummyObject): method __init__ (line 293) | def __init__(self, *args, **kwargs): class TFAutoModelForImageClassification (line 297) | class TFAutoModelForImageClassification(metaclass=DummyObject): method __init__ (line 300) | def __init__(self, *args, **kwargs): class TFAutoModelForMaskedLM (line 304) | class TFAutoModelForMaskedLM(metaclass=DummyObject): method __init__ (line 307) | def __init__(self, *args, **kwargs): class TFAutoModelForMultipleChoice (line 311) | class TFAutoModelForMultipleChoice(metaclass=DummyObject): method __init__ (line 314) | def __init__(self, *args, **kwargs): class TFAutoModelForNextSentencePrediction (line 318) | class TFAutoModelForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 321) | def __init__(self, *args, **kwargs): class TFAutoModelForPreTraining (line 325) | class TFAutoModelForPreTraining(metaclass=DummyObject): method __init__ (line 328) | def __init__(self, *args, **kwargs): class TFAutoModelForQuestionAnswering (line 332) | class TFAutoModelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 335) | def __init__(self, *args, **kwargs): class TFAutoModelForSemanticSegmentation (line 339) | class TFAutoModelForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 342) | def __init__(self, *args, **kwargs): class TFAutoModelForSeq2SeqLM (line 346) | class TFAutoModelForSeq2SeqLM(metaclass=DummyObject): method __init__ (line 349) | def __init__(self, *args, **kwargs): class TFAutoModelForSequenceClassification (line 353) | class TFAutoModelForSequenceClassification(metaclass=DummyObject): method __init__ (line 356) | def __init__(self, *args, **kwargs): class TFAutoModelForSpeechSeq2Seq (line 360) | class TFAutoModelForSpeechSeq2Seq(metaclass=DummyObject): method __init__ (line 363) | def __init__(self, *args, **kwargs): class TFAutoModelForTableQuestionAnswering (line 367) | class TFAutoModelForTableQuestionAnswering(metaclass=DummyObject): method __init__ (line 370) | def __init__(self, *args, **kwargs): class TFAutoModelForTokenClassification (line 374) | class TFAutoModelForTokenClassification(metaclass=DummyObject): method __init__ (line 377) | def __init__(self, *args, **kwargs): class TFAutoModelForVision2Seq (line 381) | class TFAutoModelForVision2Seq(metaclass=DummyObject): method __init__ (line 384) | def __init__(self, *args, **kwargs): class TFAutoModelForZeroShotImageClassification (line 388) | class TFAutoModelForZeroShotImageClassification(metaclass=DummyObject): method __init__ (line 391) | def __init__(self, *args, **kwargs): class TFAutoModelWithLMHead (line 395) | class TFAutoModelWithLMHead(metaclass=DummyObject): method __init__ (line 398) | def __init__(self, *args, **kwargs): class TFBartForConditionalGeneration (line 402) | class TFBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 405) | def __init__(self, *args, **kwargs): class TFBartForSequenceClassification (line 409) | class TFBartForSequenceClassification(metaclass=DummyObject): method __init__ (line 412) | def __init__(self, *args, **kwargs): class TFBartModel (line 416) | class TFBartModel(metaclass=DummyObject): method __init__ (line 419) | def __init__(self, *args, **kwargs): class TFBartPretrainedModel (line 423) | class TFBartPretrainedModel(metaclass=DummyObject): method __init__ (line 426) | def __init__(self, *args, **kwargs): class TFBertEmbeddings (line 433) | class TFBertEmbeddings(metaclass=DummyObject): method __init__ (line 436) | def __init__(self, *args, **kwargs): class TFBertForMaskedLM (line 440) | class TFBertForMaskedLM(metaclass=DummyObject): method __init__ (line 443) | def __init__(self, *args, **kwargs): class TFBertForMultipleChoice (line 447) | class TFBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 450) | def __init__(self, *args, **kwargs): class TFBertForNextSentencePrediction (line 454) | class TFBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 457) | def __init__(self, *args, **kwargs): class TFBertForPreTraining (line 461) | class TFBertForPreTraining(metaclass=DummyObject): method __init__ (line 464) | def __init__(self, *args, **kwargs): class TFBertForQuestionAnswering (line 468) | class TFBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 471) | def __init__(self, *args, **kwargs): class TFBertForSequenceClassification (line 475) | class TFBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 478) | def __init__(self, *args, **kwargs): class TFBertForTokenClassification (line 482) | class TFBertForTokenClassification(metaclass=DummyObject): method __init__ (line 485) | def __init__(self, *args, **kwargs): class TFBertLMHeadModel (line 489) | class TFBertLMHeadModel(metaclass=DummyObject): method __init__ (line 492) | def __init__(self, *args, **kwargs): class TFBertMainLayer (line 496) | class TFBertMainLayer(metaclass=DummyObject): method __init__ (line 499) | def __init__(self, *args, **kwargs): class TFBertModel (line 503) | class TFBertModel(metaclass=DummyObject): method __init__ (line 506) | def __init__(self, *args, **kwargs): class TFBertPreTrainedModel (line 510) | class TFBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 513) | def __init__(self, *args, **kwargs): class TFBlenderbotForConditionalGeneration (line 517) | class TFBlenderbotForConditionalGeneration(metaclass=DummyObject): method __init__ (line 520) | def __init__(self, *args, **kwargs): class TFBlenderbotModel (line 524) | class TFBlenderbotModel(metaclass=DummyObject): method __init__ (line 527) | def __init__(self, *args, **kwargs): class TFBlenderbotPreTrainedModel (line 531) | class TFBlenderbotPreTrainedModel(metaclass=DummyObject): method __init__ (line 534) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallForConditionalGeneration (line 538) | class TFBlenderbotSmallForConditionalGeneration(metaclass=DummyObject): method __init__ (line 541) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallModel (line 545) | class TFBlenderbotSmallModel(metaclass=DummyObject): method __init__ (line 548) | def __init__(self, *args, **kwargs): class TFBlenderbotSmallPreTrainedModel (line 552) | class TFBlenderbotSmallPreTrainedModel(metaclass=DummyObject): method __init__ (line 555) | def __init__(self, *args, **kwargs): class TFBlipForConditionalGeneration (line 562) | class TFBlipForConditionalGeneration(metaclass=DummyObject): method __init__ (line 565) | def __init__(self, *args, **kwargs): class TFBlipForImageTextRetrieval (line 569) | class TFBlipForImageTextRetrieval(metaclass=DummyObject): method __init__ (line 572) | def __init__(self, *args, **kwargs): class TFBlipForQuestionAnswering (line 576) | class TFBlipForQuestionAnswering(metaclass=DummyObject): method __init__ (line 579) | def __init__(self, *args, **kwargs): class TFBlipModel (line 583) | class TFBlipModel(metaclass=DummyObject): method __init__ (line 586) | def __init__(self, *args, **kwargs): class TFBlipPreTrainedModel (line 590) | class TFBlipPreTrainedModel(metaclass=DummyObject): method __init__ (line 593) | def __init__(self, *args, **kwargs): class TFBlipTextModel (line 597) | class TFBlipTextModel(metaclass=DummyObject): method __init__ (line 600) | def __init__(self, *args, **kwargs): class TFBlipVisionModel (line 604) | class TFBlipVisionModel(metaclass=DummyObject): method __init__ (line 607) | def __init__(self, *args, **kwargs): class TFCamembertForCausalLM (line 614) | class TFCamembertForCausalLM(metaclass=DummyObject): method __init__ (line 617) | def __init__(self, *args, **kwargs): class TFCamembertForMaskedLM (line 621) | class TFCamembertForMaskedLM(metaclass=DummyObject): method __init__ (line 624) | def __init__(self, *args, **kwargs): class TFCamembertForMultipleChoice (line 628) | class TFCamembertForMultipleChoice(metaclass=DummyObject): method __init__ (line 631) | def __init__(self, *args, **kwargs): class TFCamembertForQuestionAnswering (line 635) | class TFCamembertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 638) | def __init__(self, *args, **kwargs): class TFCamembertForSequenceClassification (line 642) | class TFCamembertForSequenceClassification(metaclass=DummyObject): method __init__ (line 645) | def __init__(self, *args, **kwargs): class TFCamembertForTokenClassification (line 649) | class TFCamembertForTokenClassification(metaclass=DummyObject): method __init__ (line 652) | def __init__(self, *args, **kwargs): class TFCamembertModel (line 656) | class TFCamembertModel(metaclass=DummyObject): method __init__ (line 659) | def __init__(self, *args, **kwargs): class TFCamembertPreTrainedModel (line 663) | class TFCamembertPreTrainedModel(metaclass=DummyObject): method __init__ (line 666) | def __init__(self, *args, **kwargs): class TFCLIPModel (line 673) | class TFCLIPModel(metaclass=DummyObject): method __init__ (line 676) | def __init__(self, *args, **kwargs): class TFCLIPPreTrainedModel (line 680) | class TFCLIPPreTrainedModel(metaclass=DummyObject): method __init__ (line 683) | def __init__(self, *args, **kwargs): class TFCLIPTextModel (line 687) | class TFCLIPTextModel(metaclass=DummyObject): method __init__ (line 690) | def __init__(self, *args, **kwargs): class TFCLIPVisionModel (line 694) | class TFCLIPVisionModel(metaclass=DummyObject): method __init__ (line 697) | def __init__(self, *args, **kwargs): class TFConvBertForMaskedLM (line 704) | class TFConvBertForMaskedLM(metaclass=DummyObject): method __init__ (line 707) | def __init__(self, *args, **kwargs): class TFConvBertForMultipleChoice (line 711) | class TFConvBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 714) | def __init__(self, *args, **kwargs): class TFConvBertForQuestionAnswering (line 718) | class TFConvBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 721) | def __init__(self, *args, **kwargs): class TFConvBertForSequenceClassification (line 725) | class TFConvBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 728) | def __init__(self, *args, **kwargs): class TFConvBertForTokenClassification (line 732) | class TFConvBertForTokenClassification(metaclass=DummyObject): method __init__ (line 735) | def __init__(self, *args, **kwargs): class TFConvBertLayer (line 739) | class TFConvBertLayer(metaclass=DummyObject): method __init__ (line 742) | def __init__(self, *args, **kwargs): class TFConvBertModel (line 746) | class TFConvBertModel(metaclass=DummyObject): method __init__ (line 749) | def __init__(self, *args, **kwargs): class TFConvBertPreTrainedModel (line 753) | class TFConvBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 756) | def __init__(self, *args, **kwargs): class TFConvNextForImageClassification (line 760) | class TFConvNextForImageClassification(metaclass=DummyObject): method __init__ (line 763) | def __init__(self, *args, **kwargs): class TFConvNextModel (line 767) | class TFConvNextModel(metaclass=DummyObject): method __init__ (line 770) | def __init__(self, *args, **kwargs): class TFConvNextPreTrainedModel (line 774) | class TFConvNextPreTrainedModel(metaclass=DummyObject): method __init__ (line 777) | def __init__(self, *args, **kwargs): class TFCTRLForSequenceClassification (line 784) | class TFCTRLForSequenceClassification(metaclass=DummyObject): method __init__ (line 787) | def __init__(self, *args, **kwargs): class TFCTRLLMHeadModel (line 791) | class TFCTRLLMHeadModel(metaclass=DummyObject): method __init__ (line 794) | def __init__(self, *args, **kwargs): class TFCTRLModel (line 798) | class TFCTRLModel(metaclass=DummyObject): method __init__ (line 801) | def __init__(self, *args, **kwargs): class TFCTRLPreTrainedModel (line 805) | class TFCTRLPreTrainedModel(metaclass=DummyObject): method __init__ (line 808) | def __init__(self, *args, **kwargs): class TFCvtForImageClassification (line 815) | class TFCvtForImageClassification(metaclass=DummyObject): method __init__ (line 818) | def __init__(self, *args, **kwargs): class TFCvtModel (line 822) | class TFCvtModel(metaclass=DummyObject): method __init__ (line 825) | def __init__(self, *args, **kwargs): class TFCvtPreTrainedModel (line 829) | class TFCvtPreTrainedModel(metaclass=DummyObject): method __init__ (line 832) | def __init__(self, *args, **kwargs): class TFData2VecVisionForImageClassification (line 836) | class TFData2VecVisionForImageClassification(metaclass=DummyObject): method __init__ (line 839) | def __init__(self, *args, **kwargs): class TFData2VecVisionForSemanticSegmentation (line 843) | class TFData2VecVisionForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 846) | def __init__(self, *args, **kwargs): class TFData2VecVisionModel (line 850) | class TFData2VecVisionModel(metaclass=DummyObject): method __init__ (line 853) | def __init__(self, *args, **kwargs): class TFData2VecVisionPreTrainedModel (line 857) | class TFData2VecVisionPreTrainedModel(metaclass=DummyObject): method __init__ (line 860) | def __init__(self, *args, **kwargs): class TFDebertaForMaskedLM (line 867) | class TFDebertaForMaskedLM(metaclass=DummyObject): method __init__ (line 870) | def __init__(self, *args, **kwargs): class TFDebertaForQuestionAnswering (line 874) | class TFDebertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 877) | def __init__(self, *args, **kwargs): class TFDebertaForSequenceClassification (line 881) | class TFDebertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 884) | def __init__(self, *args, **kwargs): class TFDebertaForTokenClassification (line 888) | class TFDebertaForTokenClassification(metaclass=DummyObject): method __init__ (line 891) | def __init__(self, *args, **kwargs): class TFDebertaModel (line 895) | class TFDebertaModel(metaclass=DummyObject): method __init__ (line 898) | def __init__(self, *args, **kwargs): class TFDebertaPreTrainedModel (line 902) | class TFDebertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 905) | def __init__(self, *args, **kwargs): class TFDebertaV2ForMaskedLM (line 912) | class TFDebertaV2ForMaskedLM(metaclass=DummyObject): method __init__ (line 915) | def __init__(self, *args, **kwargs): class TFDebertaV2ForQuestionAnswering (line 919) | class TFDebertaV2ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 922) | def __init__(self, *args, **kwargs): class TFDebertaV2ForSequenceClassification (line 926) | class TFDebertaV2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 929) | def __init__(self, *args, **kwargs): class TFDebertaV2ForTokenClassification (line 933) | class TFDebertaV2ForTokenClassification(metaclass=DummyObject): method __init__ (line 936) | def __init__(self, *args, **kwargs): class TFDebertaV2Model (line 940) | class TFDebertaV2Model(metaclass=DummyObject): method __init__ (line 943) | def __init__(self, *args, **kwargs): class TFDebertaV2PreTrainedModel (line 947) | class TFDebertaV2PreTrainedModel(metaclass=DummyObject): method __init__ (line 950) | def __init__(self, *args, **kwargs): class TFDeiTForImageClassification (line 957) | class TFDeiTForImageClassification(metaclass=DummyObject): method __init__ (line 960) | def __init__(self, *args, **kwargs): class TFDeiTForImageClassificationWithTeacher (line 964) | class TFDeiTForImageClassificationWithTeacher(metaclass=DummyObject): method __init__ (line 967) | def __init__(self, *args, **kwargs): class TFDeiTForMaskedImageModeling (line 971) | class TFDeiTForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 974) | def __init__(self, *args, **kwargs): class TFDeiTModel (line 978) | class TFDeiTModel(metaclass=DummyObject): method __init__ (line 981) | def __init__(self, *args, **kwargs): class TFDeiTPreTrainedModel (line 985) | class TFDeiTPreTrainedModel(metaclass=DummyObject): method __init__ (line 988) | def __init__(self, *args, **kwargs): class TFDistilBertForMaskedLM (line 995) | class TFDistilBertForMaskedLM(metaclass=DummyObject): method __init__ (line 998) | def __init__(self, *args, **kwargs): class TFDistilBertForMultipleChoice (line 1002) | class TFDistilBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1005) | def __init__(self, *args, **kwargs): class TFDistilBertForQuestionAnswering (line 1009) | class TFDistilBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1012) | def __init__(self, *args, **kwargs): class TFDistilBertForSequenceClassification (line 1016) | class TFDistilBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1019) | def __init__(self, *args, **kwargs): class TFDistilBertForTokenClassification (line 1023) | class TFDistilBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1026) | def __init__(self, *args, **kwargs): class TFDistilBertMainLayer (line 1030) | class TFDistilBertMainLayer(metaclass=DummyObject): method __init__ (line 1033) | def __init__(self, *args, **kwargs): class TFDistilBertModel (line 1037) | class TFDistilBertModel(metaclass=DummyObject): method __init__ (line 1040) | def __init__(self, *args, **kwargs): class TFDistilBertPreTrainedModel (line 1044) | class TFDistilBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1047) | def __init__(self, *args, **kwargs): class TFDPRContextEncoder (line 1060) | class TFDPRContextEncoder(metaclass=DummyObject): method __init__ (line 1063) | def __init__(self, *args, **kwargs): class TFDPRPretrainedContextEncoder (line 1067) | class TFDPRPretrainedContextEncoder(metaclass=DummyObject): method __init__ (line 1070) | def __init__(self, *args, **kwargs): class TFDPRPretrainedQuestionEncoder (line 1074) | class TFDPRPretrainedQuestionEncoder(metaclass=DummyObject): method __init__ (line 1077) | def __init__(self, *args, **kwargs): class TFDPRPretrainedReader (line 1081) | class TFDPRPretrainedReader(metaclass=DummyObject): method __init__ (line 1084) | def __init__(self, *args, **kwargs): class TFDPRQuestionEncoder (line 1088) | class TFDPRQuestionEncoder(metaclass=DummyObject): method __init__ (line 1091) | def __init__(self, *args, **kwargs): class TFDPRReader (line 1095) | class TFDPRReader(metaclass=DummyObject): method __init__ (line 1098) | def __init__(self, *args, **kwargs): class TFEfficientFormerForImageClassification (line 1105) | class TFEfficientFormerForImageClassification(metaclass=DummyObject): method __init__ (line 1108) | def __init__(self, *args, **kwargs): class TFEfficientFormerForImageClassificationWithTeacher (line 1112) | class TFEfficientFormerForImageClassificationWithTeacher(metaclass=Dummy... method __init__ (line 1115) | def __init__(self, *args, **kwargs): class TFEfficientFormerModel (line 1119) | class TFEfficientFormerModel(metaclass=DummyObject): method __init__ (line 1122) | def __init__(self, *args, **kwargs): class TFEfficientFormerPreTrainedModel (line 1126) | class TFEfficientFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1129) | def __init__(self, *args, **kwargs): class TFElectraForMaskedLM (line 1136) | class TFElectraForMaskedLM(metaclass=DummyObject): method __init__ (line 1139) | def __init__(self, *args, **kwargs): class TFElectraForMultipleChoice (line 1143) | class TFElectraForMultipleChoice(metaclass=DummyObject): method __init__ (line 1146) | def __init__(self, *args, **kwargs): class TFElectraForPreTraining (line 1150) | class TFElectraForPreTraining(metaclass=DummyObject): method __init__ (line 1153) | def __init__(self, *args, **kwargs): class TFElectraForQuestionAnswering (line 1157) | class TFElectraForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1160) | def __init__(self, *args, **kwargs): class TFElectraForSequenceClassification (line 1164) | class TFElectraForSequenceClassification(metaclass=DummyObject): method __init__ (line 1167) | def __init__(self, *args, **kwargs): class TFElectraForTokenClassification (line 1171) | class TFElectraForTokenClassification(metaclass=DummyObject): method __init__ (line 1174) | def __init__(self, *args, **kwargs): class TFElectraModel (line 1178) | class TFElectraModel(metaclass=DummyObject): method __init__ (line 1181) | def __init__(self, *args, **kwargs): class TFElectraPreTrainedModel (line 1185) | class TFElectraPreTrainedModel(metaclass=DummyObject): method __init__ (line 1188) | def __init__(self, *args, **kwargs): class TFEncoderDecoderModel (line 1192) | class TFEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 1195) | def __init__(self, *args, **kwargs): class TFEsmForMaskedLM (line 1202) | class TFEsmForMaskedLM(metaclass=DummyObject): method __init__ (line 1205) | def __init__(self, *args, **kwargs): class TFEsmForSequenceClassification (line 1209) | class TFEsmForSequenceClassification(metaclass=DummyObject): method __init__ (line 1212) | def __init__(self, *args, **kwargs): class TFEsmForTokenClassification (line 1216) | class TFEsmForTokenClassification(metaclass=DummyObject): method __init__ (line 1219) | def __init__(self, *args, **kwargs): class TFEsmModel (line 1223) | class TFEsmModel(metaclass=DummyObject): method __init__ (line 1226) | def __init__(self, *args, **kwargs): class TFEsmPreTrainedModel (line 1230) | class TFEsmPreTrainedModel(metaclass=DummyObject): method __init__ (line 1233) | def __init__(self, *args, **kwargs): class TFFlaubertForMultipleChoice (line 1240) | class TFFlaubertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1243) | def __init__(self, *args, **kwargs): class TFFlaubertForQuestionAnsweringSimple (line 1247) | class TFFlaubertForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 1250) | def __init__(self, *args, **kwargs): class TFFlaubertForSequenceClassification (line 1254) | class TFFlaubertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1257) | def __init__(self, *args, **kwargs): class TFFlaubertForTokenClassification (line 1261) | class TFFlaubertForTokenClassification(metaclass=DummyObject): method __init__ (line 1264) | def __init__(self, *args, **kwargs): class TFFlaubertModel (line 1268) | class TFFlaubertModel(metaclass=DummyObject): method __init__ (line 1271) | def __init__(self, *args, **kwargs): class TFFlaubertPreTrainedModel (line 1275) | class TFFlaubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1278) | def __init__(self, *args, **kwargs): class TFFlaubertWithLMHeadModel (line 1282) | class TFFlaubertWithLMHeadModel(metaclass=DummyObject): method __init__ (line 1285) | def __init__(self, *args, **kwargs): class TFFunnelBaseModel (line 1292) | class TFFunnelBaseModel(metaclass=DummyObject): method __init__ (line 1295) | def __init__(self, *args, **kwargs): class TFFunnelForMaskedLM (line 1299) | class TFFunnelForMaskedLM(metaclass=DummyObject): method __init__ (line 1302) | def __init__(self, *args, **kwargs): class TFFunnelForMultipleChoice (line 1306) | class TFFunnelForMultipleChoice(metaclass=DummyObject): method __init__ (line 1309) | def __init__(self, *args, **kwargs): class TFFunnelForPreTraining (line 1313) | class TFFunnelForPreTraining(metaclass=DummyObject): method __init__ (line 1316) | def __init__(self, *args, **kwargs): class TFFunnelForQuestionAnswering (line 1320) | class TFFunnelForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1323) | def __init__(self, *args, **kwargs): class TFFunnelForSequenceClassification (line 1327) | class TFFunnelForSequenceClassification(metaclass=DummyObject): method __init__ (line 1330) | def __init__(self, *args, **kwargs): class TFFunnelForTokenClassification (line 1334) | class TFFunnelForTokenClassification(metaclass=DummyObject): method __init__ (line 1337) | def __init__(self, *args, **kwargs): class TFFunnelModel (line 1341) | class TFFunnelModel(metaclass=DummyObject): method __init__ (line 1344) | def __init__(self, *args, **kwargs): class TFFunnelPreTrainedModel (line 1348) | class TFFunnelPreTrainedModel(metaclass=DummyObject): method __init__ (line 1351) | def __init__(self, *args, **kwargs): class TFGPT2DoubleHeadsModel (line 1358) | class TFGPT2DoubleHeadsModel(metaclass=DummyObject): method __init__ (line 1361) | def __init__(self, *args, **kwargs): class TFGPT2ForSequenceClassification (line 1365) | class TFGPT2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1368) | def __init__(self, *args, **kwargs): class TFGPT2LMHeadModel (line 1372) | class TFGPT2LMHeadModel(metaclass=DummyObject): method __init__ (line 1375) | def __init__(self, *args, **kwargs): class TFGPT2MainLayer (line 1379) | class TFGPT2MainLayer(metaclass=DummyObject): method __init__ (line 1382) | def __init__(self, *args, **kwargs): class TFGPT2Model (line 1386) | class TFGPT2Model(metaclass=DummyObject): method __init__ (line 1389) | def __init__(self, *args, **kwargs): class TFGPT2PreTrainedModel (line 1393) | class TFGPT2PreTrainedModel(metaclass=DummyObject): method __init__ (line 1396) | def __init__(self, *args, **kwargs): class TFGPTJForCausalLM (line 1400) | class TFGPTJForCausalLM(metaclass=DummyObject): method __init__ (line 1403) | def __init__(self, *args, **kwargs): class TFGPTJForQuestionAnswering (line 1407) | class TFGPTJForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1410) | def __init__(self, *args, **kwargs): class TFGPTJForSequenceClassification (line 1414) | class TFGPTJForSequenceClassification(metaclass=DummyObject): method __init__ (line 1417) | def __init__(self, *args, **kwargs): class TFGPTJModel (line 1421) | class TFGPTJModel(metaclass=DummyObject): method __init__ (line 1424) | def __init__(self, *args, **kwargs): class TFGPTJPreTrainedModel (line 1428) | class TFGPTJPreTrainedModel(metaclass=DummyObject): method __init__ (line 1431) | def __init__(self, *args, **kwargs): class TFGroupViTModel (line 1438) | class TFGroupViTModel(metaclass=DummyObject): method __init__ (line 1441) | def __init__(self, *args, **kwargs): class TFGroupViTPreTrainedModel (line 1445) | class TFGroupViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1448) | def __init__(self, *args, **kwargs): class TFGroupViTTextModel (line 1452) | class TFGroupViTTextModel(metaclass=DummyObject): method __init__ (line 1455) | def __init__(self, *args, **kwargs): class TFGroupViTVisionModel (line 1459) | class TFGroupViTVisionModel(metaclass=DummyObject): method __init__ (line 1462) | def __init__(self, *args, **kwargs): class TFHubertForCTC (line 1469) | class TFHubertForCTC(metaclass=DummyObject): method __init__ (line 1472) | def __init__(self, *args, **kwargs): class TFHubertModel (line 1476) | class TFHubertModel(metaclass=DummyObject): method __init__ (line 1479) | def __init__(self, *args, **kwargs): class TFHubertPreTrainedModel (line 1483) | class TFHubertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1486) | def __init__(self, *args, **kwargs): class TFLayoutLMForMaskedLM (line 1493) | class TFLayoutLMForMaskedLM(metaclass=DummyObject): method __init__ (line 1496) | def __init__(self, *args, **kwargs): class TFLayoutLMForQuestionAnswering (line 1500) | class TFLayoutLMForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1503) | def __init__(self, *args, **kwargs): class TFLayoutLMForSequenceClassification (line 1507) | class TFLayoutLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 1510) | def __init__(self, *args, **kwargs): class TFLayoutLMForTokenClassification (line 1514) | class TFLayoutLMForTokenClassification(metaclass=DummyObject): method __init__ (line 1517) | def __init__(self, *args, **kwargs): class TFLayoutLMMainLayer (line 1521) | class TFLayoutLMMainLayer(metaclass=DummyObject): method __init__ (line 1524) | def __init__(self, *args, **kwargs): class TFLayoutLMModel (line 1528) | class TFLayoutLMModel(metaclass=DummyObject): method __init__ (line 1531) | def __init__(self, *args, **kwargs): class TFLayoutLMPreTrainedModel (line 1535) | class TFLayoutLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 1538) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForQuestionAnswering (line 1545) | class TFLayoutLMv3ForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1548) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForSequenceClassification (line 1552) | class TFLayoutLMv3ForSequenceClassification(metaclass=DummyObject): method __init__ (line 1555) | def __init__(self, *args, **kwargs): class TFLayoutLMv3ForTokenClassification (line 1559) | class TFLayoutLMv3ForTokenClassification(metaclass=DummyObject): method __init__ (line 1562) | def __init__(self, *args, **kwargs): class TFLayoutLMv3Model (line 1566) | class TFLayoutLMv3Model(metaclass=DummyObject): method __init__ (line 1569) | def __init__(self, *args, **kwargs): class TFLayoutLMv3PreTrainedModel (line 1573) | class TFLayoutLMv3PreTrainedModel(metaclass=DummyObject): method __init__ (line 1576) | def __init__(self, *args, **kwargs): class TFLEDForConditionalGeneration (line 1580) | class TFLEDForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1583) | def __init__(self, *args, **kwargs): class TFLEDModel (line 1587) | class TFLEDModel(metaclass=DummyObject): method __init__ (line 1590) | def __init__(self, *args, **kwargs): class TFLEDPreTrainedModel (line 1594) | class TFLEDPreTrainedModel(metaclass=DummyObject): method __init__ (line 1597) | def __init__(self, *args, **kwargs): class TFLongformerForMaskedLM (line 1604) | class TFLongformerForMaskedLM(metaclass=DummyObject): method __init__ (line 1607) | def __init__(self, *args, **kwargs): class TFLongformerForMultipleChoice (line 1611) | class TFLongformerForMultipleChoice(metaclass=DummyObject): method __init__ (line 1614) | def __init__(self, *args, **kwargs): class TFLongformerForQuestionAnswering (line 1618) | class TFLongformerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1621) | def __init__(self, *args, **kwargs): class TFLongformerForSequenceClassification (line 1625) | class TFLongformerForSequenceClassification(metaclass=DummyObject): method __init__ (line 1628) | def __init__(self, *args, **kwargs): class TFLongformerForTokenClassification (line 1632) | class TFLongformerForTokenClassification(metaclass=DummyObject): method __init__ (line 1635) | def __init__(self, *args, **kwargs): class TFLongformerModel (line 1639) | class TFLongformerModel(metaclass=DummyObject): method __init__ (line 1642) | def __init__(self, *args, **kwargs): class TFLongformerPreTrainedModel (line 1646) | class TFLongformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 1649) | def __init__(self, *args, **kwargs): class TFLongformerSelfAttention (line 1653) | class TFLongformerSelfAttention(metaclass=DummyObject): method __init__ (line 1656) | def __init__(self, *args, **kwargs): class TFLxmertForPreTraining (line 1663) | class TFLxmertForPreTraining(metaclass=DummyObject): method __init__ (line 1666) | def __init__(self, *args, **kwargs): class TFLxmertMainLayer (line 1670) | class TFLxmertMainLayer(metaclass=DummyObject): method __init__ (line 1673) | def __init__(self, *args, **kwargs): class TFLxmertModel (line 1677) | class TFLxmertModel(metaclass=DummyObject): method __init__ (line 1680) | def __init__(self, *args, **kwargs): class TFLxmertPreTrainedModel (line 1684) | class TFLxmertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1687) | def __init__(self, *args, **kwargs): class TFLxmertVisualFeatureEncoder (line 1691) | class TFLxmertVisualFeatureEncoder(metaclass=DummyObject): method __init__ (line 1694) | def __init__(self, *args, **kwargs): class TFMarianModel (line 1698) | class TFMarianModel(metaclass=DummyObject): method __init__ (line 1701) | def __init__(self, *args, **kwargs): class TFMarianMTModel (line 1705) | class TFMarianMTModel(metaclass=DummyObject): method __init__ (line 1708) | def __init__(self, *args, **kwargs): class TFMarianPreTrainedModel (line 1712) | class TFMarianPreTrainedModel(metaclass=DummyObject): method __init__ (line 1715) | def __init__(self, *args, **kwargs): class TFMBartForConditionalGeneration (line 1719) | class TFMBartForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1722) | def __init__(self, *args, **kwargs): class TFMBartModel (line 1726) | class TFMBartModel(metaclass=DummyObject): method __init__ (line 1729) | def __init__(self, *args, **kwargs): class TFMBartPreTrainedModel (line 1733) | class TFMBartPreTrainedModel(metaclass=DummyObject): method __init__ (line 1736) | def __init__(self, *args, **kwargs): class TFMobileBertForMaskedLM (line 1743) | class TFMobileBertForMaskedLM(metaclass=DummyObject): method __init__ (line 1746) | def __init__(self, *args, **kwargs): class TFMobileBertForMultipleChoice (line 1750) | class TFMobileBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 1753) | def __init__(self, *args, **kwargs): class TFMobileBertForNextSentencePrediction (line 1757) | class TFMobileBertForNextSentencePrediction(metaclass=DummyObject): method __init__ (line 1760) | def __init__(self, *args, **kwargs): class TFMobileBertForPreTraining (line 1764) | class TFMobileBertForPreTraining(metaclass=DummyObject): method __init__ (line 1767) | def __init__(self, *args, **kwargs): class TFMobileBertForQuestionAnswering (line 1771) | class TFMobileBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1774) | def __init__(self, *args, **kwargs): class TFMobileBertForSequenceClassification (line 1778) | class TFMobileBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 1781) | def __init__(self, *args, **kwargs): class TFMobileBertForTokenClassification (line 1785) | class TFMobileBertForTokenClassification(metaclass=DummyObject): method __init__ (line 1788) | def __init__(self, *args, **kwargs): class TFMobileBertMainLayer (line 1792) | class TFMobileBertMainLayer(metaclass=DummyObject): method __init__ (line 1795) | def __init__(self, *args, **kwargs): class TFMobileBertModel (line 1799) | class TFMobileBertModel(metaclass=DummyObject): method __init__ (line 1802) | def __init__(self, *args, **kwargs): class TFMobileBertPreTrainedModel (line 1806) | class TFMobileBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 1809) | def __init__(self, *args, **kwargs): class TFMobileViTForImageClassification (line 1816) | class TFMobileViTForImageClassification(metaclass=DummyObject): method __init__ (line 1819) | def __init__(self, *args, **kwargs): class TFMobileViTForSemanticSegmentation (line 1823) | class TFMobileViTForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 1826) | def __init__(self, *args, **kwargs): class TFMobileViTModel (line 1830) | class TFMobileViTModel(metaclass=DummyObject): method __init__ (line 1833) | def __init__(self, *args, **kwargs): class TFMobileViTPreTrainedModel (line 1837) | class TFMobileViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1840) | def __init__(self, *args, **kwargs): class TFMPNetForMaskedLM (line 1847) | class TFMPNetForMaskedLM(metaclass=DummyObject): method __init__ (line 1850) | def __init__(self, *args, **kwargs): class TFMPNetForMultipleChoice (line 1854) | class TFMPNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 1857) | def __init__(self, *args, **kwargs): class TFMPNetForQuestionAnswering (line 1861) | class TFMPNetForQuestionAnswering(metaclass=DummyObject): method __init__ (line 1864) | def __init__(self, *args, **kwargs): class TFMPNetForSequenceClassification (line 1868) | class TFMPNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 1871) | def __init__(self, *args, **kwargs): class TFMPNetForTokenClassification (line 1875) | class TFMPNetForTokenClassification(metaclass=DummyObject): method __init__ (line 1878) | def __init__(self, *args, **kwargs): class TFMPNetMainLayer (line 1882) | class TFMPNetMainLayer(metaclass=DummyObject): method __init__ (line 1885) | def __init__(self, *args, **kwargs): class TFMPNetModel (line 1889) | class TFMPNetModel(metaclass=DummyObject): method __init__ (line 1892) | def __init__(self, *args, **kwargs): class TFMPNetPreTrainedModel (line 1896) | class TFMPNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 1899) | def __init__(self, *args, **kwargs): class TFMT5EncoderModel (line 1903) | class TFMT5EncoderModel(metaclass=DummyObject): method __init__ (line 1906) | def __init__(self, *args, **kwargs): class TFMT5ForConditionalGeneration (line 1910) | class TFMT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1913) | def __init__(self, *args, **kwargs): class TFMT5Model (line 1917) | class TFMT5Model(metaclass=DummyObject): method __init__ (line 1920) | def __init__(self, *args, **kwargs): class TFOpenAIGPTDoubleHeadsModel (line 1927) | class TFOpenAIGPTDoubleHeadsModel(metaclass=DummyObject): method __init__ (line 1930) | def __init__(self, *args, **kwargs): class TFOpenAIGPTForSequenceClassification (line 1934) | class TFOpenAIGPTForSequenceClassification(metaclass=DummyObject): method __init__ (line 1937) | def __init__(self, *args, **kwargs): class TFOpenAIGPTLMHeadModel (line 1941) | class TFOpenAIGPTLMHeadModel(metaclass=DummyObject): method __init__ (line 1944) | def __init__(self, *args, **kwargs): class TFOpenAIGPTMainLayer (line 1948) | class TFOpenAIGPTMainLayer(metaclass=DummyObject): method __init__ (line 1951) | def __init__(self, *args, **kwargs): class TFOpenAIGPTModel (line 1955) | class TFOpenAIGPTModel(metaclass=DummyObject): method __init__ (line 1958) | def __init__(self, *args, **kwargs): class TFOpenAIGPTPreTrainedModel (line 1962) | class TFOpenAIGPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1965) | def __init__(self, *args, **kwargs): class TFOPTForCausalLM (line 1969) | class TFOPTForCausalLM(metaclass=DummyObject): method __init__ (line 1972) | def __init__(self, *args, **kwargs): class TFOPTModel (line 1976) | class TFOPTModel(metaclass=DummyObject): method __init__ (line 1979) | def __init__(self, *args, **kwargs): class TFOPTPreTrainedModel (line 1983) | class TFOPTPreTrainedModel(metaclass=DummyObject): method __init__ (line 1986) | def __init__(self, *args, **kwargs): class TFPegasusForConditionalGeneration (line 1990) | class TFPegasusForConditionalGeneration(metaclass=DummyObject): method __init__ (line 1993) | def __init__(self, *args, **kwargs): class TFPegasusModel (line 1997) | class TFPegasusModel(metaclass=DummyObject): method __init__ (line 2000) | def __init__(self, *args, **kwargs): class TFPegasusPreTrainedModel (line 2004) | class TFPegasusPreTrainedModel(metaclass=DummyObject): method __init__ (line 2007) | def __init__(self, *args, **kwargs): class TFRagModel (line 2011) | class TFRagModel(metaclass=DummyObject): method __init__ (line 2014) | def __init__(self, *args, **kwargs): class TFRagPreTrainedModel (line 2018) | class TFRagPreTrainedModel(metaclass=DummyObject): method __init__ (line 2021) | def __init__(self, *args, **kwargs): class TFRagSequenceForGeneration (line 2025) | class TFRagSequenceForGeneration(metaclass=DummyObject): method __init__ (line 2028) | def __init__(self, *args, **kwargs): class TFRagTokenForGeneration (line 2032) | class TFRagTokenForGeneration(metaclass=DummyObject): method __init__ (line 2035) | def __init__(self, *args, **kwargs): class TFRegNetForImageClassification (line 2042) | class TFRegNetForImageClassification(metaclass=DummyObject): method __init__ (line 2045) | def __init__(self, *args, **kwargs): class TFRegNetModel (line 2049) | class TFRegNetModel(metaclass=DummyObject): method __init__ (line 2052) | def __init__(self, *args, **kwargs): class TFRegNetPreTrainedModel (line 2056) | class TFRegNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2059) | def __init__(self, *args, **kwargs): class TFRemBertForCausalLM (line 2066) | class TFRemBertForCausalLM(metaclass=DummyObject): method __init__ (line 2069) | def __init__(self, *args, **kwargs): class TFRemBertForMaskedLM (line 2073) | class TFRemBertForMaskedLM(metaclass=DummyObject): method __init__ (line 2076) | def __init__(self, *args, **kwargs): class TFRemBertForMultipleChoice (line 2080) | class TFRemBertForMultipleChoice(metaclass=DummyObject): method __init__ (line 2083) | def __init__(self, *args, **kwargs): class TFRemBertForQuestionAnswering (line 2087) | class TFRemBertForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2090) | def __init__(self, *args, **kwargs): class TFRemBertForSequenceClassification (line 2094) | class TFRemBertForSequenceClassification(metaclass=DummyObject): method __init__ (line 2097) | def __init__(self, *args, **kwargs): class TFRemBertForTokenClassification (line 2101) | class TFRemBertForTokenClassification(metaclass=DummyObject): method __init__ (line 2104) | def __init__(self, *args, **kwargs): class TFRemBertLayer (line 2108) | class TFRemBertLayer(metaclass=DummyObject): method __init__ (line 2111) | def __init__(self, *args, **kwargs): class TFRemBertModel (line 2115) | class TFRemBertModel(metaclass=DummyObject): method __init__ (line 2118) | def __init__(self, *args, **kwargs): class TFRemBertPreTrainedModel (line 2122) | class TFRemBertPreTrainedModel(metaclass=DummyObject): method __init__ (line 2125) | def __init__(self, *args, **kwargs): class TFResNetForImageClassification (line 2132) | class TFResNetForImageClassification(metaclass=DummyObject): method __init__ (line 2135) | def __init__(self, *args, **kwargs): class TFResNetModel (line 2139) | class TFResNetModel(metaclass=DummyObject): method __init__ (line 2142) | def __init__(self, *args, **kwargs): class TFResNetPreTrainedModel (line 2146) | class TFResNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2149) | def __init__(self, *args, **kwargs): class TFRobertaForCausalLM (line 2156) | class TFRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 2159) | def __init__(self, *args, **kwargs): class TFRobertaForMaskedLM (line 2163) | class TFRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2166) | def __init__(self, *args, **kwargs): class TFRobertaForMultipleChoice (line 2170) | class TFRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2173) | def __init__(self, *args, **kwargs): class TFRobertaForQuestionAnswering (line 2177) | class TFRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2180) | def __init__(self, *args, **kwargs): class TFRobertaForSequenceClassification (line 2184) | class TFRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2187) | def __init__(self, *args, **kwargs): class TFRobertaForTokenClassification (line 2191) | class TFRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2194) | def __init__(self, *args, **kwargs): class TFRobertaMainLayer (line 2198) | class TFRobertaMainLayer(metaclass=DummyObject): method __init__ (line 2201) | def __init__(self, *args, **kwargs): class TFRobertaModel (line 2205) | class TFRobertaModel(metaclass=DummyObject): method __init__ (line 2208) | def __init__(self, *args, **kwargs): class TFRobertaPreTrainedModel (line 2212) | class TFRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2215) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForCausalLM (line 2222) | class TFRobertaPreLayerNormForCausalLM(metaclass=DummyObject): method __init__ (line 2225) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForMaskedLM (line 2229) | class TFRobertaPreLayerNormForMaskedLM(metaclass=DummyObject): method __init__ (line 2232) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForMultipleChoice (line 2236) | class TFRobertaPreLayerNormForMultipleChoice(metaclass=DummyObject): method __init__ (line 2239) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForQuestionAnswering (line 2243) | class TFRobertaPreLayerNormForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2246) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForSequenceClassification (line 2250) | class TFRobertaPreLayerNormForSequenceClassification(metaclass=DummyObje... method __init__ (line 2253) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormForTokenClassification (line 2257) | class TFRobertaPreLayerNormForTokenClassification(metaclass=DummyObject): method __init__ (line 2260) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormMainLayer (line 2264) | class TFRobertaPreLayerNormMainLayer(metaclass=DummyObject): method __init__ (line 2267) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormModel (line 2271) | class TFRobertaPreLayerNormModel(metaclass=DummyObject): method __init__ (line 2274) | def __init__(self, *args, **kwargs): class TFRobertaPreLayerNormPreTrainedModel (line 2278) | class TFRobertaPreLayerNormPreTrainedModel(metaclass=DummyObject): method __init__ (line 2281) | def __init__(self, *args, **kwargs): class TFRoFormerForCausalLM (line 2288) | class TFRoFormerForCausalLM(metaclass=DummyObject): method __init__ (line 2291) | def __init__(self, *args, **kwargs): class TFRoFormerForMaskedLM (line 2295) | class TFRoFormerForMaskedLM(metaclass=DummyObject): method __init__ (line 2298) | def __init__(self, *args, **kwargs): class TFRoFormerForMultipleChoice (line 2302) | class TFRoFormerForMultipleChoice(metaclass=DummyObject): method __init__ (line 2305) | def __init__(self, *args, **kwargs): class TFRoFormerForQuestionAnswering (line 2309) | class TFRoFormerForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2312) | def __init__(self, *args, **kwargs): class TFRoFormerForSequenceClassification (line 2316) | class TFRoFormerForSequenceClassification(metaclass=DummyObject): method __init__ (line 2319) | def __init__(self, *args, **kwargs): class TFRoFormerForTokenClassification (line 2323) | class TFRoFormerForTokenClassification(metaclass=DummyObject): method __init__ (line 2326) | def __init__(self, *args, **kwargs): class TFRoFormerLayer (line 2330) | class TFRoFormerLayer(metaclass=DummyObject): method __init__ (line 2333) | def __init__(self, *args, **kwargs): class TFRoFormerModel (line 2337) | class TFRoFormerModel(metaclass=DummyObject): method __init__ (line 2340) | def __init__(self, *args, **kwargs): class TFRoFormerPreTrainedModel (line 2344) | class TFRoFormerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2347) | def __init__(self, *args, **kwargs): class TFSamModel (line 2354) | class TFSamModel(metaclass=DummyObject): method __init__ (line 2357) | def __init__(self, *args, **kwargs): class TFSamPreTrainedModel (line 2361) | class TFSamPreTrainedModel(metaclass=DummyObject): method __init__ (line 2364) | def __init__(self, *args, **kwargs): class TFSegformerDecodeHead (line 2371) | class TFSegformerDecodeHead(metaclass=DummyObject): method __init__ (line 2374) | def __init__(self, *args, **kwargs): class TFSegformerForImageClassification (line 2378) | class TFSegformerForImageClassification(metaclass=DummyObject): method __init__ (line 2381) | def __init__(self, *args, **kwargs): class TFSegformerForSemanticSegmentation (line 2385) | class TFSegformerForSemanticSegmentation(metaclass=DummyObject): method __init__ (line 2388) | def __init__(self, *args, **kwargs): class TFSegformerModel (line 2392) | class TFSegformerModel(metaclass=DummyObject): method __init__ (line 2395) | def __init__(self, *args, **kwargs): class TFSegformerPreTrainedModel (line 2399) | class TFSegformerPreTrainedModel(metaclass=DummyObject): method __init__ (line 2402) | def __init__(self, *args, **kwargs): class TFSpeech2TextForConditionalGeneration (line 2409) | class TFSpeech2TextForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2412) | def __init__(self, *args, **kwargs): class TFSpeech2TextModel (line 2416) | class TFSpeech2TextModel(metaclass=DummyObject): method __init__ (line 2419) | def __init__(self, *args, **kwargs): class TFSpeech2TextPreTrainedModel (line 2423) | class TFSpeech2TextPreTrainedModel(metaclass=DummyObject): method __init__ (line 2426) | def __init__(self, *args, **kwargs): class TFSwinForImageClassification (line 2433) | class TFSwinForImageClassification(metaclass=DummyObject): method __init__ (line 2436) | def __init__(self, *args, **kwargs): class TFSwinForMaskedImageModeling (line 2440) | class TFSwinForMaskedImageModeling(metaclass=DummyObject): method __init__ (line 2443) | def __init__(self, *args, **kwargs): class TFSwinModel (line 2447) | class TFSwinModel(metaclass=DummyObject): method __init__ (line 2450) | def __init__(self, *args, **kwargs): class TFSwinPreTrainedModel (line 2454) | class TFSwinPreTrainedModel(metaclass=DummyObject): method __init__ (line 2457) | def __init__(self, *args, **kwargs): class TFT5EncoderModel (line 2464) | class TFT5EncoderModel(metaclass=DummyObject): method __init__ (line 2467) | def __init__(self, *args, **kwargs): class TFT5ForConditionalGeneration (line 2471) | class TFT5ForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2474) | def __init__(self, *args, **kwargs): class TFT5Model (line 2478) | class TFT5Model(metaclass=DummyObject): method __init__ (line 2481) | def __init__(self, *args, **kwargs): class TFT5PreTrainedModel (line 2485) | class TFT5PreTrainedModel(metaclass=DummyObject): method __init__ (line 2488) | def __init__(self, *args, **kwargs): class TFTapasForMaskedLM (line 2495) | class TFTapasForMaskedLM(metaclass=DummyObject): method __init__ (line 2498) | def __init__(self, *args, **kwargs): class TFTapasForQuestionAnswering (line 2502) | class TFTapasForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2505) | def __init__(self, *args, **kwargs): class TFTapasForSequenceClassification (line 2509) | class TFTapasForSequenceClassification(metaclass=DummyObject): method __init__ (line 2512) | def __init__(self, *args, **kwargs): class TFTapasModel (line 2516) | class TFTapasModel(metaclass=DummyObject): method __init__ (line 2519) | def __init__(self, *args, **kwargs): class TFTapasPreTrainedModel (line 2523) | class TFTapasPreTrainedModel(metaclass=DummyObject): method __init__ (line 2526) | def __init__(self, *args, **kwargs): class TFAdaptiveEmbedding (line 2533) | class TFAdaptiveEmbedding(metaclass=DummyObject): method __init__ (line 2536) | def __init__(self, *args, **kwargs): class TFTransfoXLForSequenceClassification (line 2540) | class TFTransfoXLForSequenceClassification(metaclass=DummyObject): method __init__ (line 2543) | def __init__(self, *args, **kwargs): class TFTransfoXLLMHeadModel (line 2547) | class TFTransfoXLLMHeadModel(metaclass=DummyObject): method __init__ (line 2550) | def __init__(self, *args, **kwargs): class TFTransfoXLMainLayer (line 2554) | class TFTransfoXLMainLayer(metaclass=DummyObject): method __init__ (line 2557) | def __init__(self, *args, **kwargs): class TFTransfoXLModel (line 2561) | class TFTransfoXLModel(metaclass=DummyObject): method __init__ (line 2564) | def __init__(self, *args, **kwargs): class TFTransfoXLPreTrainedModel (line 2568) | class TFTransfoXLPreTrainedModel(metaclass=DummyObject): method __init__ (line 2571) | def __init__(self, *args, **kwargs): class TFVisionEncoderDecoderModel (line 2575) | class TFVisionEncoderDecoderModel(metaclass=DummyObject): method __init__ (line 2578) | def __init__(self, *args, **kwargs): class TFVisionTextDualEncoderModel (line 2582) | class TFVisionTextDualEncoderModel(metaclass=DummyObject): method __init__ (line 2585) | def __init__(self, *args, **kwargs): class TFViTForImageClassification (line 2589) | class TFViTForImageClassification(metaclass=DummyObject): method __init__ (line 2592) | def __init__(self, *args, **kwargs): class TFViTModel (line 2596) | class TFViTModel(metaclass=DummyObject): method __init__ (line 2599) | def __init__(self, *args, **kwargs): class TFViTPreTrainedModel (line 2603) | class TFViTPreTrainedModel(metaclass=DummyObject): method __init__ (line 2606) | def __init__(self, *args, **kwargs): class TFViTMAEForPreTraining (line 2610) | class TFViTMAEForPreTraining(metaclass=DummyObject): method __init__ (line 2613) | def __init__(self, *args, **kwargs): class TFViTMAEModel (line 2617) | class TFViTMAEModel(metaclass=DummyObject): method __init__ (line 2620) | def __init__(self, *args, **kwargs): class TFViTMAEPreTrainedModel (line 2624) | class TFViTMAEPreTrainedModel(metaclass=DummyObject): method __init__ (line 2627) | def __init__(self, *args, **kwargs): class TFWav2Vec2ForCTC (line 2634) | class TFWav2Vec2ForCTC(metaclass=DummyObject): method __init__ (line 2637) | def __init__(self, *args, **kwargs): class TFWav2Vec2ForSequenceClassification (line 2641) | class TFWav2Vec2ForSequenceClassification(metaclass=DummyObject): method __init__ (line 2644) | def __init__(self, *args, **kwargs): class TFWav2Vec2Model (line 2648) | class TFWav2Vec2Model(metaclass=DummyObject): method __init__ (line 2651) | def __init__(self, *args, **kwargs): class TFWav2Vec2PreTrainedModel (line 2655) | class TFWav2Vec2PreTrainedModel(metaclass=DummyObject): method __init__ (line 2658) | def __init__(self, *args, **kwargs): class TFWhisperForConditionalGeneration (line 2665) | class TFWhisperForConditionalGeneration(metaclass=DummyObject): method __init__ (line 2668) | def __init__(self, *args, **kwargs): class TFWhisperModel (line 2672) | class TFWhisperModel(metaclass=DummyObject): method __init__ (line 2675) | def __init__(self, *args, **kwargs): class TFWhisperPreTrainedModel (line 2679) | class TFWhisperPreTrainedModel(metaclass=DummyObject): method __init__ (line 2682) | def __init__(self, *args, **kwargs): class TFXGLMForCausalLM (line 2689) | class TFXGLMForCausalLM(metaclass=DummyObject): method __init__ (line 2692) | def __init__(self, *args, **kwargs): class TFXGLMModel (line 2696) | class TFXGLMModel(metaclass=DummyObject): method __init__ (line 2699) | def __init__(self, *args, **kwargs): class TFXGLMPreTrainedModel (line 2703) | class TFXGLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2706) | def __init__(self, *args, **kwargs): class TFXLMForMultipleChoice (line 2713) | class TFXLMForMultipleChoice(metaclass=DummyObject): method __init__ (line 2716) | def __init__(self, *args, **kwargs): class TFXLMForQuestionAnsweringSimple (line 2720) | class TFXLMForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2723) | def __init__(self, *args, **kwargs): class TFXLMForSequenceClassification (line 2727) | class TFXLMForSequenceClassification(metaclass=DummyObject): method __init__ (line 2730) | def __init__(self, *args, **kwargs): class TFXLMForTokenClassification (line 2734) | class TFXLMForTokenClassification(metaclass=DummyObject): method __init__ (line 2737) | def __init__(self, *args, **kwargs): class TFXLMMainLayer (line 2741) | class TFXLMMainLayer(metaclass=DummyObject): method __init__ (line 2744) | def __init__(self, *args, **kwargs): class TFXLMModel (line 2748) | class TFXLMModel(metaclass=DummyObject): method __init__ (line 2751) | def __init__(self, *args, **kwargs): class TFXLMPreTrainedModel (line 2755) | class TFXLMPreTrainedModel(metaclass=DummyObject): method __init__ (line 2758) | def __init__(self, *args, **kwargs): class TFXLMWithLMHeadModel (line 2762) | class TFXLMWithLMHeadModel(metaclass=DummyObject): method __init__ (line 2765) | def __init__(self, *args, **kwargs): class TFXLMRobertaForCausalLM (line 2772) | class TFXLMRobertaForCausalLM(metaclass=DummyObject): method __init__ (line 2775) | def __init__(self, *args, **kwargs): class TFXLMRobertaForMaskedLM (line 2779) | class TFXLMRobertaForMaskedLM(metaclass=DummyObject): method __init__ (line 2782) | def __init__(self, *args, **kwargs): class TFXLMRobertaForMultipleChoice (line 2786) | class TFXLMRobertaForMultipleChoice(metaclass=DummyObject): method __init__ (line 2789) | def __init__(self, *args, **kwargs): class TFXLMRobertaForQuestionAnswering (line 2793) | class TFXLMRobertaForQuestionAnswering(metaclass=DummyObject): method __init__ (line 2796) | def __init__(self, *args, **kwargs): class TFXLMRobertaForSequenceClassification (line 2800) | class TFXLMRobertaForSequenceClassification(metaclass=DummyObject): method __init__ (line 2803) | def __init__(self, *args, **kwargs): class TFXLMRobertaForTokenClassification (line 2807) | class TFXLMRobertaForTokenClassification(metaclass=DummyObject): method __init__ (line 2810) | def __init__(self, *args, **kwargs): class TFXLMRobertaModel (line 2814) | class TFXLMRobertaModel(metaclass=DummyObject): method __init__ (line 2817) | def __init__(self, *args, **kwargs): class TFXLMRobertaPreTrainedModel (line 2821) | class TFXLMRobertaPreTrainedModel(metaclass=DummyObject): method __init__ (line 2824) | def __init__(self, *args, **kwargs): class TFXLNetForMultipleChoice (line 2831) | class TFXLNetForMultipleChoice(metaclass=DummyObject): method __init__ (line 2834) | def __init__(self, *args, **kwargs): class TFXLNetForQuestionAnsweringSimple (line 2838) | class TFXLNetForQuestionAnsweringSimple(metaclass=DummyObject): method __init__ (line 2841) | def __init__(self, *args, **kwargs): class TFXLNetForSequenceClassification (line 2845) | class TFXLNetForSequenceClassification(metaclass=DummyObject): method __init__ (line 2848) | def __init__(self, *args, **kwargs): class TFXLNetForTokenClassification (line 2852) | class TFXLNetForTokenClassification(metaclass=DummyObject): method __init__ (line 2855) | def __init__(self, *args, **kwargs): class TFXLNetLMHeadModel (line 2859) | class TFXLNetLMHeadModel(metaclass=DummyObject): method __init__ (line 2862) | def __init__(self, *args, **kwargs): class TFXLNetMainLayer (line 2866) | class TFXLNetMainLayer(metaclass=DummyObject): method __init__ (line 2869) | def __init__(self, *args, **kwargs): class TFXLNetModel (line 2873) | class TFXLNetModel(metaclass=DummyObject): method __init__ (line 2876) | def __init__(self, *args, **kwargs): class TFXLNetPreTrainedModel (line 2880) | class TFXLNetPreTrainedModel(metaclass=DummyObject): method __init__ (line 2883) | def __init__(self, *args, **kwargs): class AdamWeightDecay (line 2887) | class AdamWeightDecay(metaclass=DummyObject): method __init__ (line 2890) | def __init__(self, *args, **kwargs): class GradientAccumulator (line 2894) | class GradientAccumulator(metaclass=DummyObject): method __init__ (line 2897) | def __init__(self, *args, **kwargs): class WarmUp (line 2901) | class WarmUp(metaclass=DummyObject): method __init__ (line 2904) | def __init__(self, *args, **kwargs): function create_optimizer (line 2908) | def create_optimizer(*args, **kwargs): class TFTrainer (line 2912) | class TFTrainer(metaclass=DummyObject): method __init__ (line 2915) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_tokenizers_objects.py class AlbertTokenizerFast (line 5) | class AlbertTokenizerFast(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class BartTokenizerFast (line 12) | class BartTokenizerFast(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class BarthezTokenizerFast (line 19) | class BarthezTokenizerFast(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class BertTokenizerFast (line 26) | class BertTokenizerFast(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class BigBirdTokenizerFast (line 33) | class BigBirdTokenizerFast(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class BlenderbotTokenizerFast (line 40) | class BlenderbotTokenizerFast(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class BlenderbotSmallTokenizerFast (line 47) | class BlenderbotSmallTokenizerFast(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class BloomTokenizerFast (line 54) | class BloomTokenizerFast(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class CamembertTokenizerFast (line 61) | class CamembertTokenizerFast(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class CLIPTokenizerFast (line 68) | class CLIPTokenizerFast(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class CodeGenTokenizerFast (line 75) | class CodeGenTokenizerFast(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class ConvBertTokenizerFast (line 82) | class ConvBertTokenizerFast(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class CpmTokenizerFast (line 89) | class CpmTokenizerFast(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class DebertaTokenizerFast (line 96) | class DebertaTokenizerFast(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class DebertaV2TokenizerFast (line 103) | class DebertaV2TokenizerFast(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class DistilBertTokenizerFast (line 110) | class DistilBertTokenizerFast(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class DPRContextEncoderTokenizerFast (line 117) | class DPRContextEncoderTokenizerFast(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class DPRQuestionEncoderTokenizerFast (line 124) | class DPRQuestionEncoderTokenizerFast(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class DPRReaderTokenizerFast (line 131) | class DPRReaderTokenizerFast(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class ElectraTokenizerFast (line 138) | class ElectraTokenizerFast(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class FNetTokenizerFast (line 145) | class FNetTokenizerFast(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class FunnelTokenizerFast (line 152) | class FunnelTokenizerFast(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class GPT2TokenizerFast (line 159) | class GPT2TokenizerFast(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class GPTNeoXTokenizerFast (line 166) | class GPTNeoXTokenizerFast(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class GPTNeoXJapaneseTokenizer (line 173) | class GPTNeoXJapaneseTokenizer(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class HerbertTokenizerFast (line 180) | class HerbertTokenizerFast(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class LayoutLMTokenizerFast (line 187) | class LayoutLMTokenizerFast(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class LayoutLMv2TokenizerFast (line 194) | class LayoutLMv2TokenizerFast(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class LayoutLMv3TokenizerFast (line 201) | class LayoutLMv3TokenizerFast(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class LayoutXLMTokenizerFast (line 208) | class LayoutXLMTokenizerFast(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class LEDTokenizerFast (line 215) | class LEDTokenizerFast(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class LlamaTokenizerFast (line 222) | class LlamaTokenizerFast(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class LongformerTokenizerFast (line 229) | class LongformerTokenizerFast(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class LxmertTokenizerFast (line 236) | class LxmertTokenizerFast(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class MarkupLMTokenizerFast (line 243) | class MarkupLMTokenizerFast(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class MBartTokenizerFast (line 250) | class MBartTokenizerFast(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class MBart50TokenizerFast (line 257) | class MBart50TokenizerFast(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class MobileBertTokenizerFast (line 264) | class MobileBertTokenizerFast(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class MPNetTokenizerFast (line 271) | class MPNetTokenizerFast(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class MT5TokenizerFast (line 278) | class MT5TokenizerFast(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): class MvpTokenizerFast (line 285) | class MvpTokenizerFast(metaclass=DummyObject): method __init__ (line 288) | def __init__(self, *args, **kwargs): class NllbTokenizerFast (line 292) | class NllbTokenizerFast(metaclass=DummyObject): method __init__ (line 295) | def __init__(self, *args, **kwargs): class OpenAIGPTTokenizerFast (line 299) | class OpenAIGPTTokenizerFast(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class PegasusTokenizerFast (line 306) | class PegasusTokenizerFast(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class RealmTokenizerFast (line 313) | class RealmTokenizerFast(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class ReformerTokenizerFast (line 320) | class ReformerTokenizerFast(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class RemBertTokenizerFast (line 327) | class RemBertTokenizerFast(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class RetriBertTokenizerFast (line 334) | class RetriBertTokenizerFast(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class RobertaTokenizerFast (line 341) | class RobertaTokenizerFast(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class RoFormerTokenizerFast (line 348) | class RoFormerTokenizerFast(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class SplinterTokenizerFast (line 355) | class SplinterTokenizerFast(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class SqueezeBertTokenizerFast (line 362) | class SqueezeBertTokenizerFast(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class T5TokenizerFast (line 369) | class T5TokenizerFast(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class WhisperTokenizerFast (line 376) | class WhisperTokenizerFast(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class XGLMTokenizerFast (line 383) | class XGLMTokenizerFast(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class XLMRobertaTokenizerFast (line 390) | class XLMRobertaTokenizerFast(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class XLNetTokenizerFast (line 397) | class XLNetTokenizerFast(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class PreTrainedTokenizerFast (line 404) | class PreTrainedTokenizerFast(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): FILE: transformers/utils/dummy_vision_objects.py class ImageProcessingMixin (line 5) | class ImageProcessingMixin(metaclass=DummyObject): method __init__ (line 8) | def __init__(self, *args, **kwargs): class ImageFeatureExtractionMixin (line 12) | class ImageFeatureExtractionMixin(metaclass=DummyObject): method __init__ (line 15) | def __init__(self, *args, **kwargs): class BeitFeatureExtractor (line 19) | class BeitFeatureExtractor(metaclass=DummyObject): method __init__ (line 22) | def __init__(self, *args, **kwargs): class BeitImageProcessor (line 26) | class BeitImageProcessor(metaclass=DummyObject): method __init__ (line 29) | def __init__(self, *args, **kwargs): class BitImageProcessor (line 33) | class BitImageProcessor(metaclass=DummyObject): method __init__ (line 36) | def __init__(self, *args, **kwargs): class BlipImageProcessor (line 40) | class BlipImageProcessor(metaclass=DummyObject): method __init__ (line 43) | def __init__(self, *args, **kwargs): class BridgeTowerImageProcessor (line 47) | class BridgeTowerImageProcessor(metaclass=DummyObject): method __init__ (line 50) | def __init__(self, *args, **kwargs): class ChineseCLIPFeatureExtractor (line 54) | class ChineseCLIPFeatureExtractor(metaclass=DummyObject): method __init__ (line 57) | def __init__(self, *args, **kwargs): class ChineseCLIPImageProcessor (line 61) | class ChineseCLIPImageProcessor(metaclass=DummyObject): method __init__ (line 64) | def __init__(self, *args, **kwargs): class CLIPFeatureExtractor (line 68) | class CLIPFeatureExtractor(metaclass=DummyObject): method __init__ (line 71) | def __init__(self, *args, **kwargs): class CLIPImageProcessor (line 75) | class CLIPImageProcessor(metaclass=DummyObject): method __init__ (line 78) | def __init__(self, *args, **kwargs): class ConditionalDetrFeatureExtractor (line 82) | class ConditionalDetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 85) | def __init__(self, *args, **kwargs): class ConditionalDetrImageProcessor (line 89) | class ConditionalDetrImageProcessor(metaclass=DummyObject): method __init__ (line 92) | def __init__(self, *args, **kwargs): class ConvNextFeatureExtractor (line 96) | class ConvNextFeatureExtractor(metaclass=DummyObject): method __init__ (line 99) | def __init__(self, *args, **kwargs): class ConvNextImageProcessor (line 103) | class ConvNextImageProcessor(metaclass=DummyObject): method __init__ (line 106) | def __init__(self, *args, **kwargs): class DeformableDetrFeatureExtractor (line 110) | class DeformableDetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 113) | def __init__(self, *args, **kwargs): class DeformableDetrImageProcessor (line 117) | class DeformableDetrImageProcessor(metaclass=DummyObject): method __init__ (line 120) | def __init__(self, *args, **kwargs): class DeiTFeatureExtractor (line 124) | class DeiTFeatureExtractor(metaclass=DummyObject): method __init__ (line 127) | def __init__(self, *args, **kwargs): class DeiTImageProcessor (line 131) | class DeiTImageProcessor(metaclass=DummyObject): method __init__ (line 134) | def __init__(self, *args, **kwargs): class DetaImageProcessor (line 138) | class DetaImageProcessor(metaclass=DummyObject): method __init__ (line 141) | def __init__(self, *args, **kwargs): class DetrFeatureExtractor (line 145) | class DetrFeatureExtractor(metaclass=DummyObject): method __init__ (line 148) | def __init__(self, *args, **kwargs): class DetrImageProcessor (line 152) | class DetrImageProcessor(metaclass=DummyObject): method __init__ (line 155) | def __init__(self, *args, **kwargs): class DonutFeatureExtractor (line 159) | class DonutFeatureExtractor(metaclass=DummyObject): method __init__ (line 162) | def __init__(self, *args, **kwargs): class DonutImageProcessor (line 166) | class DonutImageProcessor(metaclass=DummyObject): method __init__ (line 169) | def __init__(self, *args, **kwargs): class DPTFeatureExtractor (line 173) | class DPTFeatureExtractor(metaclass=DummyObject): method __init__ (line 176) | def __init__(self, *args, **kwargs): class DPTImageProcessor (line 180) | class DPTImageProcessor(metaclass=DummyObject): method __init__ (line 183) | def __init__(self, *args, **kwargs): class EfficientFormerImageProcessor (line 187) | class EfficientFormerImageProcessor(metaclass=DummyObject): method __init__ (line 190) | def __init__(self, *args, **kwargs): class EfficientNetImageProcessor (line 194) | class EfficientNetImageProcessor(metaclass=DummyObject): method __init__ (line 197) | def __init__(self, *args, **kwargs): class FlavaFeatureExtractor (line 201) | class FlavaFeatureExtractor(metaclass=DummyObject): method __init__ (line 204) | def __init__(self, *args, **kwargs): class FlavaImageProcessor (line 208) | class FlavaImageProcessor(metaclass=DummyObject): method __init__ (line 211) | def __init__(self, *args, **kwargs): class FlavaProcessor (line 215) | class FlavaProcessor(metaclass=DummyObject): method __init__ (line 218) | def __init__(self, *args, **kwargs): class GLPNFeatureExtractor (line 222) | class GLPNFeatureExtractor(metaclass=DummyObject): method __init__ (line 225) | def __init__(self, *args, **kwargs): class GLPNImageProcessor (line 229) | class GLPNImageProcessor(metaclass=DummyObject): method __init__ (line 232) | def __init__(self, *args, **kwargs): class ImageGPTFeatureExtractor (line 236) | class ImageGPTFeatureExtractor(metaclass=DummyObject): method __init__ (line 239) | def __init__(self, *args, **kwargs): class ImageGPTImageProcessor (line 243) | class ImageGPTImageProcessor(metaclass=DummyObject): method __init__ (line 246) | def __init__(self, *args, **kwargs): class LayoutLMv2FeatureExtractor (line 250) | class LayoutLMv2FeatureExtractor(metaclass=DummyObject): method __init__ (line 253) | def __init__(self, *args, **kwargs): class LayoutLMv2ImageProcessor (line 257) | class LayoutLMv2ImageProcessor(metaclass=DummyObject): method __init__ (line 260) | def __init__(self, *args, **kwargs): class LayoutLMv3FeatureExtractor (line 264) | class LayoutLMv3FeatureExtractor(metaclass=DummyObject): method __init__ (line 267) | def __init__(self, *args, **kwargs): class LayoutLMv3ImageProcessor (line 271) | class LayoutLMv3ImageProcessor(metaclass=DummyObject): method __init__ (line 274) | def __init__(self, *args, **kwargs): class LevitFeatureExtractor (line 278) | class LevitFeatureExtractor(metaclass=DummyObject): method __init__ (line 281) | def __init__(self, *args, **kwargs): class LevitImageProcessor (line 285) | class LevitImageProcessor(metaclass=DummyObject): method __init__ (line 288) | def __init__(self, *args, **kwargs): class Mask2FormerImageProcessor (line 292) | class Mask2FormerImageProcessor(metaclass=DummyObject): method __init__ (line 295) | def __init__(self, *args, **kwargs): class MaskFormerFeatureExtractor (line 299) | class MaskFormerFeatureExtractor(metaclass=DummyObject): method __init__ (line 302) | def __init__(self, *args, **kwargs): class MaskFormerImageProcessor (line 306) | class MaskFormerImageProcessor(metaclass=DummyObject): method __init__ (line 309) | def __init__(self, *args, **kwargs): class MobileNetV1FeatureExtractor (line 313) | class MobileNetV1FeatureExtractor(metaclass=DummyObject): method __init__ (line 316) | def __init__(self, *args, **kwargs): class MobileNetV1ImageProcessor (line 320) | class MobileNetV1ImageProcessor(metaclass=DummyObject): method __init__ (line 323) | def __init__(self, *args, **kwargs): class MobileNetV2FeatureExtractor (line 327) | class MobileNetV2FeatureExtractor(metaclass=DummyObject): method __init__ (line 330) | def __init__(self, *args, **kwargs): class MobileNetV2ImageProcessor (line 334) | class MobileNetV2ImageProcessor(metaclass=DummyObject): method __init__ (line 337) | def __init__(self, *args, **kwargs): class MobileViTFeatureExtractor (line 341) | class MobileViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 344) | def __init__(self, *args, **kwargs): class MobileViTImageProcessor (line 348) | class MobileViTImageProcessor(metaclass=DummyObject): method __init__ (line 351) | def __init__(self, *args, **kwargs): class OneFormerImageProcessor (line 355) | class OneFormerImageProcessor(metaclass=DummyObject): method __init__ (line 358) | def __init__(self, *args, **kwargs): class OwlViTFeatureExtractor (line 362) | class OwlViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 365) | def __init__(self, *args, **kwargs): class OwlViTImageProcessor (line 369) | class OwlViTImageProcessor(metaclass=DummyObject): method __init__ (line 372) | def __init__(self, *args, **kwargs): class PerceiverFeatureExtractor (line 376) | class PerceiverFeatureExtractor(metaclass=DummyObject): method __init__ (line 379) | def __init__(self, *args, **kwargs): class PerceiverImageProcessor (line 383) | class PerceiverImageProcessor(metaclass=DummyObject): method __init__ (line 386) | def __init__(self, *args, **kwargs): class Pix2StructImageProcessor (line 390) | class Pix2StructImageProcessor(metaclass=DummyObject): method __init__ (line 393) | def __init__(self, *args, **kwargs): class PoolFormerFeatureExtractor (line 397) | class PoolFormerFeatureExtractor(metaclass=DummyObject): method __init__ (line 400) | def __init__(self, *args, **kwargs): class PoolFormerImageProcessor (line 404) | class PoolFormerImageProcessor(metaclass=DummyObject): method __init__ (line 407) | def __init__(self, *args, **kwargs): class SamImageProcessor (line 411) | class SamImageProcessor(metaclass=DummyObject): method __init__ (line 414) | def __init__(self, *args, **kwargs): class SegformerFeatureExtractor (line 418) | class SegformerFeatureExtractor(metaclass=DummyObject): method __init__ (line 421) | def __init__(self, *args, **kwargs): class SegformerImageProcessor (line 425) | class SegformerImageProcessor(metaclass=DummyObject): method __init__ (line 428) | def __init__(self, *args, **kwargs): class Swin2SRImageProcessor (line 432) | class Swin2SRImageProcessor(metaclass=DummyObject): method __init__ (line 435) | def __init__(self, *args, **kwargs): class TvltImageProcessor (line 439) | class TvltImageProcessor(metaclass=DummyObject): method __init__ (line 442) | def __init__(self, *args, **kwargs): class VideoMAEFeatureExtractor (line 446) | class VideoMAEFeatureExtractor(metaclass=DummyObject): method __init__ (line 449) | def __init__(self, *args, **kwargs): class VideoMAEImageProcessor (line 453) | class VideoMAEImageProcessor(metaclass=DummyObject): method __init__ (line 456) | def __init__(self, *args, **kwargs): class ViltFeatureExtractor (line 460) | class ViltFeatureExtractor(metaclass=DummyObject): method __init__ (line 463) | def __init__(self, *args, **kwargs): class ViltImageProcessor (line 467) | class ViltImageProcessor(metaclass=DummyObject): method __init__ (line 470) | def __init__(self, *args, **kwargs): class ViltProcessor (line 474) | class ViltProcessor(metaclass=DummyObject): method __init__ (line 477) | def __init__(self, *args, **kwargs): class ViTFeatureExtractor (line 481) | class ViTFeatureExtractor(metaclass=DummyObject): method __init__ (line 484) | def __init__(self, *args, **kwargs): class ViTImageProcessor (line 488) | class ViTImageProcessor(metaclass=DummyObject): method __init__ (line 491) | def __init__(self, *args, **kwargs): class ViTHybridImageProcessor (line 495) | class ViTHybridImageProcessor(metaclass=DummyObject): method __init__ (line 498) | def __init__(self, *args, **kwargs): class YolosFeatureExtractor (line 502) | class YolosFeatureExtractor(metaclass=DummyObject): method __init__ (line 505) | def __init__(self, *args, **kwargs): class YolosImageProcessor (line 509) | class YolosImageProcessor(metaclass=DummyObject): method __init__ (line 512) | def __init__(self, *args, **kwargs): FILE: transformers/utils/fx.py function _generate_supported_model_class_names (line 73) | def _generate_supported_model_class_names( function torch_nn_embedding (line 184) | def torch_nn_embedding(self, input): function torch_nn_functional_embedding (line 188) | def torch_nn_functional_embedding( function torch_nn_layernorm (line 194) | def torch_nn_layernorm(self, input): function torch_nn_groupnorm (line 198) | def torch_nn_groupnorm(self, input): function torch_nn_linear (line 202) | def torch_nn_linear(self, input): function torch_relu (line 206) | def torch_relu(x): function torch_nn_relu (line 210) | def torch_nn_relu(self, x): function torch_nn_functional_relu (line 214) | def torch_nn_functional_relu(x, inplace=False): function torch_where (line 220) | def torch_where(condition, x, y): function torch_abs (line 226) | def torch_abs(input, *, out=None): function torch_arange (line 232) | def torch_arange(*args, **kwargs): function torch_full (line 253) | def torch_full(*args, **kwargs): function torch_cat (line 262) | def torch_cat(tensors, dim=None, axis=None, *, out=None): function torch_stack (line 276) | def torch_stack(tensors, dim=None, axis=None, *, out=None): function torch_add (line 288) | def torch_add(input, other, *, alpha=1, out=None): function torch_mul (line 302) | def torch_mul(input, other, *, out=None): function torch_tensor_mul (line 306) | def torch_tensor_mul(self, other): function torch_matmul (line 310) | def torch_matmul(input, other, *, out=None): function torch_bmm (line 346) | def torch_bmm(input, mat2, *, out=None): function torch_baddbmm (line 354) | def torch_baddbmm(input, batch1, batch2, *, beta=1, alpha=1, out=None): function torch_tensor_baddbmm (line 360) | def torch_tensor_baddbmm(self, batch1, batch2, *, beta=1, alpha=1, out=N... function torch_einsum (line 364) | def torch_einsum(equation, *operands): function torch_tensor_repeat (line 370) | def torch_tensor_repeat(self, *sizes): function torch_repeat_interleave (line 377) | def torch_repeat_interleave(*args, dim=None, output_size=None): function torch_index_select (line 397) | def torch_index_select(input, dim, index, *, out=None): function torch_tensor_index_select (line 403) | def torch_tensor_index_select(self, dim, index): function torch_gather (line 407) | def torch_gather(input, dim, index, *, sparse_grad=False, out=None): function torch_tensor_gather (line 413) | def torch_tensor_gather(self, dim, index): function torch_roll (line 417) | def torch_roll(input, shifts, dims=None): function torch_flip (line 421) | def torch_flip(input, dims): function torch_tensor_flip (line 425) | def torch_tensor_flip(self, dims): function torch_nn_conv1d (line 429) | def torch_nn_conv1d(self, input): function torch_nn_conv2d (line 447) | def torch_nn_conv2d(self, input): function torch_squeeze (line 468) | def torch_squeeze(input, dim=None): function torch_tensor_squeeze (line 485) | def torch_tensor_squeeze(self, dim=None): function torch_unsqueeze (line 489) | def torch_unsqueeze(input, dim): function torch_tensor_unsqueeze (line 497) | def torch_tensor_unsqueeze(self, dim): function torch_unique_consecutive (line 501) | def torch_unique_consecutive(input, **kwargs): function torch_nn_functional_one_hot (line 509) | def torch_nn_functional_one_hot(tensor, num_classes=-1): function torch_nn_mseloss (line 516) | def torch_nn_mseloss(self, input, target): function torch_nn_crossentropyloss (line 524) | def torch_nn_crossentropyloss(self, input, target): function torch_nn_bcewithlogitsloss (line 532) | def torch_nn_bcewithlogitsloss(self, input, target): function operator_getitem (line 540) | def operator_getitem(a, b): class HFProxy (line 606) | class HFProxy(Proxy): method install_metadata (line 611) | def install_metadata(self, metadata): method shape (line 615) | def shape(self): method device (line 619) | def device(self): method __len__ (line 624) | def __len__(self): method __bool__ (line 629) | def __bool__(self): method __getattr__ (line 634) | def __getattr__(self, k): method __setitem__ (line 641) | def __setitem__(self, indices, values): method __contains__ (line 644) | def __contains__(self, key): class HFAttribute (line 650) | class HFAttribute(HFProxy): method __init__ (line 651) | def __init__(self, root, attr: str): method node (line 661) | def node(self): method __call__ (line 668) | def __call__(self, *args, **kwargs): class MetaDeviceAttribute (line 672) | class MetaDeviceAttribute(HFAttribute): function _proxies_to_metas (line 676) | def _proxies_to_metas(v): function _gen_constructor_wrapper (line 687) | def _gen_constructor_wrapper(target): function _generate_random_int (line 708) | def _generate_random_int(low: int = 10, high: int = 20, forbidden_values... class HFTracer (line 717) | class HFTracer(Tracer): method __init__ (line 740) | def __init__(self, autowrap_modules=(math,), autowrap_functions=()): method _generate_dummy_input (line 749) | def _generate_dummy_input( method create_proxy (line 876) | def create_proxy(self, kind, target, args, kwargs, name=None, type_exp... method _module_getattr (line 944) | def _module_getattr(self, attr, attr_val, parameter_proxy_cache): method getattr (line 982) | def getattr(self, attr: str, attr_val: Any, parameter_proxy_cache: Dic... method call_module (line 985) | def call_module(self, m, forward, args, kwargs): method proxy (line 989) | def proxy(self, node): method trace (line 992) | def trace( method _stateless_mod_instanciation_depends_on_proxies (line 1122) | def _stateless_mod_instanciation_depends_on_proxies(self, mod: nn.Modu... method _insert_module_as_submodule (line 1129) | def _insert_module_as_submodule(self, mod: nn.Module) -> str: method path_of_module (line 1153) | def path_of_module(self, mod: nn.Module) -> str: method is_leaf_module (line 1170) | def is_leaf_module(self, m: torch.nn.Module, module_qualified_name: st... method keys (line 1176) | def keys(self, obj: "Proxy") -> Any: function get_concrete_args (line 1187) | def get_concrete_args(model: nn.Module, input_names: List[str]): function check_if_model_is_supported (line 1201) | def check_if_model_is_supported(model: PreTrainedModel): function symbolic_trace (line 1209) | def symbolic_trace( FILE: transformers/utils/generic.py class cached_property (line 36) | class cached_property(property): method __get__ (line 45) | def __get__(self, obj, objtype=None): function strtobool (line 60) | def strtobool(val): function is_tensor (line 74) | def is_tensor(x): function _is_numpy (line 101) | def _is_numpy(x): function is_numpy_array (line 105) | def is_numpy_array(x): function _is_torch (line 112) | def _is_torch(x): function is_torch_tensor (line 118) | def is_torch_tensor(x): function _is_torch_device (line 125) | def _is_torch_device(x): function is_torch_device (line 131) | def is_torch_device(x): function _is_torch_dtype (line 138) | def _is_torch_dtype(x): function is_torch_dtype (line 149) | def is_torch_dtype(x): function _is_tensorflow (line 156) | def _is_tensorflow(x): function is_tf_tensor (line 162) | def is_tf_tensor(x): function _is_tf_symbolic_tensor (line 169) | def _is_tf_symbolic_tensor(x): function is_tf_symbolic_tensor (line 178) | def is_tf_symbolic_tensor(x): function _is_jax (line 186) | def _is_jax(x): function is_jax_tensor (line 192) | def is_jax_tensor(x): function to_py_obj (line 199) | def to_py_obj(obj): function to_numpy (line 219) | def to_numpy(obj): class ModelOutput (line 237) | class ModelOutput(OrderedDict): method __post_init__ (line 251) | def __post_init__(self): method __delitem__ (line 303) | def __delitem__(self, *args, **kwargs): method setdefault (line 306) | def setdefault(self, *args, **kwargs): method pop (line 309) | def pop(self, *args, **kwargs): method update (line 312) | def update(self, *args, **kwargs): method __getitem__ (line 315) | def __getitem__(self, k): method __setattr__ (line 322) | def __setattr__(self, name, value): method __setitem__ (line 328) | def __setitem__(self, key, value): method to_tuple (line 334) | def to_tuple(self) -> Tuple[Any]: class ExplicitEnum (line 341) | class ExplicitEnum(str, Enum): method _missing_ (line 347) | def _missing_(cls, value): class PaddingStrategy (line 353) | class PaddingStrategy(ExplicitEnum): class TensorType (line 364) | class TensorType(ExplicitEnum): class ContextManagers (line 376) | class ContextManagers: method __init__ (line 382) | def __init__(self, context_managers: List[ContextManager]): method __enter__ (line 386) | def __enter__(self): method __exit__ (line 390) | def __exit__(self, *args, **kwargs): function can_return_loss (line 394) | def can_return_loss(model_class): function find_labels (line 416) | def find_labels(model_class): function flatten_dict (line 438) | def flatten_dict(d: MutableMapping, parent_key: str = "", delimiter: str... function working_or_temp_dir (line 453) | def working_or_temp_dir(working_dir, use_temp_dir: bool = False): function transpose (line 461) | def transpose(array, axes=None): function reshape (line 480) | def reshape(array, newshape): function squeeze (line 499) | def squeeze(array, axis=None): function expand_dims (line 518) | def expand_dims(array, axis): function tensor_size (line 537) | def tensor_size(array): function add_model_info_to_auto_map (line 555) | def add_model_info_to_auto_map(auto_map, repo_id): function infer_framework (line 568) | def infer_framework(model_class): FILE: transformers/utils/hp_naming.py class TrialShortNamer (line 19) | class TrialShortNamer: method set_defaults (line 25) | def set_defaults(cls, prefix, defaults): method shortname_for_word (line 31) | def shortname_for_word(info, word): method shortname_for_key (line 70) | def shortname_for_key(info, param_name): method add_new_param_name (line 89) | def add_new_param_name(info, param_name): method build_naming_info (line 95) | def build_naming_info(cls): method shortname (line 114) | def shortname(cls, params): method parse_repr (line 138) | def parse_repr(cls, repr): FILE: transformers/utils/hub.py function is_offline_mode (line 70) | def is_offline_mode(): function is_remote_url (line 130) | def is_remote_url(url_or_filename): function get_cached_models (line 135) | def get_cached_models(cache_dir: Union[str, Path] = None) -> List[Tuple]: function define_sagemaker_information (line 170) | def define_sagemaker_information(): function http_user_agent (line 196) | def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str: function extract_commit_hash (line 219) | def extract_commit_hash(resolved_file: Optional[str], commit_hash: Optio... function try_to_load_from_cache (line 233) | def try_to_load_from_cache( function cached_file (line 300) | def cached_file( function get_file_from_repo (line 480) | def get_file_from_repo( function download_url (line 561) | def download_url(url, proxies=None): function has_file (line 587) | def has_file( class PushToHubMixin (line 628) | class PushToHubMixin: method _create_repo (line 633) | def _create_repo( method _get_files_timestamps (line 668) | def _get_files_timestamps(self, working_dir: Union[str, os.PathLike]): method _upload_modified_files (line 674) | def _upload_modified_files( method push_to_hub (line 733) | def push_to_hub( function get_full_repo_name (line 826) | def get_full_repo_name(model_id: str, organization: Optional[str] = None... function send_example_telemetry (line 834) | def send_example_telemetry(example_name, *example_args, framework="pytor... function convert_file_size_to_int (line 872) | def convert_file_size_to_int(size: Union[int, str]): function get_checkpoint_shard_files (line 905) | def get_checkpoint_shard_files( function get_all_cached_files (line 993) | def get_all_cached_files(cache_dir=None): function extract_info_from_url (line 1019) | def extract_info_from_url(url): function clean_files_for (line 1031) | def clean_files_for(file): function move_to_new_cache (line 1040) | def move_to_new_cache(file, repo, filename, revision, etag, commit_hash): function move_cache (line 1066) | def move_cache(cache_dir=None, new_cache_dir=None, token=None): FILE: transformers/utils/import_utils.py function _is_package_available (line 41) | def _is_package_available(pkg_name: str, return_version: bool = False) -... function is_kenlm_available (line 218) | def is_kenlm_available(): function is_torch_available (line 222) | def is_torch_available(): function get_torch_version (line 226) | def get_torch_version(): function is_torchvision_available (line 230) | def is_torchvision_available(): function is_pyctcdecode_available (line 234) | def is_pyctcdecode_available(): function is_librosa_available (line 238) | def is_librosa_available(): function is_torch_cuda_available (line 242) | def is_torch_cuda_available(): function is_torch_bf16_gpu_available (line 251) | def is_torch_bf16_gpu_available(): function is_torch_bf16_cpu_available (line 283) | def is_torch_bf16_cpu_available(): function is_torch_bf16_available (line 301) | def is_torch_bf16_available(): function is_torch_tf32_available (line 312) | def is_torch_tf32_available(): function is_torch_fx_available (line 330) | def is_torch_fx_available(): function is_peft_available (line 334) | def is_peft_available(): function is_bs4_available (line 338) | def is_bs4_available(): function is_tf_available (line 342) | def is_tf_available(): function is_coloredlogs_available (line 346) | def is_coloredlogs_available(): function is_tf2onnx_available (line 350) | def is_tf2onnx_available(): function is_onnx_available (line 354) | def is_onnx_available(): function is_openai_available (line 358) | def is_openai_available(): function is_flax_available (line 362) | def is_flax_available(): function is_ftfy_available (line 366) | def is_ftfy_available(): function is_torch_tpu_available (line 371) | def is_torch_tpu_available(check_device=True): function is_torch_neuroncore_available (line 390) | def is_torch_neuroncore_available(check_device=True): function is_torchdynamo_available (line 396) | def is_torchdynamo_available(): function is_torch_compile_available (line 407) | def is_torch_compile_available(): function is_torch_tensorrt_fx_available (line 418) | def is_torch_tensorrt_fx_available(): function is_datasets_available (line 424) | def is_datasets_available(): function is_detectron2_available (line 428) | def is_detectron2_available(): function is_rjieba_available (line 432) | def is_rjieba_available(): function is_psutil_available (line 436) | def is_psutil_available(): function is_py3nvml_available (line 440) | def is_py3nvml_available(): function is_sacremoses_available (line 444) | def is_sacremoses_available(): function is_apex_available (line 448) | def is_apex_available(): function is_ninja_available (line 452) | def is_ninja_available(): function is_ipex_available (line 465) | def is_ipex_available(): function is_bitsandbytes_available (line 483) | def is_bitsandbytes_available(): function is_torchdistx_available (line 487) | def is_torchdistx_available(): function is_faiss_available (line 491) | def is_faiss_available(): function is_scipy_available (line 495) | def is_scipy_available(): function is_sklearn_available (line 499) | def is_sklearn_available(): function is_sentencepiece_available (line 503) | def is_sentencepiece_available(): function is_protobuf_available (line 507) | def is_protobuf_available(): function is_accelerate_available (line 513) | def is_accelerate_available(min_version: str = None): function is_optimum_available (line 519) | def is_optimum_available(): function is_optimum_neuron_available (line 523) | def is_optimum_neuron_available(): function is_safetensors_available (line 527) | def is_safetensors_available(): function is_tokenizers_available (line 533) | def is_tokenizers_available(): function is_vision_available (line 537) | def is_vision_available(): function is_pytesseract_available (line 548) | def is_pytesseract_available(): function is_spacy_available (line 552) | def is_spacy_available(): function is_tensorflow_text_available (line 556) | def is_tensorflow_text_available(): function is_keras_nlp_available (line 560) | def is_keras_nlp_available(): function is_in_notebook (line 564) | def is_in_notebook(): function is_pytorch_quantization_available (line 582) | def is_pytorch_quantization_available(): function is_tensorflow_probability_available (line 586) | def is_tensorflow_probability_available(): function is_pandas_available (line 590) | def is_pandas_available(): function is_sagemaker_dp_enabled (line 594) | def is_sagemaker_dp_enabled(): function is_sagemaker_mp_enabled (line 608) | def is_sagemaker_mp_enabled(): function is_training_run_on_sagemaker (line 632) | def is_training_run_on_sagemaker(): function is_soundfile_availble (line 636) | def is_soundfile_availble(): function is_timm_available (line 640) | def is_timm_available(): function is_natten_available (line 644) | def is_natten_available(): function is_torchaudio_available (line 648) | def is_torchaudio_available(): function is_speech_available (line 652) | def is_speech_available(): function is_phonemizer_available (line 657) | def is_phonemizer_available(): function torch_only_method (line 661) | def torch_only_method(fn): function is_ccl_available (line 674) | def is_ccl_available(): function is_decord_available (line 678) | def is_decord_available(): function is_sudachi_available (line 682) | def is_sudachi_available(): function is_jumanpp_available (line 686) | def is_jumanpp_available(): function is_cython_available (line 690) | def is_cython_available(): function is_jieba_available (line 694) | def is_jieba_available(): function requires_backends (line 997) | def requires_backends(obj, backends): class DummyObject (line 1017) | class DummyObject(type): method __getattribute__ (line 1023) | def __getattribute__(cls, key): function is_torch_fx_proxy (line 1029) | def is_torch_fx_proxy(x): class _LazyModule (line 1037) | class _LazyModule(ModuleType): method __init__ (line 1044) | def __init__(self, name, module_file, import_structure, module_spec=No... method __dir__ (line 1061) | def __dir__(self): method __getattr__ (line 1070) | def __getattr__(self, name: str) -> Any: method _get_module (line 1084) | def _get_module(self, module_name: str): method __reduce__ (line 1093) | def __reduce__(self): class OptionalDependencyNotAvailable (line 1097) | class OptionalDependencyNotAvailable(BaseException): function direct_transformers_import (line 1101) | def direct_transformers_import(path: str, file="__init__.py") -> ModuleT... FILE: transformers/utils/logging.py function _get_default_logging_level (line 55) | def _get_default_logging_level(): function _get_library_name (line 72) | def _get_library_name() -> str: function _get_library_root_logger (line 76) | def _get_library_root_logger() -> logging.Logger: function _configure_library_root_logger (line 80) | def _configure_library_root_logger() -> None: function _reset_library_root_logger (line 97) | def _reset_library_root_logger() -> None: function get_log_levels_dict (line 110) | def get_log_levels_dict(): function get_logger (line 114) | def get_logger(name: Optional[str] = None) -> logging.Logger: function get_verbosity (line 128) | def get_verbosity() -> int: function set_verbosity (line 151) | def set_verbosity(verbosity: int) -> None: function set_verbosity_info (line 170) | def set_verbosity_info(): function set_verbosity_warning (line 175) | def set_verbosity_warning(): function set_verbosity_debug (line 180) | def set_verbosity_debug(): function set_verbosity_error (line 185) | def set_verbosity_error(): function disable_default_handler (line 190) | def disable_default_handler() -> None: function enable_default_handler (line 199) | def enable_default_handler() -> None: function add_handler (line 208) | def add_handler(handler: logging.Handler) -> None: function remove_handler (line 217) | def remove_handler(handler: logging.Handler) -> None: function disable_propagation (line 226) | def disable_propagation() -> None: function enable_propagation (line 235) | def enable_propagation() -> None: function enable_explicit_format (line 245) | def enable_explicit_format() -> None: function reset_format (line 260) | def reset_format() -> None: function warning_advice (line 272) | def warning_advice(self, *args, **kwargs): function warning_once (line 287) | def warning_once(self, *args, **kwargs): class EmptyTqdm (line 301) | class EmptyTqdm: method __init__ (line 304) | def __init__(self, *args, **kwargs): # pylint: disable=unused-argument method __iter__ (line 307) | def __iter__(self): method __getattr__ (line 310) | def __getattr__(self, _): method __enter__ (line 318) | def __enter__(self): method __exit__ (line 321) | def __exit__(self, type_, value, traceback): class _tqdm_cls (line 325) | class _tqdm_cls: method __call__ (line 326) | def __call__(self, *args, **kwargs): method set_lock (line 332) | def set_lock(self, *args, **kwargs): method get_lock (line 337) | def get_lock(self): function is_progress_bar_enabled (line 345) | def is_progress_bar_enabled() -> bool: function enable_progress_bar (line 351) | def enable_progress_bar(): function disable_progress_bar (line 358) | def disable_progress_bar(): FILE: transformers/utils/model_parallel_utils.py function assert_device_map (line 19) | def assert_device_map(device_map, num_blocks): function get_device_map (line 50) | def get_device_map(n_layers, devices): FILE: transformers/utils/notebook.py function format_time (line 26) | def format_time(t): function html_progress_bar (line 33) | def html_progress_bar(value, total, prefix, label, width=300): function text_to_html_table (line 44) | def text_to_html_table(items): class NotebookProgressBar (line 61) | class NotebookProgressBar: method __init__ (line 101) | def __init__( method update (line 118) | def update(self, value: int, force_update: bool = False, comment: str ... method update_bar (line 169) | def update_bar(self, value, comment=None): method display (line 184) | def display(self): method close (line 195) | def close(self): class NotebookTrainingTracker (line 201) | class NotebookTrainingTracker(NotebookProgressBar): method __init__ (line 211) | def __init__(self, num_steps, column_names=None): method display (line 216) | def display(self): method write_line (line 227) | def write_line(self, values): method add_child (line 246) | def add_child(self, total, prefix=None, width=300): method remove_child (line 259) | def remove_child(self): class NotebookProgressCallback (line 267) | class NotebookProgressCallback(TrainerCallback): method __init__ (line 273) | def __init__(self): method on_train_begin (line 278) | def on_train_begin(self, args, state, control, **kwargs): method on_step_end (line 287) | def on_step_end(self, args, state, control, **kwargs): method on_prediction_step (line 296) | def on_prediction_step(self, args, state, control, eval_dataloader=Non... method on_predict (line 308) | def on_predict(self, args, state, control, **kwargs): method on_log (line 313) | def on_log(self, args, state, control, logs=None, **kwargs): method on_evaluate (line 321) | def on_evaluate(self, args, state, control, metrics=None, **kwargs): method on_train_end (line 356) | def on_train_end(self, args, state, control, **kwargs): FILE: transformers/utils/quantization_config.py class BitsAndBytesConfig (line 37) | class BitsAndBytesConfig: method __init__ (line 87) | def __init__( method post_init (line 120) | def post_init(self): method is_quantizable (line 151) | def is_quantizable(self): method quantization_method (line 157) | def quantization_method(self): method from_dict (line 172) | def from_dict(cls, config_dict, return_unused_kwargs, **kwargs): method to_json_file (line 204) | def to_json_file(self, json_file_path: Union[str, os.PathLike]): method to_dict (line 221) | def to_dict(self) -> Dict[str, Any]: FILE: transformers/utils/versions.py function _compare_versions (line 43) | def _compare_versions(op, got_ver, want_ver, requirement, pkg, hint): function require_version (line 55) | def require_version(requirement: str, hint: Optional[str] = None) -> None: function require_version_core (line 120) | def require_version_core(requirement):